Package io.github.eutro.wasm2j.core.ext
Class CommonExts
java.lang.Object
io.github.eutro.wasm2j.core.ext.CommonExts
A collection of
Ext
s that exist in both WebAssembly and Java IR.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The live variable information of a basic block. -
Field Summary
Modifier and TypeFieldDescriptionAttached to aVar
.static final Object
An object that is a sentinel for null forCONSTANT_VALUE
.Attached to aVar
, computed byPropagateConstants
.static final Ext<Set<BasicBlock>>
Attached to aBasicBlock
.static final Ext<BasicBlock>
Attached to aBasicBlock
.Attached to aVar
.static final Ext<CommonExts.LiveData>
Attached to aBasicBlock
, computed byComputeLiveVars
.static final Ext<MetadataState>
Attached to aFunction
.static final Ext<BasicBlock>
Attached to aInsn
.Attached to aInsn
.Attached to aBasicBlock
.static final Ext<List<BasicBlock>>
Attached to aBasicBlock
.Attached to aVar
.Attached to aVar
, computed byComputeUses
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
static <T extends ExtContainer>
TmarkPure
(T t) Mark something as pure, by attachingIS_PURE
= true
to it.static Object
-
Field Details
-
METADATA_STATE
Attached to aFunction
. Has metadata about the form of the function.- See Also:
-
IDOM
-
PREDS
Attached to aBasicBlock
. The predecessors of the block.Computed by
ComputePreds
orComputeDoms
. -
DOM_FRONTIER
-
IS_PURE
-
IS_TRIVIAL
-
CONSTANT_VALUE
Attached to aVar
, computed byPropagateConstants
. The constant value of the variable. -
CONSTANT_NULL_SENTINEL
An object that is a sentinel for null forCONSTANT_VALUE
. -
CONSTANT_PROPAGATOR
-
STACKIFIED
Attached to aVar
. Whether this variable has been arranged so that it is passed on the operand stack.- See Also:
-
IS_PHI
Attached to aVar
. Whether this variable has been lowered from a phi instruction.- See Also:
-
ASSIGNED_AT
-
USED_AT
Attached to aVar
, computed byComputeUses
. The set of instructions that use this variable. -
OWNING_FUNCTION
Attached to aBasicBlock
. The function this basic block is in. -
OWNING_BLOCK
-
OWNING_CONTROL
Attached to aInsn
. The control instruction this insn is part of, if any. -
OWNING_EFFECT
Attached to aInsn
. The effect instruction this insn is part of, if any. -
LIVE_DATA
Attached to aBasicBlock
, computed byComputeLiveVars
. The live variable information of the block.
-
-
Constructor Details
-
CommonExts
public CommonExts()
-
-
Method Details
-
fillNull
- Parameters:
obj
- The object.- Returns:
obj
, orCONSTANT_NULL_SENTINEL
if it is null.
-
takeNull
- Parameters:
obj
- The object.- Returns:
obj
, ornull
if it isCONSTANT_NULL_SENTINEL
.
-
markPure
Mark something as pure, by attachingIS_PURE
= true
to it.- Type Parameters:
T
- The type oft
.- Parameters:
t
- The thing to mark as pure.- Returns:
t
.
-