зеркало из https://github.com/mozilla/gecko-dev.git
Bug 888276 - Use hasUses() instead of checking useCount() == 0. r=h4writer
This commit is contained in:
Родитель
0a90666fc8
Коммит
80a51789e0
|
@ -3722,7 +3722,7 @@ IonBuilder::getInlineableGetPropertyCache(CallInfo &callInfo)
|
|||
// MGetPropertyCache with no uses may be optimized away.
|
||||
if (funcDef->isGetPropertyCache()) {
|
||||
MGetPropertyCache *cache = funcDef->toGetPropertyCache();
|
||||
if (cache->useCount() > 0)
|
||||
if (cache->hasUses())
|
||||
return NULL;
|
||||
if (!CanInlineGetPropertyCache(cache, thisDef))
|
||||
return NULL;
|
||||
|
@ -3735,7 +3735,7 @@ IonBuilder::getInlineableGetPropertyCache(CallInfo &callInfo)
|
|||
MUnbox *unbox = funcDef->toUnbox();
|
||||
if (unbox->mode() != MUnbox::Infallible)
|
||||
return NULL;
|
||||
if (unbox->useCount() > 0)
|
||||
if (unbox->hasUses())
|
||||
return NULL;
|
||||
if (!unbox->input()->isTypeBarrier())
|
||||
return NULL;
|
||||
|
@ -3978,7 +3978,7 @@ IonBuilder::inlineTypeObjectFallback(CallInfo &callInfo, MBasicBlock *dispatchBl
|
|||
|
||||
// 3. The MGetPropertyCache (and, if applicable, MTypeBarrier and MUnbox) only
|
||||
// have at most a single use.
|
||||
JS_ASSERT_IF(callInfo.fun()->isGetPropertyCache(), cache->useCount() == 0);
|
||||
JS_ASSERT_IF(callInfo.fun()->isGetPropertyCache(), !cache->hasUses());
|
||||
JS_ASSERT_IF(callInfo.fun()->isUnbox(), cache->useCount() == 1);
|
||||
|
||||
// This means that no resume points yet capture the MGetPropertyCache,
|
||||
|
|
|
@ -599,7 +599,7 @@ AssertSafelyDiscardable(MDefinition *def)
|
|||
#ifdef DEBUG
|
||||
// Instructions captured by resume points cannot be safely discarded, since
|
||||
// they are necessary for interpreter frame reconstruction in case of bailout.
|
||||
JS_ASSERT(def->useCount() == 0);
|
||||
JS_ASSERT(!def->hasUses());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ ValueNumberer::simplifyControlInstruction(MControlInstruction *def)
|
|||
|
||||
// MControlInstructions should not have consumers.
|
||||
JS_ASSERT(repl->isControlInstruction());
|
||||
JS_ASSERT(def->useCount() == 0);
|
||||
JS_ASSERT(!def->hasUses());
|
||||
|
||||
if (def->isInWorklist())
|
||||
repl->setInWorklist();
|
||||
|
|
Загрузка…
Ссылка в новой задаче