object WasmTransients
Transients generated by the optimizer that only makes sense in Wasm.
- Alphabetic
- By Inheritance
- WasmTransients
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
WasmBinaryOp(op: Code, lhs: Tree, rhs: Tree) extends Value with Product with Serializable
Wasm binary op.
Wasm binary op.
Wasm features a number of dedicated opcodes for operations that are not in the IR, but only implemented in user space. We can see
WasmBinaryOp
as an extension ofir.Trees.BinaryOp
that covers those.Unsigned divisions and remainders exhibit always-unchecked undefined behavior when their rhs is 0. It is up to code generating those transient nodes to check for 0 themselves if necessary.
All other Wasm binary ops preserve pureness.
-
final
case class
WasmCodePointAt(string: Tree, index: Tree) extends Value with Product with Serializable
Wasm intrinsic for
jl.String.codePointAt
.Wasm intrinsic for
jl.String.codePointAt
.Typing rules:
string
must be ajl.String
;index
must be anint
. The result is anint
.Evaluation semantics are as follows:
- Let
stringV
be the result of evaluatingstring
. If it isnull
, throw an NPE (subject to UB). 2. LetindexV
be the result of evaluatingindex
. 3. IfindexV < 0
orindexV >= stringV.length
, throw aStringIndexOutOfBoundsException
(subject to UB). 4. Return the code point starting at indexindexV
ofstringV
.
- Let
-
final
case class
WasmStringFromCodePoint(codePoint: Tree) extends Value with Product with Serializable
Wasm intrinsic for
jl.Character.toString(int)
.Wasm intrinsic for
jl.Character.toString(int)
.Typing rules:
codePoint
must be anint
. The result is astring
.Evaluation semantics are as follows:
- Let
codePointV
be the result of evaluatingcodePoint
. 2. IfcodePointV
is not a valid code point, UB (i.e., this transient *assumes* thatcodePointV
is a valid code point). 3. Return a string of 1 or 2 chars that represents the given code point.
- Let
-
final
case class
WasmSubstring(string: Tree, start: Tree, optEnd: Option[Tree]) extends Value with Product with Serializable
Wasm intrinsic for
jl.String.substring
.Wasm intrinsic for
jl.String.substring
.Typing rules:
string
must be ajl.String
;start
andoptEnd
must beint
s. The result is astring
.Evaluation semantics are as follows:
- Let
stringV
be the result of evaluatingstring
. If it isnull
, throw an NPE (subject to UB). 2. LetstartV
be the result of evaluatingstart
. 3. IfoptEnd
is empty, letendV
bestringV.length
. Otherwise, letendV
be the result of evaluatingoptEnd
. 4. IfstartV < 0
,endV < startV
orendV > stringV.length
, throw aStringIndexOutOfBoundsException
(subject to UB). 5. Return the substring ofstringV
in the range[startV, endV)
.
- Let
-
final
case class
WasmUnaryOp(op: Code, lhs: Tree) extends Value with Product with Serializable
Wasm unary op.
Wasm unary op.
Wasm features a number of dedicated opcodes for operations that are not in the IR, but only implemented in user space. We can see
WasmUnaryOp
as an extension ofir.Trees.UnaryOp
that covers those.Wasm unary ops always preserve pureness.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- object WasmBinaryOp extends Serializable
- object WasmUnaryOp extends Serializable