Module: YTLJit::OpVarValueMixin
- Included in:
- OpVarImmidiate32, OpVarImmidiate64, OpVarMem32, OpVarMem64
- Defined in:
- lib/ytljit/instruction.rb
Constant Summary collapse
- @@instances =
[]
Class Method Summary collapse
Instance Method Summary collapse
- #add_refer(stfunc) ⇒ Object
- #initialize(var) ⇒ Object
- #refer ⇒ Object
- #to_immidiate(klass = OpVarImmidiateAddress) ⇒ Object
- #value ⇒ Object
Class Method Details
.instances ⇒ Object
62 63 64 |
# File 'lib/ytljit/instruction.rb', line 62 def self.instances @@instances end |
Instance Method Details
#add_refer(stfunc) ⇒ Object
54 55 56 |
# File 'lib/ytljit/instruction.rb', line 54 def add_refer(stfunc) @refer.push stfunc end |
#initialize(var) ⇒ Object
40 41 42 43 44 |
# File 'lib/ytljit/instruction.rb', line 40 def initialize(var) @var = var @refer = [] @@instances.push self end |
#refer ⇒ Object
46 47 48 |
# File 'lib/ytljit/instruction.rb', line 46 def refer @refer end |
#to_immidiate(klass = OpVarImmidiateAddress) ⇒ Object
58 59 60 |
# File 'lib/ytljit/instruction.rb', line 58 def to_immidiate(klass = OpVarImmidiateAddress) klass.new(@var) end |
#value ⇒ Object
50 51 52 |
# File 'lib/ytljit/instruction.rb', line 50 def value @var.call end |