| |
|
| java.lang.Object gnu.expr.Compilation
Compilation | public class Compilation (Code) | | |
Method Summary | |
ClassType | addClass(LambdaExp lexp, ClassType type) | final public ClassType | addClass(ModuleExp module) Compiles a module to a class. | public void | addClass(ClassType new_class) | ClassType | allocClass(ModuleExp module) | public Field | allocLocalField(Type type, String name) | public void | allocate(Package pkg) | public void | compile(Package root) | public void | compileConstant(Object value) Emit code to "evaluate" a compile-time constant. | public void | compileConstant(Object value, Target target) | public static char | demangle2(char char1, char char2) Demangle a three-character mangling starting with '$'. | public static String | demangleName(String name) | public static String | demangleName(String name, boolean reversible) | void | dumpInitializers(Initializer inits, Method initMethod) | public void | error(char severity, String message) | public void | error(char severity, String filename, int line, int column, String message) | public void | error(gnu.text.SourceError err) | public Literal | findLiteral(Object value) | public ClassType | findNamedClass(String name) Search this Compilation for a ClassType with a given name. | public void | freeLocalField(Field field) | public void | generate(Package pkg) Create a new Compilation environment. | public void | generateApplyMethods(LambdaExp lexp) Generate ModuleBody's apply0 .. | public String | generateClassName(String hint) Generate an unused class name. | final public void | generateConstructor(LambdaExp lexp) | final public void | generateConstructor(ClassType clas, LambdaExp lexp) | public String | generateUniqueName(String hint) Generate an unused name. | final public CodeAttr | getCode() | final public Method | getConstructor(LambdaExp lexp) | final public static Method | getConstructor(ClassType clas, LambdaExp lexp) | public Interpreter | getInterpreter() | final public static ClassType | getMethodProcType(ClassType modClass) | final public ClassType | getModuleSuperType(ModuleExp module) | public static boolean | isValidJavaName(String name) | final public void | loadCallContext() Generate code to push the current CallContext on the JVM stack. | public static String | mangleName(String name) | public static String | mangleName(String name, boolean reversible) Convert a string to a safe Java identifier.
Parameters: reversible - if we should use an invertible mapping. | public static String | mangleNameIfNeeded(String name) | public static boolean | usingCPStyle() | public boolean | usingTailCalls() |
argsCallContextField | public static Field argsCallContextField(Code) | | |
callStackContext | Variable callStackContext(Code) | | The actual parameter of the current CallFrame.step(CallContext) method.
|
callerCallFrameField | public static Field callerCallFrameField(Code) | | |
classPrefix | public String classPrefix(Code) | | If non-null: a prefix for generateClassName to prepend to names.
|
debugPrintFinalExpr | public static boolean debugPrintFinalExpr(Code) | | If true, print out final expressions after optimizations etc.
|
defineFunctionMethod | static Method defineFunctionMethod(Code) | | |
falseConstant | final public static Field falseConstant(Code) | | |
fewerClasses | public static boolean fewerClasses(Code) | | If true, minimize the number of classes generated.
Do this even if it makes things a little slower.
|
generateApplet | public boolean generateApplet(Code) | | True if we should generate an Applet.
|
generateAppletDefault | public static boolean generateAppletDefault(Code) | | |
generateMain | public boolean generateMain(Code) | | True if we should generate a main(String[]) method.
|
generateMainDefault | public static boolean generateMainDefault(Code) | | |
generateServlet | public boolean generateServlet(Code) | | True if we should generate an Servlet.
|
generateServletDefault | public static boolean generateServletDefault(Code) | | |
getBindingEnvironmentMethod | final public static Method getBindingEnvironmentMethod(Code) | | |
getCurrentEnvironmentMethod | public static Method getCurrentEnvironmentMethod(Code) | | |
getLocationMethod | final public static Method getLocationMethod(Code) | | |
getProcedureBindingMethod | final public static Method getProcedureBindingMethod(Code) | | |
immediate | boolean immediate(Code) | | True if the compiled result will be immediately loaded.
|
instanceField | Field instanceField(Code) | | Contains "$instance" if the module is static; otherwise null.
|
literalsChain | Literal literalsChain(Code) | | Rembembers literals to initialize (in ).
|
literalsCount | int literalsCount(Code) | | |
localFieldIndex | int localFieldIndex(Code) | | |
maxSelectorValue | int maxSelectorValue(Code) | | Used by LambdaExp.getSelectorValue if need to allocate new selector.
|
method_counter | int method_counter(Code) | | |
moduleStatic | public static int moduleStatic(Code) | | If moduleStatic > 0, (module-static #t) is implied by default.
If moduleStatic < 0, (module-static #f) is implied by default.
|
numArgsCallFrameField | public static Field numArgsCallFrameField(Code) | | |
numClasses | int numClasses(Code) | | |
pcCallContextField | public static Field pcCallContextField(Code) | | |
popCallContextMethod | public static Method popCallContextMethod(Code) | | |
procCallContextField | public static Field procCallContextField(Code) | | |
saved_pcCallFrameField | public static Field saved_pcCallFrameField(Code) | | |
string1Arg | final public static Type[] string1Arg(Code) | | |
trueConstant | final public static Field trueConstant(Code) | | |
typeApplyMethodContainer | public static ClassType typeApplyMethodContainer(Code) | | |
undefinedConstant | final static Field undefinedConstant(Code) | | |
usingCPStyle | public static boolean usingCPStyle(Code) | | |
usingTailCalls | public static boolean usingTailCalls(Code) | | |
Compilation | public Compilation(ModuleExp lexp, String classname, String prefix, boolean immediate)(Code) | | Create a new Compilation environment.
Parameters: lexp - top-level function Parameters: classname - name of top-level class to generate Parameters: prefix - prefix to pre-pend to the names of other (non-top) classes Parameters: immediate - true if the classes will be immediately loaded |
Compilation | public Compilation()(Code) | | Compilation of Packages
|
compileConstant | public void compileConstant(Object value)(Code) | | Emit code to "evaluate" a compile-time constant.
This is the normal external interface.
Parameters: value - the value to be compiled |
demangle2 | public static char demangle2(char char1, char char2)(Code) | | Demangle a three-character mangling starting with '$'.
UNFINISHED!
|
error | public void error(char severity, String filename, int line, int column, String message)(Code) | | |
findNamedClass | public ClassType findNamedClass(String name)(Code) | | Search this Compilation for a ClassType with a given name.
Parameters: name - the name of the class desired the matching ClassType, or null if none is found |
freeLocalField | public void freeLocalField(Field field)(Code) | | |
generate | public void generate(Package pkg)(Code) | | Create a new Compilation environment.
Parameters: pkg - the package to compile |
generateApplyMethods | public void generateApplyMethods(LambdaExp lexp)(Code) | | Generate ModuleBody's apply0 .. applyN methods.
Use the applyMethods vector, which contains methods that implement
the (public, readable) methods of the current module.
|
generateClassName | public String generateClassName(String hint)(Code) | | Generate an unused class name.
Parameters: hint - the requested name (or prefix) a unique class name. |
generateConstructor | final public void generateConstructor(LambdaExp lexp)(Code) | | |
generateUniqueName | public String generateUniqueName(String hint)(Code) | | Generate an unused name.
Parameters: hint - the requested name (or prefix) a unique class name. |
isValidJavaName | public static boolean isValidJavaName(String name)(Code) | | |
loadCallContext | final public void loadCallContext()(Code) | | Generate code to push the current CallContext on the JVM stack.
Assumes that callStackContext has been set for the current function.
(Later we should call a routine to get it via the current thread.)
|
mangleName | public static String mangleName(String name, boolean reversible)(Code) | | Convert a string to a safe Java identifier.
Parameters: reversible - if we should use an invertible mapping. |
usingCPStyle | public static boolean usingCPStyle()(Code) | | |
usingTailCalls | public boolean usingTailCalls()(Code) | | |
|
|
|