Class: CastOff::Compiler::SimpleIR::TmpVariable
Constant Summary
CastOff::Compiler::SimpleIR::TypeContainer::FixnumWrapper, CastOff::Compiler::SimpleIR::TypeContainer::FloatWrapper
Instance Attribute Summary collapse
#state, #types
Instance Method Summary
collapse
Methods included from Util
#bug, #dlog, #todo, #vlog
Methods inherited from Variable
#class_exact?, #declare?, #is_class_exact, #reset
#box, #boxed?, #boxed_form, #can_unbox?, #class_exact?, #declare, #declare_class, #dynamic?, #is_also, #is_also?, #is_annotated, #is_class_exact, #is_dynamic, #is_just?, #is_negative_cond_value, #is_not, #is_static, #not_initialized, #reset, #static?, #to_debug_string, #to_s, #unboxed?, #undefined?, #union
Constructor Details
Returns a new instance of TmpVariable.
640
641
642
643
|
# File 'lib/cast_off/compile/ir/operand.rb', line 640
def initialize(index)
super()
@index = index
end
|
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
638
639
640
|
# File 'lib/cast_off/compile/ir/operand.rb', line 638
def index
@index
end
|
Instance Method Details
#==(v) ⇒ Object
658
659
660
|
# File 'lib/cast_off/compile/ir/operand.rb', line 658
def ==(v)
eql?(v)
end
|
#eql?(v) ⇒ Boolean
653
654
655
656
|
# File 'lib/cast_off/compile/ir/operand.rb', line 653
def eql?(v)
return false unless v.is_a?(TmpVariable)
@index == v.index
end
|
#has_undefined_path ⇒ Object
666
667
668
|
# File 'lib/cast_off/compile/ir/operand.rb', line 666
def has_undefined_path()
bug()
end
|
#hash ⇒ Object
662
663
664
|
# File 'lib/cast_off/compile/ir/operand.rb', line 662
def hash
self.to_name.hash
end
|
#source ⇒ Object
649
650
651
|
# File 'lib/cast_off/compile/ir/operand.rb', line 649
def source
bug()
end
|
#to_name ⇒ Object
645
646
647
|
# File 'lib/cast_off/compile/ir/operand.rb', line 645
def to_name
"tmp#{@index}"
end
|