Browse Source

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
v0.11.10-release
Fedor Indutny 11 years ago
parent
commit
2394b974cc
  1. 44
      deps/v8/src/runtime.cc

44
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<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

Loading…
Cancel
Save