Java Doc for Compilation.java in  » Scripting » Kawa » gnu » expr » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Kawa » gnu.expr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gnu.expr.Compilation

All known Subclasses:   kawa.lang.Translator,
Compilation
public class Compilation implements SourceLocator(Code)
State for a single expression or module. For each top-level thing (expression or file) we compile or evaluate we create a new Compilation.


Field Summary
final public static  intBODY_PARSED
     State code indicating the entire module has been parsed.
final public static  intCALL_WITH_CONSUMER
     Function results are written to the current CallContext's Consumer.
final public static  intCALL_WITH_CONTINUATIONS
     Support for full continuations.
final public static  intCALL_WITH_RETURN
     Plain calling convention, using regular Java parameters and returns.
final public static  intCALL_WITH_TAILCALLS
     Like CALL_WITH_CONSUMER, but handle full on-stack-growing tail-calls.
final public static  intCALL_WITH_UNSPECIFIED
    
final public static  intCLASS_WRITTEN
     State code indicating that bytecode has been written to its target.
final public static  intCOMPILED
     State code indicating the bytecode has been generated.
final public static  intCOMPILE_SETUP
     State code that various compile-only data has been determined.
final public static  intERROR_SEEN
    
final public static  intPROLOG_PARSED
     We have determined the module name and class, but not finished parsing.
final public static  intPROLOG_PARSING
     State code for initial pre-parse looking for module name.
final public static  intRESOLVED
     State code for lexical bindings having been resolved.
final public static  intWALKED
     State code when various inlining and optimization passes are done.
public static  Type[]apply0args
    
public static  Methodapply0method
    
public static  Type[]apply1args
    
public static  Methodapply1method
    
public static  Type[]apply2args
    
public static  Methodapply2method
    
public static  Methodapply3method
    
public static  Methodapply4method
    
public static  MethodapplyCpsMethod
    
public static  Type[]applyNargs
    
public static  MethodapplyNmethod
    
public static  Method[]applymethods
    
public static  FieldargsCallContextField
    
 VariablecallContextVar
     If non-null, contains the value of the current CallContext.
 VariablecallContextVarForInit
    
static  MethodcheckArgCountMethod
    
public  StringclassPrefix
     If non-null: a prefix for generateClassName to prepend to names.
public static  StringclassPrefixDefault
    
 ClassType[]classes
    
 InitializerclinitChain
     Rembembers stuff to do in of main class.
 MethodclinitMethod
    
public  ClassTypecurClass
    
public  LambdaExpcurLambda
    
public  OptionscurrentOptions
    
protected  ScopeExpcurrent_scope
    
public static  booleandebugPrintExpr
     If true, print out expressions after parsing and before optimizations.
public static  booleandebugPrintFinalExpr
     If true, print out final expressions after optimizations etc.
public static  intdefaultCallConvention
     The default calling convention. One of the following CALL_WITHG_xxx values.
public static  booleanemitSourceDebugExtAttr
    
public  StackexprStack
     A help vector for building expressions.
final public static  FieldfalseConstant
    
public static  booleanfewerClasses
     If true, minimize the number of classes generated. Do this even if it makes things a little slower.
 MethodforNameHelper
     If non-null, a helper method generated by getForNameHelper.
 SwitchStatefswitch
    
 FieldfswitchIndex
    
public  booleangenerateApplet
     True if we should generate an Applet.
public static  booleangenerateAppletDefault
    
public  booleangenerateMain
     True if we should generate a main(String[]) method.
public static  booleangenerateMainDefault
    
public  booleangenerateServlet
     True if we should generate an Servlet.
public static  booleangenerateServletDefault
    
public static  MethodgetCallContextInstanceMethod
    
public static  MethodgetCurrentEnvironmentMethod
    
final public static  MethodgetLocation1EnvironmentMethod
    
final public static  MethodgetLocation2EnvironmentMethod
    
final public static  MethodgetLocationMethod
    
final public static  MethodgetProcedureBindingMethod
    
final public static  MethodgetSymbolProcedureMethod
    
final public static  MethodgetSymbolValueMethod
    
public  booleanimmediate
     True if the compiled result will be immediately loaded.
public static  booleaninlineOk
    
final public static  Type[]int1Args
    
public static  ClassTypejavaIntegerType
    
public static  ClassTypejavaStringType
    
protected  Languagelanguage
    
public  Lexerlexer
    
public  NameLookuplexical
     Current lexical scope - map name to Declaration.
 LitTablelitTable
    
 ArrayClassLoaderloader
     When immediate, the ClassLoader we will load the compiled classes from.
 intlocalFieldIndex
    
public  ClassTypemainClass
    
public  ModuleExpmainLambda
    
static  MethodmakeListMethod
    
 intmaxSelectorValue
     Used by LambdaExp.getSelectorValue if need to allocate new selector.
protected  SourceMessagesmessages
    
public  Methodmethod
     The current method.
 intmethod_counter
    
public  ModuleInfominfo
    
public  ClassTypemoduleClass
     Generated class that extends ModuleBody.
 FieldmoduleInstanceMainField
     Used to access the "main" instance.
 VariablemoduleInstanceVar
     Contains "$instance" if the module is static; otherwise null.
public static  intmoduleStatic
     If moduleStatic > 0, (module-static #t) is implied by default. If moduleStatic == 2, calls run. If moduleStatic < 0, (module-static #f) is implied by default.
public  booleanmustCompile
     True if the form is too complex to evaluate,and we must compile it. This is because it contains a construct we know how to compile, but not evaluate, and it it outside a function (which we always compile). This can be a let scope, or primitive procedure.
public static  FieldnoArgsField
    
 intnumClasses
    
final public static  ArrayTypeobjArrayType
    
public static  Optionsoptions
    
public static  FieldpcCallContextField
    
 booleanpedantic
    
public  java.util.StackpendingImports
    
public static  FieldprocCallContextField
    
public static  ClassTypescmBooleanType
    
public static  ClassTypescmKeywordType
    
public static  ClassTypescmListType
    
public static  ClassTypescmNamedType
    
public static  ClassTypescmPairType
    
public static  ClassTypescmSequenceType
    
final static  MethodsetNameMethod
    
final public static  Type[]string1Arg
    
final public static  Type[]sym1Arg
    
public  VariablethisDecl
    
final public static  FieldtrueConstant
    
public static  ClassTypetypeApplet
    
public static  ClassTypetypeCallContext
    
public static  ClassTypetypeClass
    
public static  ClassTypetypeClassType
    
final public static  ClassTypetypeConsumer
    
public static  ClassTypetypeEnvironment
    
public static  ClassTypetypeLanguage
    
public static  ClassTypetypeLocation
    
public static  ClassTypetypeMethodProc
    
public static  ClassTypetypeModuleBody
    
public static  ClassTypetypeModuleMethod
    
public static  ClassTypetypeModuleWithContext
    
public static  ClassTypetypeObject
    
public static  ClassTypetypeObjectType
    
public static  ClassTypetypePair
    
public static  ClassTypetypeProcedure
    
public static  ClassTypetypeProcedure0
    
public static  ClassTypetypeProcedure1
    
public static  ClassTypetypeProcedure2
    
public static  ClassTypetypeProcedure3
    
public static  ClassTypetypeProcedure4
    
public static  ClassType[]typeProcedureArray
    
public static  ClassTypetypeProcedureN
    
public static  ClassTypetypeRunnable
    
public static  ClassTypetypeServlet
    
public static  ClassTypetypeString
    
public static  ClassTypetypeSymbol
    
public static  ClassTypetypeType
    
public static  ClassTypetypeValues
    

Constructor Summary
public  Compilation(boolean immediate, SourceMessages messages)
    
public  Compilation(SourceMessages messages)
    
public  Compilation(Language language, SourceMessages messages)
    
public  Compilation(Language language, SourceMessages messages, NameLookup lexical)
    

Method Summary
public  voidaddClass(ClassType new_class)
    
public  voidaddMainClass(ModuleExp module)
    
public  FieldallocLocalField(Type type, String name)
    
 voidcallInitMethods(ClassType clas, Vector seen)
     In an for a generated ClassExp, emit $finit$ calls.
public  voidcompileConstant(Object value)
     Emit code to "evaluate" a compile-time constant.
public  voidcompileConstant(Object value, Target target)
    
public  FieldcompileConstantToField(Object value)
    
public  voidcompileToArchive(ModuleExp mexp, String fname)
    
public  LambdaExpcurrentLambda()
    
public  ModuleExpcurrentModule()
     The same as getModule, until we allow nested modules.
public  ScopeExpcurrentScope()
    
public static  chardemangle2(char char1, char char2)
     Demangle a three-character mangling starting with '$'.
public static  StringdemangleName(String name)
    
public static  StringdemangleName(String name, boolean reversible)
    
public  voiderror(char severity, String message, SourceLocator location)
    
public  voiderror(char severity, String message)
    
public  voiderror(char severity, Declaration decl, String msg1, String msg2)
    
public  voiderror(char severity, String message, String code, Declaration decl)
    
public static synchronized  CompilationfindForImmediateLiterals(int key)
    
public  ClassTypefindNamedClass(String name)
     Search this Compilation for a ClassType with a given name.
public  voidfreeLocalField(Field field)
    
public  voidgenerateApplyMethodsWithContext(LambdaExp lexp)
     Generate ModuleBody's apply(CallContext) method Use the applyMethods vector, which contains methods that implement the (public, readable) methods of the current module.
public  voidgenerateApplyMethodsWithoutContext(LambdaExp lexp)
     Generate ModuleBody's apply0...applyN methods.
 voidgenerateBytecode()
     The guts of compiling a module to one or more classes.
public  StringgenerateClassName(String hint)
     Generate an unused class name.
final public  voidgenerateConstructor(LambdaExp lexp)
    
final public  voidgenerateConstructor(ClassType clas, LambdaExp lexp)
    
public  voidgenerateMatchMethods(LambdaExp lexp)
    
final public  booleangetBooleanOption(String key, boolean defaultValue)
     Get a named boolean option.
final public  booleangetBooleanOption(String key)
     Get a named boolean option.
final public  CodeAttrgetCode()
    
final public  intgetColumnNumber()
    
final public  MethodgetConstructor(LambdaExp lexp)
    
final public static  MethodgetConstructor(ClassType clas, LambdaExp lexp)
    
public static  CompilationgetCurrent()
    
final public  StringgetFileName()
    
public  MethodgetForNameHelper()
     Generate a method to find a named Class without initializing it. Generate a static helper method "class$" like javac generates for 'CLASS.class', but does not initialize CLASS.
public  LanguagegetLanguage()
    
final public  intgetLineNumber()
    
public  SourceMessagesgetMessages()
    
final public  ModuleExpgetModule()
    
final public  ClassTypegetModuleType()
    
public  StringgetPublicId()
    
public  intgetState()
     Returns a code indicating how far along we are in the parsing/compilation process.
public  StringgetSystemId()
    
public  booleaninlineOk(Expression proc)
    
public  booleaninlineOk(Procedure proc)
    
public  booleanisPedantic()
    
public  booleanisStableSourceLocation()
    
public  booleanisStatic()
    
public static  booleanisValidJavaName(String name)
    
public  LetExpletDone(Expression body)
    
public  voidletEnter()
    
public  voidletStart()
    
public  DeclarationletVariable(Object name, Type type, Expression init)
    
final public  voidloadCallContext()
     Generate code to push the current CallContext on the JVM stack.
public  voidloadClassRef(ClassType clas)
    
public  voidloadClassRef(String className)
     Generate code to load a named Class without initializing it.
public  Declarationlookup(Object name, int namespace)
    
public  voidloopBody(Expression body)
    
public  voidloopCond(Expression cond)
    
public  voidloopEnter()
     Done handling loop variables, and pushes them into the lexical scope. Ready to parse the loop condition.
public  ExpressionloopRepeat(Expression[] exps)
    
public  ExpressionloopRepeat()
    
public  ExpressionloopRepeat(Expression exp)
    
public  voidloopStart()
     Start a new loop.
public  DeclarationloopVariable(Object name, Type type, Expression init)
    
public static  StringmangleName(String name)
    
public static  StringmangleName(String name, boolean reversible)
     Convert a string to a safe Java identifier.
public static  StringmangleName(String name, int kind)
     Convert a string to a safe Java identifier.
public static  StringmangleNameIfNeeded(String name)
    
public static  StringmangleURI(String name)
     Map a URI to a package/class name.
public  voidmustCompileHere()
     Note that we have seen a construct that must be compiled, not evaluated.
public  voidoutputClass(String directory)
    
public  Expressionparse(Object input)
     This may not make sense, except for Lisp-like languages. For those, 'input' an s-expression from the reader.
public  voidpop(ScopeExp scope)
    
final public  voidpop()
    
public  voidprocess(int wantedState)
     Parse/walk/compile this module as needed and requested.
public  voidpush(ScopeExp scope)
    
public  voidpush(Declaration decl)
    
 voidpushChain(ScopeExp scope, ScopeExp limit)
    
public  ModuleExppushNewModule(Lexer lexer)
    
public  ModuleExppushNewModule(String filename)
    
public  voidpushPendingImport(ModuleInfo info, ScopeExp defs)
    
final public  voidpushScope(ScopeExp scope)
    
public static synchronized  intregisterForImmediateLiterals(Compilation comp)
    
public  Objectresolve(Object name, boolean function)
    
public  voidsetColumn(int column)
    
public static  voidsetCurrent(Compilation comp)
    
public  voidsetCurrentScope(ScopeExp scope)
     Set currentScope().
public  voidsetFile(String filename)
    
public  voidsetLine(int line)
    
final public  voidsetLine(Expression position)
    
public  voidsetLine(Object location)
    
public  voidsetLine(String filename, int line, int column)
    
final public  voidsetLocation(SourceLocator position)
    
public  voidsetMessages(SourceMessages messages)
    
public  voidsetModule(ModuleExp mexp)
    
public  voidsetState(int state)
    
public static  voidsetupLiterals(int key)
     Call-back from compiled code to initialize literals in immediate mode. In non-immediate mode (i.e.
public  ExpressionsyntaxError(String message)
     Handle syntax errors (at rewrite time).
public  StringtoString()
    
public  voidusedClass(Type type)
     Called for classes referenced in bytecode.
public  booleanusingCPStyle()
    
public  booleanusingTailCalls()
    
public  voidwalkModule(ModuleExp mexp)
     Shared processing for both compiling/eval.

Field Detail
BODY_PARSED
final public static int BODY_PARSED(Code)
State code indicating the entire module has been parsed.



CALL_WITH_CONSUMER
final public static int CALL_WITH_CONSUMER(Code)
Function results are written to the current CallContext's Consumer.



CALL_WITH_CONTINUATIONS
final public static int CALL_WITH_CONTINUATIONS(Code)
Support for full continuations. Not implemented.



CALL_WITH_RETURN
final public static int CALL_WITH_RETURN(Code)
Plain calling convention, using regular Java parameters and returns.



CALL_WITH_TAILCALLS
final public static int CALL_WITH_TAILCALLS(Code)
Like CALL_WITH_CONSUMER, but handle full on-stack-growing tail-calls.



CALL_WITH_UNSPECIFIED
final public static int CALL_WITH_UNSPECIFIED(Code)



CLASS_WRITTEN
final public static int CLASS_WRITTEN(Code)
State code indicating that bytecode has been written to its target.



COMPILED
final public static int COMPILED(Code)
State code indicating the bytecode has been generated.



COMPILE_SETUP
final public static int COMPILE_SETUP(Code)
State code that various compile-only data has been determined.



ERROR_SEEN
final public static int ERROR_SEEN(Code)



PROLOG_PARSED
final public static int PROLOG_PARSED(Code)
We have determined the module name and class, but not finished parsing.



PROLOG_PARSING
final public static int PROLOG_PARSING(Code)
State code for initial pre-parse looking for module name.



RESOLVED
final public static int RESOLVED(Code)
State code for lexical bindings having been resolved.



WALKED
final public static int WALKED(Code)
State code when various inlining and optimization passes are done.



apply0args
public static Type[] apply0args(Code)



apply0method
public static Method apply0method(Code)



apply1args
public static Type[] apply1args(Code)



apply1method
public static Method apply1method(Code)



apply2args
public static Type[] apply2args(Code)



apply2method
public static Method apply2method(Code)



apply3method
public static Method apply3method(Code)



apply4method
public static Method apply4method(Code)



applyCpsMethod
public static Method applyCpsMethod(Code)



applyNargs
public static Type[] applyNargs(Code)



applyNmethod
public static Method applyNmethod(Code)



applymethods
public static Method[] applymethods(Code)



argsCallContextField
public static Field argsCallContextField(Code)



callContextVar
Variable callContextVar(Code)
If non-null, contains the value of the current CallContext.



callContextVarForInit
Variable callContextVarForInit(Code)



checkArgCountMethod
static Method checkArgCountMethod(Code)



classPrefix
public String classPrefix(Code)
If non-null: a prefix for generateClassName to prepend to names.



classPrefixDefault
public static String classPrefixDefault(Code)



classes
ClassType[] classes(Code)



clinitChain
Initializer clinitChain(Code)
Rembembers stuff to do in of main class.



clinitMethod
Method clinitMethod(Code)



curClass
public ClassType curClass(Code)



curLambda
public LambdaExp curLambda(Code)



currentOptions
public Options currentOptions(Code)



current_scope
protected ScopeExp current_scope(Code)



debugPrintExpr
public static boolean debugPrintExpr(Code)
If true, print out expressions after parsing and before optimizations.



debugPrintFinalExpr
public static boolean debugPrintFinalExpr(Code)
If true, print out final expressions after optimizations etc.



defaultCallConvention
public static int defaultCallConvention(Code)
The default calling convention. One of the following CALL_WITHG_xxx values.



emitSourceDebugExtAttr
public static boolean emitSourceDebugExtAttr(Code)



exprStack
public Stack exprStack(Code)
A help vector for building expressions.



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.



forNameHelper
Method forNameHelper(Code)
If non-null, a helper method generated by getForNameHelper.



fswitch
SwitchState fswitch(Code)



fswitchIndex
Field fswitchIndex(Code)



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)



getCallContextInstanceMethod
public static Method getCallContextInstanceMethod(Code)



getCurrentEnvironmentMethod
public static Method getCurrentEnvironmentMethod(Code)



getLocation1EnvironmentMethod
final public static Method getLocation1EnvironmentMethod(Code)



getLocation2EnvironmentMethod
final public static Method getLocation2EnvironmentMethod(Code)



getLocationMethod
final public static Method getLocationMethod(Code)



getProcedureBindingMethod
final public static Method getProcedureBindingMethod(Code)



getSymbolProcedureMethod
final public static Method getSymbolProcedureMethod(Code)



getSymbolValueMethod
final public static Method getSymbolValueMethod(Code)



immediate
public boolean immediate(Code)
True if the compiled result will be immediately loaded.



inlineOk
public static boolean inlineOk(Code)



int1Args
final public static Type[] int1Args(Code)



javaIntegerType
public static ClassType javaIntegerType(Code)



javaStringType
public static ClassType javaStringType(Code)



language
protected Language language(Code)



lexer
public Lexer lexer(Code)



lexical
public NameLookup lexical(Code)
Current lexical scope - map name to Declaration.



litTable
LitTable litTable(Code)



loader
ArrayClassLoader loader(Code)
When immediate, the ClassLoader we will load the compiled classes from.



localFieldIndex
int localFieldIndex(Code)



mainClass
public ClassType mainClass(Code)



mainLambda
public ModuleExp mainLambda(Code)



makeListMethod
static Method makeListMethod(Code)



maxSelectorValue
int maxSelectorValue(Code)
Used by LambdaExp.getSelectorValue if need to allocate new selector.



messages
protected SourceMessages messages(Code)



method
public Method method(Code)
The current method.



method_counter
int method_counter(Code)



minfo
public ModuleInfo minfo(Code)



moduleClass
public ClassType moduleClass(Code)
Generated class that extends ModuleBody. Normally same as mainClass.



moduleInstanceMainField
Field moduleInstanceMainField(Code)
Used to access the "main" instance. This is used for two different purposes, which may be confusing:
  • If we're compiling a static module, then moduleInstanceMainField is a field in mainClass named "$instance" that points to the single instance of the module.
  • If moduleClass!=mainClass (typically because we've specified module-extends ) and the module is non-static then moduleInstanceMainField is a field in moduleClass named "$main" that points back to mainClass .



moduleInstanceVar
Variable moduleInstanceVar(Code)
Contains "$instance" if the module is static; otherwise null.



moduleStatic
public static int moduleStatic(Code)
If moduleStatic > 0, (module-static #t) is implied by default. If moduleStatic == 2, calls run. If moduleStatic < 0, (module-static #f) is implied by default.



mustCompile
public boolean mustCompile(Code)
True if the form is too complex to evaluate,and we must compile it. This is because it contains a construct we know how to compile, but not evaluate, and it it outside a function (which we always compile). This can be a let scope, or primitive procedure.



noArgsField
public static Field noArgsField(Code)



numClasses
int numClasses(Code)



objArrayType
final public static ArrayType objArrayType(Code)



options
public static Options options(Code)



pcCallContextField
public static Field pcCallContextField(Code)



pedantic
boolean pedantic(Code)



pendingImports
public java.util.Stack pendingImports(Code)



procCallContextField
public static Field procCallContextField(Code)



scmBooleanType
public static ClassType scmBooleanType(Code)



scmKeywordType
public static ClassType scmKeywordType(Code)



scmListType
public static ClassType scmListType(Code)



scmNamedType
public static ClassType scmNamedType(Code)



scmPairType
public static ClassType scmPairType(Code)



scmSequenceType
public static ClassType scmSequenceType(Code)



setNameMethod
final static Method setNameMethod(Code)



string1Arg
final public static Type[] string1Arg(Code)



sym1Arg
final public static Type[] sym1Arg(Code)



thisDecl
public Variable thisDecl(Code)



trueConstant
final public static Field trueConstant(Code)



typeApplet
public static ClassType typeApplet(Code)



typeCallContext
public static ClassType typeCallContext(Code)



typeClass
public static ClassType typeClass(Code)



typeClassType
public static ClassType typeClassType(Code)



typeConsumer
final public static ClassType typeConsumer(Code)



typeEnvironment
public static ClassType typeEnvironment(Code)



typeLanguage
public static ClassType typeLanguage(Code)



typeLocation
public static ClassType typeLocation(Code)



typeMethodProc
public static ClassType typeMethodProc(Code)



typeModuleBody
public static ClassType typeModuleBody(Code)



typeModuleMethod
public static ClassType typeModuleMethod(Code)



typeModuleWithContext
public static ClassType typeModuleWithContext(Code)



typeObject
public static ClassType typeObject(Code)



typeObjectType
public static ClassType typeObjectType(Code)



typePair
public static ClassType typePair(Code)



typeProcedure
public static ClassType typeProcedure(Code)



typeProcedure0
public static ClassType typeProcedure0(Code)



typeProcedure1
public static ClassType typeProcedure1(Code)



typeProcedure2
public static ClassType typeProcedure2(Code)



typeProcedure3
public static ClassType typeProcedure3(Code)



typeProcedure4
public static ClassType typeProcedure4(Code)



typeProcedureArray
public static ClassType[] typeProcedureArray(Code)



typeProcedureN
public static ClassType typeProcedureN(Code)



typeRunnable
public static ClassType typeRunnable(Code)



typeServlet
public static ClassType typeServlet(Code)



typeString
public static ClassType typeString(Code)



typeSymbol
public static ClassType typeSymbol(Code)



typeType
public static ClassType typeType(Code)



typeValues
public static ClassType typeValues(Code)




Constructor Detail
Compilation
public Compilation(boolean immediate, SourceMessages messages)(Code)



Compilation
public Compilation(SourceMessages messages)(Code)



Compilation
public Compilation(Language language, SourceMessages messages)(Code)



Compilation
public Compilation(Language language, SourceMessages messages, NameLookup lexical)(Code)




Method Detail
addClass
public void addClass(ClassType new_class)(Code)



addMainClass
public void addMainClass(ModuleExp module)(Code)



allocLocalField
public Field allocLocalField(Type type, String name)(Code)



callInitMethods
void callInitMethods(ClassType clas, Vector seen)(Code)
In an for a generated ClassExp, emit $finit$ calls. This recursively traverses superclasses, and also calls their $finit$.
Parameters:
  clas - Class to search for $finit$, and to search supertypes.
Parameters:
  seen - array of seen classes, to avoid duplicate $finit$ calls.



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



compileConstant
public void compileConstant(Object value, Target target)(Code)



compileConstantToField
public Field compileConstantToField(Object value)(Code)



compileToArchive
public void compileToArchive(ModuleExp mexp, String fname) throws java.io.IOException(Code)



currentLambda
public LambdaExp currentLambda()(Code)



currentModule
public ModuleExp currentModule()(Code)
The same as getModule, until we allow nested modules.



currentScope
public ScopeExp currentScope()(Code)



demangle2
public static char demangle2(char char1, char char2)(Code)
Demangle a three-character mangling starting with '$'. UNFINISHED!



demangleName
public static String demangleName(String name)(Code)



demangleName
public static String demangleName(String name, boolean reversible)(Code)



error
public void error(char severity, String message, SourceLocator location)(Code)



error
public void error(char severity, String message)(Code)



error
public void error(char severity, Declaration decl, String msg1, String msg2)(Code)



error
public void error(char severity, String message, String code, Declaration decl)(Code)



findForImmediateLiterals
public static synchronized Compilation findForImmediateLiterals(int key)(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)



generateApplyMethodsWithContext
public void generateApplyMethodsWithContext(LambdaExp lexp)(Code)
Generate ModuleBody's apply(CallContext) method Use the applyMethods vector, which contains methods that implement the (public, readable) methods of the current module.



generateApplyMethodsWithoutContext
public void generateApplyMethodsWithoutContext(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.



generateBytecode
void generateBytecode()(Code)
The guts of compiling a module to one or more classes. Assumes walkModule has been done.



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)



generateConstructor
final public void generateConstructor(ClassType clas, LambdaExp lexp)(Code)



generateMatchMethods
public void generateMatchMethods(LambdaExp lexp)(Code)



getBooleanOption
final public boolean getBooleanOption(String key, boolean defaultValue)(Code)
Get a named boolean option.



getBooleanOption
final public boolean getBooleanOption(String key)(Code)
Get a named boolean option.



getCode
final public CodeAttr getCode()(Code)



getColumnNumber
final public int getColumnNumber()(Code)



getConstructor
final public Method getConstructor(LambdaExp lexp)(Code)



getConstructor
final public static Method getConstructor(ClassType clas, LambdaExp lexp)(Code)



getCurrent
public static Compilation getCurrent()(Code)



getFileName
final public String getFileName()(Code)



getForNameHelper
public Method getForNameHelper()(Code)
Generate a method to find a named Class without initializing it. Generate a static helper method "class$" like javac generates for 'CLASS.class', but does not initialize CLASS. Also, we don't bother catching exceptions, since the JVM doesn't require us to. I.e. generates: public static class $(String name) { return Class.forName(name, false, Class.forName(THISCLASSNAME).getClassLoader()); } Note that we want the result to use the same ClassLoader as the caller, which is why we generate a static helper method.



getLanguage
public Language getLanguage()(Code)



getLineNumber
final public int getLineNumber()(Code)



getMessages
public SourceMessages getMessages()(Code)



getModule
final public ModuleExp getModule()(Code)



getModuleType
final public ClassType getModuleType()(Code)



getPublicId
public String getPublicId()(Code)



getState
public int getState()(Code)
Returns a code indicating how far along we are in the parsing/compilation process.



getSystemId
public String getSystemId()(Code)



inlineOk
public boolean inlineOk(Expression proc)(Code)



inlineOk
public boolean inlineOk(Procedure proc)(Code)



isPedantic
public boolean isPedantic()(Code)



isStableSourceLocation
public boolean isStableSourceLocation()(Code)



isStatic
public boolean isStatic()(Code)



isValidJavaName
public static boolean isValidJavaName(String name)(Code)



letDone
public LetExp letDone(Expression body)(Code)



letEnter
public void letEnter()(Code)



letStart
public void letStart()(Code)



letVariable
public Declaration letVariable(Object name, Type type, Expression init)(Code)



loadCallContext
final public void loadCallContext()(Code)
Generate code to push the current CallContext on the JVM stack.



loadClassRef
public void loadClassRef(ClassType clas)(Code)



loadClassRef
public void loadClassRef(String className)(Code)
Generate code to load a named Class without initializing it.



lookup
public Declaration lookup(Object name, int namespace)(Code)



loopBody
public void loopBody(Expression body)(Code)



loopCond
public void loopCond(Expression cond)(Code)



loopEnter
public void loopEnter()(Code)
Done handling loop variables, and pushes them into the lexical scope. Ready to parse the loop condition.



loopRepeat
public Expression loopRepeat(Expression[] exps)(Code)



loopRepeat
public Expression loopRepeat()(Code)



loopRepeat
public Expression loopRepeat(Expression exp)(Code)



loopStart
public void loopStart()(Code)
Start a new loop. (We could make this implied by the first loopVaribale call ???)



loopVariable
public Declaration loopVariable(Object name, Type type, Expression init)(Code)



mangleName
public static String mangleName(String name)(Code)



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.



mangleName
public static String mangleName(String name, int kind)(Code)
Convert a string to a safe Java identifier.
Parameters:
  kind - -1 - non-reversible;0: reversible, except that '$' is not mapped;1: reversible



mangleNameIfNeeded
public static String mangleNameIfNeeded(String name)(Code)



mangleURI
public static String mangleURI(String name)(Code)
Map a URI to a package/class name. Similar to the JAXB mangling, and that in the Java language spec.



mustCompileHere
public void mustCompileHere()(Code)
Note that we have seen a construct that must be compiled, not evaluated. If we are not inside a lambda (which is always compiled), but only inside the outer-most ModuleExp, note that it must be compiled.



outputClass
public void outputClass(String directory) throws IOException(Code)



parse
public Expression parse(Object input)(Code)
This may not make sense, except for Lisp-like languages. For those, 'input' an s-expression from the reader.



pop
public void pop(ScopeExp scope)(Code)



pop
final public void pop()(Code)



process
public void process(int wantedState)(Code)
Parse/walk/compile this module as needed and requested. This method does not process any dependent modules (expect indirectly, such as may be done by a require form).
Parameters:
  wantedState - the desired value of getState().



push
public void push(ScopeExp scope)(Code)



push
public void push(Declaration decl)(Code)



pushChain
void pushChain(ScopeExp scope, ScopeExp limit)(Code)



pushNewModule
public ModuleExp pushNewModule(Lexer lexer)(Code)



pushNewModule
public ModuleExp pushNewModule(String filename)(Code)



pushPendingImport
public void pushPendingImport(ModuleInfo info, ScopeExp defs)(Code)



pushScope
final public void pushScope(ScopeExp scope)(Code)



registerForImmediateLiterals
public static synchronized int registerForImmediateLiterals(Compilation comp)(Code)



resolve
public Object resolve(Object name, boolean function)(Code)



setColumn
public void setColumn(int column)(Code)



setCurrent
public static void setCurrent(Compilation comp)(Code)



setCurrentScope
public void setCurrentScope(ScopeExp scope)(Code)
Set currentScope(). Also update the nesting object.



setFile
public void setFile(String filename)(Code)



setLine
public void setLine(int line)(Code)



setLine
final public void setLine(Expression position)(Code)



setLine
public void setLine(Object location)(Code)



setLine
public void setLine(String filename, int line, int column)(Code)



setLocation
final public void setLocation(SourceLocator position)(Code)



setMessages
public void setMessages(SourceMessages messages)(Code)



setModule
public void setModule(ModuleExp mexp)(Code)



setState
public void setState(int state)(Code)



setupLiterals
public static void setupLiterals(int key)(Code)
Call-back from compiled code to initialize literals in immediate mode. In non-immediate mode (i.e. generating class files) the compiler emits code to "re-construct" literal values. However, in immediate mode that would be wasteful, plus we would get values that are similar (equals) to but not necessarily identical (eq) to the compile-time literal. So we need to pass the literal values to the compiled code, by using reflection to initialize various static fields. This method does that. It is called at the start of the generated static initializer, which helps makes things more consistent between immediate and non-immediate mode.



syntaxError
public Expression syntaxError(String message)(Code)
Handle syntax errors (at rewrite time).
Parameters:
  message - an error message to print out an ErrorExp



toString
public String toString()(Code)



usedClass
public void usedClass(Type type)(Code)
Called for classes referenced in bytecode. Since this only does something when immediate, we only care about classes referenced in the bytecode when immediate. It is used to ensure that we can inherit from classes defines when in immediate mode (in Scheme using define-class or similar).



usingCPStyle
public boolean usingCPStyle()(Code)



usingTailCalls
public boolean usingTailCalls()(Code)



walkModule
public void walkModule(ModuleExp mexp)(Code)
Shared processing for both compiling/eval.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.