Closed Bug 410400 Opened 17 years ago Closed 17 years ago

Avoid using JSFunction.object to store the block chain

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: igor, Assigned: igor)

References

Details

Currently the only use of JSFunction.object for scripted JSFunction created during the compilation is to store the block chain pointer for top-level block declarations. That is, to support in a function top-level function statements with forward references to top-level let declarations, the code use  JSFunction.object to store the block chain. 

The reason for this is that the JSOP_DEFLOCALFUN bytecode for function statements goes to the prologue while the JSOP_ENTERBLOCK for the let block goes to the main body of the script. As such the interpreter needs to know that JSOP_DEFLOCALFUN defines a function that can access the variables introduced by later JSOP_ENTERBLOCK and the using of the parent slot of JSFunction.object is one way to address this.

It would be nice to implement this in a different way as using JSFunction.object.__parent__ prevents addressing bug 406356 that targets skiping creating JSFunction.object during the compilation time.
Depends on: 410649
Fixed as a part of the fix for bug 410649.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.