scala.tools.nsc.backend.icode.Opcodes

# opcodes

###
Related Doc: package Opcodes

#### object opcodes

Source
  Opcodes.scala

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. opcodes
2. AnyRef
3. Any

1. Hide All
2. Show all

Visibility

1. Public
2. All

### Type Members

1. #### case class BOX (boxType: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

2. #### case class CALL_METHOD (method: Global.Symbol, style: InvokeStyle) extends ICodes.Instruction with ReferenceEquality with Product with Serializable

   This class represents a CALL_METHOD instruction STYLE: dynamic / static(StaticInstance) Stack: ...:ref:arg1:arg2:...:argn ->: ...:result

   This class represents a CALL_METHOD instruction STYLE: dynamic / static(StaticInstance) Stack: ...:ref:arg1:arg2:...:argn ->: ...:result

   STYLE: static(StaticClass) Stack: ...:arg1:arg2:...:argn ->: ...:result

3. #### case class CALL_PRIMITIVE (primitive: ICodes.Primitive) extends ICodes.Instruction with Product with Serializable

   Call a primitive function.

   Call a primitive function. Stack: ...:arg1:arg2:...:argn ->: ...:result

4. #### case class CHECK_CAST (typ: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

   This class represents a CHECK_CAST instruction Stack: ...:ref(oldtype) ->: ...:ref(typ <=: oldtype)

5. #### case class CJUMP (successBlock: ICodes.BasicBlock, failureBlock: ICodes.BasicBlock, cond: ICodes.TestOp, kind: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

   This class represents a CJUMP instruction It compares the two values on the stack with the 'cond' test operator Stack: ...:value1:value2 ->: ...

6. #### case class CONSTANT (constant: Global.Constant) extends ICodes.Instruction with Product with Serializable

   Loads a constant on the stack.

   Loads a constant on the stack. Stack: ... ->: ...:constant

7. #### case class CREATE_ARRAY (elem: ICodes.TypeKind, dims: Int) extends ICodes.Instruction with Product with Serializable

   This class represents a CREATE_ARRAY instruction Stack: ...:size_1:size_2:..:size_n ->: ...:arrayref

8. #### case class CZJUMP (successBlock: ICodes.BasicBlock, failureBlock: ICodes.BasicBlock, cond: ICodes.TestOp, kind: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

   This class represents a CZJUMP instruction It compares the one value on the stack and zero with the 'cond' test operator Stack: ...:value: ->: ...

9. #### case class DROP (typ: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

   This class represents a DROP instruction Stack: ...:something ->: ...

10. #### case class DUP (typ: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

    This class represents a DUP instruction Stack: ...:something ->: ...:something:something

11. #### case class INVOKE_DYNAMIC (poolEntry: Int) extends ICodes.Instruction with Product with Serializable

    A place holder entry that allows us to parse class files with invoke dynamic instructions.

    A place holder entry that allows us to parse class files with invoke dynamic instructions. Because the compiler doesn't yet really understand the behavior of invokeDynamic, this op acts as a poison pill. Any attempt to analyze this instruction will cause a failure. The only optimization that should ever look at non-Scala generated icode is the inliner, and it has been modified to not examine any method with invokeDynamic instructions. So if this poison pill ever causes problems then there's been a serious misunderstanding

12. #### case class IS_INSTANCE (typ: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

    This class represents a IS_INSTANCE instruction Stack: ...:ref ->: ...:result(boolean)

13. #### sealed abstract class InvokeStyle extends AnyRef

    This class represents a method invocation style.

14. #### case class JUMP (whereto: ICodes.BasicBlock) extends ICodes.Instruction with Product with Serializable

    This class represents a JUMP instruction Stack: ...

    This class represents a JUMP instruction Stack: ... ->: ...

15. #### case class LOAD_ARRAY_ITEM (kind: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

    Loads an element of an array.

    Loads an element of an array. The array and the index should be on top of the stack. Stack: ...:array[a](Ref):index(Int) ->: ...:element(a)

16. #### case class LOAD_EXCEPTION (clasz: Global.Symbol) extends ICodes.Instruction with Product with Serializable

    Fake instruction.

    Fake instruction. It designates the VM who pushes an exception on top of the /empty/ stack at the beginning of each exception handler. Note: Unlike other instructions, it consumes all elements on the stack! then pushes one exception instance.

17. #### case class LOAD_FIELD (field: Global.Symbol, isStatic: Boolean) extends ICodes.Instruction with Product with Serializable

    Load a field on the stack.

    Load a field on the stack. The object to which it refers should be on the stack. Stack: ...:ref (assuming isStatic = false) ->: ...:value

18. #### case class LOAD_LOCAL (local: ICodes.Local) extends ICodes.Instruction with Product with Serializable

    Load a local variable on the stack.

    Load a local variable on the stack. It can be a method argument. Stack: ... ->: ...:value

19. #### case class LOAD_MODULE (module: Global.Symbol) extends ICodes.Instruction with Product with Serializable

20. #### case class MONITOR_ENTER () extends ICodes.Instruction with Product with Serializable

    This class represents a MONITOR_ENTER instruction Stack: ...:object(ref) ->: ...:

21. #### case class MONITOR_EXIT () extends ICodes.Instruction with Product with Serializable

    This class represents a MONITOR_EXIT instruction Stack: ...:object(ref) ->: ...:

22. #### case class NEW (kind: ICodes.REFERENCE) extends ICodes.Instruction with Product with Serializable

    Create a new instance of a class through the specified constructor Stack: ...:arg1:arg2:...:argn ->: ...:ref

23. #### case class RETURN (kind: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

    This class represents a RETURN instruction Stack: ...

    This class represents a RETURN instruction Stack: ... ->: ...

24. #### case class SCOPE_ENTER (lv: ICodes.Local) extends ICodes.Instruction with Product with Serializable

    A local variable becomes visible at this point in code.

    A local variable becomes visible at this point in code. Used only for generating precise local variable tables as debugging information.

25. #### case class SCOPE_EXIT (lv: ICodes.Local) extends ICodes.Instruction with Product with Serializable

    A local variable leaves its scope at this point in code.

    A local variable leaves its scope at this point in code. Used only for generating precise local variable tables as debugging information.

26. #### case class STORE_ARRAY_ITEM (kind: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

    Store a value into an array at a specified index.

    Store a value into an array at a specified index. Stack: ...:array[a](Ref):index(Int):value(a) ->: ...

27. #### case class STORE_FIELD (field: Global.Symbol, isStatic: Boolean) extends ICodes.Instruction with Product with Serializable

    Store a value into a field.

    Store a value into a field. Stack: ...:ref:value (assuming isStatic=false) ->: ...

28. #### case class STORE_LOCAL (local: ICodes.Local) extends ICodes.Instruction with Product with Serializable

    Store a value into a local variable.

    Store a value into a local variable. It can be an argument. Stack: ...:value ->: ...

29. #### case class STORE_THIS (kind: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

    Store a value into the 'this' pointer.

    Store a value into the 'this' pointer. Stack: ...:ref ->: ...

30. #### case class SWITCH (tags: List[List[Int]], labels: List[ICodes.BasicBlock]) extends ICodes.Instruction with Product with Serializable

    This class represents a SWITCH instruction Stack: ...:index(int) ->: ...:

    This class represents a SWITCH instruction Stack: ...:index(int) ->: ...:

    The tags array contains one entry per label, each entry consisting of an array of ints, any of which will trigger the jump to the corresponding label. labels should contain an extra label, which is the 'default' jump.

31. #### case class Static (onInstance: Boolean) extends InvokeStyle with Product with Serializable

    Special invoke: Static(true) is used for calls to private members, ie `invokespecial` on JVM.

    Special invoke: Static(true) is used for calls to private members, ie `invokespecial` on JVM. Static(false) is used for calls to class-level instance-less static methods, ie `invokestatic` on JVM.

32. #### case class SuperCall (mix: Global.Name) extends InvokeStyle with Product with Serializable

    Call through super[mix].

    Call through super[mix]. On JVM, translated to `invokespecial`.

33. #### case class THIS (clasz: Global.Symbol) extends ICodes.Instruction with Product with Serializable

    Loads "this" on top of the stack.

    Loads "this" on top of the stack. Stack: ... ->: ...:ref

34. #### case class THROW (clasz: Global.Symbol) extends ICodes.Instruction with Product with Serializable

    This class represents a THROW instruction Stack: ...:Throwable(Ref) ->: ...:

35. #### case class UNBOX (boxType: ICodes.TypeKind) extends ICodes.Instruction with Product with Serializable

### Value Members

1. #### final def !=(arg0: Any): Boolean

   Test two objects for inequality.

   Test two objects for inequality.

   returns

     `true` if !(this == that), false otherwise.

   Definition Classes
     AnyRef → Any

2. #### final def ##(): Int

   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`.

   returns

     a hash value consistent with ==

   Definition Classes
     AnyRef → Any

3. #### final def ==(arg0: Any): Boolean

   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)`.

   arg0

     the object to compare against this object for equality.

   returns

     `true` if the receiver object is equivalent to the argument; `false` otherwise.

   Definition Classes
     AnyRef → Any

4. #### object Dynamic extends InvokeStyle with Product with Serializable

   Virtual calls.

   Virtual calls. On JVM, translated to either `invokeinterface` or `invokevirtual`.

5. #### final def asInstanceOf[T0]: T0

   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.

   returns

     the receiver object.

   Definition Classes
     Any
   Exceptions thrown

     `ClassCastException` if the receiver object is not an instance of the erasure of type `T0`.

6. #### def clone(): AnyRef

   Create a copy of the receiver object.

   Create a copy of the receiver object.

   The default implementation of the `clone` method is platform dependent.

   returns

     a copy of the receiver object.

   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )
   Note

     not specified by SLS as a member of AnyRef

7. #### final def eq(arg0: AnyRef): Boolean

   Tests whether the argument (`arg0`) is a reference to the receiver object (`this`).

   Tests whether the argument (`arg0`) 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:

   - It is consistent: for any non-null instances `x` and `y` of type `AnyRef`, multiple invocations of `x.eq(y)` consistently returns `true` or consistently returns `false`.
   - For any non-null instance `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`).

   returns

     `true` if the argument is a reference to the receiver object; `false` otherwise.

   Definition Classes
     AnyRef

8. #### def equals(arg0: Any): Boolean

   The equality method for reference types.

   The equality method for reference types. Default implementation delegates to `eq`.

   See also `equals` in scala.Any.

   returns

     `true` if the receiver object is equivalent to the argument; `false` otherwise.

   Definition Classes
     AnyRef → Any

9. #### def finalize(): Unit

   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.

   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( classOf[java.lang.Throwable] )
   Note

     not specified by SLS as a member of AnyRef

10. #### final def getClass(): Class[_]

    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.

    returns

      a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
      AnyRef → Any
    Note

      not specified by SLS as a member of AnyRef

11. #### def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

      the hash code value for this object.

    Definition Classes
      AnyRef → Any

12. #### final def isInstanceOf[T0]: Boolean

    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.

    returns

      `true` if the receiver object is an instance of erasure of type `T0`; `false` otherwise.

    Definition Classes
      Any

13. #### final def ne(arg0: AnyRef): Boolean

    Equivalent to `!(this eq that)`.

    Equivalent to `!(this eq that)`.

    returns

      `true` if the argument is not a reference to the receiver object; `false` otherwise.

    Definition Classes
      AnyRef

14. #### final def notify(): Unit

    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.

    Definition Classes
      AnyRef
    Note

      not specified by SLS as a member of AnyRef

15. #### final def notifyAll(): Unit

    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.

    Definition Classes
      AnyRef
    Note

      not specified by SLS as a member of AnyRef

16. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

17. #### def toString(): String

    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.

    returns

      a String representation of the object.

    Definition Classes
      AnyRef → Any

18. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

19. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

20. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped