Closed
Bug 475854
Opened 15 years ago
Closed 12 years ago
if(false)'d function unnecessarily makes parent HEAVYWEIGHT
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jruderman, Unassigned)
Details
(Keywords: testcase)
js> print(dis(function(x) { if (false) { function y () {} } })); flags: LAMBDA HEAVYWEIGHT INTERPRETED main: 00000: stop Doesn't need to be HEAVYWEIGHT, because function y is gone.
Reporter | ||
Comment 1•15 years ago
|
||
Here's a case that I don't understand at all: js> dis(function() { if (false) __proto__; }) flags: LAMBDA HEAVYWEIGHT INTERPRETED main: 00000: stop
__proto__ is an undeclared access, so heavyweight. Same bug, I suspect.
Reporter | ||
Comment 3•15 years ago
|
||
There's something weird going on in comment 1. It only happens for the names "__proto__" and "__parent__".
Comment 4•15 years ago
|
||
See bug 36625. We mark the function heavyweight when we see the unqualified __proto__ or __parent__ and can't re-optimize easily.
Comment 5•12 years ago
|
||
This is heavyweight because of the non-body-level function statement which dynamically adds 'y' to the scope.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•