mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
[INFER] Fix bug in previous fix for bug 673341. r=bhackett
This commit is contained in:
parent
23065ac07b
commit
081b156d2e
@ -864,26 +864,26 @@ ScriptAnalysis::analyzeLifetimes(JSContext *cx)
|
|||||||
loop->lastBlock = offset;
|
loop->lastBlock = offset;
|
||||||
|
|
||||||
if (code->exceptionEntry) {
|
if (code->exceptionEntry) {
|
||||||
unsigned tryOffset = 0;
|
bool found = false;
|
||||||
JSTryNote *tn = script->trynotes()->vector;
|
JSTryNote *tn = script->trynotes()->vector;
|
||||||
JSTryNote *tnlimit = tn + script->trynotes()->length;
|
JSTryNote *tnlimit = tn + script->trynotes()->length;
|
||||||
for (; tn < tnlimit; tn++) {
|
for (; tn < tnlimit; tn++) {
|
||||||
unsigned startOffset = script->main - script->code + tn->start;
|
unsigned startOffset = script->main - script->code + tn->start;
|
||||||
if (startOffset + tn->length == offset) {
|
if (startOffset + tn->length == offset) {
|
||||||
tryOffset = startOffset - 1;
|
/*
|
||||||
|
* Extend all live variables at exception entry to the start of
|
||||||
|
* the try block.
|
||||||
|
*/
|
||||||
|
for (unsigned i = 0; i < numSlots; i++) {
|
||||||
|
if (lifetimes[i].lifetime)
|
||||||
|
ensureVariable(lifetimes[i], startOffset - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
JS_NOT_REACHED("Start of try block not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Extend all live variables at exception entry to the start of
|
|
||||||
* the try block.
|
|
||||||
*/
|
|
||||||
for (unsigned i = 0; i < numSlots; i++) {
|
|
||||||
if (lifetimes[i].lifetime)
|
|
||||||
ensureVariable(lifetimes[i], tryOffset);
|
|
||||||
}
|
}
|
||||||
|
JS_ASSERT(found);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
|
Loading…
Reference in New Issue
Block a user