adds explicit load_self instruction

This commit is contained in:
Torsten Ruger
2014-07-15 18:27:13 +03:00
parent 930740e1db
commit 4d725ea1ae
5 changed files with 40 additions and 13 deletions

View File

@ -5,6 +5,8 @@ module Ast
# attr_reader :name, :args , :receiver
@@counter = 0
def compile frame , method
me = receiver.compile(frame , method )
method.add Virtual::LoadSelf.new(me)
with = args.collect{|a| a.compile(frame , method)}
frame.compile_send( method , name , with )
end