Package org.jruby.ir
Enum Class Operation
- All Implemented Interfaces:
Serializable
,Comparable<Operation>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptiondefinesJRuby-impl instructionscallsRuby operators: should all these be calls? Implementing instrs don't inherit from CallBase.javaSSS FIXME: Document what causes this instr to raise an exceptionSSS FIXME: This can throw an exception only in tracing mode Should override canRaiseException in GVarAliasInstr to implement this maybecontrol-flowmarker instructions used to flag/mark places in the code and dont actually get executedconstant operationsdebugging opsOther JRuby internal primitives for optimizationsvalue storesargument receive in methods and blocksInstruction to reify an passed-in block to a Proc for def foo(&b)returns -- returns unwind stack, etc. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
The last instruction in the BB which will exit the BB.static Operation
fromOrdinal
(int value) boolean
boolean
boolean
boolean
boolean
isBranch()
boolean
isCall()
boolean
boolean
boolean
isLoad()
boolean
isReturn()
boolean
isStore()
boolean
boolean
toString()
boolean
static Operation
Returns the enum constant of this class with the specified name.static Operation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOP
-
JUMP
control-flow -
BNE
-
B_UNDEF
-
B_NIL
-
B_TRUE
-
B_FALSE
-
B_SWITCH
-
B_INT
-
RECV_SELF
argument receive in methods and blocks -
RECV_PRE_REQD_ARG
-
RECV_POST_REQD_ARG
-
RECV_KW
-
RECV_KW_ARG
-
RECV_KW_REST_ARG
-
RECV_REST_ARG
-
RECV_OPT_ARG
-
RECV_RUBY_EXC
-
RECV_JRUBY_EXC
-
LOAD_IMPLICIT_CLOSURE
-
REIFY_CLOSURE
Instruction to reify an passed-in block to a Proc for def foo(&b) -
LOAD_FRAME_CLOSURE
-
LOAD_BLOCK_IMPLICIT_CLOSURE
-
CALL
calls -
NORESULT_CALL
-
ATTR_ASSIGN
-
ARRAY_DEREF
-
AS_STRING
-
CLASS_SUPER
-
INSTANCE_SUPER
-
UNRESOLVED_SUPER
-
ZSUPER
-
CALL_1F
-
CALL_1D
-
CALL_1O
-
CALL_2O
-
CALL_1OB
-
CALL_0O
-
NORESULT_CALL_1O
-
BLOCK_GIVEN_CALL
-
FRAME_NAME_CALL
-
EQQ
Ruby operators: should all these be calls? Implementing instrs don't inherit from CallBase.java -
LAMBDA
-
MATCH
-
YIELD
-
RETURN
returns -- returns unwind stack, etc. -
NONLOCAL_RETURN
-
BREAK
-
RETURN_OR_RETHROW_SAVED_EXC
-
ALIAS
defines -
DEF_MODULE
-
DEF_CLASS
-
DEF_META_CLASS
-
DEF_INST_METH
-
DEF_CLASS_METH
-
PROCESS_MODULE_BODY
-
UNDEF_METHOD
-
GVAR_ALIAS
SSS FIXME: This can throw an exception only in tracing mode Should override canRaiseException in GVarAliasInstr to implement this maybe -
LABEL
marker instructions used to flag/mark places in the code and dont actually get executed -
EXC_REGION_START
-
EXC_REGION_END
-
LEXICAL_SEARCH_CONST
constant operations -
INHERITANCE_SEARCH_CONST
-
SEARCH_CONST
-
SEARCH_MODULE_FOR_CONST
-
GET_GLOBAL_VAR
-
GET_FIELD
-
GET_CVAR
SSS FIXME: Document what causes this instr to raise an exception -
PUT_GLOBAL_VAR
value stores -
PUT_CONST
-
PUT_CVAR
-
PUT_FIELD
-
LINE_NUM
debugging ops -
TRACE
-
COVERAGE
-
BINDING_LOAD
JRuby-impl instructions -
BINDING_STORE
-
BUILD_BACKREF
-
BUILD_COMPOUND_ARRAY
-
BUILD_COMPOUND_STRING
-
BUILD_DREGEXP
-
BUILD_RANGE
-
BUILD_SPLAT
-
CHECK_ARGS_ARRAY_ARITY
-
CHECK_ARITY
-
CHECK_FOR_LJE
-
CLASS_VAR_MODULE
-
COPY
-
GET_ENCODING
-
INT_MATH
-
AS_FIXNUM
-
MASGN_OPT
-
MASGN_REQD
-
MASGN_REST
-
RAISE_ARGUMENT_ERROR
-
RAISE_REQUIRED_KEYWORD_ARGUMENT_ERROR
-
RECORD_END_BLOCK
-
RESCUE_EQQ
-
RUNTIME_HELPER
-
SET_CAPTURED_VAR
-
THREAD_POLL
-
THROW
-
TO_ARY
-
BLOCK_GIVEN
-
GET_ERROR_INFO
-
RESTORE_ERROR_INFO
-
BOX_FIXNUM
-
BOX_FLOAT
-
BOX_BOOLEAN
-
UNBOX_FIXNUM
-
UNBOX_FLOAT
-
UNBOX_BOOLEAN
-
IADD
-
ISUB
-
IMUL
-
IDIV
-
ILT
-
IGT
-
IOR
-
IAND
-
IXOR
-
ISHL
-
ISHR
-
IEQ
-
FADD
-
FSUB
-
FMUL
-
FDIV
-
FLT
-
FGT
-
FEQ
-
MODULE_GUARD
Other JRuby internal primitives for optimizations -
PUSH_METHOD_FRAME
-
PUSH_BACKREF_FRAME
-
PUSH_METHOD_BINDING
-
POP_METHOD_FRAME
-
POP_BACKREF_FRAME
-
PUSH_BLOCK_FRAME
-
PUSH_BLOCK_BINDING
-
POP_BLOCK_FRAME
-
POP_BINDING
-
SAVE_BINDING_VIZ
-
RESTORE_BINDING_VIZ
-
TOGGLE_BACKTRACE
-
UPDATE_BLOCK_STATE
-
PREPARE_BLOCK_ARGS
-
PREPARE_SINGLE_BLOCK_ARG
-
PREPARE_FIXED_BLOCK_ARGS
-
PREPARE_NO_BLOCK_ARGS
-
-
Field Details
-
opClass
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
transfersControl
public boolean transfersControl() -
isLoad
public boolean isLoad() -
isStore
public boolean isStore() -
isCall
public boolean isCall() -
isBranch
public boolean isBranch() -
isReturn
public boolean isReturn() -
isException
public boolean isException() -
isArgReceive
public boolean isArgReceive() -
startsBasicBlock
public boolean startsBasicBlock() -
endsBasicBlock
public boolean endsBasicBlock()The last instruction in the BB which will exit the BB. Note: This also means any instructions past this point in that BB are unreachable. -
hasSideEffects
public boolean hasSideEffects() -
isDebugOp
public boolean isDebugOp() -
isBookKeepingOp
public boolean isBookKeepingOp() -
canRaiseException
public boolean canRaiseException() -
modifiesCode
public boolean modifiesCode() -
inlineUnfriendly
public boolean inlineUnfriendly() -
toString
-
fromOrdinal
-