Back out f8a29b8bb211, d1267711aef0, df1b7a886a9d, 0f6a3dd2c2f7, e6628922b7be, 0a374ac233cd, cf00fd0f080c, 6fc24c4e7798, ab2e4a2e5dd2, 2d17e4ef5e71, 4a8940073f8c, ea3ab4b83152, c7577c232591, e58454c68f0f, and 0e39815d1bce for breaking a single Android J10 and nothing else. (That J10 task must not like deck chairs...) r=bustage
authorJeff Walden <jwalden@mit.edu>
Fri, 04 Jan 2019 16:33:01 -0600
changeset 509720 e32d3be39b84
parent 509719 1054653e187d
child 509721 135c1ea8854e
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
milestone66.0a1
backs outf8a29b8bb211
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
Back out f8a29b8bb211, d1267711aef0, df1b7a886a9d, 0f6a3dd2c2f7, e6628922b7be, 0a374ac233cd, cf00fd0f080c, 6fc24c4e7798, ab2e4a2e5dd2, 2d17e4ef5e71, 4a8940073f8c, ea3ab4b83152, c7577c232591, e58454c68f0f, and 0e39815d1bce for breaking a single Android J10 and nothing else. (That J10 task must not like deck chairs...) r=bustage
dom/asmjscache/AsmJSCache.cpp
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsJSEnvironment.cpp
dom/bindings/Codegen.py
dom/bindings/DOMJSClass.h
ipc/testshell/XPCShellEnvironment.cpp
js/public/BuildId.h
js/public/CallArgs.h
js/public/Date.h
js/public/Equality.h
js/public/PropertyDescriptor.h
js/public/PropertySpec.h
js/rust/build.rs
js/rust/etc/wrapper.hpp
js/src/builtin/Array.cpp
js/src/builtin/AtomicsObject.cpp
js/src/builtin/BigInt.cpp
js/src/builtin/Boolean.cpp
js/src/builtin/DataViewObject.cpp
js/src/builtin/JSON.cpp
js/src/builtin/MapObject.cpp
js/src/builtin/ModuleObject.cpp
js/src/builtin/Object.cpp
js/src/builtin/Profilers.cpp
js/src/builtin/Promise.cpp
js/src/builtin/Reflect.cpp
js/src/builtin/RegExp.cpp
js/src/builtin/Stream.cpp
js/src/builtin/String.cpp
js/src/builtin/Symbol.cpp
js/src/builtin/TestingFunctions.cpp
js/src/builtin/TypedObject.cpp
js/src/builtin/WeakMapObject.cpp
js/src/builtin/WeakSetObject.cpp
js/src/builtin/intl/Collator.cpp
js/src/builtin/intl/DateTimeFormat.cpp
js/src/builtin/intl/IntlObject.cpp
js/src/builtin/intl/NumberFormat.cpp
js/src/builtin/intl/PluralRules.cpp
js/src/builtin/intl/RelativeTimeFormat.cpp
js/src/ctypes/CTypes.cpp
js/src/ctypes/Library.cpp
js/src/jit/CodeGenerator.cpp
js/src/jit/VMFunctions.cpp
js/src/jsapi-tests/testExecuteInJSMEnvironment.cpp
js/src/jsapi-tests/testGetPropertyDescriptor.cpp
js/src/jsapi-tests/testLooselyEqual.cpp
js/src/jsapi-tests/testProfileStrings.cpp
js/src/jsapi-tests/testSameValue.cpp
js/src/jsapi-tests/testXDR.cpp
js/src/jsapi-tests/tests.h
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsdate.cpp
js/src/jsexn.cpp
js/src/jsmath.cpp
js/src/jsnum.cpp
js/src/moz.build
js/src/perf/jsperf.cpp
js/src/proxy/Proxy.cpp
js/src/proxy/ScriptedProxyHandler.cpp
js/src/shell/OSObject.cpp
js/src/shell/js.cpp
js/src/vm/ArrayBufferObject.cpp
js/src/vm/AsyncIteration.cpp
js/src/vm/BigIntType.h
js/src/vm/BuildId.cpp
js/src/vm/Debugger.cpp
js/src/vm/DebuggerMemory.cpp
js/src/vm/EqualityOperations.cpp
js/src/vm/EqualityOperations.h
js/src/vm/GeneratorObject.cpp
js/src/vm/Interpreter.cpp
js/src/vm/Interpreter.h
js/src/vm/Iteration.cpp
js/src/vm/JSFunction.cpp
js/src/vm/JSObject.cpp
js/src/vm/NativeObject.cpp
js/src/vm/Runtime.cpp
js/src/vm/Runtime.h
js/src/vm/SavedStacks.cpp
js/src/vm/SelfHosting.cpp
js/src/vm/SharedArrayObject.cpp
js/src/vm/TypedArrayObject.cpp
js/src/vm/Xdr.cpp
js/src/wasm/AsmJS.cpp
js/src/wasm/WasmJS.cpp
js/src/wasm/WasmModule.cpp
js/xpconnect/loader/mozJSComponentLoader.cpp
js/xpconnect/src/Sandbox.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/XPCShellImpl.cpp
js/xpconnect/src/xpcpublic.h
js/xpconnect/wrappers/XrayWrapper.cpp
netwerk/base/ProxyAutoConfig.cpp
toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
toolkit/components/mozintl/MozIntlHelper.cpp
toolkit/recordreplay/ipc/JSControl.cpp
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AsmJSCache.h"
 
 #include <stdio.h>
 
-#include "js/BuildId.h"  // JS::BuildIdCharVector
 #include "js/RootingAPI.h"
 #include "jsfriendapi.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/CondVar.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/dom/asmjscache/PAsmJSCacheEntryChild.h"
 #include "mozilla/dom/asmjscache/PAsmJSCacheEntryParent.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -69,17 +69,16 @@
 #include "mozilla/intl/LocaleService.h"
 #include "WindowDestroyedEvent.h"
 #include "nsDocShellLoadState.h"
 #include "mozilla/dom/WindowGlobalChild.h"
 
 // Helper Classes
 #include "nsJSUtils.h"
 #include "jsapi.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsReadableUtils.h"
 #include "nsJSEnvironment.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Likely.h"
 #include "mozilla/Sprintf.h"
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -41,19 +41,18 @@
 #include <process.h>
 #define getpid _getpid
 #else
 #include <unistd.h>  // for getpid()
 #endif
 #include "xpcpublic.h"
 
 #include "jsapi.h"
-#include "js/PropertySpec.h"
+#include "js/Wrapper.h"
 #include "js/SliceBudget.h"
-#include "js/Wrapper.h"
 #include "nsIArray.h"
 #include "nsIObjectInputStream.h"
 #include "nsIObjectOutputStream.h"
 #include "WrapperFactory.h"
 #include "nsGlobalWindow.h"
 #include "mozilla/AutoRestore.h"
 #include "mozilla/MainThreadIdlePeriod.h"
 #include "mozilla/StaticPrefs.h"
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -5185,17 +5185,17 @@ def getJSToNativeConversionInfo(type, de
 
         dateObjectMemberTypes = filter(lambda t: t.isDate(), memberTypes)
         if len(dateObjectMemberTypes) > 0:
             assert len(dateObjectMemberTypes) == 1
             memberType = dateObjectMemberTypes[0]
             name = getUnionMemberName(memberType)
             dateObject = CGGeneric("%s.SetTo%s(cx, ${val});\n"
                                    "done = true;\n" % (unionArgumentObj, name))
-            dateObject = CGIfWrapper(dateObject, "JS::ObjectIsDate(cx, argObj)")
+            dateObject = CGIfWrapper(dateObject, "JS_ObjectIsDate(cx, argObj)")
             names.append(name)
         else:
             dateObject = None
 
         callbackMemberTypes = filter(lambda t: t.isCallback() or t.isCallbackInterface(), memberTypes)
         if len(callbackMemberTypes) > 0:
             assert len(callbackMemberTypes) == 1
             memberType = callbackMemberTypes[0]
@@ -6202,17 +6202,17 @@ def getJSToNativeConversionInfo(type, de
         else:
             notDate = failureCode
 
         conversion = fill(
             """
             JS::Rooted<JSObject*> possibleDateObject(cx, &$${val}.toObject());
             { // scope for isDate
               bool isDate;
-              if (!JS::ObjectIsDate(cx, possibleDateObject, &isDate)) {
+              if (!JS_ObjectIsDate(cx, possibleDateObject, &isDate)) {
                 $*{exceptionCode}
               }
               if (!isDate) {
                 $*{notDate}
               }
               if (!${dateVal}.SetTimeStamp(cx, possibleDateObject)) {
                 $*{exceptionCode}
               }
--- a/dom/bindings/DOMJSClass.h
+++ b/dom/bindings/DOMJSClass.h
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_DOMJSClass_h
 #define mozilla_dom_DOMJSClass_h
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Likely.h"
 
 #include "mozilla/dom/PrototypeList.h"  // auto-generated
 
 #include "mozilla/dom/JSSlots.h"
--- a/ipc/testshell/XPCShellEnvironment.cpp
+++ b/ipc/testshell/XPCShellEnvironment.cpp
@@ -13,17 +13,16 @@
 #include <unistd.h> /* for isatty() */
 #endif
 
 #include "base/basictypes.h"
 
 #include "jsapi.h"
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
-#include "js/PropertySpec.h"
 #include "js/SourceText.h"
 
 #include "xpcpublic.h"
 
 #include "XPCShellEnvironment.h"
 
 #include "mozilla/XPCOM.h"
 
deleted file mode 100644
--- a/js/public/BuildId.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Embedding-provided build ID information, used by SpiderMonkey to tag cached
- * compilation data so that cached data can be reused when possible, or
- * discarded and regenerated if necessary.
- */
-
-#ifndef js_BuildId_h
-#define js_BuildId_h
-
-#include "mozilla/Attributes.h"  // MOZ_MUST_USE
-
-#include "jstypes.h"  // JS_PUBLIC_API
-
-#include "js/Vector.h"  // js::Vector
-
-namespace js {
-
-class SystemAllocPolicy;
-
-}  // namespace js
-
-namespace JS {
-
-/** Vector of characters used for holding build ids. */
-using BuildIdCharVector = js::Vector<char, 0, js::SystemAllocPolicy>;
-
-/**
- * Return the buildId (represented as a sequence of characters) associated with
- * the currently-executing build. If the JS engine is embedded such that a
- * single cache entry can be observed by different compiled versions of the JS
- * engine, it is critical that the buildId shall change for each new build of
- * the JS engine.
- */
-using BuildIdOp = bool (*)(BuildIdCharVector* buildId);
-
-/**
- * Embedder hook to set the buildId-generating function.
- */
-extern JS_PUBLIC_API void SetProcessBuildIdOp(BuildIdOp buildIdOp);
-
-/**
- * Some cached data is, in addition to being build-specific, CPU-specific: the
- * cached data depends on CPU features like a particular level of SSE support.
- *
- * This function produces a buildId that includes:
- *
- *   * the buildId defined by the embedder-provided BuildIdOp set by
- *     JS::SetProcessBuildIdOp, and
- *   * CPU feature information for the current CPU.
- *
- * Embedders may use this function to tag cached data whose validity depends
- * on having consistent buildId *and* on the CPU supporting features identical
- * to those in play when the cached data was computed.
- */
-extern MOZ_MUST_USE JS_PUBLIC_API bool GetOptimizedEncodingBuildId(
-    BuildIdCharVector* buildId);
-
-}  // namespace JS
-
-#endif /* js_BuildId_h */
--- a/js/public/CallArgs.h
+++ b/js/public/CallArgs.h
@@ -68,17 +68,17 @@
 #include "mozilla/TypeTraits.h"
 
 #include "jstypes.h"
 
 #include "js/RootingAPI.h"
 #include "js/Value.h"
 
 /* Typedef for native functions called by the JS VM. */
-using JSNative = bool (*)(JSContext* cx, unsigned argc, JS::Value* vp);
+typedef bool (*JSNative)(JSContext* cx, unsigned argc, JS::Value* vp);
 
 namespace JS {
 
 extern JS_PUBLIC_DATA const HandleValue UndefinedHandleValue;
 
 namespace detail {
 
 /*
--- a/js/public/Date.h
+++ b/js/public/Date.h
@@ -24,25 +24,21 @@
  * double type is a superset of the above set, so it *may* (but need not)
  * represent a date.  Use ECMAScript's |TimeClip| method to produce a date from
  * a double.
  *
  * Date *objects* are simply wrappers around |TimeClip|'d numbers, with a bunch
  * of accessor methods to the various aspects of the represented date.
  */
 
-#include "mozilla/FloatingPoint.h"  // mozilla::{IsFinite,IsNaN}, mozilla::UnspecifiedNaN
-#include "mozilla/MathAlgorithms.h"  // mozilla::Abs
+#include "mozilla/FloatingPoint.h"
+#include "mozilla/MathAlgorithms.h"
 
-#include "js/Conversions.h"  // JS::ToInteger
-#include "js/RootingAPI.h"   // JS::Handle
-#include "js/Value.h"        // JS::CanonicalizeNaN, JS::DoubleValue, JS::Value
-
-struct JSContext;
-class JSObject;
+#include "js/Conversions.h"
+#include "js/Value.h"
 
 namespace JS {
 
 /**
  * Re-query the system to determine the current time zone adjustment from UTC,
  * including any component due to DST.  If the time zone has changed, this will
  * cause all Date object non-UTC methods and formatting functions to produce
  * appropriately adjusted results.
@@ -109,49 +105,24 @@ inline ClippedTime TimeClip(double time)
 
   // Step 3.
   return ClippedTime(ToInteger(time) + (+0.0));
 }
 
 // Produce a double Value from the given time.  Because times may be NaN,
 // prefer using this to manual canonicalization.
 inline Value TimeValue(ClippedTime time) {
-  return DoubleValue(CanonicalizeNaN(time.toDouble()));
+  return DoubleValue(JS::CanonicalizeNaN(time.toDouble()));
 }
 
 // Create a new Date object whose [[DateValue]] internal slot contains the
 // clipped |time|.  (Users who must represent times outside that range must use
 // another representation.)
 extern JS_PUBLIC_API JSObject* NewDateObject(JSContext* cx, ClippedTime time);
 
-/**
- * Create a new Date object for a year/month/day-of-month/hour/minute/second.
- *
- * The created date is initialized with the time value
- *
- *   TimeClip(UTC(MakeDate(MakeDay(year, mon, mday),
- *                MakeTime(hour, min, sec, 0.0))))
- *
- * where each function/operation is as specified in ECMAScript.
- */
-extern JS_PUBLIC_API JSObject* NewDateObject(JSContext* cx, int year, int mon,
-                                             int mday, int hour, int min,
-                                             int sec);
-
-/**
- * On success, returns true, setting |*isDate| to true if |obj| is a Date
- * object or a wrapper around one, or to false if not.  Returns false on
- * failure.
- *
- * This method returns true with |*isDate == false| when passed an ES6 proxy
- * whose target is a Date, or when passed a revoked proxy.
- */
-extern JS_PUBLIC_API bool ObjectIsDate(JSContext* cx, Handle<JSObject*> obj,
-                                       bool* isDate);
-
 // Year is a year, month is 0-11, day is 1-based.  The return value is a number
 // of milliseconds since the epoch.
 //
 // Consistent with the MakeDate algorithm defined in ECMAScript, this value is
 // *not* clipped!  Use JS::TimeClip if you need a clipped date.
 JS_PUBLIC_API double MakeDate(double year, unsigned month, unsigned day);
 
 // Year is a year, month is 0-11, day is 1-based, and time is in milliseconds.
deleted file mode 100644
--- a/js/public/Equality.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Equality operations. */
-
-#ifndef js_Equality_h
-#define js_Equality_h
-
-#include "jstypes.h"  // JS_PUBLIC_API
-
-#include "js/RootingAPI.h"  // JS::Handle
-#include "js/Value.h"       // JS::Value
-
-struct JSContext;
-
-namespace JS {
-
-/**
- * Store |v1 === v2| to |*equal| -- strict equality, which performs no
- * conversions on |v1| or |v2| before comparing.
- *
- * This operation can fail only if an internal error occurs (e.g. OOM while
- * linearizing a string value).
- */
-extern JS_PUBLIC_API bool StrictlyEqual(JSContext* cx, JS::Handle<JS::Value> v1,
-                                        JS::Handle<JS::Value> v2, bool* equal);
-
-/**
- * Store |v1 == v2| to |*equal| -- loose equality, which may perform
- * user-modifiable conversions on |v1| or |v2|.
- *
- * This operation can fail if a user-modifiable conversion fails *or* if an
- * internal error occurs. (e.g. OOM while linearizing a string value).
- */
-extern JS_PUBLIC_API bool LooselyEqual(JSContext* cx, JS::Handle<JS::Value> v1,
-                                       JS::Handle<JS::Value> v2, bool* equal);
-
-/**
- * Stores |SameValue(v1, v2)| to |*equal| -- using the SameValue operation
- * defined in ECMAScript, initially exposed to script as |Object.is|.  SameValue
- * behaves identically to strict equality, except that it equates two NaN values
- * and does not equate differently-signed zeroes.  It performs no conversions on
- * |v1| or |v2| before comparing.
- *
- * This operation can fail only if an internal error occurs (e.g. OOM while
- * linearizing a string value).
- */
-extern JS_PUBLIC_API bool SameValue(JSContext* cx, JS::Handle<JS::Value> v1,
-                                    JS::Handle<JS::Value> v2, bool* same);
-
-}  // namespace JS
-
-#endif /* js_Equality_h */
deleted file mode 100644
--- a/js/public/PropertyDescriptor.h
+++ /dev/null
@@ -1,396 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Property descriptors and flags. */
-
-#ifndef js_PropertyDescriptor_h
-#define js_PropertyDescriptor_h
-
-#include "mozilla/Assertions.h"  // MOZ_ASSERT, MOZ_ASSERT_IF
-
-#include <stdint.h>  // uint8_t
-
-#include "jstypes.h"  // JS_BROKEN_GCC_ATTRIBUTE_WARNING, JS_PUBLIC_API
-
-#include "js/Class.h"       // JS{Getter,Setter}Op
-#include "js/RootingAPI.h"  // JS::Handle, js::{,Mutable}WrappedPtrOperations
-#include "js/Value.h"       // JS::Value
-
-struct JSContext;
-class JSObject;
-
-#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wattributes"
-#endif  // JS_BROKEN_GCC_ATTRIBUTE_WARNING
-
-class JS_PUBLIC_API JSTracer;
-
-#ifdef JS_BROKEN_GCC_ATTRIBUTE_WARNING
-#pragma GCC diagnostic pop
-#endif  // JS_BROKEN_GCC_ATTRIBUTE_WARNING
-
-/* Property attributes, set in JSPropertySpec and passed to API functions.
- *
- * The data structure in which some of these values are stored only uses a
- * uint8_t to store the relevant information.  Proceed with caution if trying to
- * reorder or change the the first byte worth of flags.
- */
-
-/** The property is visible in for/in loops. */
-static constexpr uint8_t JSPROP_ENUMERATE = 0x01;
-
-/**
- * The property is non-writable.  This flag is only valid when neither
- * JSPROP_GETTER nor JSPROP_SETTER is set.
- */
-static constexpr uint8_t JSPROP_READONLY = 0x02;
-
-/**
- * The property is non-configurable: it can't be deleted, and if it's an
- * accessor descriptor, its getter and setter can't be changed.
- */
-static constexpr uint8_t JSPROP_PERMANENT = 0x04;
-
-/* (0x08 is unused; add to JSPROP_FLAGS_MASK if ever defined) */
-
-/** The property has a getter function. */
-static constexpr uint8_t JSPROP_GETTER = 0x10;
-
-/** The property has a setter function. */
-static constexpr uint8_t JSPROP_SETTER = 0x20;
-
-/* (0x40 is unused; add to JSPROP_FLAGS_MASK if ever defined) */
-
-/** A bit for internal JS engine use only. */
-static constexpr uint8_t JSPROP_INTERNAL_USE_BIT = 0x80;
-
-/* (0x1000 is unused; add to JSPROP_FLAGS_MASK if ever defined) */
-
-/**
- * Resolve hooks and enumerate hooks must pass this flag when calling
- * JS_Define* APIs to reify lazily-defined properties.
- *
- * JSPROP_RESOLVING is used only with property-defining APIs. It tells the
- * engine to skip the resolve hook when performing the lookup at the beginning
- * of property definition. This keeps the resolve hook from accidentally
- * triggering itself: unchecked recursion.
- *
- * For enumerate hooks, triggering the resolve hook would be merely silly, not
- * fatal, except in some cases involving non-configurable properties.
- */
-static constexpr unsigned JSPROP_RESOLVING = 0x2000;
-
-/**
- * When redefining an existing property, ignore the value of the
- * JSPROP_ENUMERATE flag.  This flag is ignored in other situations.
- */
-static constexpr unsigned JSPROP_IGNORE_ENUMERATE = 0x4000;
-
-/**
- * When redefining an existing property, ignore the value of the JSPROP_READONLY
- * flag.  This flag is ignored in other situations.
- */
-static constexpr unsigned JSPROP_IGNORE_READONLY = 0x8000;
-
-/**
- * When redefining an existing property, ignore the value of the
- * JSPROP_PERMANENT flag.  This flag is ignored in other situations.
- */
-static constexpr unsigned JSPROP_IGNORE_PERMANENT = 0x10000;
-
-/**
- * When redefining an existing property, ignore the Value in the descriptor.
- * This flag is ignored in other situations.
- */
-static constexpr unsigned JSPROP_IGNORE_VALUE = 0x20000;
-
-/* (higher flags are unused; add to JSPROP_FLAGS_MASK if ever defined) */
-
-static constexpr unsigned JSPROP_FLAGS_MASK =
-    JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_GETTER |
-    JSPROP_SETTER | JSPROP_INTERNAL_USE_BIT | JSPROP_RESOLVING |
-    JSPROP_IGNORE_ENUMERATE | JSPROP_IGNORE_READONLY | JSPROP_IGNORE_PERMANENT |
-    JSPROP_IGNORE_VALUE;
-
-namespace JS {
-
-/**
- * A structure that represents a property on an object, or the absence of a
- * property.  Use {,Mutable}Handle<PropertyDescriptor> to interact with
- * instances of this structure rather than interacting directly with member
- * fields.
- */
-struct JS_PUBLIC_API PropertyDescriptor {
-  JSObject* obj = nullptr;
-  unsigned attrs = 0;
-  JSGetterOp getter = nullptr;
-  JSSetterOp setter = nullptr;
-  Value value;
-
-  PropertyDescriptor() = default;
-
-  static void trace(PropertyDescriptor* self, JSTracer* trc) {
-    self->trace(trc);
-  }
-  void trace(JSTracer* trc);
-};
-
-}  // namespace JS
-
-namespace js {
-
-template <typename Wrapper>
-class WrappedPtrOperations<JS::PropertyDescriptor, Wrapper> {
-  const JS::PropertyDescriptor& desc() const {
-    return static_cast<const Wrapper*>(this)->get();
-  }
-
-  bool has(unsigned bit) const {
-    MOZ_ASSERT(bit != 0);
-    MOZ_ASSERT((bit & (bit - 1)) == 0);  // only a single bit
-    return (desc().attrs & bit) != 0;
-  }
-
-  bool hasAny(unsigned bits) const { return (desc().attrs & bits) != 0; }
-
-  bool hasAll(unsigned bits) const { return (desc().attrs & bits) == bits; }
-
- public:
-  // Descriptors with JSGetterOp/JSSetterOp are considered data
-  // descriptors. It's complicated.
-  bool isAccessorDescriptor() const {
-    return hasAny(JSPROP_GETTER | JSPROP_SETTER);
-  }
-  bool isGenericDescriptor() const {
-    return (desc().attrs & (JSPROP_GETTER | JSPROP_SETTER |
-                            JSPROP_IGNORE_READONLY | JSPROP_IGNORE_VALUE)) ==
-           (JSPROP_IGNORE_READONLY | JSPROP_IGNORE_VALUE);
-  }
-  bool isDataDescriptor() const {
-    return !isAccessorDescriptor() && !isGenericDescriptor();
-  }
-
-  bool hasConfigurable() const { return !has(JSPROP_IGNORE_PERMANENT); }
-  bool configurable() const {
-    MOZ_ASSERT(hasConfigurable());
-    return !has(JSPROP_PERMANENT);
-  }
-
-  bool hasEnumerable() const { return !has(JSPROP_IGNORE_ENUMERATE); }
-  bool enumerable() const {
-    MOZ_ASSERT(hasEnumerable());
-    return has(JSPROP_ENUMERATE);
-  }
-
-  bool hasValue() const {
-    return !isAccessorDescriptor() && !has(JSPROP_IGNORE_VALUE);
-  }
-  JS::HandleValue value() const {
-    return JS::Handle<JS::Value>::fromMarkedLocation(&desc().value);
-  }
-
-  bool hasWritable() const {
-    return !isAccessorDescriptor() && !has(JSPROP_IGNORE_READONLY);
-  }
-  bool writable() const {
-    MOZ_ASSERT(hasWritable());
-    return !has(JSPROP_READONLY);
-  }
-
-  bool hasGetterObject() const { return has(JSPROP_GETTER); }
-  JS::Handle<JSObject*> getterObject() const {
-    MOZ_ASSERT(hasGetterObject());
-    return JS::Handle<JSObject*>::fromMarkedLocation(
-        reinterpret_cast<JSObject* const*>(&desc().getter));
-  }
-  bool hasSetterObject() const { return has(JSPROP_SETTER); }
-  JS::Handle<JSObject*> setterObject() const {
-    MOZ_ASSERT(hasSetterObject());
-    return JS::Handle<JSObject*>::fromMarkedLocation(
-        reinterpret_cast<JSObject* const*>(&desc().setter));
-  }
-
-  bool hasGetterOrSetter() const { return desc().getter || desc().setter; }
-
-  JS::Handle<JSObject*> object() const {
-    return JS::Handle<JSObject*>::fromMarkedLocation(&desc().obj);
-  }
-  unsigned attributes() const { return desc().attrs; }
-  JSGetterOp getter() const { return desc().getter; }
-  JSSetterOp setter() const { return desc().setter; }
-
-  void assertValid() const {
-#ifdef DEBUG
-    MOZ_ASSERT(
-        (attributes() &
-         ~(JSPROP_ENUMERATE | JSPROP_IGNORE_ENUMERATE | JSPROP_PERMANENT |
-           JSPROP_IGNORE_PERMANENT | JSPROP_READONLY | JSPROP_IGNORE_READONLY |
-           JSPROP_IGNORE_VALUE | JSPROP_GETTER | JSPROP_SETTER |
-           JSPROP_RESOLVING | JSPROP_INTERNAL_USE_BIT)) == 0);
-    MOZ_ASSERT(!hasAll(JSPROP_IGNORE_ENUMERATE | JSPROP_ENUMERATE));
-    MOZ_ASSERT(!hasAll(JSPROP_IGNORE_PERMANENT | JSPROP_PERMANENT));
-    if (isAccessorDescriptor()) {
-      MOZ_ASSERT(!has(JSPROP_READONLY));
-      MOZ_ASSERT(!has(JSPROP_IGNORE_READONLY));
-      MOZ_ASSERT(!has(JSPROP_IGNORE_VALUE));
-      MOZ_ASSERT(!has(JSPROP_INTERNAL_USE_BIT));
-      MOZ_ASSERT(value().isUndefined());
-      MOZ_ASSERT_IF(!has(JSPROP_GETTER), !getter());
-      MOZ_ASSERT_IF(!has(JSPROP_SETTER), !setter());
-    } else {
-      MOZ_ASSERT(!hasAll(JSPROP_IGNORE_READONLY | JSPROP_READONLY));
-      MOZ_ASSERT_IF(has(JSPROP_IGNORE_VALUE), value().isUndefined());
-    }
-
-    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_ENUMERATE));
-    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_PERMANENT));
-    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_READONLY));
-    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_VALUE));
-#endif
-  }
-
-  void assertComplete() const {
-#ifdef DEBUG
-    assertValid();
-    MOZ_ASSERT(
-        (attributes() & ~(JSPROP_ENUMERATE | JSPROP_PERMANENT |
-                          JSPROP_READONLY | JSPROP_GETTER | JSPROP_SETTER |
-                          JSPROP_RESOLVING | JSPROP_INTERNAL_USE_BIT)) == 0);
-    MOZ_ASSERT_IF(isAccessorDescriptor(),
-                  has(JSPROP_GETTER) && has(JSPROP_SETTER));
-#endif
-  }
-
-  void assertCompleteIfFound() const {
-#ifdef DEBUG
-    if (object()) {
-      assertComplete();
-    }
-#endif
-  }
-};
-
-template <typename Wrapper>
-class MutableWrappedPtrOperations<JS::PropertyDescriptor, Wrapper>
-    : public js::WrappedPtrOperations<JS::PropertyDescriptor, Wrapper> {
-  JS::PropertyDescriptor& desc() { return static_cast<Wrapper*>(this)->get(); }
-
- public:
-  void clear() {
-    object().set(nullptr);
-    setAttributes(0);
-    setGetter(nullptr);
-    setSetter(nullptr);
-    value().setUndefined();
-  }
-
-  void initFields(JS::Handle<JSObject*> obj, JS::Handle<JS::Value> v,
-                  unsigned attrs, JSGetterOp getterOp, JSSetterOp setterOp) {
-    object().set(obj);
-    value().set(v);
-    setAttributes(attrs);
-    setGetter(getterOp);
-    setSetter(setterOp);
-  }
-
-  void assign(JS::PropertyDescriptor& other) {
-    object().set(other.obj);
-    setAttributes(other.attrs);
-    setGetter(other.getter);
-    setSetter(other.setter);
-    value().set(other.value);
-  }
-
-  void setDataDescriptor(JS::Handle<JS::Value> v, unsigned attrs) {
-    MOZ_ASSERT((attrs & ~(JSPROP_ENUMERATE | JSPROP_PERMANENT |
-                          JSPROP_READONLY | JSPROP_IGNORE_ENUMERATE |
-                          JSPROP_IGNORE_PERMANENT | JSPROP_IGNORE_READONLY)) ==
-               0);
-    object().set(nullptr);
-    setAttributes(attrs);
-    setGetter(nullptr);
-    setSetter(nullptr);
-    value().set(v);
-  }
-
-  JS::MutableHandle<JSObject*> object() {
-    return JS::MutableHandle<JSObject*>::fromMarkedLocation(&desc().obj);
-  }
-  unsigned& attributesRef() { return desc().attrs; }
-  JSGetterOp& getter() { return desc().getter; }
-  JSSetterOp& setter() { return desc().setter; }
-  JS::MutableHandle<JS::Value> value() {
-    return JS::MutableHandle<JS::Value>::fromMarkedLocation(&desc().value);
-  }
-  void setValue(JS::Handle<JS::Value> v) {
-    MOZ_ASSERT(!(desc().attrs & (JSPROP_GETTER | JSPROP_SETTER)));
-    attributesRef() &= ~JSPROP_IGNORE_VALUE;
-    value().set(v);
-  }
-
-  void setConfigurable(bool configurable) {
-    setAttributes(
-        (desc().attrs & ~(JSPROP_IGNORE_PERMANENT | JSPROP_PERMANENT)) |
-        (configurable ? 0 : JSPROP_PERMANENT));
-  }
-  void setEnumerable(bool enumerable) {
-    setAttributes(
-        (desc().attrs & ~(JSPROP_IGNORE_ENUMERATE | JSPROP_ENUMERATE)) |
-        (enumerable ? JSPROP_ENUMERATE : 0));
-  }
-  void setWritable(bool writable) {
-    MOZ_ASSERT(!(desc().attrs & (JSPROP_GETTER | JSPROP_SETTER)));
-    setAttributes((desc().attrs & ~(JSPROP_IGNORE_READONLY | JSPROP_READONLY)) |
-                  (writable ? 0 : JSPROP_READONLY));
-  }
-  void setAttributes(unsigned attrs) { desc().attrs = attrs; }
-
-  void setGetter(JSGetterOp op) { desc().getter = op; }
-  void setSetter(JSSetterOp op) { desc().setter = op; }
-  void setGetterObject(JSObject* obj) {
-    desc().getter = reinterpret_cast<JSGetterOp>(obj);
-    desc().attrs &=
-        ~(JSPROP_IGNORE_VALUE | JSPROP_IGNORE_READONLY | JSPROP_READONLY);
-    desc().attrs |= JSPROP_GETTER;
-  }
-  void setSetterObject(JSObject* obj) {
-    desc().setter = reinterpret_cast<JSSetterOp>(obj);
-    desc().attrs &=
-        ~(JSPROP_IGNORE_VALUE | JSPROP_IGNORE_READONLY | JSPROP_READONLY);
-    desc().attrs |= JSPROP_SETTER;
-  }
-
-  JS::MutableHandle<JSObject*> getterObject() {
-    MOZ_ASSERT(this->hasGetterObject());
-    return JS::MutableHandle<JSObject*>::fromMarkedLocation(
-        reinterpret_cast<JSObject**>(&desc().getter));
-  }
-  JS::MutableHandle<JSObject*> setterObject() {
-    MOZ_ASSERT(this->hasSetterObject());
-    return JS::MutableHandle<JSObject*>::fromMarkedLocation(
-        reinterpret_cast<JSObject**>(&desc().setter));
-  }
-};
-
-}  // namespace js
-
-namespace JS {
-
-extern JS_PUBLIC_API bool ObjectToCompletePropertyDescriptor(
-    JSContext* cx, Handle<JSObject*> obj, Handle<Value> descriptor,
-    MutableHandle<PropertyDescriptor> desc);
-
-/*
- * ES6 draft rev 32 (2015 Feb 2) 6.2.4.4 FromPropertyDescriptor(Desc).
- *
- * If desc.object() is null, then vp is set to undefined.
- */
-extern JS_PUBLIC_API bool FromPropertyDescriptor(
-    JSContext* cx, Handle<PropertyDescriptor> desc, MutableHandle<Value> vp);
-
-}  // namespace JS
-
-#endif /* js_PropertyDescriptor_h */
deleted file mode 100644
--- a/js/public/PropertySpec.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Property descriptors and flags. */
-
-#ifndef js_PropertySpec_h
-#define js_PropertySpec_h
-
-#include "mozilla/Assertions.h"  // MOZ_ASSERT{,_IF}
-
-#include <stddef.h>     // size_t
-#include <stdint.h>     // uint8_t, uint16_t, int32_t, uint32_t, uintptr_t
-#include <type_traits>  // std::enable_if
-
-#include "jstypes.h"  // JS_PUBLIC_API
-
-#include "js/CallArgs.h"            // JSNative
-#include "js/PropertyDescriptor.h"  // JSPROP_*
-#include "js/RootingAPI.h"          // JS::MutableHandle
-#include "js/Value.h"               // JS::Value
-
-struct JSContext;
-struct JSJitInfo;
-
-/**
- * Wrapper to relace JSNative for JSPropertySpecs and JSFunctionSpecs. This will
- * allow us to pass one JSJitInfo per function with the property/function spec,
- * without additional field overhead.
- */
-struct JSNativeWrapper {
-  JSNative op;
-  const JSJitInfo* info;
-};
-
-/**
- * Macro static initializers which make it easy to pass no JSJitInfo as part of
- * a JSPropertySpec or JSFunctionSpec.
- */
-#define JSNATIVE_WRAPPER(native) \
-  {                              \
-    { native, nullptr }          \
-  }
-
-/**
- * Description of a property. JS_DefineProperties and JS_InitClass take arrays
- * of these and define many properties at once. JS_PSG, JS_PSGS and JS_PS_END
- * are helper macros for defining such arrays.
- */
-struct JSPropertySpec {
-  struct SelfHostedWrapper {
-    void* unused;
-    const char* funname;
-  };
-
-  struct ValueWrapper {
-    uintptr_t type;
-    union {
-      const char* string;
-      int32_t int32;
-    };
-  };
-
-  const char* name;
-  uint8_t flags;
-  union {
-    struct {
-      union {
-        JSNativeWrapper native;
-        SelfHostedWrapper selfHosted;
-      } getter;
-      union {
-        JSNativeWrapper native;
-        SelfHostedWrapper selfHosted;
-      } setter;
-    } accessors;
-    ValueWrapper value;
-  };
-
-  bool isAccessor() const { return !(flags & JSPROP_INTERNAL_USE_BIT); }
-  JS_PUBLIC_API bool getValue(JSContext* cx,
-                              JS::MutableHandle<JS::Value> value) const;
-
-  bool isSelfHosted() const {
-    MOZ_ASSERT(isAccessor());
-
-#ifdef DEBUG
-    // Verify that our accessors match our JSPROP_GETTER flag.
-    if (flags & JSPROP_GETTER) {
-      checkAccessorsAreSelfHosted();
-    } else {
-      checkAccessorsAreNative();
-    }
-#endif
-    return (flags & JSPROP_GETTER);
-  }
-
-  static_assert(sizeof(SelfHostedWrapper) == sizeof(JSNativeWrapper),
-                "JSPropertySpec::getter/setter must be compact");
-  static_assert(offsetof(SelfHostedWrapper, funname) ==
-                    offsetof(JSNativeWrapper, info),
-                "JS_SELF_HOSTED* macros below require that "
-                "SelfHostedWrapper::funname overlay "
-                "JSNativeWrapper::info");
-
- private:
-  void checkAccessorsAreNative() const {
-    MOZ_ASSERT(accessors.getter.native.op);
-    // We may not have a setter at all.  So all we can assert here, for the
-    // native case is that if we have a jitinfo for the setter then we have
-    // a setter op too.  This is good enough to make sure we don't have a
-    // SelfHostedWrapper for the setter.
-    MOZ_ASSERT_IF(accessors.setter.native.info, accessors.setter.native.op);
-  }
-
-  void checkAccessorsAreSelfHosted() const {
-    MOZ_ASSERT(!accessors.getter.selfHosted.unused);
-    MOZ_ASSERT(!accessors.setter.selfHosted.unused);
-  }
-};
-
-namespace JS {
-namespace detail {
-
-/* NEVER DEFINED, DON'T USE.  For use by JS_CAST_STRING_TO only. */
-template <size_t N>
-inline int CheckIsCharacterLiteral(const char (&arr)[N]);
-
-/* NEVER DEFINED, DON'T USE.  For use by JS_CAST_INT32_TO only. */
-inline int CheckIsInt32(int32_t value);
-
-}  // namespace detail
-}  // namespace JS
-
-#define JS_CAST_STRING_TO(s, To)                                      \
-  (static_cast<void>(sizeof(JS::detail::CheckIsCharacterLiteral(s))), \
-   reinterpret_cast<To>(s))
-
-#define JS_CAST_INT32_TO(s, To)                            \
-  (static_cast<void>(sizeof(JS::detail::CheckIsInt32(s))), \
-   reinterpret_cast<To>(s))
-
-#define JS_CHECK_ACCESSOR_FLAGS(flags)                                         \
-  (static_cast<std::enable_if<((flags) & ~(JSPROP_ENUMERATE |                  \
-                                           JSPROP_PERMANENT)) == 0>::type>(0), \
-   (flags))
-
-#define JS_PS_ACCESSOR_SPEC(name, getter, setter, flags, extraFlags) \
-  {                                                                  \
-    name, uint8_t(JS_CHECK_ACCESSOR_FLAGS(flags) | extraFlags), {    \
-      { getter, setter }                                             \
-    }                                                                \
-  }
-#define JS_PS_VALUE_SPEC(name, value, flags)          \
-  {                                                   \
-    name, uint8_t(flags | JSPROP_INTERNAL_USE_BIT), { \
-      { value, JSNATIVE_WRAPPER(nullptr) }            \
-    }                                                 \
-  }
-
-#define SELFHOSTED_WRAPPER(name)                           \
-  {                                                        \
-    { nullptr, JS_CAST_STRING_TO(name, const JSJitInfo*) } \
-  }
-#define STRINGVALUE_WRAPPER(value)                   \
-  {                                                  \
-    {                                                \
-      reinterpret_cast<JSNative>(JSVAL_TYPE_STRING), \
-          JS_CAST_STRING_TO(value, const JSJitInfo*) \
-    }                                                \
-  }
-#define INT32VALUE_WRAPPER(value)                   \
-  {                                                 \
-    {                                               \
-      reinterpret_cast<JSNative>(JSVAL_TYPE_INT32), \
-          JS_CAST_INT32_TO(value, const JSJitInfo*) \
-    }                                               \
-  }
-
-/*
- * JSPropertySpec uses JSNativeWrapper.  These macros encapsulate the definition
- * of JSNative-backed JSPropertySpecs, by defining the JSNativeWrappers for
- * them.
- */
-#define JS_PSG(name, getter, flags)                   \
-  JS_PS_ACCESSOR_SPEC(name, JSNATIVE_WRAPPER(getter), \
-                      JSNATIVE_WRAPPER(nullptr), flags, 0)
-#define JS_PSGS(name, getter, setter, flags)          \
-  JS_PS_ACCESSOR_SPEC(name, JSNATIVE_WRAPPER(getter), \
-                      JSNATIVE_WRAPPER(setter), flags, 0)
-#define JS_SYM_GET(symbol, getter, flags)                                    \
-  JS_PS_ACCESSOR_SPEC(                                                       \
-      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
-      JSNATIVE_WRAPPER(getter), JSNATIVE_WRAPPER(nullptr), flags, 0)
-#define JS_SELF_HOSTED_GET(name, getterName, flags)         \
-  JS_PS_ACCESSOR_SPEC(name, SELFHOSTED_WRAPPER(getterName), \
-                      JSNATIVE_WRAPPER(nullptr), flags, JSPROP_GETTER)
-#define JS_SELF_HOSTED_GETSET(name, getterName, setterName, flags) \
-  JS_PS_ACCESSOR_SPEC(name, SELFHOSTED_WRAPPER(getterName),        \
-                      SELFHOSTED_WRAPPER(setterName), flags,       \
-                      JSPROP_GETTER | JSPROP_SETTER)
-#define JS_SELF_HOSTED_SYM_GET(symbol, getterName, flags)                    \
-  JS_PS_ACCESSOR_SPEC(                                                       \
-      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
-      SELFHOSTED_WRAPPER(getterName), JSNATIVE_WRAPPER(nullptr), flags,      \
-      JSPROP_GETTER)
-#define JS_STRING_PS(name, string, flags) \
-  JS_PS_VALUE_SPEC(name, STRINGVALUE_WRAPPER(string), flags)
-#define JS_STRING_SYM_PS(symbol, string, flags)                              \
-  JS_PS_VALUE_SPEC(                                                          \
-      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
-      STRINGVALUE_WRAPPER(string), flags)
-#define JS_INT32_PS(name, value, flags) \
-  JS_PS_VALUE_SPEC(name, INT32VALUE_WRAPPER(value), flags)
-#define JS_PS_END                                         \
-  JS_PS_ACCESSOR_SPEC(nullptr, JSNATIVE_WRAPPER(nullptr), \
-                      JSNATIVE_WRAPPER(nullptr), 0, 0)
-
-/**
- * To define a native function, set call to a JSNativeWrapper. To define a
- * self-hosted function, set selfHostedName to the name of a function
- * compiled during JSRuntime::initSelfHosting.
- */
-struct JSFunctionSpec {
-  const char* name;
-  JSNativeWrapper call;
-  uint16_t nargs;
-  uint16_t flags;
-  const char* selfHostedName;
-};
-
-/*
- * Terminating sentinel initializer to put at the end of a JSFunctionSpec array
- * that's passed to JS_DefineFunctions or JS_InitClass.
- */
-#define JS_FS_END JS_FN(nullptr, nullptr, 0, 0)
-
-/*
- * Initializer macros for a JSFunctionSpec array element. JS_FNINFO allows the
- * simple adding of JSJitInfos. JS_SELF_HOSTED_FN declares a self-hosted
- * function. JS_INLINABLE_FN allows specifying an InlinableNative enum value for
- * natives inlined or specialized by the JIT. Finally JS_FNSPEC has slots for
- * all the fields.
- *
- * The _SYM variants allow defining a function with a symbol key rather than a
- * string key. For example, use JS_SYM_FN(iterator, ...) to define an
- * @@iterator method.
- */
-#define JS_FN(name, call, nargs, flags) \
-  JS_FNSPEC(name, call, nullptr, nargs, flags, nullptr)
-#define JS_INLINABLE_FN(name, call, nargs, flags, native) \
-  JS_FNSPEC(name, call, &js::jit::JitInfo_##native, nargs, flags, nullptr)
-#define JS_SYM_FN(symbol, call, nargs, flags) \
-  JS_SYM_FNSPEC(symbol, call, nullptr, nargs, flags, nullptr)
-#define JS_FNINFO(name, call, info, nargs, flags) \
-  JS_FNSPEC(name, call, info, nargs, flags, nullptr)
-#define JS_SELF_HOSTED_FN(name, selfHostedName, nargs, flags) \
-  JS_FNSPEC(name, nullptr, nullptr, nargs, flags, selfHostedName)
-#define JS_SELF_HOSTED_SYM_FN(symbol, selfHostedName, nargs, flags) \
-  JS_SYM_FNSPEC(symbol, nullptr, nullptr, nargs, flags, selfHostedName)
-#define JS_SYM_FNSPEC(symbol, call, info, nargs, flags, selfHostedName)      \
-  JS_FNSPEC(                                                                 \
-      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
-      call, info, nargs, flags, selfHostedName)
-#define JS_FNSPEC(name, call, info, nargs, flags, selfHostedName) \
-  { name, {call, info}, nargs, flags, selfHostedName }
-
-#endif  // js_PropertySpec_h
--- a/js/rust/build.rs
+++ b/js/rust/build.rs
@@ -382,29 +382,29 @@ const WHITELIST_FUNCTIONS: &'static [&'s
     "JS::NewPromiseObject",
     "JS_NewStringCopyN",
     "JS_NewUCStringCopyN",
     "JS_NewUint16Array",
     "JS_NewUint32Array",
     "JS_NewUint8Array",
     "JS_NewUint8ClampedArray",
     "js::ObjectClassName",
-    "JS::ObjectIsDate",
+    "JS_ObjectIsDate",
     "JS_ParseJSON",
     "JS_ReadBytes",
     "JS_ReadStructuredClone",
     "JS_ReadUint32Pair",
     "JS_RemoveExtraGCRootsTracer",
     "js::RemoveRawValueRoot",
     "JS_ReportErrorASCII",
     "JS_ReportErrorNumberUTF8",
     "JS_RequestInterruptCallback",
     "JS_ResolveStandardClass",
     "js::RunJobs",
-    "JS::SameValue",
+    "JS_SameValue",
     "js::SetDOMCallbacks",
     "js::SetDOMProxyInformation",
     "JS::SetEnqueuePromiseJobCallback",
     "js::SetFunctionNativeReserved",
     "JS_SetGCCallback",
     "JS::SetGCSliceCallback",
     "JS_SetGCParameter",
     "JS_SetGCZeal",
--- a/js/rust/etc/wrapper.hpp
+++ b/js/rust/etc/wrapper.hpp
@@ -11,20 +11,18 @@
 
 typedef uint32_t HashNumber;
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/CompileOptions.h"
 #include "js/Conversions.h"
-#include "js/Date.h"
 #include "js/Initialization.h"
 #include "js/MemoryMetrics.h"
-#include "js/PropertySpec.h"
 #include "js/SourceText.h"
 #include "js/StructuredClone.h"
 
 // Replacements for types that are too difficult for rust-bindgen.
 
 /// <div rustbindgen replaces="JS::detail::MaybeWrapped" />
 template <typename T>
 using replaces_MaybeWrapped = T;
--- a/js/src/builtin/Array.cpp
+++ b/js/src/builtin/Array.cpp
@@ -20,17 +20,16 @@
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "ds/Sort.h"
 #include "gc/Heap.h"
 #include "jit/InlinableNatives.h"
 #include "js/Class.h"
 #include "js/Conversions.h"
-#include "js/PropertySpec.h"
 #include "util/StringBuffer.h"
 #include "util/Text.h"
 #include "vm/ArgumentsObject.h"
 #include "vm/Interpreter.h"
 #include "vm/Iteration.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
 #include "vm/JSFunction.h"
--- a/js/src/builtin/AtomicsObject.cpp
+++ b/js/src/builtin/AtomicsObject.cpp
@@ -56,17 +56,16 @@
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "jsnum.h"
 
 #include "jit/AtomicOperations.h"
 #include "jit/InlinableNatives.h"
 #include "js/Class.h"
-#include "js/PropertySpec.h"
 #include "vm/GlobalObject.h"
 #include "vm/Time.h"
 #include "vm/TypedArrayObject.h"
 #include "wasm/WasmInstance.h"
 
 #include "vm/JSObject-inl.h"
 
 using namespace js;
--- a/js/src/builtin/BigInt.cpp
+++ b/js/src/builtin/BigInt.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/BigInt.h"
 
 #include "jsapi.h"
 
 #include "builtin/TypedObject.h"
 #include "gc/Tracer.h"
-#include "js/PropertySpec.h"
 #include "js/TracingAPI.h"
 #include "vm/ArrayBufferObject.h"
 #include "vm/BigIntType.h"
 #include "vm/SelfHosting.h"
 #include "vm/TaggedProto.h"
 
 #include "vm/JSObject-inl.h"
 
--- a/js/src/builtin/Boolean.cpp
+++ b/js/src/builtin/Boolean.cpp
@@ -9,17 +9,16 @@
  */
 
 #include "builtin/Boolean-inl.h"
 
 #include "jsapi.h"
 #include "jstypes.h"
 
 #include "jit/InlinableNatives.h"
-#include "js/PropertySpec.h"
 #include "util/StringBuffer.h"
 #ifdef ENABLE_BIGINT
 #include "vm/BigIntType.h"
 #endif
 #include "vm/GlobalObject.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
--- a/js/src/builtin/DataViewObject.cpp
+++ b/js/src/builtin/DataViewObject.cpp
@@ -13,17 +13,16 @@
 #include <string.h>
 
 #include "jsapi.h"
 #include "jsnum.h"
 
 #include "builtin/Array.h"
 #include "jit/AtomicOperations.h"
 #include "js/Conversions.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "util/Windows.h"
 #include "vm/ArrayBufferObject.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/SharedMem.h"
--- a/js/src/builtin/JSON.cpp
+++ b/js/src/builtin/JSON.cpp
@@ -14,17 +14,16 @@
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "builtin/Array.h"
 #ifdef ENABLE_BIGINT
 #include "builtin/BigInt.h"
 #endif
 #include "builtin/String.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "util/StringBuffer.h"
 #include "vm/Interpreter.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/JSONParser.h"
 
--- a/js/src/builtin/MapObject.cpp
+++ b/js/src/builtin/MapObject.cpp
@@ -3,19 +3,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/MapObject.h"
 
 #include "ds/OrderedHashTable.h"
 #include "gc/FreeOp.h"
-#include "js/PropertySpec.h"
 #include "js/Utility.h"
-#include "vm/EqualityOperations.h"  // js::SameValue
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/Iteration.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/SelfHosting.h"
 #include "vm/SymbolType.h"
 
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -10,20 +10,18 @@
 
 #include "builtin/Promise.h"
 #include "builtin/SelfHostingDefines.h"
 #include "frontend/ParseNode.h"
 #include "frontend/SharedContext.h"
 #include "gc/FreeOp.h"
 #include "gc/Policy.h"
 #include "gc/Tracer.h"
-#include "js/PropertySpec.h"
 #include "vm/AsyncFunction.h"
 #include "vm/AsyncIteration.h"
-#include "vm/EqualityOperations.h"  // js::SameValue
 #include "vm/SelfHosting.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/JSScript-inl.h"
 
 using namespace js;
 
 static_assert(MODULE_STATUS_UNINSTANTIATED < MODULE_STATUS_INSTANTIATING &&
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -11,21 +11,19 @@
 #ifdef ENABLE_BIGINT
 #include "builtin/BigInt.h"
 #endif
 #include "builtin/Eval.h"
 #include "builtin/SelfHostingDefines.h"
 #include "builtin/String.h"
 #include "frontend/BytecodeCompiler.h"
 #include "jit/InlinableNatives.h"
-#include "js/PropertySpec.h"
 #include "js/UniquePtr.h"
 #include "util/StringBuffer.h"
 #include "vm/AsyncFunction.h"
-#include "vm/EqualityOperations.h"  // js::SameValue
 #include "vm/JSContext.h"
 #include "vm/RegExpObject.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 #include "vm/Shape-inl.h"
 #include "vm/UnboxedObject-inl.h"
 
--- a/js/src/builtin/Profilers.cpp
+++ b/js/src/builtin/Profilers.cpp
@@ -24,17 +24,16 @@
 #endif
 
 #ifdef XP_WIN
 #include <process.h>
 #define getpid _getpid
 #endif
 
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/Utility.h"
 #include "util/Text.h"
 #include "vm/Probes.h"
 
 #include "vm/JSContext-inl.h"
 
 using namespace js;
 
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -10,17 +10,16 @@
 #include "mozilla/Maybe.h"
 #include "mozilla/TimeStamp.h"
 
 #include "jsexn.h"
 #include "jsfriendapi.h"
 
 #include "gc/Heap.h"
 #include "js/Debug.h"
-#include "js/PropertySpec.h"
 #include "vm/AsyncFunction.h"
 #include "vm/AsyncIteration.h"
 #include "vm/Debugger.h"
 #include "vm/Iteration.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/SelfHosting.h"
 
--- a/js/src/builtin/Reflect.cpp
+++ b/js/src/builtin/Reflect.cpp
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/Reflect.h"
 
 #include "builtin/Array.h"
 
 #include "jit/InlinableNatives.h"
-#include "js/PropertySpec.h"
 #include "vm/ArgumentsObject.h"
 #include "vm/JSContext.h"
 #include "vm/Stack.h"
 
 #include "vm/Interpreter-inl.h"
 
 using namespace js;
 
--- a/js/src/builtin/RegExp.cpp
+++ b/js/src/builtin/RegExp.cpp
@@ -7,17 +7,16 @@
 #include "builtin/RegExp.h"
 
 #include "mozilla/CheckedInt.h"
 #include "mozilla/TypeTraits.h"
 
 #include "frontend/TokenStream.h"
 #include "irregexp/RegExpParser.h"
 #include "jit/InlinableNatives.h"
-#include "js/PropertySpec.h"
 #include "util/StringBuffer.h"
 #include "util/Unicode.h"
 #include "vm/JSContext.h"
 #include "vm/RegExpStatics.h"
 #include "vm/SelfHosting.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
--- a/js/src/builtin/Stream.cpp
+++ b/js/src/builtin/Stream.cpp
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/Stream.h"
 
 #include "js/Stream.h"
 
 #include "gc/Heap.h"
-#include "js/PropertySpec.h"
 #include "vm/Interpreter.h"
 #include "vm/JSContext.h"
 #include "vm/SelfHosting.h"
 
 #include "vm/Compartment-inl.h"
 #include "vm/List-inl.h"
 #include "vm/NativeObject-inl.h"
 
--- a/js/src/builtin/String.cpp
+++ b/js/src/builtin/String.cpp
@@ -29,17 +29,16 @@
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/RegExp.h"
 #include "jit/InlinableNatives.h"
 #include "js/Conversions.h"
 #if !EXPOSE_INTL_API
 #include "js/LocaleSensitive.h"
 #endif
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "js/UniquePtr.h"
 #if ENABLE_INTL_API
 #include "unicode/uchar.h"
 #include "unicode/unorm2.h"
 #endif
 #include "util/StringBuffer.h"
 #include "util/Unicode.h"
--- a/js/src/builtin/Symbol.cpp
+++ b/js/src/builtin/Symbol.cpp
@@ -2,17 +2,16 @@
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/Symbol.h"
 
 #include "js/Symbol.h"
-#include "js/PropertySpec.h"
 #include "util/StringBuffer.h"
 #include "vm/SymbolType.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 
 using JS::Symbol;
 using namespace js;
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -42,17 +42,16 @@
 #include "jit/InlinableNatives.h"
 #include "jit/JitRealm.h"
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/CompileOptions.h"
 #include "js/Debug.h"
 #include "js/HashTable.h"
 #include "js/LocaleSensitive.h"
-#include "js/PropertySpec.h"
 #include "js/SourceText.h"
 #include "js/StableStringChars.h"
 #include "js/StructuredClone.h"
 #include "js/UbiNode.h"
 #include "js/UbiNodeBreadthFirst.h"
 #include "js/UbiNodeShortestPaths.h"
 #include "js/UniquePtr.h"
 #include "js/Vector.h"
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -8,17 +8,16 @@
 
 #include "mozilla/Casting.h"
 #include "mozilla/CheckedInt.h"
 
 #include "jsutil.h"
 
 #include "gc/Marking.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/Vector.h"
 #include "util/StringBuffer.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSFunction.h"
 #include "vm/Realm.h"
 #include "vm/SelfHosting.h"
 #include "vm/StringType.h"
 #include "vm/TypedArrayObject.h"
--- a/js/src/builtin/WeakMapObject.cpp
+++ b/js/src/builtin/WeakMapObject.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/WeakMapObject-inl.h"
 
 #include "jsapi.h"
 
 #include "builtin/WeakSetObject.h"
 #include "gc/FreeOp.h"
-#include "js/PropertySpec.h"
 #include "vm/JSContext.h"
 #include "vm/SelfHosting.h"
 
 #include "vm/Interpreter-inl.h"
 
 using namespace js;
 
 /* static */ MOZ_ALWAYS_INLINE bool WeakMapObject::is(HandleValue v) {
--- a/js/src/builtin/WeakSetObject.cpp
+++ b/js/src/builtin/WeakSetObject.cpp
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "builtin/WeakSetObject.h"
 
 #include "jsapi.h"
 
 #include "builtin/MapObject.h"
-#include "js/PropertySpec.h"
 #include "vm/GlobalObject.h"
 #include "vm/Iteration.h"
 #include "vm/JSContext.h"
 #include "vm/SelfHosting.h"
 
 #include "builtin/WeakMapObject-inl.h"
 #include "vm/Interpreter-inl.h"
 #include "vm/JSObject-inl.h"
--- a/js/src/builtin/intl/Collator.cpp
+++ b/js/src/builtin/intl/Collator.cpp
@@ -13,17 +13,16 @@
 #include "jsapi.h"
 
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/intl/ScopedICUObject.h"
 #include "builtin/intl/SharedIntlData.h"
 #include "gc/FreeOp.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "js/TypeDecls.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/Runtime.h"
 #include "vm/StringType.h"
 
 #include "vm/JSObject-inl.h"
--- a/js/src/builtin/intl/DateTimeFormat.cpp
+++ b/js/src/builtin/intl/DateTimeFormat.cpp
@@ -15,17 +15,16 @@
 
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/intl/ScopedICUObject.h"
 #include "builtin/intl/SharedIntlData.h"
 #include "builtin/intl/TimeZoneDataGenerated.h"
 #include "gc/FreeOp.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "vm/DateTime.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/Runtime.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
--- a/js/src/builtin/intl/IntlObject.cpp
+++ b/js/src/builtin/intl/IntlObject.cpp
@@ -19,17 +19,16 @@
 #include "builtin/intl/DateTimeFormat.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/intl/NumberFormat.h"
 #include "builtin/intl/PluralRules.h"
 #include "builtin/intl/RelativeTimeFormat.h"
 #include "builtin/intl/ScopedICUObject.h"
 #include "js/CharacterEncoding.h"
 #include "js/Class.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/StringType.h"
 
 #include "vm/JSObject-inl.h"
 
--- a/js/src/builtin/intl/NumberFormat.cpp
+++ b/js/src/builtin/intl/NumberFormat.cpp
@@ -16,17 +16,16 @@
 #include <stdint.h>
 
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/intl/ScopedICUObject.h"
 #include "ds/Sort.h"
 #include "gc/FreeOp.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/RootingAPI.h"
 #include "js/StableStringChars.h"
 #include "js/TypeDecls.h"
 #include "vm/JSContext.h"
 #include "vm/SelfHosting.h"
 #include "vm/Stack.h"
 
 #include "vm/JSObject-inl.h"
--- a/js/src/builtin/intl/PluralRules.cpp
+++ b/js/src/builtin/intl/PluralRules.cpp
@@ -11,17 +11,16 @@
 #include "mozilla/Assertions.h"
 #include "mozilla/Casting.h"
 
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/intl/ScopedICUObject.h"
 #include "gc/FreeOp.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/StringType.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 
 using namespace js;
--- a/js/src/builtin/intl/RelativeTimeFormat.cpp
+++ b/js/src/builtin/intl/RelativeTimeFormat.cpp
@@ -11,17 +11,16 @@
 #include "mozilla/Assertions.h"
 #include "mozilla/FloatingPoint.h"
 
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/ICUStubs.h"
 #include "builtin/intl/ScopedICUObject.h"
 #include "gc/FreeOp.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 
 #include "vm/NativeObject-inl.h"
 
 using namespace js;
 
 using mozilla::IsNegativeZero;
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -35,17 +35,16 @@
 #include "jsnum.h"
 
 #include "builtin/TypedObject.h"
 #include "ctypes/Library.h"
 #include "gc/FreeOp.h"
 #include "gc/Policy.h"
 #include "jit/AtomicOperations.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "js/UniquePtr.h"
 #include "js/Utility.h"
 #include "js/Vector.h"
 #include "util/Unicode.h"
 #include "util/Windows.h"
 #include "vm/JSContext.h"
 #include "vm/JSFunction.h"
--- a/js/src/ctypes/Library.cpp
+++ b/js/src/ctypes/Library.cpp
@@ -7,17 +7,16 @@
 #include "ctypes/Library.h"
 
 #include "prerror.h"
 #include "prlink.h"
 
 #include "ctypes/CTypes.h"
 #include "js/CharacterEncoding.h"
 #include "js/MemoryFunctions.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 
 using JS::AutoStableStringChars;
 
 namespace js {
 namespace ctypes {
 
 /*******************************************************************************
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -42,17 +42,16 @@
 #include "jit/MoveEmitter.h"
 #include "jit/RangeAnalysis.h"
 #include "jit/SharedICHelpers.h"
 #include "jit/StackSlotAllocator.h"
 #include "jit/VMFunctions.h"
 #include "util/Unicode.h"
 #include "vm/AsyncFunction.h"
 #include "vm/AsyncIteration.h"
-#include "vm/EqualityOperations.h"  // js::SameValue
 #include "vm/MatchPairs.h"
 #include "vm/RegExpObject.h"
 #include "vm/RegExpStatics.h"
 #include "vm/StringType.h"
 #include "vm/TraceLogging.h"
 #include "vm/TypedArrayObject.h"
 #include "vtune/VTuneWrapper.h"
 #include "wasm/WasmStubs.h"
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -12,17 +12,16 @@
 #include "jit/arm/Simulator-arm.h"
 #include "jit/BaselineIC.h"
 #include "jit/JitFrames.h"
 #include "jit/JitRealm.h"
 #include "jit/mips32/Simulator-mips32.h"
 #include "jit/mips64/Simulator-mips64.h"
 #include "vm/ArrayObject.h"
 #include "vm/Debugger.h"
-#include "vm/EqualityOperations.h"  // js::StrictlyEqual
 #include "vm/Interpreter.h"
 #include "vm/SelfHosting.h"
 #include "vm/TraceLogging.h"
 
 #include "jit/BaselineFrame-inl.h"
 #include "jit/JitFrames-inl.h"
 #include "vm/Debugger-inl.h"
 #include "vm/Interpreter-inl.h"
--- a/js/src/jsapi-tests/testExecuteInJSMEnvironment.cpp
+++ b/js/src/jsapi-tests/testExecuteInJSMEnvironment.cpp
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "js/CompilationAndEvaluation.h"
-#include "js/PropertySpec.h"
 #include "jsapi-tests/tests.h"
 #include "vm/EnvironmentObject.h"
 #include "vm/EnvironmentObject-inl.h"
 
 BEGIN_TEST(testExecuteInJSMEnvironment_Basic) {
   static const char src[] =
       "var output = input;\n"
       "\n"
--- a/js/src/jsapi-tests/testGetPropertyDescriptor.cpp
+++ b/js/src/jsapi-tests/testGetPropertyDescriptor.cpp
@@ -1,13 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "js/PropertyDescriptor.h"  // JS::FromPropertyDescriptor
 #include "jsapi-tests/tests.h"
 
 BEGIN_TEST(test_GetPropertyDescriptor) {
   JS::RootedValue v(cx);
   EVAL("({ somename : 123 })", &v);
   CHECK(v.isObject());
 
   JS::RootedObject obj(cx, &v.toObject());
--- a/js/src/jsapi-tests/testLooselyEqual.cpp
+++ b/js/src/jsapi-tests/testLooselyEqual.cpp
@@ -1,34 +1,33 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <limits>
 #include <math.h>
 
-#include "js/Equality.h"  // JS::LooselyEqual
 #include "jsapi-tests/tests.h"
 
 using namespace std;
 
 struct LooseEqualityFixture : public JSAPITest {
   virtual ~LooseEqualityFixture() {}
 
   bool leq(JS::HandleValue x, JS::HandleValue y) {
     bool equal;
-    CHECK(JS::LooselyEqual(cx, x, y, &equal) && equal);
-    CHECK(JS::LooselyEqual(cx, y, x, &equal) && equal);
+    CHECK(JS_LooselyEqual(cx, x, y, &equal) && equal);
+    CHECK(JS_LooselyEqual(cx, y, x, &equal) && equal);
     return true;
   }
 
   bool nleq(JS::HandleValue x, JS::HandleValue y) {
     bool equal;
-    CHECK(JS::LooselyEqual(cx, x, y, &equal) && !equal);
-    CHECK(JS::LooselyEqual(cx, y, x, &equal) && !equal);
+    CHECK(JS_LooselyEqual(cx, x, y, &equal) && !equal);
+    CHECK(JS_LooselyEqual(cx, y, x, &equal) && !equal);
     return true;
   }
 };
 
 struct LooseEqualityData {
   JS::RootedValue qNaN;
   JS::RootedValue sNaN;
   JS::RootedValue d42;
--- a/js/src/jsapi-tests/testProfileStrings.cpp
+++ b/js/src/jsapi-tests/testProfileStrings.cpp
@@ -4,17 +4,16 @@
  * Tests the stack-based instrumentation profiler on a JSRuntime
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Atomics.h"
 
-#include "js/PropertySpec.h"
 #include "jsapi-tests/tests.h"
 #include "vm/JSContext.h"
 
 static ProfilingStack profilingStack;
 static uint32_t peakStackPointer = 0;
 
 static void reset(JSContext* cx) {
   profilingStack.stackPointer = 0;
--- a/js/src/jsapi-tests/testSameValue.cpp
+++ b/js/src/jsapi-tests/testSameValue.cpp
@@ -1,26 +1,25 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "js/Equality.h"  // JS::SameValue
 #include "jsapi-tests/tests.h"
 
 BEGIN_TEST(testSameValue) {
   /*
    * NB: passing a double that fits in an integer jsval is API misuse.  As a
-   * matter of defense in depth, however, JS::SameValue should return the
+   * matter of defense in depth, however, JS_SameValue should return the
    * correct result comparing a positive-zero double to a negative-zero
    * double, and this is believed to be the only way to make such a
    * comparison possible.
    */
   JS::RootedValue v1(cx, JS::DoubleValue(0.0));
   JS::RootedValue v2(cx, JS::DoubleValue(-0.0));
   bool same;
-  CHECK(JS::SameValue(cx, v1, v2, &same));
+  CHECK(JS_SameValue(cx, v1, v2, &same));
   CHECK(!same);
   return true;
 }
 END_TEST(testSameValue)
--- a/js/src/jsapi-tests/testXDR.cpp
+++ b/js/src/jsapi-tests/testXDR.cpp
@@ -2,17 +2,16 @@
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jsfriendapi.h"
 #include "builtin/String.h"
 
-#include "js/BuildId.h"  // JS::BuildIdCharVector, JS::SetProcessBuildIdOp
 #include "js/CompilationAndEvaluation.h"
 #include "js/Transcoding.h"
 #include "jsapi-tests/tests.h"
 #include "vm/JSScript.h"
 
 #include "vm/JSScript-inl.h"
 
 static bool GetBuildId(JS::BuildIdCharVector* buildId) {
--- a/js/src/jsapi-tests/tests.h
+++ b/js/src/jsapi-tests/tests.h
@@ -14,17 +14,16 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "gc/GC.h"
 #include "js/AllocPolicy.h"
 #include "js/CharacterEncoding.h"
-#include "js/Equality.h"  // JS::SameValue
 #include "js/Vector.h"
 #include "vm/JSContext.h"
 
 /* Note: Aborts on OOM. */
 class JSAPITestString {
   js::Vector<char, 0, js::SystemAllocPolicy> chars;
 
  public:
@@ -204,22 +203,22 @@ class JSAPITest {
     if (!checkNull(actual, #actual, __FILE__, __LINE__)) return false; \
   } while (false)
 
   bool checkSame(const JS::Value& actualArg, const JS::Value& expectedArg,
                  const char* actualExpr, const char* expectedExpr,
                  const char* filename, int lineno) {
     bool same;
     JS::RootedValue actual(cx, actualArg), expected(cx, expectedArg);
-    return (JS::SameValue(cx, actual, expected, &same) && same) ||
+    return (JS_SameValue(cx, actual, expected, &same) && same) ||
            fail(JSAPITestString(
-                    "CHECK_SAME failed: expected JS::SameValue(cx, ") +
+                    "CHECK_SAME failed: expected JS_SameValue(cx, ") +
                     actualExpr + ", " + expectedExpr +
-                    "), got !JS::SameValue(cx, " + jsvalToSource(actual) +
-                    ", " + jsvalToSource(expected) + ")",
+                    "), got !JS_SameValue(cx, " + jsvalToSource(actual) + ", " +
+                    jsvalToSource(expected) + ")",
                 filename, lineno);
   }
 
 #define CHECK_SAME(actual, expected)                                          \
   do {                                                                        \
     if (!checkSame(actual, expected, #actual, #expected, __FILE__, __LINE__)) \
       return false;                                                           \
   } while (false)
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -56,17 +56,16 @@
 #include "js/CompilationAndEvaluation.h"
 #include "js/CompileOptions.h"
 #include "js/Conversions.h"
 #include "js/Date.h"
 #include "js/Initialization.h"
 #include "js/JSON.h"
 #include "js/LocaleSensitive.h"
 #include "js/MemoryFunctions.h"
-#include "js/PropertySpec.h"
 #include "js/Proxy.h"
 #include "js/SliceBudget.h"
 #include "js/SourceText.h"
 #include "js/StableStringChars.h"
 #include "js/StructuredClone.h"
 #include "js/Symbol.h"
 #include "js/Utility.h"
 #include "js/Wrapper.h"
@@ -355,16 +354,43 @@ JS_PUBLIC_API bool JS_DoubleIsInt32(doub
 
 JS_PUBLIC_API JSType JS_TypeOfValue(JSContext* cx, HandleValue value) {
   AssertHeapIsIdle();
   CHECK_THREAD(cx);
   cx->check(value);
   return TypeOfValue(value);
 }
 
+JS_PUBLIC_API bool JS_StrictlyEqual(JSContext* cx, HandleValue value1,
+                                    HandleValue value2, bool* equal) {
+  AssertHeapIsIdle();
+  CHECK_THREAD(cx);
+  cx->check(value1, value2);
+  MOZ_ASSERT(equal);
+  return StrictlyEqual(cx, value1, value2, equal);
+}
+
+JS_PUBLIC_API bool JS_LooselyEqual(JSContext* cx, HandleValue value1,
+                                   HandleValue value2, bool* equal) {
+  AssertHeapIsIdle();
+  CHECK_THREAD(cx);
+  cx->check(value1, value2);
+  MOZ_ASSERT(equal);
+  return LooselyEqual(cx, value1, value2, equal);
+}
+
+JS_PUBLIC_API bool JS_SameValue(JSContext* cx, HandleValue value1,
+                                HandleValue value2, bool* same) {
+  AssertHeapIsIdle();
+  CHECK_THREAD(cx);
+  cx->check(value1, value2);
+  MOZ_ASSERT(same);
+  return SameValue(cx, value1, value2, same);
+}
+
 JS_PUBLIC_API bool JS_IsBuiltinEvalFunction(JSFunction* fun) {
   return IsAnyBuiltinEval(fun);
 }
 
 JS_PUBLIC_API bool JS_IsBuiltinFunctionConstructor(JSFunction* fun) {
   return fun->isBuiltinFunctionConstructor();
 }
 
@@ -4137,16 +4163,21 @@ JS_PUBLIC_API void JS::InitDispatchToEve
     JSContext* cx, JS::DispatchToEventLoopCallback callback, void* closure) {
   cx->runtime()->offThreadPromiseState.ref().init(callback, closure);
 }
 
 JS_PUBLIC_API void JS::ShutdownAsyncTasks(JSContext* cx) {
   cx->runtime()->offThreadPromiseState.ref().shutdown(cx);
 }
 
+JS_PUBLIC_API bool JS::GetOptimizedEncodingBuildId(
+    JS::BuildIdCharVector* buildId) {
+  return wasm::GetOptimizedEncodingBuildId(buildId);
+}
+
 JS_PUBLIC_API void JS::InitConsumeStreamCallback(
     JSContext* cx, ConsumeStreamCallback consume,
     ReportStreamErrorCallback report) {
   cx->runtime()->consumeStreamCallback = consume;
   cx->runtime()->reportStreamErrorCallback = report;
 }
 
 JS_PUBLIC_API void JS_RequestInterruptCallback(JSContext* cx) {
@@ -4966,16 +4997,47 @@ JS_PUBLIC_API JS::WarningReporter JS::Se
   WarningReporter older = cx->runtime()->warningReporter;
   cx->runtime()->warningReporter = reporter;
   return older;
 }
 
 /************************************************************************/
 
 /*
+ * Dates.
+ */
+JS_PUBLIC_API JSObject* JS_NewDateObject(JSContext* cx, int year, int mon,
+                                         int mday, int hour, int min, int sec) {
+  AssertHeapIsIdle();
+  CHECK_THREAD(cx);
+  return NewDateObject(cx, year, mon, mday, hour, min, sec);
+}
+
+JS_PUBLIC_API JSObject* JS::NewDateObject(JSContext* cx, JS::ClippedTime time) {
+  AssertHeapIsIdle();
+  CHECK_THREAD(cx);
+  return NewDateObjectMsec(cx, time);
+}
+
+JS_PUBLIC_API bool JS_ObjectIsDate(JSContext* cx, HandleObject obj,
+                                   bool* isDate) {
+  cx->check(obj);
+
+  ESClass cls;
+  if (!GetBuiltinClass(cx, obj, &cls)) {
+    return false;
+  }
+
+  *isDate = cls == ESClass::Date;
+  return true;
+}
+
+/************************************************************************/
+
+/*
  * Regular Expressions.
  */
 JS_PUBLIC_API JSObject* JS_NewRegExpObject(JSContext* cx, const char* bytes,
                                            size_t length, unsigned flags) {
   AssertHeapIsIdle();
   CHECK_THREAD(cx);
 
   UniqueTwoByteChars chars(InflateString(cx, bytes, length));
@@ -5982,16 +6044,20 @@ JS_PUBLIC_API bool JS::FinishIncremental
     return false;
   }
   if (!script->scriptSource()->xdrFinalizeEncoder(buffer)) {
     return false;
   }
   return true;
 }
 
+JS_PUBLIC_API void JS::SetProcessBuildIdOp(JS::BuildIdOp buildIdOp) {
+  GetBuildId = buildIdOp;
+}
+
 JS_PUBLIC_API void JS::SetAsmJSCacheOps(JSContext* cx,
                                         const JS::AsmJSCacheOps* ops) {
   cx->runtime()->asmJSCacheOps = *ops;
 }
 
 bool JS::IsWasmModuleObject(HandleObject obj) {
   JSObject* unwrapped = CheckedUnwrap(obj);
   if (!unwrapped) {
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -31,32 +31,29 @@
 #include "js/Class.h"
 #include "js/CompileOptions.h"
 #include "js/ErrorReport.h"
 #include "js/GCVector.h"
 #include "js/HashTable.h"
 #include "js/Id.h"
 #include "js/OffThreadScriptCompilation.h"
 #include "js/Principals.h"
-#include "js/PropertyDescriptor.h"
 #include "js/Realm.h"
 #include "js/RefCounted.h"
 #include "js/RootingAPI.h"
 #include "js/TracingAPI.h"
 #include "js/Transcoding.h"
 #include "js/UniquePtr.h"
 #include "js/Utility.h"
 #include "js/Value.h"
 #include "js/Vector.h"
 
 /************************************************************************/
 
 struct JSFreeOp;
-struct JSFunctionSpec;
-struct JSPropertySpec;
 
 namespace JS {
 
 template <typename UnitT>
 class SourceText;
 
 class TwoByteChars;
 
@@ -241,16 +238,80 @@ static MOZ_ALWAYS_INLINE JS::Value JS_Nu
 }
 
 /************************************************************************/
 
 JS_PUBLIC_API bool JS_StringHasBeenPinned(JSContext* cx, JSString* str);
 
 /************************************************************************/
 
+/* Property attributes, set in JSPropertySpec and passed to API functions.
+ *
+ * NB: The data structure in which some of these values are stored only uses
+ *     a uint8_t to store the relevant information. Proceed with caution if
+ *     trying to reorder or change the the first byte worth of flags.
+ */
+
+/* property is visible to for/in loop */
+static const uint8_t JSPROP_ENUMERATE = 0x01;
+
+/* not settable: assignment is no-op.  This flag is only valid when neither
+   JSPROP_GETTER nor JSPROP_SETTER is set. */
+static const uint8_t JSPROP_READONLY = 0x02;
+
+/* property cannot be deleted */
+static const uint8_t JSPROP_PERMANENT = 0x04;
+
+/* (0x08 is unused) */
+
+/* property holds getter function */
+static const uint8_t JSPROP_GETTER = 0x10;
+
+/* property holds setter function */
+static const uint8_t JSPROP_SETTER = 0x20;
+
+/* internal JS engine use only */
+static const uint8_t JSPROP_INTERNAL_USE_BIT = 0x80;
+
+/* native that can be called as a ctor */
+static const unsigned JSFUN_CONSTRUCTOR = 0x400;
+
+/* | of all the JSFUN_* flags */
+static const unsigned JSFUN_FLAGS_MASK = 0x400;
+
+/*
+ * Resolve hooks and enumerate hooks must pass this flag when calling
+ * JS_Define* APIs to reify lazily-defined properties.
+ *
+ * JSPROP_RESOLVING is used only with property-defining APIs. It tells the
+ * engine to skip the resolve hook when performing the lookup at the beginning
+ * of property definition. This keeps the resolve hook from accidentally
+ * triggering itself: unchecked recursion.
+ *
+ * For enumerate hooks, triggering the resolve hook would be merely silly, not
+ * fatal, except in some cases involving non-configurable properties.
+ */
+static const unsigned JSPROP_RESOLVING = 0x2000;
+
+/* ignore the value in JSPROP_ENUMERATE.  This flag only valid when defining
+   over an existing property. */
+static const unsigned JSPROP_IGNORE_ENUMERATE = 0x4000;
+
+/* ignore the value in JSPROP_READONLY.  This flag only valid when defining over
+   an existing property. */
+static const unsigned JSPROP_IGNORE_READONLY = 0x8000;
+
+/* ignore the value in JSPROP_PERMANENT.  This flag only valid when defining
+   over an existing property. */
+static const unsigned JSPROP_IGNORE_PERMANENT = 0x10000;
+
+/* ignore the Value in the descriptor. Nothing was specified when passed to
+   Object.defineProperty from script. */
+static const unsigned JSPROP_IGNORE_VALUE = 0x20000;
+
 /** Microseconds since the epoch, midnight, January 1, 1970 UTC. */
 extern JS_PUBLIC_API int64_t JS_Now(void);
 
 /** Don't want to export data, so provide accessors for non-inline Values. */
 extern JS_PUBLIC_API JS::Value JS_GetNaNValue(JSContext* cx);
 
 extern JS_PUBLIC_API JS::Value JS_GetNegativeInfinityValue(JSContext* cx);
 
@@ -278,16 +339,29 @@ extern JS_PUBLIC_API JSType JS_TypeOfVal
                                            JS::Handle<JS::Value> v);
 
 namespace JS {
 
 extern JS_PUBLIC_API const char* InformalValueTypeName(const JS::Value& v);
 
 } /* namespace JS */
 
+extern JS_PUBLIC_API bool JS_StrictlyEqual(JSContext* cx,
+                                           JS::Handle<JS::Value> v1,
+                                           JS::Handle<JS::Value> v2,
+                                           bool* equal);
+
+extern JS_PUBLIC_API bool JS_LooselyEqual(JSContext* cx,
+                                          JS::Handle<JS::Value> v1,
+                                          JS::Handle<JS::Value> v2,
+                                          bool* equal);
+
+extern JS_PUBLIC_API bool JS_SameValue(JSContext* cx, JS::Handle<JS::Value> v1,
+                                       JS::Handle<JS::Value> v2, bool* same);
+
 /** True iff fun is the global eval function. */
 extern JS_PUBLIC_API bool JS_IsBuiltinEvalFunction(JSFunction* fun);
 
 /** True iff fun is the Function constructor. */
 extern JS_PUBLIC_API bool JS_IsBuiltinFunctionConstructor(JSFunction* fun);
 
 /************************************************************************/
 
@@ -1073,18 +1147,260 @@ extern JS_PUBLIC_API bool GetFirstArgume
 } /* namespace JS */
 
 template <typename T>
 struct JSConstScalarSpec {
   const char* name;
   T val;
 };
 
-using JSConstDoubleSpec = JSConstScalarSpec<double>;
-using JSConstIntegerSpec = JSConstScalarSpec<int32_t>;
+typedef JSConstScalarSpec<double> JSConstDoubleSpec;
+typedef JSConstScalarSpec<int32_t> JSConstIntegerSpec;
+
+struct JSJitInfo;
+
+/**
+ * Wrapper to relace JSNative for JSPropertySpecs and JSFunctionSpecs. This will
+ * allow us to pass one JSJitInfo per function with the property/function spec,
+ * without additional field overhead.
+ */
+struct JSNativeWrapper {
+  JSNative op;
+  const JSJitInfo* info;
+};
+
+/*
+ * Macro static initializers which make it easy to pass no JSJitInfo as part of
+ * a JSPropertySpec or JSFunctionSpec.
+ */
+#define JSNATIVE_WRAPPER(native) \
+  {                              \
+    { native, nullptr }          \
+  }
+
+/**
+ * Description of a property. JS_DefineProperties and JS_InitClass take arrays
+ * of these and define many properties at once. JS_PSG, JS_PSGS and JS_PS_END
+ * are helper macros for defining such arrays.
+ */
+struct JSPropertySpec {
+  struct SelfHostedWrapper {
+    void* unused;
+    const char* funname;
+  };
+
+  struct ValueWrapper {
+    uintptr_t type;
+    union {
+      const char* string;
+      int32_t int32;
+    };
+  };
+
+  const char* name;
+  uint8_t flags;
+  union {
+    struct {
+      union {
+        JSNativeWrapper native;
+        SelfHostedWrapper selfHosted;
+      } getter;
+      union {
+        JSNativeWrapper native;
+        SelfHostedWrapper selfHosted;
+      } setter;
+    } accessors;
+    ValueWrapper value;
+  };
+
+  bool isAccessor() const { return !(flags & JSPROP_INTERNAL_USE_BIT); }
+  JS_PUBLIC_API bool getValue(JSContext* cx,
+                              JS::MutableHandleValue value) const;
+
+  bool isSelfHosted() const {
+    MOZ_ASSERT(isAccessor());
+
+#ifdef DEBUG
+    // Verify that our accessors match our JSPROP_GETTER flag.
+    if (flags & JSPROP_GETTER) {
+      checkAccessorsAreSelfHosted();
+    } else {
+      checkAccessorsAreNative();
+    }
+#endif
+    return (flags & JSPROP_GETTER);
+  }
+
+  static_assert(sizeof(SelfHostedWrapper) == sizeof(JSNativeWrapper),
+                "JSPropertySpec::getter/setter must be compact");
+  static_assert(offsetof(SelfHostedWrapper, funname) ==
+                    offsetof(JSNativeWrapper, info),
+                "JS_SELF_HOSTED* macros below require that "
+                "SelfHostedWrapper::funname overlay "
+                "JSNativeWrapper::info");
+
+ private:
+  void checkAccessorsAreNative() const {
+    // We may have a getter or a setter or both.  And whichever ones we have
+    // should not have a SelfHostedWrapper for the accessor.
+    MOZ_ASSERT_IF(accessors.getter.native.info, accessors.getter.native.op);
+    MOZ_ASSERT_IF(accessors.setter.native.info, accessors.setter.native.op);
+  }
+
+  void checkAccessorsAreSelfHosted() const {
+    MOZ_ASSERT(!accessors.getter.selfHosted.unused);
+    MOZ_ASSERT(!accessors.setter.selfHosted.unused);
+  }
+};
+
+namespace JS {
+namespace detail {
+
+/* NEVER DEFINED, DON'T USE.  For use by JS_CAST_STRING_TO only. */
+template <size_t N>
+inline int CheckIsCharacterLiteral(const char (&arr)[N]);
+
+/* NEVER DEFINED, DON'T USE.  For use by JS_CAST_INT32_TO only. */
+inline int CheckIsInt32(int32_t value);
+
+}  // namespace detail
+}  // namespace JS
+
+#define JS_CAST_STRING_TO(s, To)                                      \
+  (static_cast<void>(sizeof(JS::detail::CheckIsCharacterLiteral(s))), \
+   reinterpret_cast<To>(s))
+
+#define JS_CAST_INT32_TO(s, To)                            \
+  (static_cast<void>(sizeof(JS::detail::CheckIsInt32(s))), \
+   reinterpret_cast<To>(s))
+
+#define JS_CHECK_ACCESSOR_FLAGS(flags)                                     \
+  (static_cast<mozilla::EnableIf<                                          \
+       ((flags) & ~(JSPROP_ENUMERATE | JSPROP_PERMANENT)) == 0>::Type>(0), \
+   (flags))
+
+#define JS_PS_ACCESSOR_SPEC(name, getter, setter, flags, extraFlags) \
+  {                                                                  \
+    name, uint8_t(JS_CHECK_ACCESSOR_FLAGS(flags) | extraFlags), {    \
+      { getter, setter }                                             \
+    }                                                                \
+  }
+#define JS_PS_VALUE_SPEC(name, value, flags)          \
+  {                                                   \
+    name, uint8_t(flags | JSPROP_INTERNAL_USE_BIT), { \
+      { value, JSNATIVE_WRAPPER(nullptr) }            \
+    }                                                 \
+  }
+
+#define SELFHOSTED_WRAPPER(name)                           \
+  {                                                        \
+    { nullptr, JS_CAST_STRING_TO(name, const JSJitInfo*) } \
+  }
+#define STRINGVALUE_WRAPPER(value)                   \
+  {                                                  \
+    {                                                \
+      reinterpret_cast<JSNative>(JSVAL_TYPE_STRING), \
+          JS_CAST_STRING_TO(value, const JSJitInfo*) \
+    }                                                \
+  }
+#define INT32VALUE_WRAPPER(value)                   \
+  {                                                 \
+    {                                               \
+      reinterpret_cast<JSNative>(JSVAL_TYPE_INT32), \
+          JS_CAST_INT32_TO(value, const JSJitInfo*) \
+    }                                               \
+  }
+
+/*
+ * JSPropertySpec uses JSNativeWrapper.  These macros encapsulate the definition
+ * of JSNative-backed JSPropertySpecs, by defining the JSNativeWrappers for
+ * them.
+ */
+#define JS_PSG(name, getter, flags)                   \
+  JS_PS_ACCESSOR_SPEC(name, JSNATIVE_WRAPPER(getter), \
+                      JSNATIVE_WRAPPER(nullptr), flags, 0)
+#define JS_PSGS(name, getter, setter, flags)          \
+  JS_PS_ACCESSOR_SPEC(name, JSNATIVE_WRAPPER(getter), \
+                      JSNATIVE_WRAPPER(setter), flags, 0)
+#define JS_SYM_GET(symbol, getter, flags)                                    \
+  JS_PS_ACCESSOR_SPEC(                                                       \
+      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
+      JSNATIVE_WRAPPER(getter), JSNATIVE_WRAPPER(nullptr), flags, 0)
+#define JS_SELF_HOSTED_GET(name, getterName, flags)         \
+  JS_PS_ACCESSOR_SPEC(name, SELFHOSTED_WRAPPER(getterName), \
+                      JSNATIVE_WRAPPER(nullptr), flags, JSPROP_GETTER)
+#define JS_SELF_HOSTED_GETSET(name, getterName, setterName, flags) \
+  JS_PS_ACCESSOR_SPEC(name, SELFHOSTED_WRAPPER(getterName),        \
+                      SELFHOSTED_WRAPPER(setterName), flags,       \
+                      JSPROP_GETTER | JSPROP_SETTER)
+#define JS_SELF_HOSTED_SYM_GET(symbol, getterName, flags)                    \
+  JS_PS_ACCESSOR_SPEC(                                                       \
+      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
+      SELFHOSTED_WRAPPER(getterName), JSNATIVE_WRAPPER(nullptr), flags,      \
+      JSPROP_GETTER)
+#define JS_STRING_PS(name, string, flags) \
+  JS_PS_VALUE_SPEC(name, STRINGVALUE_WRAPPER(string), flags)
+#define JS_STRING_SYM_PS(symbol, string, flags)                              \
+  JS_PS_VALUE_SPEC(                                                          \
+      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
+      STRINGVALUE_WRAPPER(string), flags)
+#define JS_INT32_PS(name, value, flags) \
+  JS_PS_VALUE_SPEC(name, INT32VALUE_WRAPPER(value), flags)
+#define JS_PS_END                                         \
+  JS_PS_ACCESSOR_SPEC(nullptr, JSNATIVE_WRAPPER(nullptr), \
+                      JSNATIVE_WRAPPER(nullptr), 0, 0)
+
+/**
+ * To define a native function, set call to a JSNativeWrapper. To define a
+ * self-hosted function, set selfHostedName to the name of a function
+ * compiled during JSRuntime::initSelfHosting.
+ */
+struct JSFunctionSpec {
+  const char* name;
+  JSNativeWrapper call;
+  uint16_t nargs;
+  uint16_t flags;
+  const char* selfHostedName;
+};
+
+/*
+ * Terminating sentinel initializer to put at the end of a JSFunctionSpec array
+ * that's passed to JS_DefineFunctions or JS_InitClass.
+ */
+#define JS_FS_END JS_FN(nullptr, nullptr, 0, 0)
+
+/*
+ * Initializer macros for a JSFunctionSpec array element. JS_FNINFO allows the
+ * simple adding of JSJitInfos. JS_SELF_HOSTED_FN declares a self-hosted
+ * function. JS_INLINABLE_FN allows specifying an InlinableNative enum value for
+ * natives inlined or specialized by the JIT. Finally JS_FNSPEC has slots for
+ * all the fields.
+ *
+ * The _SYM variants allow defining a function with a symbol key rather than a
+ * string key. For example, use JS_SYM_FN(iterator, ...) to define an
+ * @@iterator method.
+ */
+#define JS_FN(name, call, nargs, flags) \
+  JS_FNSPEC(name, call, nullptr, nargs, flags, nullptr)
+#define JS_INLINABLE_FN(name, call, nargs, flags, native) \
+  JS_FNSPEC(name, call, &js::jit::JitInfo_##native, nargs, flags, nullptr)
+#define JS_SYM_FN(symbol, call, nargs, flags) \
+  JS_SYM_FNSPEC(symbol, call, nullptr, nargs, flags, nullptr)
+#define JS_FNINFO(name, call, info, nargs, flags) \
+  JS_FNSPEC(name, call, info, nargs, flags, nullptr)
+#define JS_SELF_HOSTED_FN(name, selfHostedName, nargs, flags) \
+  JS_FNSPEC(name, nullptr, nullptr, nargs, flags, selfHostedName)
+#define JS_SELF_HOSTED_SYM_FN(symbol, selfHostedName, nargs, flags) \
+  JS_SYM_FNSPEC(symbol, nullptr, nullptr, nargs, flags, selfHostedName)
+#define JS_SYM_FNSPEC(symbol, call, info, nargs, flags, selfHostedName)      \
+  JS_FNSPEC(                                                                 \
+      reinterpret_cast<const char*>(uint32_t(::JS::SymbolCode::symbol) + 1), \
+      call, info, nargs, flags, selfHostedName)
+#define JS_FNSPEC(name, call, info, nargs, flags, selfHostedName) \
+  { name, {call, info}, nargs, flags, selfHostedName }
 
 extern JS_PUBLIC_API JSObject* JS_InitClass(
     JSContext* cx, JS::HandleObject obj, JS::HandleObject parent_proto,
     const JSClass* clasp, JSNative constructor, unsigned nargs,
     const JSPropertySpec* ps, const JSFunctionSpec* fs,
     const JSPropertySpec* static_ps, const JSFunctionSpec* static_fs);
 
 /**
@@ -1492,16 +1808,296 @@ extern JS_PUBLIC_API bool JS_DeepFreezeO
                                               JS::Handle<JSObject*> obj);
 
 /**
  * Freezes an object; see ES5's Object.freeze(obj) method.
  */
 extern JS_PUBLIC_API bool JS_FreezeObject(JSContext* cx,
                                           JS::Handle<JSObject*> obj);
 
+/*** Property descriptors ***************************************************/
+
+namespace JS {
+
+struct JS_PUBLIC_API PropertyDescriptor {
+  JSObject* obj;
+  unsigned attrs;
+  JSGetterOp getter;
+  JSSetterOp setter;
+  JS::Value value;
+
+  PropertyDescriptor()
+      : obj(nullptr),
+        attrs(0),
+        getter(nullptr),
+        setter(nullptr),
+        value(JS::UndefinedValue()) {}
+
+  static void trace(PropertyDescriptor* self, JSTracer* trc) {
+    self->trace(trc);
+  }
+  void trace(JSTracer* trc);
+};
+
+}  // namespace JS
+
+namespace js {
+
+template <typename Wrapper>
+class WrappedPtrOperations<JS::PropertyDescriptor, Wrapper> {
+  const JS::PropertyDescriptor& desc() const {
+    return static_cast<const Wrapper*>(this)->get();
+  }
+
+  bool has(unsigned bit) const {
+    MOZ_ASSERT(bit != 0);
+    MOZ_ASSERT((bit & (bit - 1)) == 0);  // only a single bit
+    return (desc().attrs & bit) != 0;
+  }
+
+  bool hasAny(unsigned bits) const { return (desc().attrs & bits) != 0; }
+
+  bool hasAll(unsigned bits) const { return (desc().attrs & bits) == bits; }
+
+ public:
+  // Descriptors with JSGetterOp/JSSetterOp are considered data
+  // descriptors. It's complicated.
+  bool isAccessorDescriptor() const {
+    return hasAny(JSPROP_GETTER | JSPROP_SETTER);
+  }
+  bool isGenericDescriptor() const {
+    return (desc().attrs & (JSPROP_GETTER | JSPROP_SETTER |
+                            JSPROP_IGNORE_READONLY | JSPROP_IGNORE_VALUE)) ==
+           (JSPROP_IGNORE_READONLY | JSPROP_IGNORE_VALUE);
+  }
+  bool isDataDescriptor() const {
+    return !isAccessorDescriptor() && !isGenericDescriptor();
+  }
+
+  bool hasConfigurable() const { return !has(JSPROP_IGNORE_PERMANENT); }
+  bool configurable() const {
+    MOZ_ASSERT(hasConfigurable());
+    return !has(JSPROP_PERMANENT);
+  }
+
+  bool hasEnumerable() const { return !has(JSPROP_IGNORE_ENUMERATE); }
+  bool enumerable() const {
+    MOZ_ASSERT(hasEnumerable());
+    return has(JSPROP_ENUMERATE);
+  }
+
+  bool hasValue() const {
+    return !isAccessorDescriptor() && !has(JSPROP_IGNORE_VALUE);
+  }
+  JS::HandleValue value() const {
+    return JS::HandleValue::fromMarkedLocation(&desc().value);
+  }
+
+  bool hasWritable() const {
+    return !isAccessorDescriptor() && !has(JSPROP_IGNORE_READONLY);
+  }
+  bool writable() const {
+    MOZ_ASSERT(hasWritable());
+    return !has(JSPROP_READONLY);
+  }
+
+  bool hasGetterObject() const { return has(JSPROP_GETTER); }
+  JS::HandleObject getterObject() const {
+    MOZ_ASSERT(hasGetterObject());
+    return JS::HandleObject::fromMarkedLocation(
+        reinterpret_cast<JSObject* const*>(&desc().getter));
+  }
+  bool hasSetterObject() const { return has(JSPROP_SETTER); }
+  JS::HandleObject setterObject() const {
+    MOZ_ASSERT(hasSetterObject());
+    return JS::HandleObject::fromMarkedLocation(
+        reinterpret_cast<JSObject* const*>(&desc().setter));
+  }
+
+  bool hasGetterOrSetter() const { return desc().getter || desc().setter; }
+
+  JS::HandleObject object() const {
+    return JS::HandleObject::fromMarkedLocation(&desc().obj);
+  }
+  unsigned attributes() const { return desc().attrs; }
+  JSGetterOp getter() const { return desc().getter; }
+  JSSetterOp setter() const { return desc().setter; }
+
+  void assertValid() const {
+#ifdef DEBUG
+    MOZ_ASSERT(
+        (attributes() &
+         ~(JSPROP_ENUMERATE | JSPROP_IGNORE_ENUMERATE | JSPROP_PERMANENT |
+           JSPROP_IGNORE_PERMANENT | JSPROP_READONLY | JSPROP_IGNORE_READONLY |
+           JSPROP_IGNORE_VALUE | JSPROP_GETTER | JSPROP_SETTER |
+           JSPROP_RESOLVING | JSPROP_INTERNAL_USE_BIT)) == 0);
+    MOZ_ASSERT(!hasAll(JSPROP_IGNORE_ENUMERATE | JSPROP_ENUMERATE));
+    MOZ_ASSERT(!hasAll(JSPROP_IGNORE_PERMANENT | JSPROP_PERMANENT));
+    if (isAccessorDescriptor()) {
+      MOZ_ASSERT(!has(JSPROP_READONLY));
+      MOZ_ASSERT(!has(JSPROP_IGNORE_READONLY));
+      MOZ_ASSERT(!has(JSPROP_IGNORE_VALUE));
+      MOZ_ASSERT(!has(JSPROP_INTERNAL_USE_BIT));
+      MOZ_ASSERT(value().isUndefined());
+      MOZ_ASSERT_IF(!has(JSPROP_GETTER), !getter());
+      MOZ_ASSERT_IF(!has(JSPROP_SETTER), !setter());
+    } else {
+      MOZ_ASSERT(!hasAll(JSPROP_IGNORE_READONLY | JSPROP_READONLY));
+      MOZ_ASSERT_IF(has(JSPROP_IGNORE_VALUE), value().isUndefined());
+    }
+
+    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_ENUMERATE));
+    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_PERMANENT));
+    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_READONLY));
+    MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_VALUE));
+#endif
+  }
+
+  void assertComplete() const {
+#ifdef DEBUG
+    assertValid();
+    MOZ_ASSERT(
+        (attributes() & ~(JSPROP_ENUMERATE | JSPROP_PERMANENT |
+                          JSPROP_READONLY | JSPROP_GETTER | JSPROP_SETTER |
+                          JSPROP_RESOLVING | JSPROP_INTERNAL_USE_BIT)) == 0);
+    MOZ_ASSERT_IF(isAccessorDescriptor(),
+                  has(JSPROP_GETTER) && has(JSPROP_SETTER));
+#endif
+  }
+
+  void assertCompleteIfFound() const {
+#ifdef DEBUG
+    if (object()) {
+      assertComplete();
+    }
+#endif
+  }
+};
+
+template <typename Wrapper>
+class MutableWrappedPtrOperations<JS::PropertyDescriptor, Wrapper>
+    : public js::WrappedPtrOperations<JS::PropertyDescriptor, Wrapper> {
+  JS::PropertyDescriptor& desc() { return static_cast<Wrapper*>(this)->get(); }
+
+ public:
+  void clear() {
+    object().set(nullptr);
+    setAttributes(0);
+    setGetter(nullptr);
+    setSetter(nullptr);
+    value().setUndefined();
+  }
+
+  void initFields(JS::HandleObject obj, JS::HandleValue v, unsigned attrs,
+                  JSGetterOp getterOp, JSSetterOp setterOp) {
+    object().set(obj);
+    value().set(v);
+    setAttributes(attrs);
+    setGetter(getterOp);
+    setSetter(setterOp);
+  }
+
+  void assign(JS::PropertyDescriptor& other) {
+    object().set(other.obj);
+    setAttributes(other.attrs);
+    setGetter(other.getter);
+    setSetter(other.setter);
+    value().set(other.value);
+  }
+
+  void setDataDescriptor(JS::HandleValue v, unsigned attrs) {
+    MOZ_ASSERT((attrs & ~(JSPROP_ENUMERATE | JSPROP_PERMANENT |
+                          JSPROP_READONLY | JSPROP_IGNORE_ENUMERATE |
+                          JSPROP_IGNORE_PERMANENT | JSPROP_IGNORE_READONLY)) ==
+               0);
+    object().set(nullptr);
+    setAttributes(attrs);
+    setGetter(nullptr);
+    setSetter(nullptr);
+    value().set(v);
+  }
+
+  JS::MutableHandleObject object() {
+    return JS::MutableHandleObject::fromMarkedLocation(&desc().obj);
+  }
+  unsigned& attributesRef() { return desc().attrs; }
+  JSGetterOp& getter() { return desc().getter; }
+  JSSetterOp& setter() { return desc().setter; }
+  JS::MutableHandleValue value() {
+    return JS::MutableHandleValue::fromMarkedLocation(&desc().value);
+  }
+  void setValue(JS::HandleValue v) {
+    MOZ_ASSERT(!(desc().attrs & (JSPROP_GETTER | JSPROP_SETTER)));
+    attributesRef() &= ~JSPROP_IGNORE_VALUE;
+    value().set(v);
+  }
+
+  void setConfigurable(bool configurable) {
+    setAttributes(
+        (desc().attrs & ~(JSPROP_IGNORE_PERMANENT | JSPROP_PERMANENT)) |
+        (configurable ? 0 : JSPROP_PERMANENT));
+  }
+  void setEnumerable(bool enumerable) {
+    setAttributes(
+        (desc().attrs & ~(JSPROP_IGNORE_ENUMERATE | JSPROP_ENUMERATE)) |
+        (enumerable ? JSPROP_ENUMERATE : 0));
+  }
+  void setWritable(bool writable) {
+    MOZ_ASSERT(!(desc().attrs & (JSPROP_GETTER | JSPROP_SETTER)));
+    setAttributes((desc().attrs & ~(JSPROP_IGNORE_READONLY | JSPROP_READONLY)) |
+                  (writable ? 0 : JSPROP_READONLY));
+  }
+  void setAttributes(unsigned attrs) { desc().attrs = attrs; }
+
+  void setGetter(JSGetterOp op) { desc().getter = op; }
+  void setSetter(JSSetterOp op) { desc().setter = op; }
+  void setGetterObject(JSObject* obj) {
+    desc().getter = reinterpret_cast<JSGetterOp>(obj);
+    desc().attrs &=
+        ~(JSPROP_IGNORE_VALUE | JSPROP_IGNORE_READONLY | JSPROP_READONLY);
+    desc().attrs |= JSPROP_GETTER;
+  }
+  void setSetterObject(JSObject* obj) {
+    desc().setter = reinterpret_cast<JSSetterOp>(obj);
+    desc().attrs &=
+        ~(JSPROP_IGNORE_VALUE | JSPROP_IGNORE_READONLY | JSPROP_READONLY);
+    desc().attrs |= JSPROP_SETTER;
+  }
+
+  JS::MutableHandleObject getterObject() {
+    MOZ_ASSERT(this->hasGetterObject());
+    return JS::MutableHandleObject::fromMarkedLocation(
+        reinterpret_cast<JSObject**>(&desc().getter));
+  }
+  JS::MutableHandleObject setterObject() {
+    MOZ_ASSERT(this->hasSetterObject());
+    return JS::MutableHandleObject::fromMarkedLocation(
+        reinterpret_cast<JSObject**>(&desc().setter));
+  }
+};
+
+}  // namespace js
+
+namespace JS {
+
+extern JS_PUBLIC_API bool ObjectToCompletePropertyDescriptor(
+    JSContext* cx, JS::HandleObject obj, JS::HandleValue descriptor,
+    JS::MutableHandle<PropertyDescriptor> desc);
+
+/*
+ * ES6 draft rev 32 (2015 Feb 2) 6.2.4.4 FromPropertyDescriptor(Desc).
+ *
+ * If desc.object() is null, then vp is set to undefined.
+ */
+extern JS_PUBLIC_API bool FromPropertyDescriptor(
+    JSContext* cx, JS::Handle<JS::PropertyDescriptor> desc,
+    JS::MutableHandleValue vp);
+
+}  // namespace JS
+
 /*** Standard internal methods **********************************************
  *
  * The functions below are the fundamental operations on objects.
  *
  * ES6 specifies 14 internal methods that define how objects behave.  The
  * standard is actually quite good on this topic, though you may have to read
  * it a few times. See ES6 sections 6.1.7.2 and 6.1.7.3.
  *
@@ -2341,26 +2937,16 @@ extern JS_PUBLIC_API void JS_ReleaseMapp
 extern JS_PUBLIC_API JS::Value JS_GetReservedSlot(JSObject* obj,
                                                   uint32_t index);
 
 extern JS_PUBLIC_API void JS_SetReservedSlot(JSObject* obj, uint32_t index,
                                              const JS::Value& v);
 
 /************************************************************************/
 
-/* native that can be called as a ctor */
-static constexpr unsigned JSFUN_CONSTRUCTOR = 0x400;
-
-/* | of all the JSFUN_* flags */
-static constexpr unsigned JSFUN_FLAGS_MASK = 0x400;
-
-static_assert((JSPROP_FLAGS_MASK & JSFUN_FLAGS_MASK) == 0,
-              "JSFUN_* flags do not overlap JSPROP_* flags, because bits from "
-              "the two flag-sets appear in the same flag in some APIs");
-
 /*
  * Functions and scripts.
  */
 extern JS_PUBLIC_API JSFunction* JS_NewFunction(JSContext* cx, JSNative call,
                                                 unsigned nargs, unsigned flags,
                                                 const char* name);
 
 namespace JS {
@@ -2698,16 +3284,20 @@ extern JS_PUBLIC_API bool JS_DisableInte
 extern JS_PUBLIC_API void JS_ResetInterruptCallback(JSContext* cx, bool enable);
 
 extern JS_PUBLIC_API void JS_RequestInterruptCallback(JSContext* cx);
 
 extern JS_PUBLIC_API void JS_RequestInterruptCallbackCanWait(JSContext* cx);
 
 namespace JS {
 
+/* Vector of characters used for holding build ids. */
+
+typedef js::Vector<char, 0, js::SystemAllocPolicy> BuildIdCharVector;
+
 /**
  * The ConsumeStreamCallback is called from an active JSContext, passing a
  * StreamConsumer that wishes to consume the given host object as a stream of
  * bytes with the given MIME type. On failure, the embedding must report the
  * appropriate error on 'cx'. On success, the embedding must call
  * consumer->consumeChunk() repeatedly on any thread until exactly one of:
  *  - consumeChunk() returns false
  *  - the embedding calls consumer->streamEnd()
@@ -2721,19 +3311,19 @@ namespace JS {
  * OptimizedEncodingListener*, indicating that there is a cache entry associated
  * with this stream that can store an optimized encoding of the bytes that were
  * just streamed at some point in the future by having SpiderMonkey call
  * storeOptimizedEncoding(). Until the optimized encoding is ready, SpiderMonkey
  * will hold an outstanding refcount to keep the listener alive.
  *
  * After storeOptimizedEncoding() is called, on cache hit, the embedding
  * may call consumeOptimizedEncoding() instead of consumeChunk()/streamEnd().
- * The embedding must ensure that the GetOptimizedEncodingBuildId() (see
- * js/BuildId.h) at the time when an optimized encoding is created is the same
- * as when it is later consumed.
+ * The embedding must ensure that the GetOptimizedEncodingBuildId() at the time
+ * when an optimized encoding is created is the same as when it is later
+ * consumed.
  */
 
 class OptimizedEncodingListener {
  protected:
   virtual ~OptimizedEncodingListener() {}
 
  public:
   // SpiderMonkey will hold an outstanding reference count as long as it holds
@@ -2741,16 +3331,19 @@ class OptimizedEncodingListener {
   virtual MozExternalRefCountType MOZ_XPCOM_ABI AddRef() = 0;
   virtual MozExternalRefCountType MOZ_XPCOM_ABI Release() = 0;
 
   // SpiderMonkey may optionally call storeOptimizedEncoding() after it has
   // finished processing a streamed resource.
   virtual void storeOptimizedEncoding(const uint8_t* bytes, size_t length) = 0;
 };
 
+extern MOZ_MUST_USE JS_PUBLIC_API bool GetOptimizedEncodingBuildId(
+    BuildIdCharVector* buildId);
+
 class JS_PUBLIC_API StreamConsumer {
  protected:
   // AsyncStreamConsumers are created and destroyed by SpiderMonkey.
   StreamConsumer() = default;
   virtual ~StreamConsumer() = default;
 
  public:
   // Called by the embedding as each chunk of bytes becomes available.
@@ -3394,16 +3987,35 @@ extern JS_PUBLIC_API bool SetEntries(JSC
                                      MutableHandleValue rval);
 
 extern JS_PUBLIC_API bool SetForEach(JSContext* cx, HandleObject obj,
                                      HandleValue callbackFn,
                                      HandleValue thisVal);
 
 } /* namespace JS */
 
+/*
+ * Dates.
+ */
+
+extern JS_PUBLIC_API JSObject* JS_NewDateObject(JSContext* cx, int year,
+                                                int mon, int mday, int hour,
+                                                int min, int sec);
+
+/**
+ * On success, returns true, setting |*isDate| to true if |obj| is a Date
+ * object or a wrapper around one, or to false if not.  Returns false on
+ * failure.
+ *
+ * This method returns true with |*isDate == false| when passed an ES6 proxy
+ * whose target is a Date, or when passed a revoked proxy.
+ */
+extern JS_PUBLIC_API bool JS_ObjectIsDate(JSContext* cx, JS::HandleObject obj,
+                                          bool* isDate);
+
 /************************************************************************/
 
 /*
  * Regular Expressions.
  */
 #define JSREG_FOLD 0x01u      /* fold uppercase to lowercase */
 #define JSREG_GLOB 0x02u      /* global exec, creates array of matches */
 #define JSREG_MULTILINE 0x04u /* treat ^ and $ as begin and end of line */
@@ -3822,16 +4434,28 @@ struct AsmJSCacheOps {
   OpenAsmJSCacheEntryForWriteOp openEntryForWrite = nullptr;
   CloseAsmJSCacheEntryForWriteOp closeEntryForWrite = nullptr;
 };
 
 extern JS_PUBLIC_API void SetAsmJSCacheOps(JSContext* cx,
                                            const AsmJSCacheOps* callbacks);
 
 /**
+ * Return the buildId (represented as a sequence of characters) associated with
+ * the currently-executing build. If the JS engine is embedded such that a
+ * single cache entry can be observed by different compiled versions of the JS
+ * engine, it is critical that the buildId shall change for each new build of
+ * the JS engine.
+ */
+
+typedef bool (*BuildIdOp)(BuildIdCharVector* buildId);
+
+extern JS_PUBLIC_API void SetProcessBuildIdOp(BuildIdOp buildIdOp);
+
+/**
  * The WasmModule interface allows the embedding to hold a reference to the
  * underying C++ implementation of a JS WebAssembly.Module object for purposes
  * of efficient postMessage() and (de)serialization from a random thread.
  *
  * In particular, this allows postMessage() of a WebAssembly.Module:
  * GetWasmModule() is called when making a structured clone of a payload
  * containing a WebAssembly.Module object. The structured clone buffer holds a
  * refcount of the JS::WasmModule until createObject() is called in the target
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -24,26 +24,24 @@
 #include "mozilla/Sprintf.h"
 #include "mozilla/TextUtils.h"
 
 #include <ctype.h>
 #include <math.h>
 #include <string.h>
 
 #include "jsapi.h"
-#include "jsfriendapi.h"
 #include "jsnum.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "builtin/String.h"
 #include "js/Conversions.h"
 #include "js/Date.h"
 #include "js/LocaleSensitive.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "util/Text.h"
 #include "vm/DateTime.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
@@ -3353,22 +3351,16 @@ JSObject* js::NewDateObjectMsec(JSContex
   DateObject* obj = NewObjectWithClassProto<DateObject>(cx, proto);
   if (!obj) {
     return nullptr;
   }
   obj->setUTCTime(t);
   return obj;
 }
 
-JS_PUBLIC_API JSObject* JS::NewDateObject(JSContext* cx, ClippedTime time) {
-  AssertHeapIsIdle();
-  CHECK_THREAD(cx);
-  return NewDateObjectMsec(cx, time);
-}
-
 JS_FRIEND_API JSObject* js::NewDateObject(JSContext* cx, int year, int mon,
                                           int mday, int hour, int min,
                                           int sec) {
   MOZ_ASSERT(mon < 12);
   double msec_time =
       MakeDate(MakeDay(year, mon, mday), MakeTime(hour, min, sec, 0.0));
   return NewDateObjectMsec(cx, TimeClip(UTC(msec_time)));
 }
@@ -3389,37 +3381,16 @@ JS_FRIEND_API bool js::DateIsValid(JSCon
   if (!Unbox(cx, obj, &unboxed)) {
     return false;
   }
 
   *isValid = !IsNaN(unboxed.toNumber());
   return true;
 }
 
-JS_PUBLIC_API JSObject* JS::NewDateObject(JSContext* cx, int year, int mon,
-                                          int mday, int hour, int min,
-                                          int sec) {
-  AssertHeapIsIdle();
-  CHECK_THREAD(cx);
-  return js::NewDateObject(cx, year, mon, mday, hour, min, sec);
-}
-
-JS_PUBLIC_API bool JS::ObjectIsDate(JSContext* cx, Handle<JSObject*> obj,
-                                    bool* isDate) {
-  cx->check(obj);
-
-  ESClass cls;
-  if (!GetBuiltinClass(cx, obj, &cls)) {
-    return false;
-  }
-
-  *isDate = cls == ESClass::Date;
-  return true;
-}
-
 JS_FRIEND_API bool js::DateGetMsecSinceEpoch(JSContext* cx, HandleObject obj,
                                              double* msecsSinceEpoch) {
   ESClass cls;
   if (!GetBuiltinClass(cx, obj, &cls)) {
     return false;
   }
 
   if (cls != ESClass::Date) {
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -19,17 +19,16 @@
 #include "jsapi.h"
 #include "jsnum.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "gc/FreeOp.h"
 #include "gc/Marking.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/UniquePtr.h"
 #include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "vm/ErrorObject.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/JSFunction.h"
 #include "vm/JSObject.h"
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -20,17 +20,16 @@
 #include <cmath>
 
 #include "fdlibm.h"
 #include "jsapi.h"
 #include "jstypes.h"
 
 #include "jit/InlinableNatives.h"
 #include "js/Class.h"
-#include "js/PropertySpec.h"
 #include "util/Windows.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
 #include "vm/Realm.h"
 #include "vm/Time.h"
 
 #include "vm/JSObject-inl.h"
 
--- a/js/src/jsnum.cpp
+++ b/js/src/jsnum.cpp
@@ -27,17 +27,16 @@
 
 #include "builtin/String.h"
 #include "double-conversion/double-conversion.h"
 #include "js/CharacterEncoding.h"
 #include "js/Conversions.h"
 #if !EXPOSE_INTL_API
 #include "js/LocaleSensitive.h"
 #endif
-#include "js/PropertySpec.h"
 #include "util/DoubleToString.h"
 #include "util/StringBuffer.h"
 #ifdef ENABLE_BIGINT
 #include "vm/BigIntType.h"
 #endif
 #include "vm/GlobalObject.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -108,27 +108,25 @@ EXPORTS += [
     'jsfriendapi.h',
     'jspubtd.h',
     'jstypes.h',
     'perf/jsperf.h',
 ]
 
 EXPORTS.js += [
     '../public/AllocPolicy.h',
-    '../public/BuildId.h',
     '../public/CallArgs.h',
     '../public/CallNonGenericMethod.h',
     '../public/CharacterEncoding.h',
     '../public/Class.h',
     '../public/CompilationAndEvaluation.h',
     '../public/CompileOptions.h',
     '../public/Conversions.h',
     '../public/Date.h',
     '../public/Debug.h',
-    '../public/Equality.h',
     '../public/ErrorReport.h',
     '../public/GCAnnotations.h',
     '../public/GCAPI.h',
     '../public/GCHashTable.h',
     '../public/GCPolicyAPI.h',
     '../public/GCVariant.h',
     '../public/GCVector.h',
     '../public/HashTable.h',
@@ -140,18 +138,16 @@ EXPORTS.js += [
     '../public/MemoryFunctions.h',
     '../public/MemoryMetrics.h',
     '../public/OffThreadScriptCompilation.h',
     '../public/Principals.h',
     '../public/Printf.h',
     '../public/ProfilingFrameIterator.h',
     '../public/ProfilingStack.h',
     '../public/Promise.h',
-    '../public/PropertyDescriptor.h',
-    '../public/PropertySpec.h',
     '../public/ProtoKey.h',
     '../public/Proxy.h',
     '../public/Realm.h',
     '../public/RefCounted.h',
     '../public/RequiredDefines.h',
     '../public/Result.h',
     '../public/RootingAPI.h',
     '../public/SavedFrameAPI.h',
@@ -248,30 +244,28 @@ UNIFIED_SOURCES += [
     'util/StructuredSpewer.cpp',
     'util/Text.cpp',
     'util/Unicode.cpp',
     'vm/ArgumentsObject.cpp',
     'vm/ArrayBufferObject.cpp',
     'vm/ArrayBufferViewObject.cpp',
     'vm/AsyncFunction.cpp',
     'vm/AsyncIteration.cpp',
-    'vm/BuildId.cpp',
     'vm/BytecodeUtil.cpp',
     'vm/Caches.cpp',
     'vm/CallNonGenericMethod.cpp',
     'vm/CharacterEncoding.cpp',
     'vm/CodeCoverage.cpp',
     'vm/Compartment.cpp',
     'vm/CompilationAndEvaluation.cpp',
     'vm/Compression.cpp',
     'vm/DateTime.cpp',
     'vm/Debugger.cpp',
     'vm/DebuggerMemory.cpp',
     'vm/EnvironmentObject.cpp',
-    'vm/EqualityOperations.cpp',
     'vm/ErrorObject.cpp',
     'vm/ErrorReporting.cpp',
     'vm/ForOfIterator.cpp',
     'vm/GeckoProfiler.cpp',
     'vm/GeneratorObject.cpp',
     'vm/GlobalObject.cpp',
     'vm/HelperThreads.cpp',
     'vm/Id.cpp',
--- a/js/src/perf/jsperf.cpp
+++ b/js/src/perf/jsperf.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "perf/jsperf.h"
 
 #include "gc/FreeOp.h"
-#include "js/PropertySpec.h"
 #include "vm/JSContext.h" /* for error messages */
 #include "vm/JSObject.h"  /* for unwrapping without a context */
 
 using namespace js;
 using JS::PerfMeasurement;
 
 // You cannot forward-declare a static object in C++, so instead
 // we have to forward-declare the helper function that refers to it.
--- a/js/src/proxy/Proxy.cpp
+++ b/js/src/proxy/Proxy.cpp
@@ -7,17 +7,16 @@
 #include "js/Proxy.h"
 
 #include "mozilla/Attributes.h"
 
 #include <string.h>
 
 #include "jsapi.h"
 
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "js/Wrapper.h"
 #include "proxy/DeadObjectProxy.h"
 #include "proxy/ScriptedProxyHandler.h"
 #include "vm/JSContext.h"
 #include "vm/JSFunction.h"
 #include "vm/WrapperObject.h"
 
--- a/js/src/proxy/ScriptedProxyHandler.cpp
+++ b/js/src/proxy/ScriptedProxyHandler.cpp
@@ -4,18 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "proxy/ScriptedProxyHandler.h"
 
 #include "jsapi.h"
 
 #include "js/CharacterEncoding.h"
-#include "js/PropertyDescriptor.h"  // JS::FromPropertyDescriptor
-#include "vm/EqualityOperations.h"  // js::SameValue
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 
 using namespace js;
 
 using JS::IsArrayAnswer;
 
--- a/js/src/shell/OSObject.cpp
+++ b/js/src/shell/OSObject.cpp
@@ -22,17 +22,16 @@
 #include "jsapi.h"
 // For JSFunctionSpecWithHelp
 #include "jsfriendapi.h"
 
 #include "builtin/String.h"
 #include "gc/FreeOp.h"
 #include "js/CharacterEncoding.h"
 #include "js/Conversions.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "shell/jsshell.h"
 #include "util/StringBuffer.h"
 #include "util/Text.h"
 #include "util/Windows.h"
 #include "vm/JSObject.h"
 #include "vm/TypedArrayObject.h"
 
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -77,28 +77,25 @@
 #include "frontend/Parser.h"
 #include "gc/PublicIterators.h"
 #include "jit/arm/Simulator-arm.h"
 #include "jit/InlinableNatives.h"
 #include "jit/Ion.h"
 #include "jit/JitcodeMap.h"
 #include "jit/JitRealm.h"
 #include "jit/shared/CodeGenerator-shared.h"
-#include "js/BuildId.h"  // JS::BuildIdCharVector, JS::SetProcessBuildIdOp
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/CompileOptions.h"
 #include "js/Debug.h"
-#include "js/Equality.h"  // JS::SameValue
 #include "js/GCVector.h"
 #include "js/Initialization.h"
 #include "js/JSON.h"
 #include "js/MemoryFunctions.h"
 #include "js/Printf.h"
-#include "js/PropertySpec.h"
 #include "js/SourceText.h"
 #include "js/StableStringChars.h"
 #include "js/StructuredClone.h"
 #include "js/SweepingAPI.h"
 #include "js/Wrapper.h"
 #include "perf/jsperf.h"
 #include "shell/jsoptparse.h"
 #include "shell/jsshell.h"
@@ -2716,17 +2713,17 @@ static bool AssertEq(JSContext* cx, unsi
         (args.length() < 2)
             ? JSSMSG_NOT_ENOUGH_ARGS
             : (args.length() == 3) ? JSSMSG_INVALID_ARGS : JSSMSG_TOO_MANY_ARGS,
         "assertEq");
     return false;
   }
 
   bool same;
-  if (!JS::SameValue(cx, args[0], args[1], &same)) {
+  if (!JS_SameValue(cx, args[0], args[1], &same)) {
     return false;
   }
   if (!same) {
     UniqueChars bytes0, bytes1;
     const char* actual = ToSource(cx, args[0], &bytes0);
     const char* expected = ToSource(cx, args[1], &bytes1);
     if (args.length() == 2) {
       JS_ReportErrorNumberUTF8(cx, my_GetErrorMessage, nullptr,
--- a/js/src/vm/ArrayBufferObject.cpp
+++ b/js/src/vm/ArrayBufferObject.cpp
@@ -30,17 +30,16 @@
 
 #include "builtin/Array.h"
 #include "builtin/DataViewObject.h"
 #include "gc/Barrier.h"
 #include "gc/FreeOp.h"
 #include "gc/Memory.h"
 #include "js/Conversions.h"
 #include "js/MemoryMetrics.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "util/Windows.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/SharedArrayObject.h"
 #include "vm/WrapperObject.h"
--- a/js/src/vm/AsyncIteration.cpp
+++ b/js/src/vm/AsyncIteration.cpp
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "vm/AsyncIteration.h"
 
 #include "builtin/Array.h"
 
 #include "builtin/Promise.h"
-#include "js/PropertySpec.h"
 #include "vm/GeneratorObject.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/Realm.h"
 #include "vm/SelfHosting.h"
 
 #include "vm/JSContext-inl.h"
 #include "vm/JSObject-inl.h"
--- a/js/src/vm/BigIntType.h
+++ b/js/src/vm/BigIntType.h
@@ -14,48 +14,41 @@
 
 #include "gc/Barrier.h"
 #include "gc/GC.h"
 #include "gc/Heap.h"
 #include "js/AllocPolicy.h"
 #include "js/GCHashTable.h"
 #include "js/Result.h"
 #include "js/RootingAPI.h"
-#include "js/TraceKind.h"
 #include "js/TypeDecls.h"
 #include "vm/StringType.h"
 #include "vm/Xdr.h"
 
-namespace JS {
-
-class BigInt;
-
-}  // namespace JS
-
 namespace js {
 
 template <typename CharT>
 static bool StringToBigIntImpl(const mozilla::Range<const CharT>& chars,
                                uint8_t radix, Handle<JS::BigInt*> res);
 
 template <XDRMode mode>
-XDRResult XDRBigInt(XDRState<mode>* xdr, MutableHandle<JS::BigInt*> bi);
+XDRResult XDRBigInt(XDRState<mode>* xdr, MutableHandleBigInt bi);
 
 }  // namespace js
 
 namespace JS {
 
 class BigInt final : public js::gc::TenuredCell {
   // StringToBigIntImpl modifies the num_ field of the res argument.
   template <typename CharT>
   friend bool js::StringToBigIntImpl(const mozilla::Range<const CharT>& chars,
                                      uint8_t radix, Handle<BigInt*> res);
   template <js::XDRMode mode>
   friend js::XDRResult js::XDRBigInt(js::XDRState<mode>* xdr,
-                                     MutableHandle<BigInt*> bi);
+                                     MutableHandleBigInt bi);
 
  protected:
   // Reserved word for Cell GC invariants. This also ensures minimum
   // structure size.
   uintptr_t reserved_;
 
  private:
   mpz_t num_;
@@ -106,18 +99,18 @@ class BigInt final : public js::gc::Tenu
   static BigInt* bitAnd(JSContext* cx, Handle<BigInt*> x, Handle<BigInt*> y);
   static BigInt* bitXor(JSContext* cx, Handle<BigInt*> x, Handle<BigInt*> y);
   static BigInt* bitOr(JSContext* cx, Handle<BigInt*> x, Handle<BigInt*> y);
   static BigInt* bitNot(JSContext* cx, Handle<BigInt*> x);
 
   static int64_t toInt64(BigInt* x);
   static uint64_t toUint64(BigInt* x);
 
-  static BigInt* asIntN(JSContext* cx, Handle<BigInt*> x, uint64_t bits);
-  static BigInt* asUintN(JSContext* cx, Handle<BigInt*> x, uint64_t bits);
+  static BigInt* asIntN(JSContext* cx, HandleBigInt x, uint64_t bits);
+  static BigInt* asUintN(JSContext* cx, HandleBigInt x, uint64_t bits);
 
   // Type-checking versions of arithmetic operations. These methods
   // must be called with at least one BigInt operand. Binary
   // operations with throw a TypeError if one of the operands is not a
   // BigInt value.
   static bool add(JSContext* cx, Handle<Value> lhs, Handle<Value> rhs,
                   MutableHandle<Value> res);
   static bool sub(JSContext* cx, Handle<Value> lhs, Handle<Value> rhs,
@@ -145,28 +138,28 @@ class BigInt final : public js::gc::Tenu
   static bool bitNot(JSContext* cx, Handle<Value> operand,
                      MutableHandle<Value> res);
 
   static double numberValue(BigInt* x);
   static JSLinearString* toString(JSContext* cx, BigInt* x, uint8_t radix);
 
   static bool equal(BigInt* lhs, BigInt* rhs);
   static bool equal(BigInt* lhs, double rhs);
-  static JS::Result<bool> looselyEqual(JSContext* cx, Handle<BigInt*> lhs,
+  static JS::Result<bool> looselyEqual(JSContext* cx, HandleBigInt lhs,
                                        HandleValue rhs);
 
   static bool lessThan(BigInt* x, BigInt* y);
 
   // These methods return Nothing when the non-BigInt operand is NaN
   // or a string that can't be interpreted as a BigInt.
   static mozilla::Maybe<bool> lessThan(BigInt* lhs, double rhs);
   static mozilla::Maybe<bool> lessThan(double lhs, BigInt* rhs);
-  static bool lessThan(JSContext* cx, Handle<BigInt*> lhs, HandleString rhs,
+  static bool lessThan(JSContext* cx, HandleBigInt lhs, HandleString rhs,
                        mozilla::Maybe<bool>& res);
-  static bool lessThan(JSContext* cx, HandleString lhs, Handle<BigInt*> rhs,
+  static bool lessThan(JSContext* cx, HandleString lhs, HandleBigInt rhs,
                        mozilla::Maybe<bool>& res);
   static bool lessThan(JSContext* cx, HandleValue lhs, HandleValue rhs,
                        mozilla::Maybe<bool>& res);
 
   // Return the length in bytes of the representation used by
   // writeBytes.
   static size_t byteLength(BigInt* x);
 
deleted file mode 100644
--- a/js/src/vm/BuildId.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: set ts=8 sts=2 et sw=2 tw=80:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* SpiderMonkey buildId-related functionality. */
-
-#include "js/BuildId.h"  // JS::BuildIdCharVector, JS::BuildIdOp, JS::GetOptimizedEncodingBuildId, JS::SetProcessBuildIdOp
-
-#include "mozilla/Atomics.h"  // mozilla::Atomic
-
-#include "jstypes.h"  // JS_PUBLIC_API
-
-#include "vm/Runtime.h"       // js::GetBuildId
-#include "wasm/WasmModule.h"  // js::wasm::GetOptimizedEncodingBuildId
-
-mozilla::Atomic<JS::BuildIdOp> js::GetBuildId;
-
-JS_PUBLIC_API void JS::SetProcessBuildIdOp(JS::BuildIdOp buildIdOp) {
-  js::GetBuildId = buildIdOp;
-}
-
-JS_PUBLIC_API bool JS::GetOptimizedEncodingBuildId(
-    JS::BuildIdCharVector* buildId) {
-  return js::wasm::GetOptimizedEncodingBuildId(buildId);
-}
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -22,18 +22,16 @@
 #include "gc/HashUtil.h"
 #include "gc/Marking.h"
 #include "gc/Policy.h"
 #include "gc/PublicIterators.h"
 #include "jit/BaselineDebugModeOSR.h"
 #include "jit/BaselineJIT.h"
 #include "js/CharacterEncoding.h"
 #include "js/Date.h"
-#include "js/PropertyDescriptor.h"
-#include "js/PropertySpec.h"
 #include "js/SourceText.h"
 #include "js/StableStringChars.h"
 #include "js/UbiNodeBreadthFirst.h"
 #include "js/Vector.h"
 #include "js/Wrapper.h"
 #include "proxy/ScriptedProxyHandler.h"
 #include "util/Text.h"
 #include "vm/ArgumentsObject.h"
--- a/js/src/vm/DebuggerMemory.cpp
+++ b/js/src/vm/DebuggerMemory.cpp
@@ -11,17 +11,16 @@
 #include "mozilla/Vector.h"
 
 #include <stdlib.h>
 
 #include "builtin/MapObject.h"
 #include "gc/Marking.h"
 #include "js/AllocPolicy.h"
 #include "js/Debug.h"
-#include "js/PropertySpec.h"
 #include "js/TracingAPI.h"
 #include "js/UbiNode.h"
 #include "js/UbiNodeCensus.h"
 #include "js/Utility.h"
 #include "vm/Debugger.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/Realm.h"
deleted file mode 100644
--- a/js/src/vm/EqualityOperations.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: set ts=8 sts=2 et sw=2 tw=80:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "vm/EqualityOperations.h"  // js::LooselyEqual, js::StrictlyEqual, js::SameValue
-
-#include "mozilla/Assertions.h"  // MOZ_ASSERT, MOZ_ASSERT_IF
-
-#include "jsapi.h"    // js::AssertHeapIsIdle
-#include "jsnum.h"    // js::StringToNumber
-#include "jstypes.h"  // JS_PUBLIC_API
-
-#include "js/Equality.h"  // JS::LooselyEqual, JS::StrictlyEqual, JS::SameValue
-#include "js/Result.h"    // JS_TRY_VAR_OR_RETURN_FALSE
-#include "js/RootingAPI.h"  // JS::Rooted
-#include "js/Value.h"       // JS::Int32Value, JS::SameType, JS::Value
-#ifdef ENABLE_BIGINT
-#include "vm/BigIntType.h"  // JS::BigInt
-#endif                      // ENABLE_BIGINT
-#include "vm/JSContext.h"   // CHECK_THREAD
-#include "vm/JSObject.h"    // js::ToPrimitive
-#include "vm/StringType.h"  // js::EqualStrings
-
-#include "builtin/Boolean-inl.h"  // js::EmulatesUndefined
-#include "vm/JSContext-inl.h"     // JSContext::check
-
-static bool EqualGivenSameType(JSContext* cx, JS::Handle<JS::Value> lval,
-                               JS::Handle<JS::Value> rval, bool* equal) {
-  MOZ_ASSERT(JS::SameType(lval, rval));
-
-  if (lval.isString()) {
-    return js::EqualStrings(cx, lval.toString(), rval.toString(), equal);
-  }
-
-  if (lval.isDouble()) {
-    *equal = (lval.toDouble() == rval.toDouble());
-    return true;
-  }
-
-#ifdef ENABLE_BIGINT
-  if (lval.isBigInt()) {
-    *equal = JS::BigInt::equal(lval.toBigInt(), rval.toBigInt());
-    return true;
-  }
-#endif
-
-  if (lval.isGCThing()) {  // objects or symbols
-    *equal = (lval.toGCThing() == rval.toGCThing());
-    return true;
-  }
-
-  *equal = lval.get().payloadAsRawUint32() == rval.get().payloadAsRawUint32();
-  MOZ_ASSERT_IF(lval.isUndefined() || lval.isNull(), *equal);
-  return true;
-}
-
-static bool LooselyEqualBooleanAndOther(JSContext* cx,
-                                        JS::Handle<JS::Value> lval,
-                                        JS::Handle<JS::Value> rval,
-                                        bool* result) {
-  MOZ_ASSERT(!rval.isBoolean());
-
-  JS::Rooted<JS::Value> lvalue(cx, JS::Int32Value(lval.toBoolean() ? 1 : 0));
-
-  // The tail-call would end up in Step 3.
-  if (rval.isNumber()) {
-    *result = (lvalue.toNumber() == rval.toNumber());
-    return true;
-  }
-  // The tail-call would end up in Step 6.
-  if (rval.isString()) {
-    double num;
-    if (!StringToNumber(cx, rval.toString(), &num)) {
-      return false;
-    }
-    *result = (lvalue.toNumber() == num);
-    return true;
-  }
-
-  return js::LooselyEqual(cx, lvalue, rval, result);
-}
-
-// ES6 draft rev32 7.2.12 Abstract Equality Comparison
-bool js::LooselyEqual(JSContext* cx, JS::Handle<JS::Value> lval,
-                      JS::Handle<JS::Value> rval, bool* result) {
-  // Step 3.
-  if (JS::SameType(lval, rval)) {
-    return EqualGivenSameType(cx, lval, rval, result);
-  }
-
-  // Handle int32 x double.
-  if (lval.isNumber() && rval.isNumber()) {
-    *result = (lval.toNumber() == rval.toNumber());
-    return true;
-  }
-
-  // Step 4. This a bit more complex, because of the undefined emulating object.
-  if (lval.isNullOrUndefined()) {
-    // We can return early here, because null | undefined is only equal to the
-    // same set.
-    *result = rval.isNullOrUndefined() ||
-              (rval.isObject() && EmulatesUndefined(&rval.toObject()));
-    return true;
-  }
-
-  // Step 5.
-  if (rval.isNullOrUndefined()) {
-    MOZ_ASSERT(!lval.isNullOrUndefined());
-    *result = lval.isObject() && EmulatesUndefined(&lval.toObject());
-    return true;
-  }
-
-  // Step 6.
-  if (lval.isNumber() && rval.isString()) {
-    double num;
-    if (!StringToNumber(cx, rval.toString(), &num)) {
-      return false;
-    }
-    *result = (lval.toNumber() == num);
-    return true;
-  }
-
-  // Step 7.
-  if (lval.isString() && rval.isNumber()) {
-    double num;
-    if (!StringToNumber(cx, lval.toString(), &num)) {
-      return false;
-    }
-    *result = (num == rval.toNumber());
-    return true;
-  }
-
-  // Step 8.
-  if (lval.isBoolean()) {
-    return LooselyEqualBooleanAndOther(cx, lval, rval, result);
-  }
-
-  // Step 9.
-  if (rval.isBoolean()) {
-    return LooselyEqualBooleanAndOther(cx, rval, lval, result);
-  }
-
-  // Step 10.
-  if ((lval.isString() || lval.isNumber() || lval.isSymbol()) &&
-      rval.isObject()) {
-    JS::Rooted<JS::Value> rvalue(cx, rval);
-    if (!ToPrimitive(cx, &rvalue)) {
-      return false;
-    }
-    return js::LooselyEqual(cx, lval, rvalue, result);
-  }
-
-  // Step 11.
-  if (lval.isObject() &&
-      (rval.isString() || rval.isNumber() || rval.isSymbol())) {
-    JS::Rooted<JS::Value> lvalue(cx, lval);
-    if (!ToPrimitive(cx, &lvalue)) {
-      return false;
-    }
-    return js::LooselyEqual(cx, lvalue, rval, result);
-  }
-
-#ifdef ENABLE_BIGINT
-  if (lval.isBigInt()) {
-    JS::Rooted<JS::BigInt*> lbi(cx, lval.toBigInt());
-    bool tmpResult;
-    JS_TRY_VAR_OR_RETURN_FALSE(cx, tmpResult,
-                               JS::BigInt::looselyEqual(cx, lbi, rval));
-    *result = tmpResult;
-    return true;
-  }
-
-  if (rval.isBigInt()) {
-    JS::Rooted<JS::BigInt*> rbi(cx, rval.toBigInt());
-    bool tmpResult;
-    JS_TRY_VAR_OR_RETURN_FALSE(cx, tmpResult,
-                               JS::BigInt::looselyEqual(cx, rbi, lval));
-    *result = tmpResult;
-    return true;
-  }
-#endif
-
-  // Step 12.
-  *result = false;
-  return true;
-}
-
-JS_PUBLIC_API bool JS::LooselyEqual(JSContext* cx, Handle<Value> value1,
-                                    Handle<Value> value2, bool* equal) {
-  js::AssertHeapIsIdle();
-  CHECK_THREAD(cx);
-  cx->check(value1, value2);
-  MOZ_ASSERT(equal);
-  return js::LooselyEqual(cx, value1, value2, equal);
-}
-
-bool js::StrictlyEqual(JSContext* cx, JS::Handle<JS::Value> lval,
-                       JS::Handle<JS::Value> rval, bool* equal) {
-  if (SameType(lval, rval)) {
-    return EqualGivenSameType(cx, lval, rval, equal);
-  }
-
-  if (lval.isNumber() && rval.isNumber()) {
-    *equal = (lval.toNumber() == rval.toNumber());
-    return true;
-  }
-
-  *equal = false;
-  return true;
-}
-
-JS_PUBLIC_API bool JS::StrictlyEqual(JSContext* cx, Handle<Value> value1,
-                                     Handle<Value> value2, bool* equal) {
-  js::AssertHeapIsIdle();
-  CHECK_THREAD(cx);
-  cx->check(value1, value2);
-  MOZ_ASSERT(equal);
-  return js::StrictlyEqual(cx, value1, value2, equal);
-}
-
-static inline bool IsNegativeZero(const JS::Value& v) {
-  return v.isDouble() && mozilla::IsNegativeZero(v.toDouble());
-}
-
-static inline bool IsNaN(const JS::Value& v) {
-  return v.isDouble() && mozilla::IsNaN(v.toDouble());
-}
-
-bool js::SameValue(JSContext* cx, JS::Handle<JS::Value> v1,
-                   JS::Handle<JS::Value> v2, bool* same) {
-  if (IsNegativeZero(v1)) {
-    *same = IsNegativeZero(v2);
-    return true;
-  }
-
-  if (IsNegativeZero(v2)) {
-    *same = false;
-    return true;
-  }
-
-  if (IsNaN(v1) && IsNaN(v2)) {
-    *same = true;
-    return true;
-  }
-
-  return js::StrictlyEqual(cx, v1, v2, same);
-}
-
-JS_PUBLIC_API bool JS::SameValue(JSContext* cx, Handle<Value> value1,
-                                 Handle<Value> value2, bool* same) {
-  js::AssertHeapIsIdle();
-  CHECK_THREAD(cx);
-  cx->check(value1, value2);
-  MOZ_ASSERT(same);
-  return js::SameValue(cx, value1, value2, same);
-}
deleted file mode 100644
--- a/js/src/vm/EqualityOperations.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: set ts=8 sts=2 et sw=2 tw=80:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * The equality comparisons of js/Equality.h, but with extra efficiency for
- * SpiderMonkey-internal callers.
- *
- * These functions, assuming they're passed C++-valid arguments, are identical
- * to the same-named JS::-namespaced functions -- just with hidden linkage (so
- * they're more efficient to call), and without various external-caller-focused
- * JSAPI-usage assertions performed that SpiderMonkey users never come close to
- * failing.
- */
-
-#ifndef vm_EqualityOperations_h
-#define vm_EqualityOperations_h
-
-#include "js/RootingAPI.h"  // JS::Handle
-#include "js/Value.h"       // JS::Value
-
-struct JSContext;
-
-namespace js {
-
-/** Computes |lval === rval|. */
-extern bool StrictlyEqual(JSContext* cx, JS::Handle<JS::Value> lval,
-                          JS::Handle<JS::Value> rval, bool* equal);
-
-/** Computes |lval == rval|. */
-extern bool LooselyEqual(JSContext* cx, JS::Handle<JS::Value> lval,
-                         JS::Handle<JS::Value> rval, bool* equal);
-
-/**
- * Computes |SameValue(v1, v2)| -- strict equality except that NaNs are
- * considered equal and opposite-signed zeroes are considered unequal.
- */
-extern bool SameValue(JSContext* cx, JS::Handle<JS::Value> v1,
-                      JS::Handle<JS::Value> v2, bool* same);
-
-}  // namespace js
-
-#endif  // vm_EqualityOperations_h
--- a/js/src/vm/GeneratorObject.cpp
+++ b/js/src/vm/GeneratorObject.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "vm/GeneratorObject.h"
 
-#include "js/PropertySpec.h"
 #include "vm/JSObject.h"
 
 #include "vm/ArrayObject-inl.h"
 #include "vm/Debugger-inl.h"
 #include "vm/JSAtom-inl.h"
 #include "vm/JSScript-inl.h"
 #include "vm/NativeObject-inl.h"
 #include "vm/Stack-inl.h"
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -35,17 +35,16 @@
 #include "util/StringBuffer.h"
 #include "vm/AsyncFunction.h"
 #include "vm/AsyncIteration.h"
 #ifdef ENABLE_BIGINT
 #include "vm/BigIntType.h"
 #endif
 #include "vm/BytecodeUtil.h"
 #include "vm/Debugger.h"
-#include "vm/EqualityOperations.h"  // js::StrictlyEqual
 #include "vm/GeneratorObject.h"
 #include "vm/Iteration.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
 #include "vm/JSFunction.h"
 #include "vm/JSObject.h"
 #include "vm/JSScript.h"
 #include "vm/Opcodes.h"
@@ -859,16 +858,209 @@ bool js::HasInstance(JSContext* cx, Hand
   const Class* clasp = obj->getClass();
   RootedValue local(cx, v);
   if (JSHasInstanceOp hasInstance = clasp->getHasInstance()) {
     return hasInstance(cx, obj, &local, bp);
   }
   return JS::InstanceofOperator(cx, obj, local, bp);
 }
 
+static inline bool EqualGivenSameType(JSContext* cx, HandleValue lval,
+                                      HandleValue rval, bool* equal) {
+  MOZ_ASSERT(SameType(lval, rval));
+
+  if (lval.isString()) {
+    return EqualStrings(cx, lval.toString(), rval.toString(), equal);
+  }
+  if (lval.isDouble()) {
+    *equal = (lval.toDouble() == rval.toDouble());
+    return true;
+  }
+#ifdef ENABLE_BIGINT
+  if (lval.isBigInt()) {
+    *equal = BigInt::equal(lval.toBigInt(), rval.toBigInt());
+    return true;
+  }
+#endif
+  if (lval.isGCThing()) {  // objects or symbols
+    *equal = (lval.toGCThing() == rval.toGCThing());
+    return true;
+  }
+  *equal = lval.get().payloadAsRawUint32() == rval.get().payloadAsRawUint32();
+  MOZ_ASSERT_IF(lval.isUndefined() || lval.isNull(), *equal);
+  return true;
+}
+
+static inline bool LooselyEqualBooleanAndOther(JSContext* cx, HandleValue lval,
+                                               HandleValue rval, bool* result) {
+  MOZ_ASSERT(!rval.isBoolean());
+  RootedValue lvalue(cx, Int32Value(lval.toBoolean() ? 1 : 0));
+
+  // The tail-call would end up in Step 3.
+  if (rval.isNumber()) {
+    *result = (lvalue.toNumber() == rval.toNumber());
+    return true;
+  }
+  // The tail-call would end up in Step 6.
+  if (rval.isString()) {
+    double num;
+    if (!StringToNumber(cx, rval.toString(), &num)) {
+      return false;
+    }
+    *result = (lvalue.toNumber() == num);
+    return true;
+  }
+
+  return LooselyEqual(cx, lvalue, rval, result);
+}
+
+// ES6 draft rev32 7.2.12 Abstract Equality Comparison
+bool js::LooselyEqual(JSContext* cx, HandleValue lval, HandleValue rval,
+                      bool* result) {
+  // Step 3.
+  if (SameType(lval, rval)) {
+    return EqualGivenSameType(cx, lval, rval, result);
+  }
+
+  // Handle int32 x double.
+  if (lval.isNumber() && rval.isNumber()) {
+    *result = (lval.toNumber() == rval.toNumber());
+    return true;
+  }
+
+  // Step 4. This a bit more complex, because of the undefined emulating object.
+  if (lval.isNullOrUndefined()) {
+    // We can return early here, because null | undefined is only equal to the
+    // same set.
+    *result = rval.isNullOrUndefined() ||
+              (rval.isObject() && EmulatesUndefined(&rval.toObject()));
+    return true;
+  }
+
+  // Step 5.
+  if (rval.isNullOrUndefined()) {
+    MOZ_ASSERT(!lval.isNullOrUndefined());
+    *result = lval.isObject() && EmulatesUndefined(&lval.toObject());
+    return true;
+  }
+
+  // Step 6.
+  if (lval.isNumber() && rval.isString()) {
+    double num;
+    if (!StringToNumber(cx, rval.toString(), &num)) {
+      return false;
+    }
+    *result = (lval.toNumber() == num);
+    return true;
+  }
+
+  // Step 7.
+  if (lval.isString() && rval.isNumber()) {
+    double num;
+    if (!StringToNumber(cx, lval.toString(), &num)) {
+      return false;
+    }
+    *result = (num == rval.toNumber());
+    return true;
+  }
+
+  // Step 8.
+  if (lval.isBoolean()) {
+    return LooselyEqualBooleanAndOther(cx, lval, rval, result);
+  }
+
+  // Step 9.
+  if (rval.isBoolean()) {
+    return LooselyEqualBooleanAndOther(cx, rval, lval, result);
+  }
+
+  // Step 10.
+  if ((lval.isString() || lval.isNumber() || lval.isSymbol()) &&
+      rval.isObject()) {
+    RootedValue rvalue(cx, rval);
+    if (!ToPrimitive(cx, &rvalue)) {
+      return false;
+    }
+    return LooselyEqual(cx, lval, rvalue, result);
+  }
+
+  // Step 11.
+  if (lval.isObject() &&
+      (rval.isString() || rval.isNumber() || rval.isSymbol())) {
+    RootedValue lvalue(cx, lval);
+    if (!ToPrimitive(cx, &lvalue)) {
+      return false;
+    }
+    return LooselyEqual(cx, lvalue, rval, result);
+  }
+
+#ifdef ENABLE_BIGINT
+  if (lval.isBigInt()) {
+    RootedBigInt lbi(cx, lval.toBigInt());
+    bool tmpResult;
+    JS_TRY_VAR_OR_RETURN_FALSE(cx, tmpResult,
+                               BigInt::looselyEqual(cx, lbi, rval));
+    *result = tmpResult;
+    return true;
+  }
+
+  if (rval.isBigInt()) {
+    RootedBigInt rbi(cx, rval.toBigInt());
+    bool tmpResult;
+    JS_TRY_VAR_OR_RETURN_FALSE(cx, tmpResult,
+                               BigInt::looselyEqual(cx, rbi, lval));
+    *result = tmpResult;
+    return true;
+  }
+#endif
+
+  // Step 12.
+  *result = false;
+  return true;
+}
+
+bool js::StrictlyEqual(JSContext* cx, HandleValue lval, HandleValue rval,
+                       bool* equal) {
+  if (SameType(lval, rval)) {
+    return EqualGivenSameType(cx, lval, rval, equal);
+  }
+
+  if (lval.isNumber() && rval.isNumber()) {
+    *equal = (lval.toNumber() == rval.toNumber());
+    return true;
+  }
+
+  *equal = false;
+  return true;
+}
+
+static inline bool IsNegativeZero(const Value& v) {
+  return v.isDouble() && mozilla::IsNegativeZero(v.toDouble());
+}
+
+static inline bool IsNaN(const Value& v) {
+  return v.isDouble() && mozilla::IsNaN(v.toDouble());
+}
+
+bool js::SameValue(JSContext* cx, HandleValue v1, HandleValue v2, bool* same) {
+  if (IsNegativeZero(v1)) {
+    *same = IsNegativeZero(v2);
+    return true;
+  }
+  if (IsNegativeZero(v2)) {
+    *same = false;
+    return true;
+  }
+  if (IsNaN(v1) && IsNaN(v2)) {
+    *same = true;
+    return true;
+  }
+  return StrictlyEqual(cx, v1, v2, same);
+}
+
 JSType js::TypeOfObject(JSObject* obj) {
   if (EmulatesUndefined(obj)) {
     return JSTYPE_UNDEFINED;
   }
   if (obj->isCallable()) {
     return JSTYPE_FUNCTION;
   }
   return JSTYPE_OBJECT;
@@ -2451,26 +2643,24 @@ static MOZ_NEVER_INLINE JS_HAZ_JSNATIVE_
 
     CASE(JSOP_NE) {
       if (!LooseEqualityOp<false>(cx, REGS)) {
         goto error;
       }
     }
     END_CASE(JSOP_NE)
 
-#define STRICT_EQUALITY_OP(OP, COND)                  \
-  JS_BEGIN_MACRO                                      \
-    HandleValue lval = REGS.stackHandleAt(-2);        \
-    HandleValue rval = REGS.stackHandleAt(-1);        \
-    bool equal;                                       \
-    if (!js::StrictlyEqual(cx, lval, rval, &equal)) { \
-      goto error;                                     \
-    }                                                 \
-    (COND) = equal OP true;                           \
-    REGS.sp--;                                        \
+#define STRICT_EQUALITY_OP(OP, COND)                        \
+  JS_BEGIN_MACRO                                            \
+    HandleValue lval = REGS.stackHandleAt(-2);              \
+    HandleValue rval = REGS.stackHandleAt(-1);              \
+    bool equal;                                             \
+    if (!StrictlyEqual(cx, lval, rval, &equal)) goto error; \
+    (COND) = equal OP true;                                 \
+    REGS.sp--;                                              \
   JS_END_MACRO
 
     CASE(JSOP_STRICTEQ) {
       bool cond;
       STRICT_EQUALITY_OP(==, cond);
       REGS.sp[-1].setBoolean(cond);
     }
     END_CASE(JSOP_STRICTEQ)
--- a/js/src/vm/Interpreter.h
+++ b/js/src/vm/Interpreter.h
@@ -284,16 +284,26 @@ inline void RunState::setReturnValue(con
     asInvoke()->setReturnValue(v);
   } else {
     asExecute()->setReturnValue(v);
   }
 }
 
 extern bool RunScript(JSContext* cx, RunState& state);
 
+extern bool StrictlyEqual(JSContext* cx, HandleValue lval, HandleValue rval,
+                          bool* equal);
+
+extern bool LooselyEqual(JSContext* cx, HandleValue lval, HandleValue rval,
+                         bool* equal);
+
+/* === except that NaN is the same as NaN and -0 is not the same as +0. */
+extern bool SameValue(JSContext* cx, HandleValue v1, HandleValue v2,
+                      bool* same);
+
 extern JSType TypeOfObject(JSObject* obj);
 
 extern JSType TypeOfValue(const Value& v);
 
 extern bool HasInstance(JSContext* cx, HandleObject obj, HandleValue v,
                         bool* bp);
 
 // Unwind environment chain and iterator to match the scope corresponding to
--- a/js/src/vm/Iteration.cpp
+++ b/js/src/vm/Iteration.cpp
@@ -22,17 +22,16 @@
 #include "jstypes.h"
 #include "jsutil.h"
 
 #include "builtin/Array.h"
 #include "builtin/SelfHostingDefines.h"
 #include "ds/Sort.h"
 #include "gc/FreeOp.h"
 #include "gc/Marking.h"
-#include "js/PropertySpec.h"
 #include "js/Proxy.h"
 #include "vm/BytecodeUtil.h"
 #include "vm/GeneratorObject.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/JSAtom.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
--- a/js/src/vm/JSFunction.cpp
+++ b/js/src/vm/JSFunction.cpp
@@ -30,17 +30,16 @@
 #include "frontend/BytecodeCompiler.h"
 #include "frontend/TokenStream.h"
 #include "gc/Marking.h"
 #include "gc/Policy.h"
 #include "jit/InlinableNatives.h"
 #include "jit/Ion.h"
 #include "js/CallNonGenericMethod.h"
 #include "js/CompileOptions.h"
-#include "js/PropertySpec.h"
 #include "js/Proxy.h"
 #include "js/SourceText.h"
 #include "js/StableStringChars.h"
 #include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "vm/AsyncFunction.h"
 #include "vm/AsyncIteration.h"
 #include "vm/Debugger.h"
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -32,18 +32,16 @@
 #include "builtin/Object.h"
 #include "builtin/String.h"
 #include "builtin/Symbol.h"
 #include "frontend/BytecodeCompiler.h"
 #include "gc/Policy.h"
 #include "jit/BaselineJIT.h"
 #include "js/CharacterEncoding.h"
 #include "js/MemoryMetrics.h"
-#include "js/PropertyDescriptor.h"  // JS::FromPropertyDescriptor
-#include "js/PropertySpec.h"
 #include "js/Proxy.h"
 #include "js/UbiNode.h"
 #include "js/UniquePtr.h"
 #include "js/Wrapper.h"
 #include "util/Text.h"
 #include "util/Windows.h"
 #include "vm/ArgumentsObject.h"
 #include "vm/BytecodeUtil.h"
--- a/js/src/vm/NativeObject.cpp
+++ b/js/src/vm/NativeObject.cpp
@@ -11,17 +11,16 @@
 #include "mozilla/CheckedInt.h"
 #include "mozilla/DebugOnly.h"
 
 #include "gc/Marking.h"
 #include "jit/BaselineIC.h"
 #include "js/CharacterEncoding.h"
 #include "js/Value.h"
 #include "vm/Debugger.h"
-#include "vm/EqualityOperations.h"  // js::SameValue
 #include "vm/TypedArrayObject.h"
 #include "vm/UnboxedObject.h"
 
 #include "gc/Nursery-inl.h"
 #include "vm/ArrayObject-inl.h"
 #include "vm/EnvironmentObject-inl.h"
 #include "vm/JSObject-inl.h"
 #include "vm/JSScript-inl.h"
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -61,16 +61,17 @@ using mozilla::Atomic;
 using mozilla::DebugOnly;
 using mozilla::NegativeInfinity;
 using mozilla::PodZero;
 using mozilla::PositiveInfinity;
 
 /* static */ MOZ_THREAD_LOCAL(JSContext*) js::TlsContext;
 /* static */ Atomic<size_t> JSRuntime::liveRuntimesCount;
 Atomic<JS::LargeAllocationFailureCallback> js::OnLargeAllocationFailure;
+Atomic<JS::BuildIdOp> js::GetBuildId;
 
 namespace js {
 bool gCanUseExtraThreads = true;
 }  // namespace js
 
 void js::DisableExtraThreads() { gCanUseExtraThreads = false; }
 
 const JSSecurityCallbacks js::NullSecurityCallbacks = {};
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -25,17 +25,16 @@
 #include "builtin/AtomicsObject.h"
 #include "builtin/intl/SharedIntlData.h"
 #include "builtin/Promise.h"
 #include "frontend/BinSourceRuntimeSupport.h"
 #include "frontend/NameCollections.h"
 #include "gc/GCRuntime.h"
 #include "gc/Tracer.h"
 #include "irregexp/RegExpStack.h"
-#include "js/BuildId.h"  // JS::BuildIdOp
 #include "js/Debug.h"
 #include "js/GCVector.h"
 #include "js/HashTable.h"
 #ifdef DEBUG
 #include "js/Proxy.h"  // For AutoEnterPolicy
 #endif
 #include "js/Stream.h"
 #include "js/Symbol.h"
--- a/js/src/vm/SavedStacks.cpp
+++ b/js/src/vm/SavedStacks.cpp
@@ -20,17 +20,16 @@
 #include "jsnum.h"
 
 #include "gc/FreeOp.h"
 #include "gc/HashUtil.h"
 #include "gc/Marking.h"
 #include "gc/Policy.h"
 #include "gc/Rooting.h"
 #include "js/CharacterEncoding.h"
-#include "js/PropertySpec.h"
 #include "js/SavedFrameAPI.h"
 #include "js/Vector.h"
 #include "util/StringBuffer.h"
 #include "vm/Debugger.h"
 #include "vm/GeckoProfiler.h"
 #include "vm/JSScript.h"
 #include "vm/Realm.h"
 #include "vm/SavedFrame.h"
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -33,17 +33,16 @@
 #include "builtin/WeakMapObject.h"
 #include "gc/Marking.h"
 #include "gc/Policy.h"
 #include "jit/AtomicOperations.h"
 #include "jit/InlinableNatives.h"
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/Date.h"
-#include "js/PropertySpec.h"
 #include "js/StableStringChars.h"
 #include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "vm/ArgumentsObject.h"
 #include "vm/Compression.h"
 #include "vm/GeneratorObject.h"
 #include "vm/Interpreter.h"
 #include "vm/Iteration.h"
--- a/js/src/vm/SharedArrayObject.cpp
+++ b/js/src/vm/SharedArrayObject.cpp
@@ -8,17 +8,16 @@
 
 #include "mozilla/Atomics.h"
 #include "mozilla/CheckedInt.h"
 
 #include "jsfriendapi.h"
 
 #include "gc/FreeOp.h"
 #include "jit/AtomicOperations.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "vm/SharedMem.h"
 #include "wasm/WasmSignalHandlers.h"
 #include "wasm/WasmTypes.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -25,17 +25,16 @@
 
 #include "builtin/Array.h"
 #include "builtin/DataViewObject.h"
 #include "builtin/TypedObjectConstants.h"
 #include "gc/Barrier.h"
 #include "gc/Marking.h"
 #include "jit/InlinableNatives.h"
 #include "js/Conversions.h"
-#include "js/PropertySpec.h"
 #include "js/UniquePtr.h"
 #include "js/Wrapper.h"
 #include "util/Windows.h"
 #include "vm/ArrayBufferObject.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
--- a/js/src/vm/Xdr.cpp
+++ b/js/src/vm/Xdr.cpp
@@ -14,17 +14,16 @@
 #include <algorithm>  // std::transform
 #include <string.h>
 #include <type_traits>  // std::is_same
 #include <utility>      // std::move
 
 #include "jsapi.h"
 #include "jsutil.h"
 
-#include "js/BuildId.h"  // JS::BuildIdCharVector
 #include "vm/Debugger.h"
 #include "vm/EnvironmentObject.h"
 #include "vm/JSContext.h"
 #include "vm/JSScript.h"
 #include "vm/TraceLogging.h"
 
 using namespace js;
 
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -29,17 +29,16 @@
 
 #include "jsmath.h"
 #include "jsutil.h"
 
 #include "builtin/String.h"
 #include "frontend/ParseNode.h"
 #include "frontend/Parser.h"
 #include "gc/Policy.h"
-#include "js/BuildId.h"  // JS::BuildIdCharVector
 #include "js/MemoryMetrics.h"
 #include "js/Printf.h"
 #include "js/SourceText.h"
 #include "js/StableStringChars.h"
 #include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "util/Text.h"
 #include "vm/ErrorReporting.h"
--- a/js/src/wasm/WasmJS.cpp
+++ b/js/src/wasm/WasmJS.cpp
@@ -24,17 +24,16 @@
 #include "mozilla/RangedPtr.h"
 
 #include "builtin/Promise.h"
 #include "builtin/TypedObject.h"
 #include "gc/FreeOp.h"
 #include "jit/AtomicOperations.h"
 #include "jit/JitOptions.h"
 #include "js/Printf.h"
-#include "js/PropertySpec.h"  // JS_{PS,FN}{,_END}
 #include "util/StringBuffer.h"
 #include "util/Text.h"
 #include "vm/Interpreter.h"
 #include "vm/StringType.h"
 #include "wasm/WasmBaselineCompile.h"
 #include "wasm/WasmCompile.h"
 #include "wasm/WasmInstance.h"
 #include "wasm/WasmIonCompile.h"
--- a/js/src/wasm/WasmModule.cpp
+++ b/js/src/wasm/WasmModule.cpp
@@ -18,17 +18,16 @@
 
 #include "wasm/WasmModule.h"
 
 #include <chrono>
 #include <thread>
 
 #include "builtin/TypedObject.h"
 #include "jit/JitOptions.h"
-#include "js/BuildId.h"  // JS::BuildIdCharVector
 #include "threading/LockGuard.h"
 #include "util/NSPR.h"
 #include "wasm/WasmCompile.h"
 #include "wasm/WasmInstance.h"
 #include "wasm/WasmJS.h"
 #include "wasm/WasmSerialize.h"
 
 #include "vm/ArrayBufferObject-inl.h"
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -15,17 +15,16 @@
 #ifdef XP_WIN
 #include <windows.h>
 #endif
 
 #include "jsapi.h"
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/Printf.h"
-#include "js/PropertySpec.h"
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsExceptionHandler.h"
 #include "nsIComponentManager.h"
 #include "mozilla/Module.h"
 #include "nsIFile.h"
 #include "mozJSComponentLoader.h"
 #include "mozJSLoaderUtils.h"
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -7,17 +7,16 @@
 /*
  * The Components.Sandbox object.
  */
 
 #include "AccessCheck.h"
 #include "jsfriendapi.h"
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
-#include "js/PropertySpec.h"
 #include "js/Proxy.h"
 #include "js/SourceText.h"
 #include "js/StructuredClone.h"
 #include "nsContentUtils.h"
 #include "nsGlobalWindow.h"
 #include "nsIException.h"  // for nsIStackFrame
 #include "nsIScriptContext.h"
 #include "nsIScriptObjectPrincipal.h"
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -37,17 +37,16 @@
 #include "mozilla/dom/ScriptLoader.h"
 #include "mozilla/dom/ScriptSettings.h"
 
 #include "nsContentUtils.h"
 #include "nsCCUncollectableMarker.h"
 #include "nsCycleCollectionNoteRootCallback.h"
 #include "nsCycleCollector.h"
 #include "jsapi.h"
-#include "js/BuildId.h"  // JS::BuildIdCharVector, JS::SetProcessBuildIdOp
 #include "js/MemoryFunctions.h"
 #include "js/MemoryMetrics.h"
 #include "js/UbiNode.h"
 #include "js/UbiNodeUtils.h"
 #include "mozilla/dom/GeneratedAtomList.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/WindowBinding.h"
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsXULAppAPI.h"
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "js/CharacterEncoding.h"
 #include "js/CompilationAndEvaluation.h"
 #include "js/Printf.h"
-#include "js/PropertySpec.h"
 #include "mozilla/ChaosMode.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/Preferences.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsExceptionHandler.h"
 #include "nsIServiceManager.h"
 #include "nsIFile.h"
--- a/js/xpconnect/src/xpcpublic.h
+++ b/js/xpconnect/src/xpcpublic.h
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef xpcpublic_h
 #define xpcpublic_h
 
 #include "jsapi.h"
-#include "js/BuildId.h"  // JS::BuildIdCharVector
 #include "js/HeapAPI.h"
 #include "js/GCAPI.h"
 #include "js/Proxy.h"
 #include "js/Wrapper.h"
 
 #include "nsAtom.h"
 #include "nsISupports.h"
 #include "nsIURI.h"
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -12,17 +12,16 @@
 #include "nsIScriptError.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ScriptSettings.h"
 
 #include "XPCWrapper.h"
 #include "xpcprivate.h"
 
 #include "jsapi.h"
-#include "js/PropertySpec.h"
 #include "nsJSUtils.h"
 #include "nsPrintfCString.h"
 
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/BrowsingContext.h"
 #include "mozilla/dom/WindowBinding.h"
 #include "mozilla/dom/XrayExpandoClass.h"
--- a/netwerk/base/ProxyAutoConfig.cpp
+++ b/netwerk/base/ProxyAutoConfig.cpp
@@ -11,17 +11,16 @@
 #include "nsIDNSService.h"
 #include "nsINamed.h"
 #include "nsThreadUtils.h"
 #include "nsIConsoleService.h"
 #include "nsIURLParser.h"
 #include "nsJSUtils.h"
 #include "jsfriendapi.h"
 #include "js/CompilationAndEvaluation.h"
-#include "js/PropertySpec.h"
 #include "js/SourceText.h"
 #include "js/Utility.h"
 #include "prnetdb.h"
 #include "nsITimer.h"
 #include "mozilla/net/DNS.h"
 #include "mozilla/Utf8.h"
 #include "nsServiceManagerUtils.h"
 #include "nsNetCID.h"
--- a/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
+++ b/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FinalizationWitnessService.h"
 
 #include "nsString.h"
 #include "jsapi.h"
 #include "js/CallNonGenericMethod.h"
-#include "js/PropertySpec.h"
 #include "mozJSComponentLoader.h"
 #include "nsZipArchive.h"
 
 #include "mozilla/Scoped.h"
 #include "mozilla/Services.h"
 #include "nsIObserverService.h"
 #include "nsThreadUtils.h"
 
--- a/toolkit/components/mozintl/MozIntlHelper.cpp
+++ b/toolkit/components/mozintl/MozIntlHelper.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MozIntlHelper.h"
 #include "jsapi.h"
-#include "js/PropertySpec.h"
 #include "js/Wrapper.h"
 #include "mozilla/ModuleUtils.h"
 
 #define MOZ_MOZINTLHELPER_CID                        \
   {                                                  \
     0xb43c96be, 0x2b3a, 0x4dc4, {                    \
       0x90, 0xe9, 0xb0, 0x6d, 0x34, 0x21, 0x9b, 0x68 \
     }                                                \
--- a/toolkit/recordreplay/ipc/JSControl.cpp
+++ b/toolkit/recordreplay/ipc/JSControl.cpp
@@ -6,17 +6,16 @@
 
 #include "JSControl.h"
 
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/StaticPtr.h"
 #include "js/CharacterEncoding.h"
 #include "js/Conversions.h"
 #include "js/JSON.h"
-#include "js/PropertySpec.h"
 #include "ChildInternal.h"
 #include "ParentInternal.h"
 #include "nsImportModule.h"
 #include "rrIReplay.h"
 #include "xpcprivate.h"
 
 using namespace JS;