fix code listener logic bug
next's position was only updated initially previous logic relied on pushing everything long rightly but it wasn't right, and no harm in setting position twice, as events only fire if there is real change
This commit is contained in:
@ -21,9 +21,8 @@ module Risc
|
||||
end
|
||||
class DummyPlatform
|
||||
def self.boot
|
||||
machine = Risc.machine.boot
|
||||
machine.set_platform( self.new )
|
||||
machine
|
||||
Parfait.boot!
|
||||
Risc.boot!
|
||||
end
|
||||
def translator
|
||||
DummyTranslator.new
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
def setup
|
||||
DummyPlatform.boot
|
||||
@binary = Parfait::BinaryCode.new(1)
|
||||
@bin_pos = CodeListener.init(@binary).set(0)
|
||||
@bin_pos = CodeListener.init(@binary, :interpreter).set(0)
|
||||
@instruction = DummyInstruction.new
|
||||
13.times {@instruction.last.insert(DummyInstruction.new) }
|
||||
@position = InstructionListener.init(@instruction , @binary)
|
||||
|
Reference in New Issue
Block a user