diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2015-08-31 17:10:53 -0700 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-09-06 21:38:06 +1000 |
commit | 4e3d767f4c33ac8e6d05f6fedc0dd65814c0b6e3 (patch) | |
tree | cf36eab49a0bed7830b364b87b9dc98fc1eaafc4 /deps/v8/test | |
parent | 439c1dde15c80b5eac4a02701ed30dfec324d3cf (diff) | |
download | node-new-4e3d767f4c33ac8e6d05f6fedc0dd65814c0b6e3.tar.gz |
deps: upgrade V8 to 4.5.103.30
Pick up https://github.com/v8/v8-git-mirror/commit/f9a0a1636a4623a5522c33674e110b346d085340
Commit log at https://chromium.googlesource.com/v8/v8.git/+log/branch-heads/4.5
PR-URL: https://github.com/nodejs/node/pull/2632
Reviewed-By: targos - Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Diffstat (limited to 'deps/v8/test')
-rw-r--r-- | deps/v8/test/cctest/cctest.cc | 8 | ||||
-rw-r--r-- | deps/v8/test/cctest/cctest.gyp | 2 | ||||
-rw-r--r-- | deps/v8/test/cctest/test-parsing.cc | 61 | ||||
-rw-r--r-- | deps/v8/test/unittests/run-all-unittests.cc | 8 | ||||
-rw-r--r-- | deps/v8/test/unittests/unittests.gyp | 2 |
5 files changed, 63 insertions, 18 deletions
diff --git a/deps/v8/test/cctest/cctest.cc b/deps/v8/test/cctest/cctest.cc index b5771ff655..851096ddce 100644 --- a/deps/v8/test/cctest/cctest.cc +++ b/deps/v8/test/cctest/cctest.cc @@ -34,10 +34,6 @@ #include "test/cctest/profiler-extension.h" #include "test/cctest/trace-extension.h" -#ifdef V8_USE_EXTERNAL_STARTUP_DATA -#include "src/startup-data-util.h" -#endif // V8_USE_EXTERNAL_STARTUP_DATA - #if V8_OS_WIN #include <windows.h> // NOLINT #if V8_CC_MSVC @@ -173,9 +169,7 @@ int main(int argc, char* argv[]) { v8::V8::InitializePlatform(platform); v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); v8::V8::Initialize(); -#ifdef V8_USE_EXTERNAL_STARTUP_DATA - v8::StartupDataHandler startup_data(argv[0], NULL, NULL); -#endif + v8::V8::InitializeExternalStartupData(argv[0]); CcTestArrayBufferAllocator array_buffer_allocator; CcTest::set_array_buffer_allocator(&array_buffer_allocator); diff --git a/deps/v8/test/cctest/cctest.gyp b/deps/v8/test/cctest/cctest.gyp index bcbbe7b226..8f0c58d38e 100644 --- a/deps/v8/test/cctest/cctest.gyp +++ b/deps/v8/test/cctest/cctest.gyp @@ -163,8 +163,6 @@ 'test-weakmaps.cc', 'test-weaksets.cc', 'trace-extension.cc', - '../../src/startup-data-util.h', - '../../src/startup-data-util.cc' ], 'conditions': [ ['v8_target_arch=="ia32"', { diff --git a/deps/v8/test/cctest/test-parsing.cc b/deps/v8/test/cctest/test-parsing.cc index cbb79b16da..cfb43911aa 100644 --- a/deps/v8/test/cctest/test-parsing.cc +++ b/deps/v8/test/cctest/test-parsing.cc @@ -3516,6 +3516,67 @@ TEST(UseConstLegacyCount) { } +TEST(ErrorsArrowFormalParameters) { + const char* context_data[][2] = { + { "()", "=>{}" }, + { "()", "=>{};" }, + { "var x = ()", "=>{}" }, + { "var x = ()", "=>{};" }, + + { "a", "=>{}" }, + { "a", "=>{};" }, + { "var x = a", "=>{}" }, + { "var x = a", "=>{};" }, + + { "(a)", "=>{}" }, + { "(a)", "=>{};" }, + { "var x = (a)", "=>{}" }, + { "var x = (a)", "=>{};" }, + + { "(...a)", "=>{}" }, + { "(...a)", "=>{};" }, + { "var x = (...a)", "=>{}" }, + { "var x = (...a)", "=>{};" }, + + { "(a,b)", "=>{}" }, + { "(a,b)", "=>{};" }, + { "var x = (a,b)", "=>{}" }, + { "var x = (a,b)", "=>{};" }, + + { "(a,...b)", "=>{}" }, + { "(a,...b)", "=>{};" }, + { "var x = (a,...b)", "=>{}" }, + { "var x = (a,...b)", "=>{};" }, + + { nullptr, nullptr } + }; + const char* assignment_expression_suffix_data[] = { + "?c:d=>{}", + "=c=>{}", + "()", + "(c)", + "[1]", + "[c]", + ".c", + "-c", + "+c", + "c++", + "`c`", + "`${c}`", + "`template-head${c}`", + "`${c}template-tail`", + "`template-head${c}template-tail`", + "`${c}template-tail`", + nullptr + }; + + static const ParserFlag always_flags[] = { kAllowHarmonyArrowFunctions, + kAllowHarmonyRestParameters }; + RunParserSyncTest(context_data, assignment_expression_suffix_data, kError, + NULL, 0, always_flags, arraysize(always_flags)); +} + + TEST(ErrorsArrowFunctions) { // Tests that parser and preparser generate the same kind of errors // on invalid arrow function syntax. diff --git a/deps/v8/test/unittests/run-all-unittests.cc b/deps/v8/test/unittests/run-all-unittests.cc index 08d265624b..0b7f65e08e 100644 --- a/deps/v8/test/unittests/run-all-unittests.cc +++ b/deps/v8/test/unittests/run-all-unittests.cc @@ -7,10 +7,6 @@ #include "src/base/compiler-specific.h" #include "testing/gmock/include/gmock/gmock.h" -#ifdef V8_USE_EXTERNAL_STARTUP_DATA -#include "src/startup-data-util.h" -#endif // V8_USE_EXTERNAL_STARTUP_DATA - namespace { class DefaultPlatformEnvironment final : public ::testing::Environment { @@ -45,8 +41,6 @@ int main(int argc, char** argv) { testing::InitGoogleMock(&argc, argv); testing::AddGlobalTestEnvironment(new DefaultPlatformEnvironment); v8::V8::SetFlagsFromCommandLine(&argc, argv, true); -#ifdef V8_USE_EXTERNAL_STARTUP_DATA - v8::StartupDataHandler startup_data(argv[0], NULL, NULL); -#endif + v8::V8::InitializeExternalStartupData(argv[0]); return RUN_ALL_TESTS(); } diff --git a/deps/v8/test/unittests/unittests.gyp b/deps/v8/test/unittests/unittests.gyp index 00658b3fda..9698fb760d 100644 --- a/deps/v8/test/unittests/unittests.gyp +++ b/deps/v8/test/unittests/unittests.gyp @@ -94,8 +94,6 @@ 'run-all-unittests.cc', 'test-utils.h', 'test-utils.cc', - '../../src/startup-data-util.h', - '../../src/startup-data-util.cc' ], 'conditions': [ ['v8_target_arch=="arm"', { |