Bug 964915 part 5 - Add some comments to BaselineIC.cpp to warn about outerization. r=bz

This commit is contained in:
Jan de Mooij 2014-05-08 16:52:41 +02:00
parent 1eaac875b7
commit 6f02ccddde

View File

@ -5688,6 +5688,9 @@ TryAttachGlobalNameStub(JSContext *cx, HandleScript script, jsbytecode *pc,
return true; return true;
} }
// Try to add a getter stub. We don't handle scripted getters yet; if this
// changes we need to make sure IonBuilder::getPropTryCommonGetter (which
// requires a Baseline stub) handles non-outerized this objects correctly.
bool isScripted; bool isScripted;
if (IsCacheableGetPropCall(cx, global, global, shape, &isScripted) && !isScripted) if (IsCacheableGetPropCall(cx, global, global, shape, &isScripted) && !isScripted)
{ {
@ -5741,6 +5744,10 @@ TryAttachScopeNameStub(JSContext *cx, HandleScript script, ICGetName_Fallback *s
scopeChain = scopeChain->enclosingScope(); scopeChain = scopeChain->enclosingScope();
} }
// We don't handle getters here. When this changes, we need to make sure
// IonBuilder::getPropTryCommonGetter (which requires a Baseline stub to
// work) handles non-outerized this objects correctly.
if (!IsCacheableGetPropReadSlot(scopeChain, scopeChain, shape)) if (!IsCacheableGetPropReadSlot(scopeChain, scopeChain, shape))
return true; return true;