Remove some unused functions

RESOLVED FIXED in Firefox 57

Status

()

Core
JavaScript Engine
RESOLVED FIXED
a month ago
a month ago

People

(Reporter: anba, Assigned: anba)

Tracking

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a month ago
Remove a couple of unused or declared, but not defined functions.
(Assignee)

Comment 1

a month ago
Created attachment 8905953 [details] [diff] [review]
bug1398086.patch

jsarray.cpp
- Use existing HandleId to avoid additional rooting in DefineDataProperty

jsfun.h
- FunctionHasResolveHook is never defined

jsmath.h
- random_next is never defined

jsnum.h
- NumberToString(JSContext* cx, double d) is never called

jsobj.h
- CastAsObject and CastAsObjectJsval are never called
- GetPropertyNoGC and GetElementNoGC are never called with receiver = JSObject*
- SetClassAndProto is only called in jsobj.cpp, moved there as a static function
- The "extern const char js_xxx_str" declarations are unnecessary
- FindVariableScope is never defined
- GetOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id, MutableHandleValue vp) is never defined

jsstr.h
- StringHasPattern is never called

jsutil.h
- AlignedPtrAndFlag is never used
- InitConst and ImplicitCast are never called

vm/NativeObject.h
- NativeDefineProperty(JSContext* cx, HandleNativeObject obj, PropertyName* name, HandleValue value, GetterOp getter, SetterOp setter, unsigned attrs, ObjectOpResult& result) is never called
- NativeDefineElement(JSContext* cx, HandleNativeObject obj, uint32_t index, HandleValue value, JSGetterOp getter, JSSetterOp setter, unsigned attrs, ObjectOpResult& result) is never called

vm/PropDesc.h
- Delete empty file

frontend/BytecodeCompiler.h
- CompileAsyncFunctionBody is never defined
- BytecodeEmitter::reportStrictModeError(ParseNode* pn, unsigned errorNumber, ...) is never called
- BytecodeEmitter::emitToIteratorResult(bool) is never called

jspubtd.h:
- JSCrossCompartmentCall, JSObjectMap, and JSPropertyName are never defined
Attachment #8905953 - Flags: review?(till)
Comment on attachment 8905953 [details] [diff] [review]
bug1398086.patch

Review of attachment 8905953 [details] [diff] [review]:
-----------------------------------------------------------------

There is not a single thing not to like about this patch.
Attachment #8905953 - Flags: review?(till) → review+
(Assignee)

Comment 3

a month ago
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f757ace01ed8acdd25a22968507abe4c74c8525
Keywords: checkin-needed

Comment 4

a month ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/94b2ac8be5db
Remove unused functions and classes. r=till
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/94b2ac8be5db
Status: ASSIGNED → RESOLVED
Last Resolved: a month ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.