mrbkap%gmail.com
cf288c4632
bug 323979: Check the correct parse node for arity. r=shaver
...
git-svn-id: svn://10.0.0.236/trunk@188121 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-25 00:23:00 +00:00
brendan%mozilla.org
bfd8746fed
Fix comment glitches.
...
git-svn-id: svn://10.0.0.236/trunk@187968 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-21 15:54:13 +00:00
brendan%mozilla.org
db71add42d
Remove deprecated with statement usage strict warning (322430, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@187189 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-09 20:53:06 +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
467d7aaec9
Remove e4x singleton entrainment hazards and hide naked * as value (322499, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@187050 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-06 02:08:35 +00:00
brendan%mozilla.org
78dc3e50b3
Revert to pre-E4X handling of eval(s) = x to avoid compile-time error reporting (319391, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@185857 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-09 20:23:38 +00:00
brendan%mozilla.org
f1d25cc5a6
Fix XML folding to skip name nodes with list arity due to embedded {expr} terms (318922, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@185688 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-05 05:26:50 +00:00
mrbkap%gmail.com
1176e84ce3
bug 317533: Don't get confused by final if statements when determining if a function always returns a value. r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@185334 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-28 20:35:13 +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
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
935e3bc013
bug 311629: Protect against UnaryExpr overflow (e.g., several thousand +s). r=brendan
...
git-svn-id: svn://10.0.0.236/trunk@181820 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-08 17:49:03 +00:00
brendan%mozilla.org
6a3c02122b
Force XML option on inside a literal list or element, to allow comments and CDATA (311157, r/sr=mrbkap/shaver).
...
git-svn-id: svn://10.0.0.236/trunk@181670 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-05 19:58:58 +00:00
brendan%mozilla.org
557ea943c7
Revise XML vs. HTML comment/CDATA handling to require JSOPTION_XML for former (311071, r/sr=mrbkap/shaver, a=dbaron).
...
git-svn-id: svn://10.0.0.236/trunk@181601 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-04 20:26:05 +00:00
brendan%mozilla.org
ed6348b24c
Tweak E4X auto-detection to cope with more HTML comment madness (310993, r=mrbkap).
...
git-svn-id: svn://10.0.0.236/trunk@181575 18797224-902f-48f8-a5cc-f745e15eee43
2005-10-04 06:48:32 +00:00
brendan%mozilla.org
989c73fb78
Fix sparse tableswitches properly, and cull useless expressions in functions (308085, r/sr=mrbkap/shaver).
...
git-svn-id: svn://10.0.0.236/trunk@180789 18797224-902f-48f8-a5cc-f745e15eee43
2005-09-22 03:27:23 +00:00
brendan%mozilla.org
85ce220a4c
Restore compatibility: allow function(){} at statement level, treating it as an expression statement (303723, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@177313 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-08 06:54:59 +00:00
brendan%mozilla.org
4a8cf75e18
Fix hard case of formal param and local function with same name (299639, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@176072 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-14 00:47:41 +00:00
brendan%mozilla.org
4b5088f9d3
Oops, tree wasn't open -- Chase needs to pull again, so backing out temporarily.
...
git-svn-id: svn://10.0.0.236/trunk@175981 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-13 02:12:28 +00:00
brendan%mozilla.org
bbe7f97594
Fix arg vs. nested function hard case 299639, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@175977 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-13 02:00:05 +00:00
brendan%mozilla.org
45a31e7b07
Disallow anonymous functions in declaration or statement context (299209, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@175418 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-30 20:48:15 +00:00
brendan%mozilla.org
a623619716
Forgot to remove JSPROP_ENUMERATE in one case for bug 293782 (thanks to jwatt for catching this).
...
git-svn-id: svn://10.0.0.236/trunk@174567 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-14 16:20:27 +00:00
brendan%mozilla.org
a60cd55a53
Remove JSPROP_ENUMERATE from function args/vars hidden property attributes (followup for 293782).
...
git-svn-id: svn://10.0.0.236/trunk@174388 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-09 23:45:54 +00:00
brendan%mozilla.org
3abcebe4b0
Followup patch for bug 293782 etc., to unregress 137000 (r/a=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@173498 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-17 01:06:35 +00:00
brendan%mozilla.org
54dd7af210
Hide function arg/var properties, to hide pre-ECMA design decision that horks ECMA-conformance and sanity in multiple cases (293782 and its deps, r+a=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@173458 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-15 18:24:31 +00:00
brendan%mozilla.org
b68611c781
Allow var redeclaration within a compilation unit (as is already allowed across compilation units; 291868, r=shaver a=me).
...
git-svn-id: svn://10.0.0.236/trunk@173059 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-05 01:43:52 +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
82b9fb67eb
Fix empty-XMLList-literal basis case bug (290499, r/a=me).
...
git-svn-id: svn://10.0.0.236/trunk@172306 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-15 20:08:33 +00:00
brendan%mozilla.org
3afd105310
- Revert recent change to js_NewXMLSpecialObject API, it was based on me
...
misreading the spec.
- Improve XML constant folding by decompiling CDATA, comments, and PIs in
non-constant XML literals -- those containing {embedded-expressions}.
- Fix GC local rooting in ParseNodeToXML, it was pretty broken.
git-svn-id: svn://10.0.0.236/trunk@171290 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-28 23:12:42 +00:00
brendan%mozilla.org
0208315b2a
Propagate special and compile-n-go flags from top frame when pushing a compiler frame, EXCEPT when pushing a frame for a function body -- there, propagate compile-n-go (285219, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@170416 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-09 01:02:27 +00:00
brendan%mozilla.org
b24874a832
Back out last change, reopening bug 285219 (see bug 285244).
...
git-svn-id: svn://10.0.0.236/trunk@170399 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-08 22:35:30 +00:00
brendan%mozilla.org
1bf8d08dbf
Propagate special and compile-n-go flags from top frame when pushing a compiler frame (285219, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@170368 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-08 06:23:10 +00:00
jst%mozilla.jstenback.com
577ad284db
s/JS_FALSE/NULL/ in return value in JSParseNode* method. sr=me
...
git-svn-id: svn://10.0.0.236/trunk@167625 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-12 19:59:54 +00:00
brendan%mozilla.org
e4657976c8
Make reserved identifiers a strict warning, not an error (240317, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@167580 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-12 05:18:17 +00:00
brendan%mozilla.org
a8e2a690ad
Revamp the GC to fix E4X private data dueling GC bugs, to reduce malloc costs for small-ish objects and functions, and to pave the way for further GC wins (123668, r=shaver, TAKE 2).
...
git-svn-id: svn://10.0.0.236/trunk@167293 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-05 06:15:03 +00:00
brendan%mozilla.org
4c0635a125
Back out, broke liveconnect at least.
...
git-svn-id: svn://10.0.0.236/trunk@167288 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-05 03:58:19 +00:00
brendan%mozilla.org
7a816352a4
Revamp the GC to fix E4X private data dueling GC bugs, to reduce malloc costs for small-ish objects and functions, and to pave the way for further GC wins (123668, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@167286 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-05 02:56:36 +00:00
brendan%mozilla.org
55936ec9d1
Preserve TCF_HAS_DEFXMLNS out of FunctionBody; don't turn comments and cdata into text when folding; disable JSOP_XMLOBJECT optimization for now (246441).
...
git-svn-id: svn://10.0.0.236/trunk@167136 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-31 09:00:41 +00:00
brendan%mozilla.org
8f105e9b3c
Propagate TCF_HAS_DEFXMLNS from parser to constant folder; call js_Mark from xml_mark (246441, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@167107 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-30 17:44:41 +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
2cba84f3bd
Twiddle TSF_OPERAND when peeking after switch case label, to scan regexp literal at start of labeled statement (275378, tachyonal r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@166905 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-21 01:47:52 +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
936bda4b08
Fix HasFinalReturn to handle labeled statements (265042, r=self).
...
git-svn-id: svn://10.0.0.236/trunk@164068 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-20 02:16:36 +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
97d5ac0507
Fix function redeclaration and with deprecation warnings to apply to start of statement (256036, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@162266 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-14 01:38:19 +00:00
brendan%mozilla.org
93799e87e5
Forbid line terminator between throw and the exception expression, per ECMA (256617, r=shaver).
...
git-svn-id: svn://10.0.0.236/trunk@161868 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-07 19:43:21 +00:00