[Newcompiler] Implementing bytecode for closur

bryce at kampjes.demon.co.uk bryce at kampjes.demon.co.uk
Thu Apr 26 19:31:24 UTC 2007


Marcus Denker writes:
 > Another idea (I think Anthony proposed that in the past) is to have a  
 > getField / setField bytecode. Then you would have two
 > (pushEnvironment / getField) for accesing temps in blocks... the  
 > reason is that Environments can be nested, so just a
 > "getTemp 5" like bytecode is not enough.

Another possibility is to have a getTemp bytecode that takes two
arguments, on specifying how far up the closure tree to go, the other
to access the field. That way you'd only be paying for the decode time
once.

Bryce


More information about the Newcompiler mailing list