Class: CastOff::Compiler::SimpleIR::Argument
- Inherits:
-
Variable
- Object
- TypeContainer
- Variable
- CastOff::Compiler::SimpleIR::Argument
- Defined in:
- lib/cast_off/compile/ir/operand.rb
Constant Summary
Constants inherited from TypeContainer
TypeContainer::FixnumWrapper, TypeContainer::FloatWrapper
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#lvar ⇒ Object
readonly
Returns the value of attribute lvar.
Attributes inherited from TypeContainer
Instance Method Summary collapse
- #==(v) ⇒ Object
- #eql?(v) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name, id, op_idx, lv, types) ⇒ Argument
constructor
A new instance of Argument.
- #source ⇒ Object
- #to_name ⇒ Object
Methods inherited from Variable
#class_exact?, #declare?, #has_undefined_path, #is_class_exact, #reset
Methods inherited from TypeContainer
#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
Methods included from Util
Constructor Details
#initialize(name, id, op_idx, lv, types) ⇒ Argument
Returns a new instance of Argument.
831 832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/cast_off/compile/ir/operand.rb', line 831 def initialize(name, id, op_idx, lv, types) super() @name = name @id = id @op_idx = op_idx @level = lv @lvar = "local#{@id}_#{@name}" # FIXME if types bug() unless types.is_a?(Array) is_static(types) end end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
829 830 831 |
# File 'lib/cast_off/compile/ir/operand.rb', line 829 def id @id end |
#lvar ⇒ Object (readonly)
Returns the value of attribute lvar.
829 830 831 |
# File 'lib/cast_off/compile/ir/operand.rb', line 829 def lvar @lvar end |
Instance Method Details
#==(v) ⇒ Object
858 859 860 |
# File 'lib/cast_off/compile/ir/operand.rb', line 858 def ==(v) eql?(v) end |
#eql?(v) ⇒ Boolean
853 854 855 856 |
# File 'lib/cast_off/compile/ir/operand.rb', line 853 def eql?(v) return false unless v.is_a?(Argument) @id == v.id end |
#hash ⇒ Object
862 863 864 |
# File 'lib/cast_off/compile/ir/operand.rb', line 862 def hash self.to_name.hash end |
#source ⇒ Object
849 850 851 |
# File 'lib/cast_off/compile/ir/operand.rb', line 849 def source bug() end |
#to_name ⇒ Object
845 846 847 |
# File 'lib/cast_off/compile/ir/operand.rb', line 845 def to_name "<Argument:#{@id}_#{@name}>" end |