Fix first Slot instruction that uses builder

now without method_missing and names
but still with instance_eval, hmm. Tried without, makes code much less readable
This commit is contained in:
2020-03-01 18:07:42 +02:00
parent 4888b3b6db
commit 4b303977a7
5 changed files with 22 additions and 13 deletions

View File

@ -18,7 +18,11 @@ module Minitest
def assert_load(load , clazz = nil , register = nil)
assert_equal Risc::LoadConstant , load.class
assert_equal( clazz , load.constant.class) if clazz
assert_equal( register , load.register.symbol, "wrong destination register") if register
if register
assert_equal( register , load.register.symbol, "wrong destination register") if register
else
assert load.register.is_object? , "reg #{load.register.symbol} is not object (ie no id_xx)"
end
end
def assert_transfer( transfer , from , to)
assert_equal Risc::Transfer , transfer.class