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

public Class NormalValueCompiler

extends Object
implements ValueCompiler
Class Inheritance
All Implemented Interfaces
org.jruby.ir.targets.ValueCompiler
Imports
org.jcodings.Encoding, org.jruby.Ruby, .RubyBignum, .RubyBoolean, .RubyClass, .RubyEncoding, .RubyFixnum, .RubyFloat, .RubyProc, .RubyRange, .RubyRegexp, .RubyString, .RubySymbol, org.jruby.compiler.impl.SkinnyMethodAdapter, org.jruby.ir.IRManager, .IRScope, org.jruby.ir.instructions.CallBase, org.jruby.ir.operands.Operand, .StringLiteral, .UndefinedValue, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.targets.IRBytecodeAdapter, .ValueCompiler, org.jruby.parser.StaticScope, org.jruby.runtime.CallType, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CachingCallSite, .FunctionalCachingCallSite, .MonomorphicCallSite, .ProfilingCachingCallSite, .RefinedCachingCallSite, .VariableCachingCallSite, org.jruby.util.ByteList, org.objectweb.asm.Label, .Opcodes, .Type, java.lang.invoke.MethodType, java.math.BigInteger, java.util.ArrayList, .HashMap, .List, .Map

Field Summary

Modifier and TypeField and Description
private final Map<Object, String>
private final IRBytecodeAdapter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
buildDynamicString(Encoding encoding, int size, boolean frozen, boolean chilled, boolean debugFrozen, String file, int line, List<ValueCompiler.DStringElement<T>> elements)

Implements org.jruby.ir.targets.ValueCompiler.buildDynamicString.

public String
cacheValuePermanently(String what, Class<T> type, Object key, boolean sync, Runnable construction)

public String
cacheValuePermanently(String what, Class<T> type, Object key, boolean sync, MethodType signature, Runnable loadState, Runnable construction)

public String
cacheValuePermanentlyLoadContext(String what, Class<T> type, Object key, Runnable construction)

private static String
keyFor(Object obj1, Object obj2)

private static String
keyFor(Object obj1, Object obj2, Object obj3)

private static void
keyFor(StringBuilder builder, Object obj)

private String
newFieldName(String baseName)

public void
pushArrayClass()

Implements org.jruby.ir.targets.ValueCompiler.pushArrayClass.

Push the Array class on the stack.

public void
pushBeginlessRange(long
begin value
begin
,
boolean
whether this is an exclusive range
exclusive
)

Implements org.jruby.ir.targets.ValueCompiler.pushBeginlessRange.

Build and save a literal ..fixnum range.

public void
pushBignum(BigInteger
the value of the Bignum to push
bigint
)

Implements org.jruby.ir.targets.ValueCompiler.pushBignum.

Load a Bignum onto the stack.

public void
pushBoolean(boolean
the boolean to push
b
)

Implements org.jruby.ir.targets.ValueCompiler.pushBoolean.

Load a boolean onto the stack.

public void
pushBufferString(Encoding encoding, int size)

Implements org.jruby.ir.targets.ValueCompiler.pushBufferString.

Push a new empty string on the stack preallocated to the given size Stack required: none

public void
pushByteList(final ByteList
ByteList to push
bl
)

Implements org.jruby.ir.targets.ValueCompiler.pushByteList.

Stack required: none

public void
pushCallSite(String className, String siteName, String scopeFieldName, CallBase call)

Implements org.jruby.ir.targets.ValueCompiler.pushCallSite.

Load a CallSite onto the stack

public void
public void
pushConstantLookupSite(String className, String siteName, ByteList name)

Implements org.jruby.ir.targets.ValueCompiler.pushConstantLookupSite.

Load a ConstantLookupSite onto the stack

public void
pushEmptyString(Encoding encoding)

Implements org.jruby.ir.targets.ValueCompiler.pushEmptyString.

Push a new empty string on the stack Stack required: none

public void
pushEncoding(final Encoding
the encoding to push
encoding
)

Implements org.jruby.ir.targets.ValueCompiler.pushEncoding.

Push an encoding on the stack.

public void
pushEndlessRange(long
end value
end
,
boolean
whether this is an exclusive range
exclusive
)

Implements org.jruby.ir.targets.ValueCompiler.pushEndlessRange.

Build and save a literal fixnum..

public void
pushFixnum(final long
long value to push as a Fixnum
l
)

Implements org.jruby.ir.targets.ValueCompiler.pushFixnum.

Stack required: none

public void
public void
pushFloat(final double
double value to push as a Float
d
)

Implements org.jruby.ir.targets.ValueCompiler.pushFloat.

Stack required: none

public void
public void
pushFrozenString(final ByteList
ByteList for the String to push
bl
,
final int cr, final String file, final int line)

Implements org.jruby.ir.targets.ValueCompiler.pushFrozenString.

Stack required: none

public void
pushFrozenString(final ByteList
ByteList for the String to push
bl
,
final int cr)

Implements org.jruby.ir.targets.ValueCompiler.pushFrozenString.

Stack required: none

private void
pushFrozenStringUncached(ByteList bl, int cr, String file, int line)

private void
public void
pushHashClass()

Implements org.jruby.ir.targets.ValueCompiler.pushHashClass.

Push the Hash class on the stack.

public void
pushNil()

Implements org.jruby.ir.targets.ValueCompiler.pushNil.

Load nil onto the stack.

public void
pushObjectClass()

Implements org.jruby.ir.targets.ValueCompiler.pushObjectClass.

Push the Object class on the stack.

public void
pushRange(Runnable
a runnable that will emit code for the begin value
begin
,
Runnable
a runnable that will emit code for the end value
end
,
boolean
whether this is an exclusive range
exclusive
)

Implements org.jruby.ir.targets.ValueCompiler.pushRange.

Build and save a literal range.

public void
pushRange(long
begin value
begin
,
long
end value
end
,
boolean
whether this is an exclusive range
exclusive
)

Implements org.jruby.ir.targets.ValueCompiler.pushRange.

Build and save a literal fixnum..fixnum range.

public void
pushRange(ByteList
begin value
begin
,
int beginCR, ByteList
end value
end
,
int endCR, boolean
whether this is an exclusive range
exclusive
)

Implements org.jruby.ir.targets.ValueCompiler.pushRange.

Build and save a literal string..string range.

public void
pushRegexp(final ByteList source, final int
options for the regexp
options
)

Implements org.jruby.ir.targets.ValueCompiler.pushRegexp.

Build and save a literal regular expression.

public void
pushRubyEncoding(final Encoding
the encoding to push
encoding
)

Implements org.jruby.ir.targets.ValueCompiler.pushRubyEncoding.

Push a RubyEncoding on the stack.

public void
pushRuntime()

Implements org.jruby.ir.targets.ValueCompiler.pushRuntime.

Push the JRuby runtime on the stack.

public void
pushString(ByteList
ByteList for the String to push
bl
,
int cr)

Implements org.jruby.ir.targets.ValueCompiler.pushString.

Stack required: none

public void
pushSymbol(final ByteList
the ByteList for the symbol
bytes
)

Implements org.jruby.ir.targets.ValueCompiler.pushSymbol.

Push a symbol on the stack.

public void
public void
pushSymbolProc(ByteList
the ByteList for the symbol
bytes
)

Implements org.jruby.ir.targets.ValueCompiler.pushSymbolProc.

Push a Symbol.to_proc on the stack.

public void
pushUndefined()

Implements org.jruby.ir.targets.ValueCompiler.pushUndefined.

Push the UNDEFINED constant on the stack.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheFieldNamesback to summary
private final Map<Object, String> cacheFieldNames
compilerback to summary
private final IRBytecodeAdapter compiler

Constructor Detail

NormalValueCompilerback to summary
public NormalValueCompiler(IRBytecodeAdapter compiler)

Method Detail

buildDynamicStringback to summary
public void buildDynamicString(Encoding encoding, int size, boolean frozen, boolean chilled, boolean debugFrozen, String file, int line, List<ValueCompiler.DStringElement<T>> elements)

Implements org.jruby.ir.targets.ValueCompiler.buildDynamicString.

cacheValuePermanentlyback to summary
public String cacheValuePermanently(String what, Class<T> type, Object key, boolean sync, Runnable construction)
cacheValuePermanentlyback to summary
public String cacheValuePermanently(String what, Class<T> type, Object key, boolean sync, MethodType signature, Runnable loadState, Runnable construction)
cacheValuePermanentlyLoadContextback to summary
public String cacheValuePermanentlyLoadContext(String what, Class<T> type, Object key, Runnable construction)
keyForback to summary
private static String keyFor(Object obj1, Object obj2)
keyForback to summary
private static String keyFor(Object obj1, Object obj2, Object obj3)
keyForback to summary
private static void keyFor(StringBuilder builder, Object obj)
newFieldNameback to summary
private String newFieldName(String baseName)
pushArrayClassback to summary
public void pushArrayClass()

Implements org.jruby.ir.targets.ValueCompiler.pushArrayClass.

Doc from org.jruby.ir.targets.ValueCompiler.pushArrayClass.

Push the Array class on the stack. Stack required: none

pushBeginlessRangeback to summary
public void pushBeginlessRange(long begin, boolean exclusive)

Implements org.jruby.ir.targets.ValueCompiler.pushBeginlessRange.

Doc from org.jruby.ir.targets.ValueCompiler.pushBeginlessRange.

Build and save a literal ..fixnum range.

Stack required: context

Parameters
begin:long

begin value

exclusive:boolean

whether this is an exclusive range

pushBignumback to summary
public void pushBignum(BigInteger bigint)

Implements org.jruby.ir.targets.ValueCompiler.pushBignum.

Doc from org.jruby.ir.targets.ValueCompiler.pushBignum.

Load a Bignum onto the stack. Stack required: none

Parameters
bigint:BigInteger

the value of the Bignum to push

pushBooleanback to summary
public void pushBoolean(boolean b)

Implements org.jruby.ir.targets.ValueCompiler.pushBoolean.

Doc from org.jruby.ir.targets.ValueCompiler.pushBoolean.

Load a boolean onto the stack. Stack required: none

Parameters
b:boolean

the boolean to push

pushBufferStringback to summary
public void pushBufferString(Encoding encoding, int size)

Implements org.jruby.ir.targets.ValueCompiler.pushBufferString.

Doc from org.jruby.ir.targets.ValueCompiler.pushBufferString.

Push a new empty string on the stack preallocated to the given size Stack required: none

pushByteListback to summary
public void pushByteList(final ByteList bl)

Implements org.jruby.ir.targets.ValueCompiler.pushByteList.

Doc from org.jruby.ir.targets.ValueCompiler.pushByteList.

Stack required: none

Parameters
bl:ByteList

ByteList to push

pushCallSiteback to summary
public void pushCallSite(String className, String siteName, String scopeFieldName, CallBase call)

Implements org.jruby.ir.targets.ValueCompiler.pushCallSite.

Doc from org.jruby.ir.targets.ValueCompiler.pushCallSite.

Load a CallSite onto the stack

Annotations
@Override
pushChilledStringback to summary
public void pushChilledString(ByteList bl, int cr, String file, int line)

Implements org.jruby.ir.targets.ValueCompiler.pushChilledString.

pushConstantLookupSiteback to summary
public void pushConstantLookupSite(String className, String siteName, ByteList name)

Implements org.jruby.ir.targets.ValueCompiler.pushConstantLookupSite.

Doc from org.jruby.ir.targets.ValueCompiler.pushConstantLookupSite.

Load a ConstantLookupSite onto the stack

Annotations
@Override
pushEmptyStringback to summary
public void pushEmptyString(Encoding encoding)

Implements org.jruby.ir.targets.ValueCompiler.pushEmptyString.

Doc from org.jruby.ir.targets.ValueCompiler.pushEmptyString.

Push a new empty string on the stack Stack required: none

pushEncodingback to summary
public void pushEncoding(final Encoding encoding)

Implements org.jruby.ir.targets.ValueCompiler.pushEncoding.

Doc from org.jruby.ir.targets.ValueCompiler.pushEncoding.

Push an encoding on the stack. Stack required: none

Parameters
encoding:Encoding

the encoding to push

pushEndlessRangeback to summary
public void pushEndlessRange(long end, boolean exclusive)

Implements org.jruby.ir.targets.ValueCompiler.pushEndlessRange.

Doc from org.jruby.ir.targets.ValueCompiler.pushEndlessRange.

Build and save a literal fixnum.. range.

Stack required: context

Parameters
end:long

end value

exclusive:boolean

whether this is an exclusive range

pushFixnumback to summary
public void pushFixnum(final long l)

Implements org.jruby.ir.targets.ValueCompiler.pushFixnum.

Doc from org.jruby.ir.targets.ValueCompiler.pushFixnum.

Stack required: none

Parameters
l:long

long value to push as a Fixnum

pushFixnumArrayback to summary
public void pushFixnumArray(List<Long> values)

Implements org.jruby.ir.targets.ValueCompiler.pushFixnumArray.

pushFloatback to summary
public void pushFloat(final double d)

Implements org.jruby.ir.targets.ValueCompiler.pushFloat.

Doc from org.jruby.ir.targets.ValueCompiler.pushFloat.

Stack required: none

Parameters
d:double

double value to push as a Float

pushFloatArrayback to summary
public void pushFloatArray(List<Double> values)

Implements org.jruby.ir.targets.ValueCompiler.pushFloatArray.

pushFrozenStringback to summary
public void pushFrozenString(final ByteList bl, final int cr, final String file, final int line)

Implements org.jruby.ir.targets.ValueCompiler.pushFrozenString.

Doc from org.jruby.ir.targets.ValueCompiler.pushFrozenString.

Stack required: none

Parameters
bl:ByteList

ByteList for the String to push

pushFrozenStringback to summary
public void pushFrozenString(final ByteList bl, final int cr)

Implements org.jruby.ir.targets.ValueCompiler.pushFrozenString.

Doc from org.jruby.ir.targets.ValueCompiler.pushFrozenString.

Stack required: none

Parameters
bl:ByteList

ByteList for the String to push

pushFrozenStringUncachedback to summary
private void pushFrozenStringUncached(ByteList bl, int cr, String file, int line)
pushFrozenStringUncachedback to summary
private void pushFrozenStringUncached(ByteList bl, int cr)
pushHashClassback to summary
public void pushHashClass()

Implements org.jruby.ir.targets.ValueCompiler.pushHashClass.

Doc from org.jruby.ir.targets.ValueCompiler.pushHashClass.

Push the Hash class on the stack. Stack required: none

pushNilback to summary
public void pushNil()

Implements org.jruby.ir.targets.ValueCompiler.pushNil.

Doc from org.jruby.ir.targets.ValueCompiler.pushNil.

Load nil onto the stack. Stack required: none

pushObjectClassback to summary
public void pushObjectClass()

Implements org.jruby.ir.targets.ValueCompiler.pushObjectClass.

Doc from org.jruby.ir.targets.ValueCompiler.pushObjectClass.

Push the Object class on the stack. Stack required: none

pushRangeback to summary
public void pushRange(Runnable begin, Runnable end, boolean exclusive)

Implements org.jruby.ir.targets.ValueCompiler.pushRange.

Doc from org.jruby.ir.targets.ValueCompiler.pushRange.

Build and save a literal range.

Stack required: context

Parameters
begin:Runnable

a runnable that will emit code for the begin value

end:Runnable

a runnable that will emit code for the end value

exclusive:boolean

whether this is an exclusive range

pushRangeback to summary
public void pushRange(long begin, long end, boolean exclusive)

Implements org.jruby.ir.targets.ValueCompiler.pushRange.

Doc from org.jruby.ir.targets.ValueCompiler.pushRange.

Build and save a literal fixnum..fixnum range.

Stack required: context

Parameters
begin:long

begin value

end:long

end value

exclusive:boolean

whether this is an exclusive range

pushRangeback to summary
public void pushRange(ByteList begin, int beginCR, ByteList end, int endCR, boolean exclusive)

Implements org.jruby.ir.targets.ValueCompiler.pushRange.

Doc from org.jruby.ir.targets.ValueCompiler.pushRange.

Build and save a literal string..string range.

Stack required: context

Parameters
begin:ByteList

begin value

end:ByteList

end value

exclusive:boolean

whether this is an exclusive range

pushRegexpback to summary
public void pushRegexp(final ByteList source, final int options)

Implements org.jruby.ir.targets.ValueCompiler.pushRegexp.

Doc from org.jruby.ir.targets.ValueCompiler.pushRegexp.

Build and save a literal regular expression.

Stack required: none

Parameters
options:int

options for the regexp

pushRubyEncodingback to summary
public void pushRubyEncoding(final Encoding encoding)

Implements org.jruby.ir.targets.ValueCompiler.pushRubyEncoding.

Doc from org.jruby.ir.targets.ValueCompiler.pushRubyEncoding.

Push a RubyEncoding on the stack. Stack required: none

Parameters
encoding:Encoding

the encoding to push

pushRuntimeback to summary
public void pushRuntime()

Implements org.jruby.ir.targets.ValueCompiler.pushRuntime.

Doc from org.jruby.ir.targets.ValueCompiler.pushRuntime.

Push the JRuby runtime on the stack. Stack required: none

pushStringback to summary
public void pushString(ByteList bl, int cr)

Implements org.jruby.ir.targets.ValueCompiler.pushString.

Doc from org.jruby.ir.targets.ValueCompiler.pushString.

Stack required: none

Parameters
bl:ByteList

ByteList for the String to push

pushSymbolback to summary
public void pushSymbol(final ByteList bytes)

Implements org.jruby.ir.targets.ValueCompiler.pushSymbol.

Doc from org.jruby.ir.targets.ValueCompiler.pushSymbol.

Push a symbol on the stack. Stack required: none

Parameters
bytes:ByteList

the ByteList for the symbol

pushSymbolClassback to summary
public void pushSymbolClass()

Implements org.jruby.ir.targets.ValueCompiler.pushSymbolClass.

pushSymbolProcback to summary
public void pushSymbolProc(ByteList bytes)

Implements org.jruby.ir.targets.ValueCompiler.pushSymbolProc.

Doc from org.jruby.ir.targets.ValueCompiler.pushSymbolProc.

Push a Symbol.to_proc on the stack. Stack required: none

Parameters
bytes:ByteList

the ByteList for the symbol

pushUndefinedback to summary
public void pushUndefined()

Implements org.jruby.ir.targets.ValueCompiler.pushUndefined.

Doc from org.jruby.ir.targets.ValueCompiler.pushUndefined.

Push the UNDEFINED constant on the stack. Stack required: none