Bug 1155474 - Consider the input to MThrowUninitializedLexical implicitly used. r=Waldo, a=sledru
This commit is contained in:
7
js/src/jit-test/tests/ion/lexical-check-5.js
Normal file
7
js/src/jit-test/tests/ion/lexical-check-5.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// |jit-test| error: ReferenceError
|
||||
|
||||
{
|
||||
for (var i = 0; i < 100; i++)
|
||||
a += i;
|
||||
let a = 1;
|
||||
}
|
||||
@@ -12473,8 +12473,12 @@ IonBuilder::addLexicalCheck(MDefinition* input)
|
||||
|
||||
// If we're guaranteed to not be JS_UNINITIALIZED_LEXICAL, no need to check.
|
||||
MInstruction* lexicalCheck;
|
||||
if (input->type() == MIRType_MagicUninitializedLexical)
|
||||
if (input->type() == MIRType_MagicUninitializedLexical) {
|
||||
// Mark the input as implicitly used so the JS_UNINITIALIZED_LEXICAL
|
||||
// magic value will be preserved on bailout.
|
||||
input->setImplicitlyUsedUnchecked();
|
||||
lexicalCheck = MThrowUninitializedLexical::New(alloc());
|
||||
}
|
||||
else if (input->type() == MIRType_Value)
|
||||
lexicalCheck = MLexicalCheck::New(alloc(), input);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user