rubyx/test/risc/position/helper.rb

24 lines
391 B
Ruby
Raw Normal View History

2018-06-01 18:13:53 +02:00
require_relative "../helper"
module Risc
class Dummy
def padded_length
4
2018-06-01 18:13:53 +02:00
end
def byte_length
4
end
2018-06-01 18:13:53 +02:00
end
2018-06-02 22:48:12 +02:00
class DummyInstruction < Dummy
include Util::List
def initialize(nekst = nil)
@next = nekst
end
2018-06-06 09:00:07 +02:00
def insert(instruction)
ret = super
Position.get(self).trigger_inserted if Position.set?(self)
ret
end
2018-06-02 22:48:12 +02:00
end
2018-06-01 18:13:53 +02:00
end