|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gnu.expr.Expression
|
+--gnu.expr.ScopeExp
|
+--gnu.expr.LambdaExp
Class used to implement Scheme lambda expressions.
| Field Summary | |
Expression |
body
|
Field |
closureEnvField
If non-null, this is a Field that is used for implementing lexical closures. |
Expression[] |
defaultArgs
|
static int |
dumpZipCounter
|
static java.lang.String |
dumpZipPrefix
Used to control with .zip files dumps are generated. |
static java.lang.String |
fileFunctionName
The name to give to a dummy implicit function that surrounds a file. |
LambdaExp |
firstChild
|
protected int |
flags
|
Keyword[] |
keywords
|
int |
max_args
|
int |
min_args
|
java.lang.String |
name
|
LambdaExp |
nextSibling
|
Field |
staticLinkField
Field in heapFrame.getType() that contains the static link. |
| Fields inherited from class gnu.expr.ScopeExp |
outer |
| Constructor Summary | |
LambdaExp()
|
|
LambdaExp(Expression body)
|
|
| Method Summary | |
void |
allocChildClasses(Compilation comp)
|
void |
allocFrame(Compilation comp)
|
ClassType |
compile(Compilation comp)
|
void |
compile(Compilation comp,
Target target)
|
ClassType |
compileAlloc(Compilation comp)
|
void |
compileEnd(Compilation comp)
|
Field |
compileSetField(Compilation comp)
|
Variable |
declareClosureEnv()
|
Variable |
declareThis(ClassType clas)
|
java.lang.Object |
eval(Environment env)
|
java.lang.Class |
evalToClass()
|
LambdaExp |
getCaller()
For an INLINE_ONLY function, return the function it gets inlined in. |
boolean |
getCanCall()
|
boolean |
getCanRead()
|
ClassType |
getCompiledClassType(Compilation comp)
Return the ClassType of the Procedure this is being compiled into. |
int |
getFlags()
|
boolean |
getImportsLexVars()
True iff this lambda "captures" (uses) lexical variables from outside. |
boolean |
getInlineOnly()
True iff this lambda is only "called" inline. |
java.lang.String |
getJavaName()
|
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. |
java.lang.String |
getName()
|
boolean |
getNeedsClosureEnv()
|
boolean |
getNeedsStaticLink()
True if a child lambda uses lexical variables from outside. |
Type |
getType()
Return the Type used to represent the values of this Expression. |
int |
incomingArgs()
Number of argument variable actually passed by the caller. |
boolean |
isClassGenerated()
True if a class is generated for this procedure. |
boolean |
isClassMethod()
True if this is a method in an ObjectExp. |
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. |
LambdaExp |
outerLambda()
|
LambdaExp |
outerLambdaNotInline()
Return the closest outer non-inlined LambdaExp. |
void |
print(java.io.PrintWriter ps)
|
Type |
restArgType()
Return the parameter type of the "keyword/rest" parameters. |
void |
setCanCall(boolean called)
|
void |
setCanRead(boolean read)
|
void |
setClassMethod(boolean isMethod)
|
void |
setImportsLexVars()
|
void |
setImportsLexVars(boolean importsLexVars)
|
void |
setInlineOnly(boolean inlineOnly)
|
void |
setName(java.lang.String name)
|
void |
setNeedsStaticLink()
|
void |
setNeedsStaticLink(boolean needsStaticLink)
|
java.lang.String |
toString()
|
boolean |
variable_args()
|
| Methods inherited from class gnu.expr.ScopeExp |
add,
addDeclaration,
addDeclaration,
addDeclaration,
countDecls,
currentLambda,
firstDecl,
lookup |
| Methods inherited from class gnu.expr.Expression |
compile,
compileNotePosition,
compileWithPosition,
getColumn,
getFile,
getLine,
setFile,
setLine,
setLine |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public java.lang.String name
public Expression body
public int min_args
public int max_args
public Keyword[] keywords
public Expression[] defaultArgs
public LambdaExp firstChild
public LambdaExp nextSibling
public Field closureEnvField
public Field staticLinkField
protected int flags
public static java.lang.String fileFunctionName
public static java.lang.String dumpZipPrefix
public static int dumpZipCounter
| Constructor Detail |
public LambdaExp()
public LambdaExp(Expression body)
| Method Detail |
public int getFlags()
public final boolean getInlineOnly()
public final void setInlineOnly(boolean inlineOnly)
public final boolean getNeedsClosureEnv()
public final boolean getNeedsStaticLink()
public final void setNeedsStaticLink(boolean needsStaticLink)
public final boolean getImportsLexVars()
public final void setImportsLexVars(boolean importsLexVars)
public final void setImportsLexVars()
public final void setNeedsStaticLink()
public final boolean getCanRead()
public final void setCanRead(boolean read)
public final boolean getCanCall()
public final void setCanCall(boolean called)
public final boolean isClassMethod()
public final void setClassMethod(boolean isMethod)
public final boolean isModuleBody()
public final boolean isClassGenerated()
public final boolean isHandlingTailCalls()
public final boolean variable_args()
public ClassType getCompiledClassType(Compilation comp)
public Type getType()
public int incomingArgs()
public final Method getMethod(int argCount)
public final Method getMainMethod()
public final Type restArgType()
public void setName(java.lang.String name)
public java.lang.String getName()
public java.lang.String getJavaName()
public LambdaExp outerLambda()
public LambdaExp outerLambdaNotInline()
public LambdaExp getCaller()
public Variable declareThis(ClassType clas)
public Variable declareClosureEnv()
public void loadHeapFrame(Compilation comp)
public ClassType compile(Compilation comp)
public ClassType compileAlloc(Compilation comp)
public void compileEnd(Compilation comp)
public Field compileSetField(Compilation comp)
public void compile(Compilation comp,
Target target)
public void allocChildClasses(Compilation comp)
public void allocFrame(Compilation comp)
public java.lang.Class evalToClass()
public java.lang.Object eval(Environment env)
public void print(java.io.PrintWriter ps)
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||