added fix from review
This commit is contained in:
@@ -37,9 +37,9 @@
|
||||
\def\papertitle{$\lambda_{mmm}$: the Intermediate Representation for Synchronous Signal Processing Language Based on Lambda Calculus}
|
||||
\def\paperauthorA{Tomoya Matsuura}
|
||||
|
||||
|
||||
% we should not have page number
|
||||
\pagenumbering{gobble}
|
||||
% Authors' affiliations have to be set below
|
||||
|
||||
%------------------------------------------------------------------------------------------
|
||||
\documentclass[twoside,a4paper]{article}
|
||||
\usepackage{IFC-24}
|
||||
@@ -355,7 +355,7 @@ This storage area is accompanied by data indicating the position from which the
|
||||
|
||||
However, in the case of higher-order functions that receive a function as an argument and return another function, the layout of the internal state of the given function is unknown at the compilation, so an internal state storage area is created for each instantiated closure separately from the global storage area held by the VM instance itself. The VM have an another stack to keep the pointer to state storage. Each time \texttt{CALLCLS} used, VM pushes a pointer to the state storage of instantiated closure to the state stack and, at the end of the closure call, VM pops out the state pointer from the stack.
|
||||
|
||||
Instantiated closures also hold the storage area of upvalues. Until the closure exits the context of parent function (such a closure is called "Open Closure"), upvalues holds a negative offset on the stack at the ongoing execution. This offset value can be determined at compile time, the offset is stored in the function prototype in the program. Also, not only local variables, upvalue may refer to parent funtion's upvalue (this situation can happens when at least 3 functions are nested). So the array of upvalue indexes in the function prototype holds a pair of tag whether it is local stack value or further upvalue and its index (negative offset of stack or parent function's upvalue index).
|
||||
Instantiated closures also hold the storage area of upvalues. Until the closure exits the context of parent function (such a closure is called ``Open Closure''), upvalues holds a negative offset on the stack at the ongoing execution. This offset value can be determined at compile time, the offset is stored in the function prototype in the program. Also, not only local variables, upvalue may refer to parent funtion's upvalue (this situation can happens when at least 3 functions are nested). So the array of upvalue indexes in the function prototype holds a pair of tag whether it is local stack value or further upvalue and its index (negative offset of stack or parent function's upvalue index).
|
||||
|
||||
For instance, if the Upvalue indexes in the program were like \texttt{[upvalue(1),local(3)]}, \texttt{GETUPVALUE 6 1} means that, take \texttt{3} from the upvalue indexes 1 and get value from \texttt{R(-3)} over the base pointer and store it to \texttt{R(6)}.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user