Commit Graph

1668 Commits

Author SHA1 Message Date
igor%mir2.org
91951930f8 Fixing bug 256321: IdScriptableObject can be serialized again 2004-08-20 18:25:20 +00:00
igor%mir2.org
e056c6cd39 Resolving bug 256318: for consistancy with XMLObject.addValues ScriptableObject.equivalentValues also uses NOT_FOUND to indicate no operation available. 2004-08-20 18:05:50 +00:00
igor%mir2.org
26c18b6cfb Fixing bug 256317: report about invalid references during parsing, not runtime. 2004-08-20 17:43:24 +00:00
igor%mir2.org
0689482587 Fixing bug 255891: just without throwing exceptions about non-js values for compatibility. 2004-08-17 18:33:38 +00:00
igor%mir2.org
09701f4359 Removal of bogus comments about parser usage. 2004-08-17 17:23:44 +00:00
igor%mir2.org
bef500ee34 Making most of TokenStream methods package-private: the class can not be made package-private itself as regexps implementation needs TokenStream.isJSLineTerminator(). 2004-08-17 17:18:14 +00:00
igor%mir2.org
20f6aade13 Moving IFGlue internal class of JavaAdapter into separated source file and renaming it to InterfaceAdapter to have more manageable code. 2004-08-16 17:14:24 +00:00
igor%mir2.org
93887dc7c3 Fixing regression caused by new JavaImporter, see bug 245882. 2004-08-16 16:11:27 +00:00
igor%mir2.org
4deb4c2996 More E4X credits 2004-08-16 14:19:44 +00:00
igor%mir2.org
2b2decb7d3 Fixing regression caused by the committed patch under bug 255595 2004-08-16 09:57:15 +00:00
igor%mir2.org
5f3d7d50b3 Credits to BEA for E4X implementation. 2004-08-15 09:05:30 +00:00
igor%mir2.org
a480374b2f Build modifications to make Context.getImplementationVersion() to return string defined in build property files with automatic timestamping. 2004-08-14 22:44:22 +00:00
igor%mir2.org
c7b18deb40 Deprecating PropertyException as a part of common exception root changes, see 244492. 2004-08-14 16:45:30 +00:00
igor%mir2.org
eed65b7987 Using Kit.initCause to wrap the original exception preventing creation of SecurityController class. 2004-08-14 16:42:33 +00:00
igor%mir2.org
e1db421213 Documenting ClassFactory usage 2004-08-14 15:17:40 +00:00
igor%mir2.org
82fc688a4b Fixing compatibility issue caused by introduction of ContextFactory. See bug 255595 . 2004-08-14 15:12:38 +00:00
igor%mir2.org
5f819fdbb3 Fixing JavaDoc 2004-08-14 15:08:32 +00:00
igor%mir2.org
8899a6261b Changing Kit.initCause to take and return RuntimeException: this is how it is supposed to be used, that is wrap checkable exceptions into uncheckable RuntimeExceptions. 2004-08-14 15:07:50 +00:00
igor%mir2.org
0f600362d0 Use common API to extract value associated with top scope prototype chain
not to duplicate code
2004-08-14 13:57:39 +00:00
igor%mir2.org
d5de09d352 NativeScript no longer implements Script interface which was kept only f
or compatibility.
2004-08-14 10:29:09 +00:00
igor%mir2.org
b33cc857e0 The scope argument is removed from Context.decompileScript() since
decompilation does not depends on scope.
For compatibility the old signature is preserved as a deprecated method.
2004-08-14 10:28:15 +00:00
igor%mir2.org
406e4ecd31 More JavaDoc comments including Context customization example 2004-08-14 09:01:26 +00:00
igor%mir2.org
fb9b2ea140 Fixing broken HTML markup in JavaDoc comments. 2004-08-14 06:44:39 +00:00
igor%mir2.org
83a55815ca Renaming Kit.initCauseOrNull into simple Kit.initCause and making it to
return the passed exception to allow usage like:

throw Kit.initCause(new RuntimeException("WRAPPED"), origException);
2004-08-13 23:45:52 +00:00
igor%mir2.org
3a68eb5402 Fixing bug 255549: proper resolution of overloaded methods. 2004-08-13 19:31:32 +00:00
nboyd%atg.com
2268b493bb Prepare release candidate for 1.6R1. 2004-08-12 02:00:09 +00:00
igor%mir2.org
98d50120c7 Using explicit JavaImporter constructor to make namespace for swing and using it later with the "with" statement to get access to Java classes.
In this way the example can be used in an application that does not use ImporterTopLevel.
2004-08-10 16:11:13 +00:00
igor%mir2.org
e4d1c4896b 1. Separating compilation into bytecode and wrapping it into Script and Function instances both for the interpreter and class compiler. It is possible now to serialize the compiled interpreter bytecode and then wrap it in proper security context.
The change required to move security domain information form InterpreterData to its Scriptable wrappers. To simplify it and to make the interpreted functions to behave exactly as class compiled I merged InterpretedScript into InterpretedFunction which allowed to remove many casts and discrepancies when handling script and function instances.

2. Explicitly passing Interpreter instances to Context.compile... functions to avoid changing optimization level even temporarily.

3. Uniform initialization of class compiled and interpreted functions and scripts to avoid code duplication.
2004-08-10 16:06:56 +00:00
igor%mir2.org
771b98446a In JavaAdapter.currentFactory() do not assume that there is always active Context available and fallback to ContextFactory.getGlobal() in that case. 2004-08-10 15:52:19 +00:00
igor%mir2.org
31ff23cd2e Simpler SyntxError handling:
Since changes to fix bug 254778 made the parser the sole source of syntax error reports, it removed the need to check for errors after tree transformation.

The patch removes those checks and moves all reporting about syntax errors into omj/Parser.java.
2004-08-09 18:04:18 +00:00
igor%mir2.org
ca75e5c0c8 Fixing bug 254915: proper name lookup etc. 2004-08-09 16:57:06 +00:00
igor%mir2.org
5f71fe6973 Top call scope tracking changes:
Since E4X implementation needs to know the activation scope for tracking of default namespaces, previously an elaborated schema was added to set/restore the activation scope which relied on the fact that scrip and function with activation record should always call special entry/exit functions.

But that does not work for functions without activation records since they never call any special entry/exit pairs. So if application call such function directly, the function would not store its top scope anywhere and the E4X subsystem would not be able to get E4X library object.

The patch fixes with introduction of 2 functions, hasTopCall and doTopCall to ScriptRuntime and adding the following code prefix to each implementation of Callable.call that can start execution of script code:

    public Object call(Context cx, Scriptable scope,
                       Scriptable thisObj, Object[] args)
        throws JavaScriptException
    {
// Prefix start
        if (!ScriptRuntime.hasTopCall(cx)) {
            return ScriptRuntime.doTopCall(this, cx, scope, thisObj, args);
        }
// Prefix end
        ...

In this way there is always registered top scope during script execution and the previous elaborated schema became unnecessary so I reverted that part to almost pre-E4x state.
2004-08-09 11:00:47 +00:00
igor%mir2.org
792304a2a9 Fixing bug 254778: proper treatment of labels 2004-08-08 13:45:09 +00:00
igor%mir2.org
c70ca4f034 More switch parsing/code generation cleanups: now IRFactory constructs the proper parsed tree for the switch statement which removed the need for tree mutations in NodeTransformer and during code generation. 2004-08-07 20:08:38 +00:00
igor%mir2.org
0426521c68 Cleanup for code generation in interpreter: store itsICodeTop as instance variable to avoid clattering code with explicit passing of iCodeTop, 2004-08-07 15:42:13 +00:00
igor%mir2.org
4731a8f0f9 Switch parsing cleanup including reporting syntax error on duplicated default label 2004-08-07 15:39:55 +00:00
igor%mir2.org
87d0f3525d Preparations for 1.6R1 2004-08-06 16:05:40 +00:00
igor%mir2.org
8bcaa1a262 Class-Path entry for Rhino: xmlbean.jar 2004-08-06 15:49:25 +00:00
igor%mir2.org
0d8bd6fe39 Cleanup of call code generation: now it is split into separated functions for optimized/standard function calls. 2004-08-06 15:08:38 +00:00
igor%mir2.org
11ce08544d Removal of no longer used debug name index in Token.CALL/Token.REF_CALL: ScriptRuntime.get(Elem|Prop|Name|Value)FunctionAndThis takes care about debugging themselves. 2004-08-06 15:02:48 +00:00
igor%mir2.org
743dad92a4 GeneratedClassLoader is API class and should be listed in apiClasses.properties 2004-08-05 06:06:30 +00:00
igor%mir2.org
0cf7fb3e59 Restoring ScriptRuntime.call: BSF uses it! 2004-08-04 17:42:56 +00:00
igor%mir2.org
53e6af4c84 Allow to pass JS-wrapped instances of org.apache.xmlbeans.XmlCursor and org.apache.xmlbeans.XmlObject to XML constructor to make proper XML objects from them. 2004-08-04 17:32:48 +00:00
igor%mir2.org
ec4ab45708 Preparations for Rhino 1.6R1 RC1 2004-08-04 17:28:11 +00:00
igor%mir2.org
4a8da93dda 1. Recently introduced ScriptableObject.default(Prototype|ParentScope)() methods had problems with serialization and are removed now. XML code explicitly sets parent/prototype. To simplify that ScriptableObject now contains a special constructor taking scope and prototype arguments.
2. xml/XMLObject do not define lib() method and instead defines few abstract methods to create "with" proxies and perform addition.

3. XMLLib implementation is stored in the scope using ScriptableObject.associateValue() and does not depend on presence of proper XML object.
2004-08-04 12:54:03 +00:00
igor%mir2.org
35ca775423 Preparations for 1.6R1 RC1 2004-08-03 17:13:40 +00:00
igor%mir2.org
b73081a5a8 Cosmetics: untabify 2004-08-02 17:49:04 +00:00
igor%mir2.org
73d09ce2c9 Added runtime support to allow custom wrapping of XML objects 2004-08-02 14:46:33 +00:00
igor%mir2.org
81e82296c8 Use ScriptRuntime.notAFunction to report bad ScriptableObject.callMethod arguments 2004-08-02 14:44:03 +00:00
igor%mir2.org
e32e12b401 Explicit ScriptRuntime methods to get function and function this for all cases of method calls:
ScriptRuntime.get(Name|Prop|Elem|Value)FunctionAndThis provides uniform way to get function object and its this during function calls. It allowed to simplify handling of method calls both in interpreter and optimizer and opened a way to implement independent processing of function and property namespaces.
2004-08-01 23:21:17 +00:00