get method name out from method_missing
This commit is contained in:
@ -10,7 +10,7 @@ module Mom
|
||||
ResolveMethod.new( "method" , :name , cache_entry )
|
||||
end
|
||||
def test_len
|
||||
assert_equal 18 , all.length , all_str
|
||||
assert_equal 19 , all.length , all_str
|
||||
end
|
||||
def test_1_load_name
|
||||
assert_load risc(1) , Symbol , :r1
|
||||
@ -56,14 +56,17 @@ module Mom
|
||||
def test_14_goto_exit
|
||||
assert_label risc(14) , "exit_label_"
|
||||
end
|
||||
def test_15_die
|
||||
assert_syscall risc(15) , :died
|
||||
def test_15_move_name
|
||||
assert_transfer( risc(15) , :r1 , :r1)
|
||||
end
|
||||
def test_16_label
|
||||
assert_label risc(16) , "ok_label_"
|
||||
def test_16_die
|
||||
assert_syscall risc(16) , :died
|
||||
end
|
||||
def test_17_load_method
|
||||
assert_reg_to_slot risc(17) , :r4 , :r2 , 2
|
||||
def test_17_label
|
||||
assert_label risc(17) , "ok_label_"
|
||||
end
|
||||
def test_18_load_method
|
||||
assert_reg_to_slot risc(18) , :r4 , :r2 , 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -14,7 +14,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 14 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 15 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ module Risc
|
||||
LoadConstant, RegToSlot, LoadConstant, LoadConstant, SlotToReg, #15
|
||||
SlotToReg, LoadConstant, OperatorInstruction, IsZero, SlotToReg, #20
|
||||
OperatorInstruction, IsZero, RegToSlot, LoadConstant, SlotToReg, #25
|
||||
SlotToReg, Branch, RegToSlot, SlotToReg, SlotToReg, #30
|
||||
Branch, SlotToReg, RegToSlot, SlotToReg, SlotToReg, #30
|
||||
RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, #35
|
||||
LoadConstant, SlotToReg, DynamicJump, LoadConstant, SlotToReg, #40
|
||||
LoadConstant, OperatorInstruction, IsNotZero, SlotToReg, RegToSlot, #45
|
||||
|
@ -13,7 +13,7 @@ module RubyX
|
||||
end
|
||||
class Object
|
||||
def method_missing(at)
|
||||
X.method_missing
|
||||
X.method_missing(:r1)
|
||||
end
|
||||
end
|
||||
GET
|
||||
@ -28,7 +28,7 @@ GET
|
||||
assert_equal Mom::MethodMissing , compiler.mom_instructions.next.class
|
||||
end
|
||||
def test_risc
|
||||
assert_equal 14 , compiler.to_risc.risc_instructions.length
|
||||
assert_equal 15 , compiler.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user