comp
Class Module

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

class Module
extends Node

This is really the toplevel container node. It represents a single source file, which consists of (possibly) some global definitions and (possiblly) some function definitions.


Field Summary
(package private)  BlockNode funcDefs
           
(package private)  BlockNode globals
           
 
Fields inherited from class comp.Node
asm, globalScope, labelCount, strings
 
Constructor Summary
(package private) Module()
           
 
Method Summary
 void asHTML(java.io.PrintStream out)
          For printing the AST to HTML.
 java.lang.String codeGen(Scope scope, RegBank bank)
          Emit the data section, and then for each function defined, emit code for it.
 
Methods inherited from class comp.Node
addDefs, addString, getLabel, lvalue, reset, rvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

globals

BlockNode globals

funcDefs

BlockNode funcDefs
Constructor Detail

Module

Module()
Method Detail

codeGen

public java.lang.String codeGen(Scope scope,
                                RegBank bank)
Emit the data section, and then for each function defined, emit code for it.

Specified by:
codeGen in class Node

asHTML

public void asHTML(java.io.PrintStream out)
Description copied from class: Node
For printing the AST to HTML.

Specified by:
asHTML in class Node