rename function_call to call_site in all levels to avoid confusion

This commit is contained in:
Torsten Ruger
2014-05-13 21:15:02 +03:00
parent 04af367bc0
commit 46ea1df51e
17 changed files with 73 additions and 70 deletions

25
lib/vm/call_site.rb Normal file
View File

@@ -0,0 +1,25 @@
module Vm
# name and args , return
class CallSite < Value
def initialize(name , args , function )
@name = name
@args = args
@function = function
end
attr_reader :function , :args , :name
def load_args into
args.each_with_index do |arg , index|
puts "load " + arg.inspect
arg.load( into , index )
end
end
def do_call into
into.add_code CMachine.instance.function_call into , self
end
end
end