diff --git a/js/src/jit-test/tests/parallel/bug975636.js b/js/src/jit-test/tests/parallel/bug975636.js new file mode 100644 index 000000000000..adccea12d19a --- /dev/null +++ b/js/src/jit-test/tests/parallel/bug975636.js @@ -0,0 +1,7 @@ +load(libdir + "parallelarray-helpers.js"); +if (getBuildConfiguration().parallelJS) { + function f(x) { return [] << 0; } + var a = Array.buildPar(9, f); + var b = Array.build(9, f); + assertEqArray(a, b); +} diff --git a/js/src/jit/ParallelFunctions.cpp b/js/src/jit/ParallelFunctions.cpp index abb960615c12..c7f3dae42511 100644 --- a/js/src/jit/ParallelFunctions.cpp +++ b/js/src/jit/ParallelFunctions.cpp @@ -497,9 +497,9 @@ jit::BitNotPar(ForkJoinContext *cx, HandleValue in, int32_t *out) JS_BEGIN_MACRO \ int32_t left, right; \ if (lhs.isObject() || rhs.isObject()) \ - return TP_RETRY_SEQUENTIALLY; \ - if (!NonObjectToInt32(cx, lhs, &left) || \ - !NonObjectToInt32(cx, rhs, &right)) \ + return false; \ + if (!NonObjectToInt32(cx, lhs, &left) || \ + !NonObjectToInt32(cx, rhs, &right)) \ { \ return false; \ } \ @@ -528,7 +528,7 @@ jit::BitAndPar(ForkJoinContext *cx, HandleValue lhs, HandleValue rhs, int32_t *o bool jit::BitLshPar(ForkJoinContext *cx, HandleValue lhs, HandleValue rhs, int32_t *out) { - BIT_OP(left << (right & 31)); + BIT_OP(uint32_t(left) << (right & 31)); } bool