diff --git a/lib/vm/call_site.rb b/lib/vm/call_site.rb index f7227762..e3ee25f7 100644 --- a/lib/vm/call_site.rb +++ b/lib/vm/call_site.rb @@ -14,9 +14,9 @@ module Vm def load_args into args.each_with_index do |arg , index| if arg.is_a?(IntegerConstant) or arg.is_a?(StringConstant) - Vm::Integer.new(index).load into , arg + function.args[index].load into , arg else - Vm::Integer.new(index).move( into, arg ) if arg.register != index + function.args[index].move( into, arg ) if arg.register != index end end end