[INFER] Fix build breaks with --disable-methodjit.

This commit is contained in:
Brian Hackett 2011-07-05 16:52:39 -07:00
parent 341826d0b3
commit efdef8f584
8 changed files with 16 additions and 11 deletions

View File

@ -124,6 +124,7 @@
#include "jstracer.h"
#include "jsvector.h"
#include "jswrapper.h"
#include "methodjit/MethodJIT.h"
#include "methodjit/StubCalls.h"
#include "methodjit/StubCalls-inl.h"

View File

@ -532,7 +532,7 @@ JSCompartment::sweep(JSContext *cx, uint32 releaseInterval)
traceMonitor()->sweep(cx);
#endif
# if defined JS_POLYIC
# if defined JS_METHODJIT && defined JS_POLYIC
/*
* Purge all PICs in the compartment. These can reference type data and
* need to know which types are pending collection.

View File

@ -2158,6 +2158,7 @@ TypeCompartment::nukeTypes(JSContext *cx)
void
TypeCompartment::addPendingRecompile(JSContext *cx, JSScript *script)
{
#ifdef JS_METHODJIT
if (!script->jitNormal && !script->jitCtor) {
/* Scripts which haven't been compiled yet don't need to be recompiled. */
return;
@ -2180,6 +2181,7 @@ TypeCompartment::addPendingRecompile(JSContext *cx, JSScript *script)
cx->compartment->types.setPendingNukeTypes(cx);
return;
}
#endif
}
void
@ -2217,8 +2219,7 @@ TypeCompartment::monitorBytecode(JSContext *cx, JSScript *script, uint32 offset,
if (!returnOnly)
code.monitoredTypes = true;
if (script->hasJITCode())
cx->compartment->types.addPendingRecompile(cx, script);
cx->compartment->types.addPendingRecompile(cx, script);
/* Trigger recompilation of any inline callers. */
if (script->fun)
@ -5161,7 +5162,7 @@ TypeScript::checkBytecode(JSContext *cx, jsbytecode *pc, const js::Value *sp)
if (!TypeMatches(cx, types, type)) {
/* Display fine-grained debug information first */
fprintf(stderr, "Missing type at #%u:%05u pushed %u: %s\n",
script()->id(), pc - script()->code, i, TypeString(type));
script()->id(), unsigned(pc - script()->code), i, TypeString(type));
TypeFailure(cx, "Missing type pushed %u: %s", i, TypeString(type));
}
@ -5182,7 +5183,7 @@ TypeScript::checkBytecode(JSContext *cx, jsbytecode *pc, const js::Value *sp)
/* Display fine-grained debug information first */
fprintf(stderr, "Object not %s array at #%u:%05u popped %u: %s\n",
packed ? "packed" : "dense",
script()->id(), pc - script()->code, i, object->name());
script()->id(), unsigned(pc - script()->code), i, object->name());
TypeFailure(cx, "Object not %s array, popped %u: %s",
packed ? "packed" : "dense", i, object->name());
}

View File

@ -379,12 +379,11 @@ enum JITScriptStatus {
JITScript_Valid
};
namespace js {
namespace mjit { struct JITScript; }
namespace analyze { class ScriptAnalysis; }
}
namespace js { namespace mjit { struct JITScript; } }
#endif
namespace js { namespace analyze { class ScriptAnalysis; } }
class JSPCCounters {
size_t numBytecodes;
int *counts;

View File

@ -38,7 +38,7 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef jslogic_h_inl__
#if !defined jslogic_h_inl__ && defined JS_METHODJIT
#define jslogic_h_inl__
namespace js {

View File

@ -38,7 +38,7 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef jslogic_h__
#if !defined jslogic_h__ && defined JS_METHODJIT
#define jslogic_h__
#include "MethodJIT.h"

View File

@ -485,6 +485,7 @@ LimitCheck::operator()(JSContext *cx, StackSpace &space, Value *from, uintN nval
if (*limit - from >= ptrdiff_t(nvals))
return true;
#ifdef JS_METHODJIT
if (topncode) {
/*
* The current regs.pc may not be intact, set it in case bumping
@ -492,6 +493,7 @@ LimitCheck::operator()(JSContext *cx, StackSpace &space, Value *from, uintN nval
*/
cx->regs().updateForNcode(cx->fp()->jit(), topncode);
}
#endif
return space.tryBumpLimit(cx, from, nvals, limit);
}

View File

@ -960,11 +960,13 @@ StackIter::settleOnNewState()
if (op == JSOP_CALL || op == JSOP_FUNCALL) {
uintN argc = GET_ARGC(pc_);
DebugOnly<uintN> spoff = sp_ - fp_->base();
#if 0
#ifdef DEBUG
if (cx_->stackIterAssertionEnabled) {
JS_ASSERT_IF(!fp_->hasImacropc(),
spoff == js_ReconstructStackDepth(cx_, fp_->script(), pc_));
}
#endif
#endif
Value *vp = sp_ - (2 + argc);