while compiles. jo

This commit is contained in:
Torsten Ruger
2014-05-14 12:02:54 +03:00
parent d50c38f5ad
commit d6b5d46165
5 changed files with 18 additions and 11 deletions

View File

@ -16,8 +16,7 @@ module Vm
if arg.is_a? IntegerConstant
Vm::Integer.new(index).load into , arg
else
raise "no #{arg.inspect}" if arg.register != index
#arg.load( into , index )
arg.move( into , index ) if arg.register != index
end
end
end

View File

@ -73,6 +73,11 @@ module Vm
def load block , right
CMachine.instance.integer_load block , self , right
end
def move block , right
CMachine.instance.integer_move block , self , right
end
end
end
require_relative "constants"