comp
Class CallNode

java.lang.Object
  |
  +--comp.Node
        |
        +--comp.ExprNode
              |
              +--comp.CallNode

class CallNode
extends ExprNode

A function call. Really just bundles up an argument list.

See Also:
ArgList

Field Summary
(package private)  ArgList args
           
(package private)  java.lang.String id
           
 
Fields inherited from class comp.Node
asm, globalScope, labelCount, strings
 
Constructor Summary
CallNode(java.lang.String id, ArgList args)
           
 
Method Summary
 void asHTML(java.io.PrintStream out)
          Process the body.
 java.lang.String codeGen(Scope scope, RegBank bank)
          Do the call.
 Type getType(Scope s)
           
 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

id

java.lang.String id

args

ArgList args
Constructor Detail

CallNode

public CallNode(java.lang.String id,
                ArgList args)
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)
Do the call. Save any in-use registers, then ask the ArgList to generate parameter passing code, then do the call. After the call, shrink the stack, restore in-use registers.

Specified by:
codeGen in class Node

asHTML

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

Specified by:
asHTML in class Node

getType

public Type getType(Scope s)