Source Code Cross Referenced for InterpreterData.java in  » Scripting » rhino » org » mozilla » javascript » 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 » rhino » org.mozilla.javascript 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
002:         *
003:         * ***** BEGIN LICENSE BLOCK *****
004:         * Version: MPL 1.1/GPL 2.0
005:         *
006:         * The contents of this file are subject to the Mozilla Public License Version
007:         * 1.1 (the "License"); you may not use this file except in compliance with
008:         * the License. You may obtain a copy of the License at
009:         * http://www.mozilla.org/MPL/
010:         *
011:         * Software distributed under the License is distributed on an "AS IS" basis,
012:         * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
013:         * for the specific language governing rights and limitations under the
014:         * License.
015:         *
016:         * The Original Code is Rhino code, released
017:         * May 6, 1999.
018:         *
019:         * The Initial Developer of the Original Code is
020:         * Netscape Communications Corporation.
021:         * Portions created by the Initial Developer are Copyright (C) 1997-2000
022:         * the Initial Developer. All Rights Reserved.
023:         *
024:         * Contributor(s):
025:         *   Norris Boyd
026:         *   Bob Jervis
027:         *   Roger Lawrence
028:         *
029:         * Alternatively, the contents of this file may be used under the terms of
030:         * the GNU General Public License Version 2 or later (the "GPL"), in which
031:         * case the provisions of the GPL are applicable instead of those above. If
032:         * you wish to allow use of your version of this file only under the terms of
033:         * the GPL and not to allow others to use your version of this file under the
034:         * MPL, indicate your decision by deleting the provisions above and replacing
035:         * them with the notice and other provisions required by the GPL. If you do
036:         * not delete the provisions above, a recipient may use your version of this
037:         * file under either the MPL or the GPL.
038:         *
039:         * ***** END LICENSE BLOCK ***** */
040:
041:        package org.mozilla.javascript;
042:
043:        import java.io.Serializable;
044:
045:        import org.mozilla.javascript.debug.DebuggableScript;
046:
047:        final class InterpreterData implements  Serializable, DebuggableScript {
048:            static final long serialVersionUID = 5067677351589230234L;
049:
050:            static final int INITIAL_MAX_ICODE_LENGTH = 1024;
051:            static final int INITIAL_STRINGTABLE_SIZE = 64;
052:            static final int INITIAL_NUMBERTABLE_SIZE = 64;
053:
054:            InterpreterData(int languageVersion, String sourceFile,
055:                    String encodedSource) {
056:                this .languageVersion = languageVersion;
057:                this .itsSourceFile = sourceFile;
058:                this .encodedSource = encodedSource;
059:
060:                init();
061:            }
062:
063:            InterpreterData(InterpreterData parent) {
064:                this .parentData = parent;
065:                this .languageVersion = parent.languageVersion;
066:                this .itsSourceFile = parent.itsSourceFile;
067:                this .encodedSource = parent.encodedSource;
068:
069:                init();
070:            }
071:
072:            private void init() {
073:                itsICode = new byte[INITIAL_MAX_ICODE_LENGTH];
074:                itsStringTable = new String[INITIAL_STRINGTABLE_SIZE];
075:            }
076:
077:            String itsName;
078:            String itsSourceFile;
079:            boolean itsNeedsActivation;
080:            int itsFunctionType;
081:
082:            String[] itsStringTable;
083:            double[] itsDoubleTable;
084:            InterpreterData[] itsNestedFunctions;
085:            Object[] itsRegExpLiterals;
086:
087:            byte[] itsICode;
088:
089:            int[] itsExceptionTable;
090:
091:            int itsMaxVars;
092:            int itsMaxLocals;
093:            int itsMaxStack;
094:            int itsMaxFrameArray;
095:
096:            // see comments in NativeFuncion for definition of argNames and argCount
097:            String[] argNames;
098:            boolean[] argIsConst;
099:            int argCount;
100:
101:            int itsMaxCalleeArgs;
102:
103:            String encodedSource;
104:            int encodedSourceStart;
105:            int encodedSourceEnd;
106:
107:            int languageVersion;
108:
109:            boolean useDynamicScope;
110:
111:            boolean topLevel;
112:
113:            Object[] literalIds;
114:
115:            UintMap longJumps;
116:
117:            int firstLinePC = -1; // PC for the first LINE icode
118:
119:            InterpreterData parentData;
120:
121:            boolean evalScriptFlag; // true if script corresponds to eval() code
122:
123:            public boolean isTopLevel() {
124:                return topLevel;
125:            }
126:
127:            public boolean isFunction() {
128:                return itsFunctionType != 0;
129:            }
130:
131:            public String getFunctionName() {
132:                return itsName;
133:            }
134:
135:            public int getParamCount() {
136:                return argCount;
137:            }
138:
139:            public int getParamAndVarCount() {
140:                return argNames.length;
141:            }
142:
143:            public String getParamOrVarName(int index) {
144:                return argNames[index];
145:            }
146:
147:            public boolean getParamOrVarConst(int index) {
148:                return argIsConst[index];
149:            }
150:
151:            public String getSourceName() {
152:                return itsSourceFile;
153:            }
154:
155:            public boolean isGeneratedScript() {
156:                return ScriptRuntime.isGeneratedScript(itsSourceFile);
157:            }
158:
159:            public int[] getLineNumbers() {
160:                return Interpreter.getLineNumbers(this );
161:            }
162:
163:            public int getFunctionCount() {
164:                return (itsNestedFunctions == null) ? 0
165:                        : itsNestedFunctions.length;
166:            }
167:
168:            public DebuggableScript getFunction(int index) {
169:                return itsNestedFunctions[index];
170:            }
171:
172:            public DebuggableScript getParent() {
173:                return parentData;
174:            }
175:
176:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.