发明授权
- 专利标题: Generating code that calls functions based on types of memory
- 专利标题(中): 根据内存类型生成调用函数的代码
-
申请号: US13225040申请日: 2011-09-02
-
公开(公告)号: US08910136B2公开(公告)日: 2014-12-09
- 发明人: Cary L. Bates , Nicholas P. Johnson , Justin K. King , Lee Nee , Siobhan M. O'Toole
- 申请人: Cary L. Bates , Nicholas P. Johnson , Justin K. King , Lee Nee , Siobhan M. O'Toole
- 申请人地址: US NY Armonk
- 专利权人: International Business Machines Corporation
- 当前专利权人: International Business Machines Corporation
- 当前专利权人地址: US NY Armonk
- 代理商 Owen J. Gamon; Roy W. Truelson
- 主分类号: G06F12/08
- IPC分类号: G06F12/08 ; G06F12/06 ; G06F9/44 ; G06F12/02 ; G06F12/10
摘要:
In an embodiment, in response to reading a declaration of a function that specifies a name of the function and a type of memory on which the function operates, the name of the function, a pointer to the function, and the type are saved to a template. In response to reading a call statement that specifies the name of the function and an identifier of an object, first code is generated. The first code, when executed, reads the pointer to the function from a virtual function table pointed to by the object, finds an entry in the virtual function table that represents the function, and reads the pointer from the entry in the virtual function table. The call statement, when executed, requests a call of the function. Second code is generated that, when executed, calls the function using the pointer read from the virtual function table.
公开/授权文献
信息查询