Commit Graph

41202 Commits

Author SHA1 Message Date
Terrence Cole
b055779ccf Bug 1192304 - Common up the checks when entering GC API; r=jonco 2015-08-10 14:14:09 -07:00
Nick Fitzgerald
3f7c91f188 Bug 1189490 - Follow ups: Move [Traceable]Fifo to js/src/ds. r=terrence 2015-08-10 13:15:00 -04:00
Nick Fitzgerald
58c2215e8b Bug 1189490 - Part 2: Stop using mozilla::LinkedList for the allocations and tenure promotions logs and use js::TraceableFifo instead. r=terrence 2015-08-10 13:15:00 -04:00
Nick Fitzgerald
b6c85ba835 Bug 1189490 - Part 1: Add a JS::Traceable version of the FIFO queue for use with GC things. r=terrence 2015-08-10 13:15:00 -04:00
Nick Fitzgerald
e496ca9335 Bug 1189490 - Part 0: Add a FIFO queue container type to js/public. r=terrence 2015-08-10 13:15:00 -04:00
Kyle Huey
1ffb03e8dc Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Nathan Froyd
79a9252cfe Bug 1192277 follow-up - delete the macro invocation from js/src/configure.in; r=me 2015-08-11 16:22:33 -04:00
Nathan Froyd
9f527fd802 Bug 1192277 - remove check for LLVM PR 8927; r=glandium
The PR was fixed in early 2011.  clang 3.3, the oldest version of clang
that we build with, was released in mid-2013.  It's safe to say that all
versions of clang now have this fix, and we can delete the check.
2015-08-07 19:35:43 -04:00
Jon Coppeard
8d8140b91e Bug 1192245 - Fix tests that fail with incremental zeal r=terrence 2015-08-11 12:41:14 +01:00
Jon Coppeard
d5fcbaeb6a Bug 1191482 - Improve WeakCache sweep code and add assertions r=terence 2015-08-11 12:41:14 +01:00
Shu-yu Guo
54e0656103 Bug 1191177 - Kill staticLevel. (r=efaust) 2015-08-11 03:01:25 -07:00
Shu-yu Guo
b1e4634f36 Bug 1191177 - Kill UpvarCookie. (r=efaust) 2015-08-11 03:01:24 -07:00
Shu-yu Guo
ddee358010 Bug 1179063 - Simplify enclosingStaticScope and rename to innermostStaticScope in BCE. (r=efaust) 2015-08-11 03:01:24 -07:00
Shu-yu Guo
104d3a4d57 Bug 1179063 - Hook up the static scope chain in the Parser and replace SharedContext walking with scope walking. (r=efaust) 2015-08-11 03:01:24 -07:00
Jon Coppeard
2308ab100d Bug 1189282 - Refactor parser BindData class r=efaust 2015-08-11 09:27:24 +01:00
Jeff Walden
8ef6024e61 Bug 1158399 - Expose the [[DateValue]] field in Date objects only through a ClippedTime class that enforces prior TimeClip-ing on the given value. r=evilpie, r=bz, r=dhylands, r=mt, r=froydnj, r=khuey, r=baku, r=smaug 2015-05-01 19:12:52 -07:00
Ryan VanderMeulen
c92728a9ac Backed out changesets db4294fb662d and de9ae2ccb73b (bug 1181175) for Android test_compartments.js failures.
CLOSED TREE
2015-08-10 15:07:27 -04:00
Terrence Cole
8559ecf665 Bug 1189112 - Part 2: simplify rooting of ScriptsAndCountsVector with PersistentRooted; r=nbp 2015-07-29 14:59:49 -07:00
Terrence Cole
71121fa878 Bug 1189112 - Part 1: Use TraceableVector to simplify tracing of ScriptsAndCountsVector; r=nbp 2015-07-29 14:59:49 -07:00
Terrence Cole
4789f47af0 Bug 1188620 - Use PersistentRooted for asyncActivation roots; r=fitzgen 2015-07-29 10:23:14 -07:00
Nick Fitzgerald
057c51b2fb Bug 1192456 - Use perfect forwarding for DispatchWrapper rather than explicit move and copy constructors. r=terrence 2015-08-07 17:47:00 -04:00
Morgan Phillips
b44505dae5 Bug 1186724 - Make BytecodeEmitter::emit2 take a uint8_t instead of a jsbtyecode; r=arai
We expect the second operand value to be an arbitrary byte. This alleviates the needs for spurious casting.
2015-08-10 09:19:37 -07:00
David Rajchenbach-Teller
ac4bca55ba Bug 1181175 - Telemetry for finding out how often our process is rescheduled to another CPU. r=jandem, r=bsmedberg 2015-07-29 19:01:05 +02:00
David Rajchenbach-Teller
5584b9c372 Bug 1181175 - Use RDTSC for Performance Monitoring instead of getrusage. r=jandem 2015-07-07 18:45:54 +02:00
Nathan Froyd
00e3d567a4 Bug 967544 - make gServiceInterrupt Atomic; r=Waldo
|volatile| doesn't guarantee inter-thread safety.  Atomic<> does.
2015-08-07 02:59:19 -04:00
Andrea Marchesini
b72f4855c1 Bug 1188612 - Transferable errors should become NS_DOM_DATA_CLONE_ERR, r=sfink 2015-08-10 16:13:24 +01:00
Brian Hackett
f5e5ee8a00 Bug 1190272 - Improve type checks when storing values into unboxed objects in Ion code, r=jandem. 2015-08-09 18:55:49 -06:00
Brian Hackett
fb076603d8 Bug 1190002 - Don't compile baseline stubs for sets to unboxed arrays when there is no JIT FPU support, r=jandem. 2015-08-09 18:52:08 -06:00
Brian Hackett
593787d2ac Bug 1189980 - Allow changing the object definition during optimized compilation of Array.push, r=jandem. 2015-08-09 18:48:45 -06:00
Bill McCloskey
30800ce21c Back out bug 1181908 (again) for suspicion of causing bug 1191465 and other GC crashes. 2015-08-09 08:42:40 -07:00
Phil Ringnalda
f179590dfb Back out 4 changesets (bug 1189490) for Linux32 Jit2 failures
Backed out changeset 1ec4867e4e8c (bug 1189490)
Backed out changeset 8bf626d3a647 (bug 1189490)
Backed out changeset 1a1ad27321de (bug 1189490)
Backed out changeset 858b4f682c5a (bug 1189490)
2015-08-08 23:30:50 -07:00
Nick Fitzgerald
94e59f9764 Bug 1189490 - Follow ups: Move [Traceable]Fifo to js/src/ds; r=terrence 2015-08-08 15:19:52 -07:00
Nick Fitzgerald
23a8217bca Bug 1189490 - Part 2: Stop using mozilla::LinkedList for the allocations and tenure promotions logs and use js::TraceableFifo instead; r=terrence 2015-08-08 15:19:52 -07:00
Nick Fitzgerald
ba70ccb3da Bug 1189490 - Part 1: Add a JS::Traceable version of the FIFO queue for use with GC things; r=terrence 2015-08-08 15:19:52 -07:00
Nick Fitzgerald
0c0583c7d7 Bug 1189490 - Part 0: Add a FIFO queue container type to js/public; r=terrence 2015-08-08 15:19:52 -07:00
Jeff Walden
d213612f1e Bug 1183400 - Fold class nodes by kind. r=shu 2015-07-13 13:09:54 -07:00
Jeff Walden
8f2561bec2 Bug 1183400 - Fold try/catch by kind. r=shu 2015-07-13 13:09:54 -07:00
Jeff Walden
e1d63d6cc0 Bug 1183400 - Constant-fold yield/yield*/return by kind and not arity. r=shu 2015-07-09 20:58:14 -07:00
Jeff Walden
47a8841f8c Bug 1183400 - Fold various list nodes not given, nor requiring, special treatment. r=shu 2015-07-09 20:42:19 -07:00
Shu-yu Guo
69e2f1e9e5 Bug 1036574 - Revert horrible workaround in baseline IC for magic arg callee. (r=me) 2015-08-07 15:14:04 -07:00
Tom Schuster
961c341b62 Bug 1189872 - Make {Map, Set}.prototype an ordinary object. r=Waldo 2015-08-07 21:21:07 +02:00
Nathan Froyd
ae66000956 Bug 1192278 - empower |make check-jit-test| to specify a subset of tests to run; r=terrence
Calling:

  make check-jit-test JITTEST_TEST_ARGS=basic/

will now run all tests whose name includes "basic/".  Similarly, running:

  make check-jit-test JITTEST_TEST_ARGS=basic/timeout-check.js

will run only basic/timeout-check.js.
2015-08-07 03:21:13 -04:00
Nathan Froyd
314d5d6d26 Bug 1192071 - use llvm-symbolizer when running jit-tests under TSan; r=mshal
Just like ASan, TSan can use llvm-symbolizer, except that it requires a
slightly different setup.
2015-08-07 02:56:41 -04:00
Wes Kocher
266683b0d0 Merge m-c to inbound, a=merge 2015-08-06 18:42:15 -07:00
Wes Kocher
f489fe2b95 Backed out changeset fdf5862a8c00 (bug 1176451) a=backout 2015-08-06 18:38:22 -07:00
Nathan Froyd
3786d45326 Bug 1191884 - remove now-unnecessary check for GCC PR49911; r=glandium
This PR was fixed in the GCC 4.7 development cycle.  Since we require
GCC 4.7 now, we no longer have to check for this bug.
2015-08-06 20:41:38 -04:00
Ryan VanderMeulen
9b5a0e69f4 Merge inbound to m-c. a=merge 2015-08-06 15:22:37 -04:00
Ryan VanderMeulen
3f8e9bdf38 Backed out changeset 2f16fb18314a (bug 1181908) for suspicion of causing bug 1191492 and other topcrashes. a=me 2015-08-06 13:28:32 -04:00
Wes Kocher
5655469422 Merge m-c to fx-team, a=merge 2015-08-05 16:49:08 -07:00
Brian Hackett
ece361ee6c Bug 1175538 - Ensure str_split result object has the right group. r=jandem 2015-08-05 11:53:01 -04:00