From 2394b974cc2bc5fe93c901319895599d22fdca20 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 19 Dec 2013 12:51:34 +0400 Subject: [PATCH] deps: v8 apply temporary fix until backport 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 | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/deps/v8/src/runtime.cc b/deps/v8/src/runtime.cc index 0402214..7d28e1e 100644 --- a/deps/v8/src/runtime.cc +++ b/deps/v8/src/runtime.cc @@ -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 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 -- 2.7.4