Bug 1127121 - Remove property key type splitting in ObjectOps. r=bhackett.
authorJason Orendorff <jorendorff@mozilla.com>
Wed, 28 Jan 2015 17:12:44 -0600
changeset 254227 f1ac9100750e5669ae15208d939af3a9a794e748
parent 254226 0c9bf9805a5ecea95d55d92f57a01b3cd57c0780
child 254228 f3481df842964d88a6f67deffbaaa8a85813a811
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1127121
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1127121 - Remove property key type splitting in ObjectOps. r=bhackett.
dom/bindings/Codegen.py
dom/plugins/base/nsJSNPRuntime.cpp
js/public/Class.h
js/src/builtin/TypedObject.cpp
js/src/builtin/TypedObject.h
js/src/jit/IonBuilder.cpp
js/src/jsarray.cpp
js/src/jsfriendapi.h
js/src/jsinfer.cpp
js/src/jsobj.cpp
js/src/jsobjinlines.h
js/src/proxy/Proxy.cpp
js/src/vm/NativeObject.h
js/src/vm/ScopeObject.cpp
js/src/vm/UnboxedObject.cpp
js/src/vm/UnboxedObject.h
js/xpconnect/src/XPCWrappedNativeJSOps.cpp
js/xpconnect/src/xpcprivate.h
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -387,31 +387,23 @@ class CGDOMJSClass(CGThing):
                     {
                       nsGlobalWindow::OuterObject, /* outerObject */
                       nullptr, /* innerObject */
                       false,   /* isWrappedNative */
                       nullptr, /* weakmapKeyDelegateOp */
                       ${objectMoved} /* objectMovedOp */
                     },
                     {
-                      nullptr, /* lookupGeneric */
                       nullptr, /* lookupProperty */
-                      nullptr, /* lookupElement */
-                      nullptr, /* defineGeneric */
                       nullptr, /* defineProperty */
-                      nullptr, /* defineElement */
-                      nullptr, /* getGeneric  */
                       nullptr, /* getProperty */
-                      nullptr, /* getElement */
-                      nullptr, /* setGeneric */
                       nullptr, /* setProperty */
-                      nullptr, /* setElement */
                       nullptr, /* getOwnPropertyDescriptor */
-                      nullptr, /* setGenericAttributes */
-                      nullptr, /* deleteGeneric */
+                      nullptr, /* setPropertyAttributes */
+                      nullptr, /* deleteProperty */
                       nullptr, /* watch */
                       nullptr, /* unwatch */
                       nullptr, /* getElements */
                       nullptr, /* enumerate */
                       JS_ObjectToOuterObject /* thisObject */
                     }
                     """,
                     objectMoved=objectMovedHook)
--- a/dom/plugins/base/nsJSNPRuntime.cpp
+++ b/dom/plugins/base/nsJSNPRuntime.cpp
@@ -217,31 +217,23 @@ const static js::Class sNPObjectJSWrappe
     {
       nullptr,                                              /* outerObject */
       nullptr,                                              /* innerObject */
       false,                                                /* isWrappedNative */
       nullptr,                                              /* weakmapKeyDelegateOp */
       NPObjWrapper_ObjectMoved
     },
     {
-        nullptr, // lookupGeneric
         nullptr, // lookupProperty
-        nullptr, // lookupElement
-        nullptr, // defineGeneric
         nullptr, // defineProperty
-        nullptr, // defineElement
-        nullptr, // getGeneric
         nullptr, // getProperty
-        nullptr, // getElement
-        nullptr, // setGeneric
         nullptr, // setProperty
-        nullptr, // setElement
         nullptr, // getOwnPropertyDescriptor
-        nullptr, // setGenericAttributes
-        nullptr, // deleteGeneric
+        nullptr, // setPropertyAttributes
+        nullptr, // deleteProperty
         nullptr, nullptr, // watch/unwatch
         nullptr, // getElements
         NPObjWrapper_Enumerate,
         nullptr,
     }
   };
 
 typedef struct NPObjectMemberPrivate {
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -157,59 +157,34 @@ typedef JSObject *
 typedef void
 (* JSObjectMovedOp)(JSObject *obj, const JSObject *old);
 
 /* js::Class operation signatures. */
 
 namespace js {
 
 typedef bool
-(* LookupGenericOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
-                    JS::MutableHandleObject objp, JS::MutableHandle<Shape*> propp);
-typedef bool
-(* LookupPropOp)(JSContext *cx, JS::HandleObject obj, JS::Handle<PropertyName*> name,
-                 JS::MutableHandleObject objp, JS::MutableHandle<Shape*> propp);
+(* LookupPropertyOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
+                     JS::MutableHandleObject objp, JS::MutableHandle<Shape*> propp);
 typedef bool
-(* LookupElementOp)(JSContext *cx, JS::HandleObject obj, uint32_t index,
-                    JS::MutableHandleObject objp, JS::MutableHandle<Shape*> propp);
-typedef bool
-(* DefineGenericOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::HandleValue value,
-                    JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs);
-typedef bool
-(* DefinePropOp)(JSContext *cx, JS::HandleObject obj, JS::Handle<PropertyName*> name,
-                 JS::HandleValue value, JSPropertyOp getter, JSStrictPropertyOp setter,
-                 unsigned attrs);
+(* DefinePropertyOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::HandleValue value,
+                     JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs);
 typedef bool
-(* DefineElementOp)(JSContext *cx, JS::HandleObject obj, uint32_t index, JS::HandleValue value,
-                    JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs);
-typedef bool
-(* GenericIdOp)(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver, JS::HandleId id,
-                JS::MutableHandleValue vp);
-typedef bool
-(* PropertyIdOp)(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver,
-                 JS::Handle<PropertyName*> name, JS::MutableHandleValue vp);
+(* GetPropertyOp)(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver, JS::HandleId id,
+                  JS::MutableHandleValue vp);
 typedef bool
-(* ElementIdOp)(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver, uint32_t index,
-                JS::MutableHandleValue vp);
-typedef bool
-(* StrictGenericIdOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
-                      JS::MutableHandleValue vp, bool strict);
-typedef bool
-(* StrictPropertyIdOp)(JSContext *cx, JS::HandleObject obj, JS::Handle<PropertyName*> name,
-                       JS::MutableHandleValue vp, bool strict);
-typedef bool
-(* StrictElementIdOp)(JSContext *cx, JS::HandleObject obj, uint32_t index,
-                      JS::MutableHandleValue vp, bool strict);
+(* SetPropertyOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
+                  JS::MutableHandleValue vp, bool strict);
 typedef bool
 (* GetOwnPropertyOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
                      JS::MutableHandle<JSPropertyDescriptor> desc);
 typedef bool
-(* GenericAttributesOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, unsigned *attrsp);
+(* SetAttributesOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, unsigned *attrsp);
 typedef bool
-(* DeleteGenericOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, bool *succeeded);
+(* DeletePropertyOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, bool *succeeded);
 
 typedef bool
 (* WatchOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::HandleObject callable);
 
 typedef bool
 (* UnwatchOp)(JSContext *cx, JS::HandleObject obj, JS::HandleId id);
 
 class JS_FRIEND_API(ElementAdder)
@@ -361,53 +336,44 @@ struct ClassExtension
     JSObjectMovedOp objectMovedOp;
 };
 
 #define JS_NULL_CLASS_SPEC  {nullptr,nullptr,nullptr,nullptr,nullptr,nullptr}
 #define JS_NULL_CLASS_EXT   {nullptr,nullptr,false,nullptr,nullptr}
 
 struct ObjectOps
 {
-    LookupGenericOp     lookupGeneric;
-    LookupPropOp        lookupProperty;
-    LookupElementOp     lookupElement;
-    DefineGenericOp     defineGeneric;
-    DefinePropOp        defineProperty;
-    DefineElementOp     defineElement;
-    GenericIdOp         getGeneric;
-    PropertyIdOp        getProperty;
-    ElementIdOp         getElement;
-    StrictGenericIdOp   setGeneric;
-    StrictPropertyIdOp  setProperty;
-    StrictElementIdOp   setElement;
+    LookupPropertyOp    lookupProperty;
+    DefinePropertyOp    defineProperty;
+    GetPropertyOp       getProperty;
+    SetPropertyOp       setProperty;
     GetOwnPropertyOp    getOwnPropertyDescriptor;
-    GenericAttributesOp setGenericAttributes;
-    DeleteGenericOp     deleteGeneric;
+    SetAttributesOp     setAttributes;
+    DeletePropertyOp    deleteProperty;
     WatchOp             watch;
     UnwatchOp           unwatch;
     GetElementsOp       getElements;
     JSNewEnumerateOp    enumerate;
     ObjectOp            thisObject;
 };
 
 #define JS_NULL_OBJECT_OPS                                                    \
     {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,  \
-     nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,  \
      nullptr, nullptr, nullptr, nullptr}
 
 } // namespace js
 
 // Classes, objects, and properties.
 
 typedef void (*JSClassInternal)();
 
 struct JSClass {
     JS_CLASS_MEMBERS(JSFinalizeOp);
 
-    void                *reserved[32];
+    void                *reserved[24];
 };
 
 #define JSCLASS_HAS_PRIVATE             (1<<0)  // objects have private slot
 #define JSCLASS_PRIVATE_IS_NSISUPPORTS  (1<<3)  // private is (nsISupports *)
 #define JSCLASS_IS_DOMJSCLASS           (1<<4)  // objects are DOM
 #define JSCLASS_IMPLEMENTS_BARRIERS     (1<<5)  // Correctly implements GC read
                                                 // and write barriers
 #define JSCLASS_EMULATES_UNDEFINED      (1<<6)  // objects of this class act
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -1676,18 +1676,18 @@ OutlineTypedObject::obj_trace(JSTracer *
 
     if (!descr.opaque() || !typedObj.maybeForwardedIsAttached())
         return;
 
     descr.traceInstances(trc, newData, 1);
 }
 
 bool
-TypedObject::obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                              MutableHandleObject objp, MutableHandleShape propp)
+TypedObject::obj_lookupProperty(JSContext *cx, HandleObject obj, HandleId id,
+                                MutableHandleObject objp, MutableHandleShape propp)
 {
     MOZ_ASSERT(obj->is<TypedObject>());
 
     Rooted<TypeDescr*> descr(cx, &obj->as<TypedObject>().typeDescr());
     switch (descr->kind()) {
       case type::Scalar:
       case type::Reference:
       case type::Simd:
@@ -1726,29 +1726,18 @@ TypedObject::obj_lookupGeneric(JSContext
         propp.set(nullptr);
         return true;
     }
 
     return LookupProperty(cx, proto, id, objp, propp);
 }
 
 bool
-TypedObject::obj_lookupProperty(JSContext *cx,
-                                HandleObject obj,
-                                HandlePropertyName name,
-                                MutableHandleObject objp,
-                                MutableHandleShape propp)
-{
-    RootedId id(cx, NameToId(name));
-    return obj_lookupGeneric(cx, obj, id, objp, propp);
-}
-
-bool
 TypedObject::obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index,
-                                MutableHandleObject objp, MutableHandleShape propp)
+                               MutableHandleObject objp, MutableHandleShape propp)
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     MarkNonNativePropertyFound<CanGC>(propp);
     objp.set(obj);
     return true;
 }
 
 static bool
@@ -1767,45 +1756,25 @@ ReportPropertyError(JSContext *cx,
     JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
                          errorNumber, propName);
 
     JS_free(cx, propName);
     return false;
 }
 
 bool
-TypedObject::obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
-                              PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
+TypedObject::obj_defineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
+                                PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
 {
     return ReportPropertyError(cx, JSMSG_UNDEFINED_PROP, id);
 }
 
 bool
-TypedObject::obj_defineProperty(JSContext *cx, HandleObject obj,
-                               HandlePropertyName name, HandleValue v,
-                               PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return obj_defineGeneric(cx, obj, id, v, getter, setter, attrs);
-}
-
-bool
-TypedObject::obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue v,
-                               PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
-{
-    AutoRooterGetterSetter gsRoot(cx, attrs, &getter, &setter);
-    Rooted<jsid> id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return obj_defineGeneric(cx, obj, id, v, getter, setter, attrs);
-}
-
-bool
-TypedObject::obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver,
-                           HandleId id, MutableHandleValue vp)
+TypedObject::obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
+                             HandleId id, MutableHandleValue vp)
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     Rooted<TypedObject *> typedObj(cx, &obj->as<TypedObject>());
 
     // Dispatch elements to obj_getElement:
     uint32_t index;
     if (js_IdIsIndex(id, &index))
         return obj_getElement(cx, obj, receiver, index, vp);
@@ -1852,26 +1821,18 @@ TypedObject::obj_getGeneric(JSContext *c
         vp.setUndefined();
         return true;
     }
 
     return GetProperty(cx, proto, receiver, id, vp);
 }
 
 bool
-TypedObject::obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
-                              HandlePropertyName name, MutableHandleValue vp)
-{
-    RootedId id(cx, NameToId(name));
-    return obj_getGeneric(cx, obj, receiver, id, vp);
-}
-
-bool
 TypedObject::obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver,
-                             uint32_t index, MutableHandleValue vp)
+                            uint32_t index, MutableHandleValue vp)
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     Rooted<TypedObject *> typedObj(cx, &obj->as<TypedObject>());
     Rooted<TypeDescr *> descr(cx, &typedObj->typeDescr());
 
     switch (descr->kind()) {
       case type::Scalar:
       case type::Reference:
@@ -1889,34 +1850,34 @@ TypedObject::obj_getElement(JSContext *c
         return true;
     }
 
     return GetElement(cx, proto, receiver, index, vp);
 }
 
 /*static*/ bool
 TypedObject::obj_getArrayElement(JSContext *cx,
-                                Handle<TypedObject*> typedObj,
-                                Handle<TypeDescr*> typeDescr,
-                                uint32_t index,
-                                MutableHandleValue vp)
+                                 Handle<TypedObject*> typedObj,
+                                 Handle<TypeDescr*> typeDescr,
+                                 uint32_t index,
+                                 MutableHandleValue vp)
 {
     if (index >= (size_t) typedObj->length()) {
         vp.setUndefined();
         return true;
     }
 
     Rooted<TypeDescr*> elementType(cx, &typeDescr->as<ArrayTypeDescr>().elementType());
     size_t offset = elementType->size() * index;
     return Reify(cx, elementType, typedObj, offset, vp);
 }
 
 bool
-TypedObject::obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                           MutableHandleValue vp, bool strict)
+TypedObject::obj_setProperty(JSContext *cx, HandleObject obj, HandleId id,
+                             MutableHandleValue vp, bool strict)
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     Rooted<TypedObject *> typedObj(cx, &obj->as<TypedObject>());
 
     uint32_t index;
     if (js_IdIsIndex(id, &index))
         return obj_setElement(cx, obj, index, vp, strict);
 
@@ -1949,27 +1910,18 @@ TypedObject::obj_setGeneric(JSContext *c
         return ConvertAndCopyTo(cx, fieldType, typedObj, offset, fieldName, vp);
       }
     }
 
     return ReportTypedObjTypeError(cx, JSMSG_OBJECT_NOT_EXTENSIBLE, typedObj);
 }
 
 bool
-TypedObject::obj_setProperty(JSContext *cx, HandleObject obj,
-                             HandlePropertyName name, MutableHandleValue vp,
-                             bool strict)
-{
-    RootedId id(cx, NameToId(name));
-    return obj_setGeneric(cx, obj, id, vp, strict);
-}
-
-bool
 TypedObject::obj_setElement(JSContext *cx, HandleObject obj, uint32_t index,
-                           MutableHandleValue vp, bool strict)
+                            MutableHandleValue vp, bool strict)
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     Rooted<TypedObject *> typedObj(cx, &obj->as<TypedObject>());
     Rooted<TypeDescr *> descr(cx, &typedObj->typeDescr());
 
     switch (descr->kind()) {
       case type::Scalar:
       case type::Reference:
@@ -2082,33 +2034,33 @@ IsOwnId(JSContext *cx, HandleObject obj,
         if (typedObj->typeDescr().as<StructTypeDescr>().fieldIndex(id, &index))
             return true;
     }
 
     return false;
 }
 
 bool
-TypedObject::obj_setGenericAttributes(JSContext *cx, HandleObject obj,
-                                       HandleId id, unsigned *attrsp)
+TypedObject::obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandleId id,
+                                       unsigned *attrsp)
 {
     if (IsOwnId(cx, obj, id))
         return ReportPropertyError(cx, JSMSG_CANT_REDEFINE_PROP, id);
 
     RootedObject proto(cx, obj->getProto());
     if (!proto) {
         *attrsp = 0;
         return true;
     }
 
     return SetPropertyAttributes(cx, proto, id, attrsp);
 }
 
 bool
-TypedObject::obj_deleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
+TypedObject::obj_deleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
 {
     if (IsOwnId(cx, obj, id))
         return ReportPropertyError(cx, JSMSG_CANT_DELETE, id);
 
     RootedObject proto(cx, obj->getProto());
     if (!proto) {
         *succeeded = false;
         return true;
@@ -2365,31 +2317,23 @@ LazyArrayBufferTable::sizeOfIncludingThi
         nullptr,        /* finalize    */                \
         nullptr,        /* call        */                \
         nullptr,        /* hasInstance */                \
         nullptr,        /* construct   */                \
         Trace,                                           \
         JS_NULL_CLASS_SPEC,                              \
         JS_NULL_CLASS_EXT,                               \
         {                                                \
-            TypedObject::obj_lookupGeneric,              \
             TypedObject::obj_lookupProperty,             \
-            TypedObject::obj_lookupElement,              \
-            TypedObject::obj_defineGeneric,              \
             TypedObject::obj_defineProperty,             \
-            TypedObject::obj_defineElement,              \
-            TypedObject::obj_getGeneric,                 \
             TypedObject::obj_getProperty,                \
-            TypedObject::obj_getElement,                 \
-            TypedObject::obj_setGeneric,                 \
             TypedObject::obj_setProperty,                \
-            TypedObject::obj_setElement,                 \
             TypedObject::obj_getOwnPropertyDescriptor,   \
-            TypedObject::obj_setGenericAttributes,       \
-            TypedObject::obj_deleteGeneric,              \
+            TypedObject::obj_setPropertyAttributes,      \
+            TypedObject::obj_deleteProperty,             \
             nullptr, nullptr, /* watch/unwatch */        \
             nullptr,   /* getElements */                 \
             TypedObject::obj_enumerate,                  \
             nullptr, /* thisObject */                    \
         }                                                \
     }
 
 DEFINE_TYPEDOBJ_CLASS(OutlineTransparentTypedObject, OutlineTypedObject::obj_trace);
--- a/js/src/builtin/TypedObject.h
+++ b/js/src/builtin/TypedObject.h
@@ -520,62 +520,45 @@ class TypedObject : public JSObject
 
     static bool obj_setArrayElement(JSContext *cx,
                                     Handle<TypedObject*> typedObj,
                                     Handle<TypeDescr*> typeDescr,
                                     uint32_t index,
                                     MutableHandleValue vp);
 
   protected:
-    static bool obj_lookupGeneric(JSContext *cx, HandleObject obj,
-                                  HandleId id, MutableHandleObject objp,
-                                  MutableHandleShape propp);
-
     static bool obj_lookupProperty(JSContext *cx, HandleObject obj,
-                                   HandlePropertyName name,
-                                   MutableHandleObject objp,
+                                   HandleId id, MutableHandleObject objp,
                                    MutableHandleShape propp);
 
-    static bool obj_lookupElement(JSContext *cx, HandleObject obj,
-                                  uint32_t index, MutableHandleObject objp,
-                                  MutableHandleShape propp);
+    static bool obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index,
+                                  MutableHandleObject objp, MutableHandleShape propp);
 
-    static bool obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
-                                  PropertyOp getter, StrictPropertyOp setter, unsigned attrs);
-
-    static bool obj_defineProperty(JSContext *cx, HandleObject obj,
-                                   HandlePropertyName name, HandleValue v,
+    static bool obj_defineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
                                    PropertyOp getter, StrictPropertyOp setter, unsigned attrs);
 
-    static bool obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue v,
-                                  PropertyOp getter, StrictPropertyOp setter, unsigned attrs);
-
-    static bool obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver,
-                               HandleId id, MutableHandleValue vp);
-
     static bool obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
-                                HandlePropertyName name, MutableHandleValue vp);
+                                HandleId id, MutableHandleValue vp);
 
     static bool obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver,
                                uint32_t index, MutableHandleValue vp);
 
-    static bool obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                               MutableHandleValue vp, bool strict);
-    static bool obj_setProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
+    static bool obj_setProperty(JSContext *cx, HandleObject obj, HandleId id,
                                 MutableHandleValue vp, bool strict);
+
     static bool obj_setElement(JSContext *cx, HandleObject obj, uint32_t index,
                                MutableHandleValue vp, bool strict);
 
     static bool obj_getOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id,
                                              MutableHandle<JSPropertyDescriptor> desc);
 
-    static bool obj_setGenericAttributes(JSContext *cx, HandleObject obj,
-                                         HandleId id, unsigned *attrsp);
+    static bool obj_setPropertyAttributes(JSContext *cx, HandleObject obj,
+                                          HandleId id, unsigned *attrsp);
 
-    static bool obj_deleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded);
+    static bool obj_deleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded);
 
     static bool obj_enumerate(JSContext *cx, HandleObject obj, AutoIdVector &properties);
 
   public:
     TypedProto &typedProto() const {
         return getProto()->as<TypedProto>();
     }
 
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -6809,17 +6809,17 @@ IonBuilder::maybeInsertResume()
 
     return resumeAfter(ins);
 }
 
 static bool
 ClassHasEffectlessLookup(const Class *clasp, PropertyName *name)
 {
     return (clasp == &UnboxedPlainObject::class_) ||
-           (clasp->isNative() && !clasp->ops.lookupGeneric);
+           (clasp->isNative() && !clasp->ops.lookupProperty);
 }
 
 static bool
 ClassHasResolveHook(CompileCompartment *comp, const Class *clasp, PropertyName *name)
 {
     // While arrays do not have resolve hooks, the types of their |length|
     // properties are not reflected in type information, so pretend there is a
     // resolve hook for this property.
@@ -9362,21 +9362,21 @@ IonBuilder::objectsHaveCommonPrototype(t
             JSObject *singleton = key->isSingleton() ? key->singleton() : nullptr;
             if (ClassHasResolveHook(compartment, clasp, name)) {
                 if (!singleton || !singleton->is<GlobalObject>())
                     return false;
                 *guardGlobal = true;
             }
 
             // Look for a getter/setter on the class itself which may need
-            // to be called. Ignore the getGeneric hook for typed arrays, it
+            // to be called. Ignore the getProperty op for typed arrays, it
             // only handles integers and forwards names to the prototype.
-            if (isGetter && clasp->ops.getGeneric && !IsAnyTypedArrayClass(clasp))
+            if (isGetter && clasp->ops.getProperty && !IsAnyTypedArrayClass(clasp))
                 return false;
-            if (!isGetter && clasp->ops.setGeneric)
+            if (!isGetter && clasp->ops.setProperty)
                 return false;
 
             // Test for isOwnProperty() without freezing. If we end up
             // optimizing, freezePropertiesForCommonPropFunc will freeze the
             // property type sets later on.
             types::HeapTypeSetKey property = key->property(NameToId(name));
             if (types::TypeSet *types = property.maybeTypes()) {
                 if (!types->empty() || types->nonDataProperty())
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -2710,29 +2710,29 @@ struct SortComparatorIndexes
     bool operator()(uint32_t a, uint32_t b, bool *lessOrEqualp) {
         *lessOrEqualp = (a <= b);
         return true;
     }
 };
 
 // Returns all indexed properties in the range [begin, end) found on |obj| or
 // its proto chain. This function does not handle proxies, objects with
-// resolve/lookupGeneric hooks or indexed getters, as those can introduce
+// resolve/lookupProperty hooks or indexed getters, as those can introduce
 // new properties. In those cases, *success is set to |false|.
 static bool
 GetIndexedPropertiesInRange(JSContext *cx, HandleObject obj, uint32_t begin, uint32_t end,
                             Vector<uint32_t> &indexes, bool *success)
 {
     *success = false;
 
     // First, look for proxies or class hooks that can introduce extra
     // properties.
     JSObject *pobj = obj;
     do {
-        if (!pobj->isNative() || pobj->getClass()->resolve || pobj->getOps()->lookupGeneric)
+        if (!pobj->isNative() || pobj->getClass()->resolve || pobj->getOps()->lookupProperty)
             return true;
     } while ((pobj = pobj->getProto()));
 
     // Collect indexed property names.
     pobj = obj;
     do {
         // Append dense elements.
         NativeObject *nativeObj = &pobj->as<NativeObject>();
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -292,31 +292,23 @@ namespace js {
         js::proxy_Finalize,      /* finalize    */                                      \
         nullptr,                 /* call        */                                      \
         js::proxy_HasInstance,   /* hasInstance */                                      \
         nullptr,                 /* construct   */                                      \
         js::proxy_Trace,         /* trace       */                                      \
         JS_NULL_CLASS_SPEC,                                                             \
         ext,                                                                            \
         {                                                                               \
-            js::proxy_LookupGeneric,                                                    \
             js::proxy_LookupProperty,                                                   \
-            js::proxy_LookupElement,                                                    \
-            js::proxy_DefineGeneric,                                                    \
             js::proxy_DefineProperty,                                                   \
-            js::proxy_DefineElement,                                                    \
-            js::proxy_GetGeneric,                                                       \
             js::proxy_GetProperty,                                                      \
-            js::proxy_GetElement,                                                       \
-            js::proxy_SetGeneric,                                                       \
             js::proxy_SetProperty,                                                      \
-            js::proxy_SetElement,                                                       \
             js::proxy_GetOwnPropertyDescriptor,                                         \
-            js::proxy_SetGenericAttributes,                                             \
-            js::proxy_DeleteGeneric,                                                    \
+            js::proxy_SetPropertyAttributes,                                            \
+            js::proxy_DeleteProperty,                                                   \
             js::proxy_Watch, js::proxy_Unwatch,                                         \
             js::proxy_GetElements,                                                      \
             nullptr,             /* enumerate       */                                  \
             nullptr,             /* thisObject      */                                  \
         }                                                                               \
     }
 
 #define PROXY_CLASS_DEF(name, flags)                                    \
@@ -330,59 +322,35 @@ namespace js {
 
 /*
  * Proxy stubs, similar to JS_*Stub, for embedder proxy class definitions.
  *
  * NB: Should not be called directly.
  */
 
 extern JS_FRIEND_API(bool)
-proxy_LookupGeneric(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleObject objp,
-                    JS::MutableHandle<Shape*> propp);
-extern JS_FRIEND_API(bool)
-proxy_LookupProperty(JSContext *cx, JS::HandleObject obj, JS::Handle<PropertyName*> name,
-                     JS::MutableHandleObject objp, JS::MutableHandle<Shape*> propp);
-extern JS_FRIEND_API(bool)
-proxy_LookupElement(JSContext *cx, JS::HandleObject obj, uint32_t index, JS::MutableHandleObject objp,
+proxy_LookupProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleObject objp,
                     JS::MutableHandle<Shape*> propp);
 extern JS_FRIEND_API(bool)
-proxy_DefineGeneric(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::HandleValue value,
-                    JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs);
-extern JS_FRIEND_API(bool)
-proxy_DefineProperty(JSContext *cx, JS::HandleObject obj, JS::Handle<PropertyName*> name,
-                     JS::HandleValue value, JSPropertyOp getter, JSStrictPropertyOp setter,
-                     unsigned attrs);
-extern JS_FRIEND_API(bool)
-proxy_DefineElement(JSContext *cx, JS::HandleObject obj, uint32_t index, JS::HandleValue value,
-                    JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs);
-extern JS_FRIEND_API(bool)
-proxy_GetGeneric(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver, JS::HandleId id,
-                 JS::MutableHandleValue vp);
+proxy_DefineProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JS::HandleValue value,
+                     JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs);
 extern JS_FRIEND_API(bool)
-proxy_GetProperty(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver,
-                  JS::Handle<PropertyName*> name, JS::MutableHandleValue vp);
-extern JS_FRIEND_API(bool)
-proxy_GetElement(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver, uint32_t index,
-                 JS::MutableHandleValue vp);
+proxy_GetProperty(JSContext *cx, JS::HandleObject obj, JS::HandleObject receiver, JS::HandleId id,
+                  JS::MutableHandleValue vp);
 extern JS_FRIEND_API(bool)
-proxy_SetGeneric(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
-                 JS::MutableHandleValue bp, bool strict);
-extern JS_FRIEND_API(bool)
-proxy_SetProperty(JSContext *cx, JS::HandleObject obj, JS::Handle<PropertyName*> name,
+proxy_SetProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
                   JS::MutableHandleValue bp, bool strict);
 extern JS_FRIEND_API(bool)
-proxy_SetElement(JSContext *cx, JS::HandleObject obj, uint32_t index, JS::MutableHandleValue vp,
-                 bool strict);
-extern JS_FRIEND_API(bool)
 proxy_GetOwnPropertyDescriptor(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
                                JS::MutableHandle<JSPropertyDescriptor> desc);
 extern JS_FRIEND_API(bool)
-proxy_SetGenericAttributes(JSContext *cx, JS::HandleObject obj, JS::HandleId id, unsigned *attrsp);
+proxy_SetPropertyAttributes(JSContext *cx, JS::HandleObject obj, JS::HandleId id,
+                            unsigned *attrsp);
 extern JS_FRIEND_API(bool)
-proxy_DeleteGeneric(JSContext *cx, JS::HandleObject obj, JS::HandleId id, bool *succeeded);
+proxy_DeleteProperty(JSContext *cx, JS::HandleObject obj, JS::HandleId id, bool *succeeded);
 
 extern JS_FRIEND_API(void)
 proxy_Trace(JSTracer *trc, JSObject *obj);
 extern JS_FRIEND_API(JSObject *)
 proxy_WeakmapKeyDelegate(JSObject *obj);
 extern JS_FRIEND_API(bool)
 proxy_Convert(JSContext *cx, JS::HandleObject proxy, JSType hint, JS::MutableHandleValue vp);
 extern JS_FRIEND_API(void)
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -2427,18 +2427,18 @@ types::UseSingletonForInitializer(JSScri
 {
     return UseSingletonForInitializer(script, pc, JSCLASS_CACHED_PROTO_KEY(clasp));
 }
 
 static inline bool
 ClassCanHaveExtraProperties(const Class *clasp)
 {
     return clasp->resolve
-        || clasp->ops.lookupGeneric
-        || clasp->ops.getGeneric
+        || clasp->ops.lookupProperty
+        || clasp->ops.getProperty
         || IsAnyTypedArrayClass(clasp);
 }
 
 static inline bool
 PrototypeHasIndexedProperty(CompilerConstraintList *constraints, JSObject *obj)
 {
     do {
         ObjectGroupKey *key = ObjectGroupKey::get(obj);
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -533,17 +533,17 @@ js::CheckDefineProperty(JSContext *cx, H
 /*** Standard-compliant property definition (used by Object.defineProperty) **********************/
 
 static bool
 DefinePropertyOnObject(JSContext *cx, HandleNativeObject obj, HandleId id, const PropDesc &desc,
                        bool throwError, bool *rval)
 {
     /* 8.12.9 step 1. */
     RootedShape shape(cx);
-    MOZ_ASSERT(!obj->getOps()->lookupGeneric);
+    MOZ_ASSERT(!obj->getOps()->lookupProperty);
     if (!NativeLookupOwnProperty<CanGC>(cx, obj, id, &shape))
         return false;
 
     MOZ_ASSERT(!obj->getOps()->defineProperty);
 
     /* 8.12.9 steps 2-4. */
     if (!shape) {
         bool extensible;
@@ -957,17 +957,17 @@ js::StandardDefineProperty(JSContext *cx
     }
 
     if (IsAnyTypedArray(obj))
         return DefinePropertyOnTypedArray(cx, obj, id, desc, throwError, rval);
 
     if (obj->is<UnboxedPlainObject>() && !obj->as<UnboxedPlainObject>().convertToNative(cx))
         return false;
 
-    if (obj->getOps()->lookupGeneric) {
+    if (obj->getOps()->lookupProperty) {
         if (obj->is<ProxyObject>()) {
             Rooted<PropertyDescriptor> pd(cx);
             desc.populatePropertyDescriptor(obj, &pd);
             pd.object().set(obj);
             return Proxy::defineProperty(cx, obj, id, &pd);
         }
         return Reject(cx, obj, JSMSG_OBJECT_NOT_EXTENSIBLE, throwError, rval);
     }
@@ -1031,17 +1031,17 @@ js::DefineProperties(JSContext *cx, Hand
                 return false;
         }
         return true;
     }
 
     if (obj->is<UnboxedPlainObject>() && !obj->as<UnboxedPlainObject>().convertToNative(cx))
         return false;
 
-    if (obj->getOps()->lookupGeneric) {
+    if (obj->getOps()->lookupProperty) {
         if (obj->is<ProxyObject>()) {
             Rooted<PropertyDescriptor> pd(cx);
             for (size_t i = 0, len = ids.length(); i < len; i++) {
                 descs[i].populatePropertyDescriptor(obj, &pd);
                 if (!Proxy::defineProperty(cx, obj, ids[i], &pd))
                     return false;
             }
             return true;
@@ -1170,17 +1170,17 @@ js::SetIntegrityLevel(JSContext *cx, Han
             attrs |= new_attrs;
             if (!SetPropertyAttributes(cx, obj, id, &attrs))
                 return false;
         }
     }
 
     // Ordinarily ArraySetLength handles this, but we're going behind its back
     // right now, so we must do this manually.  Neither the custom property
-    // tree mutations nor the setGenericAttributes call in the above code will
+    // tree mutations nor the setPropertyAttributes call in the above code will
     // do this for us.
     //
     // ArraySetLength also implements the capacity <= length invariant for
     // arrays with non-writable length.  We don't need to do anything special
     // for that, because capacity was zeroed out by preventExtensions.  (See
     // the assertion before the if-else above.)
     if (level == IntegrityLevel::Frozen && obj->is<ArrayObject>()) {
         if (!obj->as<ArrayObject>().maybeCopyElementsForWrite(cx))
@@ -1775,44 +1775,32 @@ JSObject::nonNativeSetProperty(JSContext
 {
     if (MOZ_UNLIKELY(obj->watched())) {
         WatchpointMap *wpmap = cx->compartment()->watchpointMap;
         if (wpmap && !wpmap->triggerWatchpoint(cx, obj, id, vp))
             return false;
     }
     if (obj->is<ProxyObject>())
         return Proxy::set(cx, obj, receiver, id, strict, vp);
-    return obj->getOps()->setGeneric(cx, obj, id, vp, strict);
+    return obj->getOps()->setProperty(cx, obj, id, vp, strict);
 }
 
 /* static */ bool
 JSObject::nonNativeSetElement(JSContext *cx, HandleObject obj, HandleObject receiver,
                               uint32_t index, MutableHandleValue vp, bool strict)
 {
-    if (MOZ_UNLIKELY(obj->watched())) {
-        RootedId id(cx);
-        if (!IndexToId(cx, index, &id))
-            return false;
-
-        WatchpointMap *wpmap = cx->compartment()->watchpointMap;
-        if (wpmap && !wpmap->triggerWatchpoint(cx, obj, id, vp))
-            return false;
-    }
-    if (obj->is<ProxyObject>()) {
-        RootedId id(cx);
-        return IndexToId(cx, index, &id) &&
-               Proxy::set(cx, obj, receiver, id, strict, vp);
-    }
-    return obj->getOps()->setElement(cx, obj, index, vp, strict);
+    RootedId id(cx);
+    if (!IndexToId(cx, index, &id))
+        return false;
+    return nonNativeSetProperty(cx, obj, receiver, id, vp, strict);
 }
 
 JS_FRIEND_API(bool)
 JS_CopyPropertyFrom(JSContext *cx, HandleId id, HandleObject target,
-                    HandleObject obj,
-                    PropertyCopyBehavior copyBehavior)
+                    HandleObject obj, PropertyCopyBehavior copyBehavior)
 {
     // |obj| and |cx| are generally not same-compartment with |target| here.
     assertSameCompartment(cx, obj, id);
     Rooted<JSPropertyDescriptor> desc(cx);
 
     if (!GetOwnPropertyDescriptor(cx, obj, id, &desc))
         return false;
     MOZ_ASSERT(desc.object());
@@ -2920,21 +2908,21 @@ JSObject::constructHook() const
     }
     return nullptr;
 }
 
 bool
 js::LookupProperty(JSContext *cx, HandleObject obj, js::HandleId id,
                    MutableHandleObject objp, MutableHandleShape propp)
 {
-    /* NB: The logic of lookupGeneric is implicitly reflected in
+    /* NB: The logic of lookupProperty is implicitly reflected in
      *     BaselineIC.cpp's |EffectlesslyLookupProperty| logic.
      *     If this changes, please remember to update the logic there as well.
      */
-    if (LookupGenericOp op = obj->getOps()->lookupGeneric)
+    if (LookupPropertyOp op = obj->getOps()->lookupProperty)
         return op(cx, obj, id, objp, propp);
     return NativeLookupProperty<CanGC>(cx, obj.as<NativeObject>(), id, objp, propp);
 }
 
 bool
 js::LookupName(JSContext *cx, HandlePropertyName name, HandleObject scopeChain,
                MutableHandleObject objp, MutableHandleObject pobjp, MutableHandleShape propp)
 {
@@ -2959,17 +2947,17 @@ bool
 js::LookupNameNoGC(JSContext *cx, PropertyName *name, JSObject *scopeChain,
                    JSObject **objp, JSObject **pobjp, Shape **propp)
 {
     AutoAssertNoException nogc(cx);
 
     MOZ_ASSERT(!*objp && !*pobjp && !*propp);
 
     for (JSObject *scope = scopeChain; scope; scope = scope->enclosingScope()) {
-        if (scope->getOps()->lookupGeneric)
+        if (scope->getOps()->lookupProperty)
             return false;
         if (!LookupPropertyInline<NoGC>(cx, &scope->as<NativeObject>(), NameToId(name), pobjp, propp))
             return false;
         if (*propp) {
             *objp = scope;
             return true;
         }
     }
@@ -3296,17 +3284,17 @@ js::GetOwnPropertyDescriptor(JSContext *
 bool
 js::DefineProperty(ExclusiveContext *cx, HandleObject obj, HandleId id, HandleValue value,
                    JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs)
 {
     MOZ_ASSERT(getter != JS_PropertyStub);
     MOZ_ASSERT(setter != JS_StrictPropertyStub);
     MOZ_ASSERT(!(attrs & JSPROP_PROPOP_ACCESSORS));
 
-    DefineGenericOp op = obj->getOps()->defineGeneric;
+    DefinePropertyOp op = obj->getOps()->defineProperty;
     if (op) {
         if (!cx->shouldBeJSContext())
             return false;
         return op(cx->asJSContext(), obj, id, value, getter, setter, attrs);
     }
     return NativeDefineProperty(cx, obj.as<NativeObject>(), id, value, getter, setter, attrs);
 }
 
@@ -3321,23 +3309,20 @@ js::DefineProperty(ExclusiveContext *cx,
 
 bool
 js::DefineElement(ExclusiveContext *cx, HandleObject obj, uint32_t index, HandleValue value,
                   JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs)
 {
     MOZ_ASSERT(getter != JS_PropertyStub);
     MOZ_ASSERT(setter != JS_StrictPropertyStub);
 
-    DefineElementOp op = obj->getOps()->defineElement;
-    if (op) {
-        if (!cx->shouldBeJSContext())
-            return false;
-        return op(cx->asJSContext(), obj, index, value, getter, setter, attrs);
-    }
-    return NativeDefineElement(cx, obj.as<NativeObject>(), index, value, getter, setter, attrs);
+    RootedId id(cx);
+    if (!IndexToId(cx, index, &id))
+        return false;
+    return DefineProperty(cx, obj, id, value, getter, setter, attrs);
 }
 
 
 /*** SpiderMonkey nonstandard internal methods ***************************************************/
 
 bool
 js::SetImmutablePrototype(ExclusiveContext *cx, HandleObject obj, bool *succeeded)
 {
@@ -4126,17 +4111,17 @@ JSObject::hasIdempotentProtoChain() cons
     while (true) {
         if (!obj->isNative())
             return false;
 
         JSResolveOp resolve = obj->getClass()->resolve;
         if (resolve && resolve != js::fun_resolve && resolve != js::str_resolve)
             return false;
 
-        if (obj->getOps()->lookupProperty || obj->getOps()->lookupGeneric || obj->getOps()->lookupElement)
+        if (obj->getOps()->lookupProperty)
             return false;
 
         obj = obj->getProto();
         if (!obj)
             return true;
     }
 }
 
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -152,41 +152,38 @@ js::HasProperty(JSContext *cx, HandleObj
     RootedId id(cx, NameToId(name));
     return HasProperty(cx, obj, id, found);
 }
 
 inline bool
 js::GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
                MutableHandleValue vp)
 {
-    if (ElementIdOp op = obj->getOps()->getElement)
-        return op(cx, obj, receiver, index, vp);
-
     RootedId id(cx);
     if (!IndexToId(cx, index, &id))
         return false;
     return GetProperty(cx, obj, receiver, id, vp);
 }
 
 inline bool
 js::GetElementNoGC(JSContext *cx, JSObject *obj, JSObject *receiver, uint32_t index, Value *vp)
 {
-    if (obj->getOps()->getElement)
+    if (obj->getOps()->getProperty)
         return false;
 
     if (index > JSID_INT_MAX)
         return false;
     return GetPropertyNoGC(cx, obj, receiver, INT_TO_JSID(index), vp);
 }
 
 inline bool
 js::DeleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
 {
     types::MarkTypePropertyNonData(cx, obj, id);
-    if (DeleteGenericOp op = obj->getOps()->deleteGeneric)
+    if (DeletePropertyOp op = obj->getOps()->deleteProperty)
         return op(cx, obj, id, succeeded);
     return NativeDeleteProperty(cx, obj.as<NativeObject>(), id, succeeded);
 }
 
 inline bool
 js::DeleteElement(JSContext *cx, HandleObject obj, uint32_t index, bool *succeeded)
 {
     RootedId id(cx);
@@ -197,17 +194,17 @@ js::DeleteElement(JSContext *cx, HandleO
 
 
 /* * */
 
 inline bool
 js::SetPropertyAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
 {
     types::MarkTypePropertyNonData(cx, obj, id);
-    GenericAttributesOp op = obj->getOps()->setGenericAttributes;
+    SetAttributesOp op = obj->getOps()->setAttributes;
     if (op)
         return op(cx, obj, id, attrsp);
     return NativeSetPropertyAttributes(cx, obj.as<NativeObject>(), id, attrsp);
 }
 
 inline bool
 JSObject::isQualifiedVarObj()
 {
--- a/js/src/proxy/Proxy.cpp
+++ b/js/src/proxy/Proxy.cpp
@@ -546,152 +546,80 @@ Proxy::trace(JSTracer *trc, JSObject *pr
 
 JSObject *
 js::proxy_innerObject(JSObject *obj)
 {
     return obj->as<ProxyObject>().private_().toObjectOrNull();
 }
 
 bool
-js::proxy_LookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                        MutableHandleObject objp, MutableHandleShape propp)
+js::proxy_LookupProperty(JSContext *cx, HandleObject obj, HandleId id,
+                         MutableHandleObject objp, MutableHandleShape propp)
 {
     bool found;
     if (!Proxy::has(cx, obj, id, &found))
         return false;
 
     if (found) {
         MarkNonNativePropertyFound<CanGC>(propp);
         objp.set(obj);
     } else {
         objp.set(nullptr);
         propp.set(nullptr);
     }
     return true;
 }
 
 bool
-js::proxy_LookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
-                         MutableHandleObject objp, MutableHandleShape propp)
-{
-    RootedId id(cx, NameToId(name));
-    return proxy_LookupGeneric(cx, obj, id, objp, propp);
-}
-
-bool
-js::proxy_LookupElement(JSContext *cx, HandleObject obj, uint32_t index,
-                        MutableHandleObject objp, MutableHandleShape propp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return proxy_LookupGeneric(cx, obj, id, objp, propp);
-}
-
-bool
-js::proxy_DefineGeneric(JSContext *cx, HandleObject obj, HandleId id, HandleValue value,
-                        PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
+js::proxy_DefineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue value,
+                         PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
 {
     Rooted<PropertyDescriptor> desc(cx);
     desc.object().set(obj);
     desc.value().set(value);
     desc.setAttributes(attrs);
     desc.setGetter(getter);
     desc.setSetter(setter);
     return Proxy::defineProperty(cx, obj, id, &desc);
 }
 
 bool
-js::proxy_DefineProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, HandleValue value,
-                         PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return proxy_DefineGeneric(cx, obj, id, value, getter, setter, attrs);
-}
-
-bool
-js::proxy_DefineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue value,
-                        PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return proxy_DefineGeneric(cx, obj, id, value, getter, setter, attrs);
-}
-
-bool
-js::proxy_GetGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
-                     MutableHandleValue vp)
+js::proxy_GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
+                      MutableHandleValue vp)
 {
     return Proxy::get(cx, obj, receiver, id, vp);
 }
 
 bool
-js::proxy_GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name,
-                      MutableHandleValue vp)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return proxy_GetGeneric(cx, obj, receiver, id, vp);
-}
-
-bool
-js::proxy_GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
-                     MutableHandleValue vp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return proxy_GetGeneric(cx, obj, receiver, id, vp);
-}
-
-bool
-js::proxy_SetGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                     MutableHandleValue vp, bool strict)
+js::proxy_SetProperty(JSContext *cx, HandleObject obj, HandleId id,
+                      MutableHandleValue vp, bool strict)
 {
     return Proxy::set(cx, obj, obj, id, strict, vp);
 }
 
 bool
-js::proxy_SetProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
-                      MutableHandleValue vp, bool strict)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return proxy_SetGeneric(cx, obj, id, vp, strict);
-}
-
-bool
-js::proxy_SetElement(JSContext *cx, HandleObject obj, uint32_t index,
-                     MutableHandleValue vp, bool strict)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return proxy_SetGeneric(cx, obj, id, vp, strict);
-}
-
-bool
 js::proxy_GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id,
                                    MutableHandle<JSPropertyDescriptor> desc)
 {
     return Proxy::getOwnPropertyDescriptor(cx, obj, id, desc);
 }
 
 bool
-js::proxy_SetGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
+js::proxy_SetPropertyAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
 {
     /* Lookup the current property descriptor so we have setter/getter/value. */
     Rooted<PropertyDescriptor> desc(cx);
     if (!Proxy::getOwnPropertyDescriptor(cx, obj, id, &desc))
         return false;
     desc.setAttributes(*attrsp);
     return Proxy::defineProperty(cx, obj, id, &desc);
 }
 
 bool
-js::proxy_DeleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
+js::proxy_DeleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
 {
     bool deleted;
     if (!Proxy::delete_(cx, obj, id, &deleted))
         return false;
     *succeeded = deleted;
     return SuppressDeletedProperty(cx, obj, id);
 }
 
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -1382,41 +1382,40 @@ MaybeNativeObject(JSObject *obj)
 
 
 /*** Inline functions declared in jsobj.h that use the native declarations above *****************/
 
 inline bool
 js::GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
                 MutableHandleValue vp)
 {
-    MOZ_ASSERT(!!obj->getOps()->getGeneric == !!obj->getOps()->getProperty);
-    if (GenericIdOp op = obj->getOps()->getGeneric)
+    if (GetPropertyOp op = obj->getOps()->getProperty)
         return op(cx, obj, receiver, id, vp);
     return NativeGetProperty(cx, obj.as<NativeObject>(), receiver, id, vp);
 }
 
 inline bool
 js::GetPropertyNoGC(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp)
 {
-    if (obj->getOps()->getGeneric)
+    if (obj->getOps()->getProperty)
         return false;
     return NativeGetPropertyNoGC(cx, &obj->as<NativeObject>(), receiver, id, vp);
 }
 
 inline bool
 js::SetProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
                 HandleId id, MutableHandleValue vp, bool strict)
 {
-    if (obj->getOps()->setGeneric)
+    if (obj->getOps()->setProperty)
         return JSObject::nonNativeSetProperty(cx, obj, receiver, id, vp, strict);
     return NativeSetProperty(cx, obj.as<NativeObject>(), receiver, id, Qualified, vp, strict);
 }
 
 inline bool
 js::SetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
                MutableHandleValue vp, bool strict)
 {
-    if (obj->getOps()->setElement)
+    if (obj->getOps()->setProperty)
         return JSObject::nonNativeSetElement(cx, obj, receiver, index, vp, strict);
     return NativeSetElement(cx, obj.as<NativeObject>(), receiver, index, vp, strict);
 }
 
 #endif /* vm_NativeObject_h */
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -456,134 +456,64 @@ DynamicWithObject::create(JSContext *cx,
     obj->setFixedSlot(OBJECT_SLOT, ObjectValue(*object));
     obj->setFixedSlot(THIS_SLOT, ObjectValue(*thisp));
     obj->setFixedSlot(KIND_SLOT, Int32Value(kind));
 
     return &obj->as<DynamicWithObject>();
 }
 
 static bool
-with_LookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                   MutableHandleObject objp, MutableHandleShape propp)
+with_LookupProperty(JSContext *cx, HandleObject obj, HandleId id,
+                    MutableHandleObject objp, MutableHandleShape propp)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return LookupProperty(cx, actual, id, objp, propp);
 }
 
 static bool
-with_LookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
-                    MutableHandleObject objp, MutableHandleShape propp)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return with_LookupGeneric(cx, obj, id, objp, propp);
-}
-
-static bool
-with_LookupElement(JSContext *cx, HandleObject obj, uint32_t index,
-                   MutableHandleObject objp, MutableHandleShape propp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return with_LookupGeneric(cx, obj, id, objp, propp);
-}
-
-static bool
-with_DefineGeneric(JSContext *cx, HandleObject obj, HandleId id, HandleValue value,
-                   JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs)
+with_DefineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue value,
+                    JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return DefineProperty(cx, actual, id, value, getter, setter, attrs);
 }
 
 static bool
-with_DefineProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, HandleValue value,
-                   JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return with_DefineGeneric(cx, obj, id, value, getter, setter, attrs);
-}
-
-static bool
-with_DefineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue value,
-                   JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return with_DefineGeneric(cx, obj, id, value, getter, setter, attrs);
-}
-
-static bool
-with_GetGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
-                MutableHandleValue vp)
+with_GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
+                 MutableHandleValue vp)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return GetProperty(cx, actual, actual, id, vp);
 }
 
 static bool
-with_GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name,
-                 MutableHandleValue vp)
-{
-    RootedId id(cx, NameToId(name));
-    return with_GetGeneric(cx, obj, receiver, id, vp);
-}
-
-static bool
-with_GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
-                MutableHandleValue vp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return with_GetGeneric(cx, obj, receiver, id, vp);
-}
-
-static bool
-with_SetGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                MutableHandleValue vp, bool strict)
+with_SetProperty(JSContext *cx, HandleObject obj, HandleId id,
+                 MutableHandleValue vp, bool strict)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return SetProperty(cx, actual, actual, id, vp, strict);
 }
 
 static bool
-with_SetProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
-                 MutableHandleValue vp, bool strict)
-{
-    RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
-    return SetProperty(cx, actual, actual, name, vp, strict);
-}
-
-static bool
-with_SetElement(JSContext *cx, HandleObject obj, uint32_t index,
-                MutableHandleValue vp, bool strict)
-{
-    RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
-    return SetElement(cx, actual, actual, index, vp, strict);
-}
-
-static bool
 with_GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id,
                               MutableHandle<JSPropertyDescriptor> desc)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return GetOwnPropertyDescriptor(cx, actual, id, desc);
 }
 
 static bool
-with_SetGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
+with_SetPropertyAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return SetPropertyAttributes(cx, actual, id, attrsp);
 }
 
 static bool
-with_DeleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
+with_DeleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
 {
     RootedObject actual(cx, &obj->as<DynamicWithObject>().object());
     return DeleteProperty(cx, actual, id, succeeded);
 }
 
 static JSObject *
 with_ThisObject(JSContext *cx, HandleObject obj)
 {
@@ -611,31 +541,23 @@ const Class DynamicWithObject::class_ = 
     nullptr, /* finalize */
     nullptr, /* call */
     nullptr, /* hasInstance */
     nullptr, /* construct */
     nullptr, /* trace */
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     {
-        with_LookupGeneric,
         with_LookupProperty,
-        with_LookupElement,
-        with_DefineGeneric,
         with_DefineProperty,
-        with_DefineElement,
-        with_GetGeneric,
         with_GetProperty,
-        with_GetElement,
-        with_SetGeneric,
         with_SetProperty,
-        with_SetElement,
         with_GetOwnPropertyDescriptor,
-        with_SetGenericAttributes,
-        with_DeleteGeneric,
+        with_SetPropertyAttributes,
+        with_DeleteProperty,
         nullptr, nullptr,    /* watch/unwatch */
         nullptr,             /* getElements */
         nullptr,             /* enumerate (native enumeration of target doesn't work) */
         with_ThisObject,
     }
 };
 
 /* static */ StaticEvalObject *
@@ -983,110 +905,56 @@ ReportUninitializedLexicalId(JSContext *
         RootedPropertyName name(cx, JSID_TO_ATOM(id)->asPropertyName());
         ReportUninitializedLexical(cx, name);
         return;
     }
     MOZ_CRASH("UninitializedLexicalObject should only be used with property names");
 }
 
 static bool
-uninitialized_LookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                            MutableHandleObject objp, MutableHandleShape propp)
-{
-    ReportUninitializedLexicalId(cx, id);
-    return false;
-}
-
-static bool
-uninitialized_LookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
-                    MutableHandleObject objp, MutableHandleShape propp)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return uninitialized_LookupGeneric(cx, obj, id, objp, propp);
-}
-
-static bool
-uninitialized_LookupElement(JSContext *cx, HandleObject obj, uint32_t index,
-                            MutableHandleObject objp, MutableHandleShape propp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return uninitialized_LookupGeneric(cx, obj, id, objp, propp);
-}
-
-static bool
-uninitialized_GetGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
-                         MutableHandleValue vp)
+uninitialized_LookupProperty(JSContext *cx, HandleObject obj, HandleId id,
+                             MutableHandleObject objp, MutableHandleShape propp)
 {
     ReportUninitializedLexicalId(cx, id);
     return false;
 }
 
 static bool
-uninitialized_GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
-                          HandlePropertyName name, MutableHandleValue vp)
-{
-    RootedId id(cx, NameToId(name));
-    return uninitialized_GetGeneric(cx, obj, receiver, id, vp);
-}
-
-static bool
-uninitialized_GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
-                         MutableHandleValue vp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return uninitialized_GetGeneric(cx, obj, receiver, id, vp);
-}
-
-static bool
-uninitialized_SetGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                         MutableHandleValue vp, bool strict)
+uninitialized_GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id,
+                          MutableHandleValue vp)
 {
     ReportUninitializedLexicalId(cx, id);
     return false;
 }
 
 static bool
-uninitialized_SetProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
+uninitialized_SetProperty(JSContext *cx, HandleObject obj, HandleId id,
                           MutableHandleValue vp, bool strict)
 {
-    RootedId id(cx, NameToId(name));
-    return uninitialized_SetGeneric(cx, obj, id, vp, strict);
-}
-
-static bool
-uninitialized_SetElement(JSContext *cx, HandleObject obj, uint32_t index,
-                         MutableHandleValue vp, bool strict)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return uninitialized_SetGeneric(cx, obj, id, vp, strict);
+    ReportUninitializedLexicalId(cx, id);
+    return false;
 }
 
 static bool
 uninitialized_GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id,
                                        MutableHandle<JSPropertyDescriptor> desc)
 {
     ReportUninitializedLexicalId(cx, id);
     return false;
 }
 
 static bool
-uninitialized_SetGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
+uninitialized_SetPropertyAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp)
 {
     ReportUninitializedLexicalId(cx, id);
     return false;
 }
 
 static bool
-uninitialized_DeleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
+uninitialized_DeleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
 {
     ReportUninitializedLexicalId(cx, id);
     return false;
 }
 
 const Class UninitializedLexicalObject::class_ = {
     "UninitializedLexical",
     JSCLASS_HAS_RESERVED_SLOTS(UninitializedLexicalObject::RESERVED_SLOTS) |
@@ -1101,31 +969,23 @@ const Class UninitializedLexicalObject::
     nullptr, /* finalize */
     nullptr, /* call */
     nullptr, /* hasInstance */
     nullptr, /* construct */
     nullptr, /* trace */
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     {
-        uninitialized_LookupGeneric,
         uninitialized_LookupProperty,
-        uninitialized_LookupElement,
-        nullptr,             /* defineGeneric */
         nullptr,             /* defineProperty */
-        nullptr,             /* defineElement */
-        uninitialized_GetGeneric,
         uninitialized_GetProperty,
-        uninitialized_GetElement,
-        uninitialized_SetGeneric,
         uninitialized_SetProperty,
-        uninitialized_SetElement,
         uninitialized_GetOwnPropertyDescriptor,
-        uninitialized_SetGenericAttributes,
-        uninitialized_DeleteGeneric,
+        uninitialized_SetPropertyAttributes,
+        uninitialized_DeleteProperty,
         nullptr, nullptr,    /* watch/unwatch */
         nullptr,             /* getElements */
         nullptr,             /* enumerate (native enumeration of target doesn't work) */
         nullptr,             /* this */
     }
 };
 
 /*****************************************************************************/
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -236,19 +236,19 @@ UnboxedPlainObject::create(JSContext *cx
         // Unboxed objects don't have Values to initialize.
         MOZ_ASSERT(*(list + 1) == -1);
     }
 
     return res;
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_lookupGeneric(JSContext *cx, HandleObject obj,
-                                      HandleId id, MutableHandleObject objp,
-                                      MutableHandleShape propp)
+UnboxedPlainObject::obj_lookupProperty(JSContext *cx, HandleObject obj,
+                                       HandleId id, MutableHandleObject objp,
+                                       MutableHandleShape propp)
 {
     if (obj->as<UnboxedPlainObject>().layout().lookup(id)) {
         MarkNonNativePropertyFound<CanGC>(propp);
         objp.set(obj);
         return true;
     }
 
     RootedObject proto(cx, obj->getProto());
@@ -257,69 +257,28 @@ UnboxedPlainObject::obj_lookupGeneric(JS
         propp.set(nullptr);
         return true;
     }
 
     return LookupProperty(cx, proto, id, objp, propp);
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_lookupProperty(JSContext *cx, HandleObject obj,
-                                       HandlePropertyName name,
-                                       MutableHandleObject objp,
-                                       MutableHandleShape propp)
-{
-    RootedId id(cx, NameToId(name));
-    return obj_lookupGeneric(cx, obj, id, objp, propp);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_lookupElement(JSContext *cx, HandleObject obj,
-                                      uint32_t index, MutableHandleObject objp,
-                                      MutableHandleShape propp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return obj_lookupGeneric(cx, obj, id, objp, propp);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
-                                      PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
+UnboxedPlainObject::obj_defineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
+                                       PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
 {
     if (!obj->as<UnboxedPlainObject>().convertToNative(cx))
         return false;
 
     return DefineProperty(cx, obj, id, v, getter, setter, attrs);
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_defineProperty(JSContext *cx, HandleObject obj,
-                                       HandlePropertyName name, HandleValue v,
-                                       PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
-{
-    Rooted<jsid> id(cx, NameToId(name));
-    return obj_defineGeneric(cx, obj, id, v, getter, setter, attrs);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue v,
-                                      PropertyOp getter, StrictPropertyOp setter, unsigned attrs)
-{
-    AutoRooterGetterSetter gsRoot(cx, attrs, &getter, &setter);
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return obj_defineGeneric(cx, obj, id, v, getter, setter, attrs);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver,
-                                   HandleId id, MutableHandleValue vp)
+UnboxedPlainObject::obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
+                                    HandleId id, MutableHandleValue vp)
 {
     const UnboxedLayout &layout = obj->as<UnboxedPlainObject>().layout();
 
     if (const UnboxedLayout::Property *property = layout.lookup(id)) {
         vp.set(obj->as<UnboxedPlainObject>().getValue(*property));
         return true;
     }
 
@@ -328,36 +287,18 @@ UnboxedPlainObject::obj_getGeneric(JSCon
         vp.setUndefined();
         return true;
     }
 
     return GetProperty(cx, proto, receiver, id, vp);
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
-                                    HandlePropertyName name, MutableHandleValue vp)
-{
-    RootedId id(cx, NameToId(name));
-    return obj_getGeneric(cx, obj, receiver, id, vp);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver,
-                                   uint32_t index, MutableHandleValue vp)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return obj_getGeneric(cx, obj, receiver, id, vp);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                                   MutableHandleValue vp, bool strict)
+UnboxedPlainObject::obj_setProperty(JSContext *cx, HandleObject obj, HandleId id,
+                                    MutableHandleValue vp, bool strict)
 {
     const UnboxedLayout &layout = obj->as<UnboxedPlainObject>().layout();
 
     if (const UnboxedLayout::Property *property = layout.lookup(id)) {
         if (obj->as<UnboxedPlainObject>().setValue(cx, *property, vp))
             return true;
 
         if (!obj->as<UnboxedPlainObject>().convertToNative(cx))
@@ -371,34 +312,16 @@ UnboxedPlainObject::obj_setGeneric(JSCon
             return false;
         return SetProperty(cx, obj, obj, id, vp, strict);
     }
 
     return SetProperty(cx, proto, obj, id, vp, strict);
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_setProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
-                                    MutableHandleValue vp, bool strict)
-{
-    RootedId id(cx, NameToId(name));
-    return obj_setGeneric(cx, obj, id, vp, strict);
-}
-
-/* static */ bool
-UnboxedPlainObject::obj_setElement(JSContext *cx, HandleObject obj, uint32_t index,
-                                   MutableHandleValue vp, bool strict)
-{
-    RootedId id(cx);
-    if (!IndexToId(cx, index, &id))
-        return false;
-    return obj_setGeneric(cx, obj, id, vp, strict);
-}
-
-/* static */ bool
 UnboxedPlainObject::obj_getOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id,
                                                  MutableHandle<JSPropertyDescriptor> desc)
 {
     const UnboxedLayout &layout = obj->as<UnboxedPlainObject>().layout();
 
     if (const UnboxedLayout::Property *property = layout.lookup(id)) {
         desc.value().set(obj->as<UnboxedPlainObject>().getValue(*property));
         desc.setAttributes(JSPROP_ENUMERATE);
@@ -406,26 +329,27 @@ UnboxedPlainObject::obj_getOwnPropertyDe
         return true;
     }
 
     desc.object().set(nullptr);
     return true;
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_setGenericAttributes(JSContext *cx, HandleObject obj,
-                                             HandleId id, unsigned *attrsp)
+UnboxedPlainObject::obj_setPropertyAttributes(JSContext *cx, HandleObject obj,
+                                              HandleId id, unsigned *attrsp)
 {
     if (!obj->as<UnboxedPlainObject>().convertToNative(cx))
         return false;
     return SetPropertyAttributes(cx, obj, id, attrsp);
 }
 
 /* static */ bool
-UnboxedPlainObject::obj_deleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded)
+UnboxedPlainObject::obj_deleteProperty(JSContext *cx, HandleObject obj, HandleId id,
+                                       bool *succeeded)
 {
     if (!obj->as<UnboxedPlainObject>().convertToNative(cx))
         return false;
     return DeleteProperty(cx, obj, id, succeeded);
 }
 
 /* static */ bool
 UnboxedPlainObject::obj_watch(JSContext *cx, HandleObject obj, HandleId id, HandleObject callable)
@@ -459,31 +383,23 @@ const Class UnboxedPlainObject::class_ =
     nullptr,        /* finalize    */
     nullptr,        /* call        */
     nullptr,        /* hasInstance */
     nullptr,        /* construct   */
     UnboxedPlainObject::trace,
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     {
-        UnboxedPlainObject::obj_lookupGeneric,
         UnboxedPlainObject::obj_lookupProperty,
-        UnboxedPlainObject::obj_lookupElement,
-        UnboxedPlainObject::obj_defineGeneric,
         UnboxedPlainObject::obj_defineProperty,
-        UnboxedPlainObject::obj_defineElement,
-        UnboxedPlainObject::obj_getGeneric,
         UnboxedPlainObject::obj_getProperty,
-        UnboxedPlainObject::obj_getElement,
-        UnboxedPlainObject::obj_setGeneric,
         UnboxedPlainObject::obj_setProperty,
-        UnboxedPlainObject::obj_setElement,
         UnboxedPlainObject::obj_getOwnPropertyDescriptor,
-        UnboxedPlainObject::obj_setGenericAttributes,
-        UnboxedPlainObject::obj_deleteGeneric,
+        UnboxedPlainObject::obj_setPropertyAttributes,
+        UnboxedPlainObject::obj_deleteProperty,
         UnboxedPlainObject::obj_watch,
         nullptr,   /* No unwatch needed, as watch() converts the object to native */
         nullptr,   /* getElements */
         UnboxedPlainObject::obj_enumerate,
         nullptr, /* thisObject */
     }
 };
 
--- a/js/src/vm/UnboxedObject.h
+++ b/js/src/vm/UnboxedObject.h
@@ -126,62 +126,36 @@ class UnboxedLayout
 class UnboxedPlainObject : public JSObject
 {
     // Start of the inline data, which immediately follows the shape and type.
     uint8_t data_[1];
 
   public:
     static const Class class_;
 
-    static bool obj_lookupGeneric(JSContext *cx, HandleObject obj,
-                                  HandleId id, MutableHandleObject objp,
-                                  MutableHandleShape propp);
-
     static bool obj_lookupProperty(JSContext *cx, HandleObject obj,
-                                   HandlePropertyName name,
-                                   MutableHandleObject objp,
+                                   HandleId id, MutableHandleObject objp,
                                    MutableHandleShape propp);
 
-    static bool obj_lookupElement(JSContext *cx, HandleObject obj,
-                                  uint32_t index, MutableHandleObject objp,
-                                  MutableHandleShape propp);
-
-    static bool obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
-                                  PropertyOp getter, StrictPropertyOp setter, unsigned attrs);
-
-    static bool obj_defineProperty(JSContext *cx, HandleObject obj,
-                                   HandlePropertyName name, HandleValue v,
+    static bool obj_defineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue v,
                                    PropertyOp getter, StrictPropertyOp setter, unsigned attrs);
 
-    static bool obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, HandleValue v,
-                                  PropertyOp getter, StrictPropertyOp setter, unsigned attrs);
-
-    static bool obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver,
-                               HandleId id, MutableHandleValue vp);
-
     static bool obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver,
-                                HandlePropertyName name, MutableHandleValue vp);
+                                HandleId id, MutableHandleValue vp);
 
-    static bool obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver,
-                               uint32_t index, MutableHandleValue vp);
-
-    static bool obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id,
-                               MutableHandleValue vp, bool strict);
-    static bool obj_setProperty(JSContext *cx, HandleObject obj, HandlePropertyName name,
+    static bool obj_setProperty(JSContext *cx, HandleObject obj, HandleId id,
                                 MutableHandleValue vp, bool strict);
-    static bool obj_setElement(JSContext *cx, HandleObject obj, uint32_t index,
-                               MutableHandleValue vp, bool strict);
 
     static bool obj_getOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id,
                                              MutableHandle<JSPropertyDescriptor> desc);
 
-    static bool obj_setGenericAttributes(JSContext *cx, HandleObject obj,
-                                         HandleId id, unsigned *attrsp);
+    static bool obj_setPropertyAttributes(JSContext *cx, HandleObject obj,
+                                          HandleId id, unsigned *attrsp);
 
-    static bool obj_deleteGeneric(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded);
+    static bool obj_deleteProperty(JSContext *cx, HandleObject obj, HandleId id, bool *succeeded);
 
     static bool obj_enumerate(JSContext *cx, HandleObject obj, AutoIdVector &properties);
     static bool obj_watch(JSContext *cx, HandleObject obj, HandleId id, HandleObject callable);
 
     const UnboxedLayout &layout() const {
         return group()->unboxedLayout();
     }
 
--- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
@@ -676,31 +676,23 @@ const XPCWrappedNativeJSClass XPC_WN_NoH
         nullptr, // innerObject
         true,    // isWrappedNative
         nullptr, // weakmapKeyDelegateOp
         WrappedNativeObjectMoved
     },
 
     // ObjectOps
     {
-        nullptr, // lookupGeneric
         nullptr, // lookupProperty
-        nullptr, // lookupElement
-        nullptr, // defineGeneric
         nullptr, // defineProperty
-        nullptr, // defineElement
-        nullptr, // getGeneric
         nullptr, // getProperty
-        nullptr, // getElement
-        nullptr, // setGeneric
         nullptr, // setProperty
-        nullptr, // setElement
         nullptr, // getOwnPropertyDescriptor
-        nullptr, // setGenericAttributes
-        nullptr, // deleteGeneric
+        nullptr, // setPropertyAttributes
+        nullptr, // deleteProperty
         nullptr, nullptr, // watch/unwatch
         nullptr, // getElements
         nullptr, // enumerate
         XPC_WN_JSOp_ThisObject,
     }
   }
 };
 
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -968,54 +968,38 @@ extern bool
 XPC_WN_GetterSetter(JSContext *cx, unsigned argc, jsval *vp);
 
 extern JSObject*
 XPC_WN_JSOp_ThisObject(JSContext *cx, JS::HandleObject obj);
 
 // Macros to initialize Object or Function like XPC_WN classes
 #define XPC_WN_WithCall_ObjectOps                                             \
     {                                                                         \
-        nullptr, /* lookupGeneric */                                          \
         nullptr, /* lookupProperty */                                         \
-        nullptr, /* lookupElement */                                          \
-        nullptr, /* defineGeneric */                                          \
         nullptr, /* defineProperty */                                         \
-        nullptr, /* defineElement */                                          \
-        nullptr, /* getGeneric    */                                          \
         nullptr, /* getProperty    */                                         \
-        nullptr, /* getElement    */                                          \
-        nullptr, /* setGeneric    */                                          \
         nullptr, /* setProperty    */                                         \
-        nullptr, /* setElement    */                                          \
         nullptr, /* getOwnPropertyDescriptor */                               \
-        nullptr, /* setGenericAttributes  */                                  \
-        nullptr, /* deleteGeneric */                                          \
+        nullptr, /* setPropertyAttributes  */                                 \
+        nullptr, /* deleteProperty */                                         \
         nullptr, nullptr, /* watch/unwatch */                                 \
         nullptr, /* getElements */                                            \
         nullptr, /* enumerate */                                              \
         XPC_WN_JSOp_ThisObject,                                               \
     }
 
 #define XPC_WN_NoCall_ObjectOps                                               \
     {                                                                         \
-        nullptr, /* lookupGeneric */                                          \
         nullptr, /* lookupProperty */                                         \
-        nullptr, /* lookupElement */                                          \
-        nullptr, /* defineGeneric */                                          \
         nullptr, /* defineProperty */                                         \
-        nullptr, /* defineElement */                                          \
-        nullptr, /* getGeneric    */                                          \
         nullptr, /* getProperty    */                                         \
-        nullptr, /* getElement    */                                          \
-        nullptr, /* setGeneric    */                                          \
         nullptr, /* setProperty    */                                         \
-        nullptr, /* setElement    */                                          \
         nullptr, /* getOwnPropertyDescriptor */                               \
-        nullptr, /* setGenericAttributes  */                                  \
-        nullptr, /* deleteGeneric */                                          \
+        nullptr, /* setPropertyAttributes  */                                 \
+        nullptr, /* deleteProperty */                                         \
         nullptr, nullptr, /* watch/unwatch */                                 \
         nullptr, /* getElements */                                            \
         nullptr, /* enumerate */                                              \
         XPC_WN_JSOp_ThisObject,                                               \
     }
 
 // Maybe this macro should check for class->enumerate ==
 // XPC_WN_Shared_Proto_Enumerate or something rather than checking for