From 1ab7cb0265de60199591d824088bda8f840c73b1 Mon Sep 17 00:00:00 2001 From: Johnny Stenback Date: Wed, 13 Oct 2010 11:17:13 -0700 Subject: [PATCH] Backed out changeset ad0c80eacba7 per request from sayrer due to a trace malloc alloc regression. --- js/src/methodjit/FrameState.cpp | 35 +----------------------------- js/src/methodjit/FrameState.h | 4 ---- js/src/methodjit/ImmutableSync.cpp | 5 ----- js/src/methodjit/ImmutableSync.h | 2 +- 4 files changed, 2 insertions(+), 44 deletions(-) diff --git a/js/src/methodjit/FrameState.cpp b/js/src/methodjit/FrameState.cpp index 831455c61ea0..30d2f08d75e9 100644 --- a/js/src/methodjit/FrameState.cpp +++ b/js/src/methodjit/FrameState.cpp @@ -47,10 +47,7 @@ using namespace js::mjit; JS_STATIC_ASSERT(sizeof(FrameEntry) % 8 == 0); FrameState::FrameState(JSContext *cx, JSScript *script, Assembler &masm) - : cx(cx), script(script), masm(masm), entries(NULL), -#if defined JS_NUNBOX32 - reifier(cx, *this), -#endif + : cx(cx), script(script), masm(masm), entries(NULL), reifier(cx, *this), inTryBlock(false) { } @@ -81,10 +78,8 @@ FrameState::init(uint32 nargs) if (!cursor) return false; -#if defined JS_NUNBOX32 if (!reifier.init(nslots)) return false; -#endif entries = (FrameEntry *)cursor; cursor += sizeof(FrameEntry) * nslots; @@ -419,7 +414,6 @@ FrameState::assertValidRegisterState() const } #endif -#if defined JS_NUNBOX32 void FrameState::syncFancy(Assembler &masm, Registers avail, FrameEntry *resumeAt, FrameEntry *bottom) const @@ -433,7 +427,6 @@ FrameState::syncFancy(Assembler &masm, Registers avail, FrameEntry *resumeAt, reifier.sync(fe); } } -#endif void FrameState::sync(Assembler &masm, Uses uses) const @@ -496,38 +489,12 @@ FrameState::sync(Assembler &masm, Uses uses) const backing = fe->copyOf(); JS_ASSERT(!backing->isConstant() && !fe->isConstant()); -#if defined JS_PUNBOX64 - if ((!fe->type.synced() && backing->type.inMemory()) || - (!fe->data.synced() && backing->data.inMemory())) { - - RegisterID syncReg = Registers::ValueReg; - - /* Load the entire Value into syncReg. */ - if (backing->type.synced() && backing->data.synced()) { - masm.loadValue(addressOf(backing), syncReg); - } else if (backing->type.inMemory()) { - masm.loadTypeTag(addressOf(backing), syncReg); - masm.orPtr(backing->data.reg(), syncReg); - } else { - JS_ASSERT(backing->data.inMemory()); - masm.loadPayload(addressOf(backing), syncReg); - if (backing->isTypeKnown()) - masm.orPtr(ImmType(backing->getKnownType()), syncReg); - else - masm.orPtr(backing->type.reg(), syncReg); - } - - masm.storeValue(syncReg, addressOf(fe)); - continue; - } -#elif defined JS_NUNBOX32 /* Fall back to a slower sync algorithm if load required. */ if ((!fe->type.synced() && backing->type.inMemory()) || (!fe->data.synced() && backing->data.inMemory())) { syncFancy(masm, avail, fe, bottom); return; } -#endif } /* If a part still needs syncing, it is either a copy or constant. */ diff --git a/js/src/methodjit/FrameState.h b/js/src/methodjit/FrameState.h index 6f9692380dd7..a858fcf228e5 100644 --- a/js/src/methodjit/FrameState.h +++ b/js/src/methodjit/FrameState.h @@ -807,10 +807,8 @@ class FrameState inline void swapInTracker(FrameEntry *lhs, FrameEntry *rhs); inline uint32 localIndex(uint32 n); void pushCopyOf(uint32 index); -#if defined JS_NUNBOX32 void syncFancy(Assembler &masm, Registers avail, FrameEntry *resumeAt, FrameEntry *bottom) const; -#endif inline bool tryFastDoubleLoad(FrameEntry *fe, FPRegisterID fpReg, Assembler &masm) const; void resetInternalState(); @@ -884,9 +882,7 @@ class FrameState */ RegisterState regstate[Assembler::TotalRegisters]; -#if defined JS_NUNBOX32 mutable ImmutableSync reifier; -#endif JSPackedBool *closedVars; bool eval; diff --git a/js/src/methodjit/ImmutableSync.cpp b/js/src/methodjit/ImmutableSync.cpp index 04d26fdfb4f6..46260aef3029 100644 --- a/js/src/methodjit/ImmutableSync.cpp +++ b/js/src/methodjit/ImmutableSync.cpp @@ -36,9 +36,6 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ - -#if defined JS_NUNBOX32 - #include "FrameEntry.h" #include "FrameState.h" #include "FrameState-inl.h" @@ -273,5 +270,3 @@ ImmutableSync::syncNormal(FrameEntry *fe) } } -#endif /* JS_NUNBOX32 */ - diff --git a/js/src/methodjit/ImmutableSync.h b/js/src/methodjit/ImmutableSync.h index 204dbab41891..28234af2f6db 100644 --- a/js/src/methodjit/ImmutableSync.h +++ b/js/src/methodjit/ImmutableSync.h @@ -37,7 +37,7 @@ * * ***** END LICENSE BLOCK ***** */ -#if !defined jsjaeger_imm_sync_h__ && defined JS_METHODJIT && defined JS_NUNBOX32 +#if !defined jsjaeger_imm_sync_h__ && defined JS_METHODJIT #define jsjaeger_imm_sync_h__ #include "methodjit/MachineRegs.h"