diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp index a2fe42b83298..65500e3247dc 100644 --- a/js/src/jscompartment.cpp +++ b/js/src/jscompartment.cpp @@ -585,6 +585,8 @@ JSCompartment::sweep(JSContext *cx, uint32 releaseInterval) } # endif + bool discardScripts = !active && (releaseInterval != 0 || hasDebugModeCodeToDrop); + #if defined JS_METHODJIT && defined JS_MONOIC /* @@ -595,7 +597,6 @@ JSCompartment::sweep(JSContext *cx, uint32 releaseInterval) * for compartments which currently have active stack frames. */ uint32 counter = 1; - bool discardScripts = !active && (releaseInterval != 0 || hasDebugModeCodeToDrop); if (discardScripts) hasDebugModeCodeToDrop = false; diff --git a/js/src/jsinfer.cpp b/js/src/jsinfer.cpp index 39bae9745f8a..ebf002215f03 100644 --- a/js/src/jsinfer.cpp +++ b/js/src/jsinfer.cpp @@ -2017,8 +2017,7 @@ TypeCompartment::setPendingNukeTypes(JSContext *cx) void TypeCompartment::nukeTypes(JSContext *cx) { - JSCompartment *compartment = cx->compartment; - JS_ASSERT(this == &compartment->types); + JS_ASSERT(this == &cx->compartment->types); /* * This is the usual response if we encounter an OOM while adding a type @@ -2060,7 +2059,8 @@ TypeCompartment::nukeTypes(JSContext *cx) #ifdef JS_METHODJIT - mjit::ExpandInlineFrames(cx->compartment); + JSCompartment *compartment = cx->compartment; + mjit::ExpandInlineFrames(compartment); /* Throw away all JIT code in the compartment, but leave everything else alone. */ for (JSCList *cursor = compartment->scripts.next; diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index 6e08389b361d..9dea4f3aa83a 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -1936,6 +1936,8 @@ Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode) #define MONITOR_BRANCH_TRACEVIS #endif +#endif /* !JS_TRACER */ + #define RESTORE_INTERP_VARS() \ JS_BEGIN_MACRO \ SET_SCRIPT(regs.fp()->script()); \ @@ -1954,8 +1956,6 @@ Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode) CHECK_INTERRUPT_HANDLER(); \ JS_END_MACRO -#endif /* !JS_TRACER */ - /* * Prepare to call a user-supplied branch handler, and abort the script * if it returns false. diff --git a/js/src/methodjit/Compiler.cpp b/js/src/methodjit/Compiler.cpp index 18d539206217..dc2a8e665084 100644 --- a/js/src/methodjit/Compiler.cpp +++ b/js/src/methodjit/Compiler.cpp @@ -6359,7 +6359,7 @@ mjit::Compiler::finishLoop(jsbytecode *head) #ifdef DEBUG if (IsJaegerSpewChannelActive(JSpew_Regalloc)) { RegisterAllocation *alloc = analysis->getAllocation(head); - JaegerSpew(JSpew_Regalloc, "loop allocation at %u:", head - script->code); + JaegerSpew(JSpew_Regalloc, "loop allocation at %u:", unsigned(head - script->code)); frame.dumpAllocation(alloc); } #endif diff --git a/js/src/methodjit/FrameState.cpp b/js/src/methodjit/FrameState.cpp index e4de49a8c45f..21b2502ed522 100644 --- a/js/src/methodjit/FrameState.cpp +++ b/js/src/methodjit/FrameState.cpp @@ -584,7 +584,7 @@ FrameState::computeAllocation(jsbytecode *target) /* State must be synced at exception and switch targets, and at traps. */ #ifdef DEBUG if (IsJaegerSpewChannelActive(JSpew_Regalloc)) { - JaegerSpew(JSpew_Regalloc, "allocation at %u:", target - a->script->code); + JaegerSpew(JSpew_Regalloc, "allocation at %u:", unsigned(target - a->script->code)); dumpAllocation(alloc); } #endif @@ -635,7 +635,7 @@ FrameState::computeAllocation(jsbytecode *target) #ifdef DEBUG if (IsJaegerSpewChannelActive(JSpew_Regalloc)) { - JaegerSpew(JSpew_Regalloc, "allocation at %u:", target - a->script->code); + JaegerSpew(JSpew_Regalloc, "allocation at %u:", unsigned(target - a->script->code)); dumpAllocation(alloc); } #endif