Bug 1062869 part 4 - Add an invalidate function to IonScript. r=h4writer

This commit is contained in:
Nicolas B. Pierron 2014-09-18 18:28:55 +02:00
parent af0dca85b8
commit b671207b7c
2 changed files with 15 additions and 0 deletions

View File

@ -2900,6 +2900,17 @@ jit::Invalidate(JSContext *cx, const Vector<types::RecompileInfo> &invalid, bool
cancelOffThread);
}
bool
jit::IonScript::invalidate(JSContext *cx, bool resetUses, const char *reason)
{
JitSpew(JitSpew_IonInvalidate, " Invalidate IonScript %p: %s", this, reason);
Vector<types::RecompileInfo> list(cx);
if (!list.append(recompileInfo()))
return false;
Invalidate(cx, list, resetUses, true);
return true;
}
bool
jit::Invalidate(JSContext *cx, JSScript *script, ExecutionMode mode, bool resetUses,
bool cancelOffThread)

View File

@ -581,6 +581,10 @@ struct IonScript
bool invalidated() const {
return refcount_ != 0;
}
// Invalidate the current compilation.
bool invalidate(JSContext *cx, bool resetUses, const char *reason);
size_t refcount() const {
return refcount_;
}