better test for add

This commit is contained in:
Torsten Ruger
2015-08-09 00:53:04 +03:00
parent bae7f5dcb1
commit 4e56056b62
2 changed files with 10 additions and 5 deletions

View File

@ -7,11 +7,11 @@ module Register
plus_function = Virtual::MethodSource.create_method(:Integer,:plus , [:Integer] )
plus_function.source.return_type = Virtual::Integer
plus_function.source.receiver = Virtual::Integer
tmp = Register.tmp_reg
index = Register.arg_index 1
plus_function.source.add_code Register.get_slot( plus_function , :message , index , tmp )
add = Register::OperatorInstruction.new( plus_function, :add , tmp , Register.self_reg )
add = Register::OperatorInstruction.new( plus_function, :add , Register.self_reg , tmp )
plus_function.source.add_code add
return plus_function
end