Variable closure
AssigneeMicrosoft Corporation
InventorsIgor Zinkovsky, Harish Kantamneni
Life of this patent
Estimating the term…
Loading patent…
AssigneeMicrosoft Corporation
InventorsIgor Zinkovsky, Harish Kantamneni
Estimating the term…
A system and method for accessing closure variables from a lambda expression in certain program configurations, in which the closure variable is accessed while the closure function is active and the closure variable is within an active runtime frame stack corresponding to an instance of the closure function. In response to entering the closure function, a pointer to each closure variable is stored in a stack pointer table. Each reference to each closure variable from the lambda expression is handled by using the closure variable pointer to locate the closure variable on the runtime stack. Program code may be instrumented to insert invocations to helper functions at locations upon entering the closure function and at each reference to each closure variable from the lambda expression.
A computer-based method of accessing a closure variable defined in a function of a computer program from a lambda expression that is invoked from a computer program location outside the function while an instance of the function is active, the variable stored in a frame on a runtime stack, the frame corresponding to the function instance, comprising:
A computer-based system for accessing a closure variable defined in a closure function of a computer program, the system comprising:
A computer-readable storage medium comprising computer program instructions for enabling a user program to access one or more closure variables stored on a runtime stack, the closure variables local to a closure function, the program instructions executable by one or more processors to perform actions including:
Dependencies are inferred from the claim text.