LambdaExp.Closure
SourceLocator.Simple
Modifier and Type | Field and Description |
---|---|
static int |
CLASS_SPECIFIED |
java.lang.String |
classNameSpecifier |
LambdaExp |
clinitMethod
An artificial method named
"$clinit$" for evaluating
static initializations. |
static int |
HAS_SUBCLASS |
LambdaExp |
initMethod
An artificial method named
"$finit$" for evaluating
non-static initializations. |
static int |
INTERFACE_SPECIFIED |
static int |
IS_ABSTRACT |
static int |
IS_PACKAGE_MEMBER
True if the resulting class(es) are *not* member/inner classes.
|
int |
superClassIndex
Index in supers array of class we extend, or -1.
|
Expression[] |
supers
List of base classes and implemented interfaces.
|
ALLOW_OTHER_KEYWORDS, applyToConsumer, ATTEMPT_INLINE, body, CLOSURE_ENV_NAME, closureEnvField, firstChild, HAS_NONTRIVIAL_DEFAULT, HAS_NONTRIVIAL_PATTERN, IN_EXPWALKER, inlineHome, keywords, max_args, min_args, nameDecl, NEXT_AVAIL_FLAG, nextSibling, NO_FIELD, opt_args, OVERLOADABLE_FIELD, PASSES_TAILCALLS, PUBLIC_METHOD, returnContinuation, returnType, SEQUENCE_RESULT, staticLinkField
applyMethodExpression, flags, noExpressions, type, VALIDATED
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
nameKey
Constructor and Description |
---|
ClassExp(boolean simple,
ClassType type) |
Modifier and Type | Method and Description |
---|---|
Declaration |
addMethod(LambdaExp lexp,
java.lang.Object mname) |
protected Type |
calculateType()
The ClassType generated for this class.
|
void |
compile(Compilation comp,
Target target) |
ClassType |
compileMembers(Compilation comp) |
void |
compilePushClass(Compilation comp,
Target target) |
Field |
compileSetField(Compilation comp) |
void |
createFields(Compilation comp)
Create a Field in the instanceClass for each declared field.
|
void |
declareParts(Compilation comp) |
protected Method |
findMethodForBridge(java.lang.String mname,
Type[] ptypes,
Type rtype)
Finds a like-named method suitable for bridging the given
arg/return types (i.e.
|
void |
generateBridgeMethod(Compilation comp,
Method src_method,
Type[] bridge_arg_types,
Type bridge_return_type)
Given an existing method and a desired bridge method signature,
generates an appropriate bridge method.
|
java.lang.String |
getClassName(Compilation comp) |
ClassType |
getClassType()
The ClassType generated for this class.
|
protected ClassType |
getCompiledClassType(Compilation comp)
Return the ClassType of the Procedure this is being compiled into.
|
boolean |
isAbstract() |
boolean |
isMakingClassPair()
True if we should make a pair of an interface and a class.
|
boolean |
isSimple() |
protected boolean |
mustCompile() |
void |
print(gnu.kawa.io.OutPort out) |
void |
setClassType(ClassType type) |
void |
setTypes(Compilation comp) |
static java.lang.String |
slotToMethodName(java.lang.String prefix,
java.lang.String sname)
Mangle a "slot" name to a get- or set- method name.
|
protected <R,D> R |
visit(ExpVisitor<R,D> visitor,
D d) |
protected <R,D> void |
visitChildren(ExpVisitor<R,D> visitor,
D d) |
addParameter, allocChildClasses, allocFrame, apply, capture, checkForInitCall, compileBody, compileEnd, declareClosureEnv, declareThis, generateApplyMethods, getBodyFirstExpression, getCallConvention, getCaller, getCanRead, getExpClassName, getHeapFrameType, getImportsLexVars, getInlineOnly, getMainMethod, getMethod, getNeedsClosureEnv, getNeedsStaticLink, getOwningLambda, getProperty, getReturnType, incomingArgs, inlinedInCallerOrCheckMethodOnly, inlinedInCheckMethod, isClassMethod, isHandlingTailCalls, isModuleBody, isNative, loadHeapFrame, maybeSetReturnType, outerLambda, outerLambdaNotInline, outerLambdaOrCaller, pushChild, restArgType, reverseChildList, setCallConvention, setCanRead, setClassMethod, setCoercedReturnType, setCoercedReturnValue, setExceptions, setImportsLexVars, setImportsLexVars, setInlineOnly, setInlineOnly, setNeedsStaticLink, setNeedsStaticLink, setProperty, setReturnType, setType, side_effects, toString, usingCallContext, validateApply, variable_args, visitChildrenOnly, visitProperties
add, add, addDeclaration, addDeclaration, addDeclaration, clearCallList, countDecls, currentLambda, currentModule, duplicateDeclarationError, firstDecl, getDefine, getNoDefine, getOuter, getVarScope, isClassGenerated, lastDecl, lookup, lookup, nestedIn, nesting, popScope, remove, remove, replaceFollowing, setIndexes, setOuter, topLevel
applyMethodExpression, checkLiteralKeyword, compile, compile, compileWithPosition, compileWithPosition, deepCopy, deepCopy, deepCopy, deepCopy, eval, eval, getColumnNumber, getEndColumn, getEndLine, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getStartColumn, getStartLine, getSystemId, getType, getTypeRaw, isSingleValue, isStableSourceLocation, makeWhile, maybeSetLine, neverReturns, numArgs, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLine, setLocation, setType, valueIfConstant
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation
getName, getSymbol, removeProperty, setName, setProperty, setSymbol
public static final int IS_ABSTRACT
public static final int INTERFACE_SPECIFIED
public static final int CLASS_SPECIFIED
public static final int HAS_SUBCLASS
public static final int IS_PACKAGE_MEMBER
public java.lang.String classNameSpecifier
public Expression[] supers
public int superClassIndex
public LambdaExp initMethod
"$finit$"
for evaluating
non-static initializations.
All constructors need to call this.public LambdaExp clinitMethod
"$clinit$"
for evaluating
static initializations.public ClassExp(boolean simple, ClassType type)
public boolean isSimple()
public final boolean isAbstract()
isAbstract
in class LambdaExp
public boolean isMakingClassPair()
protected Type calculateType()
getClassType
:
The value of a ClassExp
(viewed as an expression) is a
class/type object, so getType
returns the type of a type.calculateType
in class LambdaExp
public ClassType getClassType()
getClassType
in class LambdaExp
public void setClassType(ClassType type)
protected boolean mustCompile()
mustCompile
in class LambdaExp
public void compile(Compilation comp, Target target)
public void compilePushClass(Compilation comp, Target target)
protected ClassType getCompiledClassType(Compilation comp)
LambdaExp
getCompiledClassType
in class LambdaExp
public void createFields(Compilation comp)
public void setTypes(Compilation comp)
public java.lang.String getClassName(Compilation comp)
public void declareParts(Compilation comp)
public ClassType compileMembers(Compilation comp)
protected Method findMethodForBridge(java.lang.String mname, Type[] ptypes, Type rtype)
public final void generateBridgeMethod(Compilation comp, Method src_method, Type[] bridge_arg_types, Type bridge_return_type)
protected <R,D> R visit(ExpVisitor<R,D> visitor, D d)
protected <R,D> void visitChildren(ExpVisitor<R,D> visitor, D d)
visitChildren
in class LambdaExp
public Field compileSetField(Compilation comp)
compileSetField
in class LambdaExp
public static java.lang.String slotToMethodName(java.lang.String prefix, java.lang.String sname)
prefix
- either "get" or "set" or "add"sname
- a "slot" (property) name. This is mangled if needed.public Declaration addMethod(LambdaExp lexp, java.lang.Object mname)