mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1157628: Reformat spidermonkey source directory, again; r=jandem
This commit is contained in:
parent
6478fd54ce
commit
511767a094
@ -19,7 +19,7 @@ CPOWTimer::~CPOWTimer()
|
||||
if (!js::IsStopwatchActive(runtime))
|
||||
return;
|
||||
|
||||
js::PerformanceData *performance = js::GetPerformanceData(runtime);
|
||||
js::PerformanceData* performance = js::GetPerformanceData(runtime);
|
||||
uint64_t duration = PR_IntervalToMicroseconds(PR_IntervalNow() - startInterval);
|
||||
performance->totalCPOWTime += duration;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ class JS_PUBLIC_API(CallbackTracer) : public JSTracer
|
||||
class AutoTracingName
|
||||
{
|
||||
CallbackTracer* trc_;
|
||||
const char *prior_;
|
||||
const char* prior_;
|
||||
|
||||
public:
|
||||
AutoTracingName(CallbackTracer* trc, const char* name) : trc_(trc), prior_(trc->contextName_) {
|
||||
@ -290,7 +290,7 @@ class AutoTracingDetails
|
||||
class AutoOriginalTraceLocation
|
||||
{
|
||||
#ifdef JS_GC_ZEAL
|
||||
CallbackTracer *trc_;
|
||||
CallbackTracer* trc_;
|
||||
|
||||
public:
|
||||
template <typename T>
|
||||
|
@ -211,7 +211,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, jsval* vp)
|
||||
if (!JS_SetProperty(cx, info, "moz-memory", value))
|
||||
return false;
|
||||
|
||||
value.setInt32(sizeof(void *));
|
||||
value.setInt32(sizeof(void*));
|
||||
if (!JS_SetProperty(cx, info, "pointer-byte-size", value))
|
||||
return false;
|
||||
|
||||
|
@ -404,7 +404,7 @@ struct InternalGCMethods<jsid>
|
||||
static JS::shadow::Runtime* shadowRuntimeFromAnyThread(jsid id) {
|
||||
return reinterpret_cast<JS::shadow::Runtime*>(runtimeFromAnyThread(id));
|
||||
}
|
||||
static void preBarrierImpl(Zone *zone, jsid id) {
|
||||
static void preBarrierImpl(Zone* zone, jsid id) {
|
||||
JS::shadow::Zone* shadowZone = JS::shadow::Zone::asShadowZone(zone);
|
||||
if (shadowZone->needsIncrementalBarrier()) {
|
||||
jsid tmp(id);
|
||||
|
@ -351,13 +351,13 @@ ICStub::trace(JSTracer* trc)
|
||||
break;
|
||||
}
|
||||
case ICStub::In_Native: {
|
||||
ICIn_Native *inStub = toIn_Native();
|
||||
ICIn_Native* inStub = toIn_Native();
|
||||
TraceEdge(trc, &inStub->shape(), "baseline-innative-stub-shape");
|
||||
TraceEdge(trc, &inStub->name(), "baseline-innative-stub-name");
|
||||
break;
|
||||
}
|
||||
case ICStub::In_NativePrototype: {
|
||||
ICIn_NativePrototype *inStub = toIn_NativePrototype();
|
||||
ICIn_NativePrototype* inStub = toIn_NativePrototype();
|
||||
TraceEdge(trc, &inStub->shape(), "baseline-innativeproto-stub-shape");
|
||||
TraceEdge(trc, &inStub->name(), "baseline-innativeproto-stub-name");
|
||||
TraceEdge(trc, &inStub->holder(), "baseline-innativeproto-stub-holder");
|
||||
@ -365,7 +365,7 @@ ICStub::trace(JSTracer* trc)
|
||||
break;
|
||||
}
|
||||
case ICStub::In_NativeDoesNotExist: {
|
||||
ICIn_NativeDoesNotExist *inStub = toIn_NativeDoesNotExist();
|
||||
ICIn_NativeDoesNotExist* inStub = toIn_NativeDoesNotExist();
|
||||
TraceEdge(trc, &inStub->name(), "baseline-innativedoesnotexist-stub-name");
|
||||
JS_STATIC_ASSERT(ICIn_NativeDoesNotExist::MAX_PROTO_CHAIN_DEPTH == 8);
|
||||
switch (inStub->protoChainDepth()) {
|
||||
@ -383,7 +383,7 @@ ICStub::trace(JSTracer* trc)
|
||||
break;
|
||||
}
|
||||
case ICStub::In_Dense: {
|
||||
ICIn_Dense *inStub = toIn_Dense();
|
||||
ICIn_Dense* inStub = toIn_Dense();
|
||||
TraceEdge(trc, &inStub->shape(), "baseline-in-dense-shape");
|
||||
break;
|
||||
}
|
||||
@ -3806,7 +3806,7 @@ ArgumentsGetElemStubExists(ICGetElem_Fallback* stub, ICGetElem_Arguments::Which
|
||||
}
|
||||
|
||||
static bool
|
||||
IsOptimizableElementPropertyName(JSContext *cx, HandleValue key, MutableHandleId idp)
|
||||
IsOptimizableElementPropertyName(JSContext* cx, HandleValue key, MutableHandleId idp)
|
||||
{
|
||||
if (!key.isString())
|
||||
return false;
|
||||
@ -5856,8 +5856,8 @@ ICSetElem_TypedArray::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
//
|
||||
|
||||
static bool
|
||||
TryAttachDenseInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub,
|
||||
HandleValue key, HandleObject obj, bool *attached)
|
||||
TryAttachDenseInStub(JSContext* cx, HandleScript script, ICIn_Fallback* stub,
|
||||
HandleValue key, HandleObject obj, bool* attached)
|
||||
{
|
||||
MOZ_ASSERT(!*attached);
|
||||
|
||||
@ -5866,7 +5866,7 @@ TryAttachDenseInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub,
|
||||
|
||||
JitSpew(JitSpew_BaselineIC, " Generating In(Native[Int32] dense) stub");
|
||||
ICIn_Dense::Compiler compiler(cx, obj->as<NativeObject>().lastProperty());
|
||||
ICStub *denseStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
ICStub* denseStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
if (!denseStub)
|
||||
return false;
|
||||
|
||||
@ -5876,8 +5876,8 @@ TryAttachDenseInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub,
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachNativeInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub,
|
||||
HandleValue key, HandleObject obj, bool *attached)
|
||||
TryAttachNativeInStub(JSContext* cx, HandleScript script, ICIn_Fallback* stub,
|
||||
HandleValue key, HandleObject obj, bool* attached)
|
||||
{
|
||||
MOZ_ASSERT(!*attached);
|
||||
|
||||
@ -5897,7 +5897,7 @@ TryAttachNativeInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub,
|
||||
JitSpew(JitSpew_BaselineIC, " Generating In(Native %s) stub",
|
||||
(obj == holder) ? "direct" : "prototype");
|
||||
ICInNativeCompiler compiler(cx, kind, obj, holder, name);
|
||||
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
if (!newStub)
|
||||
return false;
|
||||
|
||||
@ -5910,9 +5910,9 @@ TryAttachNativeInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub,
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachNativeInDoesNotExistStub(JSContext *cx, HandleScript script,
|
||||
ICIn_Fallback *stub, HandleValue key,
|
||||
HandleObject obj, bool *attached)
|
||||
TryAttachNativeInDoesNotExistStub(JSContext* cx, HandleScript script,
|
||||
ICIn_Fallback* stub, HandleValue key,
|
||||
HandleObject obj, bool* attached)
|
||||
{
|
||||
MOZ_ASSERT(!*attached);
|
||||
|
||||
@ -5934,7 +5934,7 @@ TryAttachNativeInDoesNotExistStub(JSContext *cx, HandleScript script,
|
||||
// Confirmed no-such-property. Add stub.
|
||||
JitSpew(JitSpew_BaselineIC, " Generating In_NativeDoesNotExist stub");
|
||||
ICInNativeDoesNotExistCompiler compiler(cx, obj, name, protoChainDepth);
|
||||
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
|
||||
if (!newStub)
|
||||
return false;
|
||||
|
||||
@ -5944,7 +5944,7 @@ TryAttachNativeInDoesNotExistStub(JSContext *cx, HandleScript script,
|
||||
}
|
||||
|
||||
static bool
|
||||
DoInFallback(JSContext *cx, BaselineFrame *frame, ICIn_Fallback *stub_,
|
||||
DoInFallback(JSContext* cx, BaselineFrame* frame, ICIn_Fallback* stub_,
|
||||
HandleValue key, HandleValue objValue, MutableHandleValue res)
|
||||
{
|
||||
// This fallback stub may trigger debug mode toggling.
|
||||
@ -5993,7 +5993,7 @@ DoInFallback(JSContext *cx, BaselineFrame *frame, ICIn_Fallback *stub_,
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef bool (*DoInFallbackFn)(JSContext *, BaselineFrame *, ICIn_Fallback *, HandleValue,
|
||||
typedef bool (*DoInFallbackFn)(JSContext*, BaselineFrame*, ICIn_Fallback*, HandleValue,
|
||||
HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoInFallbackInfo =
|
||||
FunctionInfo<DoInFallbackFn>(DoInFallback, TailCall, PopValues(2));
|
||||
@ -6017,7 +6017,7 @@ ICIn_Fallback::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
}
|
||||
|
||||
bool
|
||||
ICInNativeCompiler::generateStubCode(MacroAssembler &masm)
|
||||
ICInNativeCompiler::generateStubCode(MacroAssembler& masm)
|
||||
{
|
||||
Label failure, failurePopR0Scratch;
|
||||
|
||||
@ -6061,8 +6061,8 @@ ICInNativeCompiler::generateStubCode(MacroAssembler &masm)
|
||||
return true;
|
||||
}
|
||||
|
||||
ICStub *
|
||||
ICInNativeDoesNotExistCompiler::getStub(ICStubSpace *space)
|
||||
ICStub*
|
||||
ICInNativeDoesNotExistCompiler::getStub(ICStubSpace* space)
|
||||
{
|
||||
AutoShapeVector shapes(cx);
|
||||
if (!shapes.append(obj_->as<NativeObject>().lastProperty()))
|
||||
@ -6073,7 +6073,7 @@ ICInNativeDoesNotExistCompiler::getStub(ICStubSpace *space)
|
||||
|
||||
JS_STATIC_ASSERT(ICIn_NativeDoesNotExist::MAX_PROTO_CHAIN_DEPTH == 8);
|
||||
|
||||
ICStub *stub = nullptr;
|
||||
ICStub* stub = nullptr;
|
||||
switch (protoChainDepth_) {
|
||||
case 0: stub = getStubSpecific<0>(space, &shapes); break;
|
||||
case 1: stub = getStubSpecific<1>(space, &shapes); break;
|
||||
@ -6092,7 +6092,7 @@ ICInNativeDoesNotExistCompiler::getStub(ICStubSpace *space)
|
||||
}
|
||||
|
||||
bool
|
||||
ICInNativeDoesNotExistCompiler::generateStubCode(MacroAssembler &masm)
|
||||
ICInNativeDoesNotExistCompiler::generateStubCode(MacroAssembler& masm)
|
||||
{
|
||||
Label failure, failurePopR0Scratch;
|
||||
|
||||
@ -6149,7 +6149,7 @@ ICInNativeDoesNotExistCompiler::generateStubCode(MacroAssembler &masm)
|
||||
}
|
||||
|
||||
bool
|
||||
ICIn_Dense::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
ICIn_Dense::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
{
|
||||
Label failure;
|
||||
|
||||
@ -7335,10 +7335,10 @@ TryAttachPrimitiveGetPropStub(JSContext* cx, HandleScript script, jsbytecode* pc
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachNativeGetPropDoesNotExistStub(JSContext *cx, HandleScript script,
|
||||
jsbytecode *pc, ICGetProp_Fallback *stub,
|
||||
TryAttachNativeGetPropDoesNotExistStub(JSContext* cx, HandleScript script,
|
||||
jsbytecode* pc, ICGetProp_Fallback* stub,
|
||||
HandlePropertyName name, HandleValue val,
|
||||
bool *attached)
|
||||
bool* attached)
|
||||
{
|
||||
MOZ_ASSERT(!*attached);
|
||||
|
||||
@ -12372,14 +12372,14 @@ ICSetElem_TypedArray::ICSetElem_TypedArray(JitCode* stubCode, Shape* shape, Scal
|
||||
extra_ |= (static_cast<uint16_t>(expectOutOfBounds) << 8);
|
||||
}
|
||||
|
||||
ICInNativeStub::ICInNativeStub(ICStub::Kind kind, JitCode *stubCode, HandleShape shape,
|
||||
ICInNativeStub::ICInNativeStub(ICStub::Kind kind, JitCode* stubCode, HandleShape shape,
|
||||
HandlePropertyName name)
|
||||
: ICStub(kind, stubCode),
|
||||
shape_(shape),
|
||||
name_(name)
|
||||
{ }
|
||||
|
||||
ICIn_NativePrototype::ICIn_NativePrototype(JitCode *stubCode, HandleShape shape,
|
||||
ICIn_NativePrototype::ICIn_NativePrototype(JitCode* stubCode, HandleShape shape,
|
||||
HandlePropertyName name, HandleObject holder,
|
||||
HandleShape holderShape)
|
||||
: ICInNativeStub(In_NativePrototype, stubCode, shape, name),
|
||||
@ -12387,7 +12387,7 @@ ICIn_NativePrototype::ICIn_NativePrototype(JitCode *stubCode, HandleShape shape,
|
||||
holderShape_(holderShape)
|
||||
{ }
|
||||
|
||||
ICIn_NativeDoesNotExist::ICIn_NativeDoesNotExist(JitCode *stubCode, size_t protoChainDepth,
|
||||
ICIn_NativeDoesNotExist::ICIn_NativeDoesNotExist(JitCode* stubCode, size_t protoChainDepth,
|
||||
HandlePropertyName name)
|
||||
: ICStub(In_NativeDoesNotExist, stubCode),
|
||||
name_(name)
|
||||
@ -12407,7 +12407,7 @@ ICIn_NativeDoesNotExist::offsetOfShape(size_t idx)
|
||||
|
||||
template <size_t ProtoChainDepth>
|
||||
ICIn_NativeDoesNotExistImpl<ProtoChainDepth>::ICIn_NativeDoesNotExistImpl(
|
||||
JitCode *stubCode, const AutoShapeVector *shapes, HandlePropertyName name)
|
||||
JitCode* stubCode, const AutoShapeVector* shapes, HandlePropertyName name)
|
||||
: ICIn_NativeDoesNotExist(stubCode, ProtoChainDepth, name)
|
||||
{
|
||||
MOZ_ASSERT(shapes->length() == NumShapes);
|
||||
@ -12416,7 +12416,7 @@ ICIn_NativeDoesNotExistImpl<ProtoChainDepth>::ICIn_NativeDoesNotExistImpl(
|
||||
}
|
||||
|
||||
ICInNativeDoesNotExistCompiler::ICInNativeDoesNotExistCompiler(
|
||||
JSContext *cx, HandleObject obj, HandlePropertyName name, size_t protoChainDepth)
|
||||
JSContext* cx, HandleObject obj, HandlePropertyName name, size_t protoChainDepth)
|
||||
: ICStubCompiler(cx, ICStub::In_NativeDoesNotExist),
|
||||
obj_(cx, obj),
|
||||
name_(cx, name),
|
||||
@ -12425,7 +12425,7 @@ ICInNativeDoesNotExistCompiler::ICInNativeDoesNotExistCompiler(
|
||||
MOZ_ASSERT(protoChainDepth_ <= ICIn_NativeDoesNotExist::MAX_PROTO_CHAIN_DEPTH);
|
||||
}
|
||||
|
||||
ICIn_Dense::ICIn_Dense(JitCode *stubCode, HandleShape shape)
|
||||
ICIn_Dense::ICIn_Dense(JitCode* stubCode, HandleShape shape)
|
||||
: ICStub(In_Dense, stubCode),
|
||||
shape_(shape)
|
||||
{ }
|
||||
|
@ -3422,18 +3422,18 @@ class ICInNativeStub : public ICStub
|
||||
HeapPtrPropertyName name_;
|
||||
|
||||
protected:
|
||||
ICInNativeStub(ICStub::Kind kind, JitCode *stubCode, HandleShape shape,
|
||||
ICInNativeStub(ICStub::Kind kind, JitCode* stubCode, HandleShape shape,
|
||||
HandlePropertyName name);
|
||||
|
||||
public:
|
||||
HeapPtrShape &shape() {
|
||||
HeapPtrShape& shape() {
|
||||
return shape_;
|
||||
}
|
||||
static size_t offsetOfShape() {
|
||||
return offsetof(ICInNativeStub, shape_);
|
||||
}
|
||||
|
||||
HeapPtrPropertyName &name() {
|
||||
HeapPtrPropertyName& name() {
|
||||
return name_;
|
||||
}
|
||||
static size_t offsetOfName() {
|
||||
@ -3446,7 +3446,7 @@ class ICIn_Native : public ICInNativeStub
|
||||
{
|
||||
friend class ICStubSpace;
|
||||
|
||||
ICIn_Native(JitCode *stubCode, HandleShape shape, HandlePropertyName name)
|
||||
ICIn_Native(JitCode* stubCode, HandleShape shape, HandlePropertyName name)
|
||||
: ICInNativeStub(In_Native, stubCode, shape, name)
|
||||
{}
|
||||
};
|
||||
@ -3461,14 +3461,14 @@ class ICIn_NativePrototype : public ICInNativeStub
|
||||
HeapPtrObject holder_;
|
||||
HeapPtrShape holderShape_;
|
||||
|
||||
ICIn_NativePrototype(JitCode *stubCode, HandleShape shape, HandlePropertyName name,
|
||||
ICIn_NativePrototype(JitCode* stubCode, HandleShape shape, HandlePropertyName name,
|
||||
HandleObject holder, HandleShape holderShape);
|
||||
|
||||
public:
|
||||
HeapPtrObject &holder() {
|
||||
HeapPtrObject& holder() {
|
||||
return holder_;
|
||||
}
|
||||
HeapPtrShape &holderShape() {
|
||||
HeapPtrShape& holderShape() {
|
||||
return holderShape_;
|
||||
}
|
||||
static size_t offsetOfHolder() {
|
||||
@ -3486,10 +3486,10 @@ class ICInNativeCompiler : public ICStubCompiler
|
||||
RootedObject holder_;
|
||||
RootedPropertyName name_;
|
||||
|
||||
bool generateStubCode(MacroAssembler &masm);
|
||||
bool generateStubCode(MacroAssembler& masm);
|
||||
|
||||
public:
|
||||
ICInNativeCompiler(JSContext *cx, ICStub::Kind kind, HandleObject obj, HandleObject holder,
|
||||
ICInNativeCompiler(JSContext* cx, ICStub::Kind kind, HandleObject obj, HandleObject holder,
|
||||
HandlePropertyName name)
|
||||
: ICStubCompiler(cx, kind),
|
||||
obj_(cx, obj),
|
||||
@ -3497,7 +3497,7 @@ class ICInNativeCompiler : public ICStubCompiler
|
||||
name_(cx, name)
|
||||
{}
|
||||
|
||||
ICStub *getStub(ICStubSpace *space) {
|
||||
ICStub* getStub(ICStubSpace* space) {
|
||||
RootedShape shape(cx, obj_->as<NativeObject>().lastProperty());
|
||||
if (kind == ICStub::In_Native) {
|
||||
MOZ_ASSERT(obj_ == holder_);
|
||||
@ -3524,7 +3524,7 @@ class ICIn_NativeDoesNotExist : public ICStub
|
||||
static const size_t MAX_PROTO_CHAIN_DEPTH = 8;
|
||||
|
||||
protected:
|
||||
ICIn_NativeDoesNotExist(JitCode *stubCode, size_t protoChainDepth,
|
||||
ICIn_NativeDoesNotExist(JitCode* stubCode, size_t protoChainDepth,
|
||||
HandlePropertyName name);
|
||||
|
||||
public:
|
||||
@ -3532,14 +3532,14 @@ class ICIn_NativeDoesNotExist : public ICStub
|
||||
MOZ_ASSERT(extra_ <= MAX_PROTO_CHAIN_DEPTH);
|
||||
return extra_;
|
||||
}
|
||||
HeapPtrPropertyName &name() {
|
||||
HeapPtrPropertyName& name() {
|
||||
return name_;
|
||||
}
|
||||
|
||||
template <size_t ProtoChainDepth>
|
||||
ICIn_NativeDoesNotExistImpl<ProtoChainDepth> *toImpl() {
|
||||
ICIn_NativeDoesNotExistImpl<ProtoChainDepth>* toImpl() {
|
||||
MOZ_ASSERT(ProtoChainDepth == protoChainDepth());
|
||||
return static_cast<ICIn_NativeDoesNotExistImpl<ProtoChainDepth> *>(this);
|
||||
return static_cast<ICIn_NativeDoesNotExistImpl<ProtoChainDepth>*>(this);
|
||||
}
|
||||
|
||||
static size_t offsetOfShape(size_t idx);
|
||||
@ -3560,11 +3560,11 @@ class ICIn_NativeDoesNotExistImpl : public ICIn_NativeDoesNotExist
|
||||
private:
|
||||
mozilla::Array<HeapPtrShape, NumShapes> shapes_;
|
||||
|
||||
ICIn_NativeDoesNotExistImpl(JitCode *stubCode, const AutoShapeVector *shapes,
|
||||
ICIn_NativeDoesNotExistImpl(JitCode* stubCode, const AutoShapeVector* shapes,
|
||||
HandlePropertyName name);
|
||||
|
||||
public:
|
||||
void traceShapes(JSTracer *trc) {
|
||||
void traceShapes(JSTracer* trc) {
|
||||
for (size_t i = 0; i < NumShapes; i++)
|
||||
TraceEdge(trc, &shapes_[i], "baseline-innativedoesnotexist-stub-shape");
|
||||
}
|
||||
@ -3585,19 +3585,19 @@ class ICInNativeDoesNotExistCompiler : public ICStubCompiler
|
||||
return static_cast<int32_t>(kind) | (static_cast<int32_t>(protoChainDepth_) << 16);
|
||||
}
|
||||
|
||||
bool generateStubCode(MacroAssembler &masm);
|
||||
bool generateStubCode(MacroAssembler& masm);
|
||||
|
||||
public:
|
||||
ICInNativeDoesNotExistCompiler(JSContext *cx, HandleObject obj, HandlePropertyName name,
|
||||
ICInNativeDoesNotExistCompiler(JSContext* cx, HandleObject obj, HandlePropertyName name,
|
||||
size_t protoChainDepth);
|
||||
|
||||
template <size_t ProtoChainDepth>
|
||||
ICStub *getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes) {
|
||||
ICStub* getStubSpecific(ICStubSpace* space, const AutoShapeVector* shapes) {
|
||||
return ICStub::New<ICIn_NativeDoesNotExistImpl<ProtoChainDepth>>(space, getStubCode(),
|
||||
shapes, name_);
|
||||
}
|
||||
|
||||
ICStub *getStub(ICStubSpace *space);
|
||||
ICStub* getStub(ICStubSpace* space);
|
||||
};
|
||||
|
||||
class ICIn_Dense : public ICStub
|
||||
@ -3606,10 +3606,10 @@ class ICIn_Dense : public ICStub
|
||||
|
||||
HeapPtrShape shape_;
|
||||
|
||||
ICIn_Dense(JitCode *stubCode, HandleShape shape);
|
||||
ICIn_Dense(JitCode* stubCode, HandleShape shape);
|
||||
|
||||
public:
|
||||
HeapPtrShape &shape() {
|
||||
HeapPtrShape& shape() {
|
||||
return shape_;
|
||||
}
|
||||
static size_t offsetOfShape() {
|
||||
@ -3620,15 +3620,15 @@ class ICIn_Dense : public ICStub
|
||||
RootedShape shape_;
|
||||
|
||||
protected:
|
||||
bool generateStubCode(MacroAssembler &masm);
|
||||
bool generateStubCode(MacroAssembler& masm);
|
||||
|
||||
public:
|
||||
Compiler(JSContext *cx, Shape *shape)
|
||||
Compiler(JSContext* cx, Shape* shape)
|
||||
: ICStubCompiler(cx, ICStub::In_Dense),
|
||||
shape_(cx, shape)
|
||||
{}
|
||||
|
||||
ICStub *getStub(ICStubSpace *space) {
|
||||
ICStub* getStub(ICStubSpace* space) {
|
||||
return ICStub::New<ICIn_Dense>(space, getStubCode(), shape_);
|
||||
}
|
||||
};
|
||||
|
@ -1023,7 +1023,7 @@ RegExpPairsVectorStartOffset(size_t inputOutputDataStartOffset)
|
||||
}
|
||||
|
||||
static Address
|
||||
RegExpPairCountAddress(MacroAssembler &masm, size_t inputOutputDataStartOffset)
|
||||
RegExpPairCountAddress(MacroAssembler& masm, size_t inputOutputDataStartOffset)
|
||||
{
|
||||
return Address(masm.getStackPointer(), inputOutputDataStartOffset
|
||||
+ sizeof(irregexp::InputOutputData)
|
||||
|
@ -102,7 +102,7 @@ AnalyzeLsh(TempAllocator& alloc, MLsh* lsh)
|
||||
|
||||
template<typename MAsmJSHeapAccessType>
|
||||
bool
|
||||
EffectiveAddressAnalysis::tryAddDisplacement(MAsmJSHeapAccessType *ins, int32_t o)
|
||||
EffectiveAddressAnalysis::tryAddDisplacement(MAsmJSHeapAccessType* ins, int32_t o)
|
||||
{
|
||||
// Compute the new offset. Check for overflow and negative. In theory it
|
||||
// ought to be possible to support negative offsets, but it'd require
|
||||
|
@ -18,13 +18,13 @@ class EffectiveAddressAnalysis
|
||||
MIRGraph& graph_;
|
||||
|
||||
template<typename MAsmJSHeapAccessType>
|
||||
bool tryAddDisplacement(MAsmJSHeapAccessType *ins, int32_t o);
|
||||
bool tryAddDisplacement(MAsmJSHeapAccessType* ins, int32_t o);
|
||||
|
||||
template<typename MAsmJSHeapAccessType>
|
||||
void analyzeAsmHeapAccess(MAsmJSHeapAccessType* ins);
|
||||
|
||||
public:
|
||||
EffectiveAddressAnalysis(MIRGenerator *mir, MIRGraph& graph)
|
||||
EffectiveAddressAnalysis(MIRGenerator* mir, MIRGraph& graph)
|
||||
: mir_(mir), graph_(graph)
|
||||
{}
|
||||
|
||||
|
@ -12883,7 +12883,7 @@ IonBuilder::constant(const Value& v)
|
||||
MOZ_ASSERT(!v.isString() || v.toString()->isAtom(),
|
||||
"To handle non-atomized strings, you should use constantMaybeAtomize instead of constant.");
|
||||
if (v.isString() && MOZ_UNLIKELY(!v.toString()->isAtom())) {
|
||||
MConstant *cst = constantMaybeAtomize(v);
|
||||
MConstant* cst = constantMaybeAtomize(v);
|
||||
if (!cst)
|
||||
js::CrashAtUnhandlableOOM("Use constantMaybeAtomize.");
|
||||
return cst;
|
||||
|
@ -528,7 +528,7 @@ BaselineFrameAndStackPointersFromTryNote(JSTryNote* tn, const JitFrameIterator&
|
||||
}
|
||||
|
||||
static void
|
||||
SettleOnTryNote(JSContext* cx, JSTryNote *tn, const JitFrameIterator& frame,
|
||||
SettleOnTryNote(JSContext* cx, JSTryNote* tn, const JitFrameIterator& frame,
|
||||
ScopeIter& si, ResumeFromException* rfe, jsbytecode** pc)
|
||||
{
|
||||
RootedScript script(cx, frame.baselineFrame()->script());
|
||||
|
@ -8090,7 +8090,7 @@ class MNot
|
||||
cacheOperandMightEmulateUndefined(constraints);
|
||||
}
|
||||
|
||||
void cacheOperandMightEmulateUndefined(CompilerConstraintList *constraints);
|
||||
void cacheOperandMightEmulateUndefined(CompilerConstraintList* constraints);
|
||||
|
||||
public:
|
||||
static MNot* New(TempAllocator& alloc, MDefinition* elements,
|
||||
|
@ -970,15 +970,15 @@ class MacroAssembler : public MacroAssemblerSpecific
|
||||
// On ARM64, sp can function as the zero register depending on context.
|
||||
// Code shared across platforms must use these functions to be valid.
|
||||
template <typename T>
|
||||
void branchTestStackPtr(Condition cond, T t, Label *label) {
|
||||
void branchTestStackPtr(Condition cond, T t, Label* label) {
|
||||
branchTestPtr(cond, getStackPointer(), t, label);
|
||||
}
|
||||
template <typename T>
|
||||
void branchStackPtr(Condition cond, T rhs, Label *label) {
|
||||
void branchStackPtr(Condition cond, T rhs, Label* label) {
|
||||
branchPtr(cond, getStackPointer(), rhs, label);
|
||||
}
|
||||
template <typename T>
|
||||
void branchStackPtrRhs(Condition cond, T lhs, Label *label) {
|
||||
void branchStackPtrRhs(Condition cond, T lhs, Label* label) {
|
||||
branchPtr(cond, lhs, getStackPointer(), label);
|
||||
}
|
||||
#endif // !JS_CODEGEN_ARM64
|
||||
|
@ -984,7 +984,7 @@ extern JS_PUBLIC_API(JSString*)
|
||||
JS_ValueToSource(JSContext* cx, JS::Handle<JS::Value> v);
|
||||
|
||||
extern JS_PUBLIC_API(bool)
|
||||
JS_DoubleIsInt32(double d, int32_t *ip);
|
||||
JS_DoubleIsInt32(double d, int32_t* ip);
|
||||
|
||||
extern JS_PUBLIC_API(JSType)
|
||||
JS_TypeOfValue(JSContext* cx, JS::Handle<JS::Value> v);
|
||||
@ -5430,14 +5430,14 @@ struct PerformanceGroup {
|
||||
|
||||
// Mark that an instance of `AutoStopwatch` is monitoring
|
||||
// the performance of this group for a given iteration.
|
||||
void acquireStopwatch(uint64_t iteration, const AutoStopwatch *stopwatch) {
|
||||
void acquireStopwatch(uint64_t iteration, const AutoStopwatch* stopwatch) {
|
||||
iteration_ = iteration;
|
||||
stopwatch_ = stopwatch;
|
||||
}
|
||||
|
||||
// Mark that no `AutoStopwatch` is monitoring the
|
||||
// performance of this group for the iteration.
|
||||
void releaseStopwatch(uint64_t iteration, const AutoStopwatch *stopwatch) {
|
||||
void releaseStopwatch(uint64_t iteration, const AutoStopwatch* stopwatch) {
|
||||
if (iteration_ != iteration)
|
||||
return;
|
||||
|
||||
@ -5460,7 +5460,7 @@ struct PerformanceGroup {
|
||||
|
||||
// The stopwatch currently monitoring the group,
|
||||
// or `nullptr` if none. Used ony for comparison.
|
||||
const AutoStopwatch *stopwatch_;
|
||||
const AutoStopwatch* stopwatch_;
|
||||
|
||||
// The current iteration of the event loop. If necessary,
|
||||
// may safely overflow.
|
||||
@ -5490,7 +5490,7 @@ struct PerformanceGroupHolder {
|
||||
// Get the group.
|
||||
// On first call, this causes a single Hashtable lookup.
|
||||
// Successive calls do not require further lookups.
|
||||
js::PerformanceGroup *getGroup();
|
||||
js::PerformanceGroup* getGroup();
|
||||
|
||||
// `true` if the this holder is currently associated to a
|
||||
// PerformanceGroup, `false` otherwise. Use this method to avoid
|
||||
@ -5505,7 +5505,7 @@ struct PerformanceGroupHolder {
|
||||
// (new values of `isSystem()`, `principals()` or `addonId`).
|
||||
void unlink();
|
||||
|
||||
PerformanceGroupHolder(JSRuntime *runtime, JSCompartment *compartment)
|
||||
PerformanceGroupHolder(JSRuntime* runtime, JSCompartment* compartment)
|
||||
: runtime_(runtime)
|
||||
, compartment_(compartment)
|
||||
, group_(nullptr)
|
||||
@ -5517,13 +5517,13 @@ private:
|
||||
// Do not deallocate the key.
|
||||
void* getHashKey();
|
||||
|
||||
JSRuntime *runtime_;
|
||||
JSCompartment *compartment_;
|
||||
JSRuntime* runtime_;
|
||||
JSCompartment* compartment_;
|
||||
|
||||
// The PerformanceGroup held by this object.
|
||||
// Initially set to `nullptr` until the first cal to `getGroup`.
|
||||
// May be reset to `nullptr` by a call to `unlink`.
|
||||
js::PerformanceGroup *group_;
|
||||
js::PerformanceGroup* group_;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -5560,7 +5560,7 @@ struct PerformanceStats {
|
||||
* If this group represents an add-on, the ID of the addon,
|
||||
* otherwise `nullptr`.
|
||||
*/
|
||||
JSAddonId *addonId;
|
||||
JSAddonId* addonId;
|
||||
|
||||
/**
|
||||
* If this group represents a webpage, the process itself or a special
|
||||
@ -5598,7 +5598,7 @@ typedef js::Vector<PerformanceStats, 0, js::SystemAllocPolicy> PerformanceStatsV
|
||||
* representing the entire process.
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
GetPerformanceStats(JSRuntime *rt, js::PerformanceStatsVector &stats, js::PerformanceStats &global);
|
||||
GetPerformanceStats(JSRuntime* rt, js::PerformanceStatsVector& stats, js::PerformanceStats& global);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
|
@ -764,9 +764,9 @@ js::ReportErrorNumberVA(JSContext* cx, unsigned flags, JSErrorCallback callback,
|
||||
}
|
||||
|
||||
static bool
|
||||
ExpandErrorArguments(ExclusiveContext *cx, JSErrorCallback callback,
|
||||
void *userRef, const unsigned errorNumber,
|
||||
char **messagep, JSErrorReport *reportp,
|
||||
ExpandErrorArguments(ExclusiveContext* cx, JSErrorCallback callback,
|
||||
void* userRef, const unsigned errorNumber,
|
||||
char** messagep, JSErrorReport* reportp,
|
||||
ErrorArgumentsType argumentsType, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -4041,17 +4041,17 @@ JSObject::sizeOfIncludingThisInNursery() const
|
||||
|
||||
MOZ_ASSERT(!isTenured());
|
||||
|
||||
const Nursery &nursery = compartment()->runtimeFromAnyThread()->gc.nursery;
|
||||
const Nursery& nursery = compartment()->runtimeFromAnyThread()->gc.nursery;
|
||||
size_t size = Arena::thingSize(allocKindForTenure(nursery));
|
||||
|
||||
if (is<NativeObject>()) {
|
||||
const NativeObject &native = as<NativeObject>();
|
||||
const NativeObject& native = as<NativeObject>();
|
||||
|
||||
size += native.numFixedSlots() * sizeof(Value);
|
||||
size += native.numDynamicSlots() * sizeof(Value);
|
||||
|
||||
if (native.hasDynamicElements()) {
|
||||
js::ObjectElements &elements = *native.getElementsHeader();
|
||||
js::ObjectElements& elements = *native.getElementsHeader();
|
||||
if (!elements.isCopyOnWrite() || elements.ownerObject() == this)
|
||||
size += elements.capacity * sizeof(HeapSlot);
|
||||
}
|
||||
@ -4063,7 +4063,7 @@ JSObject::sizeOfIncludingThisInNursery() const
|
||||
size_t
|
||||
JS::ubi::Concrete<JSObject>::size(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
JSObject &obj = get();
|
||||
JSObject& obj = get();
|
||||
|
||||
if (!obj.isTenured())
|
||||
return obj.sizeOfIncludingThisInNursery();
|
||||
|
@ -283,7 +283,7 @@ class JSObject : public js::gc::Cell
|
||||
static MOZ_ALWAYS_INLINE void writeBarrierPostRemove(JSObject* obj, void* cellp);
|
||||
|
||||
/* Return the allocKind we would use if we were to tenure this object. */
|
||||
js::gc::AllocKind allocKindForTenure(const js::Nursery &nursery) const;
|
||||
js::gc::AllocKind allocKindForTenure(const js::Nursery& nursery) const;
|
||||
|
||||
size_t tenuredSizeOfThis() const {
|
||||
MOZ_ASSERT(isTenured());
|
||||
|
@ -310,7 +310,7 @@ Shape::fixupAfterMovingGC()
|
||||
}
|
||||
|
||||
void
|
||||
Shape::fixupGetterSetterForBarrier(JSTracer *trc)
|
||||
Shape::fixupGetterSetterForBarrier(JSTracer* trc)
|
||||
{
|
||||
// Relocating the getterObj or setterObj will change our location in our
|
||||
// parent's KidsHash, so remove ourself first if we're going to get moved.
|
||||
|
@ -408,7 +408,7 @@ struct AutoStopwatch final
|
||||
// stopwatch.
|
||||
//
|
||||
// Previous owner is restored upon destruction.
|
||||
explicit inline AutoStopwatch(JSContext *cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
explicit inline AutoStopwatch(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: compartment_(nullptr)
|
||||
, runtime_(nullptr)
|
||||
, iteration_(0)
|
||||
@ -428,7 +428,7 @@ struct AutoStopwatch final
|
||||
return;
|
||||
iteration_ = runtime_->stopwatch.iteration;
|
||||
|
||||
PerformanceGroup *group = compartment_->performanceMonitoring.getGroup();
|
||||
PerformanceGroup* group = compartment_->performanceMonitoring.getGroup();
|
||||
MOZ_ASSERT(group);
|
||||
|
||||
if (group->hasStopwatch(iteration_)) {
|
||||
@ -477,7 +477,7 @@ struct AutoStopwatch final
|
||||
return;
|
||||
}
|
||||
|
||||
PerformanceGroup *group = compartment_->performanceMonitoring.getGroup();
|
||||
PerformanceGroup* group = compartment_->performanceMonitoring.getGroup();
|
||||
MOZ_ASSERT(group);
|
||||
|
||||
// Compute time spent.
|
||||
@ -606,11 +606,11 @@ struct AutoStopwatch final
|
||||
private:
|
||||
// The compartment with which this object was initialized.
|
||||
// Non-null.
|
||||
JSCompartment *compartment_;
|
||||
JSCompartment* compartment_;
|
||||
|
||||
// The runtime with which this object was initialized.
|
||||
// Non-null.
|
||||
JSRuntime *runtime_;
|
||||
JSRuntime* runtime_;
|
||||
|
||||
// An indication of the number of times we have entered the event
|
||||
// loop. Used only for comparison.
|
||||
|
@ -323,7 +323,7 @@ class MOZ_STACK_CLASS TryNoteIter
|
||||
};
|
||||
|
||||
bool
|
||||
HandleClosingGeneratorReturn(JSContext *cx, AbstractFramePtr frame, bool ok);
|
||||
HandleClosingGeneratorReturn(JSContext* cx, AbstractFramePtr frame, bool ok);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
|
@ -540,7 +540,7 @@ class ObjectGroup : public gc::TenuredCell
|
||||
|
||||
inline void clearProperties();
|
||||
void maybeSweep(AutoClearTypeInferenceStateOnOOM* oom);
|
||||
void traceChildren(JSTracer *trc);
|
||||
void traceChildren(JSTracer* trc);
|
||||
|
||||
private:
|
||||
#ifdef DEBUG
|
||||
|
@ -870,21 +870,21 @@ JS::IsProfilingEnabledForRuntime(JSRuntime* runtime)
|
||||
}
|
||||
|
||||
void
|
||||
js::ResetStopwatches(JSRuntime *rt)
|
||||
js::ResetStopwatches(JSRuntime* rt)
|
||||
{
|
||||
MOZ_ASSERT(rt);
|
||||
rt->stopwatch.reset();
|
||||
}
|
||||
|
||||
bool
|
||||
js::SetStopwatchActive(JSRuntime *rt, bool isActive)
|
||||
js::SetStopwatchActive(JSRuntime* rt, bool isActive)
|
||||
{
|
||||
MOZ_ASSERT(rt);
|
||||
return rt->stopwatch.setIsActive(isActive);
|
||||
}
|
||||
|
||||
bool
|
||||
js::IsStopwatchActive(JSRuntime *rt)
|
||||
js::IsStopwatchActive(JSRuntime* rt)
|
||||
{
|
||||
MOZ_ASSERT(rt);
|
||||
return rt->stopwatch.isActive();
|
||||
@ -931,7 +931,7 @@ js::PerformanceGroupHolder::unlink()
|
||||
js_delete(group);
|
||||
}
|
||||
|
||||
PerformanceGroup *
|
||||
PerformanceGroup*
|
||||
js::PerformanceGroupHolder::getGroup()
|
||||
{
|
||||
if (group_)
|
||||
@ -954,7 +954,7 @@ js::PerformanceGroupHolder::getGroup()
|
||||
}
|
||||
|
||||
PerformanceData*
|
||||
js::GetPerformanceData(JSRuntime *rt)
|
||||
js::GetPerformanceData(JSRuntime* rt)
|
||||
{
|
||||
return &rt->stopwatch.performance;
|
||||
}
|
||||
|
@ -970,7 +970,7 @@ class Shape : public gc::TenuredCell
|
||||
inline Shape* searchLinear(jsid id);
|
||||
|
||||
void fixupAfterMovingGC();
|
||||
void fixupGetterSetterForBarrier(JSTracer *trc);
|
||||
void fixupGetterSetterForBarrier(JSTracer* trc);
|
||||
|
||||
/* For JIT usage */
|
||||
static inline size_t offsetOfBase() { return offsetof(Shape, base_); }
|
||||
@ -1252,14 +1252,14 @@ GetterSetterWriteBarrierPost(AccessorShape* shape)
|
||||
{
|
||||
MOZ_ASSERT(shape);
|
||||
if (shape->hasGetterObject()) {
|
||||
gc::StoreBuffer *sb = reinterpret_cast<gc::Cell*>(shape->getterObject())->storeBuffer();
|
||||
gc::StoreBuffer* sb = reinterpret_cast<gc::Cell*>(shape->getterObject())->storeBuffer();
|
||||
if (sb) {
|
||||
sb->putGeneric(ShapeGetterSetterRef(shape));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (shape->hasSetterObject()) {
|
||||
gc::StoreBuffer *sb = reinterpret_cast<gc::Cell*>(shape->setterObject())->storeBuffer();
|
||||
gc::StoreBuffer* sb = reinterpret_cast<gc::Cell*>(shape->setterObject())->storeBuffer();
|
||||
if (sb) {
|
||||
sb->putGeneric(ShapeGetterSetterRef(shape));
|
||||
return;
|
||||
|
@ -2111,8 +2111,8 @@ js::StringIsTypedArrayIndex(const Latin1Char* s, size_t length, uint64_t* indexp
|
||||
|
||||
/* ES6 draft rev 34 (2015 Feb 20) 9.4.5.3 [[DefineOwnProperty]] step 3.c. */
|
||||
bool
|
||||
js::DefineTypedArrayElement(JSContext *cx, HandleObject obj, uint64_t index,
|
||||
Handle<PropertyDescriptor> desc, ObjectOpResult &result)
|
||||
js::DefineTypedArrayElement(JSContext* cx, HandleObject obj, uint64_t index,
|
||||
Handle<PropertyDescriptor> desc, ObjectOpResult& result)
|
||||
{
|
||||
MOZ_ASSERT(IsAnyTypedArray(obj));
|
||||
|
||||
|
@ -291,8 +291,8 @@ IsTypedArrayIndex(jsid id, uint64_t* indexp)
|
||||
* when the property key is a TypedArray index.
|
||||
*/
|
||||
bool
|
||||
DefineTypedArrayElement(JSContext *cx, HandleObject arr, uint64_t index,
|
||||
Handle<PropertyDescriptor> desc, ObjectOpResult &result);
|
||||
DefineTypedArrayElement(JSContext* cx, HandleObject arr, uint64_t index,
|
||||
Handle<PropertyDescriptor> desc, ObjectOpResult& result);
|
||||
|
||||
static inline unsigned
|
||||
TypedArrayShift(Scalar::Type viewType)
|
||||
|
@ -565,7 +565,7 @@ XPCConvert::JSData2Native(void* d, HandleValue s,
|
||||
if (length == size_t(-1)) {
|
||||
return false;
|
||||
}
|
||||
char* buffer = static_cast<char *>(moz_xmalloc(length + 1));
|
||||
char* buffer = static_cast<char*>(moz_xmalloc(length + 1));
|
||||
if (!buffer) {
|
||||
return false;
|
||||
}
|
||||
@ -1721,7 +1721,7 @@ XPCConvert::JSStringWithSize2Native(void* d, HandleValue s,
|
||||
len = count;
|
||||
|
||||
uint32_t alloc_len = (len + 1) * sizeof(char);
|
||||
char* buffer = static_cast<char *>(moz_xmalloc(alloc_len));
|
||||
char* buffer = static_cast<char*>(moz_xmalloc(alloc_len));
|
||||
if (!buffer) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user