object JVMTree
Module containing tree structures for representing JVM programs. Not all features of the JVM are expressible with this representation.
- Source
- JVMTree.scala
- Alphabetic
- By Inheritance
- JVMTree
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
Aload
(loc: Int) extends JVMInstr with Product with Serializable
JVM instructions.
JVM instructions. See JVM documentation for descriptions.
This list does not include all available instructions. To add a new one, just add it as a case class whose name is the instruction name with at least a starting capital letter.
The arguments of the case class should be the instruction operands in the order in which they must appear in an instruction instance.
The
stackChangevalue must be the net change in stack elements when an instance of this instruction runs. E.g., zero means there is no change, whereas a stack change of one means that there is one more element on the operand stack after the instruction has executed than there is before. - case class Areturn () extends JVMInstr with Product with Serializable
- case class ArrayLength () extends JVMInstr with Product with Serializable
- case class Astore (loc: Int) extends JVMInstr with Product with Serializable
- case class Bipush (num: Int) extends JVMInstr with Product with Serializable
-
case class
ClassFile
(source: String, name: String, superclassname: String, fields: Seq[JVMField], methods: Seq[JVMMethod]) extends Product with Serializable
A class file defining a JVM class.
A class file defining a JVM class.
sourcegives the name of the source file from which this class file comes.namegives the name of the class that is being defined, andsuperClassis the name of the super class of this class.fieldsandmethodsdefine the components of the class. - case class Dup () extends JVMInstr with Product with Serializable
- case class GetField (name: String, tipe: JVMType) extends JVMInstr with Product with Serializable
- case class GetStatic (name: String, tipe: JVMType) extends JVMInstr with Product with Serializable
- case class Goto (label: String) extends JVMInstr with Product with Serializable
- case class Iadd () extends JVMInstr with Product with Serializable
- case class Iaload () extends JVMInstr with Product with Serializable
- case class Iastore () extends JVMInstr with Product with Serializable
- case class Iconst_0 () extends JVMInstr with Product with Serializable
- case class Iconst_1 () extends JVMInstr with Product with Serializable
- case class Iconst_2 () extends JVMInstr with Product with Serializable
- case class Iconst_3 () extends JVMInstr with Product with Serializable
- case class Iconst_4 () extends JVMInstr with Product with Serializable
- case class Iconst_5 () extends JVMInstr with Product with Serializable
- case class Iconst_m1 () extends JVMInstr with Product with Serializable
- case class If_icmpge (label: String) extends JVMInstr with Product with Serializable
- case class Ifeq (label: String) extends JVMInstr with Product with Serializable
- case class Ifne (label: String) extends JVMInstr with Product with Serializable
- case class Iload (loc: Int) extends JVMInstr with Product with Serializable
- case class Imul () extends JVMInstr with Product with Serializable
- case class InvokeSpecial (spec: JVMMethodSpec) extends JVMInstr with Product with Serializable
- case class InvokeVirtual (spec: JVMMethodSpec) extends JVMInstr with Product with Serializable
- case class Ireturn () extends JVMInstr with Product with Serializable
- case class Istore (loc: Int) extends JVMInstr with Product with Serializable
- case class Isub () extends JVMInstr with Product with Serializable
-
case class
JVMArrayType
(elemType: JVMType) extends JVMType with Product with Serializable
A JVM array with the given element type.
-
case class
JVMBooleanType
() extends JVMType with Product with Serializable
The Boolean type.
-
case class
JVMClassType
(name: String) extends JVMType with Product with Serializable
A class type.
-
case class
JVMField
(name: String, tipe: JVMType) extends Product with Serializable
A field in the class.
-
sealed abstract
class
JVMInstr
extends Product
Base class for JVM instructions.
Base class for JVM instructions.
stackChangerecords the number of elements by which the stack changes after execution of an instruction of this type. Thus, zero means no change, a positive value means an increase in stack size, and a negative value means a decrease in stack size. -
case class
JVMIntType
() extends JVMType with Product with Serializable
The integer type.
-
case class
JVMMethod
(spec: JVMMethodSpec, isStatic: Boolean, instrs: Seq[JVMInstr]) extends Product with Serializable
A method in the class.
-
case class
JVMMethodSpec
(name: String, argTypes: Seq[JVMType], retType: JVMType) extends Product with Serializable
A method specification.
-
case class
JVMStringType
() extends JVMType with Product with Serializable
The string type.
-
sealed abstract
class
JVMType
extends AnyRef
Base class for JVM types.
-
case class
JVMVoidType
() extends JVMType with Product with Serializable
The void type.
-
case class
Label
(label: String) extends JVMInstr with Product with Serializable
A special instruction to mark the position of a label.
A special instruction to mark the position of a label. These will be output symbolically by the compiler but then replaced with offsets by the assembler.
- case class Ldc (num: Int) extends JVMInstr with Product with Serializable
- case class New (className: String) extends JVMInstr with Product with Serializable
- case class NewArray (elemtype: String) extends JVMInstr with Product with Serializable
- case class PutField (name: String, tipe: JVMType) extends JVMInstr with Product with Serializable
- case class Return () extends JVMInstr with Product with Serializable
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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( ... )