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.
Return the n-th instruction.
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
.
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
Close the block
do nothing if block is already closed
Is this block closed?
Emitting does not set touched to true.
Emitting does not set touched to true. During code generation this is a hotspot and setting the flag for each emit is a waste. Caching should happen only after a block is closed, which sets the DIRTYSUCCS flag.
Add a new instruction at the end of the block, using the same source position as the last emitted instruction
The semantics of this are a little odd but it's designed to work seamlessly with the existing code.
The semantics of this are a little odd but it's designed to work seamlessly with the existing code. It emits each supplied instruction, then closes the block. The odd part is that if the instruction has pos == NoPosition, it calls the 1-arg emit, but otherwise it calls the 2-arg emit. This way I could retain existing behavior exactly by calling setPos on any instruction using the two arg version which I wanted to include in a call to emitOnly.
Enter ignore mode: new 'emit'ted instructions will not be added to this basic block.
Enter ignore mode: new 'emit'ted instructions will not be added to this basic block. It makes the generation of THROW and RETURNs easier.
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.
The equality method for reference types. Default implementation delegates to eq
.
See also equals
in scala.Any.
true
if the receiver object is equivalent to the argument; false
otherwise.
Is this block the start block of an exception handler?
Is this block the start block of an exception handler?
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
Apply a function to all the instructions of the block.
return the underlying array of instructions
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
Does this block have the given flag?
The hashCode method for reference types.
The hashCode method for reference types. See hashCode in scala.Any.
the hash code value for this object.
When set, the emit
methods will be ignored.
Return the index of inst.
Return the index of inst. Uses reference equality. Returns -1 if not found.
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.
Return an iterator over the instructions in this basic block.
if cond is true, closes this block, entersIgnoreMode, and removes the block from its list of blocks.
if cond is true, closes this block, entersIgnoreMode, and removes the block from its list of blocks. Used to allow a block to be started and then cancelled when it is discovered to be unreachable.
Same as killIf but with the logic of the condition reversed
Return the last instruction of this basic block.
The number of instructions in this basic block so far.
Is this block the head of a while?
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
Returns the predecessors of this block.
Returns the predecessors of this block.
Cached predecessors.
Removes instructions found at the given positions.
Remove the last instruction of this basic block.
Remove the last instruction of this basic block. It is fast for an open block, but slower when the block is closed.
Replaces oldInstr
with is
.
Replaces oldInstr
with is
. It does not update
the position field in the newly inserted instructions, so it behaves
differently than the one-instruction versions of this function.
Replace the given instruction with the new one.
Replace the given instruction with the new one.
Returns true
if it actually changed something.
The replacing instruction is given the nsc.util.Position of the instruction it replaces.
Replace the instruction at the given position.
Replace the instruction at the given position. Used by labels when they are anchored. The replacing instruction is given the nsc.util.Position of the instruction it replaces.
Replaces all instructions found in the map.
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.
Has this basic block been modified since the last call to 'successors'?
Local variables that are in scope at entry of this basic block.
Local variables that are in scope at entry of this basic block. Used for debugging information.
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).