This class represents an arithmetic operation.
This class represents an arithmetic operation.
A boxed value.
A boxed value.
This class represents a basic block.
This class represents a basic block. Each basic block contains a list of instructions that are either executed all, or none. No jumps to/from the "middle" of the basic block are allowed (modulo exceptions).
This class represents the intermediate code of a method or other multi-block piece of code, like exception handlers.
This class represents the intermediate code of a method or other multi-block piece of code, like exception handlers.
This class represents a comparison operation.
This class represents a comparison operation.
Linearize code using a depth first traversal.
Linearize code using a depth first traversal.
A 'dump' of the blocks in this method, which does not require any well-formedness of the basic blocks (like the last instruction being a jump).
A 'dump' of the blocks in this method, which does not require any well-formedness of the basic blocks (like the last instruction being a jump).
Represent a class in ICode
Represent a class in ICode
A phase which works on icode.
Represent a field in ICode
Represent a field in ICode
Common interface for IClass/IField/IMethod.
Common interface for IClass/IField/IMethod.
Represents a method in ICode.
Represents a method in ICode. Local variables contain both locals and parameters, similar to the way the JVM 'sees' them.
Locals and parameters are added in reverse order, as they are kept in cons-lists. The 'builder' is responsible for reversing them and putting them back, when the generation is finished (GenICode does that).
This class represents an instruction of the intermediate code.
This class represents an instruction of the intermediate code. Each case subclass will represent a specific operation.
Represent local variables and parameters
Represent local variables and parameters
This class represents a logical operation.
This class represents a logical operation.
A simple linearizer which predicts all branches to take the 'success' branch and tries to schedule those blocks immediately after the test.
A simple linearizer which predicts all branches to take the 'success' branch and tries to schedule those blocks immediately after the test. This is in sync with how 'while' statements are translated (if the test is 'true', the loop continues).
This class represents a primitive operation.
This class represents a primitive operation.
Pretty printer for primitives
Pretty printer for primitives
A class type.
A class type.
Linearize code in reverse post order.
Linearize code in reverse post order. In fact, it does a post order traversal, prepending visited nodes to the list. This way, it is constructed already in reverse post order.
This class represents a shift operation.
This class represents a shift operation.
This class represents a test operation.
This class represents a test operation.
This class represents a type kind.
This class represents a type kind. Type kinds represent the types that the VM know (or the ICode view of what VMs know).
Test two objects for inequality.
Test two objects for inequality.
true
if !(this == that), false otherwise.
Equivalent to x.hashCode
except for boxed numeric types and null
.
Equivalent to x.hashCode
except for boxed numeric types and null
.
For numerics, it returns a hash value which is consistent
with value equality: if two value type instances compare
as true, then ## will produce the same hash value for each
of them.
For null
returns a hashcode where null.hashCode
throws a
NullPointerException
.
a hash value consistent with ==
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
true
if the receiver object is equivalent to the argument; false
otherwise.
An arithmetic addition operation
An arithmetic addition operation
A bitwise AND operation
A bitwise AND operation
An arithmetic shift to the right
An arithmetic shift to the right
A boolean value
A boolean value
A 1-byte signed integer
A 1-byte signed integer
A 2-byte UNSIGNED integer
A 2-byte UNSIGNED integer
A comparison operation with no default for NaNs
A comparison operation with no default for NaNs
A comparison operation with +1 default for NaNs
A comparison operation with +1 default for NaNs
A comparison operation with -1 default for NaNs
A comparison operation with -1 default for NaNs
Dummy TypeKind to represent the ConcatClass in a platform-independent way.
Dummy TypeKind to represent the ConcatClass in a platform-independent way. For JVM it would have been a REFERENCE to 'StringBuffer'.
An arithmetic division operation
An arithmetic division operation
An 8-byte floating point number
An 8-byte floating point number
An equality test
An equality test
type: (buf) => STR jvm : It should turn the StringBuffer into a String.
type: (buf) => STR jvm : It should turn the StringBuffer into a String.
A 4-byte floating point number
A 4-byte floating point number
A greater-than-or-equal test
A greater-than-or-equal test
A greater-than test
A greater-than test
A 4-byte signed integer
A 4-byte signed integer
A less-than-or-equal test
A less-than-or-equal test
An 8-byte signed integer
An 8-byte signed integer
A logical shift to the left
A logical shift to the left
A logical shift to the right
A logical shift to the right
A less-than test
A less-than test
An arithmetic multiplication operation
An arithmetic multiplication operation
A non-equality test
A non-equality test
Bitwise negation.
Bitwise negation.
A bitwise OR operation
A bitwise OR operation
An arithmetic remainder operation
An arithmetic remainder operation
A 2-byte signed integer
A 2-byte signed integer
An arithmetic subtraction operation
An arithmetic subtraction operation
Signals the beginning of a series of concatenations.
Signals the beginning of a series of concatenations. On the JVM platform, it should create a new StringBuffer
The unit value
The unit value
A bitwise XOR operation
A bitwise XOR operation
Cast the receiver object to be of type T0
.
Cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics.
Therefore the expression 1.asInstanceOf[String]
will throw a ClassCastException
at
runtime, while the expression List(1).asInstanceOf[List[String]]
will not.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the requested type.
the receiver object.
ClassCastException
if the receiver object is not an instance of the erasure of type T0
.
Is the given class available as icode?
Is the given class available as icode?
The ICode representation of classes
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the clone
method is platform dependent.
a copy of the receiver object.
not specified by SLS as a member of AnyRef
Print all classes and basic blocks.
Print all classes and basic blocks. Used for debugging.
Tests whether the argument (that
) is a reference to the receiver object (this
).
Tests whether the argument (that
) is a reference to the receiver object (this
).
The eq
method implements an equivalence relation on
non-null instances of AnyRef
, and has three additional properties:
x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.null.eq(null)
returns true
. When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
true
if the argument is a reference to the receiver object; false
otherwise.
The equality method for reference types.
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize
method is invoked, as
well as the interaction between finalize
and non-local returns
and exceptions, are all platform dependent.
not specified by SLS as a member of AnyRef
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
not specified by SLS as a member of AnyRef
The hashCode method for reference types.
The icode of the given class, if available
The icode of the given class, if available
Test whether the dynamic type of the receiver object is T0
.
Test whether the dynamic type of the receiver object is T0
.
Note that the result of the test is modulo Scala's erasure semantics.
Therefore the expression 1.isInstanceOf[String]
will return false
, while the
expression List(1).isInstanceOf[List[String]]
will return true
.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the specified type.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
The ICode linearizer.
Load bytecode for given symbol.
Load bytecode for given symbol.
The least upper bound of two typekinds.
The least upper bound of two typekinds. They have to be either REFERENCE or ARRAY kinds.
The lub is based on the lub of scala types.
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
true
if the argument is not a reference to the receiver object; false
otherwise.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
A map from scala primitive Types to ICode TypeKinds
A map from scala primitive Types to ICode TypeKinds
Debugging flag
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
Return the TypeKind of the given type
Return the TypeKind of the given type
Call to dealiasWiden fixes #3003 (follow type aliases). Otherwise, arrayOrClassType below would return ObjectReference.
Glue together ICode parts.