scala.tools.nsc.backend.icode.BasicBlocks

BasicBlock

class BasicBlock extends ProgramPoint[ICodes.BasicBlock]

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

Self Type
ICodes.BasicBlock
Source
BasicBlocks.scala
Linear Supertypes
ProgramPoint[ICodes.BasicBlock], AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BasicBlock
  2. ProgramPoint
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BasicBlock(label: Int, method: ICodes.IMethod)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (ICodes.BasicBlock, B)

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to ArrowAssoc[ICodes.BasicBlock] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def apply(n: Int): ICodes.Instruction

    Return the n-th instruction.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def blockContents: String

  11. def clear(): Unit

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def close(): Unit

    Close the block

  14. def closeWith(instr: ICodes.Instruction, pos: Position): Unit

  15. def closeWith(instr: ICodes.Instruction): Unit

    do nothing if block is already closed

  16. def closed: Boolean

    Is this block closed?

  17. def closed_=(b: Boolean): Unit

  18. def code: ICodes.Code

  19. def directSuccessors: List[ICodes.BasicBlock]

  20. def emit(is: Seq[ICodes.Instruction]): Unit

  21. def emit(instr: ICodes.Instruction, pos: Position): Unit

    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.

  22. def emit(instr: ICodes.Instruction): Unit

    Add a new instruction at the end of the block, using the same source position as the last emitted instruction

  23. def emitOnly(is: ICodes.Instruction*): Unit

    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.

  24. def ensuring(cond: (ICodes.BasicBlock) ⇒ Boolean, msg: ⇒ Any): ICodes.BasicBlock

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to Ensuring[ICodes.BasicBlock] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. def ensuring(cond: (ICodes.BasicBlock) ⇒ Boolean): ICodes.BasicBlock

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to Ensuring[ICodes.BasicBlock] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  26. def ensuring(cond: Boolean, msg: ⇒ Any): ICodes.BasicBlock

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to Ensuring[ICodes.BasicBlock] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. def ensuring(cond: Boolean): ICodes.BasicBlock

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to Ensuring[ICodes.BasicBlock] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def enterIgnoreMode(): Unit

    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.

  29. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. def equals(other: Any): Boolean

    Definition Classes
    BasicBlock → AnyRef → Any
  31. def exceptionHandlerStart: Boolean

    Is this block the start block of an exception handler?

    Is this block the start block of an exception handler?

    Definition Classes
    BasicBlockProgramPoint
  32. def exceptionHandlerStart_=(b: Boolean): Unit

  33. def exceptionSuccessors: List[ICodes.BasicBlock]

  34. def exceptionSuccessorsForBlock(block: ICodes.BasicBlock): List[ICodes.BasicBlock]

  35. def exitIgnoreMode(): Unit

  36. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. def firstInstruction: ICodes.Instruction

  38. def flagsString: String

  39. final def foreach[U](f: (ICodes.Instruction) ⇒ U): Unit

    Apply a function to all the instructions of the block.

  40. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  41. def fromList(is: List[ICodes.Instruction]): Unit

  42. def fullString: String

  43. def getArray: Array[ICodes.Instruction]

    return the underlying array of instructions

  44. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  45. def hasFlag(flag: Int): Boolean

    Does this block have the given flag?

  46. def hashCode(): Int

    Definition Classes
    BasicBlock → AnyRef → Any
  47. def ignore: Boolean

    When set, the emit methods will be ignored.

  48. def ignore_=(b: Boolean): Unit

  49. def indexOf(inst: ICodes.Instruction): Int

    Return the index of inst.

    Return the index of inst. Uses reference equality. Returns -1 if not found.

  50. def insertAfter(idx: Int, is: List[ICodes.Instruction]): Unit

    Insert instructions in 'is' immediately after index 'idx'.

  51. final def isEmpty: Boolean

  52. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  53. def iterator: Iterator[ICodes.Instruction]

    Return an iterator over the instructions in this basic block.

  54. val label: Int

  55. def lastInstruction: ICodes.Instruction

    Return the last instruction of this basic block.

  56. def length: Int

    The number of instructions in this basic block so far.

  57. def loopHeader: Boolean

    Is this block the head of a while?

  58. def loopHeader_=(b: Boolean): Unit

  59. val method: ICodes.IMethod

  60. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  61. final def nonEmpty: Boolean

  62. final def notify(): Unit

    Definition Classes
    AnyRef
  63. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  64. def open(): Unit

  65. def predContents: String

  66. def predecessors: List[ICodes.BasicBlock]

    Returns the predecessors of this block.

    Returns the predecessors of this block.

    Definition Classes
    BasicBlockProgramPoint
  67. var preds: List[ICodes.BasicBlock]

    Cached predecessors.

  68. def print(out: PrintStream): Unit

  69. def print(): Unit

  70. def removeInstructionsAt(positions: Int*): Unit

    Removes instructions found at the given positions.

    Removes instructions found at the given positions.

    positions

    ...

  71. def removeLastInstruction(): Unit

    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.

  72. def replaceInstruction(oldInstr: ICodes.Instruction, is: List[ICodes.Instruction]): Boolean

    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.

    is

    ..

    returns

    ..

  73. def replaceInstruction(oldInstr: ICodes.Instruction, newInstr: ICodes.Instruction): Boolean

    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.

  74. def replaceInstruction(pos: Int, instr: ICodes.Instruction): Boolean

    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.

  75. def size: Int

  76. def subst(map: Map[ICodes.Instruction, ICodes.Instruction]): Unit

    Replaces all instructions found in the map.

    Replaces all instructions found in the map.

    map

    ...

  77. def succContents: String

  78. def successors: List[ICodes.BasicBlock]

    Definition Classes
    BasicBlockProgramPoint
  79. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  80. def take(n: Int): Seq[ICodes.Instruction]

  81. def toList: List[ICodes.Instruction]

  82. def toString(): String

    Definition Classes
    BasicBlock → AnyRef → Any
  83. def touched: Boolean

    Has this basic block been modified since the last call to 'successors'?

  84. def touched_=(b: Boolean): Unit

  85. val varsInScope: Set[ICodes.Local]

    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.

  86. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  87. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  88. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  89. def [B](y: B): (ICodes.BasicBlock, B)

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to ArrowAssoc[ICodes.BasicBlock] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (basicBlock: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (basicBlock: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: ICodes.BasicBlock

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to ArrowAssoc[ICodes.BasicBlock] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (basicBlock: ArrowAssoc[ICodes.BasicBlock]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: ICodes.BasicBlock

    Implicit information
    This member is added by an implicit conversion from ICodes.BasicBlock to Ensuring[ICodes.BasicBlock] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (basicBlock: Ensuring[ICodes.BasicBlock]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from ProgramPoint[ICodes.BasicBlock]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ICodes.BasicBlock to StringAdd

Inherited by implicit conversion any2stringfmt from ICodes.BasicBlock to StringFormat

Inherited by implicit conversion any2ArrowAssoc from ICodes.BasicBlock to ArrowAssoc[ICodes.BasicBlock]

Inherited by implicit conversion any2Ensuring from ICodes.BasicBlock to Ensuring[ICodes.BasicBlock]

Ungrouped