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

public Class IRBytecodeAdapter

extends Object
Class Inheritance
Imports
com.headius.invokebinder.Signature, org.jruby.RubyModule, org.jruby.compiler.impl.SkinnyMethodAdapter, org.jruby.ir.instructions.ClosureAcceptingInstr, org.jruby.ir.operands.NullBlock, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.targets.indy.IndyArgumentsCompiler, .IndyBlockCompiler, .IndyBranchCompiler, .IndyCheckpointCompiler, .IndyConstantCompiler, .IndyDynamicValueCompiler, .IndyGlobalVariableCompiler, .IndyInstanceVariableCompiler, .IndyInvocationCompiler, .IndyLocalVariableCompiler, .IndyValueCompiler, .IndyYieldCompiler, org.jruby.ir.targets.simple.NormalArgumentsCompiler, .NormalBlockCompiler, .NormalBranchCompiler, .NormalCheckpointCompiler, .NormalConstantCompiler, .NormalDynamicValueCompiler, .NormalGlobalVariableCompiler, .NormalInstanceVariableCompiler, .NormalInvocationCompiler, .NormalLocalVariableCompiler, .NormalValueCompiler, .NormalYieldCompiler, org.jruby.parser.StaticScope, org.jruby.runtime.Block, .Helpers, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.JavaNameMangler, org.jruby.util.cli.Options, org.jruby.util.collections.IntHashMap, org.objectweb.asm.Handle, .Label, .Opcodes, .Type, org.objectweb.asm.commons.Method, java.lang.invoke.MethodType, java.util.HashMap, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
public SkinnyMethodAdapter
protected final ArgumentsCompiler
protected final BlockCompiler
protected final BranchCompiler
protected final CheckpointCompiler
protected final ClassData
protected final ConstantCompiler
protected final DynamicValueCompiler
protected final GlobalVariableCompiler
protected final InstanceVariableCompiler
protected final InvocationCompiler
public int
private int
protected final LocalVariableCompiler
public static final int
protected final Signature
protected final ValueCompiler
private int
private final IntHashMap<String>
private final IntHashMap<Type>
private Map<Integer, Label>
protected final YieldCompiler

Constructor Summary

AccessConstructor and Description
public
IRBytecodeAdapter(BytecodeMode bytecodeMode, SkinnyMethodAdapter adapter, Signature signature, ClassData classData)

Method Summary

Modifier and TypeMethod and Description
public static void
buildArrayFromLocals(SkinnyMethodAdapter adapter2, int base, int arity)

public void
public ArgumentsCompiler

Returns:

the arguments compiler
getArgumentsCompiler
()

The compiler for argument processing or preparation.

public BlockCompiler

Returns:

the block compiler
getBlockCompiler
()

Block construction compiler.

public BranchCompiler

Returns:

the branch compiler
getBranchCompiler
()

Get the compiler for dynamic branches.

public CheckpointCompiler

Returns:

the checkpoint compiler
getCheckpointCompiler
()

Checkpoint compiler.

public ClassData
public ConstantCompiler

Returns:

the constant compiler
getConstantCompiler
()

Get the compiler for Ruby constant lookups.

public DynamicValueCompiler

Returns:

the dynamic value compiler
getDynamicValueCompiler
()

Get the compiler for dynamic values.

public GlobalVariableCompiler

Returns:

the global variable compiler
getGlobalVariableCompiler
()

Global variable compiler.

public InstanceVariableCompiler

Returns:

the instance variable compiler
getInstanceVariableCompiler
()

Instance variable compiler.

public InvocationCompiler

Returns:

the invocation compiler
getInvocationCompiler
()

Get the compiler for invocations.

public int
public LocalVariableCompiler

Returns:

the instance variable compiler
getLocalVariableCompiler
()

Instance variable compiler.

public void
public String
public ValueCompiler

Returns:

the value compiler
getValueCompiler
()

Get the compiler for constant Ruby values.

public YieldCompiler

Returns:

the yield compiler
getYieldCompiler
()

Block yielding compiler.

public void
goTo(Label label)

public void
public void
invokeHelper(String name, Class<T>... x)

public void
public void
invokeStatic(Type type, Method method)

public void
invokeVirtual(Type type, Method method)

public void
public void
public void
public void
public void
public void
public void
loadLocal(int i)

public void
public void
public void
public void
mark(Label label)

public Label
public int
newLocal(String name, Type type)

public void
outline(String name, MethodType type, Runnable body)

public void
public void
public void
public void
public void
storeLocal(int i)

public void
public void
updateLineNumber(int lineNumber)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

adapterback to summary
public SkinnyMethodAdapter adapter
argumentsCompilerback to summary
protected final ArgumentsCompiler argumentsCompiler
blockCompilerback to summary
protected final BlockCompiler blockCompiler
branchCompilerback to summary
protected final BranchCompiler branchCompiler
checkpointCompilerback to summary
protected final CheckpointCompiler checkpointCompiler
classDataback to summary
protected final ClassData classData
constantCompilerback to summary
protected final ConstantCompiler constantCompiler
dynamicValueCompilerback to summary
protected final DynamicValueCompiler dynamicValueCompiler
globalVariableCompilerback to summary
protected final GlobalVariableCompiler globalVariableCompiler
instanceVariableCompilerback to summary
protected final InstanceVariableCompiler instanceVariableCompiler
invocationCompilerback to summary
protected final InvocationCompiler invocationCompiler
ipcback to summary
public int ipc
lastLineback to summary
private int lastLine
localVariableCompilerback to summary
protected final LocalVariableCompiler localVariableCompiler
MAX_ARGUMENTSback to summary
public static final int MAX_ARGUMENTS
signatureback to summary
protected final Signature signature
valueCompilerback to summary
protected final ValueCompiler valueCompiler
variableCountback to summary
private int variableCount
variableNamesback to summary
private final IntHashMap<String> variableNames
variableTypesback to summary
private final IntHashMap<Type> variableTypes
varStartsback to summary
private Map<Integer, Label> varStarts
yieldCompilerback to summary
protected final YieldCompiler yieldCompiler

Constructor Detail

IRBytecodeAdapterback to summary
public IRBytecodeAdapter(BytecodeMode bytecodeMode, SkinnyMethodAdapter adapter, Signature signature, ClassData classData)

Method Detail

buildArrayFromLocalsback to summary
public static void buildArrayFromLocals(SkinnyMethodAdapter adapter2, int base, int arity)
endMethodback to summary
public void endMethod()
getArgumentsCompilerback to summary
public ArgumentsCompiler getArgumentsCompiler()

The compiler for argument processing or preparation.

Returns:ArgumentsCompiler

the arguments compiler

getBlockCompilerback to summary
public BlockCompiler getBlockCompiler()

Block construction compiler.

Returns:BlockCompiler

the block compiler

getBranchCompilerback to summary
public BranchCompiler getBranchCompiler()

Get the compiler for dynamic branches.

Returns:BranchCompiler

the branch compiler

getCheckpointCompilerback to summary
public CheckpointCompiler getCheckpointCompiler()

Checkpoint compiler.

Returns:CheckpointCompiler

the checkpoint compiler

getClassDataback to summary
public ClassData getClassData()
getConstantCompilerback to summary
public ConstantCompiler getConstantCompiler()

Get the compiler for Ruby constant lookups.

Returns:ConstantCompiler

the constant compiler

getDynamicValueCompilerback to summary
public DynamicValueCompiler getDynamicValueCompiler()

Get the compiler for dynamic values.

Returns:DynamicValueCompiler

the dynamic value compiler

getGlobalVariableCompilerback to summary
public GlobalVariableCompiler getGlobalVariableCompiler()

Global variable compiler.

Returns:GlobalVariableCompiler

the global variable compiler

getInstanceVariableCompilerback to summary
public InstanceVariableCompiler getInstanceVariableCompiler()

Instance variable compiler.

Returns:InstanceVariableCompiler

the instance variable compiler

getInvocationCompilerback to summary
public InvocationCompiler getInvocationCompiler()

Get the compiler for invocations.

Returns:InvocationCompiler

the invocation compiler

getLastLineback to summary
public int getLastLine()
getLocalVariableCompilerback to summary
public LocalVariableCompiler getLocalVariableCompiler()

Instance variable compiler.

Returns:LocalVariableCompiler

the instance variable compiler

getStaticScopeback to summary
public void getStaticScope(String field)
getUniqueSiteNameback to summary
public String getUniqueSiteName(String name)
getValueCompilerback to summary
public ValueCompiler getValueCompiler()

Get the compiler for constant Ruby values.

Returns:ValueCompiler

the value compiler

getYieldCompilerback to summary
public YieldCompiler getYieldCompiler()

Block yielding compiler.

Returns:YieldCompiler

the yield compiler

goToback to summary
public void goTo(Label label)
invokeHelperback to summary
public void invokeHelper(String name, String sig)
invokeHelperback to summary
public void invokeHelper(String name, Class<T>... x)
invokeIRHelperback to summary
public void invokeIRHelper(String name, String sig)
invokeStaticback to summary
public void invokeStatic(Type type, Method method)
invokeVirtualback to summary
public void invokeVirtual(Type type, Method method)
loadArgsback to summary
public void loadArgs()
loadBlockback to summary
public void loadBlock()
loadContextback to summary
public void loadContext()
loadFrameBlockback to summary
public void loadFrameBlock()
loadFrameClassback to summary
public void loadFrameClass()
loadFrameNameback to summary
public void loadFrameName()
loadLocalback to summary
public void loadLocal(int i)
loadSelfback to summary
public void loadSelf()
loadSelfBlockback to summary
public void loadSelfBlock()
loadStaticScopeback to summary
public void loadStaticScope()
markback to summary
public void mark(Label label)
newLabelback to summary
public Label newLabel()
newLocalback to summary
public int newLocal(String name, Type type)
outlineback to summary
public void outline(String name, MethodType type, Runnable body)
pushHandleback to summary
public void pushHandle(Handle handle)
returnValueback to summary
public void returnValue()
startMethodback to summary
public void startMethod()
storeArgsback to summary
public void storeArgs()
storeLocalback to summary
public void storeLocal(int i)
storeSelfback to summary
public void storeSelf()
updateLineNumberback to summary
public void updateLineNumber(int lineNumber)
org.jruby.ir.targets back to summary

public final Enum IRBytecodeAdapter.BlockPassType

extends Enum<IRBytecodeAdapter.BlockPassType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final IRBytecodeAdapter.BlockPassType
private final boolean
public static final IRBytecodeAdapter.BlockPassType
private final boolean
public static final IRBytecodeAdapter.BlockPassType

Constructor Summary

AccessConstructor and Description
private
BlockPassType(boolean given, boolean literal)

Method Summary

Modifier and TypeMethod and Description
public static IRBytecodeAdapter.BlockPassType
public boolean
public boolean
public static IRBytecodeAdapter.BlockPassType
public static IRBytecodeAdapter.BlockPassType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

GIVENback to summary
public static final IRBytecodeAdapter.BlockPassType GIVEN
givenback to summary
private final boolean given
LITERALback to summary
public static final IRBytecodeAdapter.BlockPassType LITERAL
literalback to summary
private final boolean literal
NONEback to summary
public static final IRBytecodeAdapter.BlockPassType NONE

Constructor Detail

BlockPassTypeback to summary
private BlockPassType(boolean given, boolean literal)

Method Detail

fromIRback to summary
public static IRBytecodeAdapter.BlockPassType fromIR(ClosureAcceptingInstr callInstr)
givenback to summary
public boolean given()
literalback to summary
public boolean literal()
valueOfback to summary
public static IRBytecodeAdapter.BlockPassType valueOf(String name)
valuesback to summary
public static IRBytecodeAdapter.BlockPassType[] values()