Commit Graph

11799 Commits

Author SHA1 Message Date
Luke Wagner
b00fed595e Bug 626118 - Fix RegExp ref-counting leak; record already-incremented-ness in type (r=cdleary) 2011-01-17 14:58:53 -08:00
Andreas Gal
ffad8e83db Allow entering a compartment with a pending exception (bug 626267, r=luke). 2011-01-17 14:21:03 -08:00
Jason Orendorff
ec712fc18c Return the new shape from methodWriteBarrier instead of searching for it again. Bug 623863, r=brendan. 2011-01-17 11:30:08 -06:00
Jason Orendorff
32cd8027b9 Add tracer support for JSOP_UNBRANDTHIS with primitive this. Bug 625399, r=Waldo. 2011-01-17 11:19:26 -06:00
Cameron Kaiser
f00ce6228a Bug 623277 - Failed to build with --disable-methodjit r=dmandelin, a=NPOTB 2011-01-08 22:42:00 -08:00
Jim Blandy
bde8efeae9 Bug 624199: Move code for decompiling strict mode code directives to where it works for JS_DecompileScript, too. r=brendan 2011-01-15 13:48:26 -08:00
Jim Blandy
f20a1f7648 Bug 624199: Correctly skip emitting bytecode for useless string literals and complain, while not flagging directives. r=brendan
Never emit bytecode for expression statements consisting of a single string
literal. Complain about them as useless code only if they are not part of a
Directive Prologue. The comments in recognizeDirectivePrologue explain the
details.

Fix bad names of directive-prologue-related parse node member functions.
2011-01-15 13:48:26 -08:00
Andreas Gal
3d90f3729a Temporary restore old shark start/stop functions (bug 625993, r=bz). 2011-01-14 19:02:11 -08:00
Andreas Gal
3593b7215c Makefile rules fix for bug 625962. 2011-01-14 18:42:58 -08:00
Jim Blandy
62486d8029 Bug 501908: Avoid O(n^2) behavior when recycling large trees. r=igor
It turns out that the careful effort RecycleTree and NewOrRecycledNode make
to disassemble the recycled tree lazily is wasted: every recycling call
ends up calling UnlinkFunctionBoxes and walking the entire parse node tree
to fix up funbox and method links. There's no locality; you might as well
queue up the parse nodes while you're at it. And the stack doesn't stay
shallow.

This patch replaces the (very clever) lazy recycling with eager recycling,
using a work stack chained through the nodes themselves to avoid creating
deep C++ stacks when recycling deep parse trees. We put off cleaning up the
method lists and funbox tree until just before function analysis, at which
point we do so in a single linear pass. Putting this off to the end avoids
quadratic behavior, as noted in the comments.

The patch localizes the process of adding nodes to the free list in a
single function, ensuring that we don't recycle used/defn nodes. It also
poisons newly freed nodes.

The patch also more clearly distinguishes between function nodes that have
been fully deleted, and function nodes that have been mutated (by
js_FoldConstants) into other kinds of nodes. See the comments before
Parser::cleanFunctionList.

I believe the patch also improves the care with which we handle nodes that
cannot be recycled immediately (those that appear in JSAtomLists, or are
referred to by JSFunctionBoxes). In some cases, those nodes may be picked
up and fiddled with later, so it is important that they not refer to nodes
around them that did get recycled.
2011-01-14 18:09:09 -08:00
Jim Blandy
67b6f164d8 Bug 501908: Pass a JSTreeContext to analyzeFunctions, not bits and pieces. r=igor
Proper function recycling may mean eliminating the tree context's entire
function list; it's misleading to pass in the function list, rather than
side-effecting the tc in place.

Let analyzeFunctions take care of testing whether we have any functions to
analyze, instead of making each caller do it. In the next patch in the
series, we won't know whether the function list is really clear or not in
the callers anyway.

Avoid passing tcflags around by non-const reference; SpiderMonkey style is
to use pointers for parameters the callee may mutate, to make call sites
more evidently potential mutations.
2011-01-14 18:09:09 -08:00
Andreas Gal
6278051362 Make Shark work with 64-bit MacOSX builds and rename to start/stopProfiling() (bug 625962, r=sayrer). 2011-01-14 17:58:40 -08:00
David Anderson
c082e192c8 Merge backout. 2011-01-14 17:49:43 -08:00
David Anderson
a202a88091 Backed out changeset 121ac4c0d553 2011-01-14 17:48:42 -08:00
Blake Kaplan
34f092fdfd Fix DumpJSStack on dummy frames to not try to treat arbitrary memory as the |this| value. r=gal NPOTB 2011-01-14 17:28:53 -08:00
David Anderson
a83190f474 Get rid of value snapshotting in value iterators (bug 624421, r=luke,gal). 2011-01-14 17:15:21 -08:00
David Anderson
8a4b770483 Fix PunboxAssembler interface returning wrong labels (bug 625757, r=cdleary). 2011-01-14 15:42:42 -08:00
Jason Orendorff
f224da500c Bug 559653 - Record assignment before the interpreter goes, mostly. This reduces record_SetPropHit to a narrower callback, record_AddProperty. r=brendan.
--HG--
rename : js/src/jsapi-tests/testSetPropertyWithNativeGetterStubSetter.cpp => js/src/jsapi-tests/testSetProperty.cpp
2011-01-14 16:18:53 -06:00
Chris Leary
30bb1f498e Merge tracemonkey changeset. 2011-01-14 12:35:20 -08:00
Chris Leary
434b365408 Merge last good mozilla-central revision into tracemonkey. 2011-01-14 12:34:23 -08:00
David Anderson
3c239f940a Update NativeIterators properly in the method JIT (bug 625377, r=luke). 2011-01-14 12:16:53 -08:00
Vladimir Vukicevic
b4fe058f4f b=625503; convert NaN correctly with typed array array conversion; r=waldo, a=dvander 2011-01-14 10:46:22 -08:00
Jacob Bramley
d3366c8fbd Bug 625701: Sensible fixed width branching. (r=cdleary) 2011-01-14 09:00:56 -08:00
Brendan Eich
6e8832e1a8 Cope with localStorage reifying __iterator__ with null value, and the like (573875, r=gal). 2011-01-14 08:03:45 -08:00
Chris Leary
1cad3ed712 Bug 625718: Correct SETPROP label offsets. (r=jbramley) 2011-01-14 07:49:59 -08:00
Chris Leary
a3d07a777f Bug 625701: Fixed-width IC cmp/branch is required for x86. (r=dvander) 2011-01-14 02:57:21 -08:00
Chris Leary
3d7d7e57a8 Merge mozilla-central into tracemonkey. 2011-01-14 01:45:33 -08:00
Chris Leary
2e89de85ee Bug 588021: Remove vestigial ifdefs. (r=dmandelin) 2011-01-13 22:42:48 -08:00
Chris Leary
96f3580160 Bug 588021: Port ELEM PICs for ARM. (r=dmandelin) 2011-01-13 22:42:28 -08:00
Chris Leary
6e7c340157 Bug 588021: Port CALLPROP PIC for ARM. (r=dmandelin) 2011-01-13 22:42:07 -08:00
Chris Leary
0422829982 Bug 588021: Port SETPROP PIC for ARM. (r=dmandelin) 2011-01-13 22:41:42 -08:00
Jacob Bramley
388045ee8b Bug 588021: Port NAME PIC for ARM. (r=cdleary) 2011-01-13 22:41:16 -08:00
Jacob Bramley
33f6de6b2a Bug 588021: Port BINDNAME PIC for ARM. (r=cdleary) 2011-01-13 22:40:58 -08:00
Chris Leary
2aaa4a9af0 Bug 588021: Port GETPROP PIC for ARM. (r=dmandelin) 2011-01-13 22:40:15 -08:00
Chris Leary
e3872e284f Bug 588021: Refactor MICs to work on ARM, ICRepatcher interface. (r=dmandelin, u=jbramley,cdleary) 2011-01-13 22:39:43 -08:00
Chris Leary
bf3ec80b80 Bug 588021: Cross-platform PIC labels. (r=dmandelin, u=cdleary,dvander,jbramley) 2011-01-13 22:39:11 -08:00
Jacob Bramley
a942f60f90 Bug 588021: Make stub calls with stub veneer on ARM. (r=cdleary) 2011-01-13 22:38:52 -08:00
Nicholas Nethercote
e48307bba3 Bug 625333 - tracer generated code reads stack memory it didn't write. r=lw. 2011-01-13 19:14:46 -08:00
Nicholas Nethercote
7fab2c76a8 Backed out changeset 1548012fa682 due to leaks found by Valgrind. 2011-01-13 19:04:03 -08:00
Gregor Wagner
e9af9eccb4 Bug 624224 - cleanup compartment sweep code r=brendan 2011-01-13 16:58:27 -08:00
Sean Stangl
147a696367 Fix --disable-tracejit build. (rs=dvander) 2011-01-13 19:03:05 -05:00
Gregor Wagner
bc39a65c18 Bug 625484 - rename defaultCompartment r=gal 2011-01-13 14:42:36 -08:00
Andreas Gal
2d88722a32 Default new contexts to a NULL compartment (bug 623800, r=dmandelin). 2011-01-13 14:11:15 -08:00
David Mandelin
7396db95bf Bug 613399: set isMatch on empty-match backtrack return in PCRE, r=cdleary 2011-01-12 18:56:52 -08:00
Ben Turner
a3487b3348 Bug 620984 - 'Firefox 4.0b8 Crash Report [@ DEBUG_CheckWrapperThreadSafety(XPCWrappedNative const*) ]'. r=jst, a=blocking. 2011-01-13 13:09:35 -08:00
Andreas Gal
eb94528de3 Maintain identity and proto of .wrappedJSObject wrappers (bug 620486, r=mrbkap). 2011-01-13 13:03:44 -08:00
Chris Leary
92c1cbc886 Disable bug 617935 large allocation test on WINNT. (r=philor) 2011-01-13 00:44:57 -08:00
Chris Leary
3c20fdc230 Try to fix jsreftest report results on win32. 2011-01-12 23:21:08 -08:00
Andreas Gal
7e292b2a97 Follow-up fix for bug 625250. 2011-01-12 18:56:23 -08:00
David Mandelin
72d0075b23 Bug 621068: don't run deadbeef assertion in case of deep bail, r=dvander 2011-01-12 18:46:17 -08:00