comp
Class ReturnNode

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

class ReturnNode
extends Node

Return a value from a function.


Field Summary
(package private)  ExprNode expr
           
 
Fields inherited from class comp.Node
asm, globalScope, labelCount, strings
 
Constructor Summary
ReturnNode(ExprNode e)
           
 
Method Summary
 void asHTML(java.io.PrintStream out)
          Process this node.
 java.lang.String codeGen(Scope scope, RegBank bank)
          Just places the value into the return register, and jumps to the function return label.
 java.lang.String toString()
           
 
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, wait, wait, wait
 

Field Detail

expr

ExprNode expr
Constructor Detail

ReturnNode

public ReturnNode(ExprNode e)
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 places the value into the return register, and jumps to the function return label.

Specified by:
codeGen in class Node

asHTML

public void asHTML(java.io.PrintStream out)
Process this node.

Specified by:
asHTML in class Node