Top Inners Methods
org.jruby.ir.targets

public Interface ValueCompiler

Known Direct Implementers
org.jruby.ir.targets.indy.IndyValueCompiler, org.jruby.ir.targets.simple.NormalValueCompiler
Imports
org.jcodings.Encoding, org.jruby.ir.instructions.CallBase, org.jruby.util.ByteList, java.math.BigInteger, java.util.List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static record
public static enum

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)

public void
pushArrayClass()

Push the Array class on the stack.

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

Build and save a literal ..fixnum range.

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

Load a Bignum onto the stack.

public void
pushBoolean(boolean
the boolean to push
b
)

Load a boolean onto the stack.

public void
pushBufferString(Encoding encoding, int size)

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

public void
pushByteList(ByteList
ByteList to push
bl
)

Stack required: none

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

Load a CallSite onto the stack

public void
pushChilledString(ByteList byteList, int codeRange, String file, int line)

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

Load a ConstantLookupSite onto the stack

public void
pushEmptyString(Encoding encoding)

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

public void
pushEncoding(Encoding
the encoding to push
encoding
)

Push an encoding on the stack.

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

Build and save a literal fixnum..

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

Stack required: none

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

Stack required: none

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

Stack required: none

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

Stack required: none

public void
pushHashClass()

Push the Hash class on the stack.

public void
pushNil()

Load nil onto the stack.

public void
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
)

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
)

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
)

Build and save a literal string..string range.

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

Build and save a literal regular expression.

public void
pushRubyEncoding(Encoding
the encoding to push
encoding
)

Push a RubyEncoding on the stack.

public void
pushRuntime()

Push the JRuby runtime on the stack.

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

Stack required: none

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

Push a symbol on the stack.

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

Push a Symbol.to_proc on the stack.

public void
pushUndefined()

Push the UNDEFINED constant on the stack.

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)
pushArrayClassback to summary
public void pushArrayClass()

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

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

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)

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)

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)

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

pushByteListback to summary
public void pushByteList(ByteList bl)

Stack required: none

Parameters
bl:ByteList

ByteList to push

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

Load a CallSite onto the stack

pushChilledStringback to summary
public void pushChilledString(ByteList byteList, int codeRange, String file, int line)
pushConstantLookupSiteback to summary
public void pushConstantLookupSite(String className, String siteName, ByteList name)

Load a ConstantLookupSite onto the stack

pushEmptyStringback to summary
public void pushEmptyString(Encoding encoding)

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

pushEncodingback to summary
public void pushEncoding(Encoding encoding)

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)

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(long l)

Stack required: none

Parameters
l:long

long value to push as a Fixnum

pushFixnumArrayback to summary
public void pushFixnumArray(List<Long> values)
pushFloatback to summary
public void pushFloat(double d)

Stack required: none

Parameters
d:double

double value to push as a Float

pushFloatArrayback to summary
public void pushFloatArray(List<Double> values)
pushFrozenStringback to summary
public void pushFrozenString(ByteList bl, int cr, String path, int line)

Stack required: none

Parameters
bl:ByteList

ByteList for the String to push

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

Stack required: none

Parameters
bl:ByteList

ByteList for the String to push

pushHashClassback to summary
public void pushHashClass()

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

pushNilback to summary
public void pushNil()

Load nil onto the stack. Stack required: none

pushObjectClassback to summary
public void pushObjectClass()

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

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

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)

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)

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(ByteList source, int options)

Build and save a literal regular expression.

Stack required: none

Parameters
options:int

options for the regexp

pushRubyEncodingback to summary
public void pushRubyEncoding(Encoding encoding)

Push a RubyEncoding on the stack. Stack required: none

Parameters
encoding:Encoding

the encoding to push

pushRuntimeback to summary
public void pushRuntime()

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

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

Stack required: none

Parameters
bl:ByteList

ByteList for the String to push

pushSymbolback to summary
public void pushSymbol(ByteList bytes)

Push a symbol on the stack. Stack required: none

Parameters
bytes:ByteList

the ByteList for the symbol

pushSymbolClassback to summary
public void pushSymbolClass()
pushSymbolProcback to summary
public void pushSymbolProc(ByteList bytes)

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()

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

org.jruby.ir.targets back to summary

public final Record ValueCompiler.DStringElement<T>

extends Record
Class Inheritance
Record Components
type:ValueCompiler.DStringElementType 
value:T 

Field Summary

Modifier and TypeField and Description
private final ValueCompiler.DStringElementType
type

Record Component accessed by type().

private final T
value

Record Component accessed by value().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

public ValueCompiler.DStringElementType
type()

Record Component getter of type.

public T
value()

Record Component getter of value.

Field Detail

typeback to summary
private final ValueCompiler.DStringElementType type

Record Component accessed by type().

valueback to summary
private final T value

Record Component accessed by value().

Constructor Detail

DStringElementback to summary
public DStringElement(ValueCompiler.DStringElementType type, T value)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

Returns:int

a hash code value for this record.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Returns:String

a string representation of the object.

typeback to summary
public ValueCompiler.DStringElementType type()

Record Component getter of type.

valueback to summary
public T value()

Record Component getter of value.

org.jruby.ir.targets back to summary

public final Enum ValueCompiler.DStringElementType

extends Enum<ValueCompiler.DStringElementType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ValueCompiler.DStringElementType
public static final ValueCompiler.DStringElementType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ValueCompiler.DStringElementType
public static ValueCompiler.DStringElementType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

OTHERback to summary
public static final ValueCompiler.DStringElementType OTHER
STRINGback to summary
public static final ValueCompiler.DStringElementType STRING

Constructor Detail

DStringElementTypeback to summary
private DStringElementType()

Method Detail

valueOfback to summary
public static ValueCompiler.DStringElementType valueOf(String name)
valuesback to summary
public static ValueCompiler.DStringElementType[] values()