Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update V8 to 4.6.85.28 #3484

Merged
merged 1 commit into from
Oct 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 6
#define V8_BUILD_NUMBER 85
#define V8_PATCH_LEVEL 25
#define V8_PATCH_LEVEL 28

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
24 changes: 14 additions & 10 deletions deps/v8/src/dateparser-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ bool DateParser::Parse(Vector<Char> str,
DayComposer day;

// Specification:
// Accept ES6 ISO 8601 date-time-strings or legacy dates compatible
// Accept ES5 ISO 8601 date-time-strings or legacy dates compatible
// with Safari.
// ES6 ISO 8601 dates:
// ES5 ISO 8601 dates:
// [('-'|'+')yy]yyyy[-MM[-DD]][THH:mm[:ss[.sss]][Z|(+|-)hh:mm]]
// where yyyy is in the range 0000..9999 and
// +/-yyyyyy is in the range -999999..+999999 -
Expand All @@ -40,7 +40,8 @@ bool DateParser::Parse(Vector<Char> str,
// sss is in the range 000..999,
// hh is in the range 00..23,
// mm, ss, and sss default to 00 if missing, and
// timezone defaults to local time if missing.
// timezone defaults to Z if missing
// (following Safari, ISO actually demands local time).
// Extensions:
// We also allow sss to have more or less than three digits (but at
// least one).
Expand All @@ -62,13 +63,15 @@ bool DateParser::Parse(Vector<Char> str,
// is allowed).
// Intersection of the two:
// A string that matches both formats (e.g. 1970-01-01) will be
// parsed as an ES6 date-time string.
// After a valid "T" has been read while scanning an ES6 datetime string,
// parsed as an ES5 date-time string - which means it will default
// to UTC time-zone. That's unavoidable if following the ES5
// specification.
// After a valid "T" has been read while scanning an ES5 datetime string,
// the input can no longer be a valid legacy date, since the "T" is a
// garbage string after a number has been read.

// First try getting as far as possible with as ES6 Date Time String.
DateToken next_unhandled_token = ParseES6DateTime(&scanner, &day, &time, &tz);
// First try getting as far as possible with as ES5 Date Time String.
DateToken next_unhandled_token = ParseES5DateTime(&scanner, &day, &time, &tz);
if (next_unhandled_token.IsInvalid()) return false;
bool has_read_number = !day.IsEmpty();
// If there's anything left, continue with the legacy parser.
Expand Down Expand Up @@ -193,7 +196,7 @@ DateParser::DateToken DateParser::DateStringTokenizer<CharType>::Scan() {


template <typename Char>
DateParser::DateToken DateParser::ParseES6DateTime(
DateParser::DateToken DateParser::ParseES5DateTime(
DateStringTokenizer<Char>* scanner,
DayComposer* day,
TimeComposer* time,
Expand Down Expand Up @@ -231,7 +234,7 @@ DateParser::DateToken DateParser::ParseES6DateTime(
if (!scanner->Peek().IsKeywordType(TIME_SEPARATOR)) {
if (!scanner->Peek().IsEndOfInput()) return scanner->Next();
} else {
// ES6 Date Time String time part is present.
// ES5 Date Time String time part is present.
scanner->Next();
if (!scanner->Peek().IsFixedLengthNumber(2) ||
!Between(scanner->Peek().number(), 0, 24)) {
Expand Down Expand Up @@ -297,7 +300,8 @@ DateParser::DateToken DateParser::ParseES6DateTime(
}
if (!scanner->Peek().IsEndOfInput()) return DateToken::Invalid();
}
// Successfully parsed ES6 Date Time String.
// Successfully parsed ES5 Date Time String. Default to UTC if no TZ given.
if (tz->IsEmpty()) tz->Set(0);
day->set_iso_date();
return DateToken::EndOfInput();
}
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/dateparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,13 @@ class DateParser : public AllStatic {
bool is_iso_date_;
};

// Tries to parse an ES6 Date Time String. Returns the next token
// Tries to parse an ES5 Date Time String. Returns the next token
// to continue with in the legacy date string parser. If parsing is
// complete, returns DateToken::EndOfInput(). If terminally unsuccessful,
// returns DateToken::Invalid(). Otherwise parsing continues in the
// legacy parser.
template <typename Char>
static DateParser::DateToken ParseES6DateTime(
static DateParser::DateToken ParseES5DateTime(
DateStringTokenizer<Char>* scanner,
DayComposer* day,
TimeComposer* time,
Expand Down
6 changes: 3 additions & 3 deletions deps/v8/test/mjsunit/date-parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ var testCasesES5Misc = [
['2000-01T08:00:00.099Z', 946713600099],
['2000-01T08:00:00.999Z', 946713600999],
['2000-01T00:00:00.001-08:00', 946713600001],
['2000-01-01T24:00Z', 946771200000],
['2000-01-01T24:00:00Z', 946771200000],
['2000-01-01T24:00:00.000Z', 946771200000],
['2000-01-01T24:00', 946771200000],
['2000-01-01T24:00:00', 946771200000],
['2000-01-01T24:00:00.000', 946771200000],
['2000-01-01T24:00:00.000Z', 946771200000]];

var testCasesES5MiscNegative = [
Expand Down
108 changes: 54 additions & 54 deletions deps/v8/test/mjsunit/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,110 +203,110 @@ assertEquals(-8640000000000000, Date.UTC(1970, 0, 1 - 100000001, 24));


// Parsing ES5 ISO-8601 dates.
// When TZ is omitted, it defaults to the local timezone
// When TZ is omitted, it defaults to 'Z' meaning UTC.

// Check epoch.
assertEquals(0, Date.parse("1970-01-01T00:00:00.000+00:00"));
assertEquals(0, Date.parse("1970-01-01T00:00:00.000-00:00"));
assertEquals(0, Date.parse("1970-01-01T00:00:00.000Z"));
assertEquals(0, Date.parse("1970-01-01T00:00:00.000Z"));
assertEquals(0, Date.parse("1970-01-01T00:00:00Z"));
assertEquals(0, Date.parse("1970-01-01T00:00Z"));
assertEquals(0, Date.parse("1970-01-01Z"));
assertEquals(0, Date.parse("1970-01-01T00:00:00.000"));
assertEquals(0, Date.parse("1970-01-01T00:00:00"));
assertEquals(0, Date.parse("1970-01-01T00:00"));
assertEquals(0, Date.parse("1970-01-01"));

assertEquals(0, Date.parse("1970-01T00:00:00.000+00:00"));
assertEquals(0, Date.parse("1970-01T00:00:00.000-00:00"));
assertEquals(0, Date.parse("1970-01T00:00:00.000Z"));
assertEquals(0, Date.parse("1970-01T00:00:00.000Z"));
assertEquals(0, Date.parse("1970-01T00:00:00Z"));
assertEquals(0, Date.parse("1970-01T00:00Z"));
assertEquals(0, Date.parse("1970-01Z"));
assertEquals(0, Date.parse("1970-01T00:00:00.000"));
assertEquals(0, Date.parse("1970-01T00:00:00"));
assertEquals(0, Date.parse("1970-01T00:00"));
assertEquals(0, Date.parse("1970-01"));

assertEquals(0, Date.parse("1970T00:00:00.000+00:00"));
assertEquals(0, Date.parse("1970T00:00:00.000-00:00"));
assertEquals(0, Date.parse("1970T00:00:00.000Z"));
assertEquals(0, Date.parse("1970T00:00:00.000Z"));
assertEquals(0, Date.parse("1970T00:00:00Z"));
assertEquals(0, Date.parse("1970T00:00Z"));
assertEquals(0, Date.parse("1970Z"));
assertEquals(0, Date.parse("1970T00:00:00.000"));
assertEquals(0, Date.parse("1970T00:00:00"));
assertEquals(0, Date.parse("1970T00:00"));
assertEquals(0, Date.parse("1970"));

assertEquals(0, Date.parse("+001970-01-01T00:00:00.000+00:00"));
assertEquals(0, Date.parse("+001970-01-01T00:00:00.000-00:00"));
assertEquals(0, Date.parse("+001970-01-01T00:00:00.000Z"));
assertEquals(0, Date.parse("+001970-01-01T00:00:00.000Z"));
assertEquals(0, Date.parse("+001970-01-01T00:00:00Z"));
assertEquals(0, Date.parse("+001970-01-01T00:00Z"));
assertEquals(0, Date.parse("+001970-01-01Z"));
assertEquals(0, Date.parse("+001970-01-01T00:00:00.000"));
assertEquals(0, Date.parse("+001970-01-01T00:00:00"));
assertEquals(0, Date.parse("+001970-01-01T00:00"));
assertEquals(0, Date.parse("+001970-01-01"));

assertEquals(0, Date.parse("+001970-01T00:00:00.000+00:00"));
assertEquals(0, Date.parse("+001970-01T00:00:00.000-00:00"));
assertEquals(0, Date.parse("+001970-01T00:00:00.000Z"));
assertEquals(0, Date.parse("+001970-01T00:00:00.000Z"));
assertEquals(0, Date.parse("+001970-01T00:00:00Z"));
assertEquals(0, Date.parse("+001970-01T00:00Z"));
assertEquals(0, Date.parse("+001970-01Z"));
assertEquals(0, Date.parse("+001970-01T00:00:00.000"));
assertEquals(0, Date.parse("+001970-01T00:00:00"));
assertEquals(0, Date.parse("+001970-01T00:00"));
assertEquals(0, Date.parse("+001970-01"));

assertEquals(0, Date.parse("+001970T00:00:00.000+00:00"));
assertEquals(0, Date.parse("+001970T00:00:00.000-00:00"));
assertEquals(0, Date.parse("+001970T00:00:00.000Z"));
assertEquals(0, Date.parse("+001970T00:00:00.000Z"));
assertEquals(0, Date.parse("+001970T00:00:00Z"));
assertEquals(0, Date.parse("+001970T00:00Z"));
assertEquals(0, Date.parse("+001970Z"));
assertEquals(0, Date.parse("+001970T00:00:00.000"));
assertEquals(0, Date.parse("+001970T00:00:00"));
assertEquals(0, Date.parse("+001970T00:00"));
assertEquals(0, Date.parse("+001970"));

// Check random date.
assertEquals(70671003500, Date.parse("1972-03-28T23:50:03.500+01:00"));
assertEquals(70674603500, Date.parse("1972-03-28T23:50:03.500Z"));
assertEquals(70674603500, Date.parse("1972-03-28T23:50:03.500Z"));
assertEquals(70674603000, Date.parse("1972-03-28T23:50:03Z"));
assertEquals(70674600000, Date.parse("1972-03-28T23:50Z"));
assertEquals(70588800000, Date.parse("1972-03-28Z"));
assertEquals(70674603500, Date.parse("1972-03-28T23:50:03.500"));
assertEquals(70674603000, Date.parse("1972-03-28T23:50:03"));
assertEquals(70674600000, Date.parse("1972-03-28T23:50"));
assertEquals(70588800000, Date.parse("1972-03-28"));

assertEquals(68338203500, Date.parse("1972-03T23:50:03.500+01:00"));
assertEquals(68341803500, Date.parse("1972-03T23:50:03.500Z"));
assertEquals(68341803500, Date.parse("1972-03T23:50:03.500Z"));
assertEquals(68341803000, Date.parse("1972-03T23:50:03Z"));
assertEquals(68341800000, Date.parse("1972-03T23:50Z"));
assertEquals(68256000000, Date.parse("1972-03Z"));
assertEquals(68341803500, Date.parse("1972-03T23:50:03.500"));
assertEquals(68341803000, Date.parse("1972-03T23:50:03"));
assertEquals(68341800000, Date.parse("1972-03T23:50"));
assertEquals(68256000000, Date.parse("1972-03"));

assertEquals(63154203500, Date.parse("1972T23:50:03.500+01:00"));
assertEquals(63157803500, Date.parse("1972T23:50:03.500Z"));
assertEquals(63157803500, Date.parse("1972T23:50:03.500Z"));
assertEquals(63157803000, Date.parse("1972T23:50:03Z"));
assertEquals(63072000000, Date.parse("1972Z"));
assertEquals(63157803500, Date.parse("1972T23:50:03.500"));
assertEquals(63157803000, Date.parse("1972T23:50:03"));
assertEquals(63072000000, Date.parse("1972"));

assertEquals(70671003500, Date.parse("+001972-03-28T23:50:03.500+01:00"));
assertEquals(70674603500, Date.parse("+001972-03-28T23:50:03.500Z"));
assertEquals(70674603500, Date.parse("+001972-03-28T23:50:03.500Z"));
assertEquals(70674603000, Date.parse("+001972-03-28T23:50:03Z"));
assertEquals(70674600000, Date.parse("+001972-03-28T23:50Z"));
assertEquals(70588800000, Date.parse("+001972-03-28Z"));
assertEquals(70674603500, Date.parse("+001972-03-28T23:50:03.500"));
assertEquals(70674603000, Date.parse("+001972-03-28T23:50:03"));
assertEquals(70674600000, Date.parse("+001972-03-28T23:50"));
assertEquals(70588800000, Date.parse("+001972-03-28"));

assertEquals(68338203500, Date.parse("+001972-03T23:50:03.500+01:00"));
assertEquals(68341803500, Date.parse("+001972-03T23:50:03.500Z"));
assertEquals(68341803500, Date.parse("+001972-03T23:50:03.500Z"));
assertEquals(68341803000, Date.parse("+001972-03T23:50:03Z"));
assertEquals(68341800000, Date.parse("+001972-03T23:50Z"));
assertEquals(68256000000, Date.parse("+001972-03Z"));
assertEquals(68341803500, Date.parse("+001972-03T23:50:03.500"));
assertEquals(68341803000, Date.parse("+001972-03T23:50:03"));
assertEquals(68341800000, Date.parse("+001972-03T23:50"));
assertEquals(68256000000, Date.parse("+001972-03"));

assertEquals(63154203500, Date.parse("+001972T23:50:03.500+01:00"));
assertEquals(63157803500, Date.parse("+001972T23:50:03.500Z"));
assertEquals(63157803500, Date.parse("+001972T23:50:03.500Z"));
assertEquals(63157803000, Date.parse("+001972T23:50:03Z"));
assertEquals(63072000000, Date.parse("+001972Z"));
assertEquals(63157803500, Date.parse("+001972T23:50:03.500"));
assertEquals(63157803000, Date.parse("+001972T23:50:03"));
assertEquals(63072000000, Date.parse("+001972"));


// Ensure that ISO-years in the range 00-99 aren't translated to the range
// 1950..2049.
assertEquals(-60904915200000, Date.parse("0040-01-01T00:00Z"));
assertEquals(-60273763200000, Date.parse("0060-01-01T00:00Z"));
assertEquals(-62167219200000, Date.parse("0000-01-01T00:00Z"));
assertEquals(-62167219200000, Date.parse("+000000-01-01T00:00Z"));
assertEquals(-60904915200000, Date.parse("0040-01-01"));
assertEquals(-60273763200000, Date.parse("0060-01-01"));
assertEquals(-62167219200000, Date.parse("0000-01-01"));
assertEquals(-62167219200000, Date.parse("+000000-01-01"));

// Test negative years.
assertEquals(-63429523200000, Date.parse("-000040-01-01Z"));
assertEquals(-64060675200000, Date.parse("-000060-01-01Z"));
assertEquals(-124397510400000, Date.parse("-001972-01-01Z"));
assertEquals(-63429523200000, Date.parse("-000040-01-01"));
assertEquals(-64060675200000, Date.parse("-000060-01-01"));
assertEquals(-124397510400000, Date.parse("-001972-01-01"));

// Check time-zones.
assertEquals(70674603500, Date.parse("1972-03-28T23:50:03.500Z"));
Expand Down
3 changes: 3 additions & 0 deletions deps/v8/test/test262-es6/test262-es6.status
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@
'built-ins/Symbol/species/builtin-getter-name': [FAIL],
'built-ins/Symbol/species/subclassing': [FAIL],

# https://code.google.com/p/v8/issues/detail?id=4242
'built-ins/Date/15.9.1.15-1': [FAIL],

# https://code.google.com/p/v8/issues/detail?id=4004
'built-ins/Date/prototype/setFullYear/15.9.5.40_1': [FAIL],

Expand Down
3 changes: 0 additions & 3 deletions deps/v8/test/test262/test262.status
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@
'15.2.3.13-1-3': [FAIL],
'15.2.3.13-1-4': [FAIL],

# ES6 says for dates to default to the local timezone if none is specified
'15.9.1.15-1': [FAIL],

######################## NEEDS INVESTIGATION ###########################

# These test failures are specific to the intl402 suite and need investigation
Expand Down
22 changes: 22 additions & 0 deletions deps/v8/tools/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@
# expected runtimes (suites with slow test cases first). These groups are
# invoked in seperate steps on the bots.
TEST_MAP = {
"bot_default": [
"mjsunit",
"cctest",
"webkit",
"message",
"preparser",
"intl",
"unittests",
],
"default": [
"mjsunit",
"cctest",
Expand All @@ -80,6 +89,10 @@

VARIANTS = ["default", "stress", "turbofan", "nocrankshaft"]

EXHAUSTIVE_VARIANTS = VARIANTS + [
# TODO(machenbach): Add always opt turbo variant.
]

DEBUG_FLAGS = ["--nohard-abort", "--nodead-code-elimination",
"--nofold-constants", "--enable-slow-asserts",
"--debug-code", "--verify-heap"]
Expand Down Expand Up @@ -250,6 +263,9 @@ def BuildOptions():
default=False, dest="no_variants", action="store_true")
result.add_option("--variants",
help="Comma-separated list of testing variants: %s" % VARIANTS)
result.add_option("--exhaustive-variants",
default=False, action="store_true",
help="Use exhaustive set of default variants.")
result.add_option("--outdir", help="Base directory with compile output",
default="out")
result.add_option("--predictable",
Expand Down Expand Up @@ -334,6 +350,7 @@ def BuildbotToV8Mode(config):

def ProcessOptions(options):
global ALL_VARIANTS
global EXHAUSTIVE_VARIANTS
global VARIANTS

# Architecture and mode related stuff.
Expand Down Expand Up @@ -385,6 +402,11 @@ def ProcessOptions(options):
if options.novfp3:
options.extra_flags.append("--noenable-vfp3")

if options.exhaustive_variants:
# This is used on many bots. It includes a larger set of default variants.
# Other options for manipulating variants still apply afterwards.
VARIANTS = EXHAUSTIVE_VARIANTS

if options.msan:
VARIANTS = ["default"]

Expand Down