class RISCTransformer extends AnyRef
Module implementing transformation from Obr to RISC tree code.
- Source
- RISCTransformer.scala
- Alphabetic
- By Inheritance
- RISCTransformer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RISCTransformer(analyser: SemanticAnalyser)
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
cblock(clause: Catch, exitlab: Label): Seq[Item]
Translate a catch block into RISC machine code.
Translate a catch block into RISC machine code. Each one simply translates to a test of the value of the current exception followed by code which executed if that test succeeds.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
code: (ObrInt) ⇒ RISCProg
The RISC machine program that is the translation of the given Obr language program, comprising the translation of the program's declarations and statements.
The RISC machine program that is the translation of the given Obr language program, comprising the translation of the program's declarations and statements. The bodies need to be computed first so that the memory size is fully computed before we generate the RISC node.
-
val
datum: (Expression) ⇒ Datum
The RISC machine datum that is the translation of the given Obr language expression.
-
val
ditems: (Declaration) ⇒ Seq[Item]
The RISC tree items that are the translation of the given Obr language declaration.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
exitlab: attribution.Attribution.CachedAttribute[ObrTree, Label]
The current label to which an EXIT statement should jump when used at the given context.
-
val
exnlab: attribution.Attribution.CachedAttribute[ObrTree, Label]
The label marking the entry point to the currently active error handler (CATCH block).
The label marking the entry point to the currently active error handler (CATCH block). Defaults to a global handler outside of all TRY...CATCH blocks
Notice that since this version of Obr has no procedures, the currently active exception handler can be determined completely statically.
-
val
exnlabOuter: (ObrTree) ⇒ Label
The exception label for the context outside the current Try statement.
The exception label for the context outside the current Try statement. Only valid when used inside a Try statement.
-
val
exnloc: Address
A location reserved for storing the exception value associated with a raised exception.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
genlabel(): Label
Generate a brand new target label.
Generate a brand new target label. Shares counter with the encoding phase so that labels are unique.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
location(n: EntityTree): Address
Return the address for the location of the entity represented by a given node.
-
def
locn(e: Entity): Int
Get the location of an entity.
Get the location of an entity. Only valid for variables, but defined on all entities.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
sitems: (Statement) ⇒ Seq[Item]
The RISC tree items that are the translation of the given Obr language statement.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
tempintloc: Address
A location reserved for storing temporary integer values while they are checked for possible division by zero or index out of bounds errors.
-
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( ... )