com.svincent.smalljava
Class Expr.Begin

java.lang.Object
  |
  +--com.svincent.util.BaseObject
        |
        +--com.svincent.smalljava.Expr
              |
              +--com.svincent.smalljava.Expr.Begin
Enclosing class:
Expr

public static class Expr.Begin
extends Expr

Execute a series of expressions, one after another.


Inner classes inherited from class com.svincent.smalljava.Expr
Expr.Begin, Expr.BooleanConst, Expr.Call, Expr.Comment, Expr.DoubleConst, Expr.EQ, Expr.GE, Expr.GetField, Expr.GetLocal, Expr.GetStatic, Expr.GT, Expr.If, Expr.IntConst, Expr.LE, Expr.LT, Expr.Minus, Expr.NE, Expr.New, Expr.NewArray, Expr.NullConst, Expr.Plus, Expr.Return, Expr.SetArray, Expr.SetField, Expr.SetLocal, Expr.StringConst, Expr.SuperConstructor, Expr.This, Expr.While
 
Fields inherited from class com.svincent.smalljava.Expr
debugTypecheck, EmptyArray
 
Constructor Summary
Expr.Begin()
           
 
Method Summary
 Expr.Begin add(Expr e)
           
protected  SmallType deriveType(SmallMethod m)
          Actually do the work.
protected  void generateInstructions(ClassFileWriter out, VariableTable vars)
          Generate a list of JVM instructions for this expression node.
protected  boolean printTrailingSemi()
          Returns true if, after printing this expression as a statement, there should be a trailing semicolon printed.
 void writeAsJava(IndentPrintWriter out)
          Write this expression out as Java source code.
 void writeContentsAsJava(IndentPrintWriter out)
           
 
Methods inherited from class com.svincent.smalljava.Expr
evalType, getResultType, tag
 
Methods inherited from class com.svincent.util.BaseObject
dump, dump, dumpToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expr.Begin

public Expr.Begin()
Method Detail

printTrailingSemi

protected boolean printTrailingSemi()
Description copied from class: Expr
Returns true if, after printing this expression as a statement, there should be a trailing semicolon printed. Notable exceptions are {...} constructs, and ifs and whiles.
Overrides:
printTrailingSemi in class Expr

add

public Expr.Begin add(Expr e)

deriveType

protected SmallType deriveType(SmallMethod m)
                        throws SmallJavaValidationException
Description copied from class: Expr
Actually do the work. deriveType should call 'evalType' for recursion, and super.deriveType to repeat parent work. These simple rules for you and me will result in a happy world where the type returned is always cached appropriately.
Overrides:
deriveType in class Expr
Tags copied from class: Expr
See Also:
Expr.evalType(SmallMethod), Expr.getResultType()

writeAsJava

public void writeAsJava(IndentPrintWriter out)
Description copied from class: Expr
Write this expression out as Java source code.
Overrides:
writeAsJava in class Expr

writeContentsAsJava

public void writeContentsAsJava(IndentPrintWriter out)

generateInstructions

protected void generateInstructions(ClassFileWriter out,
                                    VariableTable vars)
Description copied from class: Expr
Generate a list of JVM instructions for this expression node.
Overrides:
generateInstructions in class Expr



This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/

Copyright © 1999 Shawn P. Vincent.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.