Java Doc for CompilerContext.java in  » Scripting » oscript-2.10.4 » oscript » compiler » 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 » oscript 2.10.4 » oscript.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   oscript.compiler.CompilerContext

CompilerContext
public class CompilerContext (Code)
The syntax-tree (parse-tree) does not simply translate into a single NodeEvaluator. Instead, functions defined within the file, etc., also turn into "nested" NodeEvaluators. Each nested NodeEvaluator results in construction of a new compiler (CompilerVisitor), which contributes an additional evalNodeX to the same classfile......


Field Summary
final static  ObjectTypeANY_EXCEPTION_TYPE
    
final public static  booleanDEBUG
    
final public static  int[]EMPTY_ARG_IDS
    
final static  String[]EVAL_NODE_ARG_NAMES
    
final static  org.apache.bcel.generic.Type[]EVAL_NODE_ARG_TYPES
    
final static  ObjectTypeEXCEPTION_TYPE
    
final static  org.apache.bcel.generic.TypeOBJECT_TYPE
     Note, conflict between org.apache.bcel.generic.Type and oscript.data.Type.
final static  org.apache.bcel.generic.TypeSCOPE_TYPE
    
final static  org.apache.bcel.generic.TypeSTRING_TYPE
    
final static  org.apache.bcel.generic.TypeSYMBOL_TABLE_TYPE
    
final static  org.apache.bcel.generic.TypeVALUE_ARRAY_TYPE
    
final static  org.apache.bcel.generic.TypeVALUE_TYPE
    
 ClassGencg
     The class that is being built.
 StringclassName
     The name of the class that is generated.
 ConstantPoolGencp
     The constant-pool of the class that is being built.
 CompilerVisitorcv
    
public static  intfailed
    
 Stringname
    
public static  intsucceeded
    


Method Summary
 voidaddSMITs(int evalNodeIdx, int[] smitIdxs)
     For each function, in addition to having an specific eval method, has a SMIT.
final static  CompiledNodeEvaluatorcompileNode(String name, Node node)
    
 intfieldref(String className, String methodName, String sig)
    
 intgetInstanceConstantIdx(Object obj)
     Get the instance variable index of the specified object.
 intgetNextEvalNodeIdx(String name)
     Get the index used for the name of the next evalNodeX() method.
static  org.apache.bcel.generic.TypegetPrimitiveType(Class c)
    
static  org.apache.bcel.generic.TypegetType(Class c)
    
 intifmethodref(String className, String methodName, String sig)
    
static  ClassmakeAccessible(Class c)
    
 intmakeField(String name, Class cls)
    
static  StringmakeUniqueIdentifierName(String name)
    
 intmethodref(String className, String methodName, String sig)
    
 voidpushFunctionData(InstructionList il, int id, int[] argIds, boolean varargs, int extendsIdx, int fxnIdx, int staticIdx, boolean hasVarInScope, boolean hasFxnInScope, Value comment)
    
 voidpushInstanceConstant(InstructionList il, Object obj)
     push the instance constant onto the stack, setting ret-val to true.
 voidpushInt(InstructionList il, int i)
    
 voidpushSymbol(InstructionList il, String name)
     Push symbol id (int) on stack.

Field Detail
ANY_EXCEPTION_TYPE
final static ObjectType ANY_EXCEPTION_TYPE(Code)



DEBUG
final public static boolean DEBUG(Code)



EMPTY_ARG_IDS
final public static int[] EMPTY_ARG_IDS(Code)



EVAL_NODE_ARG_NAMES
final static String[] EVAL_NODE_ARG_NAMES(Code)



EVAL_NODE_ARG_TYPES
final static org.apache.bcel.generic.Type[] EVAL_NODE_ARG_TYPES(Code)



EXCEPTION_TYPE
final static ObjectType EXCEPTION_TYPE(Code)



OBJECT_TYPE
final static org.apache.bcel.generic.Type OBJECT_TYPE(Code)
Note, conflict between org.apache.bcel.generic.Type and oscript.data.Type.



SCOPE_TYPE
final static org.apache.bcel.generic.Type SCOPE_TYPE(Code)



STRING_TYPE
final static org.apache.bcel.generic.Type STRING_TYPE(Code)



SYMBOL_TABLE_TYPE
final static org.apache.bcel.generic.Type SYMBOL_TABLE_TYPE(Code)



VALUE_ARRAY_TYPE
final static org.apache.bcel.generic.Type VALUE_ARRAY_TYPE(Code)



VALUE_TYPE
final static org.apache.bcel.generic.Type VALUE_TYPE(Code)



cg
ClassGen cg(Code)
The class that is being built.



className
String className(Code)
The name of the class that is generated.



cp
ConstantPoolGen cp(Code)
The constant-pool of the class that is being built.



cv
CompilerVisitor cv(Code)
topmost compiler instance



failed
public static int failed(Code)



name
String name(Code)



succeeded
public static int succeeded(Code)





Method Detail
addSMITs
void addSMITs(int evalNodeIdx, int[] smitIdxs)(Code)
For each function, in addition to having an specific eval method, has a SMIT. The CompilerContext needs to know it's index, so it can generate an accessor method.



compileNode
final static CompiledNodeEvaluator compileNode(String name, Node node)(Code)
The entry-point to the compiler



fieldref
int fieldref(String className, String methodName, String sig)(Code)



getInstanceConstantIdx
int getInstanceConstantIdx(Object obj)(Code)
Get the instance variable index of the specified object. The first time this is called with a given object, this creates an member variable within the constructed class.



getNextEvalNodeIdx
int getNextEvalNodeIdx(String name)(Code)
Get the index used for the name of the next evalNodeX() method. This is tracked here so an evalInnerNode switch method can be constructed with the appropriate number of cases

The generated method corresponding to this index, should have the name "_" + idx + "_" + name




getPrimitiveType
static org.apache.bcel.generic.Type getPrimitiveType(Class c)(Code)



getType
static org.apache.bcel.generic.Type getType(Class c)(Code)



ifmethodref
int ifmethodref(String className, String methodName, String sig)(Code)



makeAccessible
static Class makeAccessible(Class c)(Code)



makeField
int makeField(String name, Class cls)(Code)



makeUniqueIdentifierName
static String makeUniqueIdentifierName(String name)(Code)



methodref
int methodref(String className, String methodName, String sig)(Code)



pushFunctionData
void pushFunctionData(InstructionList il, int id, int[] argIds, boolean varargs, int extendsIdx, int fxnIdx, int staticIdx, boolean hasVarInScope, boolean hasFxnInScope, Value comment)(Code)
push FunctionData on the stack, but cached



pushInstanceConstant
void pushInstanceConstant(InstructionList il, Object obj)(Code)
push the instance constant onto the stack, setting ret-val to true.



pushInt
void pushInt(InstructionList il, int i)(Code)



pushSymbol
void pushSymbol(InstructionList il, String name)(Code)
Push symbol id (int) on stack. Note that the numeric value of the symbol may be different on differerent invocations of the script engine. In the case of SymbolTables, this is taken into account when serializing, so when the table is re-created it is using the current numeric values of the symbol. the current symbol value (ie. with the current symbol table,but could be different when code is reloaded into a differentinvokation of the script env)



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.