Skip to content

Instantly share code, notes, and snippets.

(lldb) process launch -- -e 'var libdir="./"; var MODE="compare";' nbody.js
Process 3226 launched: '/Users/shu/moz/iontrail/js/src/Debug/shell/js' (x86_64)
Warming up sequential runs
.
Measuring sequential runs
Measuring parallel runs
Assertion failure: hasParallelIonScript(), at ../jsscript.h:621
Process 3226 stopped
* thread #1: tid = 0x1c03, 0x0000000100967a95 js`JSScript::parallelIonScript() const + 133 at jsscript.h:621, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x0000000100967a95 js`JSScript::parallelIonScript() const + 133 at jsscript.h:621
diff --git a/js/src/ion/Ion.cpp b/js/src/ion/Ion.cpp
index 8766100..b6c667c 100644
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -1428,7 +1428,8 @@ Compile(JSContext *cx, HandleScript script, HandleFunction fun, jsbytecode *osrP
return Method_Compiled;
}
- if (executionMode == SequentialExecution) {
+ switch (executionMode) {
% /Users/shu/moz/iontrail/js/src/Debug/js -f /Users/shu/moz/iontrail/js/src/jit-test/lib/prolog.js --no-jm -e "const platform='darwin'; const libdir='/Users/shu/moz/iontrail/js/src/jit-test/lib/'; const scriptdir='/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/'" -f /Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js
[Parallel:M] BEGIN ParallelDo (/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js:17 -> self-hosted:1302)
[Parallel:M] Compiling all reachable functions
[Parallel:M] COMPILE 103357128:self-hosted:1312
[Parallel:M] Safe
[Parallel:M] END compiled
[Parallel:M] COMPILE 1033379c0:/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js:3
[Parallel:M] StoreFixedSlot: write to ParNew prop does not require guard (/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js:4)
[Parallel:M] StoreFixedSlot: write to ParNew prop does not require guard (/Users/shu/moz/iontrail/js
../Opt/js -e 'var libdir="./"; var MODE="compare";' nbody.js
Warming up sequential runs
.
Measuring sequential runs
Measuring parallel runs
Checking correctness
NBODY SEQUENTIAL MEASUREMENT 0: 8393
NBODY SEQUENTIAL MEASUREMENT 1: 8568
NBODY SEQUENTIAL MEASUREMENT 2: 8579
NBODY SEQUENTIAL AVERAGE: 8513.333333333334
% ./run.sh ../Opt/js nbody.js
../Opt/js -e 'var libdir="./"; var MODE="compare";' nbody.js
Warming up sequential runs
.
Measuring sequential runs
Measuring parallel runs
Checking correctness
NBODY SEQUENTIAL MEASUREMENT 0: 2167
NBODY SEQUENTIAL MEASUREMENT 1: 2107
NBODY SEQUENTIAL MEASUREMENT 2: 2102
@syg
syg / gist:5122004
Last active December 14, 2015 17:28
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=4 sw=4 et tw=99:
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef jsion_caches_h__
#define jsion_caches_h__
@syg
syg / gist:5121853
Last active December 14, 2015 17:19
diff --git a/js/src/ion/IonCaches.cpp b/js/src/ion/IonCaches.cpp
index e62c2c0..24a77c1 100644
@@ -334,401 +369,429 @@ IsCacheableGetPropCallPropertyOp(JSObject *obj, JSObject *holder, UnrootedShape
return true;
}
-struct GetNativePropertyStub
+class StubRepatchHelper
{
+ MacroAssembler &masm_;
class ReadSlotStubImpl
{
protected:
virtual void branchExit(MacroAssembler &masm, Assembler::Condition cond, Address addr,
ImmGCPtr ptr) = 0;
virtual void jumpRejoin(MacroAssembler &masm) = 0;
virtual void jumpExit(MacroAssembler &masm) = 0;
virtual void bindFailures(MacroAssembler &masm) = 0;
public:
#defmeta MSG_DEF(name, id, _, _, _) \
#define name id
#include ../js.msg
#undef MSG_DEF
class ParGetPropertyIC : public GetPropertyIC
{
public:
ParGetPropertyIC(RegisterSet liveRegs,
Register object, PropertyName *name,
TypedOrValueRegister output,
bool allowGetters)
: GetPropertyIC(liveRegs, object, name, output, allowGetters)
{
}