|
|||||||||
| Home >> All >> bossa >> [ syntax overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
bossa.syntax
Class Expression

java.lang.Objectbossa.syntax.Expression
- All Implemented Interfaces:
- bossa.util.Located, bossa.util.Printable
- Direct Known Subclasses:
- AssignExp, CallExp, ConstantExp, FunExp, IdentExp, IfExp, IncrementExp, LiteralArrayExp, NewArrayExp, OverloadedSymbolExp, PackageExp, StatementExp, SuperExp, SymbolExp, TupleExp
- public abstract class Expression
- extends java.lang.Object
- implements bossa.util.Located, bossa.util.Printable
- extends java.lang.Object
An expression of the Nice language. Subclasses of Expression have the 'Exp' suffix in their name.
- Version:
- $Date: 2003/12/09 15:21:05 $
| Field Summary | |
private bossa.util.Location |
location
|
static Expression[] |
noExpressions
|
protected mlsub.typing.Polytype |
type
|
| Fields inherited from interface bossa.util.Printable |
detailed, inConstraint, parsable |
| Constructor Summary | |
Expression()
|
|
| Method Summary | |
(package private) void |
checkSpecialRequirements(Expression[] arguments)
|
protected abstract gnu.expr.Expression |
compile()
Creates the bytecode expression to evaluate this Expression. |
static gnu.expr.Expression[] |
compile(Expression[] expressions)
Maps generateCode() 55 over an array of expressions. |
(package private) gnu.expr.Expression |
compileAssign(gnu.expr.Expression value)
|
(package private) abstract void |
computeType()
computes the static type of the expression |
(package private) gnu.expr.Expression |
generateCode()
Creates the bytecode expression to evaluate this Expression. |
(package private) gnu.expr.Expression |
generateCodeInCallPosition()
Creates the bytecode expression to evaluate this Expression, when it is used as a function that is immediately called. |
(package private) gnu.expr.Declaration |
getDeclaration()
|
(package private) FieldAccess |
getField()
|
(package private) FieldAccess |
getFieldAccessMethod()
|
mlsub.typing.Polytype |
getType()
|
(package private) static mlsub.typing.Polytype[] |
getType(Expression[] expressions)
Maps getType over a collection of Expressions |
boolean |
isAssignable()
|
(package private) boolean |
isFalse()
|
(package private) boolean |
isFieldAccess()
|
(package private) boolean |
isTrue()
|
(package private) boolean |
isZero()
|
bossa.util.Location |
location()
|
(package private) Expression |
noOverloading()
No overloading information is known, just checks there is only one alternative. |
(package private) Expression |
resolveOverloading(CallExp callExp)
Resolves overloading, taking into account the parameters the expressions is applied to. |
(package private) Expression |
resolveOverloading(mlsub.typing.Polytype expectedType)
Resolve overloading, assuming that this expression should have some Type. |
void |
setLocation(bossa.util.Location l)
Locations |
(package private) gnu.bytecode.ClassType |
staticClass()
|
(package private) static Expression[] |
toArray(java.util.List expressions)
|
java.lang.String |
toString(int param)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
noExpressions
public static final Expression[] noExpressions
location
private bossa.util.Location location
type
protected mlsub.typing.Polytype type
| Constructor Detail |
Expression
public Expression()
| Method Detail |
toArray
static final Expression[] toArray(java.util.List expressions)
isAssignable
public boolean isAssignable()
isFieldAccess
final boolean isFieldAccess()
getFieldAccessMethod
FieldAccess getFieldAccessMethod()
getField
FieldAccess getField()
staticClass
gnu.bytecode.ClassType staticClass()
isZero
boolean isZero()
isFalse
boolean isFalse()
isTrue
boolean isTrue()
resolveOverloading
Expression resolveOverloading(CallExp callExp)
- Resolves overloading, taking into account the parameters
the expressions is applied to.
resolveOverloading
Expression resolveOverloading(mlsub.typing.Polytype expectedType)
- Resolve overloading, assuming that this expression
should have some Type.
noOverloading
Expression noOverloading()
- No overloading information is known,
just checks there is only one alternative.
computeType
abstract void computeType()
- computes the static type of the expression
getType
public mlsub.typing.Polytype getType()
getType
static mlsub.typing.Polytype[] getType(Expression[] expressions)
- Maps getType over a collection of Expressions
checkSpecialRequirements
void checkSpecialRequirements(Expression[] arguments)
compile
protected abstract gnu.expr.Expression compile()
- Creates the bytecode expression to evaluate this Expression.
This must be overrided in any Expression, but not called directly.
Call
generateCode()55 instead.
generateCode
final gnu.expr.Expression generateCode()
- Creates the bytecode expression to evaluate this Expression.
generateCodeInCallPosition
gnu.expr.Expression generateCodeInCallPosition()
- Creates the bytecode expression to evaluate this Expression,
when it is used as a function that is immediately called.
compile
public static gnu.expr.Expression[] compile(Expression[] expressions)
- Maps
generateCode()55 over an array of expressions.
getDeclaration
gnu.expr.Declaration getDeclaration()
compileAssign
gnu.expr.Expression compileAssign(gnu.expr.Expression value)
setLocation
public void setLocation(bossa.util.Location l)
- Locations
location
public final bossa.util.Location location()
- Specified by:
locationin interfacebossa.util.Located
toString
public java.lang.String toString(int param)
- Specified by:
toStringin interfacebossa.util.Printable
|
|||||||||
| Home >> All >> bossa >> [ syntax overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
bossa.syntax.Expression