brendan%mozilla.org
9c307e16dc
Support generator expressions for JS1.8 (380237, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@226595 18797224-902f-48f8-a5cc-f745e15eee43
2007-05-18 01:41:17 +00:00
igor%mir2.org
1d2ef0ee9d
Bug 373082: Changine XML method lookup to never alter "this". r=brendan,jwalden
...
git-svn-id: svn://10.0.0.236/trunk@222394 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-26 09:07:24 +00:00
mrbkap%gmail.com
153c0b37e6
Implement ES4's /y option on regular expressions. This is useful for scripts that want to use regular expressions for lexical scanning and don't want to have to chop the input string and use ^ to avoid O(n^2) lexing time. bug 371932, r=crowder
...
git-svn-id: svn://10.0.0.236/trunk@221753 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-11 19:36:59 +00:00
crowder%fiverocks.com
61ae98c7fd
Bug 367121: thread-safety and ordering issues in Script object, r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@220974 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-27 04:35:35 +00:00
crowder%fiverocks.com
8127b3f88d
Bug 367923: tweak strict warning for variable that redeclares function parameter, patch by Ryan Jones bugs@ryan-jones.com, r=crowder
...
git-svn-id: svn://10.0.0.236/trunk@218821 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 23:44:39 +00:00
brendan%mozilla.org
7c11ff927b
Fix bogus assertion and improve comment per mrbkap's suggestion (366468).
...
git-svn-id: svn://10.0.0.236/trunk@218095 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 01:47:58 +00:00
brendan%mozilla.org
427a39fb9a
Fix 241468, r=igor.
...
git-svn-id: svn://10.0.0.236/trunk@213252 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-06 20:13:46 +00:00
igor.bukanov%gmail.com
8ab32a68fe
JS_VERSION_IS_ECMA is removed as always-true-macro since SpiderMonkey no longer supports any version less than JavaScript1.5 bug=353315 r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@212056 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-20 10:09:28 +00:00
brendan%mozilla.org
0a5baa71ae
Stop yield from filtering predicate for now (350809, r=igor).
...
git-svn-id: svn://10.0.0.236/trunk@209346 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-07 16:10:48 +00:00
brendan%mozilla.org
4c4ed66ace
Fix CheckDestructuring to reject array comprehensions (which start out as array initialisers) right away (350279, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@209317 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-07 04:10:46 +00:00
brendan%mozilla.org
5242cc366a
Fix to require parentheses around yield expression in argument list (351514, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@209300 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-06 22:52:28 +00:00
igor.bukanov%gmail.com
6ad60918ce
Bug 349331: Implementation of generator.close now uses asynchronous return instead of GeneratorExit exception. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@208545 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-26 20:24:45 +00:00
brendan%mozilla.org
5700a4cef6
Fix closing a generator to throw if the generator ignores GeneratorExit; also fix bug cloned from current Python 2.5c1, where yield from finally cancels pending exceptions and outer finallys; also fixed to throw on nested generator activations (349012, r=igor/mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@207894 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-18 23:42:02 +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
mrbkap%gmail.com
53d05f36dc
Fix this copy-paste error: there are no parameters to this message. bug 346773, r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@206246 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-01 01:36:51 +00:00
brendan%mozilla.org
8362cdc624
Improve mismatched tag name diagnostic (344455, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@202058 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-13 19:14:21 +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
igor%mir2.org
c385612ef3
Bug 336376: I reverted the commit as the tree is closed!
...
git-svn-id: svn://10.0.0.236/trunk@196210 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-09 03:01:30 +00:00
igor%mir2.org
e4eb5a65ac
Bug 336376: Keywords are treated as identifiers in object literals or after '::', '.', '..' unless they are part of namespace prefix. I.e. now {try: 1}, obj.delete(), xml..in, ns::new are valid while xml.try::elem is not allowed and xml.function::child continues to refer to the method named child. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@196206 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-09 02:26:27 +00:00
mrbkap%gmail.com
32e6292dcc
Finish checking in bug bug 331429 (r=brendan). I forgot to check this in.
...
git-svn-id: svn://10.0.0.236/trunk@195592 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-27 20:50:28 +00:00
mrbkap%gmail.com
22392d8ceb
Protect js_ConstructObject callers from gc hazards and some other stuff. bug 325425, r=igor sr=brendan
...
git-svn-id: svn://10.0.0.236/trunk@189342 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-07 20:09:53 +00:00
brendan%mozilla.org
675012ac75
Fix errors that were JSEXN_NONE to have a valid exception type, so that they can be thrown by default (e.g., strict warnings with the werror option set as well as strict; 323314, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@187602 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-13 22:20:30 +00:00
mrbkap%gmail.com
3a1f00b981
bug 319384: Don't use unsigned objects for signed values. Also give the "can't convert to integer" error an exception type so that it can be caught. r=daumling@adobe.com sr=brendan
...
git-svn-id: svn://10.0.0.236/trunk@185768 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-07 20:49:52 +00:00
mrbkap%gmail.com
f2bb9626f7
bug 317476: The error thrown by JS_ReportError is not catchable. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@185335 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-28 20:42:30 +00:00
mrbkap%gmail.com
85ce21bff5
bug 315147: Error JSMSG_UNDEFINED_PROP should be JSEXN_REFERENCEERR (pointed out by Michael Daumling). r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@184173 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-05 02:01:17 +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
mrbkap%gmail.com
cacdf3da9d
bug 294302: Map JSMSG_CANT_OPEN to a real exception type so that shell scripts can catch failed loads. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@184068 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-03 00:16:14 +00:00
mrbkap%gmail.com
c83c8f13a2
Bug 280769: Handle overly-large regular expressions without crashing. Patch by Igor Bukanov <igor.bukanov@gmail.com>. r=mrbkap sr=brendan
...
git-svn-id: svn://10.0.0.236/trunk@181247 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-30 00:46:42 +00:00
brendan%mozilla.org
69e961c489
Enable E4X while preserving the HTML script tag content 'comment hiding hack' of yore (309242, r/sr=mrbkap/shaver).
...
git-svn-id: svn://10.0.0.236/trunk@180689 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-20 21:48:26 +00:00
brendan%mozilla.org
40e9f8a25f
Improve error reporting for too many array initialisers (276289, r/a=me).
...
git-svn-id: svn://10.0.0.236/trunk@172647 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-23 06:10:25 +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
e42d9e5d98
Enforce Unique Att Spec for XML in JS (277664, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@168036 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-20 00:50: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
64910a1cbf
Implement XML NCRs, reject unknown entities (E4X code, not enabled yet).
...
git-svn-id: svn://10.0.0.236/trunk@166790 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-16 18:28:23 +00:00
brendan%mozilla.org
75fcf883ed
Fix JSMSG_BAD_OCTAL's type, and reword JSXML_BAD_XMLLIST_PUT to simplify.
...
git-svn-id: svn://10.0.0.236/trunk@166735 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-15 02:57: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
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
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
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
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
6a4d4696b5
Fix to error on extra ) in regexp rather than corrupt 'n' crash (223273, r=timeless, sr=shaver, a=asa).
...
git-svn-id: svn://10.0.0.236/trunk@148330 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-24 00:37:49 +00:00
brendan%mozilla.org
1ee2e4b28b
Check in rogerl's big perf patch (85721).
...
git-svn-id: svn://10.0.0.236/trunk@148266 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-22 07:01:50 +00:00
brendan%mozilla.org
2e56b8758f
Minimal ECMA-262 Edition 3 config, plus cleanup to other configs (208586, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@143419 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-07 21:08:45 +00:00
brendan%mozilla.org
d62cd7ab7c
Implement SCOPE_IS_SEALED, JS_SealObject, JS_UnsealObject, etc. to support
...
sealed standard object graphs, as well as to pave the way for optimizations
to object literals (94693, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@139434 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-14 05:24:58 +00:00