Class: CastOff::Compiler::SimpleIR::Self
Constant Summary
TypeContainer::FixnumWrapper, TypeContainer::FloatWrapper
Instance Attribute Summary collapse
#state, #types
Instance Method Summary
collapse
Methods included from Util
#bug, #dlog, #todo, #vlog
Methods inherited from Variable
#declare?, #has_undefined_path, #is_class_exact
#box, #boxed?, #boxed_form, #can_unbox?, #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, #static?, #to_s, #unboxed?, #undefined?, #union
Constructor Details
#initialize(translator, iseq) ⇒ Self
Returns a new instance of Self.
585
586
587
588
589
590
591
592
593
594
595
596
597
598
|
# File 'lib/cast_off/compile/ir/operand.rb', line 585
def initialize(translator, iseq)
super()
@iseq = iseq
@translator = translator
bug() unless @iseq.is_a?(Iseq)
reciever_class = translator.reciever_class
if reciever_class
reciever_class = [reciever_class] unless reciever_class.instance_of?(Array)
reciever_class.each{|c| is_also(c)}
else
is_dynamic()
end
end
|
Instance Attribute Details
#iseq ⇒ Object
Returns the value of attribute iseq.
583
584
585
|
# File 'lib/cast_off/compile/ir/operand.rb', line 583
def iseq
@iseq
end
|
Instance Method Details
#==(v) ⇒ Object
619
620
621
|
# File 'lib/cast_off/compile/ir/operand.rb', line 619
def ==(v)
eql?(v)
end
|
#class_exact? ⇒ Boolean
600
601
602
|
# File 'lib/cast_off/compile/ir/operand.rb', line 600
def class_exact?
false
end
|
#eql?(v) ⇒ Boolean
612
613
614
615
616
617
|
# File 'lib/cast_off/compile/ir/operand.rb', line 612
def eql?(v)
return false unless v.is_a?(Self)
return true if @translator.inline_block?
@iseq == v.iseq
end
|
#hash ⇒ Object
623
624
625
|
# File 'lib/cast_off/compile/ir/operand.rb', line 623
def hash
self.to_name.hash
end
|
#reset ⇒ Object
631
632
633
|
# File 'lib/cast_off/compile/ir/operand.rb', line 631
def reset()
end
|
#source ⇒ Object
608
609
610
|
# File 'lib/cast_off/compile/ir/operand.rb', line 608
def source
"self"
end
|
#to_debug_string ⇒ Object
627
628
629
|
# File 'lib/cast_off/compile/ir/operand.rb', line 627
def to_debug_string
"#{super}(#{@iseq})"
end
|
#to_name ⇒ Object
604
605
606
|
# File 'lib/cast_off/compile/ir/operand.rb', line 604
def to_name
"self"
end
|