From ceaeadcb3434c408c0c79e375af9e9eb57b59a0f Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sun, 11 Aug 2013 17:34:20 -0700 Subject: [PATCH] Back out 79684dc64173 (bug 898936) for 10.7 debug M4 crashes --- js/src/jit/BacktrackingAllocator.cpp | 6 +++--- js/src/jit/PerfSpewer.cpp | 10 ++++------ js/src/jit/RegisterAllocator.cpp | 2 +- js/src/jit/arm/Assembler-arm.h | 2 +- js/src/jit/arm/CodeGenerator-arm.cpp | 2 +- js/src/jit/arm/MacroAssembler-arm.cpp | 3 +++ .../jit/shared/IonAssemblerBufferWithConstantPools.h | 2 +- js/src/jsscript.cpp | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/js/src/jit/BacktrackingAllocator.cpp b/js/src/jit/BacktrackingAllocator.cpp index 82970b6ce8a1..f837d92acbe1 100644 --- a/js/src/jit/BacktrackingAllocator.cpp +++ b/js/src/jit/BacktrackingAllocator.cpp @@ -1189,7 +1189,7 @@ BacktrackingAllocator::dumpLiveness() LBlock *block = graph.getBlock(blockIndex); MBasicBlock *mir = block->mir(); - printf("\nBlock %lu", static_cast(blockIndex)); + printf("\nBlock %lu", blockIndex); for (size_t i = 0; i < mir->numSuccessors(); i++) printf(" [successor %u]", mir->getSuccessor(i)->id()); printf("\n"); @@ -1234,7 +1234,7 @@ BacktrackingAllocator::dumpLiveness() printf("reg %s: %s\n", AnyRegister::FromCode(i).name(), IntervalString(fixedIntervals[i])); for (size_t i = 0; i < graph.numVirtualRegisters(); i++) { - printf("v%lu:", static_cast(i)); + printf("v%lu:", i); VirtualRegister &vreg = vregs[i]; for (size_t j = 0; j < vreg.numIntervals(); j++) { if (j) @@ -1269,7 +1269,7 @@ BacktrackingAllocator::dumpAllocations() printf("Allocations:\n"); for (size_t i = 0; i < graph.numVirtualRegisters(); i++) { - printf("v%lu:", static_cast(i)); + printf("v%lu:", i); VirtualRegister &vreg = vregs[i]; for (size_t j = 0; j < vreg.numIntervals(); j++) { if (j) diff --git a/js/src/jit/PerfSpewer.cpp b/js/src/jit/PerfSpewer.cpp index 11ceb71f4056..69da0f17c1aa 100644 --- a/js/src/jit/PerfSpewer.cpp +++ b/js/src/jit/PerfSpewer.cpp @@ -149,7 +149,7 @@ PerfSpewer::writeProfile(JSScript *script, if (size > 0) { fprintf(fp_, "%lx %lx %s:%d: Func%02d\n", - reinterpret_cast(code->raw()), + reinterpret_cast(code->raw()), size, script->filename(), script->lineno, @@ -170,8 +170,7 @@ PerfSpewer::writeProfile(JSScript *script, if (cur < blockStart) { fprintf(fp_, "%lx %lx %s:%d: Func%02d-Block?\n", - static_cast(cur), - static_cast(blockStart - cur), + cur, blockStart - cur, script->filename(), script->lineno, thisFunctionIndex); } @@ -182,7 +181,7 @@ PerfSpewer::writeProfile(JSScript *script, if (size > 0) { fprintf(fp_, "%lx %lx %s:%d:%d: Func%02d-Block%d\n", - static_cast(blockStart), size, + blockStart, size, r.filename, r.lineNumber, r.columnNumber, thisFunctionIndex, r.id); } @@ -194,8 +193,7 @@ PerfSpewer::writeProfile(JSScript *script, if (cur < funcEnd) { fprintf(fp_, "%lx %lx %s:%d: Func%02d-OOL\n", - static_cast(cur), - static_cast(funcEnd - cur), + cur, funcEnd - cur, script->filename(), script->lineno, thisFunctionIndex); } diff --git a/js/src/jit/RegisterAllocator.cpp b/js/src/jit/RegisterAllocator.cpp index addc6cdc84ca..ab8e992c8925 100644 --- a/js/src/jit/RegisterAllocator.cpp +++ b/js/src/jit/RegisterAllocator.cpp @@ -366,7 +366,7 @@ AllocationIntegrityState::dump() LBlock *block = graph.getBlock(blockIndex); MBasicBlock *mir = block->mir(); - printf("\nBlock %lu", static_cast(blockIndex)); + printf("\nBlock %lu", blockIndex); for (size_t i = 0; i < mir->numSuccessors(); i++) printf(" [successor %u]", mir->getSuccessor(i)->id()); printf("\n"); diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index ea49af0d676f..a5f3570aa678 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -572,7 +572,7 @@ struct RIS { JS_ASSERT(ShiftAmount == imm); } - explicit RIS(Reg r) : ShiftAmount(r.ShiftAmount) {} + explicit RIS(Reg r) : ShiftAmount(ShiftAmount) { } }; struct RRS diff --git a/js/src/jit/arm/CodeGenerator-arm.cpp b/js/src/jit/arm/CodeGenerator-arm.cpp index 39b660c847a4..72a14c4a2efd 100644 --- a/js/src/jit/arm/CodeGenerator-arm.cpp +++ b/js/src/jit/arm/CodeGenerator-arm.cpp @@ -1040,7 +1040,7 @@ CodeGeneratorARM::visitOutOfLineTableSwitch(OutOfLineTableSwitch *ool) { MTableSwitch *mir = ool->mir(); - size_t numCases = mir->numCases(); + int numCases = mir->numCases(); for (size_t i = 0; i < numCases; i++) { LBlock *caseblock = mir->getCase(numCases - 1 - i)->lir(); Label *caseheader = caseblock->label(); diff --git a/js/src/jit/arm/MacroAssembler-arm.cpp b/js/src/jit/arm/MacroAssembler-arm.cpp index 774f1a5da37d..b35ac1eb6e6d 100644 --- a/js/src/jit/arm/MacroAssembler-arm.cpp +++ b/js/src/jit/arm/MacroAssembler-arm.cpp @@ -3103,7 +3103,10 @@ void MacroAssemblerARMCompat::passABIArg(const MoveOperand &from) { MoveOperand to; + uint32_t increment = 1; + bool useResolver = true; ++passedArgs_; + Move::Kind kind = Move::GENERAL; if (!enoughMemory_) return; if (from.isDouble()) { diff --git a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h index dfe0973a17bf..6889dd60531c 100644 --- a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h +++ b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h @@ -52,7 +52,7 @@ struct Pool Pool(int maxOffset_, int immSize_, int instSize_, int bias_, int alignment_, LifoAlloc &LifoAlloc_, bool isBackref_ = false, bool canDedup_ = false, Pool *other_ = NULL) - : maxOffset(maxOffset_), immSize(immSize_), instSize(instSize_), + : maxOffset(maxOffset_), immSize(immSize_), instSize(instSize), bias(bias_), alignment(alignment_), isBackref(isBackref_), canDedup(canDedup_), other(other_), poolData(static_cast(LifoAlloc_.alloc(8*immSize))), numEntries(0), diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index c256b611a8b2..94d80a55ed8a 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -164,7 +164,7 @@ Bindings::clone(JSContext *cx, InternalBindingsHandle self, Bindings &src = srcScript->bindings; ptrdiff_t off = (uint8_t *)src.bindingArray() - srcScript->data; JS_ASSERT(off >= 0); - JS_ASSERT(size_t(off) <= srcScript->dataSize); + JS_ASSERT(off <= srcScript->dataSize); Binding *dstPackedBindings = (Binding *)(dstScriptData + off); /*