gnu.expr

Class ClassExp

Implemented Interfaces:
Named, Printable
Known Direct Subclasses:
ObjectExp

public class ClassExp
extends LambdaExp

Field Summary

LambdaExp
clinitMethod
LambdaExp
initMethod
Expression[]
supers
List of base classes and implemented interfaces.

Fields inherited from class gnu.expr.LambdaExp

NEXT_AVAIL_FLAG, NO_FIELD, SEQUENCE_RESULT, body, closureEnvField, defaultArgs, fileFunctionName, firstChild, keywords, max_args, min_args, nameDecl, nextSibling, returnContinuation, returnType, staticLinkField

Fields inherited from class gnu.expr.ScopeExp

id, outer

Fields inherited from class gnu.expr.Expression

NEXT_AVAIL_FLAG, flags, noExpressions

Constructor Summary

ClassExp()

Method Summary

ClassType
compile(Compilation comp)
void
compile(Compilation comp, Target target)
void
compilePushClass(Compilation comp, Target target)
Field
compileSetField(Compilation comp)
void
declareParts(Compilation comp)
protected ClassType
getCompiledClassType(Compilation comp)
Return the ClassType of the Procedure this is being compiled into.
String
getJavaName()
Type
getType()
Return the Type used to represent the values of this Expression.
boolean
isMakingClassPair()
True if we should make a pair of an interface and a class.
boolean
isSimple()
void
print(OutPort out)
void
setMakingClassPair(boolean val)
void
setSimple(boolean value)
static String
slotToMethodName(String prefix, String sname)
Mangle a "slot" name to a get- or set- method name.
protected Expression
walk(ExpWalker walker)
protected void
walkChildren(ExpWalker walker)

Methods inherited from class gnu.expr.LambdaExp

allocChildClasses, allocFrame, capture, compile, compileBody, compileEnd, compileSetField, declareClosureEnv, declareThis, getCallConvention, getCaller, getCanCall, getCanRead, getCompiledClassType, getExpClassName, getHeapFrameType, getImportsLexVars, getInlineOnly, getMainMethod, getMethod, getNeedsClosureEnv, getNeedsStaticLink, getOwningLambda, getProperty, getReturnType, getType, incomingArgs, isClassGenerated, isClassMethod, isHandlingTailCalls, isModuleBody, loadHeapFrame, outerLambda, outerLambdaNotInline, print, restArgType, setCanCall, setCanRead, setClassMethod, setExceptions, setImportsLexVars, setImportsLexVars, setInlineOnly, setNeedsStaticLink, setNeedsStaticLink, setProperty, setReturnType, setType, toString, variable_args, walk, walkChildren, walkChildrenOnly, walkProperties

Methods inherited from class gnu.expr.ScopeExp

add, add, addDeclaration, addDeclaration, addDeclaration, countDecls, currentLambda, currentModule, firstDecl, getDefine, getNoDefine, getVarScope, lookup, lookup, nesting, popScope, remove, remove, replaceFollowing, toString, walk

Methods inherited from class gnu.expr.Expression

apply, apply0, compile, compile, compileNotePosition, compileWithPosition, compileWithPosition, eval, eval, getColumn, getFile, getFlag, getFlags, getLine, getType, makeWhile, match0, print, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, walk, walkChildren

Methods inherited from class gnu.mapping.Procedure0

apply0, apply1, apply2, apply3, apply4, applyN, numArgs

Methods inherited from class gnu.mapping.Procedure

apply, apply, apply0, apply1, apply2, apply3, apply4, applyN, check0, check1, check2, check3, check4, checkArgCount, checkN, getName, getProperty, getSetter, getSymbol, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, numArgs, removeProperty, set0, set1, setN, setName, setProperty, setProperty, setSetter, setSymbol, toString

Field Details

clinitMethod

public LambdaExp clinitMethod

initMethod

public LambdaExp initMethod

supers

public Expression[] supers
List of base classes and implemented interfaces.

Constructor Details

ClassExp

public ClassExp()

Method Details

compile

public ClassType compile(Compilation comp)

compile

public void compile(Compilation comp,
                    Target target)
Overrides:
compile in interface LambdaExp

compilePushClass

public void compilePushClass(Compilation comp,
                             Target target)

compileSetField

public Field compileSetField(Compilation comp)
Overrides:
compileSetField in interface LambdaExp

declareParts

public void declareParts(Compilation comp)

getCompiledClassType

protected ClassType getCompiledClassType(Compilation comp)
Return the ClassType of the Procedure this is being compiled into.
Overrides:
getCompiledClassType in interface LambdaExp

getJavaName

public String getJavaName()

getType

public Type getType()
Return the Type used to represent the values of this Expression.
Overrides:
getType in interface LambdaExp

isMakingClassPair

public boolean isMakingClassPair()
True if we should make a pair of an interface and a class.

isSimple

public boolean isSimple()

print

public void print(OutPort out)
Overrides:
print in interface LambdaExp

setMakingClassPair

public void setMakingClassPair(boolean val)

setSimple

public void setSimple(boolean value)

slotToMethodName

public static String slotToMethodName(String prefix,
                                      String sname)
Mangle a "slot" name to a get- or set- method name.
Parameters:
prefix - either "get" or "set"
sname - a "slot" (property) name. This is mangled if needed.

walk

protected Expression walk(ExpWalker walker)
Overrides:
walk in interface LambdaExp

walkChildren

protected void walkChildren(ExpWalker walker)
Overrides:
walkChildren in interface LambdaExp