fix register issues, some typos
This commit is contained in:
@ -16,7 +16,7 @@ module Vm
|
||||
if arg.is_a? IntegerConstant
|
||||
Vm::Integer.new(index).load into , arg
|
||||
else
|
||||
arg.move( into , index ) if arg.register != index
|
||||
Vm::Integer.new(index).move( into, arg ) if arg.register != index
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -22,8 +22,8 @@ module Vm
|
||||
super()
|
||||
@name = name
|
||||
@args = args
|
||||
@entry = Core::Kernel::function_entry( Vm::Block.new("#{name}_exit") ,name )
|
||||
@exit = Core::Kernel::function_exit( Vm::Block.new("#{name}_entry") , name )
|
||||
@entry = Core::Kernel::function_entry( Vm::Block.new("#{name}_entry") ,name )
|
||||
@exit = Core::Kernel::function_exit( Vm::Block.new("#{name}_exit") , name )
|
||||
@body = Block.new("#{name}_body")
|
||||
@reg_count = 0
|
||||
branch_body
|
||||
@ -47,7 +47,7 @@ module Vm
|
||||
@entry.link_at address , context
|
||||
address += @entry.length
|
||||
@body.link_at(address , context)
|
||||
address += @entry.length
|
||||
address += @body.length
|
||||
@exit.link_at(address,context)
|
||||
end
|
||||
|
||||
|
@ -63,11 +63,11 @@ module Vm
|
||||
CMachine.instance.integer_less_or_equal block , self , right
|
||||
end
|
||||
|
||||
def plus block , right
|
||||
CMachine.instance.integer_plus block , self , right
|
||||
def plus block , left , right
|
||||
CMachine.instance.integer_plus block , self , left , right
|
||||
end
|
||||
def minus block , right
|
||||
CMachine.instance.integer_minus block , self , right
|
||||
def minus block , left , right
|
||||
CMachine.instance.integer_minus block , self , left , right
|
||||
end
|
||||
|
||||
def load block , right
|
||||
|
Reference in New Issue
Block a user