case class FunctionContext(labels: LabelStack, errata: List[(Target, (Int) => Unit)], offsets: Map[Target, Int], offset: Int, nxt: Int) extends Product with Serializable
Compilation context used when compiling instructions for a function. The label stack represents the static trace of the program so far in terms of stack modifications, the errata registers the label to fix later, and the jump label offsets. This allows to compile code in one pass even with forward jumps.
The errata
lists how to set correct offset for target labels.
The offsets
maps label names to their offset.
Once all code has been generated, the placeholders pointed by the errata
map are replaced with real offsets from the offsets
map.
- Source
- Compiler.scala
- Alphabetic
- By Inheritance
- FunctionContext
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new FunctionContext(labels: LabelStack, errata: List[(Target, (Int) => Unit)], offsets: Map[Target, Int], offset: Int, nxt: Int)
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[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val errata: List[(Target, (Int) => Unit)]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isToplevel: Boolean
- Annotations
- @inline()
- val labels: LabelStack
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val nxt: Int
- val offset: Int
- val offsets: Map[Target, Int]
- def pop(n: Int): FunctionContext
- Annotations
- @inline()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def push(n: Int): FunctionContext
- Annotations
- @inline()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.