mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1216140 - Load the global lexical scope for the BINDGNAME Baseline IC when the script doesn't have a non-syntactic scope chain. (r=jandem)
This commit is contained in:
parent
51b1f5f510
commit
b5b1acc555
6
js/src/jit-test/tests/baseline/bug1216140.js
Normal file
6
js/src/jit-test/tests/baseline/bug1216140.js
Normal file
@ -0,0 +1,6 @@
|
||||
function newFunc(x) Function(x)()
|
||||
newFunc(`
|
||||
var BUGNUMBER = 8[ anonymous = true ]--;
|
||||
() => BUGNUMBER;
|
||||
`);
|
||||
|
@ -2436,7 +2436,10 @@ BaselineCompiler::emit_JSOP_BINDNAME()
|
||||
{
|
||||
frame.syncStack(0);
|
||||
|
||||
masm.loadPtr(frame.addressOfScopeChain(), R0.scratchReg());
|
||||
if (*pc == JSOP_BINDGNAME && !script->hasNonSyntacticScope())
|
||||
masm.movePtr(ImmGCPtr(&script->global().lexicalScope()), R0.scratchReg());
|
||||
else
|
||||
masm.loadPtr(frame.addressOfScopeChain(), R0.scratchReg());
|
||||
|
||||
// Call IC.
|
||||
ICBindName_Fallback::Compiler stubCompiler(cx);
|
||||
|
Loading…
Reference in New Issue
Block a user