Package org.jruby.ir.targets.simple
Class NormalValueCompiler
java.lang.Object
org.jruby.ir.targets.simple.NormalValueCompiler
- All Implemented Interfaces:
ValueCompiler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jruby.ir.targets.ValueCompiler
ValueCompiler.DStringElement<T>, ValueCompiler.DStringElementType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildDynamicString
(org.jcodings.Encoding encoding, int size, boolean frozen, boolean chilled, boolean debugFrozen, String file, int line, List<ValueCompiler.DStringElement> elements) cacheValuePermanently
(String what, Class type, Object key, boolean sync, MethodType signature, Runnable loadState, Runnable construction) cacheValuePermanently
(String what, Class type, Object key, boolean sync, Runnable construction) cacheValuePermanentlyLoadContext
(String what, Class type, Object key, Runnable construction) void
Push the Array class on the stack.void
pushBeginlessRange
(long begin, boolean exclusive) Build and save a literal ..fixnum range.void
pushBignum
(BigInteger bigint) Load a Bignum onto the stack.void
pushBoolean
(boolean b) Load a boolean onto the stack.void
pushBufferString
(org.jcodings.Encoding encoding, int size) Push a new empty string on the stack preallocated to the given size Stack required: nonevoid
pushByteList
(ByteList bl) Stack required: nonevoid
pushCallSite
(String className, String siteName, String scopeFieldName, CallBase call) Load a CallSite onto the stackvoid
pushChilledString
(ByteList bl, int cr, String file, int line) void
pushConstantLookupSite
(String className, String siteName, ByteList name) Load a ConstantLookupSite onto the stackvoid
pushEmptyString
(org.jcodings.Encoding encoding) Push a new empty string on the stack Stack required: nonevoid
pushEncoding
(org.jcodings.Encoding encoding) Push an encoding on the stack.void
pushEndlessRange
(long end, boolean exclusive) Build and save a literal fixnum..void
pushFixnum
(long l) Stack required: nonevoid
pushFixnumArray
(List<Long> values) void
pushFloat
(double d) Stack required: nonevoid
pushFloatArray
(List<Double> values) void
pushFrozenString
(ByteList bl, int cr) Stack required: nonevoid
pushFrozenString
(ByteList bl, int cr, String file, int line) Stack required: nonevoid
Push the Hash class on the stack.void
pushNil()
Load nil onto the stack.void
Push the Object class on the stack.void
pushRange
(long begin, long end, boolean exclusive) Build and save a literal fixnum..fixnum range.void
Build and save a literal range.void
Build and save a literal string..string range.void
pushRegexp
(ByteList source, int options) Build and save a literal regular expression.void
pushRubyEncoding
(org.jcodings.Encoding encoding) Push a RubyEncoding on the stack.void
Push the JRuby runtime on the stack.void
pushString
(ByteList bl, int cr) Stack required: nonevoid
pushSymbol
(ByteList bytes) Push a symbol on the stack.void
void
pushSymbolProc
(ByteList bytes) Push a Symbol.to_proc on the stack.void
Push the UNDEFINED constant on the stack.
-
Constructor Details
-
NormalValueCompiler
-
-
Method Details
-
pushRuntime
public void pushRuntime()Description copied from interface:ValueCompiler
Push the JRuby runtime on the stack. Stack required: none- Specified by:
pushRuntime
in interfaceValueCompiler
-
pushArrayClass
public void pushArrayClass()Description copied from interface:ValueCompiler
Push the Array class on the stack. Stack required: none- Specified by:
pushArrayClass
in interfaceValueCompiler
-
pushHashClass
public void pushHashClass()Description copied from interface:ValueCompiler
Push the Hash class on the stack. Stack required: none- Specified by:
pushHashClass
in interfaceValueCompiler
-
pushObjectClass
public void pushObjectClass()Description copied from interface:ValueCompiler
Push the Object class on the stack. Stack required: none- Specified by:
pushObjectClass
in interfaceValueCompiler
-
pushSymbolClass
public void pushSymbolClass()- Specified by:
pushSymbolClass
in interfaceValueCompiler
-
pushUndefined
public void pushUndefined()Description copied from interface:ValueCompiler
Push the UNDEFINED constant on the stack. Stack required: none- Specified by:
pushUndefined
in interfaceValueCompiler
-
pushFixnum
public void pushFixnum(long l) Description copied from interface:ValueCompiler
Stack required: none- Specified by:
pushFixnum
in interfaceValueCompiler
- Parameters:
l
- long value to push as a Fixnum
-
pushFloat
public void pushFloat(double d) Description copied from interface:ValueCompiler
Stack required: none- Specified by:
pushFloat
in interfaceValueCompiler
- Parameters:
d
- double value to push as a Float
-
pushString
Description copied from interface:ValueCompiler
Stack required: none- Specified by:
pushString
in interfaceValueCompiler
- Parameters:
bl
- ByteList for the String to push
-
pushChilledString
- Specified by:
pushChilledString
in interfaceValueCompiler
-
pushFrozenString
Description copied from interface:ValueCompiler
Stack required: none- Specified by:
pushFrozenString
in interfaceValueCompiler
- Parameters:
bl
- ByteList for the String to push
-
pushFrozenString
Description copied from interface:ValueCompiler
Stack required: none- Specified by:
pushFrozenString
in interfaceValueCompiler
- Parameters:
bl
- ByteList for the String to push
-
pushEmptyString
public void pushEmptyString(org.jcodings.Encoding encoding) Description copied from interface:ValueCompiler
Push a new empty string on the stack Stack required: none- Specified by:
pushEmptyString
in interfaceValueCompiler
-
pushBufferString
public void pushBufferString(org.jcodings.Encoding encoding, int size) Description copied from interface:ValueCompiler
Push a new empty string on the stack preallocated to the given size Stack required: none- Specified by:
pushBufferString
in interfaceValueCompiler
-
buildDynamicString
public void buildDynamicString(org.jcodings.Encoding encoding, int size, boolean frozen, boolean chilled, boolean debugFrozen, String file, int line, List<ValueCompiler.DStringElement> elements) - Specified by:
buildDynamicString
in interfaceValueCompiler
-
pushByteList
Description copied from interface:ValueCompiler
Stack required: none- Specified by:
pushByteList
in interfaceValueCompiler
- Parameters:
bl
- ByteList to push
-
pushRange
Description copied from interface:ValueCompiler
Build and save a literal range.Stack required: context
- Specified by:
pushRange
in interfaceValueCompiler
- Parameters:
begin
- a runnable that will emit code for the begin valueend
- a runnable that will emit code for the end valueexclusive
- whether this is an exclusive range
-
pushRange
public void pushRange(long begin, long end, boolean exclusive) Description copied from interface:ValueCompiler
Build and save a literal fixnum..fixnum range.Stack required: context
- Specified by:
pushRange
in interfaceValueCompiler
- Parameters:
begin
- begin valueend
- end valueexclusive
- whether this is an exclusive range
-
pushEndlessRange
public void pushEndlessRange(long end, boolean exclusive) Description copied from interface:ValueCompiler
Build and save a literal fixnum.. range.Stack required: context
- Specified by:
pushEndlessRange
in interfaceValueCompiler
- Parameters:
end
- end valueexclusive
- whether this is an exclusive range
-
pushBeginlessRange
public void pushBeginlessRange(long begin, boolean exclusive) Description copied from interface:ValueCompiler
Build and save a literal ..fixnum range.Stack required: context
- Specified by:
pushBeginlessRange
in interfaceValueCompiler
- Parameters:
begin
- begin valueexclusive
- whether this is an exclusive range
-
pushRange
Description copied from interface:ValueCompiler
Build and save a literal string..string range.Stack required: context
- Specified by:
pushRange
in interfaceValueCompiler
- Parameters:
begin
- begin valueend
- end valueexclusive
- whether this is an exclusive range
-
pushRegexp
Description copied from interface:ValueCompiler
Build and save a literal regular expression.Stack required: none
- Specified by:
pushRegexp
in interfaceValueCompiler
- Parameters:
options
- options for the regexp
-
pushSymbol
Description copied from interface:ValueCompiler
Push a symbol on the stack. Stack required: none- Specified by:
pushSymbol
in interfaceValueCompiler
- Parameters:
bytes
- the ByteList for the symbol
-
pushSymbolProc
Description copied from interface:ValueCompiler
Push a Symbol.to_proc on the stack. Stack required: none- Specified by:
pushSymbolProc
in interfaceValueCompiler
- Parameters:
bytes
- the ByteList for the symbol
-
pushRubyEncoding
public void pushRubyEncoding(org.jcodings.Encoding encoding) Description copied from interface:ValueCompiler
Push a RubyEncoding on the stack. Stack required: none- Specified by:
pushRubyEncoding
in interfaceValueCompiler
- Parameters:
encoding
- the encoding to push
-
pushEncoding
public void pushEncoding(org.jcodings.Encoding encoding) Description copied from interface:ValueCompiler
Push an encoding on the stack. Stack required: none- Specified by:
pushEncoding
in interfaceValueCompiler
- Parameters:
encoding
- the encoding to push
-
pushNil
public void pushNil()Description copied from interface:ValueCompiler
Load nil onto the stack. Stack required: none- Specified by:
pushNil
in interfaceValueCompiler
-
pushBoolean
public void pushBoolean(boolean b) Description copied from interface:ValueCompiler
Load a boolean onto the stack. Stack required: none- Specified by:
pushBoolean
in interfaceValueCompiler
- Parameters:
b
- the boolean to push
-
pushBignum
Description copied from interface:ValueCompiler
Load a Bignum onto the stack. Stack required: none- Specified by:
pushBignum
in interfaceValueCompiler
- Parameters:
bigint
- the value of the Bignum to push
-
pushCallSite
Description copied from interface:ValueCompiler
Load a CallSite onto the stack- Specified by:
pushCallSite
in interfaceValueCompiler
-
pushConstantLookupSite
Description copied from interface:ValueCompiler
Load a ConstantLookupSite onto the stack- Specified by:
pushConstantLookupSite
in interfaceValueCompiler
-
cacheValuePermanentlyLoadContext
-
cacheValuePermanently
-
cacheValuePermanently
-
pushFixnumArray
- Specified by:
pushFixnumArray
in interfaceValueCompiler
-
pushFloatArray
- Specified by:
pushFloatArray
in interfaceValueCompiler
-