aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/dateparser.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-07-05 14:40:13 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-07-05 14:51:29 -0700
commit149562555c9bf56457dee9a1ad70c53ed670a776 (patch)
treef6217cf3c54ddbee03f37247a3c7c75203f868fd /deps/v8/src/dateparser.cc
parentf08720606757577d95bd09b48697c7decbf17f00 (diff)
downloadandroid-node-v8-149562555c9bf56457dee9a1ad70c53ed670a776.tar.gz
android-node-v8-149562555c9bf56457dee9a1ad70c53ed670a776.tar.bz2
android-node-v8-149562555c9bf56457dee9a1ad70c53ed670a776.zip
Downgrade V8 to 3.1.8.25
There are serious performance regressions both in V8 and our own legacy networking stack. Until we correct our own problems we are going back to the old V8.
Diffstat (limited to 'deps/v8/src/dateparser.cc')
-rw-r--r--deps/v8/src/dateparser.cc42
1 files changed, 4 insertions, 38 deletions
diff --git a/deps/v8/src/dateparser.cc b/deps/v8/src/dateparser.cc
index 4a0721fe83..6d8048876f 100644
--- a/deps/v8/src/dateparser.cc
+++ b/deps/v8/src/dateparser.cc
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -44,7 +44,7 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
int day = kNone;
if (named_month_ == kNone) {
- if (is_iso_date_ || (index_ == 3 && !IsDay(comp_[0]))) {
+ if (index_ == 3 && !IsDay(comp_[0])) {
// YMD
year = comp_[0];
month = comp_[1];
@@ -71,10 +71,8 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
}
}
- if (!is_iso_date_) {
- if (Between(year, 0, 49)) year += 2000;
- else if (Between(year, 50, 99)) year += 1900;
- }
+ if (Between(year, 0, 49)) year += 2000;
+ else if (Between(year, 50, 99)) year += 1900;
if (!Smi::IsValid(year) || !IsMonth(month) || !IsDay(day)) return false;
@@ -153,7 +151,6 @@ const int8_t DateParser::KeywordTable::
{'m', 's', 't', DateParser::TIME_ZONE_NAME, -7},
{'p', 'd', 't', DateParser::TIME_ZONE_NAME, -7},
{'p', 's', 't', DateParser::TIME_ZONE_NAME, -8},
- {'t', '\0', '\0', DateParser::TIME_SEPARATOR, 0},
{'\0', '\0', '\0', DateParser::INVALID, 0},
};
@@ -178,35 +175,4 @@ int DateParser::KeywordTable::Lookup(const uint32_t* pre, int len) {
}
-int DateParser::ReadMilliseconds(DateToken token) {
- // Read first three significant digits of the original numeral,
- // as inferred from the value and the number of digits.
- // I.e., use the number of digits to see if there were
- // leading zeros.
- int number = token.number();
- int length = token.length();
- if (length < 3) {
- // Less than three digits. Multiply to put most significant digit
- // in hundreds position.
- if (length == 1) {
- number *= 100;
- } else if (length == 2) {
- number *= 10;
- }
- } else if (length > 3) {
- if (length > kMaxSignificantDigits) length = kMaxSignificantDigits;
- // More than three digits. Divide by 10^(length - 3) to get three
- // most significant digits.
- int factor = 1;
- do {
- ASSERT(factor <= 100000000); // factor won't overflow.
- factor *= 10;
- length--;
- } while (length > 3);
- number /= factor;
- }
- return number;
-}
-
-
} } // namespace v8::internal