operator also fell into ssa trap

relying on register identity
in fact the whole operator concept was geared towards this, using 2 regs instead of one to avoid the whole issue
better now
This commit is contained in:
2020-03-15 12:58:16 +02:00
parent 3145547315
commit 7232c28ecd
4 changed files with 10 additions and 6 deletions

View File

@ -51,11 +51,15 @@ module Risc
assert_equal @r0 , message.register
end
def test_operator
ret = @r0.op :<< , @r1
@r0.set_compiler( fake = SuperFakeCompiler.new)
result = @r0.op :<< , @r1
ret = fake.code
assert_operator ret , :<< , :message , "id_" , "op_<<_"
end
def test_operator_slot
ret = @r0.op :<< , @r1[:type]
@r0.set_compiler( fake = SuperFakeCompiler.new)
result = @r0.op :<< , @r1[:type]
ret = fake.code
assert_operator ret , :<< , :message , "id_.type" , "op_<<_"
end
def test_byte_to_reg