Summary: | strict mode eval doesn't initialize functions with the proper scope | ||
---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | REOPENED --- | ||
Severity: | Normal | CC: | benjamin, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, manian, mark.lam, msaboff, oliver, ticaiolima, WebkitBugTracker, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Saam Barati
2017-01-23 15:10:12 PST
*** This bug has been marked as a duplicate of bug 163208 *** This isn't a duplicate. I think we should simplify how we do variables in strict mode eval. Currently, we rely on Interpreter::execute(Eval) to create a StrictEvalActivation that contains the "function" and "var" variables in it. However, I think this is probably unnecessary. I think we can do all of this in bytecode and just create a normal JSLexicalEnvironment for the "var" variables and "function" variables inside the bytecode generator (as long as we're in strict mode). If we're in sloppy mode, we should continue to do what we do now. Anybody have thoughts on this? Am I missing something that would make this not Just Work? |