Bug 831349 - Reset Ion cache flags when flushed. r=dvander

This commit is contained in:
Nicolas B. Pierron 2013-03-22 14:44:52 -07:00
parent 10fbe8611b
commit c7e069d8a8
2 changed files with 20 additions and 1 deletions

View File

@ -1017,6 +1017,14 @@ GetPropertyIC::update(JSContext *cx, size_t cacheIndex,
return true;
}
void
GetPropertyIC::reset()
{
IonCache::reset();
hasArrayLengthStub_ = false;
hasTypedArrayLengthStub_ = false;
}
void
IonCache::updateBaseAddress(IonCode *code, MacroAssembler &masm)
{
@ -1742,6 +1750,13 @@ GetElementIC::update(JSContext *cx, size_t cacheIndex, HandleObject obj,
return true;
}
void
GetElementIC::reset()
{
IonCache::reset();
hasDenseStub_ = false;
}
bool
BindNameIC::attachGlobal(JSContext *cx, IonScript *ion, JSObject *scopeChain)
{

View File

@ -221,7 +221,7 @@ class IonCache
void updateBaseAddress(IonCode *code, MacroAssembler &masm);
// Reset the cache around garbage collection.
void reset();
virtual void reset();
bool canAttachStub() const {
return stubCount_ < MAX_STUBS;
@ -322,6 +322,8 @@ class GetPropertyIC : public IonCache
CACHE_HEADER(GetProperty)
void reset();
Register object() const {
return object_;
}
@ -433,6 +435,8 @@ class GetElementIC : public IonCache
CACHE_HEADER(GetElement)
void reset();
Register object() const {
return object_;
}