> -----Original Message----- > From: Leopold Toetsch [mailto:lt@;toetsch.at] > > WRT your comment: "should we use a List * here", I slightly vote for > yes. In the long run we could use List as the basic store for registers > and stacks as well. > List would only need a small extension to manage arbitrary sized data.
Ok, if the code goes in I can easily change this ... > WRT names: wouldn't be a hash faster then the linear search? My thinking is that compilers will most often generate code that accesses lexicals using position and the current structure provides constant time "by position" access to the lexicals. While "by name" access is linear time. As you say, this could be improved using a hash, but at some cost in space (maybe?). In any case, the implementation details of the struct Parrot_Lexicals are (currently) only touched in sub.c, so it should be easy to change the approach. Thanks for the comments, anything else? -- Jonathan Sillito