80 Commits

Author SHA1 Message Date
brendan%mozilla.org
68b5da6d05 Igor's cleanup patch, with some decompiler assist from me (354982, r=us).
git-svn-id: svn://10.0.0.236/trunk@213135 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-05 00:19:49 +00:00
brendan%mozilla.org
888b773558 Destructuring decompilation (346642, anticipating r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@212920 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-30 06:46:56 +00:00
brendan%mozilla.org
543e5891d9 Prep patch for 'plan A' (346642, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@211917 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-18 11:04:30 +00:00
brendan%mozilla.org
79db1c74a7 Fix new and related precedence problems (352312, r=sayrer/jesse).
git-svn-id: svn://10.0.0.236/trunk@209953 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-13 00:16:46 +00:00
brendan%mozilla.org
d59a72371b Give JSOP_FORNAME, etc., operator precedences (352375, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@209888 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-12 19:28:42 +00:00
brendan%mozilla.org
f87b8e7017 Rest of checkin for bug 352079, r=mrbkap.
git-svn-id: svn://10.0.0.236/trunk@209840 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-12 06:21:23 +00:00
brendan%mozilla.org
ce5368ea79 Fix JSOP_SETCALL and JSOP_POPV precedences; turn off auto-parens for bracketed index values (352079, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@209817 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-12 02:07:32 +00:00
brendan%mozilla.org
dbc421d57f Fix precedence-based decompilation (352026 and dependents, r=mrbkap/sayrer).
git-svn-id: svn://10.0.0.236/trunk@209744 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-11 18:29:33 +00:00
sayrer%gmail.com
f030c20502 bug 352060. Fixes for getter/setter keywords, XML assign decompile printfs, and precedence table. r=brendan
git-svn-id: svn://10.0.0.236/trunk@209723 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-11 16:38:45 +00:00
brendan%mozilla.org
95bdf20340 Give yield least precedence (352015, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@209620 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-10 08:34:35 +00:00
brendan%mozilla.org
033791f368 Fix for-in loops to be yieldable (r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@209591 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-09 22:43:11 +00:00
brendan%mozilla.org
e374f733e5 Fix 351626 and 351705, r=mrbkap/sayrer.
git-svn-id: svn://10.0.0.236/trunk@209369 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-07 19:48:07 +00:00
brendan%mozilla.org
1b6763e182 Remove extraneous JOF_XMLNAME format flags (350226, r=jwalden).
git-svn-id: svn://10.0.0.236/trunk@209320 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-07 05:53:02 +00:00
brendan%mozilla.org
ed53941dbd Object and array initializers must be parenthesized if expression statements (351625, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@209319 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-07 05:50:23 +00:00
brendan%mozilla.org
a70cb307b3 Fix operator precedences and make the most of them when decompiling (350531, r=mrbkap/sayrer).
git-svn-id: svn://10.0.0.236/trunk@209249 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-06 06:31:08 +00:00
brendan%mozilla.org
c8c294f61b Fix try/catch/finally code generation (350312, r=igor/shaver).
git-svn-id: svn://10.0.0.236/trunk@208767 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-29 23:15:22 +00:00
brendan%mozilla.org
e029719e46 Fix delete property and method call operand decompilation cases (350242, r=mrbkap/shaver).
git-svn-id: svn://10.0.0.236/trunk@208582 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-27 21:08:41 +00:00
brendan%mozilla.org
f9be985cca JSOP_ENDFILTER, not JSOP_FILTER, needs to have high precedence (350271, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@208576 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-27 17:31:13 +00:00
mrbkap%gmail.com
7336bd4b27 Make let expressions have a good precedence and use it around 'new' expressions. bug 349499, r=brendan
git-svn-id: svn://10.0.0.236/trunk@208057 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-21 22:35:22 +00:00
brendan%mozilla.org
272b2dbe59 Fix '+ +x', '- --x', etc. decompilation (346904, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@207767 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-17 20:24:38 +00:00
brendan%mozilla.org
63802ab69d Destructuring catch variables, plus TOK_LEXICALSCOPE cleanup (336379, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@207711 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-17 08:13:18 +00:00
brendan%mozilla.org
ec020514bd Change catch clauses to use lexical scope, etc. (336379, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@207546 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-16 05:01:14 +00:00
brendan%mozilla.org
01d8f43d47 Backing out yet again, another latent bug bites.
git-svn-id: svn://10.0.0.236/trunk@207426 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-15 07:39:01 +00:00
brendan%mozilla.org
208e581b5d Change catch clauses to use lexical scope, etc. (336379, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@207423 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-15 07:03:14 +00:00
brendan%mozilla.org
7dd2751681 Back out last change for now, it ran into a latent block XDR bug.
git-svn-id: svn://10.0.0.236/trunk@207413 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-15 03:51:23 +00:00
brendan%mozilla.org
08081ef816 Change catch clauses to use lexical scope, etc. (336379, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@207404 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-15 01:29:37 +00:00
brendan%mozilla.org
0a940b7247 JS_1_7_ALPHA_BRANCH landing, mainly destructuring optimizations and let completion (336373, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@201636 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-06 01:25:44 +00:00
brendan%mozilla.org
6274493000 Coroutine generators, a la Python 2.5 (326466, r=igor).
git-svn-id: svn://10.0.0.236/trunk@198979 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-04 02:19:09 +00:00
brendan%mozilla.org
2fb9f8c051 First big wave of js1.7 changes (326466, 336376, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@198099 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-20 22:27:28 +00:00
mrbkap%gmail.com
685578b30f Make typeof (0, undef) throw a reference error. bug 333728, r=brendan
git-svn-id: svn://10.0.0.236/trunk@195611 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-27 23:49:51 +00:00
brendan%mozilla.org
d2a185a15e Fix int constant precedent (333541, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@194471 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-16 05:10:10 +00:00
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
brendan%mozilla.org
e26f643b27 Threaded interpreter, first step toward more aggressive optimizations (121414, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@184970 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-19 03:20:17 +00:00
brendan%mozilla.org
fed9ff461c Toasted Windows, not able to debug till tomorrow, backing out.
git-svn-id: svn://10.0.0.236/trunk@184896 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-18 06:19:46 +00:00
brendan%mozilla.org
52c3451162 Threaded interpreter, first step toward more aggressive optimizations (121414, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@184885 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-18 04:22:25 +00:00
gavin%gavinsharp.com
6cebfdb835 Bug 312260: Bogus "undefined property" strict warning in switch discriminants, patch by Jeff Walden <jwalden@mit.edu>, r=brendan
git-svn-id: svn://10.0.0.236/trunk@182344 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-16 22:14:30 +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
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
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
brendan%mozilla.org
605a13bf22 Comment tweak.
git-svn-id: svn://10.0.0.236/trunk@173501 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-17 03:00:49 +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
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
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
5302853512 Yet more JOF_DETECTING (259935, r=self).
git-svn-id: svn://10.0.0.236/trunk@163535 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-11 19:21:05 +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
fb1bc8f1ea Make JSOP_SET{PROP,ELEM} be detecting (259935, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@162566 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-21 00:25:46 +00:00
brendan%mozilla.org
2e85eaa612 Add JSRESOLVE_DECLARING and JSRESOLVE_CLASSNAME support for better DOM quirk emulation (257602, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@161606 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-01 20:51:39 +00:00
brendan%mozilla.org
0144b0c6a4 Improve JSRESOLVE_DETECTING to handle typeof, ==, !=, etc.; don't give undefined property strict warning for detecting cases (253150, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@160075 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-29 20:44:20 +00:00
brendan%mozilla.org
9edbb0b2c1 Improve JSRESOLVE_DETECTING by treating 'terminal' uses of, e.g., document.all as detecting (248549, r=jst).
git-svn-id: svn://10.0.0.236/trunk@159266 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-15 18:53:59 +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