Trees
Members list
Type members
Classlikes
Attributes
- Supertypes
- Known subtypes
-
class FieldDefclass JSFieldDef
Apply an instance method with dynamic dispatch (the default).
Apply an instance method with dynamic dispatch (the default).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Apply a static method via dynamic import.
Apply a static method via dynamic import.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
- Self type
-
ApplyFlags.type
Apply a static method.
Apply a static method.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Apply an instance method with static dispatch (e.g., super calls).
Apply an instance method with static dispatch (e.g., super calls).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Apply a typed closure
Apply a typed closure
The given fun
must have a closure type.
The arguments' types must match (be subtypes of) the parameter types of the closure type.
The tpe
of this node is the result type of the closure type, or nothing
if the latter is nothing
.
Evaluation steps are as follows:
- Let
funV
be the result of evaluatingfun
. - If
funV
isnullClosure
, trigger an NPE undefined behavior. - Let
argsV
be the result of evaluatingargs
, in order. - Invoke
funV
with argumentsargsV
, and return the result.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Known subtypes
-
class ArraySelectclass JSGlobalRefclass JSPrivateSelectclass JSSelectclass JSSuperSelectclass RecordSelectclass Selectclass SelectStaticclass VarRefShow all
Binary operation.
Binary operation.
All binary operations follow common evaluation steps:
- Let
lhsValue
be the result of evaluatinglhs
. - Let
rhsValue
be the result of evaluatingrhs
. - Perform an operation that depends on
op
,lhsValue
andrhsValue
.
Unless lhsValue
throws, rhsValue
will therefore always be evaluated, even if the operation op
would throw based only on lhsValue
.
The integer dividing operators (Int_/
, Int_%
, Long_/
and Long_%
) throw an ArithmeticException
when their right-hand-side is 0. That exception is not subject to undefined behavior.
String_charAt
throws a StringIndexOutOfBoundsException
.
The Class_x
operations take a jl.Class!
as lhs, i.e., a non-nullable jl.Class
. Class_isAssignableFrom
also takes a jl.Class!
as rhs.
Class_isInstance
andClass_isAssignableFrom
are pure.Class_cast
throws a CCE if its second argument is non-null and not an instance of the class represented by its first argument.Class_newArray
throws aNegativeArraySizeException
if its second argument is negative and anIllegalArgumentException
if its first argument isclassOf[Unit]
.
Otherwise, binary operations preserve pureness.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Closure with explicit captures.
Closure with explicit captures.
If flags.typed
is true
, this is a typed closure with a ClosureType
. In that case, flags.arrow
must be true
, and restParam
must be None
. Typed closures cannot be passed to JavaScript code. This is enforced at the type system level, since ClosureType
s are not subtypes of AnyType
. The only meaningful operation one can perform on a typed closure is to call it using ApplyTypedClosure
.
If flags.typed
is false
, this is a JavaScript closure with type AnyNotNullType
. In that case, the ptpe
or all params
and resultType
must all be AnyType
.
If flags.arrow
is true
, the closure is an Arrow Function (=>
), which does not have a this
parameter, and cannot be constructed (called with new
). If false
, it is a regular Function (function
), which does have a this
parameter of type AnyType
. Typed closures are always Arrow functions, since they do not have a this
parameter.
If flags.async
is true
, it is an async
closure. Async closures return a Promise
of their body, and can contain JSAwait nodes. flags.typed
and flags.async
cannot both be true
.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
- Self type
-
ClosureFlags.type
Creates a JavaScript class value.
Creates a JavaScript class value.
Value parameters
- captureValues
-
Actual values for the captured parameters (in the
ClassDef
'sjsClassCaptures.get
) - className
-
Reference to the
ClassDef
for the class definition, which must havejsClassCaptures.nonEmpty
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AnyFieldDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Base class for all nodes in the IR.
Base class for all nodes in the IR.
Usually, one of the direct subclasses of IRNode
should be used instead.
Attributes
- Supertypes
- Known subtypes
-
class ClassDefclass ClassIdentclass FieldIdentclass JSConstructorBodyclass JSSpreadclass LocalIdentclass MemberDefclass AnyFieldDefclass FieldDefclass JSFieldDefclass JSNativeMemberDeftrait VersionedMemberDefclass JSConstructorDefclass JSMethodPropDefclass JSMethodDefclass JSPropertyDefclass MethodDefclass MethodIdentclass ParamDefclass SimpleFieldIdentclass TopLevelExportDefclass TopLevelFieldExportDefclass TopLevelJSClassExportDefclass TopLevelMethodExportDefclass TopLevelModuleExportDefclass Treeclass Applyclass ApplyDynamicImportclass ApplyStaticclass ApplyStaticallyclass ApplyTypedClosureclass ArrayValueclass AsInstanceOfclass Assigntrait AssignLhsclass ArraySelectclass JSGlobalRefclass JSPrivateSelectclass JSSelectclass JSSuperSelectclass RecordSelectclass Selectclass SelectStaticclass VarRefclass BinaryOpclass Blockclass Closureclass CreateJSClassclass Debuggerclass ForInclass Ifclass IsInstanceOfclass JSArrayConstrclass JSAwaitclass JSBinaryOpclass JSDeleteclass JSFunctionApplyclass JSImportCallclass JSImportMetaclass JSMethodApplyclass JSNewclass JSNewTargetclass JSObjectConstrclass JSSuperConstructorCallclass JSSuperMethodCallclass JSTypeOfGlobalRefclass JSUnaryOpclass Labeledclass LinkTimePropertytrait Literalclass BooleanLiteralclass ByteLiteralclass CharLiteralclass ClassOfclass DoubleLiteralclass FloatLiteralclass LongLiteraltrait MatchableLiteralclass IntLiteralclass Nullclass StringLiteralclass ShortLiteralclass Undefinedclass LoadJSConstructorclass LoadJSModuleclass LoadModuleclass Matchclass Newclass NewArrayclass NewLambdaclass RecordValueclass Returnclass SelectJSNativeMemberclass Skipclass StoreModuleclass Transientclass TryCatchclass TryFinallyclass UnaryOpclass VarDefclass Whiletrait TreeOrJSSpreadShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MatchableLiteraltrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
await arg
.
await arg
.
This is directly equivalent to a JavaScript await
expression.
If used directly within a Closure node with the async
flag, this node is always valid. However, when used anywhere else, it is an "orphan" await. Orphan awaits only link when targeting WebAssembly.
This is not a UnaryOp
because of the above strict scoping rule. For example, unless it is orphan to begin with, it is not safe to pull this node out of or into an intervening closure, contrary to UnaryOp
s.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
JavaScript binary operation.
JavaScript binary operation.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
- Self type
-
JSBinaryOp.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait VersionedMemberDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
delete qualifier[item]
delete qualifier[item]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AnyFieldDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
- Self type
-
JSGlobalRef.type
JavaScript dynamic import of the form import(arg)
.
JavaScript dynamic import of the form import(arg)
.
This form is its own node, rather than using something like
JSFunctionApply(JSImport())
because import
is not a first-class term in JavaScript. ImportCall
is a dedicated syntactic form that cannot be dissociated.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
JavaScript meta-property import.meta
.
JavaScript meta-property import.meta
.
This form is its own node, rather than using something like
JSSelect(JSImport(), StringLiteral("meta"))
because import
is not a first-class term in JavaScript. import.meta
is a dedicated syntactic form that cannot be dissociated.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass JSMethodPropDeftrait VersionedMemberDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait VersionedMemberDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class JSMethodDefclass JSPropertyDef
Loading specification for a native JS class or object.
Loading specification for a native JS class or object.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
Attributes
- Companion
- class
- Supertypes
- Self type
-
JSNativeLoadSpec.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
JavaScript meta-property new.target
.
JavaScript meta-property new.target
.
This form is its own node, rather than using something like
JSSelect(JSNew(), StringLiteral("target"))
because new
is not a first-class term in JavaScript. new.target
is a dedicated syntactic form that cannot be dissociated.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass JSMethodPropDeftrait VersionedMemberDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
...items
, the "spread" operator of ECMAScript 6.
...items
, the "spread" operator of ECMAScript 6.
Value parameters
- items
-
An Array whose items will be spread (not an arbitrary iterable)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Super constructor call in the constructor of a non-native JS class.
Super constructor call in the constructor of a non-native JS class.
Exactly one such node must appear in the constructor of a non-native JS class, at the top-level (possibly as a direct child of a top-level Block
). Any other use of this node is invalid.
Statements before this node, as well as the args
, cannot contain any This()
node. Statements after this node can use This()
.
After the execution of this node, it is guaranteed that all fields declared in the current class have been created and initialized. Up to that point, accessing any field declared in this class (e.g., through an overridden method called from the super constructor) is undefined behavior.
All in all, the shape of a constructor is therefore:
{
statementsNotUsingThis();
JSSuperConstructorCall(...argsNotUsingThis);
statementsThatMayUseThis()
}
which currently translates to something of the following shape:
{
statementsNotUsingThis();
super(...argsNotUsingThis);
this.privateField1 = 0;
this["publicField2"] = false;
statementsThatMayUseThis()
}
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Calls a method inherited from the given superClass
on receiver
.
Calls a method inherited from the given superClass
on receiver
.
Intuitively, this corresponds to
superClass.prototype[method].call(receiver, ...args)
but retains more structure at the IR level than using an explicit encoding of the above expression.
Given the non-native JS classes
class Bar extends js.Object
class Foo extends Bar
The node
JSSuperBrackerCall(LoadJSConstructor(ClassName("Bar")), receiver, method, args)
which is printed as
super(constructorOf[Bar])::receiver[method](...args)
has the following semantics:
Bar.prototype[method].call(receiver, ...args)
If this happens to be located in an instance method of Foo
, and receiver
happens to be This()
, this is equivalent to the ES6 statement
super[method](...args)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Selects a property inherited from the given superClass
on receiver
.
Selects a property inherited from the given superClass
on receiver
.
Given the non-native JS classes
class Bar extends js.Object
class Foo extends Bar
The node
JSSuperBrackerSelect(LoadJSConstructor(ClassName("Bar")), qualifier, item)
which is printed as
super(constructorOf[Bar])::qualifier[item]
has the semantics of an ES6 super reference
super[item]
as if it were in an instance method of Foo
with qualifier
as the this
value.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
JavaScript unary operation.
JavaScript unary operation.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
- Self type
-
LinkTimeProperty.type
Marker for literals. Literals are always pure.
Marker for literals. Literals are always pure.
All Literal
s can be compared for equality. The equality does not take the pos
into account.
Attributes
- Supertypes
- Known subtypes
-
class BooleanLiteralclass ByteLiteralclass CharLiteralclass ClassOfclass DoubleLiteralclass FloatLiteralclass LongLiteraltrait MatchableLiteralclass IntLiteralclass Nullclass StringLiteralclass ShortLiteralclass UndefinedShow all
Loads the constructor of a JS class (native or not).
Loads the constructor of a JS class (native or not).
className
must represent a non-trait JS class (native or not).
This is used typically to instantiate a JS class, and most importantly if it is a non-native JS class. Given the class
class Foo(x: Int) extends js.Object
The instantiation new Foo(1)
would be represented as
JSNew(LoadJSConstructor(ClassName("Foo")), List(IntLiteral(1)))
This node is also useful to encode o.isInstanceOf[Foo]
:
JSBinaryOp(instanceof, o, LoadJSConstructor(ClassName("Foo")))
If Foo
is non-native, the presence of this node makes it instantiable, and therefore reachable.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Like LoadModule but for a JS module class.
Like LoadModule but for a JS module class.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
A break-free switch (without fallthrough behavior).
A break-free switch (without fallthrough behavior).
Unlike a JavaScript switch, it can be used in expression position. It supports alternatives explicitly (hence the List[MatchableLiteral]
in cases), whereas in a switch one would use the fallthrough behavior to implement alternatives. (This is not a pattern matching construct like in Scala.)
The selector must be either an int
(IntType
) or a java.lang.String
. The cases can be any MatchableLiteral
, even if they do not make sense for the type of the selecter (they simply will never match).
Because +0.0 === -0.0
in JavaScript, and because those semantics are used in a JS switch
, we have to prevent the selector from ever being -0.0
. Otherwise, it would be matched by a case IntLiteral(0)
. At the same time, we must allow at least int
and java.lang.String
to support all switchable match
es from Scala. Since the latter two have no common super type that does not allow -0.0
, we really have to special-case those two types.
This is also why we restrict MatchableLiteral
s to IntLiteral
, StringLiteral
and Null
. Allowing more cases would only make IR checking more complicated, without bringing any added value.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Marker for literals that can be used in a Match case.
Marker for literals that can be used in a Match case.
Matchable literals are:
IntLiteral
StringLiteral
Null
See Match for the rationale about that specific set.
Attributes
- Supertypes
-
trait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Any member of a ClassDef
.
Any member of a ClassDef
.
Partitioned into AnyFieldDef
, MethodDef
, JSConstructorDef
and JSMethodPropDef
.
Attributes
- Supertypes
- Known subtypes
-
class AnyFieldDefclass FieldDefclass JSFieldDefclass JSNativeMemberDeftrait VersionedMemberDefclass JSConstructorDefclass JSMethodPropDefclass JSMethodDefclass JSPropertyDefclass MethodDefShow all
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
- Self type
-
MemberFlags.type
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
- Self type
-
MemberNamespace.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait VersionedMemberDefclass MemberDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
New lambda instance of a SAM class.
New lambda instance of a SAM class.
Functionally, a NewLambda
is equivalent to an instance of an anonymous class with the following shape:
val funV: ((...Ts) => R)! = fun;
(new superClass with interfaces {
def <this>() = this.superClass::<init>()
def methodName(...args: Ts): R = funV(...args)
}): tpe
where superClass
, interfaces
, methodName
, Ts
and R
are taken from the descriptor
. Ts
and R
are the paramTypes
and resultType
of the descriptor. They are required because there is no one-to-one mapping between TypeRef
s and Type
s, and we want the shape of the class to be a deterministic function of the descriptor
.
The fun
must have type ((...Ts) => R)!
.
Intuitively, tpe
must be a supertype of superClass! & ...interfaces!
. Since our type system does not have intersection types, in practice this means that there must exist C ∈ { superClass } ∪ interfaces
such that tpe
is a supertype of C!
.
The uniqueness of the anonymous class and its run-time class name are not guaranteed.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MatchableLiteraltrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
- Self type
-
OptimizerHints.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MatchableLiteraltrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class TopLevelFieldExportDefclass TopLevelJSClassExportDefclass TopLevelMethodExportDefclass TopLevelModuleExportDef
Attributes
- Companion
- class
- Supertypes
- Self type
-
TopLevelExportDef.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass TopLevelExportDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass TopLevelExportDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass TopLevelExportDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
Export for a top-level object.
Export for a top-level object.
This exports the singleton instance of the containing module class. The instance is initialized during ES module instantiation.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass TopLevelExportDefclass IRNodeclass Objecttrait Matchableclass AnyShow all
A transient node for custom purposes.
A transient node for custom purposes.
A transient node is never a valid input to the Serializers nor to the linker, but can be used in a transient state for internal purposes.
Value parameters
- value
-
The payload of the transient node, without any specified meaning.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Node for a statement or expression in the IR.
Node for a statement or expression in the IR.
Attributes
- Supertypes
- Known subtypes
-
class Applyclass ApplyDynamicImportclass ApplyStaticclass ApplyStaticallyclass ApplyTypedClosureclass ArrayValueclass AsInstanceOfclass Assigntrait AssignLhsclass ArraySelectclass JSGlobalRefclass JSPrivateSelectclass JSSelectclass JSSuperSelectclass RecordSelectclass Selectclass SelectStaticclass VarRefclass BinaryOpclass Blockclass Closureclass CreateJSClassclass Debuggerclass ForInclass Ifclass IsInstanceOfclass JSArrayConstrclass JSAwaitclass JSBinaryOpclass JSDeleteclass JSFunctionApplyclass JSImportCallclass JSImportMetaclass JSMethodApplyclass JSNewclass JSNewTargetclass JSObjectConstrclass JSSuperConstructorCallclass JSSuperMethodCallclass JSTypeOfGlobalRefclass JSUnaryOpclass Labeledclass LinkTimePropertytrait Literalclass BooleanLiteralclass ByteLiteralclass CharLiteralclass ClassOfclass DoubleLiteralclass FloatLiteralclass LongLiteraltrait MatchableLiteralclass IntLiteralclass Nullclass StringLiteralclass ShortLiteralclass Undefinedclass LoadJSConstructorclass LoadJSModuleclass LoadModuleclass Matchclass Newclass NewArrayclass NewLambdaclass RecordValueclass Returnclass SelectJSNativeMemberclass Skipclass StoreModuleclass Transientclass TryCatchclass TryFinallyclass UnaryOpclass VarDefclass WhileShow all
Either a Tree
or a JSSpread
.
Either a Tree
or a JSSpread
.
This is the type of actual arguments to JS applications.
Attributes
- Supertypes
- Known subtypes
-
class JSSpreadclass Treeclass Applyclass ApplyDynamicImportclass ApplyStaticclass ApplyStaticallyclass ApplyTypedClosureclass ArrayValueclass AsInstanceOfclass Assigntrait AssignLhsclass ArraySelectclass JSGlobalRefclass JSPrivateSelectclass JSSelectclass JSSuperSelectclass RecordSelectclass Selectclass SelectStaticclass VarRefclass BinaryOpclass Blockclass Closureclass CreateJSClassclass Debuggerclass ForInclass Ifclass IsInstanceOfclass JSArrayConstrclass JSAwaitclass JSBinaryOpclass JSDeleteclass JSFunctionApplyclass JSImportCallclass JSImportMetaclass JSMethodApplyclass JSNewclass JSNewTargetclass JSObjectConstrclass JSSuperConstructorCallclass JSSuperMethodCallclass JSTypeOfGlobalRefclass JSUnaryOpclass Labeledclass LinkTimePropertytrait Literalclass BooleanLiteralclass ByteLiteralclass CharLiteralclass ClassOfclass DoubleLiteralclass FloatLiteralclass LongLiteraltrait MatchableLiteralclass IntLiteralclass Nullclass StringLiteralclass ShortLiteralclass Undefinedclass LoadJSConstructorclass LoadJSModuleclass LoadModuleclass Matchclass Newclass NewArrayclass NewLambdaclass RecordValueclass Returnclass SelectJSNativeMemberclass Skipclass StoreModuleclass Transientclass TryCatchclass TryFinallyclass UnaryOpclass VarDefclass WhileShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Unary operation.
Unary operation.
All unary operations follow common evaluation steps:
- Let
lhsValue
be the result of evaluatinglhs
. - Perform an operation that depends on
op
andlhsValue
.
The Class_x
operations take a jl.Class!
argument, i.e., a non-nullable jl.Class
.
Likewise, Array_length
, GetClass
, Clone
and UnwrapFromThrowable
take arguments of non-nullable types.
CheckNotNull
throws NPEs subject to UB.
Throw
always throws, obviously.
Clone
and WrapAsThrowable
are side-effect-free but not pure.
Otherwise, unary operations preserve pureness.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Literalclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AssignLhsclass Treetrait TreeOrJSSpreadclass IRNodeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Known subtypes
Value members
Concrete methods
Tests whether the given name is a valid JavaScript identifier name.
Tests whether the given name is a valid JavaScript identifier name.
This test does not exclude keywords.