Unreviewed, another attempt at fixing the Windows build.
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2018 21:44:52 +0000 (21:44 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Mar 2018 21:44:52 +0000 (21:44 +0000)
I guess the pragma must be outside the function...

* jit/CCallHelpers.h:
(JSC::CCallHelpers::clampArrayToSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229432 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/CCallHelpers.h

index 5a872e4..a3ea93c 100644 (file)
@@ -1,5 +1,13 @@
 2018-03-08  Keith Miller  <keith_miller@apple.com>
 
+        Unreviewed, another attempt at fixing the Windows build.
+        I guess the pragma must be outside the function...
+
+        * jit/CCallHelpers.h:
+        (JSC::CCallHelpers::clampArrayToSize):
+
+2018-03-08  Keith Miller  <keith_miller@apple.com>
+
         Unreviewed, one last try at fixing the windows build before rollout.
 
         * jit/CCallHelpers.h:
index e94d2b4..352214b 100644 (file)
@@ -248,15 +248,17 @@ private:
         std::array<FPRReg, FPRInfo::numberOfRegisters> fprDestinations;
     };
 
+#if COMPILER(MSVC)
+#pragma warning(push)
+#pragma warning(disable: 4701)
+#endif
+
     template<unsigned TargetSize, typename RegType>
     std::array<RegType, TargetSize> clampArrayToSize(std::array<RegType, InfoTypeForReg<RegType>::numberOfRegisters> sourceArray)
     {
         static_assert(TargetSize <= sourceArray.size(), "TargetSize is bigger than source.size()");
         RELEASE_ASSERT(TargetSize <= InfoTypeForReg<RegType>::numberOfRegisters);
-#if COMPILER(MSVC)
-#pragma warning(push)
-#pragma warning(disable: 4701)
-#endif
+
         std::array<RegType, TargetSize> result;
 
         for (unsigned i = 0; i < TargetSize; i++) {
@@ -265,10 +267,11 @@ private:
         }
 
         return result;
+    }
+
 #if COMPILER(MSVC)
 #pragma warning(pop)
 #endif
-    }
 
     template<typename ArgType>
     ALWAYS_INLINE void pokeForArgument(ArgType arg, unsigned currentGPRArgument, unsigned currentFPRArgument, unsigned extraPoke)