Open Bug 1146080 Opened 9 years ago Updated 2 years ago

Sort out interaction of TryConvertFreeName, eval, and lazy functions

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

Details

See bug 1145491 comment 25.  Basically, the BytecodeEmitter has all sorts of eval-related fields and lazy function compilation passes complete garbage for pretty much all of them.  It happens to work (in the sense of not producing gname ops when it shouldn't) because there's a bunch of special-casing in TryConvertFreeName... but we also don't produce gname ops in various of case when we should, afaict.  Maybe we don't care about those cases, of course.
When this is fixed, we may be able to reenable the parts of js/src/jit-test/tests/basic/eval-scopes.js that I disabled for now.
So here's one possible thought.

Fundamentally, strict-mode eval in global scope has a polluted global scope.  If we want to think of it that way, it would be ideal if we just set the relevant boolean in the bce once we discover that the eval is strict-mode.  Then all the functions in the eval would pick up the boolean, etc.
Depends on: 1145491
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.