mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
Back out 9157b71a7df1 (bug 793491) for assertion failures
This commit is contained in:
parent
8329059ea7
commit
a82288204e
@ -2697,27 +2697,13 @@ ScriptAnalysis::addTypeBarrier(JSContext *cx, const jsbytecode *pc, TypeSet *tar
|
||||
}
|
||||
|
||||
/* Ignore duplicate barriers. */
|
||||
size_t barrierCount = 0;
|
||||
TypeBarrier *barrier = code.typeBarriers;
|
||||
while (barrier) {
|
||||
if (barrier->target == target && !barrier->singleton) {
|
||||
if (barrier->type == type)
|
||||
return;
|
||||
if (barrier->type.isAnyObject() && type.isObject())
|
||||
return;
|
||||
}
|
||||
if (barrier->target == target && barrier->type == type && !barrier->singleton)
|
||||
return;
|
||||
barrier = barrier->next;
|
||||
barrierCount++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use a generic object barrier if the number of barriers on an opcode gets
|
||||
* excessive: it is unlikely that we will be able to completely discharge
|
||||
* the barrier anyways without the target being marked as a generic object.
|
||||
*/
|
||||
if (barrierCount >= BARRIER_OBJECT_LIMIT && type.isObject())
|
||||
type = Type::AnyObjectType();
|
||||
|
||||
InferSpew(ISpewOps, "typeBarrier: #%u:%05u: %sT%p%s %s",
|
||||
script_->id(), pc - script_->code,
|
||||
InferSpewColor(target), target, InferSpewColorReset(),
|
||||
|
Loading…
Reference in New Issue
Block a user