Closed Bug 1398086 Opened 7 years ago Closed 7 years ago

Remove some unused functions

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

Remove a couple of unused or declared, but not defined functions.
Attached patch bug1398086.patchSplinter Review
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+
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.