gnu.expr
Class ModuleExp
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.Procedure0
gnu.expr.Expression
gnu.expr.ScopeExp
gnu.expr.LambdaExp
gnu.expr.ModuleExp
- All Implemented Interfaces:
- Named, Printable, java.io.Externalizable, java.io.Serializable, javax.xml.transform.SourceLocator, org.xml.sax.Locator
public class ModuleExp
- extends LambdaExp
- implements java.io.Externalizable
Class used to implement Scheme top-level environments.
- See Also:
- Serialized Form
Fields inherited from class gnu.expr.LambdaExp |
body, closureEnvField, defaultArgs, firstChild, keywords, max_args, min_args, nameDecl, NEXT_AVAIL_FLAG, nextSibling, NO_FIELD, OVERLOADABLE_FIELD, returnContinuation, returnType, SEQUENCE_RESULT, staticLinkField |
Methods inherited from class gnu.expr.LambdaExp |
allocFrame, apply, capture, compile, compileBody, compileEnd, compileSetField, declareClosureEnv, declareThis, generateApplyMethods, getCallConvention, getCaller, getCanCall, getCanRead, getCompiledClassType, getExpClassName, getHeapFrameType, getImportsLexVars, getInlineOnly, getMainMethod, getMethod, getNeedsClosureEnv, getNeedsStaticLink, getOwningLambda, getProperty, getReturnType, getType, incomingArgs, inline, isAbstract, isClassGenerated, isClassMethod, isHandlingTailCalls, isModuleBody, loadHeapFrame, mustCompile, outerLambda, outerLambdaNotInline, restArgType, setCanCall, setCanRead, setClassMethod, setCoercedReturnType, setExceptions, setImportsLexVars, setImportsLexVars, setInlineOnly, setNeedsStaticLink, setNeedsStaticLink, setProperty, setReturnType, setType, toString, variable_args, walkChildren, walkChildrenOnly, walkProperties |
Methods inherited from class gnu.expr.ScopeExp |
add, add, addDeclaration, addDeclaration, addDeclaration, countDecls, currentLambda, currentModule, duplicateDeclarationError, getDefine, getNoDefine, getVarScope, lookup, lookup, nesting, popScope, remove, remove, replaceFollowing, setIndexes |
Methods inherited from class gnu.expr.Expression |
apply0, compile, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, eval, eval, getColumnNumber, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getSystemId, isStableSourceLocation, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLocation, side_effects, valueIfConstant |
Methods inherited from class gnu.mapping.Procedure |
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EXPORT_SPECIFIED
public static final int EXPORT_SPECIFIED
- See Also:
- Constant Field Values
STATIC_SPECIFIED
public static final int STATIC_SPECIFIED
- See Also:
- Constant Field Values
NONSTATIC_SPECIFIED
public static final int NONSTATIC_SPECIFIED
- See Also:
- Constant Field Values
SUPERTYPE_SPECIFIED
public static final int SUPERTYPE_SPECIFIED
- See Also:
- Constant Field Values
STATIC_RUN_SPECIFIED
public static final int STATIC_RUN_SPECIFIED
- See Also:
- Constant Field Values
LAZY_DECLARATIONS
public static final int LAZY_DECLARATIONS
- See Also:
- Constant Field Values
IMMEDIATE
public static final int IMMEDIATE
- See Also:
- Constant Field Values
dumpZipPrefix
public static java.lang.String dumpZipPrefix
- Used to control which .zip file dumps are generated.
interactiveCounter
public static int interactiveCounter
- Numeric identifier for this interactive "command".
Incremented by Shell.run, and used to set the module name,
and maybe the name of the --debug-dump-zip output file.
We increment and use this counter purely to ease debugging.
(Since each module gets its own ClassLoader, they don't
need to be named differently, and it doesn't matter
if there is a race condition on the counter.)
alwaysCompile
public static boolean alwaysCompile
- Flag to force compilation, even when not required.
ModuleExp
public ModuleExp()
getJavaName
public java.lang.String getJavaName()
evalToClass
public static java.lang.Class evalToClass(Compilation comp,
java.net.URL url)
throws SyntaxException
- Throws:
SyntaxException
evalModule
public static final boolean evalModule(Environment env,
CallContext ctx,
Compilation comp,
java.net.URL url,
OutPort msg)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getNamespaceUri
public java.lang.String getNamespaceUri()
getSuperType
public final ClassType getSuperType()
setSuperType
public final void setSuperType(ClassType s)
getInterfaces
public final ClassType[] getInterfaces()
setInterfaces
public final void setInterfaces(ClassType[] s)
isStatic
public final boolean isStatic()
staticInitRun
public boolean staticInitRun()
- True if module body (i.e. run) is called by class initializer.
allocChildClasses
public void allocChildClasses(Compilation comp)
- Overrides:
allocChildClasses
in class LambdaExp
walk
protected Expression walk(ExpWalker walker)
- Overrides:
walk
in class LambdaExp
print
public void print(OutPort out)
- Overrides:
print
in class LambdaExp
firstDecl
public Declaration firstDecl()
- Overrides:
firstDecl
in class ScopeExp
classFor
public ClassType classFor(Compilation comp)
- Return the class this module.
If not set yet, sets it now, based on the source file name.
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException