comp
Class BlockNode

java.lang.Object
  |
  +--comp.Node
        |
        +--comp.BlockNode

class BlockNode
extends Node

A sequence of statements.


Field Summary
 
Fields inherited from class comp.Node
asm, globalScope, labelCount, strings
 
Constructor Summary
(package private) BlockNode()
           
 
Method Summary
 void add(Node n)
          Add a statement to the end of this block.
 void addDefs(Scope s)
          Add any variable definitions made by this node to the given scope.
 void asHTML(java.io.PrintStream out)
          Process each of the body statements.
 java.lang.String codeGen(Scope scope, RegBank bank)
          Just codeGen each statement I contain.
 java.util.Iterator getStatements()
          Answer an iterator for the statements.
 java.lang.String toString()
           
 
Methods inherited from class comp.Node
addString, getLabel, lvalue, reset, rvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockNode

BlockNode()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

codeGen

public java.lang.String codeGen(Scope scope,
                                RegBank bank)
Just codeGen each statement I contain.

Specified by:
codeGen in class Node

add

public void add(Node n)
Add a statement to the end of this block.


getStatements

public java.util.Iterator getStatements()
Answer an iterator for the statements.


addDefs

public void addDefs(Scope s)
Description copied from class: Node
Add any variable definitions made by this node to the given scope.

Overrides:
addDefs in class Node

asHTML

public void asHTML(java.io.PrintStream out)
Process each of the body statements.

Specified by:
asHTML in class Node