lib/furnace/ssa/argument.rb in furnace-0.4.0.beta.1 vs lib/furnace/ssa/argument.rb in furnace-0.4.0.beta.2

- old
+ new

@@ -1,23 +1,27 @@ module Furnace class SSA::Argument < SSA::NamedValue attr_reader :type - def initialize(function, type, name) - super(function, name) - self.type = type + def initialize(type, name) + @type = type.to_type + + super(name) end def type=(type) - @type = type.to_type if type + @type = type.to_type + + SSA.instrument(self) end - def has_side_effects? - true + def replace_type_with(type, replacement) + self.type = self.type. + replace_type_with(type, replacement) end - def pretty_print(p=SSA::PrettyPrinter.new) - p.type type - p.name name + def awesome_print(p=AwesomePrinter.new) + p.nest(@type). + name(name) end end -end \ No newline at end of file +end