groundwork for interpreter platform
especially positioning makes the previous interpreter approach to fragile (too far off the real thing) Interpreter should be it’s own platform (still use the risc instructions), get a translator and use positions
This commit is contained in:
@ -21,6 +21,7 @@ module Risc
|
||||
class TestMachinePositions < MiniTest::Test
|
||||
def setup
|
||||
@machine = Risc.machine.boot
|
||||
@machine.translate(:arm)
|
||||
@machine.position_all
|
||||
end
|
||||
def test_has_positions
|
||||
@ -32,6 +33,7 @@ module Risc
|
||||
class TestMachineInit < MiniTest::Test
|
||||
def setup
|
||||
@machine = Risc.machine.boot
|
||||
@machine.translate(:arm)
|
||||
@machine.position_all
|
||||
@machine.create_binary
|
||||
end
|
||||
|
@ -18,6 +18,7 @@ module Risc
|
||||
|
||||
def setup
|
||||
@machine = Risc.machine.boot
|
||||
@machine.translate(:arm)
|
||||
@machine.position_all
|
||||
@text_writer = TextWriter.new(@machine)
|
||||
end
|
||||
|
@ -17,10 +17,11 @@ module Risc
|
||||
end
|
||||
|
||||
def test_translate_space
|
||||
assert @machine.translate_arm
|
||||
assert @machine.translate(:arm)
|
||||
end
|
||||
|
||||
def test_no_loops_in_chain
|
||||
@machine.translate(:arm)
|
||||
@machine.position_all
|
||||
init = Parfait.object_space.get_init
|
||||
all = []
|
||||
@ -30,6 +31,7 @@ module Risc
|
||||
end
|
||||
end
|
||||
def test_no_risc #by assembling, risc doesnt have assemble method
|
||||
@machine.translate(:arm)
|
||||
@machine.position_all
|
||||
@machine.objects.each do |id , method|
|
||||
next unless method.is_a? Parfait::TypedMethod
|
||||
|
Reference in New Issue
Block a user