Implementing lexical scope for local variables
Gerard Krol
gerard at gerardkrol.nl
Wed Jul 27 14:35:09 UTC 2016
Hello,
I'm currently implementing lexical scope for local variables. My first try
was to just create a new FrameDescriptor for each block, so I could get
different FrameSlots with the same name. That turned out not to work, as
these frameslots appear to be an index into the frame, and actually refer
to the same stored value.
I now created a workaround where use a single FrameDescriptor. I just
rename the variables inside the block if they have the same name as one in
the outer scope, but I'm not sure that's such a good solution. Perhaps it
would be better to just create a new frame,
Any advice?
Regards,
Gerard
More information about the graal-dev
mailing list