deps: v8 apply temporary fix until backport
authorFedor Indutny <fedor.indutny@gmail.com>
Thu, 19 Dec 2013 08:51:34 +0000 (12:51 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Thu, 19 Dec 2013 08:51:34 +0000 (12:51 +0400)
Fix node.js debug build with a temporary v8 fix until the v8 team will
backport the fix from the more recent version of v8.

see https://code.google.com/p/v8/issues/detail?id=3062

deps/v8/src/runtime.cc

index 0402214..7d28e1e 100644 (file)
@@ -6364,6 +6364,28 @@ static inline uintptr_t AsciiRangeMask(uintptr_t w, char m, char n) {
   return (tmp1 & tmp2 & (kOneInEveryByte * 0x80));
 }
 
+#ifdef DEBUG
+static bool CheckFastAsciiConvert(char* dst,
+                                  char* src,
+                                  int length,
+                                  bool changed,
+                                  bool is_to_lower) {
+  bool expected_changed = false;
+  for (int i = 0; i < length; i++) {
+    if (dst[i] == src[i]) continue;
+    expected_changed = true;
+    if (is_to_lower) {
+      ASSERT('A' <= src[i] && src[i] <= 'Z');
+      ASSERT(dst[i] == src[i] + ('a' - 'A'));
+    } else {
+      ASSERT('a' <= src[i] && src[i] <= 'z');
+      ASSERT(dst[i] == src[i] - ('a' - 'A'));
+    }
+  }
+  return (expected_changed == changed);
+}
+#endif
+
 
 template<class Converter>
 static bool FastAsciiConvert(char* dst,
@@ -6436,28 +6458,6 @@ static bool FastAsciiConvert(char* dst,
   return true;
 }
 
-#ifdef DEBUG
-static bool CheckFastAsciiConvert(char* dst,
-                                  char* src,
-                                  int length,
-                                  bool changed,
-                                  bool is_to_lower) {
-  bool expected_changed = false;
-  for (int i = 0; i < length; i++) {
-    if (dst[i] == src[i]) continue;
-    expected_changed = true;
-    if (is_to_lower) {
-      ASSERT('A' <= src[i] && src[i] <= 'Z');
-      ASSERT(dst[i] == src[i] + ('a' - 'A'));
-    } else {
-      ASSERT('a' <= src[i] && src[i] <= 'z');
-      ASSERT(dst[i] == src[i] - ('a' - 'A'));
-    }
-  }
-  return (expected_changed == changed);
-}
-#endif
-
 }  // namespace