Translate
Class Exp.Nx

java.lang.Object
  extended by Translate.Exp
      extended by Translate.Exp.Nx
Enclosing class:
Exp

public static class Exp.Nx
extends Exp

A wrapper for tree code statements that have side-effects.


Nested Class Summary
 
Nested classes/interfaces inherited from class Translate.Exp
Exp.Cx, Exp.Ex, Exp.Nx
 
Constructor Summary
Exp.Nx(Tree.Stm s)
          Wrap and return a tree code statement.
 
Method Summary
 Tree.Stm unCx(Temp.Label t, Temp.Label f)
          Unwrap this expression, to obtain code that causes transfer of control based on the Boolean value of the expression.
 Tree.Exp unEx()
          Unwrap this expression, to obtain tree code that computes a value.
 Tree.Stm unNx()
          Unwrap this expression, to obtain tree code that should be executed only for its side-effects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exp.Nx

public Exp.Nx(Tree.Stm s)
Wrap and return a tree code statement.

Parameters:
s - the wrapped tree code statement
Method Detail

unEx

public Tree.Exp unEx()
Description copied from class: Exp
Unwrap this expression, to obtain tree code that computes a value.

Specified by:
unEx in class Exp
Returns:
the tree code that computes the value

unNx

public Tree.Stm unNx()
Description copied from class: Exp
Unwrap this expression, to obtain tree code that should be executed only for its side-effects.

Specified by:
unNx in class Exp
Returns:
the tree code to be executed for its side-effects

unCx

public Tree.Stm unCx(Temp.Label t,
                     Temp.Label f)
Description copied from class: Exp
Unwrap this expression, to obtain code that causes transfer of control based on the Boolean value of the expression.

Specified by:
unCx in class Exp
Parameters:
t - label to branch to on true
f - label to branch to on false
Returns:
the tree code to evaluate the expression and effect the transfer of control.