Gregor Wagner
5d706bfc9a
fix JS_SCOPE_DEPTH_METER and enable in DEBUG mode
...
bug #528674 , r=gal
2009-12-14 18:36:58 -08:00
Jim Blandy
ff9fa29631
Bug 532254: Give TCF_FUN_PARAM_EVAL a distinct value. r=mrbkap
...
Regression test included.
2009-12-02 15:17:02 -08: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
4ebb8ece60
Bug 514567: Detect duplicate property names. r=jorendorff
2009-11-19 12:35:55 -08:00
Jim Blandy
34a27f0c88
Bug 514585: Recognize "use strict" directives. r=igor
2009-11-18 13:33:53 -08:00
Brendan Eich
9f9a05b0c3
Don't build a stack frame to execute empty scripts (516827, r=igor).
2009-10-18 17:41:24 -07:00
Jim Blandy
416f219573
Bug 515233: Move the TSF_DESTRUCTURING flag to the tree context. r=igor
...
The flag TSF_DESTRUCTURING is used by the parser to modify the way
variables in the destructuring pattern get represented in the parse
tree. It is never set or used by the tokenizer. This patch moves it
to JSTreeContext::flags, where it belongs, now that that field is wide
enough to hold it.
It also renames the flag TCF_DECL_DESTRUCTURING, since the flag is
only used for destructuring patterns that occur in declarations; it is
not set when processing assignment-like destructuring patterns.
2009-10-08 10:29:03 -07:00
Jim Blandy
f06be32d20
Bug 515233: Widen JSTreeContext::flags to 32 bits. r=igor
...
All the bits in this uint16 field are currently in use. Adding bits
for projects like strict mode entails relocating existing flags, which
is additional work. Furthermore, it seems that this has already
inspired people to put flags in places they don't belong:
TSF_DESTRUCTURING is a JSTokenStream flag, but is only used by the
parser.
This patch widens the field to 32 bits, and adjusts JSFunctionBox and
a few other places to match.
We should really replace these all with bitfields.
2009-10-08 10:29:03 -07:00
Jim Blandy
f4a407f114
Bug 515233: Make the static level its own parameter to JSCompiler::compileScript. r=igor
...
Pre-patch, the initial static level at which a script should be
compiled to run is passed in the upper sixteen bits of the tcflags
parameter to JSCompiler::compileScript; because JSTreeContext::tcflags
is a uint16, while the tcflags parameter is a uint32, we know the
parameter's upper bits are free.
However, we would like to enlarge JSTreeContext::tcflags to 32 bits,
as we already have a handful of new flags that belong there. This
patch moves the static level to its own parameter, which has a default
argument.
2009-10-08 10:29:03 -07:00
David Mandelin
99fb23d064
Bug 511695: Fix JS warnings in MSVC8, r=brendan
2009-09-23 11:16:30 -07:00
Brendan Eich
5de171f5f5
Don't assume a script with sharps whose caller has no sharps has no other fixed slots (516262, r=igor).
2009-09-14 10:29:56 -04:00
Brendan Eich
016b0f207a
Bug 514981 - JSStackFrame::sharp{Array,Depth} should be locals allocated due to #n[#=] usage (r=igor).
2009-09-09 20:21:15 -07:00
Brendan Eich
cce4dce512
Join lambdas assigned or initialized as methods to the compiler-created function object if we can, with a read barrier to clone on method value extractions other than call expressions (471214, r=jorendorff).
2009-09-03 14:41:19 -07:00
Jason Orendorff
52fe5a97ba
Bug 497618 - Change JSString macros to methods. r=Waldo.
2009-06-10 20:29:44 -05:00
Brendan Eich
7b9f2ffb1f
Bug 488015 - Crash [@ js_GetUpvar ] (also bogus JS errors, also probably Crash [@js_Interpret]) (future r=mrbkap, see bug).
2009-04-15 01:57:13 -07:00
Igor Bukanov
d738892163
Backed out changeset 595ebe7b82fa - it had wrong patch
2009-04-11 10:07:42 +02:00
Igor Bukanov
de22fe3e47
bug 462734 - fixing JSOP_BINDNAME caching issues. r=brendan
2009-04-11 10:04:24 +02:00
Igor Bukanov
fd755722cc
bug 486713 - fixing flag propagation to generator expression function. r=brendan
2009-04-10 20:50:47 +02:00
Brendan Eich
b9323a1394
Bug 487209 - erroneous redeclaration of let ... with try {...} catch(e) {var e...} (r=mrbkap).
2009-04-08 18:42:20 -07:00
Brendan Eich
962b187fe5
upvar2, aka the big one take 2 (452598, r=mrbkap).
2009-04-05 21:17:22 -07:00
Andreas Gal
706120c0fb
Backed out changeset 972c44aa9d1f (bug 452598).
2009-04-04 10:14:52 -07:00
Brendan Eich
5f4d9ff474
upvar2, aka the big one (452598, r=mrbkap).
2009-04-04 10:05:49 +01:00
Igor Bukanov
09ffabb7a1
bug 485164 - fixing sharp semantic regressions. r=mrbkap
2009-04-03 09:53:02 +02:00
Igor Bukanov
fdf059f766
bug 486139 - annotating destructuring JSOP_DUP for the decompiler. r=brendan
2009-04-02 16:31:54 +02:00
Igor Bukanov
7548565a13
bug 486124 - removal of unused TCF_HAS_DEFXMLNS. r=mrbkap
2009-04-01 10:33:43 +02:00
Jim Blandy
ede7e6d142
Bug 391488: Eliminate PTRDIFF macro; delete jssttddef.h. r=jimb
...
Delete jsstddef.h, since its only remaining purpose is to make certain
Win16-specific definitions; we don't support Win16 any more. In
particular, we can just subtract pointers now, so the PTRDIFF macro is
unnecessary noise.
Most places get stddef.h via jstypes.h or some other header, so we can
just delete #inclusions of jstddef.h. The exception is jskwgen.h, so
there we explicitly include <stddef.h> instead.
2009-02-18 09:14:51 -08:00
Igor Bukanov
5fb2f0b511
bug 467495 - JSOP_DEFUN fixes to deal with non-top-level function statements redeclaring local argument and variables. r=brendan
2009-02-05 14:11:04 +01:00
Brendan Eich
5c85747b5c
Bug 441479 - for-in loops should use one backward branch (with downward goto on entry; r=mrbkap).
2008-10-22 12:47:51 -07:00
Brendan Eich
a4e4559fa5
Bug 381843 - Move for-var-in and for-let-in hoisting from the emitter to the parser (r=mrbkap).
2008-10-08 18:43:28 -07:00
Igor Bukanov
23c5063560
bug 446386 - eliminating compiler pseudo-frames. r=brendan
2008-09-08 11:47:12 +02:00
Taras Glek
b9b82a2bc3
bug 443286: avoid hidden return in CHECK_AND_SET_JUMP_OFFSET. r=igor
2008-09-02 20:50:19 -07:00
Brendan Eich
18d5749230
Fix upvar decompilation for eval-from-fun case (452441, r=igor).
2008-08-29 00:24:11 -07:00
Andreas Gal
8a6d79d6b6
Annotate gotos that are emitted for break statements with SRC_BREAK (452122, r=mrbkap).
2008-08-25 14:34:26 -07:00
Brendan Eich
9cd8e5a539
Upvar, v0.1 (limited to looking up from eval in a function, to the function's args and vars).
2008-08-21 03:47:33 -07:00
Brendan Eich
d491ed65d3
Fix some comments and tighten up assertions about block scope (mrbkap please look).
2008-08-11 23:45:40 -07:00
Brendan Eich
eaf4254c15
Merge from mozilla-central.
2008-08-08 18:58:04 -07:00
Blake Kaplan
3838ee5d02
Don't pass around information we don't use. bug 448595, r=brendan
2008-08-04 16:36:35 -07:00
Brendan Eich
a8c6046d8c
Avoid JSOP_POPV in global scripts from load(), etc.
2008-07-26 01:23:12 +02:00
shaver@mozilla.org
8a97552a28
merge (mostly, doesn't build)
2008-07-22 23:58:43 -04:00
Brendan Eich
a6bb7cfc89
Always select gvar ops for declared global vars, instead of only if loopy/enough-used (445901, r=shaver).
2008-07-21 15:14:14 -07:00
Igor Bukanov
fc68712767
bug 441686 - eliminating JSStackFrame.(nvars|vars). r=brendan
2008-07-20 22:13:17 +02:00
Brendan Eich
78677269db
Always select gvar ops for declared global vars, instead of only if loopy/enough-used.
2008-07-17 14:37:25 -07:00
shaver@mozilla.org
d571eaac32
Merge with mozilla-central as of c5dc9d84d476, and restore obj-to-boolean fixes
...
from 2b107c27dedf (accidentally backed out during an earlier merge). 22 test
suite failures for -L lc2 lc3 spidermonkey-n slow-n, probably needs some guard
work in TRY_BRANCH_AFTER_COND.
2008-06-29 10:01:59 -04:00
Brendan Eich
e93d1c1869
Fix bogus js_Emit return value tests (438986, r=igor).
2008-06-18 18:50:33 -07:00
Igor Bukanov
0c39954dfd
[Bug 439624] renaming decltype to declType as the former is a keyword in the next C++ standard.
2008-06-18 23:35:53 +02:00
Andreas Gal
a1bf0819b2
Removed JSOP_HEADER code. Its too costly. This patch restore essentially the same performance as unmodified SM.
2008-06-10 14:44:51 -07:00
Brendan Eich
9c2b039d6f
JSOP_HEADER takes a byte index of loop header counting from script->loopBase, and related changes.
2008-06-03 14:48:47 -07:00
Andreas Gal
de3107d2ee
Add a per-runtime loop attribute table that associates a jsval attribute with every loop in the code. The jsval is used initially as a counter until a certain threshold is reached, at which point the loop is traced and compiled and the resulting native code object is stored in the jsval to be executed for future encounters of the loop.
2008-05-30 10:11:56 -07:00
Brendan Eich
ed4274e179
Instrument loop headers with jsvals above fp->vars and below fp->spbase.
2008-05-28 19:07:32 -07:00
igor@mir2.org
c0d5c51190
[bug 423874] backing out as a simpler patch would do the job with less code.
2008-03-29 03:34:29 -07:00