3 ms·
Section 4.2 of http://lafo.ssw.uni-linz.ac.at/papers/2013_Onward_OneVMToRuleThemAll.pdf http://lafo.ssw.uni-linz.ac.at/papers/2013_Onward_OneVMToRul... describe
by chrisseaton 7y ago
Section 4.2 of http://lafo.ssw.uni-linz.ac.at/papers/2013_Onward_OneVMToRuleThemAll.pdf http://lafo.ssw.uni-linz.ac.at/papers/2013_Onward_OneVMToRul... describes it.
> We ensure this by forcing an escape analysis ... of the array containing the values of local variables. This eliminates every access to the array and instead connects the read of the variable with the last write. ... After conversion to SSA form, guest-language local variables have no performance disadvantage compared to host language local variables.
Then if the closure escapes (stored into the heap or something), the escape analysis just naturally fails and the frame is stored on the heap again.