Commit Graph

213 Commits

Author SHA1 Message Date
Jim Blandy
e82e0c1ee6 Bug 554102: Cleanup: switch from global TokenStream functions to methods. a=cdleary, r=jimb 2010-03-23 17:30:36 -07:00
Brendan Eich
f819b36cf4 Use direct object shape instead of identity as key for deep property cache hits (497789, r=jorendorff). 2010-03-22 11:11:44 -07:00
Chris Leary
8e0decc494 Bug 553423 - JS scanner namespacing cleanup (r=lw) 2010-03-21 16:07:48 -07:00
Luke Wagner
1e33f57b39 Backed out changeset 6403442ffa1d (failure on windows, winnt.h defines TokenType!) 2010-03-18 22:26:47 -07:00
Chris Leary
2400e09e63 Bug 553423 - JS scanner namespacing cleanup (r=lw) 2010-03-18 22:15:51 -07:00
Chris Leary
431c00210e Bug 549658: clean up JS scanner and inline more things, r=brendan,jimb 2010-03-15 16:42:06 -07:00
Andreas Gal
e7d0ea0449 remove JSTreeContext* parameter from JSCompiler parse methods (landing for dherman, bug 551021, r=jimb). 2010-03-15 14:58:01 -07:00
Dave Herman
eff925b1f0 Make the parsing methods members of JSCompiler for bug 518055. r=jimb 2010-03-11 17:28:01 -05:00
Brendan Eich
20a8cdf89b lightweight JSParseNode subclasses (bug 550350) 2010-03-11 11:29:21 -08:00
Jeff Walden
106fbd8085 Bug 548702 - Temporary value-rooting scheme should be C++- and RAII-based, not macro-based. r=igor
--HG--
extra : rebase_source : c7bb34662dbd70df49d40880227139537c60356e
2010-01-11 11:52:21 -06:00
Igor Bukanov
9d1cbd468c bug 549010 - folowup to replace PROTO access macros with the inlne function 2010-03-04 23:52:52 -08:00
Mike Moening
0373a2437d bug 549010 - fixing and silencing MSVC warnings. r=brendan,igor 2010-03-04 20:44:09 -08:00
Brendan Eich
9925442e73 Fix latent bug, exposed by fix for 549617, where JS_EvaluateUCInStackFrame looks like eval and confuses the compiler into writing into the empty script singleton-const (550045, r=mrbkap). 2010-03-03 16:43:17 -08:00
Brendan Eich
aaff05c150 Don't mutate a used name node that has been deoptimized before bailing from BindNameToSlot (543436, r=jorendorff). 2010-02-19 11:21:19 -08:00
Brendan Eich
c4b4c765a4 Fix funarg analysis to cope with escaping kids of a named function expression that use that lambda by name (545980, r=jorendorff). 2010-02-18 16:32:15 -08:00
Jason Orendorff
4fb42b4c2a Bug 546615 - Crash [@ BindNameToSlot] or "Assertion failure: cg->staticLevel >= level, at ../jsemit.cpp". r=brendan. 2010-02-18 16:01:25 -06:00
Brendan Eich
b83b1b23c3 Fix two subtle bugs to-do with partial flat closures (545573, r=jorendorff). 2010-02-11 14:56:59 -08:00
Jason Orendorff
095bd890ef Bug 539829 - Encapsulate JSScope::flags. r=Waldo.
--HG--
extra : rebase_source : ced4f057e715075d8e4eff343e824d8934152a7e
2010-02-05 18:11:13 -06:00
Brendan Eich
83e657d499 Fix orange in wake of patch for bug 542002. 2010-02-10 18:58:49 -08:00
Brendan Eich
c9fed979f6 Bug 542002 - Optimize to flat closures even if some upvars can't be copied (r=jorendorff). 2010-02-10 15:17:52 -08:00
Igor Bukanov
836b8a84eb bug 540805 - using reference counting only for empty scopes. r=jorendorff 2010-01-27 09:50:17 +03:00
Brendan Eich
1699be3a87 Bug 541455 - Do not drop "mumble"; would-be directives in the parser, let them be completion values (or useless expressions for the emitter to cull) (r=jimb). 2010-01-22 12:17:13 -08:00
Brendan Eich
7d53217541 Fast followup fix for thinko (536564, r=jorendorff). 2010-01-14 14:22:00 -08:00
Brendan Eich
983aa690e9 Analyze module pattern and private-statics pattern in order to despecialize from methods to slots/sprops (536564, r=jorendorff). 2010-01-14 09:33:14 -08:00
Blake Kaplan
2453f5bb11 Bug 537673 - Don't constant-fold a parenthesized callee expression. r=jorendoff 2010-01-07 15:58:44 -08:00
Brendan Eich
85a5badeef ES5-conformance fix to make a new RegExp for each regexp literal evaluation (98409, r=igor/jwalden). 2010-01-06 15:12:54 -08:00
Jason Orendorff
e5ac8476fd Backed out changeset 3862a7e48e79 due to tinderbox failures on js1_5/GC/regress-324278.js. 2010-01-05 12:48:09 -06:00
Brendan Eich
1b4fbd91e6 ES5-conformance fix to make a new RegExp for each regexp literal evaluation (98409, r=jwalden). 2010-01-04 12:25:44 -08:00
Brendan Eich
f19c7e9d1b Fix js_FindDuplicateFormal to crack the fun->u.i.names union correctly, and spruce it up with C++ (532041, r=jimb). 2009-12-01 14:48:05 -08:00
Robert Sayre
8dac81dafc Merge 2009-12-01 15:51:22 -05:00
Robert Sayre
4ea539c658 Relanding: Bye-bye middle-deletes and their O(n^2) worst case complexity; hello dictionary-mode scopes (473228, r=jorendorff). Backed out changeset ee7bfc1923ad 2009-12-01 15:49:15 -05:00
Robert Sayre
8be5b171b9 Backed out changeset c03ebf340688. Bye-bye middle-deletes and their O(n^2) worst case complexity; hello dictionary-mode scopes (473228, r=jorendorff). 2009-12-01 09:56:16 -05:00
Robert Sayre
5d34830070 Backout bug 473228 and its follow-up, temporarily, to attempt a clean merge of other stuff. 2009-12-01 09:57:20 -05:00
Jim Blandy
35e434274a Bug 499524: Always check for duplicates when destructuring params are present. r=igor
Detect duplicate names in parameter lists that include destructuring
parameters, regardless of whether the duplication becomes before or
after the destructuring. Let strict mode complaints take care of
themselves after the body has been parsed.

In BindDestructuringArg, there should never be an entry in tc->decls
for the given name if the call to js_LookupLocal didn't detect a
duplicate argument, so we can simply assert that tc->decl.lookup
returns NULL, instead of checking it.

In HashLocalName, we can tighten the assertion: both the new and
existing entries must be JSLOCAL_ARG, since we detect all non-ARG
(i.e., destructuring) duplicates early.
2009-11-26 10:23:52 -08:00
Brendan Eich
c731045c51 Bye-bye middle-deletes and their O(n^2) worst case complexity; hello dictionary-mode scopes (473228, r=jorendorff). 2009-11-20 16:14:42 -08:00
Jason Orendorff
d3dfa97516 Bug 509354 - Crash [@ DecompileDestructuringLHS] with destructuring and "arguments". r=mrbkap. 2009-11-20 11:33:30 -06:00
Jim Blandy
e412a5c444 Bug 514575: Forbid rebinding 'eval' or 'arguments' in ES5 strict mode code. r=mrbkap 2009-11-19 14:08:02 -08:00
Jim Blandy
740a8791c2 Bug 514562: Forbid assignments to 'eval' and 'arguments' in strict mode code. r=mrbkap
Drafts of the ES5 spec required a type error to be raised when an
assignment to "arguments" is evaluated in function code. In
ECMA/TC39/2009/050, this condition has been changed to a syntax error
in all code. By the rules of chapter 16, implementations must report
it early.
2009-11-19 14:08:02 -08:00
Jim Blandy
18f28c0cac Bug 514580: Forbid duplicate formal parameter names in strict mode code. r=mrbkap
Note: this patch changes the JSOPTION_STRICT warning from a TypeError
into a SyntaxError, if JSOPTION_WERROR is also set.
2009-11-19 14:08:02 -08:00
Jim Blandy
14f017ccd9 Bug 514572: Forbid deletion of variables, arguments and functions in ES5 strict mode. r=jorendorff 2009-11-19 12:35:55 -08:00
Jim Blandy
4ebb8ece60 Bug 514567: Detect duplicate property names. r=jorendorff 2009-11-19 12:35:55 -08:00
Jim Blandy
dccc422655 Bug 514576: Forbid 'with' statements in strict mode code. r=mrbkap 2009-11-19 09:49:00 -08:00
Jim Blandy
a1ea615b02 Bug 521868: Make code passed to a direct call to eval inherit the caller's strictness. r=jorendorff 2009-11-19 09:48:59 -08:00
Jim Blandy
34a27f0c88 Bug 514585: Recognize "use strict" directives. r=igor 2009-11-18 13:33:53 -08:00
Jim Blandy
ae0ff5874f Bug 514585: Remove macro wrappers for js_NewPrinter and JS_InitArenaPool. r=igor
These macros were intended to help avoid passing unused parameters
when JS_ARENAMETER is not defined, but they're not worth the trouble.
The unused parameter doesn't elicit warnings, and the performance
impact of passing the unneeded argument is negligible.

This also removes support for JS_ARENA_CONST_ALIGN_MASK, which is not
used.
2009-11-18 13:33:53 -08:00
Blake Kaplan
f0cd93b989 Bug 461170 - Detect when typeof is applied to an expression before constant folding so we correctly throw unbound name exceptions from the folded expression. r=brendan 2009-11-06 18:27:17 +01:00
Igor Bukanov
0d38a472cc bug 524346 - using jsval, not jsdouble *, for nan and +-oo. r=brendan 2009-10-28 14:57:31 +03:00
Igor Bukanov
8785797ba7 Backed out changeset 14c76164f4c2 - patch for bug 524346 caused test fails 2009-10-27 19:21:47 +03:00
Igor Bukanov
ed4f6edf7f bug 524346 - using jsval, not jsdouble *, for nan and +-oo. r=brendan 2009-10-27 13:26:57 +03:00
Jason Orendorff
e66886b51c Bug 515885 - Assertion failure: !scope->owned(), at ../jsobj.cpp. r=brendan. 2009-10-23 14:35:53 -05:00