fix register issues, some typos

This commit is contained in:
Torsten Ruger
2014-05-14 22:04:03 +03:00
parent e10f4863ee
commit 3912e0cd31
8 changed files with 26 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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