6161 Commits

Author SHA1 Message Date
igor%mir2.org
6e4d78a4a2 Implementing 257128: tail call optimization
git-svn-id: svn://10.0.0.236/trunk@161411 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-28 00:42:38 +00:00
brendan%mozilla.org
76a5c6e70c Fix zero-width positive lookahead bustage (256798, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@161403 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-27 21:33:05 +00:00
igor%mir2.org
57e770c639 Removal of ScriptRuntime.getThis() : it was used by nested functions or
functions declared inside with statements to ensure that their thisObj
is not with or call scope as required by ECMA-262.

But due the changes to support E4X extensions such situation can only happen
when function is accessed as expression like in

var f = function() { }
...

f()

and typically it is exactly nested the functions that are accessed in this way.
So the patch adds optimized code that always check for proper thisObj to
ScriptRuntime.getValueFunctionAndThis and removes getThis and corresponding parsing/code generation code.

In this way when nested functions are accessed  as name or property no checks are done for them and Rhino code slightly shrinks.


git-svn-id: svn://10.0.0.236/trunk@161382 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-27 11:37:17 +00:00
kyle.yuan%sun.com
e828512366 Missed a #else in my previous checkin for bug 239562.
git-svn-id: svn://10.0.0.236/trunk@161374 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-27 01:59:09 +00:00
igor%mir2.org
adfda23c40 Link to E4X example
git-svn-id: svn://10.0.0.236/trunk@161268 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-25 19:26:56 +00:00
igor%mir2.org
df9b3a842d Fixing bug 256865: changing ByteCode constants to int from byte so switches over them would not crash widely installed versions of GCJ like GCJ 3.3.*.
git-svn-id: svn://10.0.0.236/trunk@161256 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-25 17:22:02 +00:00
igor%mir2.org
ce9cf612fa Interpreter optimization: use state.resultDbl to store double result accross calls of interpreted functions to avoid creation of Double instance.
git-svn-id: svn://10.0.0.236/trunk@161240 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-25 15:19:22 +00:00
igor%mir2.org
3d6e3a5183 Optimizing name access: since top scope can not be NativeWith or NativeCall, it is possible to avoid thisObj checks for name-as-function access and "with" statement and XML object checks.
git-svn-id: svn://10.0.0.236/trunk@161224 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-25 09:50:32 +00:00
brendan%mozilla.org
483f1fa2e2 Pave way for E4X, reduce code size of scanner by ~600 bytes (256728, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@161212 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-25 02:27:24 +00:00
igor%mir2.org
344d2d83d0 Fixing bug 256691: forcing XML.hasSimpleContent() to return true for atributes and text.
git-svn-id: svn://10.0.0.236/trunk@161176 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-24 11:38:59 +00:00
igor%mir2.org
6067607f11 More parser/scanner changes under the name of bug 256575 :
Do not scan regexp literals in TokenStream.getToken(). Instead parser will call explicit TokenStream.readRegExp() after it gets / or /= as primary expression. In this way there is no need to use any explicit regexp flags which rather error prone.


git-svn-id: svn://10.0.0.236/trunk@161175 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-24 11:23:13 +00:00
igor%mir2.org
ff99ffa379 Fixing bug 256621: throw \n 1 is not allowed per ECMA 262
git-svn-id: svn://10.0.0.236/trunk@161157 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-23 23:01:00 +00:00
igor%mir2.org
faa00cad8b Context.hasFeature now calls ContextFactory.hasFeature so application would need to override only one class for common customization.
git-svn-id: svn://10.0.0.236/trunk@161156 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-23 22:46:58 +00:00
igor%mir2.org
c6fb2862cf Addressing 256575: refactoring of parser/scanner iteraction to address bugs in eol/semicolon handling
git-svn-id: svn://10.0.0.236/trunk@161146 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-23 19:06:45 +00:00
brendan%mozilla.org
e46aa44602 Fix another node end line-numbering bug reported by Igor Bukanov on n.p.m.jseng.
git-svn-id: svn://10.0.0.236/trunk@161120 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-22 21:32:23 +00:00
brendan%mozilla.org
09ca38ac95 Fix node end line-numbering bug reported by Igor Bukanov on n.p.m.jseng.
git-svn-id: svn://10.0.0.236/trunk@161118 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-22 18:51:07 +00:00
igor%mir2.org
5f96e9702b Resolving bug 256387: XML objects got toSource implementation
git-svn-id: svn://10.0.0.236/trunk@161100 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-21 12:26:43 +00:00
igor%mir2.org
fb56395886 Fixing bug 256389: working CompilerEnvirons.isXmlAvailable() etc.
git-svn-id: svn://10.0.0.236/trunk@161099 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-21 11:10:24 +00:00
igor%mir2.org
4ea71b20a4 Added notes about addressed bug 256339
git-svn-id: svn://10.0.0.236/trunk@161084 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-20 23:01:28 +00:00
igor%mir2.org
98962ca088 Resolving bug 256339: interpreter does not recurse across calls to interpreted functions and scripts and instead uses explicit State object to store JS frame information. It removes the limit on maximum recursion depth in scripts.
git-svn-id: svn://10.0.0.236/trunk@161083 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-20 22:50:36 +00:00
igor%mir2.org
9ea011a767 Fixing bug 256321: IdScriptableObject can be serialized again
git-svn-id: svn://10.0.0.236/trunk@161060 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-20 18:25:20 +00:00
igor%mir2.org
66b37be9d1 Resolving bug 256318: for consistancy with XMLObject.addValues ScriptableObject.equivalentValues also uses NOT_FOUND to indicate no operation available.
git-svn-id: svn://10.0.0.236/trunk@161058 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-20 18:05:50 +00:00
igor%mir2.org
5ed7c2d816 Fixing bug 256317: report about invalid references during parsing, not runtime.
git-svn-id: svn://10.0.0.236/trunk@161057 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-20 17:43:24 +00:00
brendan%mozilla.org
c73434d76b Add scoped local root support, plus a few cleanups from the huge e4x patch (40757, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@161009 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-19 17:57:36 +00:00
kyle.yuan%sun.com
f5b99acd2d Bug 239562 64bit safe code for liveconnect (WinXP AMD64)
r=xiaobin.lu, sr=brendan
a) renamed jsobject to lcjsobject,
b) defined lcjsobject as jint on 32-bit platform or as jlong on 64-bit platform.


git-svn-id: svn://10.0.0.236/trunk@160972 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-19 02:36:36 +00:00
igor%mir2.org
c47df45987 Fixing bug 255891: just without throwing exceptions about non-js values for compatibility.
git-svn-id: svn://10.0.0.236/trunk@160860 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-17 18:33:38 +00:00
igor%mir2.org
d8f3b79624 Removal of bogus comments about parser usage.
git-svn-id: svn://10.0.0.236/trunk@160857 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-17 17:23:44 +00:00
igor%mir2.org
57db940871 Making most of TokenStream methods package-private: the class can not be made package-private itself as regexps implementation needs TokenStream.isJSLineTerminator().
git-svn-id: svn://10.0.0.236/trunk@160856 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-17 17:18:14 +00:00
igor%mir2.org
6ed356bb48 Moving IFGlue internal class of JavaAdapter into separated source file and renaming it to InterfaceAdapter to have more manageable code.
git-svn-id: svn://10.0.0.236/trunk@160811 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-16 17:14:24 +00:00
igor%mir2.org
e56eb05324 Fixing regression caused by new JavaImporter, see bug 245882.
git-svn-id: svn://10.0.0.236/trunk@160809 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-16 16:11:27 +00:00
igor%mir2.org
691855810e More E4X credits
git-svn-id: svn://10.0.0.236/trunk@160802 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-16 14:19:44 +00:00
igor%mir2.org
2fd25835c3 Fixing regression caused by the committed patch under bug 255595
git-svn-id: svn://10.0.0.236/trunk@160795 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-16 09:57:15 +00:00
igor%mir2.org
fe97f0c06b Credits to BEA for E4X implementation.
git-svn-id: svn://10.0.0.236/trunk@160772 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-15 09:05:30 +00:00
igor%mir2.org
38863db9d0 Build modifications to make Context.getImplementationVersion() to return string defined in build property files with automatic timestamping.
git-svn-id: svn://10.0.0.236/trunk@160766 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 22:44:22 +00:00
igor%mir2.org
4fb35c7990 Deprecating PropertyException as a part of common exception root changes, see 244492.
git-svn-id: svn://10.0.0.236/trunk@160765 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 16:45:30 +00:00
igor%mir2.org
736c8aa7e1 Using Kit.initCause to wrap the original exception preventing creation of SecurityController class.
git-svn-id: svn://10.0.0.236/trunk@160764 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 16:42:33 +00:00
igor%mir2.org
ce4cf79edd Documenting ClassFactory usage
git-svn-id: svn://10.0.0.236/trunk@160762 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 15:17:40 +00:00
igor%mir2.org
ba09cca1fd Fixing compatibility issue caused by introduction of ContextFactory. See bug 255595 .
git-svn-id: svn://10.0.0.236/trunk@160761 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 15:12:38 +00:00
igor%mir2.org
f972d58035 Fixing JavaDoc
git-svn-id: svn://10.0.0.236/trunk@160760 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 15:08:32 +00:00
igor%mir2.org
d157625d76 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.
git-svn-id: svn://10.0.0.236/trunk@160759 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 15:07:50 +00:00
igor%mir2.org
62b228e43e Use common API to extract value associated with top scope prototype chain
not to duplicate code


git-svn-id: svn://10.0.0.236/trunk@160758 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 13:57:39 +00:00
igor%mir2.org
6268464201 NativeScript no longer implements Script interface which was kept only f
or compatibility.


git-svn-id: svn://10.0.0.236/trunk@160757 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 10:29:09 +00:00
igor%mir2.org
3fc1e8f2c8 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.


git-svn-id: svn://10.0.0.236/trunk@160756 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 10:28:15 +00:00
igor%mir2.org
86b75f0608 More JavaDoc comments including Context customization example
git-svn-id: svn://10.0.0.236/trunk@160755 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 09:01:26 +00:00
igor%mir2.org
d0e695929a Fixing broken HTML markup in JavaDoc comments.
git-svn-id: svn://10.0.0.236/trunk@160754 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-14 06:44:39 +00:00
igor%mir2.org
6d26f1266f 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);


git-svn-id: svn://10.0.0.236/trunk@160751 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-13 23:45:52 +00:00
igor%mir2.org
12a4b6614e Fixing bug 255549: proper resolution of overloaded methods.
git-svn-id: svn://10.0.0.236/trunk@160730 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-13 19:31:32 +00:00
nboyd%atg.com
ae87d31326 Prepare release candidate for 1.6R1.
git-svn-id: svn://10.0.0.236/trunk@160697 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-12 02:00:09 +00:00
brendan%mozilla.org
b0ea43af3b Decompile return from try or catch with finally correctly (255245, r=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@160688 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-11 23:07:15 +00:00
brendan%mozilla.org
8e4956796a Fix simple-match optimization for positive and negative lookahead assertions (254296, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@160646 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-11 02:27:29 +00:00