change method locals to type object too (same as args)

This commit is contained in:
Torsten Ruger
2016-12-13 19:18:17 +02:00
parent 16b3a77350
commit 012b5d683c
7 changed files with 69 additions and 26 deletions

View File

@ -26,7 +26,7 @@ module Register
end
def test_call_main_op
Register.machine.space.get_main.ensure_local(:bar , :Integer)
Register.machine.space.get_main.add_local(:bar , :Integer)
@input =s(:call,s(:name, :main),s(:arguments , s(:name, :bar) ))
check
end

View File

@ -21,12 +21,12 @@ module Register
end
end
def test_local_int
Register.machine.space.get_main.ensure_local(:bar , :Integer)
Register.machine.space.get_main.add_local(:bar , :Integer)
@input = s(:operator_value, :+, s(:name, :bar), s(:int, 3))
check
end
def test_int_local
Register.machine.space.get_main.ensure_local(:bar , :Integer)
Register.machine.space.get_main.add_local(:bar , :Integer)
@input = s(:operator_value, :+, s(:int, 3), s(:name, :bar))
check
end

View File

@ -10,7 +10,7 @@ module Register
end
def test_local
Register.machine.space.get_main.ensure_local(:bar , :Integer)
Register.machine.space.get_main.add_local(:bar , :Integer)
@input = s(:name, :bar)
@output = Register::RegisterValue
check