Class: Mirah::JVM::Compiler::JVMBytecode::ImplicitSelf

Inherits:
Object
  • Object
show all
Defined in:
lib/mirah/jvm/compiler/jvm_bytecode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ ImplicitSelf

Returns a new instance of ImplicitSelf.



30
31
32
# File 'lib/mirah/jvm/compiler/jvm_bytecode.rb', line 30

def initialize(type)
  @inferred_type = type
end

Instance Attribute Details

#inferred_typeObject (readonly)

Returns the value of attribute inferred_type.



28
29
30
# File 'lib/mirah/jvm/compiler/jvm_bytecode.rb', line 28

def inferred_type
  @inferred_type
end

Instance Method Details

#compile(compiler, expression) ⇒ Object



34
35
36
# File 'lib/mirah/jvm/compiler/jvm_bytecode.rb', line 34

def compile(compiler, expression)
  compiler.compile_self if expression
end