really remove externs

This commit is contained in:
Torsten Ruger
2014-04-23 11:14:25 +03:00
parent dc9bba58e2
commit 8955cf31da
12 changed files with 1 additions and 698 deletions

View File

@ -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

View File

@ -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