Bug 1703596 - Remove JSID_IS_ATOM from js/src/jit/VMFunctions.cpp. r=mgaudet
authorbukola <bukky.akinnadeju17@gmail.com>
Wed, 14 Apr 2021 14:35:02 +0000
changeset 575901 0fc141f13f6f18e6c16ef7af9b78bdb94d202bb0
parent 575900 a41321339c728d579ec8990f185746e121711a3c
child 575902 2a778a05368b539ccae766ba5ea528ec7073cfd6
push id38374
push usernbeleuzu@mozilla.com
push dateThu, 15 Apr 2021 04:00:11 +0000
treeherdermozilla-central@3b9876116bf1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgaudet
bugs1703596
milestone89.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 1703596 - Remove JSID_IS_ATOM from js/src/jit/VMFunctions.cpp. r=mgaudet Differential Revision: https://phabricator.services.mozilla.com/D111911
js/src/jit/VMFunctions.cpp
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -1784,19 +1784,19 @@ bool EqualStringsHelperPure(JSString* st
   if (!str2Linear) {
     return false;
   }
 
   return EqualChars(&str1->asLinear(), str2Linear);
 }
 
 static bool MaybeTypedArrayIndexString(jsid id) {
-  MOZ_ASSERT(JSID_IS_ATOM(id) || JSID_IS_SYMBOL(id));
-
-  if (MOZ_LIKELY(JSID_IS_ATOM(id))) {
+  MOZ_ASSERT(id.isAtom() || JSID_IS_SYMBOL(id));
+
+  if (MOZ_LIKELY(id.isAtom())) {
     JSAtom* str = JSID_TO_ATOM(id);
     if (str->length() > 0) {
       // Only check the first character because we want this function to be
       // fast.
       return CanStartTypedArrayIndex(str->latin1OrTwoByteChar(0));
     }
   }
   return false;
@@ -1806,17 +1806,17 @@ static MOZ_ALWAYS_INLINE bool GetNativeD
                                                         NativeObject* obj,
                                                         jsid id, Value* vp) {
   // Fast path used by megamorphic IC stubs. Unlike our other property
   // lookup paths, this is optimized to be as fast as possible for simple
   // data property lookups.
 
   AutoUnsafeCallWithABI unsafe;
 
-  MOZ_ASSERT(JSID_IS_ATOM(id) || JSID_IS_SYMBOL(id));
+  MOZ_ASSERT(id.isAtom() || JSID_IS_SYMBOL(id));
 
   while (true) {
     if (Shape* shape = obj->lastProperty()->search(cx, id)) {
       if (!shape->isDataProperty()) {
         return false;
       }
 
       *vp = obj->getSlot(shape->slot());