Closed
Bug 620316
Opened 14 years ago
Closed 14 years ago
WrapEscapingClosure and js::GetCallVarChecked are dead code
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: Waldo, Assigned: jorendorff)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
30.09 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
It's unused right now, Brendan claims fallout from bug 558451. Should it be used, or can it be removed?
Comment 1•14 years ago
|
||
We should be able to write a testcase (or find one from the bug that introduced it: bug 496790) and make it bark on a build before the patch-stack for bug 558451 landed. Checking...
/be
Updated•14 years ago
|
Assignee: general → brendan
| Assignee | ||
Comment 2•14 years ago
|
||
I added JS_ASSERT(0) to the top of WrapEscapingClosure in jsfun.cpp and ran the test suite. No failures.
I think it has been dead since JSOP_UPVAR was removed (bug 592202). JSOP_UPVAR was used in closures on the assumption that they could not escape. Now we emit JSOP_GETFCSLOT or JSOP_NAME in such cases, and those are harmless (though JSOP_NAME gives the wrong answer).
If WrapEscapingClosure is dead, GetCallVarChecked is definitely dead, as are the _DBG opcodes. There may be more dead code here, but that's enough for one bug.
Taking.
Assignee: brendan → jorendorff
Summary: Use js::GetCallVarChecked or remove it → WrapEscapingClosure and js::GetCallVarChecked are dead code
| Assignee | ||
Comment 3•14 years ago
|
||
This passes tests just fine, but I can't think of any sane reason for keeping the needsWrapper assertions around, so I'm going to delete those too.
| Assignee | ||
Comment 4•14 years ago
|
||
Attachment #544069 -
Attachment is obsolete: true
Attachment #544077 -
Flags: review?(brendan)
Comment 5•14 years ago
|
||
Comment on attachment 544077 [details] [diff] [review]
v2
Whew, that lightened the load. Should have cleaned this up when UPVAR went, thanks for doing it now.
Rather than leave JSOP_UNUSED23[01234] around, I'd just slide down the ops above.
/be
Attachment #544077 -
Flags: review?(brendan) → review+
Comment 6•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in
before you can comment on or make changes to this bug.
Description
•