Bug 1517259 - Part 13: Move the default getIndexValue method into the anonymous namespace. r=jandem
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 03 Jan 2019 02:56:06 -0800
changeset 509958 500c1db3053317312cba1fb8abf93da49d36e862
parent 509957 5259ce5b5a406ca59b08d42c88435c99e7352bdd
child 509959 62605bf1938a7b756114136114321ea97ac27770
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)
reviewersjandem
bugs1517259
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517259 - Part 13: Move the default getIndexValue method into the anonymous namespace. r=jandem
js/src/vm/TypedArrayObject.cpp
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -1611,30 +1611,30 @@ static const ClassSpec TypedArrayObjectS
     TypedArrayObject::protoAccessors,
     nullptr,
     ClassSpec::DontDefineConstructor};
 
 /* static */ const Class TypedArrayObject::sharedTypedArrayPrototypeClass = {
     "TypedArrayPrototype", JSCLASS_HAS_CACHED_PROTO(JSProto_TypedArray),
     JS_NULL_CLASS_OPS, &TypedArrayObjectSharedTypedArrayPrototypeClassSpec};
 
+namespace {
+
 // this default implementation is only valid for integer types
 // less than 32-bits in size.
 template <typename NativeType>
 Value TypedArrayObjectTemplate<NativeType>::getIndexValue(
     TypedArrayObject* tarray, uint32_t index) {
   static_assert(sizeof(NativeType) < 4,
                 "this method must only handle NativeType values that are "
                 "always exact int32_t values");
 
   return Int32Value(getIndex(tarray, index));
 }
 
-namespace {
-
 // and we need to specialize for 32-bit integers and floats
 template <>
 Value TypedArrayObjectTemplate<int32_t>::getIndexValue(TypedArrayObject* tarray,
                                                        uint32_t index) {
   return Int32Value(getIndex(tarray, index));
 }
 
 template <>