首页> 外国专利> Method for conversion of a variable argument routine to a fixed argument routine

Method for conversion of a variable argument routine to a fixed argument routine

机译:将可变参数例程转换为固定参数例程的方法

摘要

A compiler method analyzes a program listing to identify a first set of subroutines therein, each of which accepts a variable number of arguments, converting the first set of subroutines into further sets of subroutines which accept fixed numbers of arguments. The method includes the steps of: locating subroutines in the program listing which accept a variable number of arguments and identifying which thereof comprise a first set of subroutines that can be altered to a form which accepts a fixed number of arguments; for each subroutine identified as part of the first set, determining call sites which pass arguments to each subroutine and determining a number and kind of said arguments to be passed therefrom; partitioning call sites to each subroutine of the first set into one or more groups, each group comprising call sites which pass an identical number and kind of arguments to an associated subroutine of said first set; duplicating each subroutine of said first set into plural second sets of N corresponding subroutines, wherein N is equal to the number of groups associated with the subroutine of the first set, and revising each one of said N corresponding subroutines to receive a number of fixed arguments to be passed by call sites partitioned into an associated group; and substituting in the program listing the N corresponding subroutines and revising call sites in each group to refer to an associated one of said N corresponding subroutines.
机译:编译器方法分析程序列表以识别其中的第一子例程集,每个子​​例程接受可变数量的参数,然后将第一子例程集转换为其他接受固定数量的参数的子例程集。该方法包括以下步骤:在程序列表中定位接受可变数量的参数的子例程,并识别其中的子例程包括第一子例程集,该子例程可以被改变为接受固定数量的参数的形式。对于标识为第一集合的一部分的每个子例程,确定将参数传递给每个子例程的调用站点,并确定要从其传递的所述参数的数量和种类;将呼叫站点到第一集合的每个子例程划分成一个或多个组,每个组包括将相同数量和种类的参数传递给所述第一集合的相关子例程的呼叫站点;将所述第一集合的每个子例程复制为N个对应的子例程的多个第二集合,其中N等于与第一集合的子例程相关联的组的数目,并且修改所述N个对应的子例程中的每个子例程以接收多个固定参数由划分为关联组的呼叫站点传递;在所述程序中,列出所述N个对应子程序,并修改每个组中的调用站点,以引用所述N个对应子程序中的一个。

著录项

  • 公开/公告号US6009273A

    专利类型

  • 公开/公告日1999-12-28

    原文格式PDF

  • 申请/专利权人 HEWLETT-PACKARD COMPANY;

    申请/专利号US19970953549

  • 发明设计人 JIYANG LIU;ANDREW E. AYERS;

    申请日1997-10-21

  • 分类号G06F9/44;

  • 国家 US

  • 入库时间 2022-08-22 01:38:25

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号