Fix div10 without method_missing
but reanimate infer_type to auto create the needed regsiters also some helpers
This commit is contained in:
@ -10,6 +10,12 @@ module Risc
|
||||
@compiler = Risc::MethodCompiler.new( method, SlotMachine::Label.new( "source_name", "return_label") )
|
||||
@builder = @compiler.builder(method)
|
||||
end
|
||||
def test_register_creation
|
||||
assert_equal RegisterValue , @builder.register(:name).class
|
||||
end
|
||||
def test_register_creation_compiler
|
||||
assert @builder.register(:name).compiler
|
||||
end
|
||||
def test_list
|
||||
assert_equal :List , @builder.infer_type(:list).class_name
|
||||
end
|
||||
|
@ -14,7 +14,7 @@ module SlotMachine
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 70 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 69 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user