Skip to content

Instantly share code, notes, and snippets.

"bodyVelocityLoopified": function bodyVelocityLoopified(index) {
var pos = NBody.private.pos;
var data = NBody.private.vel;
var deltaTime = NBody.Constant.deltaTime;
var epsSqr = NBody.Constant.epsSqr;
var time = NBody.time;
var shape = data.shape[0];
static JSBool
Timeout(JSContext *cx, unsigned argc, jsval *vp)
{
if (argc == 0) {
JS_SET_RVAL(cx, vp, JS_NumberValue(gTimeoutInterval));
return true;
}
if (argc > 2) {
JS_ReportError(cx, "Wrong number of arguments");
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sw=4 et tw=99 ft=cpp:
*
* 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/. */
#include "vm/ParallelDo.h"
#include "jsapi.h"
<<<<<<< HEAD
# ifdef JS_MANUAL_THREADS
if (char *jsthreads = getenv("JSTHREADS"))
numWorkers_ = strtol(jsthreads, NULL, 10);
||||||| merged common ancestors
# ifdef DEBUG
if (char *pathreads = getenv("PATHREADS"))
numWorkers_ = strtol(pathreads, NULL, 10);
=======
# ifdef DEBUG
class ParGetPropertyIC : public GetPropertyIC
{
public:
ParGetPropertyIC(RegisterSet liveRegs,
Register object, PropertyName *name,
TypedOrValueRegister output,
bool allowGetters)
: GetPropertyIC(liveRegs, object, name, output, allowGetters)
{
}
#defmeta MSG_DEF(name, id, _, _, _) \
#define name id
#include ../js.msg
#undef MSG_DEF
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:
@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_;
@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__
% ./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