Commit Graph

6053 Commits

Author SHA1 Message Date
igor%mir2.org
30e63c4179 Fixing bug 258144: my take on patch patch from Andrew Madigan <andymadigan@yahoo.com> to add class compiler option controlling which class will be used for main method implementation. 2004-09-07 19:11:39 +00:00
igor%mir2.org
d29f6cb477 Inline small functions used for code generation to produce intepreter or JVM bytecode for particular parser tree node: they just add to jar file size without readability benefits. 2004-09-07 09:08:31 +00:00
igor%mir2.org
b1162d3958 Refactoring of catch code generation to address bug 258183 and bug 258207. 2004-09-06 20:05:55 +00:00
igor%mir2.org
faab99c5dd Print exception trace inside Kit.codeBug() to have it even if the execption is shadowed by another one 2004-09-06 19:08:11 +00:00
brendan%mozilla.org
42fee317b7 Checking in patch for bug 256501 from Igor Bukanov <igor@fastmail.fm>, r=me. 2004-09-02 00:06:29 +00:00
brendan%mozilla.org
a7487d7136 Add JSRESOLVE_DECLARING and JSRESOLVE_CLASSNAME support for better DOM quirk emulation (257602, r=shaver). 2004-09-01 20:51:39 +00:00
igor%mir2.org
8f793c397e Resolving bug 255891: new approach to dynamic scoping 2004-09-01 14:17:00 +00:00
jruderman%hmc.edu
9ddb229d93 256757 - misused printf causes crash [@ nsXPCWrappedJSClass::CheckForException]. r=sr=jst. 2004-08-30 20:50:24 +00:00
igor%mir2.org
df590d4933 Fixing bug 257425: Context.toObject now works even without Context.iniStandardLibrary 2004-08-30 14:57:25 +00:00
igor%mir2.org
614804384d Fixing bug 257423: the code generation was not updated to use ScriptRuntime.getObjedctProp instead of OptRuntime.thisGet. 2004-08-30 14:48:23 +00:00
brendan%mozilla.org
aef3012317 Fix catch decompilation, again (245308, r=shaver). 2004-08-29 18:00:24 +00:00
igor%mir2.org
ef89c5d451 Renaming Interpreter.State to Interpreter.CallFrame to better reflect class semantics 2004-08-28 19:19:30 +00:00
brendan%mozilla.org
fab50a47cb Preserve LIFO allocation when freeing from the middle of a pool (256642, r=shaver). 2004-08-28 18:43:50 +00:00
igor%mir2.org
1e75534222 Changes to make Interpreter to recover from exceptions during execution of ScriptRuntime.getCatchObject() and during initState and do not leave runtime in inconsitent o even corrupt state. 2004-08-28 17:29:50 +00:00
igor%mir2.org
8eb18ba2ca Implementing 257128: tail call optimization 2004-08-28 00:42:38 +00:00
brendan%mozilla.org
4aa8cd6458 Fix zero-width positive lookahead bustage (256798, r=shaver). 2004-08-27 21:33:05 +00:00
igor%mir2.org
1c4a403de2 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.
2004-08-27 11:37:17 +00:00
kyle.yuan%sun.com
66768b7955 Missed a #else in my previous checkin for bug 239562. 2004-08-27 01:59:09 +00:00
igor%mir2.org
397ed39869 Link to E4X example 2004-08-25 19:26:56 +00:00
igor%mir2.org
d3a2da86ba 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.*. 2004-08-25 17:22:02 +00:00
igor%mir2.org
95799991f8 Interpreter optimization: use state.resultDbl to store double result accross calls of interpreted functions to avoid creation of Double instance. 2004-08-25 15:19:22 +00:00
igor%mir2.org
835abeb4b1 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. 2004-08-25 09:50:32 +00:00
brendan%mozilla.org
868cd103e8 Pave way for E4X, reduce code size of scanner by ~600 bytes (256728, r=shaver). 2004-08-25 02:27:24 +00:00
igor%mir2.org
00faaf6ab8 Fixing bug 256691: forcing XML.hasSimpleContent() to return true for atributes and text. 2004-08-24 11:38:59 +00:00
igor%mir2.org
eea0a0a79d 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.
2004-08-24 11:23:13 +00:00
igor%mir2.org
877212964d Fixing bug 256621: throw \n 1 is not allowed per ECMA 262 2004-08-23 23:01:00 +00:00
igor%mir2.org
4407874e10 Context.hasFeature now calls ContextFactory.hasFeature so application would need to override only one class for common customization. 2004-08-23 22:46:58 +00:00
igor%mir2.org
69135dd38a Addressing 256575: refactoring of parser/scanner iteraction to address bugs in eol/semicolon handling 2004-08-23 19:06:45 +00:00
brendan%mozilla.org
13f72da5b5 Fix another node end line-numbering bug reported by Igor Bukanov on n.p.m.jseng. 2004-08-22 21:32:23 +00:00
brendan%mozilla.org
d9c605bed1 Fix node end line-numbering bug reported by Igor Bukanov on n.p.m.jseng. 2004-08-22 18:51:07 +00:00
igor%mir2.org
347734a288 Resolving bug 256387: XML objects got toSource implementation 2004-08-21 12:26:43 +00:00
igor%mir2.org
1e0a67d725 Fixing bug 256389: working CompilerEnvirons.isXmlAvailable() etc. 2004-08-21 11:10:24 +00:00
igor%mir2.org
a12cf376ae Added notes about addressed bug 256339 2004-08-20 23:01:28 +00:00
igor%mir2.org
199b043221 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. 2004-08-20 22:50:36 +00:00
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
brendan%mozilla.org
5a95353303 Add scoped local root support, plus a few cleanups from the huge e4x patch (40757, r=shaver). 2004-08-19 17:57:36 +00:00
kyle.yuan%sun.com
ccb50ed208 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.
2004-08-19 02:36:36 +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