Closed Bug 458421 Opened 16 years ago Closed 15 years ago

dead stuff in spidermonkey

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: taras.mozilla, Assigned: luke)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

I manually inspected functions to check that they aren't JS_PUBLIC_API Here is a list of functions that from what I can see aren't called from anywhere. There is some code within #if 0 that calls js_ParseNodeToXMLObject js_IsInsideTryWithFinally JS_IsAssigning, JS_IsConstructing mentioned in the humorous jsOS240.def(please tell me we don't support OS/2) js_MapKeywords
Attached patch cleanupSplinter Review
I just noticed JS_IsAssigning (a bytecode-inspecting offender that must die anyhow). Might as well clean up all this junk. - js_IsInsideTryWithFinally has apparently already been nuked - JS_IsAssigning deleted - JS_IsConstructing is public API, but we have a lot of internal calls that should probably go through a non-exported function (I believe this is faster -- or is the compiler smart enough -- anyone know for sure?); moving impl to JSContext::isConstructing. Would have made inline, but there is a dependency on jstracer.h for VMSideExit and I don't want to spread jstracer.h into 5 new files. - js_MapKeywords made non-JS_FRIEND_API. Builds and make check's fine.
Assignee: general → lw
Status: NEW → ASSIGNED
Attachment #422783 - Flags: review?(jorendorff)
js_MapKeywords was some Netscape 4 era friend API for a now-defunct client. We can lose it. /be
Oh duh, I misread the MXR output and thought I saw a use, but you're right, its dead.
Taras, thanks for the analysis! /be
Comment on attachment 422783 [details] [diff] [review] cleanup Can't tell you how pleased I am to be rid of JS_IsAssigning. Sweet.
Attachment #422783 - Flags: review?(jorendorff) → review+
Pushed along with a tiny change: removing a now-unneeded #include "jsinterp.h" in embedding/components/windowatcher. http://hg.mozilla.org/tracemonkey/rev/e015dc555e9c
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: