fix util namespace
and instruction move ripples
This commit is contained in:
@@ -20,9 +20,9 @@ module Risc
|
||||
# Labels are the only valid branch targets
|
||||
#
|
||||
class Instruction
|
||||
include Common::List
|
||||
include Util::List
|
||||
|
||||
def initialize source , nekst = nil
|
||||
def initialize( source , nekst = nil )
|
||||
@source = source
|
||||
@next = nekst
|
||||
return unless source
|
||||
@@ -40,22 +40,6 @@ module Risc
|
||||
translator.translate( self )
|
||||
end
|
||||
|
||||
def total_byte_length
|
||||
ret = 0
|
||||
self.each{|ins| ret += ins.byte_length}
|
||||
ret
|
||||
end
|
||||
|
||||
def set_position( position )
|
||||
Positioned.set_position(self,position)
|
||||
position += byte_length
|
||||
if self.next
|
||||
self.next.set_position( position )
|
||||
else
|
||||
position
|
||||
end
|
||||
end
|
||||
|
||||
def class_source( derived)
|
||||
"#{self.class.name.split("::").last}: #{derived} #{source_mini}"
|
||||
end
|
||||
|
Reference in New Issue
Block a user