really remove externs
This commit is contained in:
@ -35,7 +35,7 @@ module Asm
|
||||
node.args << add_string(arg)
|
||||
elsif (arg.is_a?(Symbol))
|
||||
node.args << Asm::LabelRefNode.new(arg.to_s)
|
||||
elsif (arg.is_a?(Asm::Arm::GeneratorLabel) or arg.is_a?(Asm::Arm::GeneratorExternLabel))
|
||||
elsif (arg.is_a?(Asm::Arm::GeneratorLabel))
|
||||
node.args << arg
|
||||
else
|
||||
raise 'Invalid argument `%s\' for instruction' % arg.inspect
|
||||
@ -65,17 +65,6 @@ module Asm
|
||||
}
|
||||
}
|
||||
|
||||
#externs dropped for now
|
||||
def extern(sym)
|
||||
if (lbl = @externs.find { |extern| extern.name == sym })
|
||||
lbl
|
||||
else
|
||||
@externs << lbl = Asm::Arm::GeneratorExternLabel.new(sym)
|
||||
add_value lbl
|
||||
lbl
|
||||
end
|
||||
end
|
||||
|
||||
def assemble_to_string
|
||||
#put the strings at the end of the assembled code.
|
||||
# adding them will fix their position and make them assemble after
|
||||
|
@ -15,11 +15,3 @@ class Asm::Arm::GeneratorLabel < Asm::LabelObject
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
class Asm::Arm::GeneratorExternLabel < Asm::LabelObject
|
||||
def initialize(name)
|
||||
@name = name
|
||||
extern!
|
||||
end
|
||||
attr_reader :name
|
||||
end
|
||||
|
Reference in New Issue
Block a user