gnu.expr
public class LambdaExp extends ScopeExp
Field Summary | |
---|---|
Expression | body |
Field | closureEnvField If non-null, this is a Field that is used for implementing lexical closures.
|
Expression[] | defaultArgs |
LambdaExp | firstChild |
Keyword[] | keywords |
int | max_args Maximum number of actual arguments; -1 if variable. |
int | min_args Minumnum number of parameters.
|
Declaration | nameDecl If non-null, a Declaration whose value is (only) this LambdaExp. |
LambdaExp | nextSibling |
protected static int | NEXT_AVAIL_FLAG |
static int | NO_FIELD |
static int | OVERLOADABLE_FIELD |
ApplyExp | returnContinuation The unique caller that calls this lambda.
|
Type | returnType If non-null, the type of values returned by this function.
|
Field | staticLinkField Field in heapFrame.getType() that contains the static link.
|
static int | SEQUENCE_RESULT |
Constructor Summary | |
---|---|
LambdaExp() | |
LambdaExp(int args) | |
LambdaExp(Expression body) |
Method Summary | |
---|---|
void | allocChildClasses(Compilation comp) |
void | allocFrame(Compilation comp) |
void | apply(CallContext ctx) |
void | capture(Declaration decl) |
void | compile(Compilation comp, Target target) |
void | compileBody(Compilation comp) |
void | compileEnd(Compilation comp) |
Field | compileSetField(Compilation comp) |
Variable | declareClosureEnv() |
Variable | declareThis(ClassType clas) |
void | generateApplyMethods(Compilation comp) |
int | getCallConvention() Specify the calling convention used for this function. |
LambdaExp | getCaller() For an INLINE_ONLY function, return the function it gets inlined in. |
boolean | getCanCall() |
boolean | getCanRead() |
protected ClassType | getCompiledClassType(Compilation comp) Return the ClassType of the Procedure this is being compiled into. |
protected String | getExpClassName() |
ClassType | getHeapFrameType() |
boolean | getImportsLexVars() True iff this lambda "captures" (uses) lexical variables from outside. |
boolean | getInlineOnly() True iff this lambda is only "called" inline. |
Method | getMainMethod() Get the method that contains the actual body of the procedure.
|
Method | getMethod(int argCount) Select the method used given an argument count. |
boolean | getNeedsClosureEnv() |
boolean | getNeedsStaticLink() True if a child lambda uses lexical variables from outside.
|
LambdaExp | getOwningLambda() |
Object | getProperty(Object key, Object defaultValue) |
Type | getReturnType() The return type of this function, i.e the type of its returned values. |
Type | getType() |
int | incomingArgs() Number of argument variable actually passed by the caller.
|
Expression | inline(ApplyExp exp, InlineCalls walker, Declaration decl) |
boolean | isClassGenerated() True if a class is generated for this procedure. |
boolean | isClassMethod() True if this is a method in an ClassExp. |
boolean | isHandlingTailCalls() |
boolean | isModuleBody() True iff this is the dummy top-level function of a module body. |
void | loadHeapFrame(Compilation comp) Generate code to load heapFrame on the JVM stack. |
protected boolean | mustCompile() |
LambdaExp | outerLambda() |
LambdaExp | outerLambdaNotInline() Return the closest outer non-inlined LambdaExp. |
void | print(OutPort out) |
Type | restArgType() Return the parameter type of the "keyword/rest" parameters. |
void | setCanCall(boolean called) |
void | setCanRead(boolean read) |
void | setClassMethod(boolean isMethod) |
void | setExceptions(ReferenceExp[] exceptions) |
void | setImportsLexVars(boolean importsLexVars) |
void | setImportsLexVars() |
void | setInlineOnly(boolean inlineOnly) |
void | setNeedsStaticLink(boolean needsStaticLink) |
void | setNeedsStaticLink() |
void | setProperty(Object key, Object value) |
void | setReturnType(Type returnType) |
void | setType(ClassType type) |
String | toString() |
boolean | variable_args() |
protected Expression | walk(ExpWalker walker) |
protected void | walkChildren(ExpWalker walker) |
protected void | walkChildrenOnly(ExpWalker walker) |
protected void | walkProperties(ExpWalker walker) |
Returns: One of the CALL_WITH_xxx values in Compilation.