mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 970427 - Push ForkJoinActivation after calling the bounds function. (r=nmatsakis)
This commit is contained in:
parent
6ac6899383
commit
1cf7a78420
15
js/src/jit-test/tests/parallel/bug970427.js
Normal file
15
js/src/jit-test/tests/parallel/bug970427.js
Normal file
@ -0,0 +1,15 @@
|
||||
// XXXshu: I tried wrapping the entire test in an |if (pjs)|, but the timing
|
||||
// is fragile and it no longer reproduced the bug, thus getting this value at
|
||||
// the beginning.
|
||||
var pjs = getBuildConfiguration().parallelJS;
|
||||
function f(a, b) {
|
||||
var o = a;
|
||||
gczeal(2);
|
||||
}
|
||||
f(3, 4);
|
||||
var len = 5000;
|
||||
var iters = 100;
|
||||
for (var i = 0; i < iters; i++) {
|
||||
var par = pjs ? Array.buildPar(len, fill) : true;
|
||||
}
|
||||
function fill(i) { return 10/i; }
|
@ -1175,8 +1175,6 @@ ForkJoinOperation::parallelExecution(ExecutionStatus *status)
|
||||
// functions such as ForkJoin().
|
||||
JS_ASSERT(ForkJoinContext::current() == nullptr);
|
||||
|
||||
ForkJoinActivation activation(cx_);
|
||||
|
||||
uint16_t from, to;
|
||||
if (!computeBounds(&from, &to)) {
|
||||
*status = ExecutionFatal;
|
||||
@ -1189,6 +1187,7 @@ ForkJoinOperation::parallelExecution(ExecutionStatus *status)
|
||||
return RedLight;
|
||||
}
|
||||
|
||||
ForkJoinActivation activation(cx_);
|
||||
ThreadPool *threadPool = &cx_->runtime()->threadPool;
|
||||
ForkJoinShared shared(cx_, threadPool, fun_, from, to, &bailoutRecords_[0]);
|
||||
if (!shared.init()) {
|
||||
|
Loading…
Reference in New Issue
Block a user