brendan%mozilla.org
c873c0403c
Fix foo += bar for undefined foo to throw, not bind foo to undefined (321757, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@188600 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-31 20:53:30 +00:00
igor%mir2.org
caf466b112
Bug 319719: JS scanner checks for keywords using pregenerated C source
...
avoiding the cost of atomizing keyword strings. This is an updated version
of the previous rather bad commit to address Makefile issues. r=brendan
git-svn-id: svn://10.0.0.236/trunk@188224 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-26 08:47:51 +00:00
igor%mir2.org
9e4fecd594
Reverting commit for bug 319719: Makefile changes broke too much builds.
...
git-svn-id: svn://10.0.0.236/trunk@188012 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-22 21:08:05 +00:00
igor%mir2.org
d7acf1f679
Bug 319719: JS scanner checks for keywords using pregenerated C source
...
avoiding the cost of atomizing keyword strings. r=brendan
git-svn-id: svn://10.0.0.236/trunk@187990 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-22 01:14:20 +00:00
igor%mir2.org
185501413d
Bug 323765: VarPrefix is thread-safe now. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@187749 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-18 11:17:21 +00:00
igor%mir2.org
f30f3386cc
Implementing bug 322001:
...
JSFunction is shrinked via removal of nref field
and moving interreter-only or native-only fields into union. r=brendan
git-svn-id: svn://10.0.0.236/trunk@187167 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-09 08:26:26 +00:00
brendan%mozilla.org
51d771ae0d
Allow set-call, grouped, and e4x LHS in for-in loop (321874, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@187166 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-09 05:14:52 +00:00
brendan%mozilla.org
8494b10ef8
Fix up disassembly of 24-bit-immediate formats (DEBUG-only 316862, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@186894 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-04 05:53:16 +00:00
shaver%mozilla.org
caaaeca6af
Bug 319490: return in finally should clear pending exceptions. r=mrbkap,
...
sr=brendan.
git-svn-id: svn://10.0.0.236/trunk@186549 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-24 01:09:19 +00:00
igor%mir2.org
d3ea2b8636
Fix for bug 312138:
...
js_HeapSort terminates as soon as sort function indicates so. r=brendan
git-svn-id: svn://10.0.0.236/trunk@184755 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-16 10:02:57 +00:00
mrbkap%gmail.com
c52b3336a1
bug 232182: Allow SpiderMonkey to deal with UTF-8 strings (controlled by a define). Patch from Michael Daumling <daumling@adobe.com>. r=shaver
...
git-svn-id: svn://10.0.0.236/trunk@184170 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-05 01:06:30 +00:00
timeless%mozdev.org
c95aba664f
Bug 313803 uneval() on func with embedded object with getter or setter has unmatched parenthesis
...
patch by colin@theblakes.com r=mrbkap sr=brendan
git-svn-id: svn://10.0.0.236/trunk@183040 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-26 05:23:50 +00:00
brendan%mozilla.org
98cc36b67e
Parenthesize to avoid warning.
...
git-svn-id: svn://10.0.0.236/trunk@182689 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-21 05:00:28 +00:00
brendan%mozilla.org
1c8c9a9006
Followup fix to suppress function:: in decompiler output unless it was explicitly used in JS source (312196, r/sr=mrbkap/shaver).
...
git-svn-id: svn://10.0.0.236/trunk@182611 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-20 19:43:06 +00:00
brendan%mozilla.org
4e0f9f6b7d
Make __noSuchMethod__ work with E4X (312196, r/sr=mrbkap/shaver).
...
git-svn-id: svn://10.0.0.236/trunk@182305 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-15 07:30:59 +00:00
brendan%mozilla.org
d30c3db22a
Fix 310425 (r=mrbkap) and check in Igor's fix for 311497 (r=me).
...
git-svn-id: svn://10.0.0.236/trunk@181834 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-09 06:09:21 +00:00
mrbkap%gmail.com
f23775985b
bug 284032: Make sure to get the right fp when skipping over native frames in the DVG. Patch from Brendan. r=mrbkap
...
git-svn-id: svn://10.0.0.236/trunk@181241 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-30 00:19:48 +00:00
timeless%mozdev.org
ad5af693e6
Bug 307469 jsopcode.c doesn't build w/ !JS_HAS_XML_SUPPORT
...
r=brendan
git-svn-id: svn://10.0.0.236/trunk@179858 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-08 18:54:43 +00:00
mrbkap%gmail.com
ec686a8d55
bug 305883: Protect against the empty XML list to fix a crash when emitting code for |<></>|. Also fix the decompiler to handle XMLLists correctly. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@179068 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-26 18:34:41 +00:00
brendan%mozilla.org
c769380e0b
Put E4X-only stuff within #if JS_HAS_XML_SUPPORT.
...
git-svn-id: svn://10.0.0.236/trunk@178317 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-19 23:35:30 +00:00
mrbkap%gmail.com
073f829a1a
bug 302531: QuoteString doesn't deal with not outputting anything. Also fix some whitespace nits. r=shaver a=brendan
...
git-svn-id: svn://10.0.0.236/trunk@176790 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-28 18:16:30 +00:00
mrbkap%gmail.com
5973774e54
bug 302412: Make sure to call QuoteString on XML strings so non-ASCII strings get properly escaped. Prefer to use small precedences instead of the op = JSOP_NOP hack in the decompiler. JSOP_JSEXPR is a bad name for a bytecode, use the more-consistent name JSOP_STARTXMLEXPR. r+a=brendan
...
git-svn-id: svn://10.0.0.236/trunk@176720 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-28 00:38:40 +00:00
mrbkap%gmail.com
daf2306f91
bug 302097: E4X toString incorrectly quotes JS tag expressions that are used as attributes. r+a=shaver
...
git-svn-id: svn://10.0.0.236/trunk@176679 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-27 16:10:26 +00:00
mrbkap%gmail.com
843d045531
bug 301692: E4X toString quotes the returned XML string. r+a=shaver
...
git-svn-id: svn://10.0.0.236/trunk@176633 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-26 20:43:09 +00:00
mrbkap%gmail.com
1fbc85ce3b
bug 111816: Function.prototype.toString returns extra newlines. Moving the newlines into Decompile to preserve the output of new Script().toString(). r=shaver sr+a=brendan
...
git-svn-id: svn://10.0.0.236/trunk@175050 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-23 16:30:25 +00:00
timeless%mozdev.org
41d4039631
Bug 292400 JS_VERSION 148 doesn't build
...
r=brendan a=asa
git-svn-id: svn://10.0.0.236/trunk@173140 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-06 21:42:39 +00:00
timeless%mozdev.org
b1ff4651bf
Bug 292398 JS_VERSION 140 doesn't build
...
r=brendan a=asa
git-svn-id: svn://10.0.0.236/trunk@173136 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-06 21:25:45 +00:00
brendan%mozilla.org
aae99a8a67
Allow up to 2^23 literals in a script (155081, r=shaver, a=me).
...
git-svn-id: svn://10.0.0.236/trunk@172641 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-23 02:14:20 +00:00
brendan%mozilla.org
bac15332de
Clamp fun->{nargs,nvars}, an old bug laid to rest (290575, r=shaver, a=me).
...
git-svn-id: svn://10.0.0.236/trunk@172371 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-17 16:01:28 +00:00
brendan%mozilla.org
dc77a335e5
Specialize for QARG and QVAR types within JOF_NAME format in js_DecompileValueGenerator (281487, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@169629 18797224-902f-48f8-a5cc-f745e15eee43
2005-02-23 02:40:40 +00:00
brendan%mozilla.org
3677e7a705
Propagate a flag induced by JSOPTION_XML into script and context version fields, for proper run- and compile-time consistency (275742, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@167006 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-24 00:03:59 +00:00
brendan%mozilla.org
555021e00b
- Added strict warning "reference to undefined XML name {0}" to cope with
...
ECMA-357 botch where * or @b or (given valid namespace reference n) n::id
results in undefined, instead of a TypeError.
- Lazily bootstrap AnyName and AttributeName classes, instead of leaving the
former uninitialized, and initializing the latter only if QName is init'ed.
These classes, representing ECMA-357 internal types, must be initialized
in order to string conversion and default value on them to return useful
results. So this change also requires the shared qname_toString to cope
with these classes, which ape QName in having a JSXMLQName as private data.
- Revise Filtering Predicate Expressions bytecode schema to avoid bogo-script
creating in js_FilterXMLObject. With a new JSOP_ENDFILTER bytecode acting
in lieu of JSOP_POPV, but also exiting the nested js_Interpret() call, the
runtime can avoid trying to fake a JSScript for the subsequence of script
bytecode in parens in x.(e), that contains the bytecode for e plus the pop
or endfilter op.
This requires a historic reparameterization of js_Interpret to take the
starting pc! I cleaned up order of declaration, use, and useless init nits
for a few variables while messing with it.
- Based on the above change, fix the decompiler to handle filtered predicate
expressions -- that code was stubbed out till now, and I forgot to go back.
All better now, especially thanks to JSOP_ENDFILTER.
- Also while fixing filtered predicates, eliminate the useless TOK_RP parse
node above the parenthesized expression, to avoid a JSOP_GROUP bytecode.
- Fix js_GetAttributeNameObject so it doesn't take over its QName parameter's
object and rebind it to an object of class AttributeName -- instead, clone
the qn if necessary. This is important to cope with the errata, noticed a
while ago but finally recorded:
9.2.1.2 Step 2(e)(i, ii),
9.2.1.2 Step 7(e)(i),
9.2.1.3 Step 2(b)(ii)(1)(a)
All uses of a.[[Name]] for an attribute a in these sections that pass
that QName object to [[Delete]] must pass an AttributeName cloned from
a.[[Name]]. The [[Name]] internal property is always a QName instance
and never an AttributeName or AnyName instance. But [[Delete]] will
not operate on x.[[Attributes]] when given a QName by these sections,
so a child could be wrongly deleted instead of the attribute of the
same name.
This rework exposed a bug in the XML.prototype.name() impl, where it was
returning an AttributeName, not a QName, for attribute-class XML objects.
Clearly wrong -- the E4X spec makes plain early on that [[Name]] is always
a QName -- but the spec and e4x testsuite seemed to require it due to the
above-noted errata.
git-svn-id: svn://10.0.0.236/trunk@166845 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-18 02:28:21 +00:00
brendan%mozilla.org
f28e3637eb
Expand tabs.
...
git-svn-id: svn://10.0.0.236/trunk@166467 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-09 01:32:19 +00:00
brendan%mozilla.org
036b7c131b
E4X, configured off, code-complete.
...
git-svn-id: svn://10.0.0.236/trunk@165420 18797224-902f-48f8-a5cc-f745e15eee43
2004-11-17 07:43:01 +00:00
brendan%mozilla.org
e1d64a36be
Initial E4X check-in, configured off (246441, rs=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@163236 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-05 10:19:07 +00:00
brendan%mozilla.org
e86875f709
Fix catch decompilation, again (245308, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@161455 18797224-902f-48f8-a5cc-f745e15eee43
2004-08-29 18:00:24 +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
5e433d42a6
Avoid overparenthesizing function expressions (245795, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@157610 18797224-902f-48f8-a5cc-f745e15eee43
2004-06-08 22:15:23 +00:00
brendan%mozilla.org
25a4d6d341
- Improve global variable performance from 3x slower to 1.2x slower than
...
locals (169559, r=shaver).
- Also fix longstanding bug where global regexps in precompiled scripts were
wrongly shared among threads/contexts (165201, r=shaver).
- Also fix strict-aliasing gcc warning causes (206599, r=bryner).
git-svn-id: svn://10.0.0.236/trunk@154749 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-13 01:25:17 +00:00
brendan%mozilla.org
42c8b66573
NARCISSUS ifdefs and related general fixes (r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@152659 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-11 07:21:59 +00:00
brendan%mozilla.org
ee77ac0954
More bug 231518 followup: non-identifier as well as reserved-id property names must be quoted/indexed, not dotted (r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@152092 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-30 20:34:23 +00:00
brendan%mozilla.org
660246582b
Fix quoting/escaping of non-ASCII chars and reserved ids in all property access cases (231518, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@151754 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-23 17:52:03 +00:00
brendan%mozilla.org
f9711b11a9
Fix bug reported by Adrian Klein <master@dragosan.net> where o['if'] is decompiled as o.if.
...
git-svn-id: svn://10.0.0.236/trunk@151509 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-18 18:31:34 +00:00
brendan%mozilla.org
d38cfff671
Fix old bug afflicting for(var i=j in o) hard case; fix for(var... in decompilation; expand tabs in jsopcode.c (226078, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@149520 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-18 23:51:43 +00:00
gerv%gerv.net
123c4a9492
Bug 205418 - Relicense Spidermonkey (js/src) to MPL/LGPL/GPL. Patch by gerv; r,a=brendan.
...
git-svn-id: svn://10.0.0.236/trunk@149331 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:11:16 +00:00
brendan%mozilla.org
b1416c6cce
Revise js_DecompileValueGenerator assertion in light of JS_HAS_NO_SUCH_METHOD.
...
git-svn-id: svn://10.0.0.236/trunk@149073 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 20:31:16 +00:00
brendan%mozilla.org
d256e525a6
Restore long-lost obj=null setting so null() etc. (calling primitive-type values) fails as expected, instead of crashing (224956, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@149057 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-09 03:58:48 +00:00
brendan%mozilla.org
2532d3d12a
Big dynamic footprint win via script filename caching, plus line number fix for strict/const diags (see http://bugzilla.mozilla.org/attachment.cgi?id=127130&action=view for detailed checkin comments; 208030, r/rs=shaver, r=rginda on the jsd change, r=jst on the dom change).
...
git-svn-id: svn://10.0.0.236/trunk@145239 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-26 22:37:11 +00:00
brendan%mozilla.org
c339a9649c
Fixed so overriding Function.prototype.toSource doesn't mess up F.p.toString output, which should decompile the function, including nested function expressions (178389, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@135535 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-21 02:14:53 +00:00
brendan%mozilla.org
a15af1d979
Better macro name, nit-pick on last checkin.
...
git-svn-id: svn://10.0.0.236/trunk@129601 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-14 06:40:59 +00:00