aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/unicode.cc
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-07-20 13:18:42 +0200
committerRyan <ry@tinyclouds.org>2009-07-20 13:18:42 +0200
commit88e9a5f122822b96e0ccfbba2083fe6ef43f3fdc (patch)
tree3cad417de864555fd27d573af866f2a1b3c352ad /deps/v8/src/unicode.cc
parentf4dfbe37a3f1fef2c91068958dfe1888ba100332 (diff)
downloadandroid-node-v8-88e9a5f122822b96e0ccfbba2083fe6ef43f3fdc.tar.gz
android-node-v8-88e9a5f122822b96e0ccfbba2083fe6ef43f3fdc.tar.bz2
android-node-v8-88e9a5f122822b96e0ccfbba2083fe6ef43f3fdc.zip
Upgrade V8 to 1.2.14
Diffstat (limited to 'deps/v8/src/unicode.cc')
-rw-r--r--deps/v8/src/unicode.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/deps/v8/src/unicode.cc b/deps/v8/src/unicode.cc
index 4a9e070ac5..ef1359321f 100644
--- a/deps/v8/src/unicode.cc
+++ b/deps/v8/src/unicode.cc
@@ -194,18 +194,13 @@ static int LookupMapping(const int32_t* table,
uchar Utf8::CalculateValue(const byte* str,
unsigned length,
unsigned* cursor) {
- static const uchar kMaxOneByteChar = 0x7F;
- static const uchar kMaxTwoByteChar = 0x7FF;
- static const uchar kMaxThreeByteChar = 0xFFFF;
- static const uchar kMaxFourByteChar = 0x1FFFFF;
-
// We only get called for non-ascii characters.
if (length == 1) {
*cursor += 1;
return kBadChar;
}
- int first = str[0];
- int second = str[1] ^ 0x80;
+ byte first = str[0];
+ byte second = str[1] ^ 0x80;
if (second & 0xC0) {
*cursor += 1;
return kBadChar;
@@ -227,7 +222,7 @@ uchar Utf8::CalculateValue(const byte* str,
*cursor += 1;
return kBadChar;
}
- int third = str[2] ^ 0x80;
+ byte third = str[2] ^ 0x80;
if (third & 0xC0) {
*cursor += 1;
return kBadChar;
@@ -245,7 +240,7 @@ uchar Utf8::CalculateValue(const byte* str,
*cursor += 1;
return kBadChar;
}
- int fourth = str[3] ^ 0x80;
+ byte fourth = str[3] ^ 0x80;
if (fourth & 0xC0) {
*cursor += 1;
return kBadChar;