segoe
unread,Nov 22, 2009, 1:22:15 PM11/22/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JVM Languages
Currently in my interpreter scopes are represented as specialized
classes so:
Frame0, Frame1, Frame2, Frame3, Frame4
Those hold symbols and values for scopes that have zero to four
symbols respectively.
Frame5to10
This does the same but as a list, and uses binary search.
FrameN
From 10 up, we use a hashtable to represent symbols/values.
(note that in my language is common to use local scopes with 20 or 30
definitions)
I think this is mostly ok regarding performance, but i would like to
ask
is there a better way to do it?