Package org.jruby.ir.persistence
Class IRReaderStream
java.lang.Object
org.jruby.ir.persistence.IRReaderStream
- All Implemented Interfaces:
IRPersistenceValues,IRReaderDecoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate RubySymbol[]private IRScopeprivate final ByteListFilename to use for the scriptprivate final IRManagerFields inherited from interface org.jruby.ir.persistence.IRPersistenceValues
ARRAY, DOUBLE, FALSE, FLOAT, FULL, INSTR, LONG, NULL, NULL_STRING, PRIMITIVE_BASE, PROLOGUE_LENGTH, STRING, TRUE, TWO_MEGS, USASCII, UTF8, VERSION -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIRReaderStream(ByteBuffer buf, IRManager manager, List<IRScope> scopes, IRScope currentScope, ByteList filename, RubySymbol[] constantPool) IRReaderStream(IRManager manager, byte[] bytes, ByteList filename) IRReaderStream(IRManager manager, File file, ByteList filename) -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(OperandType type) booleanbytebyte[]charprivate voiddecodeConstantPool(int offset) doubleorg.jcodings.EncodingfloatdecodeInstructionsAt(IRScope scope, int poolOffset, int offset) intint[]intLabel[]longOperand[]String[]private RubySymboldup()Duplicate this decoder to isolate any state changes.getVars()private static ByteBufferreadingIntoBuffer(File file) voidseek(int headersOffset)
-
Field Details
-
buf
-
manager
-
scopes
-
currentScope
-
filename
Filename to use for the script -
constantPool
-
vars
-
-
Constructor Details
-
IRReaderStream
-
IRReaderStream
-
IRReaderStream
private IRReaderStream(ByteBuffer buf, IRManager manager, List<IRScope> scopes, IRScope currentScope, ByteList filename, RubySymbol[] constantPool)
-
-
Method Details
-
dup
Description copied from interface:IRReaderDecoderDuplicate this decoder to isolate any state changes.- Specified by:
dupin interfaceIRReaderDecoder- Returns:
- An identical decoder that's isolated from the original
-
readingIntoBuffer
-
getFilename
- Specified by:
getFilenamein interfaceIRReaderDecoder
-
decodeByteList
- Specified by:
decodeByteListin interfaceIRReaderDecoder
-
decodeByteArray
public byte[] decodeByteArray()- Specified by:
decodeByteArrayin interfaceIRReaderDecoder
-
decodeEncoding
public org.jcodings.Encoding decodeEncoding()- Specified by:
decodeEncodingin interfaceIRReaderDecoder
-
decodeLabel
- Specified by:
decodeLabelin interfaceIRReaderDecoder
-
decodeLabelArray
- Specified by:
decodeLabelArrayin interfaceIRReaderDecoder
-
decodeRubyEvent
- Specified by:
decodeRubyEventin interfaceIRReaderDecoder
-
decodeSymbolFromConstantPool
-
decodeSymbol
- Specified by:
decodeSymbolin interfaceIRReaderDecoder
-
decodeString
- Specified by:
decodeStringin interfaceIRReaderDecoder
-
addScope
- Specified by:
addScopein interfaceIRReaderDecoder
-
getCurrentScope
- Specified by:
getCurrentScopein interfaceIRReaderDecoder
-
decodeStringArray
- Specified by:
decodeStringArrayin interfaceIRReaderDecoder
-
decodeIntArray
public int[] decodeIntArray()- Specified by:
decodeIntArrayin interfaceIRReaderDecoder
-
getVars
- Specified by:
getVarsin interfaceIRReaderDecoder
-
decodeConstantPool
private void decodeConstantPool(int offset) -
decodeInstructionsAt
- Specified by:
decodeInstructionsAtin interfaceIRReaderDecoder
-
decodeInstr
- Specified by:
decodeInstrin interfaceIRReaderDecoder
-
decodeIRScopeType
- Specified by:
decodeIRScopeTypein interfaceIRReaderDecoder
-
decodeTemporaryVariableType
- Specified by:
decodeTemporaryVariableTypein interfaceIRReaderDecoder
-
decodeStaticScopeType
- Specified by:
decodeStaticScopeTypein interfaceIRReaderDecoder
-
decodeOperation
- Specified by:
decodeOperationin interfaceIRReaderDecoder
-
decodeOperand
- Specified by:
decodeOperandin interfaceIRReaderDecoder
-
decodeVariable
- Specified by:
decodeVariablein interfaceIRReaderDecoder
-
decodeOperandArray
- Specified by:
decodeOperandArrayin interfaceIRReaderDecoder
-
decodeOperandList
- Specified by:
decodeOperandListin interfaceIRReaderDecoder
-
decodeOperandType
- Specified by:
decodeOperandTypein interfaceIRReaderDecoder
-
decodeBoolean
public boolean decodeBoolean()- Specified by:
decodeBooleanin interfaceIRReaderDecoder
-
decodeByte
public byte decodeByte()- Specified by:
decodeBytein interfaceIRReaderDecoder
-
decodeChar
public char decodeChar()- Specified by:
decodeCharin interfaceIRReaderDecoder
-
decodeInt
public int decodeInt()- Specified by:
decodeIntin interfaceIRReaderDecoder
-
decodeIntRaw
public int decodeIntRaw()- Specified by:
decodeIntRawin interfaceIRReaderDecoder
-
decodeLong
public long decodeLong()- Specified by:
decodeLongin interfaceIRReaderDecoder
-
decodeDouble
public double decodeDouble()- Specified by:
decodeDoublein interfaceIRReaderDecoder
-
decodeFloat
public float decodeFloat()- Specified by:
decodeFloatin interfaceIRReaderDecoder
-
decodeScope
- Specified by:
decodeScopein interfaceIRReaderDecoder
-
decodeSignature
- Specified by:
decodeSignaturein interfaceIRReaderDecoder
-
decodeIRFlags
- Specified by:
decodeIRFlagsin interfaceIRReaderDecoder
-
seek
public void seek(int headersOffset) - Specified by:
seekin interfaceIRReaderDecoder
-
decode
-