Top Fields Constructors Methods
org.jruby.ir.targets.simple

public Class NormalInstanceVariableCompiler

extends Object
implements InstanceVariableCompiler
Class Inheritance
All Implemented Interfaces
org.jruby.ir.targets.InstanceVariableCompiler
Imports
org.jruby.compiler.impl.SkinnyMethodAdapter, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.targets.IRBytecodeAdapter, .InstanceVariableCompiler, .JVM, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.ivars.VariableAccessor, org.jruby.util.CodegenUtils, .JavaNameMangler, org.objectweb.asm.Label, .Opcodes

Field Summary

Modifier and TypeField and Description
private final IRBytecodeAdapter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
cacheVariableAccessor(String
name of the variable
name
,
boolean
whether the accessor will be used for a write operation
write
)

Retrieve the proper variable accessor for the given arguments.

public void
getField(Runnable
runnable to push source object, may be called twice
source
,
String
name of variable to load
name
,
boolean
should the result be null instead of nil on non-existent field
rawValue
)

Implements org.jruby.ir.targets.InstanceVariableCompiler.getField.

Load instance variable from self.

public void
putField(Runnable
runnable to push target object, may be called twice
target
,
Runnable
runnable to push value to assign, will only be called once
value
,
String
name of variable to store
name
)

Implements org.jruby.ir.targets.InstanceVariableCompiler.putField.

Store instance variable into self.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compilerback to summary
private final IRBytecodeAdapter compiler

Constructor Detail

NormalInstanceVariableCompilerback to summary
public NormalInstanceVariableCompiler(IRBytecodeAdapter compiler)

Method Detail

cacheVariableAccessorback to summary
private void cacheVariableAccessor(String name, boolean write)

Retrieve the proper variable accessor for the given arguments. The source object is expected to be on stack.

Parameters
name:String

name of the variable

write:boolean

whether the accessor will be used for a write operation

getFieldback to summary
public void getField(Runnable source, String name, boolean rawValue)

Implements org.jruby.ir.targets.InstanceVariableCompiler.getField.

Doc from org.jruby.ir.targets.InstanceVariableCompiler.getField.

Load instance variable from self.

Stack required: none Stack result: value from self

Parameters
source:Runnable

runnable to push source object, may be called twice

name:String

name of variable to load

rawValue:boolean

should the result be null instead of nil on non-existent field

putFieldback to summary
public void putField(Runnable target, Runnable value, String name)

Implements org.jruby.ir.targets.InstanceVariableCompiler.putField.

Doc from org.jruby.ir.targets.InstanceVariableCompiler.putField.

Store instance variable into self.

Stack required: none Stack result: empty

Parameters
target:Runnable

runnable to push target object, may be called twice

value:Runnable

runnable to push value to assign, will only be called once

name:String

name of variable to store