Loading...
Please wait, while we are loading the content...
Similar Documents
Variable Access in Languages with Higher Order Procedures
| Content Provider | Semantic Scholar |
|---|---|
| Author | Davie, Antony J. T. |
| Copyright Year | 1979 |
| Abstract | The usual way of implementing a block or procedure structured language is by use of a display which gives access to the various static levels of variable declaration on a stack at run time. In addition a dynamic record of return information has to be maintained. This method makes the assumption that storage will be released in the reverse order to that in which it was claimed (i.e. in a stack-like way). Many languages, like Pascal and Algol 68, have the facility to claim storage from an alternative source called the free storage area or heap. The stack mechanism is not powerful enough to cope with all situations: for instance in a language which has pointer variables which can survive after the objects they point to have gone out of scope; or in a language which can have higher order functions with non-local variables. An alternative is proposed based on Landin's concept of a closure in which only two levels of storage are recognised by the run-time system in a block or procedure-the local variables and the non-local variables. The user, however, can still declare variables at any lexicographic level. Access to variables is very simple at run time through two vectors of identifiers. The method has been used in the implementation of a language called IDEA. |
| File Format | PDF HTM / HTML |
| Language | English |
| Access Restriction | Open |
| Content Type | Text |
| Resource Type | Article |