Optimizing parameter passing
Abstract
A method and system for optimizing the passing of a parameter to a routine is provided. It is determined if any parameters are aliased in a call to a called routine. In the absence of aliases, calling routines passing parameters to called routines using “call by reference”. Recovery mechanisms are provided, when appropriate, when unhandled exception occur during execution of the called routines. According to the method, a recovery mechanism includes encapsulating the called routine and call statement block with a “catch-all” exception handler. The response to an otherwise unhandled exception includes restoring the actual parameter using a stored copy of the actual parameter. The restoration is performed by making a handle point to the copy of the actual parameter that was made before execution of the called routine.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 24.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A method for executing a call that includes passing a parameter from a calling routine to a called routine, the method comprising the steps of: determining whether the parameter is aliased; if the parameter is not aliased, then generating code to pass the parameter using call by reference; if the parameter is aliased, then generating code to pass the parameter in the call using call by value.
- Claim 2Depends on #1
The method of claim 1 further comprising the step of generating code to encapsulate the call with a catch-all exception handler.
- Claim 3Depends on #1
The method of claim 1 further comprising the steps of: generating code to store a copy of a value held by the parameter, said value being the value of the parameter at the time the call is made; and generating code to replace the para
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 24 total)
References Cited — Backward Prior Art (14)
Non-Patent Literature (4)
- Chase et al. Analysis of Pointers and Structures. ACM. 1990. pp. 296-310.*
- Choi et al. Efficient Flow-Sensitive Interprocedural Computation of Pointer-Induced Aliases and Side Effects. ACM. 1993. pp. 232-245.*
- Deutsch. Interprocedural May-Alias Analysis for Pointers: Beyond k-Limiting. ACM. 1994. pp. 230-241.
- Landi et al. Interprocedural Modification Side Effect Analysis With Pointer Aliasing. ACM. 1993. pp. 56-67.*