From 7d7a549219baeecadbbd6e2b9b29b57fd80897f7 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 16 Jan 2018 16:49:01 -0800 Subject: [PATCH 01/25] deps: cherry-pick 814577e from upstream V8 Original commit message: [tracing] allow embedders to provide own tracing timestamps Make it possible for embedders to provide their own tracing timetamps by providing an overridable virtual function on V8's tracing controller. Bug: Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I727e633cb7f63d4b41c2e427ecca3c9174c90bfe Reviewed-on: https://chromium-review.googlesource.com/847690 Reviewed-by: Yang Guo Reviewed-by: Fadi Meawad Commit-Queue: Ali Ijaz Sheikh Cr-Commit-Position: refs/heads/master@{#50489} Refs: https://github.com/v8/v8/commit/814577e3fd097ef772fd6d92a1ad3abd934506e6 Refs: https://github.com/nodejs/node/issues/17349 PR-URL: https://github.com/nodejs/node/pull/18196 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Andreas Madsen --- common.gypi | 2 +- deps/v8/include/libplatform/v8-tracing.h | 8 ++++++-- .../src/libplatform/tracing/trace-object.cc | 12 ++++++------ .../libplatform/tracing/tracing-controller.cc | 19 +++++++++++++++---- .../test/cctest/libplatform/test-tracing.cc | 4 ++-- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/common.gypi b/common.gypi index 84914640271..2cd0db7dc47 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.6', + 'v8_embedder_string': '-node.7', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/include/libplatform/v8-tracing.h b/deps/v8/include/libplatform/v8-tracing.h index 8c1febf7627..55189b48377 100644 --- a/deps/v8/include/libplatform/v8-tracing.h +++ b/deps/v8/include/libplatform/v8-tracing.h @@ -43,8 +43,8 @@ class V8_PLATFORM_EXPORT TraceObject { const char** arg_names, const uint8_t* arg_types, const uint64_t* arg_values, std::unique_ptr* arg_convertables, - unsigned int flags); - void UpdateDuration(); + unsigned int flags, int64_t timestamp, int64_t cpu_timestamp); + void UpdateDuration(int64_t timestamp, int64_t cpu_timestamp); void InitializeForTesting( char phase, const uint8_t* category_enabled_flag, const char* name, const char* scope, uint64_t id, uint64_t bind_id, int num_args, @@ -259,6 +259,10 @@ class V8_PLATFORM_EXPORT TracingController static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag); + protected: + virtual int64_t CurrentTimestampMicroseconds(); + virtual int64_t CurrentCpuTimestampMicroseconds(); + private: const uint8_t* GetCategoryGroupEnabledInternal(const char* category_group); void UpdateCategoryGroupEnabledFlag(size_t category_index); diff --git a/deps/v8/src/libplatform/tracing/trace-object.cc b/deps/v8/src/libplatform/tracing/trace-object.cc index bb4bf713907..bc05f797fa8 100644 --- a/deps/v8/src/libplatform/tracing/trace-object.cc +++ b/deps/v8/src/libplatform/tracing/trace-object.cc @@ -37,7 +37,7 @@ void TraceObject::Initialize( const char** arg_names, const uint8_t* arg_types, const uint64_t* arg_values, std::unique_ptr* arg_convertables, - unsigned int flags) { + unsigned int flags, int64_t timestamp, int64_t cpu_timestamp) { pid_ = base::OS::GetCurrentProcessId(); tid_ = base::OS::GetCurrentThreadId(); phase_ = phase; @@ -47,8 +47,8 @@ void TraceObject::Initialize( id_ = id; bind_id_ = bind_id; flags_ = flags; - ts_ = base::TimeTicks::HighResolutionNow().ToInternalValue(); - tts_ = base::ThreadTicks::Now().ToInternalValue(); + ts_ = timestamp; + tts_ = cpu_timestamp; duration_ = 0; cpu_duration_ = 0; @@ -103,9 +103,9 @@ void TraceObject::Initialize( TraceObject::~TraceObject() { delete[] parameter_copy_storage_; } -void TraceObject::UpdateDuration() { - duration_ = base::TimeTicks::HighResolutionNow().ToInternalValue() - ts_; - cpu_duration_ = base::ThreadTicks::Now().ToInternalValue() - tts_; +void TraceObject::UpdateDuration(int64_t timestamp, int64_t cpu_timestamp) { + duration_ = timestamp - ts_; + cpu_duration_ = cpu_timestamp - tts_; } void TraceObject::InitializeForTesting( diff --git a/deps/v8/src/libplatform/tracing/tracing-controller.cc b/deps/v8/src/libplatform/tracing/tracing-controller.cc index 2fb610ac72b..372a152f83f 100644 --- a/deps/v8/src/libplatform/tracing/tracing-controller.cc +++ b/deps/v8/src/libplatform/tracing/tracing-controller.cc @@ -9,6 +9,7 @@ #include "src/base/atomicops.h" #include "src/base/platform/mutex.h" +#include "src/base/platform/time.h" namespace v8 { namespace platform { @@ -48,6 +49,14 @@ void TracingController::Initialize(TraceBuffer* trace_buffer) { mutex_.reset(new base::Mutex()); } +int64_t TracingController::CurrentTimestampMicroseconds() { + return base::TimeTicks::HighResolutionNow().ToInternalValue(); +} + +int64_t TracingController::CurrentCpuTimestampMicroseconds() { + return base::ThreadTicks::Now().ToInternalValue(); +} + uint64_t TracingController::AddTraceEvent( char phase, const uint8_t* category_enabled_flag, const char* name, const char* scope, uint64_t id, uint64_t bind_id, int num_args, @@ -58,9 +67,10 @@ uint64_t TracingController::AddTraceEvent( uint64_t handle; TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle); if (trace_object) { - trace_object->Initialize(phase, category_enabled_flag, name, scope, id, - bind_id, num_args, arg_names, arg_types, - arg_values, arg_convertables, flags); + trace_object->Initialize( + phase, category_enabled_flag, name, scope, id, bind_id, num_args, + arg_names, arg_types, arg_values, arg_convertables, flags, + CurrentTimestampMicroseconds(), CurrentCpuTimestampMicroseconds()); } return handle; } @@ -69,7 +79,8 @@ void TracingController::UpdateTraceEventDuration( const uint8_t* category_enabled_flag, const char* name, uint64_t handle) { TraceObject* trace_object = trace_buffer_->GetEventByHandle(handle); if (!trace_object) return; - trace_object->UpdateDuration(); + trace_object->UpdateDuration(CurrentTimestampMicroseconds(), + CurrentCpuTimestampMicroseconds()); } const uint8_t* TracingController::GetCategoryGroupEnabled( diff --git a/deps/v8/test/cctest/libplatform/test-tracing.cc b/deps/v8/test/cctest/libplatform/test-tracing.cc index 369d7bc7621..1d0ead62466 100644 --- a/deps/v8/test/cctest/libplatform/test-tracing.cc +++ b/deps/v8/test/cctest/libplatform/test-tracing.cc @@ -42,7 +42,7 @@ TEST(TestTraceObject) { uint8_t category_enabled_flag = 41; trace_object.Initialize('X', &category_enabled_flag, "Test.Trace", "Test.Scope", 42, 123, 0, nullptr, nullptr, nullptr, - nullptr, 0); + nullptr, 0, 1729, 4104); CHECK_EQ('X', trace_object.phase()); CHECK_EQ(category_enabled_flag, *trace_object.category_enabled_flag()); CHECK_EQ(std::string("Test.Trace"), std::string(trace_object.name())); @@ -96,7 +96,7 @@ TEST(TestTraceBufferRingBuffer) { CHECK_NOT_NULL(trace_object); trace_object->Initialize('X', &category_enabled_flag, names[i].c_str(), "Test.Scope", 42, 123, 0, nullptr, nullptr, - nullptr, nullptr, 0); + nullptr, nullptr, 0, 1729, 4104); trace_object = ring_buffer->GetEventByHandle(handles[i]); CHECK_NOT_NULL(trace_object); CHECK_EQ('X', trace_object->phase()); From 51054dac541cdefabe54a076f009ebf4c3c5d144 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 16 Jan 2018 16:49:14 -0800 Subject: [PATCH 02/25] deps: cherry-pick c3bb73f from upstream V8 Original commit message: [tracing] implement TRACE_EVENT_ADD_WITH_TIMESTAMP Bug: Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Icb3cf7b7f96704e1eaa4c5fbf773b94b70cddc85 Reviewed-on: https://chromium-review.googlesource.com/861302 Reviewed-by: Fadi Meawad Reviewed-by: Yang Guo Commit-Queue: Ali Ijaz Sheikh Cr-Commit-Position: refs/heads/master@{#50549} Refs: https://github.com/v8/v8/commit/c3bb73f6b95c280cee3a4d6b03c87fce93d617c7 Refs: https://github.com/nodejs/node/issues/17349 PR-URL: https://github.com/nodejs/node/pull/18196 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Andreas Madsen --- common.gypi | 2 +- deps/v8/include/libplatform/v8-tracing.h | 7 ++ deps/v8/include/v8-platform.h | 15 ++- .../libplatform/tracing/tracing-controller.cc | 18 ++++ deps/v8/src/tracing/trace-event.h | 93 ++++++++++++++++++- deps/v8/test/cctest/test-trace-event.cc | 43 ++++++++- 6 files changed, 168 insertions(+), 10 deletions(-) diff --git a/common.gypi b/common.gypi index 2cd0db7dc47..7cceef87596 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.7', + 'v8_embedder_string': '-node.8', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/include/libplatform/v8-tracing.h b/deps/v8/include/libplatform/v8-tracing.h index 55189b48377..9dcf3d7bca7 100644 --- a/deps/v8/include/libplatform/v8-tracing.h +++ b/deps/v8/include/libplatform/v8-tracing.h @@ -247,6 +247,13 @@ class V8_PLATFORM_EXPORT TracingController const uint64_t* arg_values, std::unique_ptr* arg_convertables, unsigned int flags) override; + uint64_t AddTraceEventWithTimestamp( + char phase, const uint8_t* category_enabled_flag, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, + std::unique_ptr* arg_convertables, + unsigned int flags, int64_t timestamp) override; void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, const char* name, uint64_t handle) override; void AddTraceStateObserver( diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index f814543e666..43420a972c7 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -119,11 +119,11 @@ class TracingController { } /** - * Adds a trace event to the platform tracing system. This function call is + * Adds a trace event to the platform tracing system. These function calls are * usually the result of a TRACE_* macro from trace_event_common.h when * tracing and the category of the particular trace are enabled. It is not - * advisable to call this function on its own; it is really only meant to be - * used by the trace macros. The returned handle can be used by + * advisable to call these functions on their own; they are really only meant + * to be used by the trace macros. The returned handle can be used by * UpdateTraceEventDuration to update the duration of COMPLETE events. */ virtual uint64_t AddTraceEvent( @@ -135,6 +135,15 @@ class TracingController { unsigned int flags) { return 0; } + virtual uint64_t AddTraceEventWithTimestamp( + char phase, const uint8_t* category_enabled_flag, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, + std::unique_ptr* arg_convertables, + unsigned int flags, int64_t timestamp) { + return 0; + } /** * Sets the duration field of a COMPLETE trace event. It must be called with diff --git a/deps/v8/src/libplatform/tracing/tracing-controller.cc b/deps/v8/src/libplatform/tracing/tracing-controller.cc index 372a152f83f..c024f182915 100644 --- a/deps/v8/src/libplatform/tracing/tracing-controller.cc +++ b/deps/v8/src/libplatform/tracing/tracing-controller.cc @@ -75,6 +75,24 @@ uint64_t TracingController::AddTraceEvent( return handle; } +uint64_t TracingController::AddTraceEventWithTimestamp( + char phase, const uint8_t* category_enabled_flag, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, + std::unique_ptr* arg_convertables, + unsigned int flags, int64_t timestamp) { + uint64_t handle; + TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle); + if (trace_object) { + trace_object->Initialize(phase, category_enabled_flag, name, scope, id, + bind_id, num_args, arg_names, arg_types, + arg_values, arg_convertables, flags, timestamp, + CurrentCpuTimestampMicroseconds()); + } + return handle; +} + void TracingController::UpdateTraceEventDuration( const uint8_t* category_enabled_flag, const char* name, uint64_t handle) { TraceObject* trace_object = trace_buffer_->GetEventByHandle(handle); diff --git a/deps/v8/src/tracing/trace-event.h b/deps/v8/src/tracing/trace-event.h index 6ca39506f49..0ff2b825034 100644 --- a/deps/v8/src/tracing/trace-event.h +++ b/deps/v8/src/tracing/trace-event.h @@ -96,6 +96,23 @@ enum CategoryGroupEnabledFlags { // unsigned int flags) #define TRACE_EVENT_API_ADD_TRACE_EVENT v8::internal::tracing::AddTraceEventImpl +// Add a trace event to the platform tracing system. +// uint64_t TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( +// char phase, +// const uint8_t* category_group_enabled, +// const char* name, +// const char* scope, +// uint64_t id, +// uint64_t bind_id, +// int num_args, +// const char** arg_names, +// const uint8_t* arg_types, +// const uint64_t* arg_values, +// unsigned int flags, +// int64_t timestamp) +#define TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP \ + v8::internal::tracing::AddTraceEventWithTimestampImpl + // Set the duration field of a COMPLETE trace event. // void TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( // const uint8_t* category_group_enabled, @@ -212,10 +229,18 @@ enum CategoryGroupEnabledFlags { } \ } while (0) -// Adds a trace event with a given timestamp. Not Implemented. +// Adds a trace event with a given timestamp. #define INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP(phase, category_group, name, \ timestamp, flags, ...) \ - UNIMPLEMENTED() + do { \ + INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \ + if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \ + v8::internal::tracing::AddTraceEventWithTimestamp( \ + phase, INTERNAL_TRACE_EVENT_UID(category_group_enabled), name, \ + v8::internal::tracing::kGlobalScope, v8::internal::tracing::kNoId, \ + v8::internal::tracing::kNoId, flags, timestamp, ##__VA_ARGS__); \ + } \ + } while (0) // Adds a trace event with a given id and timestamp. Not Implemented. #define INTERNAL_TRACE_EVENT_ADD_WITH_ID_AND_TIMESTAMP( \ @@ -431,6 +456,28 @@ static V8_INLINE uint64_t AddTraceEventImpl( arg_values, arg_convertables, flags); } +static V8_INLINE uint64_t AddTraceEventWithTimestampImpl( + char phase, const uint8_t* category_group_enabled, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, unsigned int flags, int64_t timestamp) { + std::unique_ptr arg_convertables[2]; + if (num_args > 0 && arg_types[0] == TRACE_VALUE_TYPE_CONVERTABLE) { + arg_convertables[0].reset(reinterpret_cast( + static_cast(arg_values[0]))); + } + if (num_args > 1 && arg_types[1] == TRACE_VALUE_TYPE_CONVERTABLE) { + arg_convertables[1].reset(reinterpret_cast( + static_cast(arg_values[1]))); + } + DCHECK_LE(num_args, 2); + v8::TracingController* controller = + v8::internal::tracing::TraceEventHelper::GetTracingController(); + return controller->AddTraceEventWithTimestamp( + phase, category_group_enabled, name, scope, id, bind_id, num_args, + arg_names, arg_types, arg_values, arg_convertables, flags, timestamp); +} + // Define SetTraceValue for each allowed type. It stores the type and // value in the return arguments. This allows this API to avoid declaring any // structures so that it is portable to third_party libraries. @@ -533,6 +580,48 @@ static V8_INLINE uint64_t AddTraceEvent( arg_names, arg_types, arg_values, flags); } +static V8_INLINE uint64_t AddTraceEventWithTimestamp( + char phase, const uint8_t* category_group_enabled, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, unsigned int flags, + int64_t timestamp) { + return TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( + phase, category_group_enabled, name, scope, id, bind_id, kZeroNumArgs, + nullptr, nullptr, nullptr, flags, timestamp); +} + +template +static V8_INLINE uint64_t AddTraceEventWithTimestamp( + char phase, const uint8_t* category_group_enabled, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, unsigned int flags, + int64_t timestamp, const char* arg1_name, ARG1_TYPE&& arg1_val) { + const int num_args = 1; + uint8_t arg_type; + uint64_t arg_value; + SetTraceValue(std::forward(arg1_val), &arg_type, &arg_value); + return TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( + phase, category_group_enabled, name, scope, id, bind_id, num_args, + &arg1_name, &arg_type, &arg_value, flags, timestamp); +} + +template +static V8_INLINE uint64_t AddTraceEventWithTimestamp( + char phase, const uint8_t* category_group_enabled, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, unsigned int flags, + int64_t timestamp, const char* arg1_name, ARG1_TYPE&& arg1_val, + const char* arg2_name, ARG2_TYPE&& arg2_val) { + const int num_args = 2; + const char* arg_names[2] = {arg1_name, arg2_name}; + unsigned char arg_types[2]; + uint64_t arg_values[2]; + SetTraceValue(std::forward(arg1_val), &arg_types[0], + &arg_values[0]); + SetTraceValue(std::forward(arg2_val), &arg_types[1], + &arg_values[1]); + return TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_TIMESTAMP( + phase, category_group_enabled, name, scope, id, bind_id, num_args, + arg_names, arg_types, arg_values, flags, timestamp); +} + // Used by TRACE_EVENTx macros. Do not use directly. class ScopedTracer { public: diff --git a/deps/v8/test/cctest/test-trace-event.cc b/deps/v8/test/cctest/test-trace-event.cc index 9705afb4efc..471619062a0 100644 --- a/deps/v8/test/cctest/test-trace-event.cc +++ b/deps/v8/test/cctest/test-trace-event.cc @@ -22,14 +22,16 @@ struct MockTraceObject { uint64_t bind_id; int num_args; unsigned int flags; + int64_t timestamp; MockTraceObject(char phase, std::string name, uint64_t id, uint64_t bind_id, - int num_args, int flags) + int num_args, int flags, int64_t timestamp) : phase(phase), name(name), id(id), bind_id(bind_id), num_args(num_args), - flags(flags) {} + flags(flags), + timestamp(timestamp) {} }; typedef std::vector MockTraceObjectList; @@ -51,8 +53,20 @@ class MockTracingController : public v8::TracingController { const uint64_t* arg_values, std::unique_ptr* arg_convertables, unsigned int flags) override { - MockTraceObject* to = new MockTraceObject(phase, std::string(name), id, - bind_id, num_args, flags); + return AddTraceEventWithTimestamp( + phase, category_enabled_flag, name, scope, id, bind_id, num_args, + arg_names, arg_types, arg_values, arg_convertables, flags, 0); + } + + uint64_t AddTraceEventWithTimestamp( + char phase, const uint8_t* category_enabled_flag, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, + std::unique_ptr* arg_convertables, + unsigned int flags, int64_t timestamp) override { + MockTraceObject* to = new MockTraceObject( + phase, std::string(name), id, bind_id, num_args, flags, timestamp); trace_object_list_.push_back(to); return 0; } @@ -239,3 +253,24 @@ TEST(TestEventInContext) { CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name); CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id); } + +TEST(TestEventWithTimestamp) { + MockTracingPlatform platform; + + TRACE_EVENT_INSTANT_WITH_TIMESTAMP0("v8-cat", "0arg", + TRACE_EVENT_SCOPE_GLOBAL, 1729); + TRACE_EVENT_INSTANT_WITH_TIMESTAMP1("v8-cat", "1arg", + TRACE_EVENT_SCOPE_GLOBAL, 4104, "val", 1); + TRACE_EVENT_MARK_WITH_TIMESTAMP2("v8-cat", "mark", 13832, "a", 1, "b", 2); + + CHECK_EQ(3, GET_TRACE_OBJECTS_LIST->size()); + + CHECK_EQ(1729, GET_TRACE_OBJECT(0)->timestamp); + CHECK_EQ(0, GET_TRACE_OBJECT(0)->num_args); + + CHECK_EQ(4104, GET_TRACE_OBJECT(1)->timestamp); + CHECK_EQ(1, GET_TRACE_OBJECT(1)->num_args); + + CHECK_EQ(13832, GET_TRACE_OBJECT(2)->timestamp); + CHECK_EQ(2, GET_TRACE_OBJECT(2)->num_args); +} From 98d9540dd7a7aa2e612f16caeea6e57d56ed9f12 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 16 Jan 2018 17:13:36 -0800 Subject: [PATCH 03/25] src: use uv_hrtime as tracing timestamp Override the V8 TracingController to provide uv_hrtime based timestamps. This allows tracing timestamps to be comparable with process.hrtime timestamps. Fixes: https://github.com/nodejs/node/issues/17349 PR-URL: https://github.com/nodejs/node/pull/18196 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Andreas Madsen --- doc/api/tracing.md | 4 ++++ src/tracing/agent.h | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/api/tracing.md b/doc/api/tracing.md index e03477b1adf..fbfa2941eff 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -19,3 +19,7 @@ node --trace-events-enabled --trace-event-categories v8,node,node.async_hooks se Running Node.js with tracing enabled will produce log files that can be opened in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. + +Starting with Node 10.0.0, the tracing system uses the same time source as the +one used by `process.hrtime()` however the trace-event timestamps are expressed +in microseconds, unlike `process.hrtime()` which returns nanoseconds. diff --git a/src/tracing/agent.h b/src/tracing/agent.h index bd8e90004b0..203f53be7ea 100644 --- a/src/tracing/agent.h +++ b/src/tracing/agent.h @@ -8,7 +8,14 @@ namespace node { namespace tracing { -using v8::platform::tracing::TracingController; +class TracingController : public v8::platform::tracing::TracingController { + public: + TracingController() : v8::platform::tracing::TracingController() {} + + int64_t CurrentTimestampMicroseconds() override { + return uv_hrtime() / 1000; + } +}; class Agent { public: From 00687fb5044d9ab3361e445b7bf8949bf99994e2 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Mon, 22 Jan 2018 12:19:05 -0800 Subject: [PATCH 04/25] deps: V8: backport 76c3ac5 from upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a bug in the CPU profiler where some ticks were attributed to the wrong file. Original commit message: [cpu-profiler] Fix script name when recording inlining info Use the script name from the shared function info to create an inline entry. Otherwise functions are attributed to the wrong file in the CpuProfileNode. See https://github.com/GoogleCloudPlatform/cloud-profiler-nodejs/issues/89 Bug: v8:7203, v8:7241 Change-Id: I8ea31943741770e6611275a9c93375922b934547 Reviewed-on: https://chromium-review.googlesource.com/848093 Reviewed-by: Jaroslav Sevcik Commit-Queue: Franziska Hinkelmann Cr-Commit-Position: refs/heads/master@{#50339} Refs: https://github.com/v8/v8/commit/76c3ac58b00e08e3e2fecc3f7169bd64d91c8f75 PR-URL: https://github.com/nodejs/node/pull/18298 Reviewed-By: Michaël Zasso Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- common.gypi | 2 +- deps/v8/src/profiler/profiler-listener.cc | 17 +++-- deps/v8/test/cctest/test-cpu-profiler.cc | 79 +++++++++++++++++++++++ 3 files changed, 92 insertions(+), 6 deletions(-) diff --git a/common.gypi b/common.gypi index 7cceef87596..9979b5bfedc 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.8', + 'v8_embedder_string': '-node.9', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/src/profiler/profiler-listener.cc b/deps/v8/src/profiler/profiler-listener.cc index 169b12da077..07a10afb5d3 100644 --- a/deps/v8/src/profiler/profiler-listener.cc +++ b/deps/v8/src/profiler/profiler-listener.cc @@ -230,11 +230,18 @@ void ProfilerListener::RecordInliningInfo(CodeEntry* entry, SharedFunctionInfo* shared_info = SharedFunctionInfo::cast( deopt_input_data->LiteralArray()->get(shared_info_id)); if (!depth++) continue; // Skip the current function itself. - CodeEntry* inline_entry = new CodeEntry( - entry->tag(), GetFunctionName(shared_info->DebugName()), - CodeEntry::kEmptyNamePrefix, entry->resource_name(), - CpuProfileNode::kNoLineNumberInfo, - CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start()); + const char* resource_name = + (shared_info->script()->IsScript() && + Script::cast(shared_info->script())->name()->IsName()) + ? GetName(Name::cast(Script::cast(shared_info->script())->name())) + : CodeEntry::kEmptyResourceName; + + CodeEntry* inline_entry = + new CodeEntry(entry->tag(), GetFunctionName(shared_info->DebugName()), + CodeEntry::kEmptyNamePrefix, resource_name, + CpuProfileNode::kNoLineNumberInfo, + CpuProfileNode::kNoColumnNumberInfo, nullptr, + code->instruction_start()); inline_entry->FillFunctionInfo(shared_info); inline_stack.push_back(inline_entry); } diff --git a/deps/v8/test/cctest/test-cpu-profiler.cc b/deps/v8/test/cctest/test-cpu-profiler.cc index 0a297d9f0c9..aa2ae26da4e 100644 --- a/deps/v8/test/cctest/test-cpu-profiler.cc +++ b/deps/v8/test/cctest/test-cpu-profiler.cc @@ -1738,6 +1738,85 @@ TEST(FunctionDetails) { script_a->GetUnboundScript()->GetId(), 5, 14); } +TEST(FunctionDetailsInlining) { + if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return; + i::FLAG_allow_natives_syntax = true; + v8::HandleScope scope(CcTest::isolate()); + v8::Local env = CcTest::NewContext(PROFILER_EXTENSION); + v8::Context::Scope context_scope(env); + ProfilerHelper helper(env); + + // alpha is in a_script, beta in b_script. beta is + // inlined in alpha, but it should be attributed to b_script. + + v8::Local script_b = CompileWithOrigin( + "function beta(k) {\n" + " let sum = 2;\n" + " for(let i = 0; i < k; i ++) {\n" + " sum += i;\n" + " sum = sum + 'a';\n" + " }\n" + " return sum;\n" + "}\n" + "\n", + "script_b"); + + v8::Local script_a = CompileWithOrigin( + "function alpha(p) {\n" + " let res = beta(p);\n" + " res = res + res;\n" + " return res;\n" + "}\n" + "let p = 2;\n" + "\n" + "\n" + "// Warm up before profiling or the inlining doesn't happen.\n" + "p = alpha(p);\n" + "p = alpha(p);\n" + "%OptimizeFunctionOnNextCall(alpha);\n" + "p = alpha(p);\n" + "\n" + "\n" + "startProfiling();\n" + "for(let i = 0; i < 10000; i++) {\n" + " p = alpha(p);\n" + "}\n" + "stopProfiling();\n" + "\n" + "\n", + "script_a"); + + script_b->Run(env).ToLocalChecked(); + script_a->Run(env).ToLocalChecked(); + + const v8::CpuProfile* profile = i::ProfilerExtension::last_profile; + const v8::CpuProfileNode* current = profile->GetTopDownRoot(); + reinterpret_cast(const_cast(current)) + ->Print(0); + // The tree should look like this: + // 0 (root) 0 #1 + // 5 (program) 0 #6 + // 2 14 #2 script_a:1 + // ;;; deopted at script_id: 14 position: 299 with reason 'Insufficient + // type feedback for call'. + // 1 alpha 14 #4 script_a:1 + // 9 beta 13 #5 script_b:0 + // 0 startProfiling 0 #3 + + const v8::CpuProfileNode* root = profile->GetTopDownRoot(); + const v8::CpuProfileNode* script = GetChild(env, root, ""); + CheckFunctionDetails(env->GetIsolate(), script, "", "script_a", + script_a->GetUnboundScript()->GetId(), 1, 1); + const v8::CpuProfileNode* alpha = FindChild(env, script, "alpha"); + // Return early if profiling didn't sample alpha. + if (!alpha) return; + CheckFunctionDetails(env->GetIsolate(), alpha, "alpha", "script_a", + script_a->GetUnboundScript()->GetId(), 1, 15); + const v8::CpuProfileNode* beta = FindChild(env, alpha, "beta"); + if (!beta) return; + CheckFunctionDetails(env->GetIsolate(), beta, "beta", "script_b", + script_b->GetUnboundScript()->GetId(), 0, 0); +} TEST(DontStopOnFinishedProfileDelete) { v8::HandleScope scope(CcTest::isolate()); From 553d4ee57db12ef9f1c039985024c2e4f79fd815 Mon Sep 17 00:00:00 2001 From: Peter Dalgaard-Jensen Date: Wed, 24 Jan 2018 16:54:14 +0100 Subject: [PATCH 05/25] doc: fix return value for require.resolve.paths() Update documentation of modules.md for require.resolve.paths() to include the possibillity of null as a return value if the request string given matches a core module name. PR-URL: https://github.com/nodejs/node/pull/18350 Fixes: https://github.com/nodejs/node/issues/18230 Reviewed-By: Vse Mozhet Byt Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/modules.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index 64048cebe87..157ec3b6f71 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -626,9 +626,11 @@ added: v8.9.0 --> * `request` {string} The module path whose lookup paths are being retrieved. -* Returns: {Array} +* Returns: {Array|null} -Returns an array containing the paths searched during resolution of `request`. +Returns an array containing the paths searched during resolution of `request` or +null if the `request` string references a core module, for example `http` or +`fs`. ## The `module` Object # C++ Addons @@ -97,12 +94,12 @@ The `module_name` must match the filename of the final binary (excluding the .node suffix). In the `hello.cc` example, then, the initialization function is `init` and the -Addon module name is `binding`. +Addon module name is `addon`. ### Building Once the source code has been written, it must be compiled into the binary -`binding.node` file. To do so, create a file called `binding.gyp` in the +`addon.node` file. To do so, create a file called `binding.gyp` in the top-level of the project describing the build configuration of the module using a JSON-like format. This file is used by [node-gyp][] -- a tool written specifically to compile Node.js Addons. @@ -111,7 +108,7 @@ specifically to compile Node.js Addons. { "targets": [ { - "target_name": "binding", + "target_name": "addon", "sources": [ "hello.cc" ] } ] @@ -131,21 +128,21 @@ generate the appropriate project build files for the current platform. This will generate either a `Makefile` (on Unix platforms) or a `vcxproj` file (on Windows) in the `build/` directory. -Next, invoke the `node-gyp build` command to generate the compiled -`binding.node` file. This will be put into the `build/Release/` directory. +Next, invoke the `node-gyp build` command to generate the compiled `addon.node` +file. This will be put into the `build/Release/` directory. When using `npm install` to install a Node.js Addon, npm uses its own bundled version of `node-gyp` to perform this same set of actions, generating a compiled version of the Addon for the user's platform on demand. Once built, the binary Addon can be used from within Node.js by pointing -[`require()`][require] to the built `binding.node` module: +[`require()`][require] to the built `addon.node` module: ```js // hello.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -console.log(binding.hello()); +console.log(addon.hello()); // Prints: 'world' ``` @@ -162,9 +159,9 @@ similar to: ```js try { - return require('./build/Release/binding.node'); + return require('./build/Release/addon.node'); } catch (err) { - return require('./build/Debug/binding.node'); + return require('./build/Debug/addon.node'); } ``` @@ -198,9 +195,9 @@ When calling [`require()`][require], the `.node` extension can usually be omitted and Node.js will still find and initialize the Addon. One caveat, however, is that Node.js will first attempt to locate and load modules or JavaScript files that happen to share the same base name. For instance, if -there is a file `binding.js` in the same directory as the binary `binding.node`, -then [`require('binding')`][require] will give precedence to the `binding.js` -file and load it instead. +there is a file `addon.js` in the same directory as the binary `addon.node`, +then [`require('addon')`][require] will give precedence to the `addon.js` file +and load it instead. ## Native Abstractions for Node.js @@ -287,8 +284,8 @@ Each of these examples using the following `binding.gyp` file: { "targets": [ { - "target_name": "binding", - "sources": [ "binding.cc" ] + "target_name": "addon", + "sources": [ "addon.cc" ] } ] } @@ -298,7 +295,7 @@ In cases where there is more than one `.cc` file, simply add the additional filename to the `sources` array. For example: ```json -"sources": ["binding.cc", "myexample.cc"] +"sources": ["addon.cc", "myexample.cc"] ``` Once the `binding.gyp` file is ready, the example Addons can be configured and @@ -320,7 +317,7 @@ The following example illustrates how to read function arguments passed from JavaScript and how to return a result: ```cpp -// binding.cc +// addon.cc #include namespace demo { @@ -377,9 +374,9 @@ Once compiled, the example Addon can be required and used from within Node.js: ```js // test.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -console.log('This should be eight:', binding.add(3, 5)); +console.log('This should be eight:', addon.add(3, 5)); ``` @@ -390,7 +387,7 @@ function and execute them from there. The following example illustrates how to invoke such callbacks: ```cpp -// binding.cc +// addon.cc #include namespace demo { @@ -430,9 +427,9 @@ To test it, run the following JavaScript: ```js // test.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -binding((msg) => { +addon((msg) => { console.log(msg); // Prints: 'hello world' }); @@ -447,7 +444,7 @@ illustrated in the following example. An object is created and returned with a property `msg` that echoes the string passed to `createObject()`: ```cpp -// binding.cc +// addon.cc #include namespace demo { @@ -481,10 +478,10 @@ To test it in JavaScript: ```js // test.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -const obj1 = binding('hello'); -const obj2 = binding('world'); +const obj1 = addon('hello'); +const obj2 = addon('world'); console.log(obj1.msg, obj2.msg); // Prints: 'hello world' ``` @@ -496,7 +493,7 @@ Another common scenario is creating JavaScript functions that wrap C++ functions and returning those back to JavaScript: ```cpp -// binding.cc +// addon.cc #include namespace demo { @@ -540,9 +537,9 @@ To test: ```js // test.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -const fn = binding(); +const fn = addon(); console.log(fn()); // Prints: 'hello world' ``` @@ -554,7 +551,7 @@ It is also possible to wrap C++ objects/classes in a way that allows new instances to be created using the JavaScript `new` operator: ```cpp -// binding.cc +// addon.cc #include #include "myobject.h" @@ -689,9 +686,9 @@ To build this example, the `myobject.cc` file must be added to the { "targets": [ { - "target_name": "binding", + "target_name": "addon", "sources": [ - "binding.cc", + "addon.cc", "myobject.cc" ] } @@ -703,9 +700,9 @@ Test it with: ```js // test.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -const obj = new binding.MyObject(10); +const obj = new addon.MyObject(10); console.log(obj.plusOne()); // Prints: 11 console.log(obj.plusOne()); @@ -720,15 +717,15 @@ Alternatively, it is possible to use a factory pattern to avoid explicitly creating object instances using the JavaScript `new` operator: ```js -const obj = binding.createObject(); +const obj = addon.createObject(); // instead of: -// const obj = new binding.Object(); +// const obj = new addon.Object(); ``` -First, the `createObject()` method is implemented in `binding.cc`: +First, the `createObject()` method is implemented in `addon.cc`: ```cpp -// binding.cc +// addon.cc #include #include "myobject.h" @@ -884,9 +881,9 @@ Once again, to build this example, the `myobject.cc` file must be added to the { "targets": [ { - "target_name": "binding", + "target_name": "addon", "sources": [ - "binding.cc", + "addon.cc", "myobject.cc" ] } @@ -898,7 +895,7 @@ Test it with: ```js // test.js -const createObject = require('./build/Release/binding'); +const createObject = require('./build/Release/addon'); const obj = createObject(10); console.log(obj.plusOne()); @@ -926,7 +923,7 @@ wrapped objects around by unwrapping them with the Node.js helper function that can take two `MyObject` objects as input arguments: ```cpp -// binding.cc +// addon.cc #include #include #include "myobject.h" @@ -1080,11 +1077,11 @@ Test it with: ```js // test.js -const binding = require('./build/Release/binding'); +const addon = require('./build/Release/addon'); -const obj1 = binding.createObject(10); -const obj2 = binding.createObject(20); -const result = binding.add(obj1, obj2); +const obj1 = addon.createObject(10); +const obj2 = addon.createObject(20); +const result = addon.add(obj1, obj2); console.log(result); // Prints: 30 @@ -1109,10 +1106,10 @@ and a pointer to untyped context data to be passed to that callback. Callbacks are run in last-in first-out order. -The following `binding.cc` implements AtExit: +The following `addon.cc` implements AtExit: ```cpp -// binding.cc +// addon.cc #include #include #include @@ -1164,7 +1161,7 @@ Test in JavaScript by running: ```js // test.js -require('./build/Release/binding'); +require('./build/Release/addon'); ``` [Embedder's Guide]: https://github.com/v8/v8/wiki/Embedder's%20Guide diff --git a/node.gyp b/node.gyp index ddb8e4c15fc..d0c8f05e66a 100644 --- a/node.gyp +++ b/node.gyp @@ -537,6 +537,14 @@ # node_dtrace_ustack.o not supported on mac and linux # node_dtrace_provider.o All except OS X. "dtrace -G" is not # used on OS X. + # + # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not + # actually exist. They're listed here to trick GYP into linking the + # corresponding object files into the final "node" executable. These + # object files are generated by "dtrace -G" using custom actions + # below, and the GYP-generated Makefiles will properly build them when + # needed. + # 'sources': [ 'src/node_dtrace.cc' ], 'conditions': [ [ 'OS=="linux"', { @@ -546,8 +554,8 @@ }], [ 'OS!="mac" and OS!="linux"', { 'sources': [ - '<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace_provider.o', - '<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace_ustack.o', + 'src/node_dtrace_ustack.cc', + 'src/node_dtrace_provider.cc', ] } ] ] diff --git a/test/addons-napi/test_array/binding.gyp b/test/addons-napi/test_array/binding.gyp index bb8f4b453aa..44920de0986 100644 --- a/test/addons-napi/test_array/binding.gyp +++ b/test/addons-napi/test_array/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_array", "sources": [ "test_array.c" ] } ] diff --git a/test/addons-napi/test_array/test.js b/test/addons-napi/test_array/test.js index bba951d921d..75c181d9da8 100644 --- a/test/addons-napi/test_array/test.js +++ b/test/addons-napi/test_array/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // Testing api calls for arrays -const test_array = require(`./build/${common.buildType}/binding`); +const test_array = require(`./build/${common.buildType}/test_array`); const array = [ 1, diff --git a/test/addons-napi/test_async/binding.gyp b/test/addons-napi/test_async/binding.gyp index 2837dfb294b..cf8beb70c68 100644 --- a/test/addons-napi/test_async/binding.gyp +++ b/test/addons-napi/test_async/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_async", "sources": [ "test_async.cc" ] } ] diff --git a/test/addons-napi/test_async/test-async-hooks.js b/test/addons-napi/test_async/test-async-hooks.js index 32c798d0858..db6e0cbd167 100644 --- a/test/addons-napi/test_async/test-async-hooks.js +++ b/test/addons-napi/test_async/test-async-hooks.js @@ -2,7 +2,7 @@ const common = require('../../common'); const assert = require('assert'); const async_hooks = require('async_hooks'); -const test_async = require(`./build/${common.buildType}/binding`); +const test_async = require(`./build/${common.buildType}/test_async`); const events = []; let testId; diff --git a/test/addons-napi/test_async/test.js b/test/addons-napi/test_async/test.js index 1e5194abea7..34ecae08e67 100644 --- a/test/addons-napi/test_async/test.js +++ b/test/addons-napi/test_async/test.js @@ -2,7 +2,7 @@ const common = require('../../common'); const assert = require('assert'); const child_process = require('child_process'); -const test_async = require(`./build/${common.buildType}/binding`); +const test_async = require(`./build/${common.buildType}/test_async`); const testException = 'test_async_cb_exception'; diff --git a/test/addons-napi/test_buffer/binding.gyp b/test/addons-napi/test_buffer/binding.gyp index b3a6cee217f..e41a3993cd7 100644 --- a/test/addons-napi/test_buffer/binding.gyp +++ b/test/addons-napi/test_buffer/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_buffer", "sources": [ "test_buffer.c" ] } ] diff --git a/test/addons-napi/test_buffer/test.js b/test/addons-napi/test_buffer/test.js index 29104b906fe..740b0474a79 100644 --- a/test/addons-napi/test_buffer/test.js +++ b/test/addons-napi/test_buffer/test.js @@ -2,7 +2,7 @@ // Flags: --expose-gc const common = require('../../common'); -const binding = require(`./build/${common.buildType}/binding`); +const binding = require(`./build/${common.buildType}/test_buffer`); const assert = require('assert'); assert.strictEqual(binding.newBuffer().toString(), binding.theText); diff --git a/test/addons-napi/test_constructor/binding.gyp b/test/addons-napi/test_constructor/binding.gyp index e194da9da2a..1945a9fd5a7 100644 --- a/test/addons-napi/test_constructor/binding.gyp +++ b/test/addons-napi/test_constructor/binding.gyp @@ -1,8 +1,12 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_constructor", "sources": [ "test_constructor.c" ] + }, + { + "target_name": "test_constructor_name", + "sources": [ "test_constructor_name.c" ] } ] } diff --git a/test/addons-napi/test_constructor/test.js b/test/addons-napi/test_constructor/test.js index 6fd124c8920..616ba6c2a29 100644 --- a/test/addons-napi/test_constructor/test.js +++ b/test/addons-napi/test_constructor/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // Testing api calls for a constructor that defines properties -const TestConstructor = require(`./build/${common.buildType}/binding`); +const TestConstructor = require(`./build/${common.buildType}/test_constructor`); const test_object = new TestConstructor(); assert.strictEqual(test_object.echo('hello'), 'hello'); diff --git a/test/addons-napi/test_constructor_name/test.js b/test/addons-napi/test_constructor/test2.js similarity index 69% rename from test/addons-napi/test_constructor_name/test.js rename to test/addons-napi/test_constructor/test2.js index 0f713ff55c7..64c03cbc684 100644 --- a/test/addons-napi/test_constructor_name/test.js +++ b/test/addons-napi/test_constructor/test2.js @@ -3,5 +3,6 @@ const common = require('../../common'); const assert = require('assert'); // Testing api calls for a constructor that defines properties -const TestConstructor = require(`./build/${common.buildType}/binding`); +const TestConstructor = + require(`./build/${common.buildType}/test_constructor_name`); assert.strictEqual(TestConstructor.name, 'MyObject'); diff --git a/test/addons-napi/test_constructor_name/test_constructor_name.c b/test/addons-napi/test_constructor/test_constructor_name.c similarity index 100% rename from test/addons-napi/test_constructor_name/test_constructor_name.c rename to test/addons-napi/test_constructor/test_constructor_name.c diff --git a/test/addons-napi/test_constructor_name/binding.gyp b/test/addons-napi/test_constructor_name/binding.gyp deleted file mode 100644 index 8beb2098887..00000000000 --- a/test/addons-napi/test_constructor_name/binding.gyp +++ /dev/null @@ -1,8 +0,0 @@ -{ - "targets": [ - { - "target_name": "binding", - "sources": [ "test_constructor_name.c" ] - } - ] -} diff --git a/test/addons-napi/test_conversions/binding.gyp b/test/addons-napi/test_conversions/binding.gyp index b667ffd6de8..8d8d6fc0128 100644 --- a/test/addons-napi/test_conversions/binding.gyp +++ b/test/addons-napi/test_conversions/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_conversions", "sources": [ "test_conversions.c" ] } ] diff --git a/test/addons-napi/test_conversions/test.js b/test/addons-napi/test_conversions/test.js index 9604bb73818..73d2c3314f6 100644 --- a/test/addons-napi/test_conversions/test.js +++ b/test/addons-napi/test_conversions/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const test = require(`./build/${common.buildType}/binding`); +const test = require(`./build/${common.buildType}/test_conversions`); const boolExpected = /boolean was expected/; const numberExpected = /number was expected/; diff --git a/test/addons-napi/test_dataview/binding.gyp b/test/addons-napi/test_dataview/binding.gyp index 88a14ae8487..bf014dc9e7b 100644 --- a/test/addons-napi/test_dataview/binding.gyp +++ b/test/addons-napi/test_dataview/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_dataview", "sources": [ "test_dataview.c" ] } ] diff --git a/test/addons-napi/test_dataview/test.js b/test/addons-napi/test_dataview/test.js index b24a7880357..a6be5849406 100644 --- a/test/addons-napi/test_dataview/test.js +++ b/test/addons-napi/test_dataview/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // Testing api calls for arrays -const test_dataview = require(`./build/${common.buildType}/binding`); +const test_dataview = require(`./build/${common.buildType}/test_dataview`); // Test for creating dataview { diff --git a/test/addons-napi/test_env_sharing/binding.gyp b/test/addons-napi/test_env_sharing/binding.gyp index 8e38a63a1e3..5699a8391dd 100644 --- a/test/addons-napi/test_env_sharing/binding.gyp +++ b/test/addons-napi/test_env_sharing/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "store_env", "sources": [ "store_env.c" ] }, { diff --git a/test/addons-napi/test_env_sharing/test.js b/test/addons-napi/test_env_sharing/test.js index edae60e1eb2..6e21bf4c638 100644 --- a/test/addons-napi/test_env_sharing/test.js +++ b/test/addons-napi/test_env_sharing/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); -const storeEnv = require(`./build/${common.buildType}/binding`); +const storeEnv = require(`./build/${common.buildType}/store_env`); const compareEnv = require(`./build/${common.buildType}/compare_env`); const assert = require('assert'); diff --git a/test/addons-napi/test_error/binding.gyp b/test/addons-napi/test_error/binding.gyp index 8e80d2bfa28..c2defd9551a 100644 --- a/test/addons-napi/test_error/binding.gyp +++ b/test/addons-napi/test_error/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_error", "sources": [ "test_error.cc" ] } ] diff --git a/test/addons-napi/test_error/test.js b/test/addons-napi/test_error/test.js index 154294fca55..d5c92cb4c3c 100644 --- a/test/addons-napi/test_error/test.js +++ b/test/addons-napi/test_error/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); -const test_error = require(`./build/${common.buildType}/binding`); +const test_error = require(`./build/${common.buildType}/test_error`); const assert = require('assert'); const theError = new Error('Some error'); const theTypeError = new TypeError('Some type error'); diff --git a/test/addons-napi/test_exception/binding.gyp b/test/addons-napi/test_exception/binding.gyp index 3a20bafabca..d2e4586e46b 100644 --- a/test/addons-napi/test_exception/binding.gyp +++ b/test/addons-napi/test_exception/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_exception", "sources": [ "test_exception.c" ] } ] diff --git a/test/addons-napi/test_exception/test.js b/test/addons-napi/test_exception/test.js index dc82249e6c0..8bd2f50b12b 100644 --- a/test/addons-napi/test_exception/test.js +++ b/test/addons-napi/test_exception/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); -const test_exception = require(`./build/${common.buildType}/binding`); +const test_exception = require(`./build/${common.buildType}/test_exception`); const assert = require('assert'); const theError = new Error('Some error'); function throwTheError() { diff --git a/test/addons-napi/test_fatal/binding.gyp b/test/addons-napi/test_fatal/binding.gyp index 99c7e5de4c1..ad661825f1f 100644 --- a/test/addons-napi/test_fatal/binding.gyp +++ b/test/addons-napi/test_fatal/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_fatal", "sources": [ "test_fatal.c" ] } ] diff --git a/test/addons-napi/test_fatal/test.js b/test/addons-napi/test_fatal/test.js index c8724d054b6..7ff9a395635 100644 --- a/test/addons-napi/test_fatal/test.js +++ b/test/addons-napi/test_fatal/test.js @@ -2,7 +2,7 @@ const common = require('../../common'); const assert = require('assert'); const child_process = require('child_process'); -const test_fatal = require(`./build/${common.buildType}/binding`); +const test_fatal = require(`./build/${common.buildType}/test_fatal`); // Test in a child process because the test code will trigger a fatal error // that crashes the process. diff --git a/test/addons-napi/test_fatal/test2.js b/test/addons-napi/test_fatal/test2.js index 52a18deedd4..b9bde8f1301 100644 --- a/test/addons-napi/test_fatal/test2.js +++ b/test/addons-napi/test_fatal/test2.js @@ -2,7 +2,7 @@ const common = require('../../common'); const assert = require('assert'); const child_process = require('child_process'); -const test_fatal = require(`./build/${common.buildType}/binding`); +const test_fatal = require(`./build/${common.buildType}/test_fatal`); // Test in a child process because the test code will trigger a fatal error // that crashes the process. diff --git a/test/addons-napi/test_function/binding.gyp b/test/addons-napi/test_function/binding.gyp index 61035d9c6bd..2b015bddd7d 100644 --- a/test/addons-napi/test_function/binding.gyp +++ b/test/addons-napi/test_function/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_function", "sources": [ "test_function.c" ] } ] diff --git a/test/addons-napi/test_function/test.js b/test/addons-napi/test_function/test.js index 6f496796bd0..752e9965b23 100644 --- a/test/addons-napi/test_function/test.js +++ b/test/addons-napi/test_function/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // testing api calls for function -const test_function = require(`./build/${common.buildType}/binding`); +const test_function = require(`./build/${common.buildType}/test_function`); function func1() { diff --git a/test/addons-napi/test_general/binding.gyp b/test/addons-napi/test_general/binding.gyp index cf2a8574fe2..f8ef9f59613 100644 --- a/test/addons-napi/test_general/binding.gyp +++ b/test/addons-napi/test_general/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_general", "sources": [ "test_general.c" ] } ] diff --git a/test/addons-napi/test_general/test.js b/test/addons-napi/test_general/test.js index fba407d8daf..ee6618c8121 100644 --- a/test/addons-napi/test_general/test.js +++ b/test/addons-napi/test_general/test.js @@ -2,7 +2,7 @@ // Flags: --expose-gc const common = require('../../common'); -const test_general = require(`./build/${common.buildType}/binding`); +const test_general = require(`./build/${common.buildType}/test_general`); const assert = require('assert'); const val1 = '1'; diff --git a/test/addons-napi/test_general/testGlobals.js b/test/addons-napi/test_general/testGlobals.js index ffde6de47cc..38cf3f3edbc 100644 --- a/test/addons-napi/test_general/testGlobals.js +++ b/test/addons-napi/test_general/testGlobals.js @@ -2,7 +2,7 @@ const common = require('../../common'); const assert = require('assert'); -const test_globals = require(`./build/${common.buildType}/binding`); +const test_globals = require(`./build/${common.buildType}/test_general`); assert.strictEqual(test_globals.getUndefined(), undefined); assert.strictEqual(test_globals.getNull(), null); diff --git a/test/addons-napi/test_general/testInstanceOf.js b/test/addons-napi/test_general/testInstanceOf.js index 40e081b9aac..3b37188ab4d 100644 --- a/test/addons-napi/test_general/testInstanceOf.js +++ b/test/addons-napi/test_general/testInstanceOf.js @@ -6,7 +6,7 @@ const assert = require('assert'); // addon is referenced through the eval expression in testFile // eslint-disable-next-line no-unused-vars -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/test_general`); const path = require('path'); // This test depends on a number of V8 tests. diff --git a/test/addons-napi/test_general/testNapiRun.js b/test/addons-napi/test_general/testNapiRun.js index 2425d5db524..af9f89fa29d 100644 --- a/test/addons-napi/test_general/testNapiRun.js +++ b/test/addons-napi/test_general/testNapiRun.js @@ -5,7 +5,7 @@ const assert = require('assert'); // addon is referenced through the eval expression in testFile // eslint-disable-next-line no-unused-vars -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/test_general`); const testCase = '(41.92 + 0.08);'; const expected = 42; diff --git a/test/addons-napi/test_general/testNapiStatus.js b/test/addons-napi/test_general/testNapiStatus.js index e71bdc6892c..a588862098f 100644 --- a/test/addons-napi/test_general/testNapiStatus.js +++ b/test/addons-napi/test_general/testNapiStatus.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); -const addon = require(`./build/${common.buildType}/binding`); +const addon = require(`./build/${common.buildType}/test_general`); const assert = require('assert'); addon.createNapiError(); diff --git a/test/addons-napi/test_handle_scope/binding.gyp b/test/addons-napi/test_handle_scope/binding.gyp index a063d28d81f..daa96681a52 100644 --- a/test/addons-napi/test_handle_scope/binding.gyp +++ b/test/addons-napi/test_handle_scope/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_handle_scope", "sources": [ "test_handle_scope.c" ] } ] diff --git a/test/addons-napi/test_handle_scope/test.js b/test/addons-napi/test_handle_scope/test.js index eed99f81bd7..53abfe178c8 100644 --- a/test/addons-napi/test_handle_scope/test.js +++ b/test/addons-napi/test_handle_scope/test.js @@ -3,7 +3,8 @@ const common = require('../../common'); const assert = require('assert'); // testing handle scope api calls -const testHandleScope = require(`./build/${common.buildType}/binding`); +const testHandleScope = + require(`./build/${common.buildType}/test_handle_scope`); testHandleScope.NewScope(); diff --git a/test/addons-napi/test_number/binding.gyp b/test/addons-napi/test_number/binding.gyp index 9a7b2a3d319..c934d5ef03b 100644 --- a/test/addons-napi/test_number/binding.gyp +++ b/test/addons-napi/test_number/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_number", "sources": [ "test_number.c" ] } ] diff --git a/test/addons-napi/test_number/test.js b/test/addons-napi/test_number/test.js index 18d39ec91fe..e92c6d0cd29 100644 --- a/test/addons-napi/test_number/test.js +++ b/test/addons-napi/test_number/test.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); -const test_number = require(`./build/${common.buildType}/binding`); +const test_number = require(`./build/${common.buildType}/test_number`); // testing api calls for number diff --git a/test/addons-napi/test_object/binding.gyp b/test/addons-napi/test_object/binding.gyp index f589ab92fab..be225ace779 100644 --- a/test/addons-napi/test_object/binding.gyp +++ b/test/addons-napi/test_object/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_object", "sources": [ "test_object.c" ] } ] diff --git a/test/addons-napi/test_object/test.js b/test/addons-napi/test_object/test.js index 13defcc512a..8e44a1b5ed6 100644 --- a/test/addons-napi/test_object/test.js +++ b/test/addons-napi/test_object/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // Testing api calls for objects -const test_object = require(`./build/${common.buildType}/binding`); +const test_object = require(`./build/${common.buildType}/test_object`); const object = { diff --git a/test/addons-napi/test_promise/binding.gyp b/test/addons-napi/test_promise/binding.gyp index f9a3f75744e..bf266f93db7 100644 --- a/test/addons-napi/test_promise/binding.gyp +++ b/test/addons-napi/test_promise/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_promise", "sources": [ "test_promise.c" ] } ] diff --git a/test/addons-napi/test_promise/test.js b/test/addons-napi/test_promise/test.js index c038c969951..6dc51b3fa55 100644 --- a/test/addons-napi/test_promise/test.js +++ b/test/addons-napi/test_promise/test.js @@ -5,7 +5,7 @@ const common = require('../../common'); // This tests the promise-related n-api calls const assert = require('assert'); -const test_promise = require(`./build/${common.buildType}/binding`); +const test_promise = require(`./build/${common.buildType}/test_promise`); common.crashOnUnhandledRejection(); diff --git a/test/addons-napi/test_properties/binding.gyp b/test/addons-napi/test_properties/binding.gyp index c897a825031..345e5c88d7c 100644 --- a/test/addons-napi/test_properties/binding.gyp +++ b/test/addons-napi/test_properties/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_properties", "sources": [ "test_properties.c" ] } ] diff --git a/test/addons-napi/test_properties/test.js b/test/addons-napi/test_properties/test.js index 9d7c9ba3414..13a546c7b87 100644 --- a/test/addons-napi/test_properties/test.js +++ b/test/addons-napi/test_properties/test.js @@ -5,7 +5,7 @@ const readonlyErrorRE = /^TypeError: Cannot assign to read only property '.*' of object '#'$/; // Testing api calls for defining properties -const test_object = require(`./build/${common.buildType}/binding`); +const test_object = require(`./build/${common.buildType}/test_properties`); assert.strictEqual(test_object.echo('hello'), 'hello'); diff --git a/test/addons-napi/test_reference/binding.gyp b/test/addons-napi/test_reference/binding.gyp index 9a4583cb833..3a6d69a65c8 100644 --- a/test/addons-napi/test_reference/binding.gyp +++ b/test/addons-napi/test_reference/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_reference", "sources": [ "test_reference.c" ] } ] diff --git a/test/addons-napi/test_reference/test.js b/test/addons-napi/test_reference/test.js index caaa9b599e8..14932a74ca7 100644 --- a/test/addons-napi/test_reference/test.js +++ b/test/addons-napi/test_reference/test.js @@ -4,7 +4,7 @@ const common = require('../../common'); const assert = require('assert'); -const test_reference = require(`./build/${common.buildType}/binding`); +const test_reference = require(`./build/${common.buildType}/test_reference`); // This test script uses external values with finalizer callbacks // in order to track when values get garbage-collected. Each invocation diff --git a/test/addons-napi/test_string/binding.gyp b/test/addons-napi/test_string/binding.gyp index f49410e3dd8..d4825de9339 100644 --- a/test/addons-napi/test_string/binding.gyp +++ b/test/addons-napi/test_string/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_string", "sources": [ "test_string.c" ] } ] diff --git a/test/addons-napi/test_string/test.js b/test/addons-napi/test_string/test.js index fd58ea0983b..5ce3d739c7a 100644 --- a/test/addons-napi/test_string/test.js +++ b/test/addons-napi/test_string/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // testing api calls for string -const test_string = require(`./build/${common.buildType}/binding`); +const test_string = require(`./build/${common.buildType}/test_string`); const empty = ''; assert.strictEqual(test_string.TestLatin1(empty), empty); diff --git a/test/addons-napi/test_symbol/binding.gyp b/test/addons-napi/test_symbol/binding.gyp index bae042ee0e6..6ef3407968d 100644 --- a/test/addons-napi/test_symbol/binding.gyp +++ b/test/addons-napi/test_symbol/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_symbol", "sources": [ "test_symbol.c" ] } ] diff --git a/test/addons-napi/test_symbol/test1.js b/test/addons-napi/test_symbol/test1.js index 83f2f71f6f8..25eb473c4b1 100644 --- a/test/addons-napi/test_symbol/test1.js +++ b/test/addons-napi/test_symbol/test1.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // testing api calls for symbol -const test_symbol = require(`./build/${common.buildType}/binding`); +const test_symbol = require(`./build/${common.buildType}/test_symbol`); const sym = test_symbol.New('test'); assert.strictEqual(sym.toString(), 'Symbol(test)'); diff --git a/test/addons-napi/test_symbol/test2.js b/test/addons-napi/test_symbol/test2.js index 4ff0955c5db..60512431110 100644 --- a/test/addons-napi/test_symbol/test2.js +++ b/test/addons-napi/test_symbol/test2.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // testing api calls for symbol -const test_symbol = require(`./build/${common.buildType}/binding`); +const test_symbol = require(`./build/${common.buildType}/test_symbol`); const fooSym = test_symbol.New('foo'); const myObj = {}; diff --git a/test/addons-napi/test_symbol/test3.js b/test/addons-napi/test_symbol/test3.js index 72379644cb0..a7c6c18c025 100644 --- a/test/addons-napi/test_symbol/test3.js +++ b/test/addons-napi/test_symbol/test3.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // testing api calls for symbol -const test_symbol = require(`./build/${common.buildType}/binding`); +const test_symbol = require(`./build/${common.buildType}/test_symbol`); assert.notStrictEqual(test_symbol.New(), test_symbol.New()); assert.notStrictEqual(test_symbol.New('foo'), test_symbol.New('foo')); diff --git a/test/addons-napi/test_typedarray/binding.gyp b/test/addons-napi/test_typedarray/binding.gyp index 29fb299d329..8b4a4dc622b 100644 --- a/test/addons-napi/test_typedarray/binding.gyp +++ b/test/addons-napi/test_typedarray/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_typedarray", "sources": [ "test_typedarray.c" ] } ] diff --git a/test/addons-napi/test_typedarray/test.js b/test/addons-napi/test_typedarray/test.js index debf99b80ae..ed37f3c5d4d 100644 --- a/test/addons-napi/test_typedarray/test.js +++ b/test/addons-napi/test_typedarray/test.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); // Testing api calls for arrays -const test_typedarray = require(`./build/${common.buildType}/binding`); +const test_typedarray = require(`./build/${common.buildType}/test_typedarray`); const byteArray = new Uint8Array(3); byteArray[0] = 0; diff --git a/test/addons-napi/test_uv_loop/binding.gyp b/test/addons-napi/test_uv_loop/binding.gyp index e403df92455..81fcfdc592a 100644 --- a/test/addons-napi/test_uv_loop/binding.gyp +++ b/test/addons-napi/test_uv_loop/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_uv_loop", "sources": [ "test_uv_loop.cc" ] } ] diff --git a/test/addons-napi/test_uv_loop/test.js b/test/addons-napi/test_uv_loop/test.js index ce13a482bdc..4efc3c6fcd7 100644 --- a/test/addons-napi/test_uv_loop/test.js +++ b/test/addons-napi/test_uv_loop/test.js @@ -1,5 +1,5 @@ 'use strict'; const common = require('../../common'); -const { SetImmediate } = require(`./build/${common.buildType}/binding`); +const { SetImmediate } = require(`./build/${common.buildType}/test_uv_loop`); SetImmediate(common.mustCall()); diff --git a/test/addons-napi/test_warning/binding.gyp b/test/addons-napi/test_warning/binding.gyp index d84028f085d..a44593e2518 100644 --- a/test/addons-napi/test_warning/binding.gyp +++ b/test/addons-napi/test_warning/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "binding", + "target_name": "test_warning", "sources": [ "test_warning.c" ] }, { diff --git a/test/addons-napi/test_warning/test.js b/test/addons-napi/test_warning/test.js index 6909a1ebcdd..c82008435fd 100644 --- a/test/addons-napi/test_warning/test.js +++ b/test/addons-napi/test_warning/test.js @@ -2,7 +2,7 @@ if (process.argv[2] === 'child') { const common = require('../../common'); - console.log(require(`./build/${common.buildType}/binding`)); + console.log(require(`./build/${common.buildType}/test_warning`)); console.log(require(`./build/${common.buildType}/test_warning2`)); } else { const run = require('child_process').spawnSync; diff --git a/test/addons/.gitignore b/test/addons/.gitignore index ff6b0079431..bde1cf3ab96 100644 --- a/test/addons/.gitignore +++ b/test/addons/.gitignore @@ -1,3 +1,5 @@ +.buildstamp +.docbuildstamp Makefile *.Makefile *.mk diff --git a/test/addons/01_function_arguments/binding.cc b/test/addons/01_function_arguments/binding.cc deleted file mode 100644 index 1379699453d..00000000000 --- a/test/addons/01_function_arguments/binding.cc +++ /dev/null @@ -1,52 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include - -namespace demo { - -using v8::Exception; -using v8::FunctionCallbackInfo; -using v8::Isolate; -using v8::Local; -using v8::Number; -using v8::Object; -using v8::String; -using v8::Value; - -// This is the implementation of the "add" method -// Input arguments are passed using the -// const FunctionCallbackInfo& args struct -void Add(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - // Check the number of arguments passed. - if (args.Length() < 2) { - // Throw an Error that is passed back to JavaScript - isolate->ThrowException(Exception::TypeError( - String::NewFromUtf8(isolate, "Wrong number of arguments"))); - return; - } - - // Check the argument types - if (!args[0]->IsNumber() || !args[1]->IsNumber()) { - isolate->ThrowException(Exception::TypeError( - String::NewFromUtf8(isolate, "Wrong arguments"))); - return; - } - - // Perform the operation - double value = args[0]->NumberValue() + args[1]->NumberValue(); - Local num = Number::New(isolate, value); - - // Set the return value (using the passed in - // FunctionCallbackInfo&) - args.GetReturnValue().Set(num); -} - -void Init(Local exports) { - NODE_SET_METHOD(exports, "add", Add); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, Init) - -} // namespace demo diff --git a/test/addons/01_function_arguments/binding.gyp b/test/addons/01_function_arguments/binding.gyp deleted file mode 100644 index 6cd05e5bba3..00000000000 --- a/test/addons/01_function_arguments/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/01_function_arguments/test.js b/test/addons/01_function_arguments/test.js deleted file mode 100644 index 3372ff3329c..00000000000 --- a/test/addons/01_function_arguments/test.js +++ /dev/null @@ -1,7 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const binding = require(`./build/${common.buildType}/binding`); - -console.log('This should be eight:', binding.add(3, 5)); diff --git a/test/addons/02_callbacks/binding.cc b/test/addons/02_callbacks/binding.cc deleted file mode 100644 index 53996f648bc..00000000000 --- a/test/addons/02_callbacks/binding.cc +++ /dev/null @@ -1,30 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include - -namespace demo { - -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::Isolate; -using v8::Local; -using v8::Null; -using v8::Object; -using v8::String; -using v8::Value; - -void RunCallback(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - Local cb = Local::Cast(args[0]); - const unsigned argc = 1; - Local argv[argc] = { String::NewFromUtf8(isolate, "hello world") }; - cb->Call(Null(isolate), argc, argv); -} - -void Init(Local exports, Local module) { - NODE_SET_METHOD(module, "exports", RunCallback); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, Init) - -} // namespace demo diff --git a/test/addons/02_callbacks/binding.gyp b/test/addons/02_callbacks/binding.gyp deleted file mode 100644 index 6cd05e5bba3..00000000000 --- a/test/addons/02_callbacks/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/02_callbacks/test.js b/test/addons/02_callbacks/test.js deleted file mode 100644 index e18c44e269e..00000000000 --- a/test/addons/02_callbacks/test.js +++ /dev/null @@ -1,10 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const binding = require(`./build/${common.buildType}/binding`); - -binding((msg) => { - console.log(msg); -// Prints: 'hello world' -}); diff --git a/test/addons/03_object_factory/binding.cc b/test/addons/03_object_factory/binding.cc deleted file mode 100644 index d727552cd71..00000000000 --- a/test/addons/03_object_factory/binding.cc +++ /dev/null @@ -1,29 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include - -namespace demo { - -using v8::FunctionCallbackInfo; -using v8::Isolate; -using v8::Local; -using v8::Object; -using v8::String; -using v8::Value; - -void CreateObject(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - Local obj = Object::New(isolate); - obj->Set(String::NewFromUtf8(isolate, "msg"), args[0]->ToString()); - - args.GetReturnValue().Set(obj); -} - -void Init(Local exports, Local module) { - NODE_SET_METHOD(module, "exports", CreateObject); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, Init) - -} // namespace demo diff --git a/test/addons/03_object_factory/binding.gyp b/test/addons/03_object_factory/binding.gyp deleted file mode 100644 index 6cd05e5bba3..00000000000 --- a/test/addons/03_object_factory/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/03_object_factory/test.js b/test/addons/03_object_factory/test.js deleted file mode 100644 index abe0ebb5254..00000000000 --- a/test/addons/03_object_factory/test.js +++ /dev/null @@ -1,10 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const binding = require(`./build/${common.buildType}/binding`); - -const obj1 = binding('hello'); -const obj2 = binding('world'); -console.log(obj1.msg, obj2.msg); -// Prints: 'hello world' diff --git a/test/addons/04_function_factory/binding.cc b/test/addons/04_function_factory/binding.cc deleted file mode 100644 index 4891aa6b7b3..00000000000 --- a/test/addons/04_function_factory/binding.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include - -namespace demo { - -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::FunctionTemplate; -using v8::Isolate; -using v8::Local; -using v8::Object; -using v8::String; -using v8::Value; - -void MyFunction(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, "hello world")); -} - -void CreateFunction(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - Local tpl = FunctionTemplate::New(isolate, MyFunction); - Local fn = tpl->GetFunction(); - - // omit this to make it anonymous - fn->SetName(String::NewFromUtf8(isolate, "theFunction")); - - args.GetReturnValue().Set(fn); -} - -void Init(Local exports, Local module) { - NODE_SET_METHOD(module, "exports", CreateFunction); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, Init) - -} // namespace demo diff --git a/test/addons/04_function_factory/binding.gyp b/test/addons/04_function_factory/binding.gyp deleted file mode 100644 index 6cd05e5bba3..00000000000 --- a/test/addons/04_function_factory/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/04_function_factory/test.js b/test/addons/04_function_factory/test.js deleted file mode 100644 index 71e72680691..00000000000 --- a/test/addons/04_function_factory/test.js +++ /dev/null @@ -1,9 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const binding = require(`./build/${common.buildType}/binding`); - -const fn = binding(); -console.log(fn()); -// Prints: 'hello world' diff --git a/test/addons/05_wrapping_c_objects/binding.cc b/test/addons/05_wrapping_c_objects/binding.cc deleted file mode 100644 index 93609a4ecb7..00000000000 --- a/test/addons/05_wrapping_c_objects/binding.cc +++ /dev/null @@ -1,17 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include -#include "myobject.h" - -namespace demo { - -using v8::Local; -using v8::Object; - -void InitAll(Local exports) { - MyObject::Init(exports); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll) - -} // namespace demo diff --git a/test/addons/05_wrapping_c_objects/binding.gyp b/test/addons/05_wrapping_c_objects/binding.gyp deleted file mode 100644 index 5d967d0948c..00000000000 --- a/test/addons/05_wrapping_c_objects/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","myobject.h","myobject.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/05_wrapping_c_objects/myobject.cc b/test/addons/05_wrapping_c_objects/myobject.cc deleted file mode 100644 index 4383ec44edf..00000000000 --- a/test/addons/05_wrapping_c_objects/myobject.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// myobject.cc -#include "myobject.h" - -namespace demo { - -using v8::Context; -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::FunctionTemplate; -using v8::Isolate; -using v8::Local; -using v8::Number; -using v8::Object; -using v8::Persistent; -using v8::String; -using v8::Value; - -Persistent MyObject::constructor; - -MyObject::MyObject(double value) : value_(value) { -} - -MyObject::~MyObject() { -} - -void MyObject::Init(Local exports) { - Isolate* isolate = exports->GetIsolate(); - - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject")); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "plusOne", PlusOne); - - constructor.Reset(isolate, tpl->GetFunction()); - exports->Set(String::NewFromUtf8(isolate, "MyObject"), - tpl->GetFunction()); -} - -void MyObject::New(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - if (args.IsConstructCall()) { - // Invoked as constructor: `new MyObject(...)` - double value = args[0]->IsUndefined() ? 0 : args[0]->NumberValue(); - MyObject* obj = new MyObject(value); - obj->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - // Invoked as plain function `MyObject(...)`, turn into construct call. - const int argc = 1; - Local argv[argc] = { args[0] }; - Local context = isolate->GetCurrentContext(); - Local cons = Local::New(isolate, constructor); - Local result = - cons->NewInstance(context, argc, argv).ToLocalChecked(); - args.GetReturnValue().Set(result); - } -} - -void MyObject::PlusOne(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - MyObject* obj = ObjectWrap::Unwrap(args.Holder()); - obj->value_ += 1; - - args.GetReturnValue().Set(Number::New(isolate, obj->value_)); -} - -} // namespace demo diff --git a/test/addons/05_wrapping_c_objects/myobject.h b/test/addons/05_wrapping_c_objects/myobject.h deleted file mode 100644 index 9dcff129f46..00000000000 --- a/test/addons/05_wrapping_c_objects/myobject.h +++ /dev/null @@ -1,27 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// myobject.h -#ifndef MYOBJECT_H // NOLINT(build/header_guard) -#define MYOBJECT_H // NOLINT(build/header_guard) - -#include -#include - -namespace demo { - -class MyObject : public node::ObjectWrap { - public: - static void Init(v8::Local exports); - - private: - explicit MyObject(double value = 0); - ~MyObject(); - - static void New(const v8::FunctionCallbackInfo& args); - static void PlusOne(const v8::FunctionCallbackInfo& args); - static v8::Persistent constructor; - double value_; -}; - -} // namespace demo - -#endif // NOLINT(build/header_guard) diff --git a/test/addons/05_wrapping_c_objects/test.js b/test/addons/05_wrapping_c_objects/test.js deleted file mode 100644 index b8d90379885..00000000000 --- a/test/addons/05_wrapping_c_objects/test.js +++ /dev/null @@ -1,13 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const binding = require(`./build/${common.buildType}/binding`); - -const obj = new binding.MyObject(10); -console.log(obj.plusOne()); -// Prints: 11 -console.log(obj.plusOne()); -// Prints: 12 -console.log(obj.plusOne()); -// Prints: 13 diff --git a/test/addons/06_factory_of_wrapped_objects/binding.cc b/test/addons/06_factory_of_wrapped_objects/binding.cc deleted file mode 100644 index 71bf45ca6e6..00000000000 --- a/test/addons/06_factory_of_wrapped_objects/binding.cc +++ /dev/null @@ -1,27 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include -#include "myobject.h" - -namespace demo { - -using v8::FunctionCallbackInfo; -using v8::Isolate; -using v8::Local; -using v8::Object; -using v8::String; -using v8::Value; - -void CreateObject(const FunctionCallbackInfo& args) { - MyObject::NewInstance(args); -} - -void InitAll(Local exports, Local module) { - MyObject::Init(exports->GetIsolate()); - - NODE_SET_METHOD(module, "exports", CreateObject); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll) - -} // namespace demo diff --git a/test/addons/06_factory_of_wrapped_objects/binding.gyp b/test/addons/06_factory_of_wrapped_objects/binding.gyp deleted file mode 100644 index 5d967d0948c..00000000000 --- a/test/addons/06_factory_of_wrapped_objects/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","myobject.h","myobject.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/06_factory_of_wrapped_objects/myobject.cc b/test/addons/06_factory_of_wrapped_objects/myobject.cc deleted file mode 100644 index c1286f42a34..00000000000 --- a/test/addons/06_factory_of_wrapped_objects/myobject.cc +++ /dev/null @@ -1,83 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// myobject.cc -#include -#include "myobject.h" - -namespace demo { - -using v8::Context; -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::FunctionTemplate; -using v8::Isolate; -using v8::Local; -using v8::Number; -using v8::Object; -using v8::Persistent; -using v8::String; -using v8::Value; - -Persistent MyObject::constructor; - -MyObject::MyObject(double value) : value_(value) { -} - -MyObject::~MyObject() { -} - -void MyObject::Init(Isolate* isolate) { - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject")); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "plusOne", PlusOne); - - constructor.Reset(isolate, tpl->GetFunction()); -} - -void MyObject::New(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - if (args.IsConstructCall()) { - // Invoked as constructor: `new MyObject(...)` - double value = args[0]->IsUndefined() ? 0 : args[0]->NumberValue(); - MyObject* obj = new MyObject(value); - obj->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - // Invoked as plain function `MyObject(...)`, turn into construct call. - const int argc = 1; - Local argv[argc] = { args[0] }; - Local cons = Local::New(isolate, constructor); - Local context = isolate->GetCurrentContext(); - Local instance = - cons->NewInstance(context, argc, argv).ToLocalChecked(); - args.GetReturnValue().Set(instance); - } -} - -void MyObject::NewInstance(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - const unsigned argc = 1; - Local argv[argc] = { args[0] }; - Local cons = Local::New(isolate, constructor); - Local context = isolate->GetCurrentContext(); - Local instance = - cons->NewInstance(context, argc, argv).ToLocalChecked(); - - args.GetReturnValue().Set(instance); -} - -void MyObject::PlusOne(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - MyObject* obj = ObjectWrap::Unwrap(args.Holder()); - obj->value_ += 1; - - args.GetReturnValue().Set(Number::New(isolate, obj->value_)); -} - -} // namespace demo diff --git a/test/addons/06_factory_of_wrapped_objects/myobject.h b/test/addons/06_factory_of_wrapped_objects/myobject.h deleted file mode 100644 index 323c7a8739b..00000000000 --- a/test/addons/06_factory_of_wrapped_objects/myobject.h +++ /dev/null @@ -1,28 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// myobject.h -#ifndef MYOBJECT_H // NOLINT(build/header_guard) -#define MYOBJECT_H // NOLINT(build/header_guard) - -#include -#include - -namespace demo { - -class MyObject : public node::ObjectWrap { - public: - static void Init(v8::Isolate* isolate); - static void NewInstance(const v8::FunctionCallbackInfo& args); - - private: - explicit MyObject(double value = 0); - ~MyObject(); - - static void New(const v8::FunctionCallbackInfo& args); - static void PlusOne(const v8::FunctionCallbackInfo& args); - static v8::Persistent constructor; - double value_; -}; - -} // namespace demo - -#endif // NOLINT(build/header_guard) diff --git a/test/addons/06_factory_of_wrapped_objects/test.js b/test/addons/06_factory_of_wrapped_objects/test.js deleted file mode 100644 index 1d02c0e1a20..00000000000 --- a/test/addons/06_factory_of_wrapped_objects/test.js +++ /dev/null @@ -1,21 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const createObject = require(`./build/${common.buildType}/binding`); - -const obj = createObject(10); -console.log(obj.plusOne()); -// Prints: 11 -console.log(obj.plusOne()); -// Prints: 12 -console.log(obj.plusOne()); -// Prints: 13 - -const obj2 = createObject(20); -console.log(obj2.plusOne()); -// Prints: 21 -console.log(obj2.plusOne()); -// Prints: 22 -console.log(obj2.plusOne()); -// Prints: 23 diff --git a/test/addons/07_passing_wrapped_objects_around/binding.cc b/test/addons/07_passing_wrapped_objects_around/binding.cc deleted file mode 100644 index 36ba3a710ec..00000000000 --- a/test/addons/07_passing_wrapped_objects_around/binding.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include -#include -#include "myobject.h" - -namespace demo { - -using v8::FunctionCallbackInfo; -using v8::Isolate; -using v8::Local; -using v8::Number; -using v8::Object; -using v8::String; -using v8::Value; - -void CreateObject(const FunctionCallbackInfo& args) { - MyObject::NewInstance(args); -} - -void Add(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - MyObject* obj1 = node::ObjectWrap::Unwrap( - args[0]->ToObject()); - MyObject* obj2 = node::ObjectWrap::Unwrap( - args[1]->ToObject()); - - double sum = obj1->value() + obj2->value(); - args.GetReturnValue().Set(Number::New(isolate, sum)); -} - -void InitAll(Local exports) { - MyObject::Init(exports->GetIsolate()); - - NODE_SET_METHOD(exports, "createObject", CreateObject); - NODE_SET_METHOD(exports, "add", Add); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll) - -} // namespace demo diff --git a/test/addons/07_passing_wrapped_objects_around/binding.gyp b/test/addons/07_passing_wrapped_objects_around/binding.gyp deleted file mode 100644 index 5d967d0948c..00000000000 --- a/test/addons/07_passing_wrapped_objects_around/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","myobject.h","myobject.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/07_passing_wrapped_objects_around/myobject.cc b/test/addons/07_passing_wrapped_objects_around/myobject.cc deleted file mode 100644 index 3dd5bb69760..00000000000 --- a/test/addons/07_passing_wrapped_objects_around/myobject.cc +++ /dev/null @@ -1,70 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// myobject.cc -#include -#include "myobject.h" - -namespace demo { - -using v8::Context; -using v8::Function; -using v8::FunctionCallbackInfo; -using v8::FunctionTemplate; -using v8::Isolate; -using v8::Local; -using v8::Object; -using v8::Persistent; -using v8::String; -using v8::Value; - -Persistent MyObject::constructor; - -MyObject::MyObject(double value) : value_(value) { -} - -MyObject::~MyObject() { -} - -void MyObject::Init(Isolate* isolate) { - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "MyObject")); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - constructor.Reset(isolate, tpl->GetFunction()); -} - -void MyObject::New(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - if (args.IsConstructCall()) { - // Invoked as constructor: `new MyObject(...)` - double value = args[0]->IsUndefined() ? 0 : args[0]->NumberValue(); - MyObject* obj = new MyObject(value); - obj->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - // Invoked as plain function `MyObject(...)`, turn into construct call. - const int argc = 1; - Local argv[argc] = { args[0] }; - Local context = isolate->GetCurrentContext(); - Local cons = Local::New(isolate, constructor); - Local instance = - cons->NewInstance(context, argc, argv).ToLocalChecked(); - args.GetReturnValue().Set(instance); - } -} - -void MyObject::NewInstance(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - - const unsigned argc = 1; - Local argv[argc] = { args[0] }; - Local cons = Local::New(isolate, constructor); - Local context = isolate->GetCurrentContext(); - Local instance = - cons->NewInstance(context, argc, argv).ToLocalChecked(); - - args.GetReturnValue().Set(instance); -} - -} // namespace demo diff --git a/test/addons/07_passing_wrapped_objects_around/myobject.h b/test/addons/07_passing_wrapped_objects_around/myobject.h deleted file mode 100644 index 5d430a20813..00000000000 --- a/test/addons/07_passing_wrapped_objects_around/myobject.h +++ /dev/null @@ -1,28 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// myobject.h -#ifndef MYOBJECT_H // NOLINT(build/header_guard) -#define MYOBJECT_H // NOLINT(build/header_guard) - -#include -#include - -namespace demo { - -class MyObject : public node::ObjectWrap { - public: - static void Init(v8::Isolate* isolate); - static void NewInstance(const v8::FunctionCallbackInfo& args); - inline double value() const { return value_; } - - private: - explicit MyObject(double value = 0); - ~MyObject(); - - static void New(const v8::FunctionCallbackInfo& args); - static v8::Persistent constructor; - double value_; -}; - -} // namespace demo - -#endif // NOLINT(build/header_guard) diff --git a/test/addons/07_passing_wrapped_objects_around/test.js b/test/addons/07_passing_wrapped_objects_around/test.js deleted file mode 100644 index 0175835c7c3..00000000000 --- a/test/addons/07_passing_wrapped_objects_around/test.js +++ /dev/null @@ -1,12 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -const binding = require(`./build/${common.buildType}/binding`); - -const obj1 = binding.createObject(10); -const obj2 = binding.createObject(20); -const result = binding.add(obj1, obj2); - -console.log(result); -// Prints: 30 diff --git a/test/addons/08_void_atexitcallback_args/binding.cc b/test/addons/08_void_atexitcallback_args/binding.cc deleted file mode 100644 index 33fdc6baf95..00000000000 --- a/test/addons/08_void_atexitcallback_args/binding.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -// binding.cc -#include -#include -#include - -namespace demo { - -using node::AtExit; -using v8::HandleScope; -using v8::Isolate; -using v8::Local; -using v8::Object; - -static char cookie[] = "yum yum"; -static int at_exit_cb1_called = 0; -static int at_exit_cb2_called = 0; - -static void at_exit_cb1(void* arg) { - Isolate* isolate = static_cast(arg); - HandleScope scope(isolate); - Local obj = Object::New(isolate); - assert(!obj.IsEmpty()); // assert VM is still alive - assert(obj->IsObject()); - at_exit_cb1_called++; -} - -static void at_exit_cb2(void* arg) { - assert(arg == static_cast(cookie)); - at_exit_cb2_called++; -} - -static void sanity_check(void*) { - assert(at_exit_cb1_called == 1); - assert(at_exit_cb2_called == 2); -} - -void init(Local exports) { - AtExit(at_exit_cb2, cookie); - AtExit(at_exit_cb2, cookie); - AtExit(at_exit_cb1, exports->GetIsolate()); - AtExit(sanity_check); -} - -NODE_MODULE(NODE_GYP_MODULE_NAME, init) - -} // namespace demo diff --git a/test/addons/08_void_atexitcallback_args/binding.gyp b/test/addons/08_void_atexitcallback_args/binding.gyp deleted file mode 100644 index 6cd05e5bba3..00000000000 --- a/test/addons/08_void_atexitcallback_args/binding.gyp +++ /dev/null @@ -1,2 +0,0 @@ -# Auto-generated by `node tools/doc/addon-verify.js` -{"targets":[{"target_name":"binding","defines":["V8_DEPRECATION_WARNINGS=1"],"sources":["binding.cc","test.js"]}]} \ No newline at end of file diff --git a/test/addons/08_void_atexitcallback_args/test.js b/test/addons/08_void_atexitcallback_args/test.js deleted file mode 100644 index 43672ff8233..00000000000 --- a/test/addons/08_void_atexitcallback_args/test.js +++ /dev/null @@ -1,5 +0,0 @@ -// Auto-generated by `node tools/doc/addon-verify.js` -'use strict'; -const common = require('../../common'); -// test.js -require(`./build/${common.buildType}/binding`); diff --git a/test/addons/openssl-client-cert-engine/binding.cc b/test/addons/openssl-client-cert-engine/binding.cc deleted file mode 100644 index 60340815ed2..00000000000 --- a/test/addons/openssl-client-cert-engine/binding.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "node.h" -#include "v8.h" - -inline void Initialize(v8::Local) {} - -NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/openssl-client-cert-engine/binding.gyp b/test/addons/openssl-client-cert-engine/binding.gyp index 48a6aa3480d..b069e43429c 100644 --- a/test/addons/openssl-client-cert-engine/binding.gyp +++ b/test/addons/openssl-client-cert-engine/binding.gyp @@ -1,9 +1,5 @@ { 'targets': [ - { - 'target_name': 'binding', - 'sources': [ 'binding.cc' ], - }, { 'target_name': 'testengine', 'type': 'none', diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index 51ba75ca45a..4da99d64d72 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -5,7 +5,6 @@ const fs = require('fs'); const path = require('path'); const marked = require('marked'); -const auto = 'Auto-generated by `node tools/doc/addon-verify.js`'; const rootDir = path.resolve(__dirname, '..', '..'); const doc = path.resolve(rootDir, 'doc', 'api', 'addons.md'); const verifyDir = path.resolve(rootDir, 'test', 'addons'); @@ -50,20 +49,12 @@ for (const header in addons) { files = Object.entries(files).map(([name, content]) => { if (name === 'test.js') content = boilerplate(name, content); - content = `// ${auto}\n${content}`; - if (name.endsWith('.h')) { - content = content.replace(/(#(ifndef|define) \w+_H)/g, - '$1 // NOLINT(build/header_guard)'); - content = content.replace(/(#endif)$/, - '$1 // NOLINT(build/header_guard)'); - } - if (!content.endsWith('\n')) content += '\n'; // Pacify linter. return { name, content, path: path.resolve(dir, name) }; }); files.push({ path: path.resolve(dir, 'binding.gyp'), - content: `# ${auto}\n` + JSON.stringify({ + content: JSON.stringify({ targets: [ { target_name: 'binding', From 90f882e50d4040c44b33ec33e2e1c15302da1276 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 24 Jan 2018 10:49:45 +1100 Subject: [PATCH 09/25] Revert "tools: simplify tools/doc/addon-verify.js" This reverts commit c6682636be4955e2181c00e7d4868fbf6682a5c5. Reverted along with d9b59def7 as this breaks compilation from downloadable source tarballs. Ref: https://github.com/nodejs/node/pull/17407 PR-URL: https://github.com/nodejs/node/pull/18287 Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- tools/doc/addon-verify.js | 103 ++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 44 deletions(-) diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index 4da99d64d72..2e72abb77f9 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -1,6 +1,5 @@ 'use strict'; -const { strictEqual } = require('assert'); const fs = require('fs'); const path = require('path'); const marked = require('marked'); @@ -9,36 +8,52 @@ const rootDir = path.resolve(__dirname, '..', '..'); const doc = path.resolve(rootDir, 'doc', 'api', 'addons.md'); const verifyDir = path.resolve(rootDir, 'test', 'addons'); +const contents = fs.readFileSync(doc).toString(); + +const tokens = marked.lexer(contents); let id = 0; -let currentHeader; +let currentHeader; const addons = {}; -const content = fs.readFileSync(doc, 'utf8'); -for (const { text, type } of marked.lexer(content)) { - if (type === 'heading' && text) { - currentHeader = text; +tokens.forEach((token) => { + if (token.type === 'heading' && token.text) { + currentHeader = token.text; addons[currentHeader] = { files: {} }; } - if (type === 'code') { - const match = text.match(/^\/\/\s+(.*\.(?:cc|h|js))[\r\n]/); + if (token.type === 'code') { + var match = token.text.match(/^\/\/\s+(.*\.(?:cc|h|js))[\r\n]/); if (match !== null) { - addons[currentHeader].files[match[1]] = text; + addons[currentHeader].files[match[1]] = token.text; } } +}); +for (var header in addons) { + verifyFiles(addons[header].files, + header, + console.log.bind(null, 'wrote'), + function(err) { if (err) throw err; }); } -for (const header in addons) { - let { files } = addons[header]; +function once(fn) { + var once = false; + return function() { + if (once) + return; + once = true; + fn.apply(this, arguments); + }; +} +function verifyFiles(files, blockName, onprogress, ondone) { // must have a .cc and a .js to be a valid test if (!Object.keys(files).some((name) => /\.cc$/.test(name)) || !Object.keys(files).some((name) => /\.js$/.test(name))) { - continue; + return; } - const blockName = header + blockName = blockName .toLowerCase() .replace(/\s/g, '_') .replace(/[^a-z\d_]/g, ''); @@ -47,9 +62,21 @@ for (const header in addons) { `${(++id < 10 ? '0' : '') + id}_${blockName}` ); - files = Object.entries(files).map(([name, content]) => { - if (name === 'test.js') content = boilerplate(name, content); - return { name, content, path: path.resolve(dir, name) }; + files = Object.keys(files).map(function(name) { + if (name === 'test.js') { + files[name] = `'use strict'; +const common = require('../../common'); +${files[name].replace( + "'./build/Release/addon'", + // eslint-disable-next-line no-template-curly-in-string + '`./build/${common.buildType}/addon`')} +`; + } + return { + path: path.resolve(dir, name), + name: name, + content: files[name] + }; }); files.push({ @@ -57,7 +84,7 @@ for (const header in addons) { content: JSON.stringify({ targets: [ { - target_name: 'binding', + target_name: 'addon', defines: [ 'V8_DEPRECATION_WARNINGS=1' ], sources: files.map(function(file) { return file.name; @@ -67,34 +94,22 @@ for (const header in addons) { }) }); - try { - fs.mkdirSync(dir); - } catch (e) { - strictEqual(e.code, 'EEXIST'); - } + fs.mkdir(dir, function() { + // Ignore errors - for (const file of files) { - let content; - try { - content = fs.readFileSync(file.path, 'utf8'); - } catch (e) { - strictEqual(e.code, 'ENOENT'); - } + const done = once(ondone); + var waiting = files.length; + files.forEach(function(file) { + fs.writeFile(file.path, file.content, function(err) { + if (err) + return done(err); - // Only update when file content has changed to prevent unneeded rebuilds. - if (content !== file.content) { - fs.writeFileSync(file.path, file.content); - console.log('wrote', file.path); - } - } -} + if (onprogress) + onprogress(file.path); -function boilerplate(name, content) { - return `'use strict'; -const common = require('../../common'); -${content.replace( - "'./build/Release/binding'", - // eslint-disable-next-line no-template-curly-in-string - '`./build/${common.buildType}/binding`')} -`; + if (--waiting === 0) + done(); + }); + }); + }); } From fa9f31a4fda5a3782c652e56e394465805ebb50f Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 24 Jan 2018 10:49:51 +1100 Subject: [PATCH 10/25] Revert "tools: teach gyp to write an 'all deps' rule" This reverts commit 920c13203df434278eb7c34a485e89734a5fa62a. Reverted along with d9b59def7 as this breaks compilation from downloadable source tarballs. Ref: https://github.com/nodejs/node/pull/17407 PR-URL: https://github.com/nodejs/node/pull/18287 Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- tools/gyp/pylib/gyp/generator/make.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index eaf02ae734b..f7f519b3e6b 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -2136,7 +2136,6 @@ def CalculateMakefilePath(build_file, base_name): for target in gyp.common.AllTargets(target_list, target_dicts, build_file): needed_targets.add(target) - all_deps = set() build_files = set() include_list = set() for qualified_target in target_list: @@ -2185,12 +2184,6 @@ def CalculateMakefilePath(build_file, base_name): os.path.dirname(makefile_path)) include_list.add(mkfile_rel_path) - if 'actions' in spec: - for action in spec['actions']: - all_deps.update(map(writer.Absolutify, action['inputs'])) - if 'sources' in spec: - all_deps.update(map(writer.Absolutify, spec['sources'])) - # Write out per-gyp (sub-project) Makefiles. depth_rel_path = gyp.common.RelativePath(options.depth, os.getcwd()) for build_file in build_files: @@ -2234,10 +2227,3 @@ def CalculateMakefilePath(build_file, base_name): root_makefile.write(SHARED_FOOTER) root_makefile.close() - - # Hack to get rid of $(obj)/path/to/foo.o deps that node.gyp adds manually. - all_deps = [s for s in all_deps if not '$' in s] - all_deps_path = os.path.join(options.toplevel_dir, '.deps') - with open(all_deps_path, 'w') as f: - f.write('ALL_DEPS := \\\n\t') - f.write(' \\\n\t'.join(sorted(all_deps))) From 4c4af643e5042d615a60c6bbc05aee9d81b903e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 24 Jan 2018 20:16:06 +0100 Subject: [PATCH 11/25] deps: update V8 to 6.4.388.40 PR-URL: https://github.com/nodejs/node/pull/17489 Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina Reviewed-By: Myles Borins Reviewed-By: Ali Ijaz Sheikh --- deps/v8/.gitignore | 3 + deps/v8/.vpython | 32 + deps/v8/.ycm_extra_conf.py | 2 +- deps/v8/AUTHORS | 9 +- deps/v8/BUILD.gn | 321 +- deps/v8/ChangeLog | 1970 +++++++ deps/v8/DEPS | 79 +- deps/v8/OWNERS | 3 +- deps/v8/PRESUBMIT.py | 2 + .../trace_event/common/trace_event_common.h | 2 + deps/v8/gni/isolate.gni | 7 + deps/v8/gni/v8.gni | 10 + deps/v8/gypfiles/all.gyp | 2 +- deps/v8/gypfiles/features.gypi | 2 +- deps/v8/gypfiles/isolate.gypi | 1 + deps/v8/gypfiles/standalone.gypi | 6 + deps/v8/include/libplatform/libplatform.h | 29 +- deps/v8/include/libplatform/v8-tracing.h | 15 +- deps/v8/include/v8-inspector.h | 19 + deps/v8/include/v8-platform.h | 15 +- deps/v8/include/v8-profiler.h | 10 +- deps/v8/include/v8-util.h | 7 +- deps/v8/include/v8-version-string.h | 7 +- deps/v8/include/v8-version.h | 6 +- deps/v8/include/v8.h | 307 +- deps/v8/infra/config/cq.cfg | 30 +- deps/v8/infra/mb/mb_config.pyl | 139 +- deps/v8/infra/testing/OWNERS | 4 + deps/v8/infra/testing/README.md | 50 + deps/v8/infra/testing/client.v8.pyl | 13 + deps/v8/infra/testing/tryserver.v8.pyl | 10 + deps/v8/samples/hello-world.cc | 5 +- deps/v8/samples/process.cc | 6 +- deps/v8/samples/shell.cc | 9 +- deps/v8/snapshot_toolchain.gni | 12 +- deps/v8/src/OWNERS | 3 + deps/v8/src/accessors.cc | 345 +- deps/v8/src/accessors.h | 109 +- deps/v8/src/address-map.cc | 2 +- deps/v8/src/allocation.cc | 173 +- deps/v8/src/allocation.h | 39 +- deps/v8/src/api-arguments.h | 10 +- deps/v8/src/api-natives.cc | 27 +- deps/v8/src/api.cc | 754 ++- deps/v8/src/api.h | 44 +- deps/v8/src/arm/assembler-arm-inl.h | 17 +- deps/v8/src/arm/assembler-arm.cc | 134 +- deps/v8/src/arm/assembler-arm.h | 18 +- deps/v8/src/arm/code-stubs-arm.cc | 733 +-- deps/v8/src/arm/code-stubs-arm.h | 220 +- deps/v8/src/arm/codegen-arm.cc | 138 +- deps/v8/src/arm/codegen-arm.h | 33 - deps/v8/src/arm/constants-arm.cc | 17 +- deps/v8/src/arm/constants-arm.h | 5 +- deps/v8/src/arm/deoptimizer-arm.cc | 7 +- deps/v8/src/arm/disasm-arm.cc | 12 +- deps/v8/src/arm/frame-constants-arm.cc | 5 + deps/v8/src/arm/interface-descriptors-arm.cc | 20 +- deps/v8/src/arm/macro-assembler-arm.cc | 280 +- deps/v8/src/arm/macro-assembler-arm.h | 81 - deps/v8/src/arm/simulator-arm.cc | 286 +- deps/v8/src/arm/simulator-arm.h | 20 +- deps/v8/src/arm64/assembler-arm64-inl.h | 23 +- deps/v8/src/arm64/assembler-arm64.cc | 74 +- deps/v8/src/arm64/assembler-arm64.h | 63 +- deps/v8/src/arm64/code-stubs-arm64.cc | 738 +-- deps/v8/src/arm64/code-stubs-arm64.h | 232 +- deps/v8/src/arm64/codegen-arm64.cc | 96 - deps/v8/src/arm64/codegen-arm64.h | 32 - deps/v8/src/arm64/cpu-arm64.cc | 4 +- deps/v8/src/arm64/decoder-arm64-inl.h | 18 +- deps/v8/src/arm64/deoptimizer-arm64.cc | 252 +- deps/v8/src/arm64/disasm-arm64.cc | 64 +- deps/v8/src/arm64/frame-constants-arm64.cc | 8 + deps/v8/src/arm64/instructions-arm64.cc | 6 +- deps/v8/src/arm64/instructions-arm64.h | 6 +- deps/v8/src/arm64/instrument-arm64.cc | 11 +- deps/v8/src/arm64/instrument-arm64.h | 5 +- .../src/arm64/interface-descriptors-arm64.cc | 20 +- deps/v8/src/arm64/macro-assembler-arm64-inl.h | 36 +- deps/v8/src/arm64/macro-assembler-arm64.cc | 514 +- deps/v8/src/arm64/macro-assembler-arm64.h | 178 +- deps/v8/src/arm64/simulator-arm64.cc | 62 +- deps/v8/src/arm64/simulator-arm64.h | 11 +- deps/v8/src/arm64/simulator-logic-arm64.cc | 2 +- deps/v8/src/arm64/utils-arm64.cc | 6 +- deps/v8/src/asmjs/asm-js.cc | 125 +- deps/v8/src/asmjs/asm-js.h | 3 +- deps/v8/src/asmjs/asm-parser.cc | 42 +- deps/v8/src/asmjs/asm-scanner.cc | 6 +- deps/v8/src/asmjs/asm-types.cc | 6 +- deps/v8/src/asmjs/asm-types.h | 4 +- deps/v8/src/assembler.cc | 126 +- deps/v8/src/assembler.h | 96 +- deps/v8/src/assert-scope.cc | 6 +- deps/v8/src/ast/ast-expression-rewriter.cc | 410 -- deps/v8/src/ast/ast-expression-rewriter.h | 53 - deps/v8/src/ast/ast-numbering.cc | 178 +- deps/v8/src/ast/ast-numbering.h | 9 +- deps/v8/src/ast/ast-source-ranges.h | 42 +- deps/v8/src/ast/ast-traversal-visitor.h | 35 +- deps/v8/src/ast/ast-value-factory.cc | 167 +- deps/v8/src/ast/ast-value-factory.h | 256 +- deps/v8/src/ast/ast.cc | 479 +- deps/v8/src/ast/ast.h | 923 ++- deps/v8/src/ast/context-slot-cache.h | 4 +- deps/v8/src/ast/modules.h | 17 +- deps/v8/src/ast/prettyprinter.cc | 283 +- deps/v8/src/ast/prettyprinter.h | 16 +- deps/v8/src/ast/scopes.cc | 78 +- deps/v8/src/ast/scopes.h | 29 +- deps/v8/src/ast/variables.h | 4 +- deps/v8/src/bailout-reason.cc | 2 +- deps/v8/src/bailout-reason.h | 4 - deps/v8/src/base.isolate | 4 +- deps/v8/src/base/bits.cc | 4 +- deps/v8/src/base/bits.h | 187 +- deps/v8/src/base/cpu.cc | 84 +- deps/v8/src/base/debug/stack_trace.cc | 2 +- deps/v8/src/base/debug/stack_trace_android.cc | 2 +- deps/v8/src/base/debug/stack_trace_posix.cc | 28 +- deps/v8/src/base/debug/stack_trace_win.cc | 16 +- deps/v8/src/base/division-by-constant.cc | 2 +- deps/v8/src/base/logging.h | 21 +- deps/v8/src/base/once.h | 3 +- deps/v8/src/base/platform/OWNERS | 6 + .../src/base/platform/condition-variable.cc | 2 +- deps/v8/src/base/platform/elapsed-timer.h | 4 +- deps/v8/src/base/platform/mutex.cc | 2 +- deps/v8/src/base/platform/platform-aix.cc | 106 +- deps/v8/src/base/platform/platform-cygwin.cc | 180 +- deps/v8/src/base/platform/platform-freebsd.cc | 104 +- deps/v8/src/base/platform/platform-fuchsia.cc | 104 +- deps/v8/src/base/platform/platform-linux.cc | 116 +- deps/v8/src/base/platform/platform-macos.cc | 113 +- deps/v8/src/base/platform/platform-openbsd.cc | 111 +- .../src/base/platform/platform-posix-time.cc | 2 +- deps/v8/src/base/platform/platform-posix.cc | 350 +- deps/v8/src/base/platform/platform-posix.h | 2 - deps/v8/src/base/platform/platform-qnx.cc | 105 +- deps/v8/src/base/platform/platform-solaris.cc | 104 +- deps/v8/src/base/platform/platform-win32.cc | 366 +- deps/v8/src/base/platform/platform.h | 92 +- deps/v8/src/base/platform/semaphore.cc | 8 +- deps/v8/src/base/platform/time.cc | 18 +- deps/v8/src/base/platform/time.h | 2 +- deps/v8/src/base/sys-info.cc | 8 +- deps/v8/src/base/template-utils.h | 43 +- .../src/base/utils/random-number-generator.cc | 87 +- .../src/base/utils/random-number-generator.h | 20 + deps/v8/src/bignum-dtoa.cc | 20 +- deps/v8/src/bignum.cc | 30 +- deps/v8/src/bootstrapper.cc | 725 +-- deps/v8/src/bootstrapper.h | 2 +- deps/v8/src/boxed-float.h | 60 +- deps/v8/src/builtins/arm/builtins-arm.cc | 119 +- deps/v8/src/builtins/arm64/builtins-arm64.cc | 926 +-- deps/v8/src/builtins/builtins-api.cc | 3 +- .../v8/src/builtins/builtins-arguments-gen.cc | 4 +- deps/v8/src/builtins/builtins-array-gen.cc | 678 ++- deps/v8/src/builtins/builtins-array.cc | 79 +- .../builtins/builtins-async-function-gen.cc | 7 +- deps/v8/src/builtins/builtins-async-gen.cc | 56 +- .../builtins/builtins-async-generator-gen.cc | 13 +- deps/v8/src/builtins/builtins-bigint.cc | 63 +- deps/v8/src/builtins/builtins-call-gen.cc | 13 +- .../src/builtins/builtins-collections-gen.cc | 1245 +++-- deps/v8/src/builtins/builtins-console.cc | 66 +- .../src/builtins/builtins-constructor-gen.cc | 191 +- .../src/builtins/builtins-constructor-gen.h | 5 - .../src/builtins/builtins-conversion-gen.cc | 37 +- deps/v8/src/builtins/builtins-date-gen.cc | 4 +- deps/v8/src/builtins/builtins-date.cc | 2 +- deps/v8/src/builtins/builtins-definitions.h | 57 +- deps/v8/src/builtins/builtins-error.cc | 13 +- deps/v8/src/builtins/builtins-function-gen.cc | 10 +- deps/v8/src/builtins/builtins-function.cc | 2 +- .../v8/src/builtins/builtins-generator-gen.cc | 9 +- deps/v8/src/builtins/builtins-handler-gen.cc | 49 +- deps/v8/src/builtins/builtins-ic-gen.cc | 1 + deps/v8/src/builtins/builtins-internal-gen.cc | 61 +- deps/v8/src/builtins/builtins-intl-gen.cc | 10 +- deps/v8/src/builtins/builtins-intl.cc | 2 +- deps/v8/src/builtins/builtins-iterator-gen.cc | 25 +- deps/v8/src/builtins/builtins-math-gen.cc | 43 +- deps/v8/src/builtins/builtins-math-gen.h | 36 + deps/v8/src/builtins/builtins-number-gen.cc | 316 +- deps/v8/src/builtins/builtins-object-gen.cc | 307 +- deps/v8/src/builtins/builtins-object.cc | 42 +- deps/v8/src/builtins/builtins-promise-gen.cc | 161 +- deps/v8/src/builtins/builtins-promise-gen.h | 14 +- deps/v8/src/builtins/builtins-proxy-gen.cc | 11 +- deps/v8/src/builtins/builtins-proxy-gen.h | 6 - deps/v8/src/builtins/builtins-reflect-gen.cc | 25 + deps/v8/src/builtins/builtins-reflect.cc | 37 +- deps/v8/src/builtins/builtins-regexp-gen.cc | 367 +- deps/v8/src/builtins/builtins-regexp-gen.h | 3 - .../builtins-sharedarraybuffer-gen.cc | 5 +- deps/v8/src/builtins/builtins-string-gen.cc | 802 ++- deps/v8/src/builtins/builtins-string-gen.h | 19 +- deps/v8/src/builtins/builtins-string.cc | 61 + .../src/builtins/builtins-typedarray-gen.cc | 47 +- deps/v8/src/builtins/builtins-typedarray.cc | 6 - deps/v8/src/builtins/builtins-utils.h | 6 +- deps/v8/src/builtins/builtins-wasm-gen.cc | 2 +- deps/v8/src/builtins/builtins.cc | 38 +- deps/v8/src/builtins/builtins.h | 2 + deps/v8/src/builtins/ia32/builtins-ia32.cc | 158 +- deps/v8/src/builtins/mips/OWNERS | 5 +- deps/v8/src/builtins/mips/builtins-mips.cc | 76 +- deps/v8/src/builtins/mips64/OWNERS | 5 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 84 +- deps/v8/src/builtins/ppc/OWNERS | 3 +- deps/v8/src/builtins/ppc/builtins-ppc.cc | 81 +- deps/v8/src/builtins/s390/OWNERS | 3 +- deps/v8/src/builtins/s390/builtins-s390.cc | 82 +- .../src/builtins/setup-builtins-internal.cc | 95 +- deps/v8/src/builtins/x64/builtins-x64.cc | 150 +- deps/v8/src/cached-powers.cc | 2 +- deps/v8/src/code-events.h | 6 - deps/v8/src/code-factory.cc | 75 +- deps/v8/src/code-factory.h | 11 +- deps/v8/src/code-stub-assembler.cc | 3341 ++++++----- deps/v8/src/code-stub-assembler.h | 445 +- deps/v8/src/code-stubs.cc | 80 +- deps/v8/src/code-stubs.h | 143 +- deps/v8/src/codegen.cc | 205 +- deps/v8/src/codegen.h | 75 - deps/v8/src/collector.h | 10 +- deps/v8/src/compilation-cache.cc | 8 +- deps/v8/src/compilation-cache.h | 2 +- deps/v8/src/compilation-dependencies.cc | 13 +- deps/v8/src/compilation-dependencies.h | 3 +- deps/v8/src/compilation-info.cc | 45 +- deps/v8/src/compilation-info.h | 73 +- .../compiler-dispatcher-job.cc | 2 +- .../compiler-dispatcher-job.h | 65 +- .../compiler-dispatcher-tracer.cc | 115 +- .../compiler-dispatcher-tracer.h | 42 +- .../compiler-dispatcher.cc | 35 +- .../optimizing-compile-dispatcher.cc | 17 +- .../unoptimized-compile-job.cc | 278 +- .../unoptimized-compile-job.h | 71 +- deps/v8/src/compiler.cc | 720 ++- deps/v8/src/compiler.h | 56 +- deps/v8/src/compiler/access-builder.cc | 14 +- deps/v8/src/compiler/access-builder.h | 3 + deps/v8/src/compiler/access-info.cc | 18 +- deps/v8/src/compiler/all-nodes.h | 4 +- deps/v8/src/compiler/allocation-builder.h | 98 + .../v8/src/compiler/arm/code-generator-arm.cc | 113 +- .../compiler/arm/instruction-selector-arm.cc | 18 +- .../compiler/arm64/code-generator-arm64.cc | 153 +- .../arm64/instruction-selector-arm64.cc | 43 +- .../src/compiler/basic-block-instrumentor.cc | 5 +- .../src/compiler/basic-block-instrumentor.h | 3 +- deps/v8/src/compiler/branch-elimination.cc | 4 +- .../v8/src/compiler/bytecode-graph-builder.cc | 198 +- deps/v8/src/compiler/bytecode-graph-builder.h | 3 + deps/v8/src/compiler/c-linkage.cc | 2 +- deps/v8/src/compiler/code-assembler.cc | 107 +- deps/v8/src/compiler/code-assembler.h | 497 +- deps/v8/src/compiler/code-generator.cc | 123 +- deps/v8/src/compiler/code-generator.h | 26 +- deps/v8/src/compiler/common-operator.cc | 15 +- deps/v8/src/compiler/common-operator.h | 5 +- deps/v8/src/compiler/dead-code-elimination.cc | 172 +- deps/v8/src/compiler/dead-code-elimination.h | 26 +- .../src/compiler/effect-control-linearizer.cc | 691 ++- .../src/compiler/effect-control-linearizer.h | 24 +- deps/v8/src/compiler/escape-analysis.cc | 12 +- deps/v8/src/compiler/frame-states.cc | 6 - deps/v8/src/compiler/frame-states.h | 2 - deps/v8/src/compiler/graph-assembler.cc | 4 +- deps/v8/src/compiler/graph-assembler.h | 5 + .../src/compiler/ia32/code-generator-ia32.cc | 562 +- .../compiler/ia32/instruction-codes-ia32.h | 76 +- .../ia32/instruction-scheduler-ia32.cc | 74 + .../ia32/instruction-selector-ia32.cc | 50 +- deps/v8/src/compiler/instruction-codes.h | 2 + deps/v8/src/compiler/instruction-scheduler.cc | 2 + deps/v8/src/compiler/instruction-selector.cc | 74 +- deps/v8/src/compiler/instruction-selector.h | 4 +- deps/v8/src/compiler/instruction.h | 3 +- deps/v8/src/compiler/int64-lowering.cc | 102 +- deps/v8/src/compiler/js-builtin-reducer.cc | 507 +- deps/v8/src/compiler/js-builtin-reducer.h | 5 +- deps/v8/src/compiler/js-call-reducer.cc | 1001 +++- deps/v8/src/compiler/js-call-reducer.h | 32 +- .../src/compiler/js-context-specialization.cc | 7 +- deps/v8/src/compiler/js-create-lowering.cc | 130 +- deps/v8/src/compiler/js-create-lowering.h | 3 +- deps/v8/src/compiler/js-generic-lowering.cc | 50 +- deps/v8/src/compiler/js-generic-lowering.h | 1 - deps/v8/src/compiler/js-graph.cc | 3 + deps/v8/src/compiler/js-graph.h | 7 + deps/v8/src/compiler/js-inlining-heuristic.cc | 21 +- deps/v8/src/compiler/js-inlining.cc | 62 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 29 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 1 - .../js-native-context-specialization.cc | 554 +- .../js-native-context-specialization.h | 38 +- deps/v8/src/compiler/js-operator.cc | 100 +- deps/v8/src/compiler/js-operator.h | 49 +- deps/v8/src/compiler/js-type-hint-lowering.cc | 78 + deps/v8/src/compiler/js-type-hint-lowering.h | 5 + deps/v8/src/compiler/js-typed-lowering.cc | 387 +- deps/v8/src/compiler/js-typed-lowering.h | 11 +- deps/v8/src/compiler/linkage.cc | 29 +- deps/v8/src/compiler/linkage.h | 23 +- deps/v8/src/compiler/load-elimination.cc | 95 +- deps/v8/src/compiler/load-elimination.h | 9 +- deps/v8/src/compiler/loop-analysis.cc | 9 + .../src/compiler/loop-variable-optimizer.cc | 1 + .../src/compiler/machine-operator-reducer.cc | 11 +- deps/v8/src/compiler/machine-operator.h | 4 + deps/v8/src/compiler/memory-optimizer.cc | 23 +- deps/v8/src/compiler/memory-optimizer.h | 2 +- deps/v8/src/compiler/mips/OWNERS | 5 +- .../src/compiler/mips/code-generator-mips.cc | 68 +- .../mips/instruction-selector-mips.cc | 8 +- deps/v8/src/compiler/mips64/OWNERS | 5 +- .../compiler/mips64/code-generator-mips64.cc | 81 +- .../mips64/instruction-selector-mips64.cc | 16 +- deps/v8/src/compiler/node-properties.cc | 111 +- deps/v8/src/compiler/node-properties.h | 12 + deps/v8/src/compiler/opcodes.h | 74 +- deps/v8/src/compiler/operation-typer.cc | 220 +- deps/v8/src/compiler/operation-typer.h | 12 +- deps/v8/src/compiler/operator-properties.cc | 9 +- deps/v8/src/compiler/operator.cc | 4 +- deps/v8/src/compiler/operator.h | 4 +- deps/v8/src/compiler/pipeline-statistics.cc | 4 +- deps/v8/src/compiler/pipeline-statistics.h | 3 +- deps/v8/src/compiler/pipeline.cc | 512 +- deps/v8/src/compiler/pipeline.h | 26 +- deps/v8/src/compiler/ppc/OWNERS | 3 +- .../v8/src/compiler/ppc/code-generator-ppc.cc | 144 +- .../compiler/ppc/instruction-selector-ppc.cc | 23 +- .../src/compiler/property-access-builder.cc | 17 +- .../v8/src/compiler/property-access-builder.h | 2 + deps/v8/src/compiler/raw-machine-assembler.cc | 2 + deps/v8/src/compiler/raw-machine-assembler.h | 1 + deps/v8/src/compiler/representation-change.cc | 27 +- deps/v8/src/compiler/s390/OWNERS | 3 +- .../src/compiler/s390/code-generator-s390.cc | 176 +- .../compiler/s390/instruction-codes-s390.h | 1 + .../s390/instruction-scheduler-s390.cc | 1 + .../s390/instruction-selector-s390.cc | 40 +- deps/v8/src/compiler/simplified-lowering.cc | 227 +- deps/v8/src/compiler/simplified-lowering.h | 13 +- deps/v8/src/compiler/simplified-operator.cc | 351 +- deps/v8/src/compiler/simplified-operator.h | 75 +- .../src/compiler/store-store-elimination.cc | 9 - deps/v8/src/compiler/type-cache.h | 1 + deps/v8/src/compiler/typed-optimization.cc | 170 +- deps/v8/src/compiler/typed-optimization.h | 6 + deps/v8/src/compiler/typer.cc | 270 +- deps/v8/src/compiler/types.cc | 59 +- deps/v8/src/compiler/types.h | 20 +- deps/v8/src/compiler/verifier.cc | 171 +- deps/v8/src/compiler/verifier.h | 4 +- deps/v8/src/compiler/wasm-compiler.cc | 982 +++- deps/v8/src/compiler/wasm-compiler.h | 161 +- deps/v8/src/compiler/wasm-linkage.cc | 30 +- .../v8/src/compiler/x64/code-generator-x64.cc | 77 +- .../compiler/x64/instruction-selector-x64.cc | 6 +- deps/v8/src/contexts-inl.h | 3 +- deps/v8/src/contexts.cc | 7 +- deps/v8/src/contexts.h | 7 +- deps/v8/src/conversions-inl.h | 15 + deps/v8/src/conversions.cc | 200 +- deps/v8/src/conversions.h | 15 +- deps/v8/src/counters-inl.h | 8 +- deps/v8/src/counters.cc | 36 +- deps/v8/src/counters.h | 222 +- deps/v8/src/d8-console.cc | 64 +- deps/v8/src/d8-console.h | 6 + deps/v8/src/d8-posix.cc | 49 +- deps/v8/src/d8.cc | 406 +- deps/v8/src/d8.h | 44 +- deps/v8/src/date.cc | 26 +- deps/v8/src/date.h | 4 +- deps/v8/src/dateparser-inl.h | 2 +- deps/v8/src/dateparser.cc | 2 +- deps/v8/src/debug/OWNERS | 2 +- deps/v8/src/debug/arm/debug-arm.cc | 2 +- deps/v8/src/debug/arm64/debug-arm64.cc | 3 +- deps/v8/src/debug/debug-coverage.cc | 50 +- deps/v8/src/debug/debug-evaluate.cc | 232 +- deps/v8/src/debug/debug-evaluate.h | 6 + deps/v8/src/debug/debug-frames.cc | 45 +- deps/v8/src/debug/debug-frames.h | 4 - deps/v8/src/debug/debug-interface.h | 19 +- deps/v8/src/debug/debug-scopes.cc | 4 +- .../src/debug/debug-stack-trace-iterator.cc | 35 +- .../v8/src/debug/debug-stack-trace-iterator.h | 2 +- deps/v8/src/debug/debug-type-profile.cc | 67 +- deps/v8/src/debug/debug.cc | 126 +- deps/v8/src/debug/debug.h | 6 +- deps/v8/src/debug/ia32/debug-ia32.cc | 2 +- deps/v8/src/debug/interface-types.h | 8 +- deps/v8/src/debug/liveedit.cc | 64 +- deps/v8/src/debug/liveedit.h | 5 +- deps/v8/src/debug/mips/OWNERS | 5 +- deps/v8/src/debug/mips/debug-mips.cc | 2 +- deps/v8/src/debug/mips64/OWNERS | 5 +- deps/v8/src/debug/mips64/debug-mips64.cc | 2 +- deps/v8/src/debug/mirrors.js | 39 + deps/v8/src/debug/ppc/OWNERS | 3 +- deps/v8/src/debug/ppc/debug-ppc.cc | 2 +- deps/v8/src/debug/s390/OWNERS | 3 +- deps/v8/src/debug/s390/debug-s390.cc | 2 +- deps/v8/src/debug/x64/debug-x64.cc | 2 +- deps/v8/src/deoptimize-reason.h | 6 + deps/v8/src/deoptimizer.cc | 540 +- deps/v8/src/deoptimizer.h | 36 +- deps/v8/src/disassembler.cc | 21 +- deps/v8/src/disassembler.h | 2 +- deps/v8/src/diy-fp.h | 2 +- deps/v8/src/double.h | 8 +- deps/v8/src/eh-frame.cc | 24 +- deps/v8/src/elements.cc | 270 +- deps/v8/src/elements.h | 6 +- deps/v8/src/execution.cc | 25 +- .../externalize-string-extension.cc | 4 +- .../v8/src/extensions/statistics-extension.cc | 2 +- deps/v8/src/external-reference-table.cc | 22 +- deps/v8/src/factory-inl.h | 10 + deps/v8/src/factory.cc | 720 +-- deps/v8/src/factory.h | 156 +- deps/v8/src/fast-dtoa.cc | 10 +- deps/v8/src/feedback-vector-inl.h | 13 +- deps/v8/src/feedback-vector.cc | 150 +- deps/v8/src/feedback-vector.h | 70 +- deps/v8/src/field-index-inl.h | 46 +- deps/v8/src/field-index.h | 75 +- deps/v8/src/fixed-dtoa.cc | 6 +- deps/v8/src/flag-definitions.h | 162 +- deps/v8/src/flags.cc | 45 +- deps/v8/src/frame-constants.h | 11 + deps/v8/src/frames-inl.h | 5 +- deps/v8/src/frames.cc | 502 +- deps/v8/src/frames.h | 40 +- deps/v8/src/futex-emulation.cc | 2 +- deps/v8/src/gdb-jit.cc | 69 +- deps/v8/src/global-handles.cc | 179 +- deps/v8/src/global-handles.h | 17 +- deps/v8/src/globals.h | 121 +- deps/v8/src/handles-inl.h | 4 +- deps/v8/src/handles.cc | 6 +- deps/v8/src/handles.h | 42 +- deps/v8/src/heap-symbols.h | 400 +- deps/v8/src/heap/array-buffer-collector.cc | 58 + deps/v8/src/heap/array-buffer-collector.h | 51 + deps/v8/src/heap/array-buffer-tracker-inl.h | 23 +- deps/v8/src/heap/array-buffer-tracker.cc | 44 +- deps/v8/src/heap/array-buffer-tracker.h | 13 +- deps/v8/src/heap/code-stats.cc | 6 +- deps/v8/src/heap/concurrent-marking.cc | 62 +- deps/v8/src/heap/gc-tracer.cc | 5 +- deps/v8/src/heap/heap-inl.h | 79 +- deps/v8/src/heap/heap.cc | 755 ++- deps/v8/src/heap/heap.h | 278 +- deps/v8/src/heap/incremental-marking-job.cc | 2 +- deps/v8/src/heap/incremental-marking.cc | 333 +- deps/v8/src/heap/incremental-marking.h | 61 +- deps/v8/src/heap/local-allocator.h | 11 - deps/v8/src/heap/mark-compact-inl.h | 324 +- deps/v8/src/heap/mark-compact.cc | 649 +-- deps/v8/src/heap/mark-compact.h | 202 +- deps/v8/src/heap/memory-reducer.cc | 2 +- deps/v8/src/heap/object-stats.cc | 67 +- deps/v8/src/heap/object-stats.h | 52 +- deps/v8/src/heap/objects-visiting-inl.h | 230 +- deps/v8/src/heap/objects-visiting.cc | 45 +- deps/v8/src/heap/objects-visiting.h | 40 +- deps/v8/src/heap/remembered-set.h | 4 +- deps/v8/src/heap/scavenger-inl.h | 4 +- deps/v8/src/heap/scavenger.cc | 28 + deps/v8/src/heap/scavenger.h | 28 +- deps/v8/src/heap/setup-heap-internal.cc | 95 +- deps/v8/src/heap/slot-set.h | 2 +- deps/v8/src/heap/spaces-inl.h | 12 +- deps/v8/src/heap/spaces.cc | 372 +- deps/v8/src/heap/spaces.h | 69 +- deps/v8/src/heap/store-buffer.cc | 8 +- deps/v8/src/heap/sweeper.cc | 498 ++ deps/v8/src/heap/sweeper.h | 167 + deps/v8/src/ia32/assembler-ia32-inl.h | 24 +- deps/v8/src/ia32/assembler-ia32.cc | 60 +- deps/v8/src/ia32/assembler-ia32.h | 60 +- deps/v8/src/ia32/code-stubs-ia32.cc | 786 +-- deps/v8/src/ia32/code-stubs-ia32.h | 306 - deps/v8/src/ia32/codegen-ia32.cc | 146 +- deps/v8/src/ia32/codegen-ia32.h | 34 - deps/v8/src/ia32/deoptimizer-ia32.cc | 1 - deps/v8/src/ia32/disasm-ia32.cc | 22 +- deps/v8/src/ia32/frame-constants-ia32.cc | 5 + .../v8/src/ia32/interface-descriptors-ia32.cc | 36 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 281 +- deps/v8/src/ia32/macro-assembler-ia32.h | 156 +- deps/v8/src/ic/access-compiler-data.h | 50 - deps/v8/src/ic/access-compiler.cc | 57 - deps/v8/src/ic/access-compiler.h | 62 - deps/v8/src/ic/accessor-assembler.cc | 664 ++- deps/v8/src/ic/accessor-assembler.h | 12 + deps/v8/src/ic/arm/access-compiler-arm.cc | 43 - deps/v8/src/ic/arm/handler-compiler-arm.cc | 434 -- deps/v8/src/ic/arm64/access-compiler-arm64.cc | 50 - .../v8/src/ic/arm64/handler-compiler-arm64.cc | 431 -- deps/v8/src/ic/binary-op-assembler.cc | 94 +- deps/v8/src/ic/binary-op-assembler.h | 7 +- deps/v8/src/ic/call-optimization.cc | 15 + deps/v8/src/ic/call-optimization.h | 5 +- deps/v8/src/ic/handler-compiler.cc | 154 - deps/v8/src/ic/handler-compiler.h | 191 - deps/v8/src/ic/handler-configuration-inl.h | 106 +- deps/v8/src/ic/handler-configuration.cc | 188 +- deps/v8/src/ic/handler-configuration.h | 112 +- deps/v8/src/ic/ia32/access-compiler-ia32.cc | 40 - deps/v8/src/ic/ia32/handler-compiler-ia32.cc | 449 -- deps/v8/src/ic/ic-inl.h | 8 +- deps/v8/src/ic/ic.cc | 588 +- deps/v8/src/ic/ic.h | 57 +- deps/v8/src/ic/keyed-store-generic.cc | 62 +- deps/v8/src/ic/mips/OWNERS | 3 - deps/v8/src/ic/mips/access-compiler-mips.cc | 41 - deps/v8/src/ic/mips/handler-compiler-mips.cc | 413 -- deps/v8/src/ic/mips64/OWNERS | 3 - .../src/ic/mips64/access-compiler-mips64.cc | 41 - .../src/ic/mips64/handler-compiler-mips64.cc | 413 -- deps/v8/src/ic/ppc/OWNERS | 6 - deps/v8/src/ic/ppc/access-compiler-ppc.cc | 41 - deps/v8/src/ic/ppc/handler-compiler-ppc.cc | 429 -- deps/v8/src/ic/s390/OWNERS | 6 - deps/v8/src/ic/s390/access-compiler-s390.cc | 42 - deps/v8/src/ic/s390/handler-compiler-s390.cc | 412 -- deps/v8/src/ic/x64/access-compiler-x64.cc | 41 - deps/v8/src/ic/x64/handler-compiler-x64.cc | 421 -- deps/v8/src/icu_util.cc | 6 +- .../src/inspector/injected-script-source.js | 30 +- deps/v8/src/inspector/injected-script.cc | 52 +- deps/v8/src/inspector/injected-script.h | 9 - .../src/inspector/injected_script_externs.js | 7 + .../inspector/inspector_protocol_config.json | 2 +- deps/v8/src/inspector/js_protocol-1.3.json | 1205 ++++ deps/v8/src/inspector/js_protocol.json | 137 +- deps/v8/src/inspector/string-16.cc | 24 +- deps/v8/src/inspector/string-16.h | 1 + deps/v8/src/inspector/string-util.cc | 28 + deps/v8/src/inspector/string-util.h | 4 + deps/v8/src/inspector/v8-console-message.cc | 10 +- deps/v8/src/inspector/v8-console.cc | 18 +- deps/v8/src/inspector/v8-console.h | 4 +- .../src/inspector/v8-debugger-agent-impl.cc | 132 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 16 +- deps/v8/src/inspector/v8-debugger.cc | 221 +- deps/v8/src/inspector/v8-debugger.h | 44 +- .../inspector/v8-heap-profiler-agent-impl.cc | 19 +- .../inspector/v8-heap-profiler-agent-impl.h | 2 + .../src/inspector/v8-injected-script-host.cc | 37 + .../src/inspector/v8-injected-script-host.h | 2 + deps/v8/src/inspector/v8-inspector-impl.cc | 13 + deps/v8/src/inspector/v8-inspector-impl.h | 4 + deps/v8/src/inspector/v8-stack-trace-impl.cc | 122 +- deps/v8/src/inspector/v8-stack-trace-impl.h | 23 +- deps/v8/src/inspector/v8-value-utils.cc | 3 +- deps/v8/src/interface-descriptors.cc | 12 +- deps/v8/src/interface-descriptors.h | 36 +- .../src/interpreter/block-coverage-builder.h | 13 + .../interpreter/bytecode-array-accessor.cc | 8 +- .../src/interpreter/bytecode-array-accessor.h | 3 + .../src/interpreter/bytecode-array-builder.cc | 168 +- .../src/interpreter/bytecode-array-builder.h | 36 +- .../interpreter/bytecode-array-iterator.cc | 1 + .../bytecode-array-random-iterator.cc | 1 + .../src/interpreter/bytecode-array-writer.cc | 10 +- .../src/interpreter/bytecode-array-writer.h | 7 +- deps/v8/src/interpreter/bytecode-flags.cc | 6 +- deps/v8/src/interpreter/bytecode-flags.h | 4 +- deps/v8/src/interpreter/bytecode-generator.cc | 1070 ++-- deps/v8/src/interpreter/bytecode-generator.h | 78 +- deps/v8/src/interpreter/bytecode-operands.h | 10 +- .../bytecode-register-optimizer.cc | 4 +- deps/v8/src/interpreter/bytecodes.h | 56 +- .../src/interpreter/constant-array-builder.cc | 94 +- .../src/interpreter/constant-array-builder.h | 29 +- .../src/interpreter/control-flow-builders.cc | 27 +- .../src/interpreter/control-flow-builders.h | 22 +- .../src/interpreter/interpreter-assembler.cc | 443 +- .../src/interpreter/interpreter-assembler.h | 31 +- .../src/interpreter/interpreter-generator.cc | 1114 ++-- .../src/interpreter/interpreter-generator.h | 3 + .../interpreter-intrinsics-generator.cc | 43 +- .../src/interpreter/interpreter-intrinsics.h | 2 +- deps/v8/src/interpreter/interpreter.cc | 144 +- deps/v8/src/interpreter/interpreter.h | 24 +- .../interpreter/setup-interpreter-internal.cc | 38 +- deps/v8/src/interpreter/setup-interpreter.h | 4 - deps/v8/src/isolate-inl.h | 2 +- deps/v8/src/isolate.cc | 608 +- deps/v8/src/isolate.h | 129 +- deps/v8/src/js/array.js | 39 +- deps/v8/src/js/intl.js | 75 +- deps/v8/src/js/macros.py | 37 +- deps/v8/src/js/string.js | 151 - deps/v8/src/js/typedarray.js | 57 +- deps/v8/src/js/v8natives.js | 2 +- deps/v8/src/js/weak-collection.js | 127 - deps/v8/src/json-parser.cc | 28 +- deps/v8/src/json-parser.h | 3 +- deps/v8/src/json-stringifier.cc | 42 +- deps/v8/src/keys.cc | 8 +- deps/v8/src/label.h | 36 +- deps/v8/src/layout-descriptor-inl.h | 6 +- deps/v8/src/layout-descriptor.cc | 11 +- .../default-background-task-runner.cc | 59 + .../default-background-task-runner.h | 45 + .../default-foreground-task-runner.cc | 115 + .../default-foreground-task-runner.h | 84 + deps/v8/src/libplatform/default-platform.cc | 250 +- deps/v8/src/libplatform/default-platform.h | 47 +- deps/v8/src/libplatform/task-queue.cc | 13 +- deps/v8/src/libplatform/task-queue.h | 8 +- .../src/libplatform/tracing/trace-buffer.cc | 4 +- .../src/libplatform/tracing/trace-config.cc | 2 +- .../src/libplatform/tracing/trace-object.cc | 16 +- .../src/libplatform/tracing/trace-writer.cc | 2 +- .../libplatform/tracing/tracing-controller.cc | 35 +- deps/v8/src/libplatform/worker-thread.cc | 3 +- deps/v8/src/libsampler/sampler.cc | 4 +- deps/v8/src/locked-queue-inl.h | 4 +- deps/v8/src/log-utils.cc | 322 +- deps/v8/src/log-utils.h | 88 +- deps/v8/src/log.cc | 794 ++- deps/v8/src/log.h | 79 +- deps/v8/src/lookup-cache-inl.h | 2 +- deps/v8/src/lookup-cache.cc | 2 +- deps/v8/src/lookup-cache.h | 4 +- deps/v8/src/lookup.cc | 24 +- deps/v8/src/machine-type.h | 95 +- deps/v8/src/map-updater.cc | 12 +- deps/v8/src/messages.cc | 40 +- deps/v8/src/messages.h | 18 +- deps/v8/src/mips/OWNERS | 5 +- deps/v8/src/mips/assembler-mips-inl.h | 12 +- deps/v8/src/mips/assembler-mips.cc | 63 +- deps/v8/src/mips/assembler-mips.h | 71 +- deps/v8/src/mips/code-stubs-mips.cc | 737 +-- deps/v8/src/mips/code-stubs-mips.h | 252 +- deps/v8/src/mips/codegen-mips.cc | 134 +- deps/v8/src/mips/codegen-mips.h | 33 - deps/v8/src/mips/constants-mips.cc | 18 +- deps/v8/src/mips/constants-mips.h | 40 +- deps/v8/src/mips/deoptimizer-mips.cc | 3 +- deps/v8/src/mips/disasm-mips.cc | 10 +- deps/v8/src/mips/frame-constants-mips.cc | 5 + .../v8/src/mips/interface-descriptors-mips.cc | 34 +- deps/v8/src/mips/macro-assembler-mips.cc | 284 +- deps/v8/src/mips/macro-assembler-mips.h | 119 +- deps/v8/src/mips/simulator-mips.cc | 1059 +++- deps/v8/src/mips64/OWNERS | 5 +- deps/v8/src/mips64/assembler-mips64-inl.h | 11 +- deps/v8/src/mips64/assembler-mips64.cc | 261 +- deps/v8/src/mips64/assembler-mips64.h | 74 +- deps/v8/src/mips64/code-stubs-mips64.cc | 738 +-- deps/v8/src/mips64/code-stubs-mips64.h | 257 +- deps/v8/src/mips64/codegen-mips64.cc | 133 +- deps/v8/src/mips64/codegen-mips64.h | 33 - deps/v8/src/mips64/constants-mips64.cc | 18 +- deps/v8/src/mips64/constants-mips64.h | 44 +- deps/v8/src/mips64/deoptimizer-mips64.cc | 5 +- deps/v8/src/mips64/disasm-mips64.cc | 10 +- deps/v8/src/mips64/frame-constants-mips64.cc | 5 + .../mips64/interface-descriptors-mips64.cc | 34 +- deps/v8/src/mips64/macro-assembler-mips64.cc | 310 +- deps/v8/src/mips64/macro-assembler-mips64.h | 133 +- deps/v8/src/mips64/simulator-mips64.cc | 998 +++- deps/v8/src/objects-body-descriptors-inl.h | 27 +- deps/v8/src/objects-debug.cc | 113 +- deps/v8/src/objects-inl.h | 1755 ++---- deps/v8/src/objects-printer.cc | 271 +- deps/v8/src/objects.cc | 1285 +++-- deps/v8/src/objects.h | 1798 +----- deps/v8/src/objects/arguments-inl.h | 27 + deps/v8/src/objects/arguments.h | 4 + deps/v8/src/objects/bigint-inl.h | 56 - deps/v8/src/objects/bigint.cc | 1381 ++++- deps/v8/src/objects/bigint.h | 237 +- deps/v8/src/objects/code-inl.h | 714 +++ deps/v8/src/objects/code.h | 947 ++++ deps/v8/src/objects/compilation-cache-inl.h | 2 +- deps/v8/src/objects/compilation-cache.h | 1 + deps/v8/src/objects/debug-objects.cc | 4 +- deps/v8/src/objects/debug-objects.h | 2 + deps/v8/src/objects/descriptor-array.h | 19 +- deps/v8/src/objects/dictionary.h | 70 +- deps/v8/src/objects/frame-array.h | 5 +- deps/v8/src/objects/hash-table-inl.h | 9 + deps/v8/src/objects/hash-table.h | 33 +- deps/v8/src/objects/intl-objects.cc | 164 +- deps/v8/src/objects/js-array-inl.h | 243 + deps/v8/src/objects/js-array.h | 357 ++ deps/v8/src/objects/js-regexp-inl.h | 84 + deps/v8/src/objects/js-regexp.h | 164 + deps/v8/src/objects/literal-objects-inl.h | 51 + deps/v8/src/objects/literal-objects.cc | 532 ++ deps/v8/src/objects/literal-objects.h | 75 + deps/v8/src/objects/map.h | 250 +- deps/v8/src/objects/module-inl.h | 1 + deps/v8/src/objects/module.cc | 4 +- deps/v8/src/objects/module.h | 8 +- deps/v8/src/objects/name-inl.h | 2 +- deps/v8/src/objects/name.h | 7 +- deps/v8/src/objects/object-macros-undef.h | 2 + deps/v8/src/objects/object-macros.h | 30 +- deps/v8/src/objects/scope-info.cc | 16 +- deps/v8/src/objects/scope-info.h | 4 +- deps/v8/src/objects/script-inl.h | 4 +- .../v8/src/objects/shared-function-info-inl.h | 49 +- deps/v8/src/objects/shared-function-info.h | 58 +- deps/v8/src/objects/string-inl.h | 56 +- deps/v8/src/objects/string-table.h | 5 +- deps/v8/src/objects/string.h | 26 +- deps/v8/src/objects/template-objects.cc | 7 +- .../{ => parsing}/background-parsing-task.cc | 29 +- .../{ => parsing}/background-parsing-task.h | 16 +- deps/v8/src/parsing/expression-classifier.h | 2 +- .../parsing/expression-scope-reparenter.cc | 12 + deps/v8/src/parsing/func-name-inferrer.cc | 2 +- deps/v8/src/parsing/parse-info.cc | 29 +- deps/v8/src/parsing/parse-info.h | 32 +- deps/v8/src/parsing/parser-base.h | 402 +- deps/v8/src/parsing/parser.cc | 578 +- deps/v8/src/parsing/parser.h | 163 +- deps/v8/src/parsing/parsing.cc | 6 +- deps/v8/src/parsing/pattern-rewriter.cc | 10 +- deps/v8/src/parsing/preparsed-scope-data.cc | 98 +- deps/v8/src/parsing/preparsed-scope-data.h | 18 +- deps/v8/src/parsing/preparser.cc | 42 +- deps/v8/src/parsing/preparser.h | 155 +- deps/v8/src/parsing/rewriter.cc | 11 +- .../src/parsing/scanner-character-streams.cc | 8 +- deps/v8/src/parsing/scanner.cc | 59 +- deps/v8/src/parsing/scanner.h | 30 +- deps/v8/src/parsing/token.h | 397 +- .../src/pending-compilation-error-handler.cc | 98 +- .../src/pending-compilation-error-handler.h | 91 +- deps/v8/src/perf-jit.cc | 9 +- deps/v8/src/ppc/OWNERS | 3 +- deps/v8/src/ppc/assembler-ppc-inl.h | 20 +- deps/v8/src/ppc/assembler-ppc.cc | 37 +- deps/v8/src/ppc/assembler-ppc.h | 20 +- deps/v8/src/ppc/code-stubs-ppc.cc | 710 +-- deps/v8/src/ppc/code-stubs-ppc.h | 242 +- deps/v8/src/ppc/codegen-ppc.cc | 117 +- deps/v8/src/ppc/codegen-ppc.h | 28 - deps/v8/src/ppc/deoptimizer-ppc.cc | 3 +- deps/v8/src/ppc/disasm-ppc.cc | 14 +- deps/v8/src/ppc/frame-constants-ppc.cc | 5 + deps/v8/src/ppc/interface-descriptors-ppc.cc | 18 +- deps/v8/src/ppc/macro-assembler-ppc.cc | 401 +- deps/v8/src/ppc/macro-assembler-ppc.h | 96 +- deps/v8/src/ppc/simulator-ppc.cc | 130 +- deps/v8/src/profiler/allocation-tracker.cc | 8 +- deps/v8/src/profiler/circular-queue-inl.h | 4 +- deps/v8/src/profiler/circular-queue.h | 7 +- deps/v8/src/profiler/cpu-profiler-inl.h | 6 +- deps/v8/src/profiler/cpu-profiler.cc | 64 +- deps/v8/src/profiler/cpu-profiler.h | 2 + deps/v8/src/profiler/heap-profiler.cc | 18 +- .../profiler/heap-snapshot-generator-inl.h | 2 +- .../src/profiler/heap-snapshot-generator.cc | 232 +- .../v8/src/profiler/heap-snapshot-generator.h | 21 +- deps/v8/src/profiler/profile-generator.cc | 26 +- deps/v8/src/profiler/profile-generator.h | 4 +- deps/v8/src/profiler/profiler-listener.cc | 66 +- deps/v8/src/profiler/profiler-listener.h | 8 +- .../v8/src/profiler/sampling-heap-profiler.cc | 5 +- deps/v8/src/profiler/strings-storage.cc | 6 +- deps/v8/src/profiler/tick-sample.cc | 2 +- deps/v8/src/profiler/unbound-queue-inl.h | 8 +- deps/v8/src/property-details.h | 14 +- deps/v8/src/prototype.h | 6 +- .../regexp/arm/regexp-macro-assembler-arm.cc | 8 +- .../regexp/arm/regexp-macro-assembler-arm.h | 2 +- .../arm64/regexp-macro-assembler-arm64.cc | 20 +- .../arm64/regexp-macro-assembler-arm64.h | 2 +- .../ia32/regexp-macro-assembler-ia32.cc | 8 +- .../regexp/ia32/regexp-macro-assembler-ia32.h | 2 +- deps/v8/src/regexp/jsregexp-inl.h | 6 +- deps/v8/src/regexp/jsregexp.cc | 479 +- deps/v8/src/regexp/jsregexp.h | 153 +- deps/v8/src/regexp/mips/OWNERS | 5 +- .../mips/regexp-macro-assembler-mips.cc | 10 +- .../regexp/mips/regexp-macro-assembler-mips.h | 2 +- deps/v8/src/regexp/mips64/OWNERS | 5 +- .../mips64/regexp-macro-assembler-mips64.cc | 10 +- .../mips64/regexp-macro-assembler-mips64.h | 2 +- deps/v8/src/regexp/ppc/OWNERS | 3 +- .../regexp/ppc/regexp-macro-assembler-ppc.cc | 8 +- .../regexp/ppc/regexp-macro-assembler-ppc.h | 2 +- deps/v8/src/regexp/regexp-ast.cc | 30 +- deps/v8/src/regexp/regexp-ast.h | 55 +- .../regexp/regexp-macro-assembler-irregexp.cc | 2 +- .../regexp/regexp-macro-assembler-irregexp.h | 15 +- deps/v8/src/regexp/regexp-macro-assembler.cc | 4 +- deps/v8/src/regexp/regexp-macro-assembler.h | 8 +- deps/v8/src/regexp/regexp-parser.cc | 362 +- deps/v8/src/regexp/regexp-parser.h | 103 +- deps/v8/src/regexp/regexp-stack.cc | 8 +- deps/v8/src/regexp/regexp-stack.h | 4 +- deps/v8/src/regexp/regexp-utils.cc | 33 +- deps/v8/src/regexp/regexp-utils.h | 6 +- deps/v8/src/regexp/s390/OWNERS | 3 +- .../s390/regexp-macro-assembler-s390.cc | 8 +- .../regexp/s390/regexp-macro-assembler-s390.h | 2 +- .../regexp/x64/regexp-macro-assembler-x64.cc | 10 +- .../regexp/x64/regexp-macro-assembler-x64.h | 2 +- deps/v8/src/register-configuration.cc | 5 +- deps/v8/src/reglist.h | 25 +- deps/v8/src/runtime-profiler.cc | 5 - deps/v8/src/runtime/runtime-array.cc | 54 +- deps/v8/src/runtime/runtime-bigint.cc | 117 +- deps/v8/src/runtime/runtime-classes.cc | 565 +- deps/v8/src/runtime/runtime-collections.cc | 28 +- deps/v8/src/runtime/runtime-compiler.cc | 60 +- deps/v8/src/runtime/runtime-debug.cc | 69 +- deps/v8/src/runtime/runtime-function.cc | 21 - deps/v8/src/runtime/runtime-internal.cc | 11 +- deps/v8/src/runtime/runtime-interpreter.cc | 57 + deps/v8/src/runtime/runtime-intl.cc | 49 +- deps/v8/src/runtime/runtime-literals.cc | 5 +- deps/v8/src/runtime/runtime-maths.cc | 1 - deps/v8/src/runtime/runtime-module.cc | 7 + deps/v8/src/runtime/runtime-numbers.cc | 31 +- deps/v8/src/runtime/runtime-object.cc | 73 +- deps/v8/src/runtime/runtime-operators.cc | 12 +- deps/v8/src/runtime/runtime-promise.cc | 5 +- deps/v8/src/runtime/runtime-regexp.cc | 113 +- deps/v8/src/runtime/runtime-scopes.cc | 37 +- deps/v8/src/runtime/runtime-strings.cc | 98 +- deps/v8/src/runtime/runtime-test.cc | 238 +- deps/v8/src/runtime/runtime-typedarray.cc | 10 +- deps/v8/src/runtime/runtime-utils.h | 6 +- deps/v8/src/runtime/runtime-wasm.cc | 124 +- deps/v8/src/runtime/runtime.cc | 4 +- deps/v8/src/runtime/runtime.h | 118 +- deps/v8/src/s390/OWNERS | 3 +- deps/v8/src/s390/assembler-s390-inl.h | 18 +- deps/v8/src/s390/assembler-s390.cc | 29 +- deps/v8/src/s390/assembler-s390.h | 20 +- deps/v8/src/s390/code-stubs-s390.cc | 683 +-- deps/v8/src/s390/code-stubs-s390.h | 367 +- deps/v8/src/s390/codegen-s390.cc | 119 +- deps/v8/src/s390/codegen-s390.h | 30 - deps/v8/src/s390/deoptimizer-s390.cc | 5 +- deps/v8/src/s390/disasm-s390.cc | 10 +- deps/v8/src/s390/frame-constants-s390.cc | 5 + .../v8/src/s390/interface-descriptors-s390.cc | 18 +- deps/v8/src/s390/macro-assembler-s390.cc | 388 +- deps/v8/src/s390/macro-assembler-s390.h | 118 +- deps/v8/src/s390/simulator-s390.cc | 135 +- deps/v8/src/safepoint-table.cc | 39 +- deps/v8/src/safepoint-table.h | 16 +- deps/v8/src/setup-isolate-deserialize.cc | 6 +- deps/v8/src/setup-isolate-full.cc | 6 +- deps/v8/src/snapshot/OWNERS | 1 + .../builtin-deserializer-allocator.cc | 289 + .../snapshot/builtin-deserializer-allocator.h | 132 + deps/v8/src/snapshot/builtin-deserializer.cc | 254 +- deps/v8/src/snapshot/builtin-deserializer.h | 82 +- .../snapshot/builtin-serializer-allocator.cc | 67 + .../snapshot/builtin-serializer-allocator.h | 52 + deps/v8/src/snapshot/builtin-serializer.cc | 66 +- deps/v8/src/snapshot/builtin-serializer.h | 33 +- .../v8/src/snapshot/builtin-snapshot-utils.cc | 67 + deps/v8/src/snapshot/builtin-snapshot-utils.h | 56 + deps/v8/src/snapshot/code-serializer.cc | 12 +- .../default-deserializer-allocator.cc | 246 + .../snapshot/default-deserializer-allocator.h | 102 + .../snapshot/default-serializer-allocator.cc | 7 - .../snapshot/default-serializer-allocator.h | 1 - deps/v8/src/snapshot/deserializer.cc | 430 +- deps/v8/src/snapshot/deserializer.h | 94 +- deps/v8/src/snapshot/mksnapshot.cc | 20 +- deps/v8/src/snapshot/natives-common.cc | 2 +- deps/v8/src/snapshot/natives-external.cc | 14 +- deps/v8/src/snapshot/object-deserializer.cc | 10 +- deps/v8/src/snapshot/object-deserializer.h | 2 +- deps/v8/src/snapshot/partial-deserializer.cc | 20 +- deps/v8/src/snapshot/partial-deserializer.h | 5 +- deps/v8/src/snapshot/partial-serializer.cc | 20 +- deps/v8/src/snapshot/partial-serializer.h | 3 +- deps/v8/src/snapshot/serializer-common.cc | 10 +- deps/v8/src/snapshot/serializer-common.h | 11 +- deps/v8/src/snapshot/serializer.cc | 119 +- deps/v8/src/snapshot/serializer.h | 19 +- deps/v8/src/snapshot/snapshot-common.cc | 48 +- deps/v8/src/snapshot/snapshot-empty.cc | 3 +- deps/v8/src/snapshot/snapshot-external.cc | 4 +- deps/v8/src/snapshot/snapshot-source-sink.cc | 2 +- deps/v8/src/snapshot/snapshot.h | 6 + deps/v8/src/snapshot/startup-deserializer.cc | 18 +- deps/v8/src/snapshot/startup-deserializer.h | 4 +- deps/v8/src/snapshot/startup-serializer.cc | 70 +- deps/v8/src/snapshot/startup-serializer.h | 11 +- deps/v8/src/source-position-table.cc | 21 +- deps/v8/src/source-position-table.h | 13 +- deps/v8/src/source-position.cc | 8 +- deps/v8/src/source-position.h | 9 +- deps/v8/src/splay-tree-inl.h | 30 +- deps/v8/src/splay-tree.h | 13 +- deps/v8/src/string-builder.h | 16 +- deps/v8/src/string-case.cc | 2 +- deps/v8/src/string-hasher-inl.h | 4 +- deps/v8/src/string-search.h | 8 +- deps/v8/src/string-stream.cc | 10 +- deps/v8/src/strtod.cc | 22 +- deps/v8/src/tracing/trace-event.h | 97 +- deps/v8/src/transitions-inl.h | 12 +- deps/v8/src/transitions.cc | 21 +- deps/v8/src/transitions.h | 27 +- deps/v8/src/trap-handler/handler-inside.cc | 14 +- deps/v8/src/trap-handler/handler-outside.cc | 13 +- deps/v8/src/trap-handler/handler-shared.cc | 17 +- .../src/trap-handler/trap-handler-internal.h | 7 + deps/v8/src/trap-handler/trap-handler.h | 5 +- deps/v8/src/type-hints.cc | 87 - deps/v8/src/type-hints.h | 27 - deps/v8/src/unicode-decoder.cc | 4 +- deps/v8/src/unicode-decoder.h | 10 +- deps/v8/src/uri.cc | 4 +- deps/v8/src/utils.cc | 27 +- deps/v8/src/utils.h | 70 +- deps/v8/src/v8.cc | 7 +- deps/v8/src/v8.gyp | 104 +- deps/v8/src/v8threads.cc | 47 +- deps/v8/src/v8threads.h | 2 +- deps/v8/src/value-serializer.cc | 125 +- deps/v8/src/value-serializer.h | 6 +- deps/v8/src/vector.h | 33 +- deps/v8/src/version.cc | 2 +- deps/v8/src/visitors.cc | 2 + deps/v8/src/visitors.h | 39 + deps/v8/src/wasm/baseline/DEPS | 5 + .../baseline/arm/liftoff-assembler-arm-defs.h | 23 + .../wasm/baseline/arm/liftoff-assembler-arm.h | 65 + .../arm64/liftoff-assembler-arm64-defs.h | 23 + .../baseline/arm64/liftoff-assembler-arm64.h | 65 + .../ia32/liftoff-assembler-ia32-defs.h | 23 + .../baseline/ia32/liftoff-assembler-ia32.h | 177 + .../v8/src/wasm/baseline/liftoff-assembler.cc | 389 ++ deps/v8/src/wasm/baseline/liftoff-assembler.h | 378 ++ deps/v8/src/wasm/baseline/liftoff-compiler.cc | 550 ++ .../mips/liftoff-assembler-mips-defs.h | 23 + .../baseline/mips/liftoff-assembler-mips.h | 65 + .../mips64/liftoff-assembler-mips64-defs.h | 23 + .../mips64/liftoff-assembler-mips64.h | 65 + .../baseline/ppc/liftoff-assembler-ppc-defs.h | 23 + .../wasm/baseline/ppc/liftoff-assembler-ppc.h | 65 + .../s390/liftoff-assembler-s390-defs.h | 23 + .../baseline/s390/liftoff-assembler-s390.h | 65 + .../baseline/x64/liftoff-assembler-x64-defs.h | 23 + .../wasm/baseline/x64/liftoff-assembler-x64.h | 190 + deps/v8/src/wasm/decoder.h | 76 +- deps/v8/src/wasm/function-body-decoder-impl.h | 679 ++- deps/v8/src/wasm/function-body-decoder.cc | 298 +- deps/v8/src/wasm/function-body-decoder.h | 7 +- deps/v8/src/wasm/module-compiler.cc | 2176 +++++--- deps/v8/src/wasm/module-compiler.h | 35 +- deps/v8/src/wasm/module-decoder.cc | 33 +- deps/v8/src/wasm/module-decoder.h | 2 +- deps/v8/src/wasm/signature-map.cc | 5 +- deps/v8/src/wasm/signature-map.h | 11 +- deps/v8/src/wasm/streaming-decoder.cc | 55 +- deps/v8/src/wasm/streaming-decoder.h | 28 +- deps/v8/src/wasm/wasm-code-specialization.cc | 131 +- deps/v8/src/wasm/wasm-code-specialization.h | 11 +- deps/v8/src/wasm/wasm-code-wrapper.cc | 38 + deps/v8/src/wasm/wasm-code-wrapper.h | 38 + deps/v8/src/wasm/wasm-debug.cc | 149 +- deps/v8/src/wasm/wasm-external-refs.cc | 4 +- deps/v8/src/wasm/wasm-heap.cc | 785 +++ deps/v8/src/wasm/wasm-heap.h | 323 ++ deps/v8/src/wasm/wasm-interpreter.cc | 833 ++- deps/v8/src/wasm/wasm-interpreter.h | 9 +- deps/v8/src/wasm/wasm-js.cc | 43 +- deps/v8/src/wasm/wasm-limits.h | 8 +- deps/v8/src/wasm/wasm-memory.cc | 11 +- deps/v8/src/wasm/wasm-memory.h | 2 +- deps/v8/src/wasm/wasm-module-builder.cc | 2 +- deps/v8/src/wasm/wasm-module.cc | 143 +- deps/v8/src/wasm/wasm-module.h | 24 +- deps/v8/src/wasm/wasm-objects-inl.h | 36 +- deps/v8/src/wasm/wasm-objects.cc | 612 +- deps/v8/src/wasm/wasm-objects.h | 146 +- deps/v8/src/wasm/wasm-opcodes.cc | 82 +- deps/v8/src/wasm/wasm-opcodes.h | 6 +- deps/v8/src/wasm/wasm-serialization.cc | 687 +++ deps/v8/src/wasm/wasm-serialization.h | 96 + deps/v8/src/wasm/wasm-text.cc | 32 +- deps/v8/src/wasm/wasm-value.h | 85 +- deps/v8/src/x64/assembler-x64-inl.h | 17 +- deps/v8/src/x64/assembler-x64.cc | 86 +- deps/v8/src/x64/assembler-x64.h | 54 +- deps/v8/src/x64/code-stubs-x64.cc | 694 +-- deps/v8/src/x64/code-stubs-x64.h | 300 - deps/v8/src/x64/codegen-x64.cc | 155 +- deps/v8/src/x64/codegen-x64.h | 99 - deps/v8/src/x64/deoptimizer-x64.cc | 3 +- deps/v8/src/x64/disasm-x64.cc | 17 +- deps/v8/src/x64/frame-constants-x64.cc | 5 + deps/v8/src/x64/interface-descriptors-x64.cc | 22 +- deps/v8/src/x64/macro-assembler-x64.cc | 610 +- deps/v8/src/x64/macro-assembler-x64.h | 260 +- deps/v8/src/zone/zone-handle-set.h | 59 +- deps/v8/src/zone/zone-list-inl.h | 2 +- deps/v8/src/zone/zone.cc | 2 +- deps/v8/src/zone/zone.h | 17 +- deps/v8/test/benchmarks/testcfg.py | 54 +- deps/v8/test/cctest/BUILD.gn | 16 +- deps/v8/test/cctest/OWNERS | 5 +- deps/v8/test/cctest/assembler-helper-arm.cc | 33 + deps/v8/test/cctest/assembler-helper-arm.h | 28 + deps/v8/test/cctest/cctest.cc | 39 +- deps/v8/test/cctest/cctest.gyp | 17 +- deps/v8/test/cctest/cctest.h | 35 +- deps/v8/test/cctest/cctest.status | 13 + .../cctest/compiler/code-assembler-tester.h | 13 +- .../v8/test/cctest/compiler/codegen-tester.cc | 2 +- deps/v8/test/cctest/compiler/codegen-tester.h | 9 +- .../test/cctest/compiler/function-tester.cc | 8 +- .../cctest/compiler/graph-builder-tester.h | 16 +- .../cctest/compiler/test-code-generator.cc | 996 +++- .../cctest/compiler/test-graph-visualizer.cc | 8 +- .../test/cctest/compiler/test-instruction.cc | 2 +- .../cctest/compiler/test-js-typed-lowering.cc | 16 +- .../cctest/compiler/test-jump-threading.cc | 14 +- deps/v8/test/cctest/compiler/test-linkage.cc | 5 +- .../cctest/compiler/test-loop-analysis.cc | 6 +- .../compiler/test-machine-operator-reducer.cc | 4 +- .../cctest/compiler/test-multiple-return.cc | 7 +- deps/v8/test/cctest/compiler/test-node.cc | 16 +- .../test-run-bytecode-graph-builder.cc | 9 +- .../cctest/compiler/test-run-intrinsics.cc | 18 - .../test/cctest/compiler/test-run-machops.cc | 43 +- .../cctest/compiler/test-run-native-calls.cc | 5 +- .../v8/test/cctest/compiler/test-run-stubs.cc | 121 +- .../cctest/compiler/test-run-variables.cc | 66 +- .../cctest/compiler/test-run-wasm-machops.cc | 18 +- deps/v8/test/cctest/compiler/value-helper.cc | 21 + deps/v8/test/cctest/compiler/value-helper.h | 501 +- .../cctest/expression-type-collector-macros.h | 10 +- deps/v8/test/cctest/gay-fixed.cc | 2 +- deps/v8/test/cctest/gay-precision.cc | 2 +- deps/v8/test/cctest/gay-shortest.cc | 2 +- deps/v8/test/cctest/heap/heap-tester.h | 2 + deps/v8/test/cctest/heap/heap-utils.cc | 3 +- deps/v8/test/cctest/heap/test-alloc.cc | 14 +- deps/v8/test/cctest/heap/test-compaction.cc | 18 +- deps/v8/test/cctest/heap/test-heap.cc | 342 +- deps/v8/test/cctest/heap/test-mark-compact.cc | 11 +- .../test/cctest/heap/test-page-promotion.cc | 3 +- deps/v8/test/cctest/heap/test-spaces.cc | 86 +- .../bytecode-expectations-printer.h | 1 + .../ArrayLiterals.golden | 26 +- .../ArrayLiteralsWide.golden | 1050 ---- .../AssignmentsInBinaryExpression.golden | 10 +- .../AsyncGenerators.golden | 54 +- .../bytecode_expectations/BasicLoops.golden | 26 +- .../BreakableBlocks.golden | 12 +- .../CallAndSpread.golden | 16 +- .../bytecode_expectations/CallGlobal.golden | 8 +- .../CallLookupSlot.golden | 8 +- .../bytecode_expectations/CallNew.golden | 12 +- .../ClassAndSuperClass.golden | 20 +- .../ClassDeclarations.golden | 171 +- .../bytecode_expectations/ClassFields.golden | 337 ++ .../bytecode_expectations/CompareNil.golden | 2 +- .../ContextVariables.golden | 8 +- .../CountOperators.golden | 56 +- .../CreateRestParameter.golden | 6 +- .../bytecode_expectations/Eval.golden | 4 +- .../bytecode_expectations/ForAwaitOf.golden | 76 +- .../bytecode_expectations/ForIn.golden | 34 +- .../bytecode_expectations/ForOf.golden | 40 +- .../bytecode_expectations/ForOfLoop.golden | 112 +- .../FunctionLiterals.golden | 8 +- .../bytecode_expectations/Generators.golden | 46 +- .../GlobalCountOperators.golden | 20 +- .../HeapNumberConstants.golden | 1047 +--- .../bytecode_expectations/IfConditions.golden | 4 +- .../JumpsRequiringConstantWideOperands.golden | 1294 ----- .../bytecode_expectations/LookupSlot.golden | 20 +- .../LookupSlotWideInEval.golden | 4218 -------------- .../bytecode_expectations/Modules.golden | 54 +- .../bytecode_expectations/NewAndSpread.golden | 84 +- .../ObjectLiterals.golden | 37 +- .../ObjectLiteralsWide.golden | 1051 ---- .../bytecode_expectations/PropertyCall.golden | 30 +- .../RegExpLiterals.golden | 6 +- .../RegExpLiteralsWide.golden | 1050 ---- .../StandardForLoop.golden | 30 +- .../SuperCallAndSpread.golden | 16 +- .../bytecode_expectations/Switch.golden | 20 +- .../bytecode_expectations/ThisFunction.golden | 7 +- .../TopLevelObjectLiterals.golden | 4 +- .../UnaryOperators.golden | 4 +- .../WideRegisters.golden | 10 +- .../generate-bytecode-expectations.cc | 13 +- .../interpreter/source-position-matcher.cc | 2 +- .../interpreter/test-bytecode-generator.cc | 163 +- .../test-interpreter-intrinsics.cc | 10 +- .../cctest/interpreter/test-interpreter.cc | 522 +- .../test/cctest/libplatform/test-tracing.cc | 111 +- .../cctest/log-eq-of-logging-and-traversal.js | 22 +- deps/v8/test/cctest/parsing/test-preparser.cc | 329 +- deps/v8/test/cctest/print-extension.cc | 2 +- deps/v8/test/cctest/profiler-extension.cc | 2 +- deps/v8/test/cctest/scope-test-helper.h | 18 +- deps/v8/test/cctest/test-accessors.cc | 10 +- deps/v8/test/cctest/test-allocation.cc | 8 +- deps/v8/test/cctest/test-api-accessors.cc | 2 +- deps/v8/test/cctest/test-api-interceptors.cc | 33 +- deps/v8/test/cctest/test-api.cc | 1036 ++-- deps/v8/test/cctest/test-assembler-arm.cc | 346 +- deps/v8/test/cctest/test-assembler-arm64.cc | 416 +- deps/v8/test/cctest/test-assembler-ia32.cc | 6 +- deps/v8/test/cctest/test-assembler-mips.cc | 2654 ++++++--- deps/v8/test/cctest/test-assembler-mips64.cc | 2661 ++++++--- deps/v8/test/cctest/test-assembler-ppc.cc | 26 +- deps/v8/test/cctest/test-assembler-s390.cc | 22 +- deps/v8/test/cctest/test-assembler-x64.cc | 298 +- .../test/cctest/test-code-stub-assembler.cc | 346 +- deps/v8/test/cctest/test-code-stubs-arm.cc | 53 +- deps/v8/test/cctest/test-code-stubs-arm64.cc | 54 +- deps/v8/test/cctest/test-code-stubs-ia32.cc | 34 +- deps/v8/test/cctest/test-code-stubs-mips.cc | 52 +- deps/v8/test/cctest/test-code-stubs-mips64.cc | 52 +- deps/v8/test/cctest/test-code-stubs-x64.cc | 40 +- deps/v8/test/cctest/test-compiler.cc | 39 +- deps/v8/test/cctest/test-cpu-profiler.cc | 120 +- deps/v8/test/cctest/test-date.cc | 4 +- deps/v8/test/cctest/test-debug.cc | 489 +- deps/v8/test/cctest/test-decls.cc | 42 +- deps/v8/test/cctest/test-disasm-arm.cc | 36 + deps/v8/test/cctest/test-disasm-arm64.cc | 12 +- deps/v8/test/cctest/test-disasm-ia32.cc | 2 +- deps/v8/test/cctest/test-disasm-x64.cc | 2 +- deps/v8/test/cctest/test-diy-fp.cc | 14 +- deps/v8/test/cctest/test-double.cc | 2 +- deps/v8/test/cctest/test-elements-kind.cc | 9 +- deps/v8/test/cctest/test-feedback-vector.cc | 4 +- .../test/cctest/test-field-type-tracking.cc | 22 +- deps/v8/test/cctest/test-global-handles.cc | 338 +- deps/v8/test/cctest/test-hashmap.cc | 12 +- deps/v8/test/cctest/test-heap-profiler.cc | 37 +- .../cctest/test-inobject-slack-tracking.cc | 12 +- deps/v8/test/cctest/test-liveedit.cc | 18 +- deps/v8/test/cctest/test-log-stack-tracer.cc | 2 +- deps/v8/test/cctest/test-log.cc | 503 +- .../test/cctest/test-macro-assembler-arm.cc | 32 +- .../test/cctest/test-macro-assembler-mips.cc | 26 +- .../cctest/test-macro-assembler-mips64.cc | 34 +- .../test/cctest/test-macro-assembler-x64.cc | 575 +- deps/v8/test/cctest/test-modules.cc | 111 - deps/v8/test/cctest/test-object.cc | 3 + deps/v8/test/cctest/test-parsing.cc | 3678 +++++------- deps/v8/test/cctest/test-platform-linux.cc | 53 - deps/v8/test/cctest/test-platform-win32.cc | 53 - deps/v8/test/cctest/test-platform.cc | 56 +- deps/v8/test/cctest/test-profile-generator.cc | 20 +- .../cctest/test-random-number-generator.cc | 2 +- deps/v8/test/cctest/test-regexp.cc | 128 +- .../cctest/test-run-wasm-relocation-arm.cc | 4 +- .../cctest/test-run-wasm-relocation-arm64.cc | 4 +- .../cctest/test-run-wasm-relocation-ia32.cc | 4 +- .../cctest/test-run-wasm-relocation-x64.cc | 4 +- deps/v8/test/cctest/test-sampler-api.cc | 14 +- deps/v8/test/cctest/test-serialize.cc | 339 +- deps/v8/test/cctest/test-strings.cc | 25 +- ...tor-arm.cc => test-sync-primitives-arm.cc} | 85 +- ...arm64.cc => test-sync-primitives-arm64.cc} | 56 +- .../v8/test/cctest/test-thread-termination.cc | 38 +- deps/v8/test/cctest/test-threads.cc | 4 +- deps/v8/test/cctest/test-trace-event.cc | 43 +- deps/v8/test/cctest/test-types.cc | 21 +- deps/v8/test/cctest/test-unboxed-doubles.cc | 18 +- deps/v8/test/cctest/test-usecounters.cc | 59 +- deps/v8/test/cctest/test-utils-arm64.cc | 6 +- deps/v8/test/cctest/test-utils-arm64.h | 8 +- deps/v8/test/cctest/test-weakmaps.cc | 13 +- deps/v8/test/cctest/test-weaksets.cc | 8 +- deps/v8/test/cctest/testcfg.py | 18 +- deps/v8/test/cctest/wasm/test-c-wasm-entry.cc | 42 +- deps/v8/test/cctest/wasm/test-run-wasm-64.cc | 27 +- .../test/cctest/wasm/test-run-wasm-atomics.cc | 123 +- .../cctest/wasm/test-run-wasm-interpreter.cc | 104 +- .../test/cctest/wasm/test-run-wasm-module.cc | 90 +- .../cctest/wasm/test-run-wasm-relocation.cc | 87 +- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 53 +- deps/v8/test/cctest/wasm/test-run-wasm.cc | 185 +- .../cctest/wasm/test-streaming-compilation.cc | 124 +- .../test/cctest/wasm/test-wasm-breakpoints.cc | 25 +- deps/v8/test/cctest/wasm/test-wasm-codegen.cc | 101 + .../wasm/test-wasm-interpreter-entry.cc | 49 +- deps/v8/test/cctest/wasm/test-wasm-stack.cc | 8 +- deps/v8/test/cctest/wasm/wasm-run-utils.cc | 200 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 117 +- deps/v8/test/common/wasm/test-signatures.h | 10 +- deps/v8/test/common/wasm/wasm-macro-gen.h | 51 +- .../v8/test/common/wasm/wasm-module-runner.cc | 52 +- deps/v8/test/common/wasm/wasm-module-runner.h | 13 +- .../debug/debug-evaluate-arguments.js | 60 + deps/v8/test/debugger/debug/debug-script.js | 7 +- .../debug/regress/regress-crbug-517592.js | 2 +- deps/v8/test/debugger/testcfg.py | 15 +- deps/v8/test/fuzzer/fuzzer-support.cc | 41 +- deps/v8/test/fuzzer/fuzzer-support.h | 11 +- deps/v8/test/fuzzer/regexp.cc | 2 - deps/v8/test/fuzzer/testcfg.py | 12 +- deps/v8/test/fuzzer/wasm-compile.cc | 470 +- deps/v8/test/fuzzer/wasm-fuzzer-common.cc | 91 +- deps/v8/test/fuzzer/wasm-fuzzer-common.h | 9 +- .../cpu-profiler/coverage-block-expected.txt | 2 +- .../async-instrumentation-expected.txt | 4 +- .../async-promise-late-then-expected.txt | 6 +- .../debugger/async-stack-await-expected.txt | 2 +- .../async-stack-created-frame-expected.txt | 24 +- .../async-stack-for-promise-expected.txt | 49 +- .../debugger/async-stack-for-promise.js | 27 +- .../async-stack-load-more-expected.txt | 42 + .../debugger/async-stack-load-more.js | 44 + .../debugger/change-return-value-expected.txt | 35 + .../inspector/debugger/change-return-value.js | 68 + .../collect-obsolete-async-tasks-expected.txt | 18 +- .../debugger/collect-obsolete-async-tasks.js | 2 +- ...collect-old-async-call-chains-expected.txt | 26 +- .../debugger/collect-old-async-call-chains.js | 13 +- .../external-stack-trace-expected.txt | 42 + .../debugger/external-stack-trace.js | 170 + .../max-async-call-chain-depth-expected.txt | 2 +- .../debugger/pause-on-async-call-expected.txt | 207 + .../inspector/debugger/pause-on-async-call.js | 183 + .../promise-chain-when-limit-hit-expected.txt | 395 +- .../debugger/promise-chain-when-limit-hit.js | 13 +- ...e-step-into-async-set-timeout-expected.txt | 3 +- .../set-breakpoint-at-last-line-expected.txt | 16 + .../debugger/set-breakpoint-at-last-line.js | 28 + ...step-into-break-on-async-call-expected.txt | 13 + .../debugger/step-into-break-on-async-call.js | 61 + ...step-into-external-async-task-expected.txt | 14 + .../debugger/step-into-external-async-task.js | 107 + .../this-in-arrow-function-expected.txt | 106 + .../debugger/this-in-arrow-function.js | 54 + .../sampling-heap-profiler-expected.txt | 7 + .../heap-profiler/sampling-heap-profiler.js | 48 + deps/v8/test/inspector/inspector-test.cc | 104 +- deps/v8/test/inspector/isolate-data.cc | 59 +- deps/v8/test/inspector/isolate-data.h | 18 +- deps/v8/test/inspector/protocol-test.js | 7 +- .../runtime/await-promise-expected.txt | 62 - .../console-time-end-format-expected.txt | 8 + .../runtime/console-time-end-format.js | 52 +- .../runtime/create-context-expected.txt | 1 + ...e-get-properties-and-accessor-expected.txt | 33 + .../runtime-get-properties-and-accessor.js | 29 + deps/v8/test/inspector/testcfg.py | 20 +- .../type-profile-start-stop-expected.txt | 2 + .../type-profiler/type-profile-start-stop.js | 10 +- deps/v8/test/intl/date-format/invalid-time.js | 20 + .../intl/number-format/format-currency.js | 2 +- deps/v8/test/intl/testcfg.py | 11 +- .../test/js-perf-test/Collections/common.js | 49 +- deps/v8/test/js-perf-test/Collections/map.js | 116 +- deps/v8/test/js-perf-test/Collections/run.js | 1 + deps/v8/test/js-perf-test/Collections/set.js | 76 + .../test/js-perf-test/Collections/weakmap.js | 36 + .../test/js-perf-test/Collections/weakset.js | 9 + .../test/js-perf-test/ExpressionDepth/run.js | 38 +- .../test/js-perf-test/Inspector/debugger.js | 19 + deps/v8/test/js-perf-test/JSTests.json | 12 +- deps/v8/test/js-perf-test/SixSpeed.json | 8 +- deps/v8/test/message/console.out | 15 - .../{ => fail}/arrow-bare-rest-param.js | 0 .../{ => fail}/arrow-bare-rest-param.out | 0 .../{ => fail}/arrow-formal-parameters.js | 0 .../{ => fail}/arrow-formal-parameters.out | 0 .../{ => fail}/arrow-invalid-rest-2.js | 0 .../{ => fail}/arrow-invalid-rest-2.out | 0 .../message/{ => fail}/arrow-invalid-rest.js | 0 .../message/{ => fail}/arrow-invalid-rest.out | 0 .../test/message/{ => fail}/arrow-missing.js | 0 .../test/message/{ => fail}/arrow-missing.out | 0 .../{ => fail}/arrow-param-after-rest-2.js | 0 .../{ => fail}/arrow-param-after-rest-2.out | 0 .../{ => fail}/arrow-param-after-rest.js | 0 .../{ => fail}/arrow-param-after-rest.out | 0 .../arrow-strict-eval-bare-parameter.js | 0 .../arrow-strict-eval-bare-parameter.out | 0 .../{ => fail}/arrow-two-rest-params.js | 0 .../{ => fail}/arrow-two-rest-params.out | 0 .../{ => fail}/async-arrow-invalid-rest-2.js | 0 .../{ => fail}/async-arrow-invalid-rest-2.out | 0 .../{ => fail}/async-arrow-invalid-rest.js | 0 .../{ => fail}/async-arrow-invalid-rest.out | 0 .../async-arrow-param-after-rest.js | 0 .../async-arrow-param-after-rest.out | 0 .../message/{ => fail}/await-non-async.js | 0 .../message/{ => fail}/await-non-async.out | 0 .../{ => fail}/call-non-constructable.js | 0 .../{ => fail}/call-non-constructable.out | 0 .../{ => fail}/call-primitive-constructor.js | 0 .../{ => fail}/call-primitive-constructor.out | 0 .../{ => fail}/call-primitive-function.js | 0 .../{ => fail}/call-primitive-function.out | 0 .../{ => fail}/call-undeclared-constructor.js | 0 .../call-undeclared-constructor.out | 0 .../{ => fail}/call-undeclared-function.js | 0 .../{ => fail}/call-undeclared-function.out | 0 .../{ => fail}/class-constructor-accessor.js | 0 .../{ => fail}/class-constructor-accessor.out | 0 .../{ => fail}/class-constructor-generator.js | 0 .../class-constructor-generator.out | 0 .../message/fail/class-field-constructor.js | 9 + .../message/fail/class-field-constructor.out | 4 + .../fail/class-field-static-constructor.js | 9 + .../fail/class-field-static-constructor.out | 4 + .../fail/class-field-static-prototype.js | 9 + .../fail/class-field-static-prototype.out | 4 + .../{ => fail}/class-spread-property.js | 0 .../{ => fail}/class-spread-property.out | 0 deps/v8/test/message/{ => fail}/console.js | 1 - deps/v8/test/message/fail/console.out | 15 + .../{ => fail}/const-decl-no-init-sloppy.out | 0 .../message/{ => fail}/const-decl-no-init.js | 0 .../message/{ => fail}/const-decl-no-init.out | 0 .../message/{ => fail}/const-decl-no-init2.js | 0 .../{ => fail}/const-decl-no-init2.out | 0 .../{ => fail}/default-parameter-tdz-arrow.js | 0 .../default-parameter-tdz-arrow.out | 0 .../{ => fail}/default-parameter-tdz.js | 0 .../{ => fail}/default-parameter-tdz.out | 0 ...destructuring-array-non-iterable-number.js | 0 ...estructuring-array-non-iterable-number.out | 0 ...ray-non-iterable-object-literal-complex.js | 0 ...ay-non-iterable-object-literal-complex.out | 0 ...uring-array-non-iterable-object-literal.js | 0 ...ring-array-non-iterable-object-literal.out | 0 ...destructuring-array-non-iterable-object.js | 0 ...estructuring-array-non-iterable-object.out | 0 ...tructuring-array-non-iterable-undefined.js | 0 ...ructuring-array-non-iterable-undefined.out | 0 .../destructuring-decl-no-init-array.js | 0 .../destructuring-decl-no-init-array.out | 0 .../destructuring-decl-no-init-array2.js | 0 .../destructuring-decl-no-init-array2.out | 0 .../destructuring-decl-no-init-obj.js | 0 .../destructuring-decl-no-init-obj.out | 0 .../destructuring-decl-no-init-obj2.js | 0 .../destructuring-decl-no-init-obj2.out | 0 .../destructuring-function-non-iterable.js | 0 .../destructuring-function-non-iterable.out | 0 .../{ => fail}/destructuring-modify-const.js | 0 .../{ => fail}/destructuring-modify-const.out | 0 ...destructuring-new-callable-non-iterable.js | 0 ...estructuring-new-callable-non-iterable.out | 0 ...destructuring-non-function-non-iterable.js | 0 ...estructuring-non-function-non-iterable.out | 0 ...structuring-undefined-computed-property.js | 0 ...tructuring-undefined-computed-property.out | 0 ...destructuring-undefined-number-property.js | 0 ...estructuring-undefined-number-property.out | 0 ...destructuring-undefined-string-property.js | 0 ...estructuring-undefined-string-property.out | 0 .../dynamic-import-missing-specifier.js} | 8 +- .../fail/dynamic-import-missing-specifier.out | 4 + .../message/{ => fail}/export-duplicate-as.js | 0 .../{ => fail}/export-duplicate-as.out | 0 .../{ => fail}/export-duplicate-default.js | 0 .../{ => fail}/export-duplicate-default.out | 0 .../message/{ => fail}/export-duplicate.js | 0 .../message/{ => fail}/export-duplicate.out | 0 .../for-in-let-loop-initializers-strict.js | 0 .../for-in-let-loop-initializers-strict.out | 0 .../for-in-loop-initializers-destructuring.js | 0 ...for-in-loop-initializers-destructuring.out | 0 .../for-in-loop-initializers-strict.js | 0 .../for-in-loop-initializers-strict.out | 0 .../{ => fail}/for-loop-invalid-lhs.js | 0 .../{ => fail}/for-loop-invalid-lhs.out | 0 .../for-of-let-loop-initializers.js | 0 .../for-of-let-loop-initializers.out | 0 .../for-of-loop-initializers-sloppy.js | 0 .../for-of-loop-initializers-sloppy.out | 0 .../for-of-loop-initializers-strict.js | 0 .../for-of-loop-initializers-strict.out | 0 .../message/{ => fail}/for-of-non-iterable.js | 0 .../{ => fail}/for-of-non-iterable.out | 0 .../{ => fail}/for-of-throw-in-body.js | 0 .../{ => fail}/for-of-throw-in-body.out | 0 .../{ => fail}/formal-parameters-bad-rest.js | 0 .../{ => fail}/formal-parameters-bad-rest.out | 0 .../formal-parameters-strict-body.js | 0 .../formal-parameters-strict-body.out | 0 .../formal-parameters-trailing-comma.js | 0 .../formal-parameters-trailing-comma.out | 0 .../fail/func-name-inferrer-arg-1.js} | 8 +- .../message/fail/func-name-inferrer-arg-1.out | 8 + .../message/fail/func-name-inferrer-arg.js | 10 + .../message/fail/func-name-inferrer-arg.out | 7 + .../{ => fail}/function-param-after-rest.js | 0 .../{ => fail}/function-param-after-rest.out | 0 .../{ => fail}/function-sent-escaped.js | 0 .../{ => fail}/function-sent-escaped.out | 0 .../message/{ => fail}/generators-throw1.js | 0 .../message/{ => fail}/generators-throw1.out | 0 .../message/{ => fail}/generators-throw2.js | 0 .../message/{ => fail}/generators-throw2.out | 0 .../get-iterator-return-non-receiver.js | 0 .../get-iterator-return-non-receiver.out | 0 .../test/message/{ => fail}/get-iterator1.js | 0 .../test/message/{ => fail}/get-iterator1.out | 0 .../test/message/{ => fail}/import-as-eval.js | 0 .../message/{ => fail}/import-as-eval.out | 0 .../{ => fail}/import-as-redeclaration.js | 0 .../{ => fail}/import-as-redeclaration.out | 0 .../{ => fail}/import-as-reserved-word.js | 0 .../{ => fail}/import-as-reserved-word.out | 0 .../v8/test/message/{ => fail}/import-eval.js | 0 .../test/message/{ => fail}/import-eval.out | 0 .../{ => fail}/import-redeclaration.js | 0 .../{ => fail}/import-redeclaration.out | 0 .../{ => fail}/import-reserved-word.js | 0 .../{ => fail}/import-reserved-word.out | 0 .../{ => fail}/instanceof-noncallable.js | 0 .../{ => fail}/instanceof-noncallable.out | 0 .../{ => fail}/instanceof-nonobject.js | 0 .../{ => fail}/instanceof-nonobject.out | 0 .../message/{ => fail}/invalid-spread-2.js | 0 .../message/{ => fail}/invalid-spread-2.out | 0 .../test/message/{ => fail}/invalid-spread.js | 0 .../message/{ => fail}/invalid-spread.out | 0 deps/v8/test/message/{ => fail}/isvar.js | 0 deps/v8/test/message/{ => fail}/isvar.out | 0 ...destructuring-brace-in-single-statement.js | 0 ...estructuring-brace-in-single-statement.out | 0 ...ation-destructuring-in-single-statement.js | 0 ...tion-destructuring-in-single-statement.out | 0 ...lexical-declaration-in-single-statement.js | 0 ...exical-declaration-in-single-statement.out | 0 .../let-lexical-name-in-array-prohibited.js | 0 .../let-lexical-name-in-array-prohibited.out | 0 .../let-lexical-name-in-object-prohibited.js | 0 .../let-lexical-name-in-object-prohibited.out | 0 .../{ => fail}/let-lexical-name-prohibited.js | 0 .../let-lexical-name-prohibited.out | 0 .../test/message/{ => fail}/modules-cycle1.js | 0 .../message/{ => fail}/modules-cycle1.out | 0 .../test/message/{ => fail}/modules-cycle2.js | 0 .../message/{ => fail}/modules-cycle2.out | 0 .../test/message/{ => fail}/modules-cycle3.js | 0 .../message/{ => fail}/modules-cycle3.out | 0 .../test/message/{ => fail}/modules-cycle4.js | 0 .../message/{ => fail}/modules-cycle4.out | 0 .../test/message/{ => fail}/modules-cycle5.js | 0 .../message/{ => fail}/modules-cycle5.out | 0 .../test/message/{ => fail}/modules-cycle6.js | 0 .../message/{ => fail}/modules-cycle6.out | 0 .../{ => fail}/modules-duplicate-export1.js | 0 .../{ => fail}/modules-duplicate-export1.out | 0 .../{ => fail}/modules-duplicate-export2.js | 0 .../{ => fail}/modules-duplicate-export2.out | 0 .../{ => fail}/modules-duplicate-export3.js | 0 .../{ => fail}/modules-duplicate-export3.out | 0 .../{ => fail}/modules-duplicate-export4.js | 0 .../{ => fail}/modules-duplicate-export4.out | 0 .../{ => fail}/modules-import-redeclare1.js | 0 .../{ => fail}/modules-import-redeclare1.out | 0 .../{ => fail}/modules-import-redeclare2.js | 0 .../{ => fail}/modules-import-redeclare2.out | 0 .../{ => fail}/modules-import-redeclare3.js | 0 .../{ => fail}/modules-import-redeclare3.out | 0 .../message/{ => fail}/modules-import1.js | 0 .../message/{ => fail}/modules-import1.out | 0 .../message/{ => fail}/modules-import2.js | 0 .../message/{ => fail}/modules-import2.out | 0 .../message/{ => fail}/modules-import3.js | 0 .../message/{ => fail}/modules-import3.out | 0 .../message/{ => fail}/modules-import4.js | 0 .../message/{ => fail}/modules-import4.out | 0 .../message/{ => fail}/modules-import5.js | 0 .../message/{ => fail}/modules-import5.out | 0 .../message/{ => fail}/modules-import6.js | 0 .../message/{ => fail}/modules-import6.out | 0 .../message/{ => fail}/modules-skip-cycle2.js | 0 .../message/{ => fail}/modules-skip-cycle3.js | 0 .../message/{ => fail}/modules-skip-cycle5.js | 0 .../message/{ => fail}/modules-skip-cycle6.js | 0 .../{ => fail}/modules-star-conflict1.js | 2 +- .../{ => fail}/modules-star-conflict1.out | 2 +- .../{ => fail}/modules-star-conflict2.js | 4 +- .../{ => fail}/modules-star-conflict2.out | 2 +- .../{ => fail}/modules-star-default.js | 0 .../{ => fail}/modules-star-default.out | 0 .../{ => fail}/modules-undefined-export1.js | 0 .../{ => fail}/modules-undefined-export1.out | 0 .../{ => fail}/modules-undefined-export2.js | 0 .../{ => fail}/modules-undefined-export2.out | 0 .../{ => fail}/new-target-assignment.js | 0 .../{ => fail}/new-target-assignment.out | 0 .../message/{ => fail}/new-target-escaped.js | 0 .../message/{ => fail}/new-target-escaped.out | 0 .../message/{ => fail}/new-target-for-loop.js | 0 .../{ => fail}/new-target-for-loop.out | 0 .../{ => fail}/new-target-postfix-op.js | 0 .../{ => fail}/new-target-postfix-op.out | 0 .../{ => fail}/new-target-prefix-op.js | 0 .../{ => fail}/new-target-prefix-op.out | 0 .../{ => fail}/nf-yield-in-generator.js | 0 .../{ => fail}/nf-yield-in-generator.out | 0 .../nf-yield-strict-in-generator.js | 0 .../nf-yield-strict-in-generator.out | 0 .../message/{ => fail}/nf-yield-strict.js | 0 .../message/{ => fail}/nf-yield-strict.out | 0 .../message/{ => fail}/nfe-yield-generator.js | 0 .../{ => fail}/nfe-yield-generator.out | 0 .../message/{ => fail}/nfe-yield-strict.js | 0 .../message/{ => fail}/nfe-yield-strict.out | 0 .../test/message/{ => fail}/non-alphanum.js | 0 .../test/message/{ => fail}/non-alphanum.out | 4 +- .../object-rest-assignment-pattern.js | 0 .../object-rest-assignment-pattern.out | 0 .../{ => fail}/object-rest-binding-pattern.js | 0 .../object-rest-binding-pattern.out | 0 .../{ => fail}/overwritten-builtins.js | 0 .../{ => fail}/overwritten-builtins.out | 0 .../message/{ => fail}/paren_in_arg_string.js | 0 .../{ => fail}/paren_in_arg_string.out | 0 .../test/message/{ => fail}/redeclaration1.js | 0 .../message/{ => fail}/redeclaration1.out | 0 .../test/message/{ => fail}/redeclaration2.js | 0 .../message/{ => fail}/redeclaration2.out | 0 .../test/message/{ => fail}/redeclaration3.js | 0 .../message/{ => fail}/redeclaration3.out | 0 .../replacement-marker-as-argument.js | 0 .../replacement-marker-as-argument.out | 0 .../rest-param-class-setter-strict.js | 0 .../rest-param-class-setter-strict.out | 0 .../rest-param-object-setter-sloppy.js | 0 .../rest-param-object-setter-sloppy.out | 0 .../rest-param-object-setter-strict.js | 0 .../rest-param-object-setter-strict.out | 0 deps/v8/test/message/{ => fail}/settimeout.js | 0 .../v8/test/message/{ => fail}/settimeout.out | 0 .../test/message/{ => fail}/simple-throw.js | 0 .../test/message/{ => fail}/simple-throw.out | 0 .../{ => fail}/strict-formal-parameters.js | 0 .../{ => fail}/strict-formal-parameters.out | 0 .../message/{ => fail}/strict-octal-number.js | 0 .../{ => fail}/strict-octal-number.out | 0 .../message/{ => fail}/strict-octal-string.js | 0 .../{ => fail}/strict-octal-string.out | 0 .../strict-octal-use-strict-after.js | 0 .../strict-octal-use-strict-after.out | 0 .../strict-octal-use-strict-before.js | 0 .../strict-octal-use-strict-before.out | 0 .../v8/test/message/{ => fail}/strict-with.js | 0 .../test/message/{ => fail}/strict-with.out | 0 .../super-constructor-extra-statement.js | 0 .../super-constructor-extra-statement.out | 0 .../message/{ => fail}/super-constructor.js | 0 .../message/{ => fail}/super-constructor.out | 0 .../message/{ => fail}/super-in-function.js | 0 .../message/{ => fail}/super-in-function.out | 0 .../message/{ => fail}/tonumber-symbol.js | 0 .../message/{ => fail}/tonumber-symbol.out | 0 ...atch-finally-throw-in-catch-and-finally.js | 0 ...tch-finally-throw-in-catch-and-finally.out | 0 .../try-catch-finally-throw-in-catch.js | 0 .../try-catch-finally-throw-in-catch.out | 0 .../try-catch-finally-throw-in-finally.js | 0 .../try-catch-finally-throw-in-finally.out | 0 .../{ => fail}/try-catch-lexical-conflict.js | 0 .../{ => fail}/try-catch-lexical-conflict.out | 0 .../{ => fail}/try-catch-variable-conflict.js | 0 .../try-catch-variable-conflict.out | 0 .../try-finally-throw-in-finally.js | 0 .../try-finally-throw-in-finally.out | 0 .../try-finally-throw-in-try-and-finally.js | 0 .../try-finally-throw-in-try-and-finally.out | 0 .../{ => fail}/try-finally-throw-in-try.js | 0 .../{ => fail}/try-finally-throw-in-try.out | 0 deps/v8/test/message/{ => fail}/typedarray.js | 0 .../v8/test/message/{ => fail}/typedarray.out | 0 .../{ => fail}/undefined-keyed-property.js | 0 .../{ => fail}/undefined-keyed-property.out | 0 .../{ => fail}/unicode-escape-invalid-2.js | 0 .../{ => fail}/unicode-escape-invalid-2.out | 0 .../{ => fail}/unicode-escape-invalid.js | 0 .../{ => fail}/unicode-escape-invalid.out | 0 .../{ => fail}/unicode-escape-undefined.js | 0 .../{ => fail}/unicode-escape-undefined.out | 0 .../{ => fail}/unterminated-arg-list.js | 0 .../{ => fail}/unterminated-arg-list.out | 0 .../{ => fail}/var-conflict-in-with.js | 0 .../{ => fail}/var-conflict-in-with.out | 0 .../message/{ => fail}/wasm-function-name.js | 0 .../message/{ => fail}/wasm-function-name.out | 0 .../wasm-module-and-function-name.js | 0 .../wasm-module-and-function-name.out | 0 .../message/{ => fail}/wasm-module-name.js | 0 .../message/{ => fail}/wasm-module-name.out | 0 .../test/message/{ => fail}/wasm-no-name.js | 0 .../test/message/{ => fail}/wasm-no-name.out | 0 deps/v8/test/message/{ => fail}/wasm-trap.js | 0 deps/v8/test/message/{ => fail}/wasm-trap.out | 0 .../{ => fail}/yield-in-arrow-param.js | 0 .../{ => fail}/yield-in-arrow-param.out | 0 .../{ => fail}/yield-in-generator-param.js | 0 .../{ => fail}/yield-in-generator-param.out | 0 deps/v8/test/message/message.status | 8 +- .../regress/{ => fail}/regress-1527.js | 0 .../regress/{ => fail}/regress-1527.out | 0 .../regress/{ => fail}/regress-3995.js | 0 .../regress/{ => fail}/regress-3995.out | 0 .../regress/{ => fail}/regress-4266.js | 0 .../regress/{ => fail}/regress-4266.out | 0 .../regress/{ => fail}/regress-5727.js | 0 .../regress/{ => fail}/regress-5727.out | 0 .../message/regress/{ => fail}/regress-73.js | 12 +- .../message/regress/{ => fail}/regress-73.out | 0 .../message/regress/{ => fail}/regress-75.js | 0 .../message/regress/{ => fail}/regress-75.out | 0 .../{ => fail}/regress-crbug-661579.js | 0 .../{ => fail}/regress-crbug-661579.out | 0 .../{ => fail}/regress-crbug-669017.js | 0 .../{ => fail}/regress-crbug-669017.out | 0 .../{ => fail}/regress-crbug-691194.js | 0 .../{ => fail}/regress-crbug-691194.out | 0 .../test/message/regress/regress-4829-1.out | 8 - .../v8/test/message/regress/regress-4829-2.js | 9 - .../test/message/regress/regress-4829-2.out | 8 - deps/v8/test/message/testcfg.py | 31 +- deps/v8/test/mjsunit/array-lastindexof.js | 10 + deps/v8/test/mjsunit/array-sort.js | 4 + .../test/mjsunit/code-coverage-block-noopt.js | 4 +- .../test/mjsunit/code-coverage-block-opt.js | 3 +- deps/v8/test/mjsunit/code-coverage-block.js | 195 +- .../test/mjsunit/compiler-regress-787301.js | 26 + .../compiler/deopt-string-outofbounds.js | 24 + .../v8/test/mjsunit/compiler/function-bind.js | 209 + deps/v8/test/mjsunit/compiler/instanceof.js | 18 + deps/v8/test/mjsunit/compiler/math-ceil.js | 39 + deps/v8/test/mjsunit/compiler/math-round.js | 39 + deps/v8/test/mjsunit/compiler/math-trunc.js | 39 + .../test/mjsunit/compiler/nary-binary-ops.js | 150 + deps/v8/test/mjsunit/compiler/object-is.js | 31 + .../v8/test/mjsunit/compiler/osr-arguments.js | 17 + deps/v8/test/mjsunit/compiler/reflect-get.js | 68 + deps/v8/test/mjsunit/compiler/reflect-has.js | 67 + deps/v8/test/mjsunit/compiler/regress-7121.js | 10 + .../test/mjsunit/compiler/regress-772420.js | 28 + .../test/mjsunit/compiler/regress-772872.js | 13 + .../test/mjsunit/compiler/regress-773954.js | 21 + .../test/mjsunit/compiler/regress-788539.js | 37 + .../test/mjsunit/compiler/regress-791245.js | 17 + .../test/mjsunit/compiler/regress-799263.js | 29 + deps/v8/test/mjsunit/compiler/string-slice.js | 33 + .../type-speculative-safe-integer-add.js | 51 + deps/v8/test/mjsunit/console.js | 28 + .../class-computed-property-names-super.js | 92 + deps/v8/test/mjsunit/es6/classes.js | 139 + deps/v8/test/mjsunit/es6/completion.js | 7 + deps/v8/test/mjsunit/es6/regexp-sticky.js | 6 +- .../sloppy-no-duplicate-generators.js | 2 - deps/v8/test/mjsunit/es6/string-match.js | 5 +- deps/v8/test/mjsunit/es6/string-search.js | 5 +- deps/v8/test/mjsunit/es6/templates.js | 27 +- deps/v8/test/mjsunit/es6/typedarray.js | 11 + .../mjsunit/es6/unicode-character-ranges.js | 2 - .../mjsunit/es6/unicode-regexp-backrefs.js | 2 - .../mjsunit/es6/unicode-regexp-last-index.js | 2 - .../{harmony => es9}/object-rest-basic.js | 1 - .../{harmony => es9}/object-spread-basic.js | 2 - .../{harmony => es9}/regexp-lookbehind.js | 2 - .../{harmony => es9}/template-escapes.js | 2 - deps/v8/test/mjsunit/filter-element-kinds.js | 144 + deps/v8/test/mjsunit/function-call.js | 91 +- deps/v8/test/mjsunit/global-accessors.js | 10 +- .../mjsunit/harmony/array-sort-comparefn.js | 10 + deps/v8/test/mjsunit/harmony/bigint/add.js | 109 + deps/v8/test/mjsunit/harmony/bigint/and.js | 109 + .../test/mjsunit/harmony/bigint/as-int-n.js | 300 + .../harmony/{bigint.js => bigint/basics.js} | 358 +- .../mjsunit/harmony/bigint/comparisons.js | 525 ++ deps/v8/test/mjsunit/harmony/bigint/dec.js | 89 + deps/v8/test/mjsunit/harmony/bigint/div.js | 109 + deps/v8/test/mjsunit/harmony/bigint/inc.js | 89 + deps/v8/test/mjsunit/harmony/bigint/json.js | 81 + deps/v8/test/mjsunit/harmony/bigint/mod.js | 109 + deps/v8/test/mjsunit/harmony/bigint/mul.js | 109 + deps/v8/test/mjsunit/harmony/bigint/neg.js | 89 + deps/v8/test/mjsunit/harmony/bigint/not.js | 89 + deps/v8/test/mjsunit/harmony/bigint/or.js | 109 + .../mjsunit/harmony/bigint/regressions.js | 18 + deps/v8/test/mjsunit/harmony/bigint/sar.js | 113 + deps/v8/test/mjsunit/harmony/bigint/shl.js | 109 + deps/v8/test/mjsunit/harmony/bigint/sub.js | 109 + .../test/mjsunit/harmony/bigint/tonumber.js | 39 + .../mjsunit/harmony/bigint/too-big-literal.js | 14 + deps/v8/test/mjsunit/harmony/bigint/xor.js | 109 + .../mjsunit/harmony/harmony-string-pad-end.js | 11 + .../harmony/harmony-string-pad-start.js | 11 + .../mjsunit/harmony/modules-import-meta.js | 44 + .../modules-skip-export-import-meta.js | 7 + .../harmony/public-instance-class-fields.js | 676 +++ .../harmony/public-static-class-fields.js | 335 ++ .../mjsunit/harmony/regexp-named-captures.js | 2 +- .../mjsunit/harmony/regexp-property-binary.js | 7 +- .../mjsunit/harmony/regexp-property-lu-ui.js | 24 +- .../mjsunit/harmony/regexp-property-lu-ui0.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui1.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui2.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui3.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui4.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui5.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui6.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui7.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui8.js | 8 + .../mjsunit/harmony/regexp-property-lu-ui9.js | 8 + .../mjsunit/harmony/regress/regress-6100.js | 2 - .../sloppy-legacy-duplicate-generators.js | 60 - .../ignition/dynamic-global-inside-block.js | 11 + deps/v8/test/mjsunit/ignition/print-ast.js | 2 +- deps/v8/test/mjsunit/messages.js | 118 +- deps/v8/test/mjsunit/migrations.js | 4 - deps/v8/test/mjsunit/mjsunit.isolate | 1 + deps/v8/test/mjsunit/mjsunit.js | 22 +- deps/v8/test/mjsunit/mjsunit.status | 92 +- ...bject-literal-modified-object-prototype.js | 25 + deps/v8/test/mjsunit/object-literal.js | 452 +- deps/v8/test/mjsunit/optimized-filter.js | 440 ++ deps/v8/test/mjsunit/optimized-map.js | 61 + .../regexp-modifiers-autogenerated-i18n.js | 81 + .../mjsunit/regexp-modifiers-autogenerated.js | 74 + .../test/mjsunit/regexp-modifiers-dotall.js | 27 + deps/v8/test/mjsunit/regexp-modifiers-i18n.js | 138 + deps/v8/test/mjsunit/regexp-modifiers.js | 146 + deps/v8/test/mjsunit/regress/regress-1257.js | 40 +- deps/v8/test/mjsunit/regress/regress-2618.js | 7 +- .../v8/test/mjsunit/regress/regress-353004.js | 27 +- deps/v8/test/mjsunit/regress/regress-5902.js | 11 +- .../v8/test/mjsunit/regress/regress-599717.js | 2 +- .../v8/test/mjsunit/regress/regress-678917.js | 5 +- deps/v8/test/mjsunit/regress/regress-6941.js | 20 + deps/v8/test/mjsunit/regress/regress-6948.js | 20 + deps/v8/test/mjsunit/regress/regress-6970.js | 6 + deps/v8/test/mjsunit/regress/regress-6989.js | 85 + deps/v8/test/mjsunit/regress/regress-6991.js | 17 + .../v8/test/mjsunit/regress/regress-7014-1.js | 26 + .../v8/test/mjsunit/regress/regress-7014-2.js | 30 + deps/v8/test/mjsunit/regress/regress-7026.js | 17 + .../v8/test/mjsunit/regress/regress-707187.js | 2 +- deps/v8/test/mjsunit/regress/regress-7115.js | 33 + deps/v8/test/mjsunit/regress/regress-7135.js | 17 + .../v8/test/mjsunit/regress/regress-752764.js | 5 +- .../v8/test/mjsunit/regress/regress-774824.js | 17 + .../v8/test/mjsunit/regress/regress-775888.js | 21 + .../v8/test/mjsunit/regress/regress-776309.js | 27 + .../v8/test/mjsunit/regress/regress-778574.js | 8 + .../v8/test/mjsunit/regress/regress-778668.js | 20 + .../v8/test/mjsunit/regress/regress-779407.js | 13 + .../v8/test/mjsunit/regress/regress-781218.js | 12 +- .../v8/test/mjsunit/regress/regress-782754.js | 18 + .../v8/test/mjsunit/regress/regress-783051.js | 10 + .../v8/test/mjsunit/regress/regress-783119.js | 10 + .../v8/test/mjsunit/regress/regress-784080.js | 26 + .../v8/test/mjsunit/regress/regress-784862.js | 10 + .../v8/test/mjsunit/regress/regress-784863.js | 11 + .../v8/test/mjsunit/regress/regress-784990.js | 30 + .../v8/test/mjsunit/regress/regress-785804.js | 19 + .../v8/test/mjsunit/regress/regress-786573.js | 16 + .../v8/test/mjsunit/regress/regress-791345.js | 15 + .../v8/test/mjsunit/regress/regress-793793.js | 7 + .../v8/test/mjsunit/regress/regress-794822.js | 19 + .../regress-794825.js} | 53 +- .../v8/test/mjsunit/regress/regress-799690.js | 21 + .../v8/test/mjsunit/regress/regress-799813.js | 42 + .../mjsunit/regress/regress-crbug-465564.js | 2 +- .../mjsunit/regress/regress-crbug-570241.js | 2 - .../mjsunit/regress/regress-crbug-747062.js | 16 + .../mjsunit/regress/regress-crbug-766635.js | 32 + .../mjsunit/regress/regress-crbug-768875.js | 28 + .../mjsunit/regress/regress-crbug-774459.js | 20 + .../mjsunit/regress/regress-crbug-774860.js | 15 + .../mjsunit/regress/regress-crbug-776511.js | 35 + .../mjsunit/regress/regress-crbug-778952.js | 9 + .../mjsunit/regress/regress-crbug-779344.js | 10 + .../mjsunit/regress/regress-crbug-779367.js | 17 + .../mjsunit/regress/regress-crbug-779457.js | 27 + .../mjsunit/regress/regress-crbug-781116-1.js | 23 + .../mjsunit/regress/regress-crbug-781116-2.js | 23 + .../mjsunit/regress/regress-crbug-781506-1.js | 12 + .../mjsunit/regress/regress-crbug-781506-2.js | 13 + .../mjsunit/regress/regress-crbug-781506-3.js | 13 + .../mjsunit/regress/regress-crbug-781583.js | 25 + .../mjsunit/regress/regress-crbug-783902.js | 11 + .../mjsunit/regress/regress-crbug-784835.js | 13 + .../mjsunit/regress/regress-crbug-786020.js | 8 + .../mjsunit/regress/regress-crbug-786723.js | 19 + .../mjsunit/regress/regress-crbug-791256.js | 12 + .../mjsunit/regress/regress-crbug-798026.js | 14 + .../mjsunit/regress/regress-crbug-801627.js | 24 + .../test/mjsunit/regress/regress-v8-6906.js | 15 + .../mjsunit/regress/string-compare-memcmp.js | 2 +- .../{regression-02256.js => regress-02256.js} | 0 ...regression-02256b.js => regress-02256b.js} | 0 .../{regression-02862.js => regress-02862.js} | 0 .../{regression-5531.js => regress-5531.js} | 0 .../{regression-5800.js => regress-5800.js} | 0 .../{regression-5884.js => regress-5884.js} | 0 .../{regression-6054.js => regress-6054.js} | 0 .../{regression-6164.js => regress-6164.js} | 0 ...regression-643595.js => regress-643595.js} | 0 ...regression-644682.js => regress-644682.js} | 0 ...regression-647649.js => regress-647649.js} | 0 ...regression-648079.js => regress-648079.js} | 0 ...regression-651961.js => regress-651961.js} | 0 ...regression-654377.js => regress-654377.js} | 0 ...regression-663994.js => regress-663994.js} | 0 ...regression-666741.js => regress-666741.js} | 0 ...regression-667745.js => regress-667745.js} | 0 ...regression-670683.js => regress-670683.js} | 0 ...regression-674447.js => regress-674447.js} | 0 ...regression-680938.js => regress-680938.js} | 0 ...regression-684858.js => regress-684858.js} | 0 ...regression-688876.js => regress-688876.js} | 0 ...regression-689450.js => regress-689450.js} | 0 .../test/mjsunit/regress/wasm/regress-6931.js | 30 + .../mjsunit/regress/wasm/regress-694433.js | 14 + ...regression-698587.js => regress-698587.js} | 0 ...regression-699485.js => regress-699485.js} | 0 ...regression-702460.js => regress-702460.js} | 0 ...regression-702839.js => regress-702839.js} | 0 .../test/mjsunit/regress/wasm/regress-7033.js | 20 + .../test/mjsunit/regress/wasm/regress-7035.js | 31 + ...regression-703568.js => regress-703568.js} | 0 .../test/mjsunit/regress/wasm/regress-7049.js | 54 + ...regression-708714.js => regress-708714.js} | 0 ...regression-710844.js => regress-710844.js} | 0 ...regression-711203.js => regress-711203.js} | 0 ...ression-715216-a.js => regress-715216a.js} | 0 ...ression-715216-b.js => regress-715216b.js} | 0 ...regression-717056.js => regress-717056.js} | 0 ...regression-717194.js => regress-717194.js} | 0 ...regression-719175.js => regress-719175.js} | 0 ...regression-722445.js => regress-722445.js} | 0 ...regression-724846.js => regress-724846.js} | 0 ...regression-724851.js => regress-724851.js} | 0 ...regression-724972.js => regress-724972.js} | 0 ...regression-727219.js => regress-727219.js} | 0 ...regression-727222.js => regress-727222.js} | 0 ...regression-727560.js => regress-727560.js} | 0 ...regression-729991.js => regress-729991.js} | 0 ...regression-731351.js => regress-731351.js} | 0 ...regression-734108.js => regress-734108.js} | 0 ...regression-734246.js => regress-734246.js} | 0 ...regression-734345.js => regress-734345.js} | 0 ...regression-736584.js => regress-736584.js} | 0 ...regression-737069.js => regress-737069.js} | 0 ...regression-739768.js => regress-739768.js} | 0 ...regression-753496.js => regress-753496.js} | 0 ...regression-757217.js => regress-757217.js} | 0 ...regression-763439.js => regress-763439.js} | 0 ...regression-763697.js => regress-763697.js} | 0 .../mjsunit/regress/wasm/regress-766003.js | 17 + ...regression-769846.js => regress-769846.js} | 0 .../mjsunit/regress/wasm/regress-771243.js | 39 + .../mjsunit/regress/wasm/regress-772332.js | 33 + .../mjsunit/regress/wasm/regress-775366.js | 29 + .../mjsunit/regress/wasm/regress-778917.js | 20 + .../mjsunit/regress/wasm/regress-782280.js | 33 + .../mjsunit/regress/wasm/regress-784050.js | 25 + .../mjsunit/regress/wasm/regress-789952.js | 40 + deps/v8/test/mjsunit/splice-proxy.js | 13 + deps/v8/test/mjsunit/string-equal.js | 17 + deps/v8/test/mjsunit/testcfg.py | 26 +- deps/v8/test/mjsunit/tools/csvparser.js | 27 +- deps/v8/test/mjsunit/tools/dumpcpp.js | 2 +- deps/v8/test/mjsunit/tools/profviz-test.log | 4966 ++++++++--------- deps/v8/test/mjsunit/tools/profviz.js | 2 +- .../tools/tickprocessor-test-func-info.log | 16 +- .../test/mjsunit/tools/tickprocessor-test.log | 22 +- deps/v8/test/mjsunit/tools/tickprocessor.js | 4 +- deps/v8/test/mjsunit/wasm/asm-wasm.js | 19 +- deps/v8/test/mjsunit/wasm/atomics.js | 16 +- .../mjsunit/wasm/default-liftoff-setting.js | 21 + deps/v8/test/mjsunit/wasm/disallow-codegen.js | 61 + deps/v8/test/mjsunit/wasm/ffi-error.js | 58 +- deps/v8/test/mjsunit/wasm/ffi.js | 15 + deps/v8/test/mjsunit/wasm/globals.js | 116 + deps/v8/test/mjsunit/wasm/indirect-tables.js | 105 +- deps/v8/test/mjsunit/wasm/interpreter.js | 95 + deps/v8/test/mjsunit/wasm/js-api.js | 18 + deps/v8/test/mjsunit/wasm/lazy-compilation.js | 63 + deps/v8/test/mjsunit/wasm/liftoff.js | 36 + .../test/mjsunit/wasm/memory-external-call.js | 189 + deps/v8/test/mjsunit/wasm/multi-value.js | 322 ++ deps/v8/test/mjsunit/wasm/table-grow.js | 4 +- .../wasm/test-import-export-wrapper.js | 25 + .../mjsunit/wasm/test-wasm-module-builder.js | 2 +- .../mjsunit/wasm/user-properties-common.js | 52 + .../wasm/user-properties-constructed.js | 26 + .../mjsunit/wasm/user-properties-exported.js | 34 + .../mjsunit/wasm/user-properties-module.js | 54 + .../mjsunit/wasm/user-properties-reexport.js | 31 + deps/v8/test/mjsunit/wasm/user-properties.js | 169 - deps/v8/test/mjsunit/wasm/wasm-constants.js | 8 +- deps/v8/test/mjsunit/wasm/worker-memory.js | 69 + deps/v8/test/mjsunit/whitespaces.js | 40 +- deps/v8/test/mjsunit/whitespaces0.js | 7 + deps/v8/test/mjsunit/whitespaces1.js | 7 + deps/v8/test/mjsunit/whitespaces2.js | 7 + deps/v8/test/mjsunit/whitespaces3.js | 7 + deps/v8/test/mjsunit/whitespaces4.js | 7 + deps/v8/test/mjsunit/whitespaces5.js | 7 + deps/v8/test/mjsunit/whitespaces6.js | 7 + deps/v8/test/mjsunit/whitespaces7.js | 7 + deps/v8/test/mjsunit/whitespaces8.js | 7 + deps/v8/test/mjsunit/whitespaces9.js | 7 + deps/v8/test/mkgrokdump/mkgrokdump.cc | 5 +- deps/v8/test/mkgrokdump/testcfg.py | 13 +- deps/v8/test/mozilla/mozilla.status | 19 +- deps/v8/test/mozilla/testcfg.py | 14 +- deps/v8/test/preparser/testcfg.py | 7 +- deps/v8/test/promises-aplus/testcfg.py | 80 +- deps/v8/test/test262/test262.status | 56 +- deps/v8/test/test262/testcfg.py | 66 +- deps/v8/test/unittests/BUILD.gn | 4 + .../test/unittests/api/v8-object-unittest.cc | 5 +- .../unittests/asmjs/asm-scanner-unittest.cc | 4 +- .../unittests/asmjs/asm-types-unittest.cc | 4 +- deps/v8/test/unittests/base/bits-unittest.cc | 109 +- .../unittests/base/functional-unittest.cc | 21 +- .../base/platform/platform-unittest.cc | 9 +- .../unittests/base/template-utils-unittest.cc | 57 + .../utils/random-number-generator-unittest.cc | 201 +- deps/v8/test/unittests/bigint-unittest.cc | 115 + .../compiler-dispatcher-tracer-unittest.cc | 34 +- .../compiler-dispatcher-unittest.cc | 278 +- .../optimizing-compile-dispatcher-unittest.cc | 15 +- .../unoptimized-compile-job-unittest.cc | 270 +- .../instruction-selector-arm64-unittest.cc | 8 +- .../compiler/bytecode-analysis-unittest.cc | 21 +- .../compiler/code-assembler-unittest.cc | 14 + .../dead-code-elimination-unittest.cc | 2 +- .../effect-control-linearizer-unittest.cc | 20 +- .../test/unittests/compiler/graph-unittest.cc | 6 +- .../js-intrinsic-lowering-unittest.cc | 4 +- .../compiler/js-operator-unittest.cc | 1 - .../compiler/js-typed-lowering-unittest.cc | 71 - .../compiler/machine-operator-unittest.cc | 16 +- deps/v8/test/unittests/compiler/mips/OWNERS | 5 +- deps/v8/test/unittests/compiler/mips64/OWNERS | 5 +- .../test/unittests/compiler/node-unittest.cc | 7 +- .../unittests/compiler/schedule-unittest.cc | 6 +- .../compiler/simplified-operator-unittest.cc | 16 +- .../compiler/typed-optimization-unittest.cc | 83 +- .../test/unittests/compiler/typer-unittest.cc | 21 +- .../value-numbering-reducer-unittest.cc | 2 + deps/v8/test/unittests/counters-unittest.cc | 294 +- deps/v8/test/unittests/heap/heap-unittest.cc | 2 +- .../bytecode-array-builder-unittest.cc | 136 +- .../bytecode-array-iterator-unittest.cc | 38 +- ...bytecode-array-random-iterator-unittest.cc | 120 +- .../bytecode-array-writer-unittest.cc | 6 + .../interpreter/bytecode-decoder-unittest.cc | 4 + .../unittests/interpreter/bytecode-utils.h | 1 - .../interpreter/bytecodes-unittest.cc | 106 +- .../constant-array-builder-unittest.cc | 93 +- .../interpreter-assembler-unittest.cc | 2 + .../interpreter-assembler-unittest.h | 2 + .../libplatform/default-platform-unittest.cc | 162 +- .../libplatform/task-queue-unittest.cc | 7 +- .../libplatform/worker-thread-unittest.cc | 16 +- deps/v8/test/unittests/object-unittest.cc | 59 +- .../unittests/parser/ast-value-unittest.cc | 51 + .../unittests/parser/preparser-unittest.cc | 12 +- deps/v8/test/unittests/run-all-unittests.cc | 15 +- .../source-position-table-unittest.cc | 22 +- deps/v8/test/unittests/test-helpers.cc | 11 - deps/v8/test/unittests/test-helpers.h | 1 - deps/v8/test/unittests/test-utils.cc | 37 +- deps/v8/test/unittests/test-utils.h | 58 +- deps/v8/test/unittests/unittests.gyp | 4 + deps/v8/test/unittests/unittests.status | 4 - deps/v8/test/unittests/utils-unittest.cc | 113 + .../unittests/value-serializer-unittest.cc | 118 +- .../test/unittests/wasm/decoder-unittest.cc | 110 +- .../wasm/function-body-decoder-unittest.cc | 244 +- .../unittests/wasm/leb-helper-unittest.cc | 26 +- .../unittests/wasm/module-decoder-unittest.cc | 45 +- .../wasm/streaming-decoder-unittest.cc | 11 + .../unittests/wasm/trap-handler-unittest.cc | 69 + .../test/unittests/wasm/wasm-heap-unittest.cc | 235 + deps/v8/test/wasm-spec-tests/testcfg.py | 8 +- .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 2 +- .../class-syntax-declaration-expected.txt | 6 +- .../test/webkit/class-syntax-declaration.js | 6 +- .../class-syntax-expression-expected.txt | 6 +- .../v8/test/webkit/class-syntax-expression.js | 6 +- .../array-prototype-properties-expected.txt | 18 +- .../fast/js/array-prototype-properties.js | 2 +- .../test/webkit/resources/JSON-stringify.js | 4 +- .../webkit/run-json-stringify-expected.txt | 4 +- deps/v8/test/webkit/testcfg.py | 16 +- deps/v8/test/webkit/webkit.status | 6 - deps/v8/third_party/colorama/LICENSE | 27 + deps/v8/third_party/colorama/README.v8 | 14 + .../CheckProtocolCompatibility.py | 2 +- .../inspector_protocol/CodeGenerator.py | 13 + .../third_party/inspector_protocol/README.v8 | 2 +- .../lib/DispatcherBase_cpp.template | 16 +- .../lib/DispatcherBase_h.template | 4 +- .../lib/ErrorSupport_cpp.template | 10 + .../lib/ErrorSupport_h.template | 2 + .../lib/Values_cpp.template | 46 +- .../inspector_protocol/lib/Values_h.template | 3 + .../templates/TypeBuilder_cpp.template | 16 +- .../templates/TypeBuilder_h.template | 13 +- deps/v8/tools/BUILD.gn | 6 +- deps/v8/tools/android-sync.sh | 1 + deps/v8/tools/arguments.js | 78 + deps/v8/tools/bigint-tester.py | 347 ++ deps/v8/tools/csvparser.js | 106 +- deps/v8/tools/dev/gm.py | 3 +- deps/v8/tools/dump-cpp.py | 4 +- .../tools/foozzie/testdata/failure_output.txt | 4 +- deps/v8/tools/foozzie/v8_foozzie.py | 10 +- deps/v8/tools/foozzie/v8_suppressions.py | 4 + deps/v8/tools/gcmole/download_gcmole_tools.py | 2 - deps/v8/tools/gcov.sh | 2 +- deps/v8/tools/gdb-v8-support.py | 52 + deps/v8/tools/gen-postmortem-metadata.py | 22 +- deps/v8/tools/grokdump.py | 67 +- deps/v8/tools/ic-explorer.html | 18 +- deps/v8/tools/ic-processor | 4 +- deps/v8/tools/ic-processor-driver.js | 2 +- deps/v8/tools/ic-processor.js | 102 +- deps/v8/tools/js2c.py | 3 + deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py | 2 - deps/v8/tools/linux-tick-processor | 4 +- deps/v8/tools/memory/asan/blacklist_win.txt | 4 + deps/v8/tools/parser-shell.cc | 5 +- deps/v8/tools/perf/statistics-for-json.R | 4 +- deps/v8/tools/plot-timer-events | 5 +- deps/v8/tools/presubmit.py | 34 +- deps/v8/tools/profview/profile-utils.js | 20 +- deps/v8/tools/profview/profview.js | 34 +- deps/v8/tools/profviz/profviz.js | 1 + deps/v8/tools/release/auto_roll.py | 11 +- deps/v8/tools/release/check_clusterfuzz.py | 3 +- deps/v8/tools/release/git_recipes.py | 5 +- deps/v8/tools/release/test_scripts.py | 3 +- .../release/testdata/node/deps/v8/.gitignore | 7 + .../testdata/node/deps/v8/baz/delete_me | 1 + .../release/testdata/node/deps/v8/baz/v8_foo | 1 + .../release/testdata/node/deps/v8/delete_me | 1 + .../node/deps/v8/include/v8-version.h | 20 + .../release/testdata/node/deps/v8/v8_foo | 1 + deps/v8/tools/release/update_node.py | 7 +- deps/v8/tools/run-deopt-fuzzer.py | 488 +- deps/v8/tools/run-gc-fuzzer.py | 14 + .../{run-valgrind.gyp => run-num-fuzzer.gyp} | 6 +- deps/v8/tools/run-num-fuzzer.isolate | 20 + deps/v8/tools/run-tests.py | 969 +--- deps/v8/tools/run-valgrind.isolate | 29 - deps/v8/tools/run-valgrind.py | 102 - deps/v8/tools/run_perf.py | 140 +- deps/v8/tools/test-server.py | 215 - deps/v8/tools/testrunner/README | 168 - deps/v8/tools/testrunner/base_runner.py | 438 ++ deps/v8/tools/testrunner/deopt_fuzzer.py | 381 ++ deps/v8/tools/testrunner/gc_fuzzer.py | 341 ++ deps/v8/tools/testrunner/local/commands.py | 20 + deps/v8/tools/testrunner/local/execution.py | 36 +- deps/v8/tools/testrunner/local/progress.py | 15 +- deps/v8/tools/testrunner/local/statusfile.py | 152 +- .../testrunner/local/statusfile_unittest.py | 26 +- deps/v8/tools/testrunner/local/testsuite.py | 281 +- .../testrunner/local/testsuite_unittest.py | 53 +- deps/v8/tools/testrunner/local/variants.py | 25 +- deps/v8/tools/testrunner/local/verbose.py | 24 +- deps/v8/tools/testrunner/network/__init__.py | 26 - deps/v8/tools/testrunner/network/distro.py | 90 - deps/v8/tools/testrunner/network/endpoint.py | 125 - .../testrunner/network/network_execution.py | 253 - deps/v8/tools/testrunner/objects/context.py | 15 - deps/v8/tools/testrunner/objects/output.py | 8 - deps/v8/tools/testrunner/objects/peer.py | 80 - deps/v8/tools/testrunner/objects/testcase.py | 51 +- .../v8/tools/testrunner/objects/workpacket.py | 90 - deps/v8/tools/testrunner/server/__init__.py | 26 - .../v8/tools/testrunner/server/compression.py | 111 - deps/v8/tools/testrunner/server/constants.py | 51 - deps/v8/tools/testrunner/server/daemon.py | 147 - .../tools/testrunner/server/local_handler.py | 119 - deps/v8/tools/testrunner/server/main.py | 245 - .../testrunner/server/presence_handler.py | 120 - deps/v8/tools/testrunner/server/signatures.py | 63 - .../tools/testrunner/server/status_handler.py | 112 - .../tools/testrunner/server/work_handler.py | 150 - deps/v8/tools/testrunner/standard_runner.py | 553 ++ deps/v8/tools/tick-processor.html | 14 +- deps/v8/tools/tickprocessor.js | 242 +- deps/v8/tools/try_perf.py | 1 - deps/v8/tools/unittests/run_perf_test.py | 16 +- deps/v8/tools/v8heapconst.py | 448 +- deps/v8/tools/whitespace.txt | 2 +- deps/v8/tools/windows-tick-processor.bat | 2 +- 2123 files changed, 93030 insertions(+), 80496 deletions(-) create mode 100644 deps/v8/.vpython create mode 100644 deps/v8/infra/testing/OWNERS create mode 100644 deps/v8/infra/testing/README.md create mode 100644 deps/v8/infra/testing/client.v8.pyl create mode 100644 deps/v8/infra/testing/tryserver.v8.pyl delete mode 100644 deps/v8/src/arm/codegen-arm.h delete mode 100644 deps/v8/src/arm64/codegen-arm64.h delete mode 100644 deps/v8/src/ast/ast-expression-rewriter.cc delete mode 100644 deps/v8/src/ast/ast-expression-rewriter.h create mode 100644 deps/v8/src/base/platform/OWNERS create mode 100644 deps/v8/src/builtins/builtins-math-gen.h create mode 100644 deps/v8/src/builtins/builtins-reflect-gen.cc create mode 100644 deps/v8/src/compiler/allocation-builder.h create mode 100644 deps/v8/src/heap/array-buffer-collector.cc create mode 100644 deps/v8/src/heap/array-buffer-collector.h create mode 100644 deps/v8/src/heap/sweeper.cc create mode 100644 deps/v8/src/heap/sweeper.h delete mode 100644 deps/v8/src/ia32/code-stubs-ia32.h delete mode 100644 deps/v8/src/ia32/codegen-ia32.h delete mode 100644 deps/v8/src/ic/access-compiler-data.h delete mode 100644 deps/v8/src/ic/access-compiler.cc delete mode 100644 deps/v8/src/ic/access-compiler.h delete mode 100644 deps/v8/src/ic/arm/access-compiler-arm.cc delete mode 100644 deps/v8/src/ic/arm/handler-compiler-arm.cc delete mode 100644 deps/v8/src/ic/arm64/access-compiler-arm64.cc delete mode 100644 deps/v8/src/ic/arm64/handler-compiler-arm64.cc delete mode 100644 deps/v8/src/ic/handler-compiler.cc delete mode 100644 deps/v8/src/ic/handler-compiler.h delete mode 100644 deps/v8/src/ic/ia32/access-compiler-ia32.cc delete mode 100644 deps/v8/src/ic/ia32/handler-compiler-ia32.cc delete mode 100644 deps/v8/src/ic/mips/OWNERS delete mode 100644 deps/v8/src/ic/mips/access-compiler-mips.cc delete mode 100644 deps/v8/src/ic/mips/handler-compiler-mips.cc delete mode 100644 deps/v8/src/ic/mips64/OWNERS delete mode 100644 deps/v8/src/ic/mips64/access-compiler-mips64.cc delete mode 100644 deps/v8/src/ic/mips64/handler-compiler-mips64.cc delete mode 100644 deps/v8/src/ic/ppc/OWNERS delete mode 100644 deps/v8/src/ic/ppc/access-compiler-ppc.cc delete mode 100644 deps/v8/src/ic/ppc/handler-compiler-ppc.cc delete mode 100644 deps/v8/src/ic/s390/OWNERS delete mode 100644 deps/v8/src/ic/s390/access-compiler-s390.cc delete mode 100644 deps/v8/src/ic/s390/handler-compiler-s390.cc delete mode 100644 deps/v8/src/ic/x64/access-compiler-x64.cc delete mode 100644 deps/v8/src/ic/x64/handler-compiler-x64.cc create mode 100644 deps/v8/src/inspector/js_protocol-1.3.json delete mode 100644 deps/v8/src/js/string.js delete mode 100644 deps/v8/src/js/weak-collection.js create mode 100644 deps/v8/src/libplatform/default-background-task-runner.cc create mode 100644 deps/v8/src/libplatform/default-background-task-runner.h create mode 100644 deps/v8/src/libplatform/default-foreground-task-runner.cc create mode 100644 deps/v8/src/libplatform/default-foreground-task-runner.h delete mode 100644 deps/v8/src/mips/codegen-mips.h delete mode 100644 deps/v8/src/mips64/codegen-mips64.h delete mode 100644 deps/v8/src/objects/bigint-inl.h create mode 100644 deps/v8/src/objects/code-inl.h create mode 100644 deps/v8/src/objects/code.h create mode 100644 deps/v8/src/objects/js-array-inl.h create mode 100644 deps/v8/src/objects/js-array.h create mode 100644 deps/v8/src/objects/js-regexp-inl.h create mode 100644 deps/v8/src/objects/js-regexp.h create mode 100644 deps/v8/src/objects/literal-objects-inl.h rename deps/v8/src/{ => parsing}/background-parsing-task.cc (72%) rename deps/v8/src/{ => parsing}/background-parsing-task.h (82%) delete mode 100644 deps/v8/src/ppc/codegen-ppc.h delete mode 100644 deps/v8/src/s390/codegen-s390.h create mode 100644 deps/v8/src/snapshot/builtin-deserializer-allocator.cc create mode 100644 deps/v8/src/snapshot/builtin-deserializer-allocator.h create mode 100644 deps/v8/src/snapshot/builtin-serializer-allocator.cc create mode 100644 deps/v8/src/snapshot/builtin-serializer-allocator.h create mode 100644 deps/v8/src/snapshot/builtin-snapshot-utils.cc create mode 100644 deps/v8/src/snapshot/builtin-snapshot-utils.h create mode 100644 deps/v8/src/snapshot/default-deserializer-allocator.cc create mode 100644 deps/v8/src/snapshot/default-deserializer-allocator.h create mode 100644 deps/v8/src/wasm/baseline/DEPS create mode 100644 deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm-defs.h create mode 100644 deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h create mode 100644 deps/v8/src/wasm/baseline/arm64/liftoff-assembler-arm64-defs.h create mode 100644 deps/v8/src/wasm/baseline/arm64/liftoff-assembler-arm64.h create mode 100644 deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-defs.h create mode 100644 deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h create mode 100644 deps/v8/src/wasm/baseline/liftoff-assembler.cc create mode 100644 deps/v8/src/wasm/baseline/liftoff-assembler.h create mode 100644 deps/v8/src/wasm/baseline/liftoff-compiler.cc create mode 100644 deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips-defs.h create mode 100644 deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h create mode 100644 deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64-defs.h create mode 100644 deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h create mode 100644 deps/v8/src/wasm/baseline/ppc/liftoff-assembler-ppc-defs.h create mode 100644 deps/v8/src/wasm/baseline/ppc/liftoff-assembler-ppc.h create mode 100644 deps/v8/src/wasm/baseline/s390/liftoff-assembler-s390-defs.h create mode 100644 deps/v8/src/wasm/baseline/s390/liftoff-assembler-s390.h create mode 100644 deps/v8/src/wasm/baseline/x64/liftoff-assembler-x64-defs.h create mode 100644 deps/v8/src/wasm/baseline/x64/liftoff-assembler-x64.h create mode 100644 deps/v8/src/wasm/wasm-code-wrapper.cc create mode 100644 deps/v8/src/wasm/wasm-code-wrapper.h create mode 100644 deps/v8/src/wasm/wasm-serialization.cc create mode 100644 deps/v8/src/wasm/wasm-serialization.h delete mode 100644 deps/v8/src/x64/code-stubs-x64.h delete mode 100644 deps/v8/src/x64/codegen-x64.h create mode 100644 deps/v8/test/cctest/assembler-helper-arm.cc create mode 100644 deps/v8/test/cctest/assembler-helper-arm.h create mode 100644 deps/v8/test/cctest/compiler/value-helper.cc delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/ClassFields.golden delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden delete mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden delete mode 100644 deps/v8/test/cctest/test-platform-linux.cc delete mode 100644 deps/v8/test/cctest/test-platform-win32.cc rename deps/v8/test/cctest/{test-simulator-arm.cc => test-sync-primitives-arm.cc} (82%) rename deps/v8/test/cctest/{test-simulator-arm64.cc => test-sync-primitives-arm64.cc} (85%) create mode 100644 deps/v8/test/cctest/wasm/test-wasm-codegen.cc create mode 100644 deps/v8/test/debugger/debug/debug-evaluate-arguments.js create mode 100644 deps/v8/test/inspector/debugger/async-stack-load-more-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-stack-load-more.js create mode 100644 deps/v8/test/inspector/debugger/change-return-value-expected.txt create mode 100644 deps/v8/test/inspector/debugger/change-return-value.js create mode 100644 deps/v8/test/inspector/debugger/external-stack-trace-expected.txt create mode 100644 deps/v8/test/inspector/debugger/external-stack-trace.js create mode 100644 deps/v8/test/inspector/debugger/pause-on-async-call-expected.txt create mode 100644 deps/v8/test/inspector/debugger/pause-on-async-call.js create mode 100644 deps/v8/test/inspector/debugger/set-breakpoint-at-last-line-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-breakpoint-at-last-line.js create mode 100644 deps/v8/test/inspector/debugger/step-into-break-on-async-call-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-into-break-on-async-call.js create mode 100644 deps/v8/test/inspector/debugger/step-into-external-async-task-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-into-external-async-task.js create mode 100644 deps/v8/test/inspector/debugger/this-in-arrow-function-expected.txt create mode 100644 deps/v8/test/inspector/debugger/this-in-arrow-function.js create mode 100644 deps/v8/test/inspector/heap-profiler/sampling-heap-profiler-expected.txt create mode 100644 deps/v8/test/inspector/heap-profiler/sampling-heap-profiler.js create mode 100644 deps/v8/test/inspector/runtime/runtime-get-properties-and-accessor-expected.txt create mode 100644 deps/v8/test/inspector/runtime/runtime-get-properties-and-accessor.js create mode 100644 deps/v8/test/intl/date-format/invalid-time.js delete mode 100644 deps/v8/test/message/console.out rename deps/v8/test/message/{ => fail}/arrow-bare-rest-param.js (100%) rename deps/v8/test/message/{ => fail}/arrow-bare-rest-param.out (100%) rename deps/v8/test/message/{ => fail}/arrow-formal-parameters.js (100%) rename deps/v8/test/message/{ => fail}/arrow-formal-parameters.out (100%) rename deps/v8/test/message/{ => fail}/arrow-invalid-rest-2.js (100%) rename deps/v8/test/message/{ => fail}/arrow-invalid-rest-2.out (100%) rename deps/v8/test/message/{ => fail}/arrow-invalid-rest.js (100%) rename deps/v8/test/message/{ => fail}/arrow-invalid-rest.out (100%) rename deps/v8/test/message/{ => fail}/arrow-missing.js (100%) rename deps/v8/test/message/{ => fail}/arrow-missing.out (100%) rename deps/v8/test/message/{ => fail}/arrow-param-after-rest-2.js (100%) rename deps/v8/test/message/{ => fail}/arrow-param-after-rest-2.out (100%) rename deps/v8/test/message/{ => fail}/arrow-param-after-rest.js (100%) rename deps/v8/test/message/{ => fail}/arrow-param-after-rest.out (100%) rename deps/v8/test/message/{ => fail}/arrow-strict-eval-bare-parameter.js (100%) rename deps/v8/test/message/{ => fail}/arrow-strict-eval-bare-parameter.out (100%) rename deps/v8/test/message/{ => fail}/arrow-two-rest-params.js (100%) rename deps/v8/test/message/{ => fail}/arrow-two-rest-params.out (100%) rename deps/v8/test/message/{ => fail}/async-arrow-invalid-rest-2.js (100%) rename deps/v8/test/message/{ => fail}/async-arrow-invalid-rest-2.out (100%) rename deps/v8/test/message/{ => fail}/async-arrow-invalid-rest.js (100%) rename deps/v8/test/message/{ => fail}/async-arrow-invalid-rest.out (100%) rename deps/v8/test/message/{ => fail}/async-arrow-param-after-rest.js (100%) rename deps/v8/test/message/{ => fail}/async-arrow-param-after-rest.out (100%) rename deps/v8/test/message/{ => fail}/await-non-async.js (100%) rename deps/v8/test/message/{ => fail}/await-non-async.out (100%) rename deps/v8/test/message/{ => fail}/call-non-constructable.js (100%) rename deps/v8/test/message/{ => fail}/call-non-constructable.out (100%) rename deps/v8/test/message/{ => fail}/call-primitive-constructor.js (100%) rename deps/v8/test/message/{ => fail}/call-primitive-constructor.out (100%) rename deps/v8/test/message/{ => fail}/call-primitive-function.js (100%) rename deps/v8/test/message/{ => fail}/call-primitive-function.out (100%) rename deps/v8/test/message/{ => fail}/call-undeclared-constructor.js (100%) rename deps/v8/test/message/{ => fail}/call-undeclared-constructor.out (100%) rename deps/v8/test/message/{ => fail}/call-undeclared-function.js (100%) rename deps/v8/test/message/{ => fail}/call-undeclared-function.out (100%) rename deps/v8/test/message/{ => fail}/class-constructor-accessor.js (100%) rename deps/v8/test/message/{ => fail}/class-constructor-accessor.out (100%) rename deps/v8/test/message/{ => fail}/class-constructor-generator.js (100%) rename deps/v8/test/message/{ => fail}/class-constructor-generator.out (100%) create mode 100644 deps/v8/test/message/fail/class-field-constructor.js create mode 100644 deps/v8/test/message/fail/class-field-constructor.out create mode 100644 deps/v8/test/message/fail/class-field-static-constructor.js create mode 100644 deps/v8/test/message/fail/class-field-static-constructor.out create mode 100644 deps/v8/test/message/fail/class-field-static-prototype.js create mode 100644 deps/v8/test/message/fail/class-field-static-prototype.out rename deps/v8/test/message/{ => fail}/class-spread-property.js (100%) rename deps/v8/test/message/{ => fail}/class-spread-property.out (100%) rename deps/v8/test/message/{ => fail}/console.js (96%) create mode 100644 deps/v8/test/message/fail/console.out rename deps/v8/test/message/{ => fail}/const-decl-no-init-sloppy.out (100%) rename deps/v8/test/message/{ => fail}/const-decl-no-init.js (100%) rename deps/v8/test/message/{ => fail}/const-decl-no-init.out (100%) rename deps/v8/test/message/{ => fail}/const-decl-no-init2.js (100%) rename deps/v8/test/message/{ => fail}/const-decl-no-init2.out (100%) rename deps/v8/test/message/{ => fail}/default-parameter-tdz-arrow.js (100%) rename deps/v8/test/message/{ => fail}/default-parameter-tdz-arrow.out (100%) rename deps/v8/test/message/{ => fail}/default-parameter-tdz.js (100%) rename deps/v8/test/message/{ => fail}/default-parameter-tdz.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-number.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-number.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-object-literal-complex.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-object-literal-complex.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-object-literal.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-object-literal.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-object.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-object.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-undefined.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-array-non-iterable-undefined.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-array.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-array.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-array2.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-array2.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-obj.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-obj.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-obj2.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-decl-no-init-obj2.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-function-non-iterable.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-function-non-iterable.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-modify-const.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-modify-const.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-new-callable-non-iterable.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-new-callable-non-iterable.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-non-function-non-iterable.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-non-function-non-iterable.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-undefined-computed-property.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-undefined-computed-property.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-undefined-number-property.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-undefined-number-property.out (100%) rename deps/v8/test/message/{ => fail}/destructuring-undefined-string-property.js (100%) rename deps/v8/test/message/{ => fail}/destructuring-undefined-string-property.out (100%) rename deps/v8/test/message/{regress/regress-4829-1.js => fail/dynamic-import-missing-specifier.js} (68%) create mode 100644 deps/v8/test/message/fail/dynamic-import-missing-specifier.out rename deps/v8/test/message/{ => fail}/export-duplicate-as.js (100%) rename deps/v8/test/message/{ => fail}/export-duplicate-as.out (100%) rename deps/v8/test/message/{ => fail}/export-duplicate-default.js (100%) rename deps/v8/test/message/{ => fail}/export-duplicate-default.out (100%) rename deps/v8/test/message/{ => fail}/export-duplicate.js (100%) rename deps/v8/test/message/{ => fail}/export-duplicate.out (100%) rename deps/v8/test/message/{ => fail}/for-in-let-loop-initializers-strict.js (100%) rename deps/v8/test/message/{ => fail}/for-in-let-loop-initializers-strict.out (100%) rename deps/v8/test/message/{ => fail}/for-in-loop-initializers-destructuring.js (100%) rename deps/v8/test/message/{ => fail}/for-in-loop-initializers-destructuring.out (100%) rename deps/v8/test/message/{ => fail}/for-in-loop-initializers-strict.js (100%) rename deps/v8/test/message/{ => fail}/for-in-loop-initializers-strict.out (100%) rename deps/v8/test/message/{ => fail}/for-loop-invalid-lhs.js (100%) rename deps/v8/test/message/{ => fail}/for-loop-invalid-lhs.out (100%) rename deps/v8/test/message/{ => fail}/for-of-let-loop-initializers.js (100%) rename deps/v8/test/message/{ => fail}/for-of-let-loop-initializers.out (100%) rename deps/v8/test/message/{ => fail}/for-of-loop-initializers-sloppy.js (100%) rename deps/v8/test/message/{ => fail}/for-of-loop-initializers-sloppy.out (100%) rename deps/v8/test/message/{ => fail}/for-of-loop-initializers-strict.js (100%) rename deps/v8/test/message/{ => fail}/for-of-loop-initializers-strict.out (100%) rename deps/v8/test/message/{ => fail}/for-of-non-iterable.js (100%) rename deps/v8/test/message/{ => fail}/for-of-non-iterable.out (100%) rename deps/v8/test/message/{ => fail}/for-of-throw-in-body.js (100%) rename deps/v8/test/message/{ => fail}/for-of-throw-in-body.out (100%) rename deps/v8/test/message/{ => fail}/formal-parameters-bad-rest.js (100%) rename deps/v8/test/message/{ => fail}/formal-parameters-bad-rest.out (100%) rename deps/v8/test/message/{ => fail}/formal-parameters-strict-body.js (100%) rename deps/v8/test/message/{ => fail}/formal-parameters-strict-body.out (100%) rename deps/v8/test/message/{ => fail}/formal-parameters-trailing-comma.js (100%) rename deps/v8/test/message/{ => fail}/formal-parameters-trailing-comma.out (100%) rename deps/v8/test/{mjsunit/regress/wasm/regression-694433.js => message/fail/func-name-inferrer-arg-1.js} (62%) create mode 100644 deps/v8/test/message/fail/func-name-inferrer-arg-1.out create mode 100644 deps/v8/test/message/fail/func-name-inferrer-arg.js create mode 100644 deps/v8/test/message/fail/func-name-inferrer-arg.out rename deps/v8/test/message/{ => fail}/function-param-after-rest.js (100%) rename deps/v8/test/message/{ => fail}/function-param-after-rest.out (100%) rename deps/v8/test/message/{ => fail}/function-sent-escaped.js (100%) rename deps/v8/test/message/{ => fail}/function-sent-escaped.out (100%) rename deps/v8/test/message/{ => fail}/generators-throw1.js (100%) rename deps/v8/test/message/{ => fail}/generators-throw1.out (100%) rename deps/v8/test/message/{ => fail}/generators-throw2.js (100%) rename deps/v8/test/message/{ => fail}/generators-throw2.out (100%) rename deps/v8/test/message/{ => fail}/get-iterator-return-non-receiver.js (100%) rename deps/v8/test/message/{ => fail}/get-iterator-return-non-receiver.out (100%) rename deps/v8/test/message/{ => fail}/get-iterator1.js (100%) rename deps/v8/test/message/{ => fail}/get-iterator1.out (100%) rename deps/v8/test/message/{ => fail}/import-as-eval.js (100%) rename deps/v8/test/message/{ => fail}/import-as-eval.out (100%) rename deps/v8/test/message/{ => fail}/import-as-redeclaration.js (100%) rename deps/v8/test/message/{ => fail}/import-as-redeclaration.out (100%) rename deps/v8/test/message/{ => fail}/import-as-reserved-word.js (100%) rename deps/v8/test/message/{ => fail}/import-as-reserved-word.out (100%) rename deps/v8/test/message/{ => fail}/import-eval.js (100%) rename deps/v8/test/message/{ => fail}/import-eval.out (100%) rename deps/v8/test/message/{ => fail}/import-redeclaration.js (100%) rename deps/v8/test/message/{ => fail}/import-redeclaration.out (100%) rename deps/v8/test/message/{ => fail}/import-reserved-word.js (100%) rename deps/v8/test/message/{ => fail}/import-reserved-word.out (100%) rename deps/v8/test/message/{ => fail}/instanceof-noncallable.js (100%) rename deps/v8/test/message/{ => fail}/instanceof-noncallable.out (100%) rename deps/v8/test/message/{ => fail}/instanceof-nonobject.js (100%) rename deps/v8/test/message/{ => fail}/instanceof-nonobject.out (100%) rename deps/v8/test/message/{ => fail}/invalid-spread-2.js (100%) rename deps/v8/test/message/{ => fail}/invalid-spread-2.out (100%) rename deps/v8/test/message/{ => fail}/invalid-spread.js (100%) rename deps/v8/test/message/{ => fail}/invalid-spread.out (100%) rename deps/v8/test/message/{ => fail}/isvar.js (100%) rename deps/v8/test/message/{ => fail}/isvar.out (100%) rename deps/v8/test/message/{ => fail}/let-lexical-declaration-destructuring-brace-in-single-statement.js (100%) rename deps/v8/test/message/{ => fail}/let-lexical-declaration-destructuring-brace-in-single-statement.out (100%) rename deps/v8/test/message/{ => fail}/let-lexical-declaration-destructuring-in-single-statement.js (100%) rename deps/v8/test/message/{ => fail}/let-lexical-declaration-destructuring-in-single-statement.out (100%) rename deps/v8/test/message/{ => fail}/let-lexical-declaration-in-single-statement.js (100%) rename deps/v8/test/message/{ => fail}/let-lexical-declaration-in-single-statement.out (100%) rename deps/v8/test/message/{ => fail}/let-lexical-name-in-array-prohibited.js (100%) rename deps/v8/test/message/{ => fail}/let-lexical-name-in-array-prohibited.out (100%) rename deps/v8/test/message/{ => fail}/let-lexical-name-in-object-prohibited.js (100%) rename deps/v8/test/message/{ => fail}/let-lexical-name-in-object-prohibited.out (100%) rename deps/v8/test/message/{ => fail}/let-lexical-name-prohibited.js (100%) rename deps/v8/test/message/{ => fail}/let-lexical-name-prohibited.out (100%) rename deps/v8/test/message/{ => fail}/modules-cycle1.js (100%) rename deps/v8/test/message/{ => fail}/modules-cycle1.out (100%) rename deps/v8/test/message/{ => fail}/modules-cycle2.js (100%) rename deps/v8/test/message/{ => fail}/modules-cycle2.out (100%) rename deps/v8/test/message/{ => fail}/modules-cycle3.js (100%) rename deps/v8/test/message/{ => fail}/modules-cycle3.out (100%) rename deps/v8/test/message/{ => fail}/modules-cycle4.js (100%) rename deps/v8/test/message/{ => fail}/modules-cycle4.out (100%) rename deps/v8/test/message/{ => fail}/modules-cycle5.js (100%) rename deps/v8/test/message/{ => fail}/modules-cycle5.out (100%) rename deps/v8/test/message/{ => fail}/modules-cycle6.js (100%) rename deps/v8/test/message/{ => fail}/modules-cycle6.out (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export1.js (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export1.out (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export2.js (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export2.out (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export3.js (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export3.out (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export4.js (100%) rename deps/v8/test/message/{ => fail}/modules-duplicate-export4.out (100%) rename deps/v8/test/message/{ => fail}/modules-import-redeclare1.js (100%) rename deps/v8/test/message/{ => fail}/modules-import-redeclare1.out (100%) rename deps/v8/test/message/{ => fail}/modules-import-redeclare2.js (100%) rename deps/v8/test/message/{ => fail}/modules-import-redeclare2.out (100%) rename deps/v8/test/message/{ => fail}/modules-import-redeclare3.js (100%) rename deps/v8/test/message/{ => fail}/modules-import-redeclare3.out (100%) rename deps/v8/test/message/{ => fail}/modules-import1.js (100%) rename deps/v8/test/message/{ => fail}/modules-import1.out (100%) rename deps/v8/test/message/{ => fail}/modules-import2.js (100%) rename deps/v8/test/message/{ => fail}/modules-import2.out (100%) rename deps/v8/test/message/{ => fail}/modules-import3.js (100%) rename deps/v8/test/message/{ => fail}/modules-import3.out (100%) rename deps/v8/test/message/{ => fail}/modules-import4.js (100%) rename deps/v8/test/message/{ => fail}/modules-import4.out (100%) rename deps/v8/test/message/{ => fail}/modules-import5.js (100%) rename deps/v8/test/message/{ => fail}/modules-import5.out (100%) rename deps/v8/test/message/{ => fail}/modules-import6.js (100%) rename deps/v8/test/message/{ => fail}/modules-import6.out (100%) rename deps/v8/test/message/{ => fail}/modules-skip-cycle2.js (100%) rename deps/v8/test/message/{ => fail}/modules-skip-cycle3.js (100%) rename deps/v8/test/message/{ => fail}/modules-skip-cycle5.js (100%) rename deps/v8/test/message/{ => fail}/modules-skip-cycle6.js (100%) rename deps/v8/test/message/{ => fail}/modules-star-conflict1.js (78%) rename deps/v8/test/message/{ => fail}/modules-star-conflict1.out (78%) rename deps/v8/test/message/{ => fail}/modules-star-conflict2.js (65%) rename deps/v8/test/message/{ => fail}/modules-star-conflict2.out (73%) rename deps/v8/test/message/{ => fail}/modules-star-default.js (100%) rename deps/v8/test/message/{ => fail}/modules-star-default.out (100%) rename deps/v8/test/message/{ => fail}/modules-undefined-export1.js (100%) rename deps/v8/test/message/{ => fail}/modules-undefined-export1.out (100%) rename deps/v8/test/message/{ => fail}/modules-undefined-export2.js (100%) rename deps/v8/test/message/{ => fail}/modules-undefined-export2.out (100%) rename deps/v8/test/message/{ => fail}/new-target-assignment.js (100%) rename deps/v8/test/message/{ => fail}/new-target-assignment.out (100%) rename deps/v8/test/message/{ => fail}/new-target-escaped.js (100%) rename deps/v8/test/message/{ => fail}/new-target-escaped.out (100%) rename deps/v8/test/message/{ => fail}/new-target-for-loop.js (100%) rename deps/v8/test/message/{ => fail}/new-target-for-loop.out (100%) rename deps/v8/test/message/{ => fail}/new-target-postfix-op.js (100%) rename deps/v8/test/message/{ => fail}/new-target-postfix-op.out (100%) rename deps/v8/test/message/{ => fail}/new-target-prefix-op.js (100%) rename deps/v8/test/message/{ => fail}/new-target-prefix-op.out (100%) rename deps/v8/test/message/{ => fail}/nf-yield-in-generator.js (100%) rename deps/v8/test/message/{ => fail}/nf-yield-in-generator.out (100%) rename deps/v8/test/message/{ => fail}/nf-yield-strict-in-generator.js (100%) rename deps/v8/test/message/{ => fail}/nf-yield-strict-in-generator.out (100%) rename deps/v8/test/message/{ => fail}/nf-yield-strict.js (100%) rename deps/v8/test/message/{ => fail}/nf-yield-strict.out (100%) rename deps/v8/test/message/{ => fail}/nfe-yield-generator.js (100%) rename deps/v8/test/message/{ => fail}/nfe-yield-generator.out (100%) rename deps/v8/test/message/{ => fail}/nfe-yield-strict.js (100%) rename deps/v8/test/message/{ => fail}/nfe-yield-strict.out (100%) rename deps/v8/test/message/{ => fail}/non-alphanum.js (100%) rename deps/v8/test/message/{ => fail}/non-alphanum.out (98%) rename deps/v8/test/message/{ => fail}/object-rest-assignment-pattern.js (100%) rename deps/v8/test/message/{ => fail}/object-rest-assignment-pattern.out (100%) rename deps/v8/test/message/{ => fail}/object-rest-binding-pattern.js (100%) rename deps/v8/test/message/{ => fail}/object-rest-binding-pattern.out (100%) rename deps/v8/test/message/{ => fail}/overwritten-builtins.js (100%) rename deps/v8/test/message/{ => fail}/overwritten-builtins.out (100%) rename deps/v8/test/message/{ => fail}/paren_in_arg_string.js (100%) rename deps/v8/test/message/{ => fail}/paren_in_arg_string.out (100%) rename deps/v8/test/message/{ => fail}/redeclaration1.js (100%) rename deps/v8/test/message/{ => fail}/redeclaration1.out (100%) rename deps/v8/test/message/{ => fail}/redeclaration2.js (100%) rename deps/v8/test/message/{ => fail}/redeclaration2.out (100%) rename deps/v8/test/message/{ => fail}/redeclaration3.js (100%) rename deps/v8/test/message/{ => fail}/redeclaration3.out (100%) rename deps/v8/test/message/{ => fail}/replacement-marker-as-argument.js (100%) rename deps/v8/test/message/{ => fail}/replacement-marker-as-argument.out (100%) rename deps/v8/test/message/{ => fail}/rest-param-class-setter-strict.js (100%) rename deps/v8/test/message/{ => fail}/rest-param-class-setter-strict.out (100%) rename deps/v8/test/message/{ => fail}/rest-param-object-setter-sloppy.js (100%) rename deps/v8/test/message/{ => fail}/rest-param-object-setter-sloppy.out (100%) rename deps/v8/test/message/{ => fail}/rest-param-object-setter-strict.js (100%) rename deps/v8/test/message/{ => fail}/rest-param-object-setter-strict.out (100%) rename deps/v8/test/message/{ => fail}/settimeout.js (100%) rename deps/v8/test/message/{ => fail}/settimeout.out (100%) rename deps/v8/test/message/{ => fail}/simple-throw.js (100%) rename deps/v8/test/message/{ => fail}/simple-throw.out (100%) rename deps/v8/test/message/{ => fail}/strict-formal-parameters.js (100%) rename deps/v8/test/message/{ => fail}/strict-formal-parameters.out (100%) rename deps/v8/test/message/{ => fail}/strict-octal-number.js (100%) rename deps/v8/test/message/{ => fail}/strict-octal-number.out (100%) rename deps/v8/test/message/{ => fail}/strict-octal-string.js (100%) rename deps/v8/test/message/{ => fail}/strict-octal-string.out (100%) rename deps/v8/test/message/{ => fail}/strict-octal-use-strict-after.js (100%) rename deps/v8/test/message/{ => fail}/strict-octal-use-strict-after.out (100%) rename deps/v8/test/message/{ => fail}/strict-octal-use-strict-before.js (100%) rename deps/v8/test/message/{ => fail}/strict-octal-use-strict-before.out (100%) rename deps/v8/test/message/{ => fail}/strict-with.js (100%) rename deps/v8/test/message/{ => fail}/strict-with.out (100%) rename deps/v8/test/message/{ => fail}/super-constructor-extra-statement.js (100%) rename deps/v8/test/message/{ => fail}/super-constructor-extra-statement.out (100%) rename deps/v8/test/message/{ => fail}/super-constructor.js (100%) rename deps/v8/test/message/{ => fail}/super-constructor.out (100%) rename deps/v8/test/message/{ => fail}/super-in-function.js (100%) rename deps/v8/test/message/{ => fail}/super-in-function.out (100%) rename deps/v8/test/message/{ => fail}/tonumber-symbol.js (100%) rename deps/v8/test/message/{ => fail}/tonumber-symbol.out (100%) rename deps/v8/test/message/{ => fail}/try-catch-finally-throw-in-catch-and-finally.js (100%) rename deps/v8/test/message/{ => fail}/try-catch-finally-throw-in-catch-and-finally.out (100%) rename deps/v8/test/message/{ => fail}/try-catch-finally-throw-in-catch.js (100%) rename deps/v8/test/message/{ => fail}/try-catch-finally-throw-in-catch.out (100%) rename deps/v8/test/message/{ => fail}/try-catch-finally-throw-in-finally.js (100%) rename deps/v8/test/message/{ => fail}/try-catch-finally-throw-in-finally.out (100%) rename deps/v8/test/message/{ => fail}/try-catch-lexical-conflict.js (100%) rename deps/v8/test/message/{ => fail}/try-catch-lexical-conflict.out (100%) rename deps/v8/test/message/{ => fail}/try-catch-variable-conflict.js (100%) rename deps/v8/test/message/{ => fail}/try-catch-variable-conflict.out (100%) rename deps/v8/test/message/{ => fail}/try-finally-throw-in-finally.js (100%) rename deps/v8/test/message/{ => fail}/try-finally-throw-in-finally.out (100%) rename deps/v8/test/message/{ => fail}/try-finally-throw-in-try-and-finally.js (100%) rename deps/v8/test/message/{ => fail}/try-finally-throw-in-try-and-finally.out (100%) rename deps/v8/test/message/{ => fail}/try-finally-throw-in-try.js (100%) rename deps/v8/test/message/{ => fail}/try-finally-throw-in-try.out (100%) rename deps/v8/test/message/{ => fail}/typedarray.js (100%) rename deps/v8/test/message/{ => fail}/typedarray.out (100%) rename deps/v8/test/message/{ => fail}/undefined-keyed-property.js (100%) rename deps/v8/test/message/{ => fail}/undefined-keyed-property.out (100%) rename deps/v8/test/message/{ => fail}/unicode-escape-invalid-2.js (100%) rename deps/v8/test/message/{ => fail}/unicode-escape-invalid-2.out (100%) rename deps/v8/test/message/{ => fail}/unicode-escape-invalid.js (100%) rename deps/v8/test/message/{ => fail}/unicode-escape-invalid.out (100%) rename deps/v8/test/message/{ => fail}/unicode-escape-undefined.js (100%) rename deps/v8/test/message/{ => fail}/unicode-escape-undefined.out (100%) rename deps/v8/test/message/{ => fail}/unterminated-arg-list.js (100%) rename deps/v8/test/message/{ => fail}/unterminated-arg-list.out (100%) rename deps/v8/test/message/{ => fail}/var-conflict-in-with.js (100%) rename deps/v8/test/message/{ => fail}/var-conflict-in-with.out (100%) rename deps/v8/test/message/{ => fail}/wasm-function-name.js (100%) rename deps/v8/test/message/{ => fail}/wasm-function-name.out (100%) rename deps/v8/test/message/{ => fail}/wasm-module-and-function-name.js (100%) rename deps/v8/test/message/{ => fail}/wasm-module-and-function-name.out (100%) rename deps/v8/test/message/{ => fail}/wasm-module-name.js (100%) rename deps/v8/test/message/{ => fail}/wasm-module-name.out (100%) rename deps/v8/test/message/{ => fail}/wasm-no-name.js (100%) rename deps/v8/test/message/{ => fail}/wasm-no-name.out (100%) rename deps/v8/test/message/{ => fail}/wasm-trap.js (100%) rename deps/v8/test/message/{ => fail}/wasm-trap.out (100%) rename deps/v8/test/message/{ => fail}/yield-in-arrow-param.js (100%) rename deps/v8/test/message/{ => fail}/yield-in-arrow-param.out (100%) rename deps/v8/test/message/{ => fail}/yield-in-generator-param.js (100%) rename deps/v8/test/message/{ => fail}/yield-in-generator-param.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-1527.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-1527.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-3995.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-3995.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-4266.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-4266.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-5727.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-5727.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-73.js (99%) rename deps/v8/test/message/regress/{ => fail}/regress-73.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-75.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-75.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-crbug-661579.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-crbug-661579.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-crbug-669017.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-crbug-669017.out (100%) rename deps/v8/test/message/regress/{ => fail}/regress-crbug-691194.js (100%) rename deps/v8/test/message/regress/{ => fail}/regress-crbug-691194.out (100%) delete mode 100644 deps/v8/test/message/regress/regress-4829-1.out delete mode 100644 deps/v8/test/message/regress/regress-4829-2.js delete mode 100644 deps/v8/test/message/regress/regress-4829-2.out create mode 100644 deps/v8/test/mjsunit/array-lastindexof.js create mode 100644 deps/v8/test/mjsunit/compiler-regress-787301.js create mode 100644 deps/v8/test/mjsunit/compiler/math-ceil.js create mode 100644 deps/v8/test/mjsunit/compiler/math-round.js create mode 100644 deps/v8/test/mjsunit/compiler/math-trunc.js create mode 100644 deps/v8/test/mjsunit/compiler/nary-binary-ops.js create mode 100644 deps/v8/test/mjsunit/compiler/osr-arguments.js create mode 100644 deps/v8/test/mjsunit/compiler/reflect-get.js create mode 100644 deps/v8/test/mjsunit/compiler/reflect-has.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-7121.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-772420.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-772872.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-773954.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-788539.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-791245.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-799263.js create mode 100644 deps/v8/test/mjsunit/compiler/string-slice.js create mode 100644 deps/v8/test/mjsunit/compiler/type-speculative-safe-integer-add.js create mode 100644 deps/v8/test/mjsunit/console.js rename deps/v8/test/mjsunit/{harmony => es6}/sloppy-no-duplicate-generators.js (93%) rename deps/v8/test/mjsunit/{harmony => es9}/object-rest-basic.js (98%) rename deps/v8/test/mjsunit/{harmony => es9}/object-spread-basic.js (98%) rename deps/v8/test/mjsunit/{harmony => es9}/regexp-lookbehind.js (99%) rename deps/v8/test/mjsunit/{harmony => es9}/template-escapes.js (99%) create mode 100644 deps/v8/test/mjsunit/filter-element-kinds.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/add.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/and.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/as-int-n.js rename deps/v8/test/mjsunit/harmony/{bigint.js => bigint/basics.js} (60%) create mode 100644 deps/v8/test/mjsunit/harmony/bigint/comparisons.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/dec.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/div.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/inc.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/json.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/mod.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/mul.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/neg.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/not.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/or.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/regressions.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/sar.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/shl.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/sub.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/tonumber.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/too-big-literal.js create mode 100644 deps/v8/test/mjsunit/harmony/bigint/xor.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-meta.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-export-import-meta.js create mode 100644 deps/v8/test/mjsunit/harmony/public-instance-class-fields.js create mode 100644 deps/v8/test/mjsunit/harmony/public-static-class-fields.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui0.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui1.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui2.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui3.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui4.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui5.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui6.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui7.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui8.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-property-lu-ui9.js delete mode 100644 deps/v8/test/mjsunit/harmony/sloppy-legacy-duplicate-generators.js create mode 100644 deps/v8/test/mjsunit/ignition/dynamic-global-inside-block.js create mode 100644 deps/v8/test/mjsunit/object-literal-modified-object-prototype.js create mode 100644 deps/v8/test/mjsunit/optimized-filter.js create mode 100644 deps/v8/test/mjsunit/regexp-modifiers-autogenerated-i18n.js create mode 100644 deps/v8/test/mjsunit/regexp-modifiers-autogenerated.js create mode 100644 deps/v8/test/mjsunit/regexp-modifiers-dotall.js create mode 100644 deps/v8/test/mjsunit/regexp-modifiers-i18n.js create mode 100644 deps/v8/test/mjsunit/regexp-modifiers.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6941.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6948.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6970.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6989.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6991.js create mode 100644 deps/v8/test/mjsunit/regress/regress-7014-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-7014-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-7026.js create mode 100644 deps/v8/test/mjsunit/regress/regress-7115.js create mode 100644 deps/v8/test/mjsunit/regress/regress-7135.js create mode 100644 deps/v8/test/mjsunit/regress/regress-774824.js create mode 100644 deps/v8/test/mjsunit/regress/regress-775888.js create mode 100644 deps/v8/test/mjsunit/regress/regress-776309.js create mode 100644 deps/v8/test/mjsunit/regress/regress-778574.js create mode 100644 deps/v8/test/mjsunit/regress/regress-778668.js create mode 100644 deps/v8/test/mjsunit/regress/regress-779407.js create mode 100644 deps/v8/test/mjsunit/regress/regress-782754.js create mode 100644 deps/v8/test/mjsunit/regress/regress-783051.js create mode 100644 deps/v8/test/mjsunit/regress/regress-783119.js create mode 100644 deps/v8/test/mjsunit/regress/regress-784080.js create mode 100644 deps/v8/test/mjsunit/regress/regress-784862.js create mode 100644 deps/v8/test/mjsunit/regress/regress-784863.js create mode 100644 deps/v8/test/mjsunit/regress/regress-784990.js create mode 100644 deps/v8/test/mjsunit/regress/regress-785804.js create mode 100644 deps/v8/test/mjsunit/regress/regress-786573.js create mode 100644 deps/v8/test/mjsunit/regress/regress-791345.js create mode 100644 deps/v8/test/mjsunit/regress/regress-793793.js create mode 100644 deps/v8/test/mjsunit/regress/regress-794822.js rename deps/v8/test/mjsunit/{harmony/global-accessors-strict.js => regress/regress-794825.js} (71%) create mode 100644 deps/v8/test/mjsunit/regress/regress-799690.js create mode 100644 deps/v8/test/mjsunit/regress/regress-799813.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-766635.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-768875.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-774459.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-774860.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-776511.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-778952.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-779344.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-779367.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-779457.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-781116-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-781116-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-781506-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-781506-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-781506-3.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-781583.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-783902.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-784835.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-786020.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-786723.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-791256.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-798026.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-801627.js create mode 100644 deps/v8/test/mjsunit/regress/regress-v8-6906.js rename deps/v8/test/mjsunit/regress/wasm/{regression-02256.js => regress-02256.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-02256b.js => regress-02256b.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-02862.js => regress-02862.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-5531.js => regress-5531.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-5800.js => regress-5800.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-5884.js => regress-5884.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-6054.js => regress-6054.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-6164.js => regress-6164.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-643595.js => regress-643595.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-644682.js => regress-644682.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-647649.js => regress-647649.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-648079.js => regress-648079.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-651961.js => regress-651961.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-654377.js => regress-654377.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-663994.js => regress-663994.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-666741.js => regress-666741.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-667745.js => regress-667745.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-670683.js => regress-670683.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-674447.js => regress-674447.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-680938.js => regress-680938.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-684858.js => regress-684858.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-688876.js => regress-688876.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-689450.js => regress-689450.js} (100%) create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-6931.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-694433.js rename deps/v8/test/mjsunit/regress/wasm/{regression-698587.js => regress-698587.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-699485.js => regress-699485.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-702460.js => regress-702460.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-702839.js => regress-702839.js} (100%) create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-7033.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-7035.js rename deps/v8/test/mjsunit/regress/wasm/{regression-703568.js => regress-703568.js} (100%) create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-7049.js rename deps/v8/test/mjsunit/regress/wasm/{regression-708714.js => regress-708714.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-710844.js => regress-710844.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-711203.js => regress-711203.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-715216-a.js => regress-715216a.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-715216-b.js => regress-715216b.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-717056.js => regress-717056.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-717194.js => regress-717194.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-719175.js => regress-719175.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-722445.js => regress-722445.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-724846.js => regress-724846.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-724851.js => regress-724851.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-724972.js => regress-724972.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-727219.js => regress-727219.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-727222.js => regress-727222.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-727560.js => regress-727560.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-729991.js => regress-729991.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-731351.js => regress-731351.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-734108.js => regress-734108.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-734246.js => regress-734246.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-734345.js => regress-734345.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-736584.js => regress-736584.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-737069.js => regress-737069.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-739768.js => regress-739768.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-753496.js => regress-753496.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-757217.js => regress-757217.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-763439.js => regress-763439.js} (100%) rename deps/v8/test/mjsunit/regress/wasm/{regression-763697.js => regress-763697.js} (100%) create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-766003.js rename deps/v8/test/mjsunit/regress/wasm/{regression-769846.js => regress-769846.js} (100%) create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-771243.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-772332.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-775366.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-778917.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-782280.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-784050.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-789952.js create mode 100644 deps/v8/test/mjsunit/splice-proxy.js create mode 100644 deps/v8/test/mjsunit/string-equal.js create mode 100644 deps/v8/test/mjsunit/wasm/default-liftoff-setting.js create mode 100644 deps/v8/test/mjsunit/wasm/lazy-compilation.js create mode 100644 deps/v8/test/mjsunit/wasm/liftoff.js create mode 100644 deps/v8/test/mjsunit/wasm/multi-value.js create mode 100644 deps/v8/test/mjsunit/wasm/user-properties-common.js create mode 100644 deps/v8/test/mjsunit/wasm/user-properties-constructed.js create mode 100644 deps/v8/test/mjsunit/wasm/user-properties-exported.js create mode 100644 deps/v8/test/mjsunit/wasm/user-properties-module.js create mode 100644 deps/v8/test/mjsunit/wasm/user-properties-reexport.js delete mode 100644 deps/v8/test/mjsunit/wasm/user-properties.js create mode 100644 deps/v8/test/mjsunit/wasm/worker-memory.js create mode 100644 deps/v8/test/mjsunit/whitespaces0.js create mode 100644 deps/v8/test/mjsunit/whitespaces1.js create mode 100644 deps/v8/test/mjsunit/whitespaces2.js create mode 100644 deps/v8/test/mjsunit/whitespaces3.js create mode 100644 deps/v8/test/mjsunit/whitespaces4.js create mode 100644 deps/v8/test/mjsunit/whitespaces5.js create mode 100644 deps/v8/test/mjsunit/whitespaces6.js create mode 100644 deps/v8/test/mjsunit/whitespaces7.js create mode 100644 deps/v8/test/mjsunit/whitespaces8.js create mode 100644 deps/v8/test/mjsunit/whitespaces9.js create mode 100644 deps/v8/test/unittests/bigint-unittest.cc create mode 100644 deps/v8/test/unittests/parser/ast-value-unittest.cc create mode 100644 deps/v8/test/unittests/utils-unittest.cc create mode 100644 deps/v8/test/unittests/wasm/trap-handler-unittest.cc create mode 100644 deps/v8/third_party/colorama/LICENSE create mode 100644 deps/v8/third_party/colorama/README.v8 create mode 100644 deps/v8/tools/arguments.js create mode 100755 deps/v8/tools/bigint-tester.py create mode 100644 deps/v8/tools/memory/asan/blacklist_win.txt create mode 100644 deps/v8/tools/release/testdata/node/deps/v8/.gitignore create mode 100644 deps/v8/tools/release/testdata/node/deps/v8/baz/delete_me create mode 100644 deps/v8/tools/release/testdata/node/deps/v8/baz/v8_foo create mode 100644 deps/v8/tools/release/testdata/node/deps/v8/delete_me create mode 100644 deps/v8/tools/release/testdata/node/deps/v8/include/v8-version.h create mode 100644 deps/v8/tools/release/testdata/node/deps/v8/v8_foo create mode 100755 deps/v8/tools/run-gc-fuzzer.py rename deps/v8/tools/{run-valgrind.gyp => run-num-fuzzer.gyp} (76%) create mode 100644 deps/v8/tools/run-num-fuzzer.isolate delete mode 100644 deps/v8/tools/run-valgrind.isolate delete mode 100755 deps/v8/tools/run-valgrind.py delete mode 100755 deps/v8/tools/test-server.py delete mode 100644 deps/v8/tools/testrunner/README create mode 100644 deps/v8/tools/testrunner/base_runner.py create mode 100755 deps/v8/tools/testrunner/deopt_fuzzer.py create mode 100755 deps/v8/tools/testrunner/gc_fuzzer.py delete mode 100644 deps/v8/tools/testrunner/network/__init__.py delete mode 100644 deps/v8/tools/testrunner/network/distro.py delete mode 100644 deps/v8/tools/testrunner/network/endpoint.py delete mode 100644 deps/v8/tools/testrunner/network/network_execution.py delete mode 100644 deps/v8/tools/testrunner/objects/peer.py delete mode 100644 deps/v8/tools/testrunner/objects/workpacket.py delete mode 100644 deps/v8/tools/testrunner/server/__init__.py delete mode 100644 deps/v8/tools/testrunner/server/compression.py delete mode 100644 deps/v8/tools/testrunner/server/constants.py delete mode 100644 deps/v8/tools/testrunner/server/daemon.py delete mode 100644 deps/v8/tools/testrunner/server/local_handler.py delete mode 100644 deps/v8/tools/testrunner/server/main.py delete mode 100644 deps/v8/tools/testrunner/server/presence_handler.py delete mode 100644 deps/v8/tools/testrunner/server/signatures.py delete mode 100644 deps/v8/tools/testrunner/server/status_handler.py delete mode 100644 deps/v8/tools/testrunner/server/work_handler.py create mode 100755 deps/v8/tools/testrunner/standard_runner.py diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index 6861c70994b..85ff179226f 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -70,6 +70,8 @@ !/third_party/binutils !/third_party/eu-strip !/third_party/inspector_protocol +!/third_party/colorama +/third_party/colorama/src /tools/clang /tools/gcmole/gcmole-tools /tools/gcmole/gcmole-tools.tar.gz @@ -103,5 +105,6 @@ turbo*.cfg turbo*.dot turbo*.json v8.ignition_dispatches_table.json +/Default/ !/third_party/jinja2 !/third_party/markupsafe diff --git a/deps/v8/.vpython b/deps/v8/.vpython new file mode 100644 index 00000000000..9ea0da7145b --- /dev/null +++ b/deps/v8/.vpython @@ -0,0 +1,32 @@ +# This is a vpython "spec" file. +# +# It describes patterns for python wheel dependencies of the python scripts in +# the chromium repo, particularly for dependencies that have compiled components +# (since pure-python dependencies can be easily vendored into third_party). +# +# When vpython is invoked, it finds this file and builds a python VirtualEnv, +# containing all of the dependencies described in this file, fetching them from +# CIPD (the "Chrome Infrastructure Package Deployer" service). Unlike `pip`, +# this never requires the end-user machine to have a working python extension +# compilation environment. All of these packages are built using: +# https://chromium.googlesource.com/infra/infra/+/master/infra/tools/dockerbuild/ +# +# All python scripts in the repo share this same spec, to avoid dependency +# fragmentation. +# +# If you have depot_tools installed in your $PATH, you can invoke python scripts +# in this repo by running them as you normally would run them, except +# substituting `vpython` instead of `python` on the command line, e.g.: +# vpython path/to/script.py some --arguments +# +# Read more about `vpython` and how to modify this file here: +# https://chromium.googlesource.com/infra/infra/+/master/doc/users/vpython.md + +python_version: "2.7" + +# Needed by third_party/catapult/devil/devil, which is imported by +# build/android/test_runner.py when running performance tests. +wheel: < + name: "infra/python/wheels/psutil/${vpython_platform}" + version: "version:5.2.2" +> diff --git a/deps/v8/.ycm_extra_conf.py b/deps/v8/.ycm_extra_conf.py index a451d9f31c3..74e605431a6 100644 --- a/deps/v8/.ycm_extra_conf.py +++ b/deps/v8/.ycm_extra_conf.py @@ -42,7 +42,7 @@ # Flags from YCM's default config. flags = [ '-DUSE_CLANG_COMPLETER', -'-std=gnu++11', +'-std=gnu++14', '-x', 'c++', ] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index be50e6e4996..08391a55665 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -1,4 +1,4 @@ -# Below is a list of people and organizations that have contributed +# Below is a list of people and organizations that have contributed # to the V8 project. Names should be added to the list like so: # # Name/Organization @@ -31,6 +31,7 @@ StrongLoop, Inc. <*@strongloop.com> Facebook, Inc. <*@fb.com> Facebook, Inc. <*@oculus.com> Vewd Software AS <*@vewd.com> +Groupon <*@groupon.com> Aaron Bieber Abdulla Kamar @@ -45,6 +46,7 @@ Andrew Paprocki Andrei Kashcha Anna Henningsen Bangfu Tao +Ben Coe Ben Noordhuis Benjamin Tan Bert Belder @@ -54,6 +56,7 @@ Craig Schlenter Choongwoo Han Chris Nardi Christopher A. Taylor +Colin Ihrig Daniel Andersson Daniel Bevenius Daniel James @@ -75,6 +78,7 @@ Ioseb Dzmanashvili Isiah Meadows Jaime Bernardo Jan de Mooij +Jan Krems Jay Freeman James Pike Jianghua Yang @@ -86,6 +90,7 @@ JunHo Seo Kang-Hao (Kenny) Lu Karl Skomski Kevin Gibbons +Kris Selden Loo Rong Jie Luis Reis Luke Zarko @@ -127,12 +132,14 @@ Sandro Santilli Sanjoy Das Seo Sanghyeon Stefan Penner +Sylvestre Ledru Tobias Burnus Victor Costan Vlad Burlik Vladimir Krivosheev Vladimir Shutoff Wiktor Garbacz +Yong Wang Yu Yin Zac Hansen Zhongping Wang diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index daed449c0a5..8492cb5f624 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -83,11 +83,11 @@ declare_args() { # Sets -dV8_TRACE_IGNITION. v8_enable_trace_ignition = false - # Sets -dV8_CONCURRENT_MARKING - v8_enable_concurrent_marking = false + # Sets -dV8_TRACE_FEEDBACK_UPDATES. + v8_enable_trace_feedback_updates = false - # Sets -dV8_CSA_WRITE_BARRIER - v8_enable_csa_write_barrier = true + # Sets -dV8_CONCURRENT_MARKING + v8_enable_concurrent_marking = true # Build the snapshot with unwinding information for perf. # Sets -dV8_USE_SNAPSHOT_WITH_UNWINDING_INFO. @@ -132,6 +132,11 @@ declare_args() { # Temporary flag to allow embedders to update their microtasks scopes # while rolling in a new version of V8. v8_check_microtasks_scopes_consistency = "" + + v8_monolithic = false + + # Enable mitigations for executing untrusted code. + v8_untrusted_code_mitigations = true } # Derived defaults. @@ -270,6 +275,9 @@ config("features") { if (v8_enable_trace_ignition) { defines += [ "V8_TRACE_IGNITION" ] } + if (v8_enable_trace_feedback_updates) { + defines += [ "V8_TRACE_FEEDBACK_UPDATES" ] + } if (v8_enable_v8_checks) { defines += [ "V8_ENABLE_CHECKS" ] } @@ -300,9 +308,6 @@ config("features") { if (v8_enable_concurrent_marking) { defines += [ "V8_CONCURRENT_MARKING" ] } - if (v8_enable_csa_write_barrier) { - defines += [ "V8_CSA_WRITE_BARRIER" ] - } if (v8_check_microtasks_scopes_consistency) { defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ] } @@ -488,6 +493,10 @@ config("toolchain") { defines += [ "ENABLE_VERIFY_CSA" ] } + if (!v8_untrusted_code_mitigations) { + defines += [ "DISABLE_UNTRUSTED_CODE_MITIGATIONS" ] + } + if (v8_no_inline) { cflags += [ "-fno-inline-functions", @@ -568,9 +577,7 @@ action("js2c") { "src/js/prologue.js", "src/js/v8natives.js", "src/js/array.js", - "src/js/string.js", "src/js/typedarray.js", - "src/js/weak-collection.js", "src/js/messages.js", "src/js/spread.js", "src/js/proxy.js", @@ -746,6 +753,12 @@ action("postmortem-metadata") { sources = [ "src/objects.h", "src/objects-inl.h", + "src/objects/code-inl.h", + "src/objects/code.h", + "src/objects/js-array-inl.h", + "src/objects/js-array.h", + "src/objects/js-regexp-inl.h", + "src/objects/js-regexp.h", "src/objects/map.h", "src/objects/map-inl.h", "src/objects/script.h", @@ -764,65 +777,68 @@ action("postmortem-metadata") { rebase_path(sources, root_build_dir) } -action("run_mksnapshot") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - - deps = [ - ":mksnapshot($v8_snapshot_toolchain)", - ] - - script = "tools/run.py" +if (v8_use_snapshot) { + action("run_mksnapshot") { + visibility = [ ":*" ] # Only targets in this file can depend on this. - sources = [] + deps = [ + ":mksnapshot($v8_snapshot_toolchain)", + ] - outputs = [ - "$target_gen_dir/snapshot.cc", - ] + script = "tools/run.py" - args = [ - "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", - "root_out_dir") + "/mksnapshot", - root_build_dir), - "--startup_src", - rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), - ] + sources = [] - if (v8_random_seed != "0") { - args += [ - "--random-seed", - v8_random_seed, + outputs = [ + "$target_gen_dir/snapshot.cc", ] - } - if (v8_os_page_size != "0") { - args += [ - "--v8_os_page_size", - v8_os_page_size, + args = [ + "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", + "root_out_dir") + "/mksnapshot", + root_build_dir), + "--turbo_instruction_scheduling", + "--startup_src", + rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), ] - } - if (v8_perf_prof_unwinding_info) { - args += [ "--perf-prof-unwinding-info" ] - } + if (v8_random_seed != "0") { + args += [ + "--random-seed", + v8_random_seed, + ] + } - if (v8_use_external_startup_data) { - outputs += [ "$root_out_dir/snapshot_blob.bin" ] - args += [ - "--startup_blob", - rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), - ] - } + if (v8_os_page_size != "0") { + args += [ + "--v8_os_page_size", + v8_os_page_size, + ] + } - if (v8_embed_script != "") { - sources += [ v8_embed_script ] - args += [ rebase_path(v8_embed_script, root_build_dir) ] - } + if (v8_perf_prof_unwinding_info) { + args += [ "--perf-prof-unwinding-info" ] + } - if (v8_enable_fast_mksnapshot) { - args += [ - "--no-turbo-rewrite-far-jumps", - "--no-turbo-verify-allocation", - ] + if (v8_use_external_startup_data) { + outputs += [ "$root_out_dir/snapshot_blob.bin" ] + args += [ + "--startup_blob", + rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), + ] + } + + if (v8_embed_script != "") { + sources += [ v8_embed_script ] + args += [ rebase_path(v8_embed_script, root_build_dir) ] + } + + if (v8_enable_fast_mksnapshot) { + args += [ + "--no-turbo-rewrite-far-jumps", + "--no-turbo-verify-allocation", + ] + } } } @@ -834,6 +850,7 @@ action("v8_dump_build_config") { is_gcov_coverage = v8_code_coverage && !is_clang args = [ rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), + "current_cpu=\"$current_cpu\"", "dcheck_always_on=$dcheck_always_on", "is_asan=$is_asan", "is_cfi=$is_cfi", @@ -844,7 +861,9 @@ action("v8_dump_build_config") { "is_tsan=$is_tsan", "is_ubsan_vptr=$is_ubsan_vptr", "target_cpu=\"$target_cpu\"", + "v8_current_cpu=\"$v8_current_cpu\"", "v8_enable_i18n_support=$v8_enable_i18n_support", + "v8_enable_verify_predictable=$v8_enable_verify_predictable", "v8_target_cpu=\"$v8_target_cpu\"", "v8_use_snapshot=$v8_use_snapshot", ] @@ -901,44 +920,46 @@ v8_source_set("v8_nosnapshot") { configs = [ ":internal_config" ] } -v8_source_set("v8_snapshot") { - # Only targets in this file and the top-level visibility target can - # depend on this. - visibility = [ - ":*", - "//:gn_visibility", - ] - - deps = [ - ":js2c", - ":js2c_experimental_extras", - ":js2c_extras", - ":v8_base", - ] - public_deps = [ - # This should be public so downstream targets can declare the snapshot - # output file as their inputs. - ":run_mksnapshot", - ] +if (v8_use_snapshot) { + v8_source_set("v8_snapshot") { + # Only targets in this file and the top-level visibility target can + # depend on this. + visibility = [ + ":*", + "//:gn_visibility", + ] - sources = [ - "$target_gen_dir/experimental-extras-libraries.cc", - "$target_gen_dir/extras-libraries.cc", - "$target_gen_dir/libraries.cc", - "$target_gen_dir/snapshot.cc", - "src/setup-isolate-deserialize.cc", - ] + deps = [ + ":js2c", + ":js2c_experimental_extras", + ":js2c_extras", + ":v8_base", + ] + public_deps = [ + # This should be public so downstream targets can declare the snapshot + # output file as their inputs. + ":run_mksnapshot", + ] - if (use_jumbo_build == true) { - jumbo_excluded_sources = [ - # TODO(mostynb@opera.com): don't exclude these http://crbug.com/752428 - # Generated source, contains same variable names as libraries.cc + sources = [ "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/extras-libraries.cc", "$target_gen_dir/libraries.cc", + "$target_gen_dir/snapshot.cc", + "src/setup-isolate-deserialize.cc", ] - } - configs = [ ":internal_config" ] + if (use_jumbo_build == true) { + jumbo_excluded_sources = [ + # TODO(mostynb@opera.com): don't exclude these http://crbug.com/752428 + # Generated source, contains same variable names as libraries.cc + "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/libraries.cc", + ] + } + + configs = [ ":internal_config" ] + } } if (v8_use_external_startup_data) { @@ -1008,12 +1029,14 @@ v8_source_set("v8_initializers") { "src/builtins/builtins-iterator-gen.cc", "src/builtins/builtins-iterator-gen.h", "src/builtins/builtins-math-gen.cc", + "src/builtins/builtins-math-gen.h", "src/builtins/builtins-number-gen.cc", "src/builtins/builtins-object-gen.cc", "src/builtins/builtins-promise-gen.cc", "src/builtins/builtins-promise-gen.h", "src/builtins/builtins-proxy-gen.cc", "src/builtins/builtins-proxy-gen.h", + "src/builtins/builtins-reflect-gen.cc", "src/builtins/builtins-regexp-gen.cc", "src/builtins/builtins-regexp-gen.h", "src/builtins/builtins-sharedarraybuffer-gen.cc", @@ -1195,8 +1218,6 @@ v8_source_set("v8_base") { "src/assembler.h", "src/assert-scope.cc", "src/assert-scope.h", - "src/ast/ast-expression-rewriter.cc", - "src/ast/ast-expression-rewriter.h", "src/ast/ast-function-literal-id-reindexer.cc", "src/ast/ast-function-literal-id-reindexer.h", "src/ast/ast-numbering.cc", @@ -1219,8 +1240,6 @@ v8_source_set("v8_base") { "src/ast/scopes.h", "src/ast/variables.cc", "src/ast/variables.h", - "src/background-parsing-task.cc", - "src/background-parsing-task.h", "src/bailout-reason.cc", "src/bailout-reason.h", "src/basic-block-profiler.cc", @@ -1315,6 +1334,7 @@ v8_source_set("v8_base") { "src/compiler/access-info.h", "src/compiler/all-nodes.cc", "src/compiler/all-nodes.h", + "src/compiler/allocation-builder.h", "src/compiler/basic-block-instrumentor.cc", "src/compiler/basic-block-instrumentor.h", "src/compiler/branch-elimination.cc", @@ -1607,6 +1627,8 @@ v8_source_set("v8_base") { "src/handles.cc", "src/handles.h", "src/heap-symbols.h", + "src/heap/array-buffer-collector.cc", + "src/heap/array-buffer-collector.h", "src/heap/array-buffer-tracker-inl.h", "src/heap/array-buffer-tracker.cc", "src/heap/array-buffer-tracker.h", @@ -1658,14 +1680,11 @@ v8_source_set("v8_base") { "src/heap/spaces.h", "src/heap/store-buffer.cc", "src/heap/store-buffer.h", + "src/heap/sweeper.cc", + "src/heap/sweeper.h", "src/heap/worklist.h", - "src/ic/access-compiler-data.h", - "src/ic/access-compiler.cc", - "src/ic/access-compiler.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", - "src/ic/handler-compiler.cc", - "src/ic/handler-compiler.h", "src/ic/handler-configuration-inl.h", "src/ic/handler-configuration.cc", "src/ic/handler-configuration.h", @@ -1773,9 +1792,10 @@ v8_source_set("v8_base") { "src/objects.h", "src/objects/arguments-inl.h", "src/objects/arguments.h", - "src/objects/bigint-inl.h", "src/objects/bigint.cc", "src/objects/bigint.h", + "src/objects/code-inl.h", + "src/objects/code.h", "src/objects/compilation-cache-inl.h", "src/objects/compilation-cache.h", "src/objects/debug-objects-inl.h", @@ -1789,6 +1809,11 @@ v8_source_set("v8_base") { "src/objects/hash-table.h", "src/objects/intl-objects.cc", "src/objects/intl-objects.h", + "src/objects/js-array-inl.h", + "src/objects/js-array.h", + "src/objects/js-regexp-inl.h", + "src/objects/js-regexp.h", + "src/objects/literal-objects-inl.h", "src/objects/literal-objects.cc", "src/objects/literal-objects.h", "src/objects/map-inl.h", @@ -1816,6 +1841,8 @@ v8_source_set("v8_base") { "src/objects/template-objects.h", "src/ostreams.cc", "src/ostreams.h", + "src/parsing/background-parsing-task.cc", + "src/parsing/background-parsing-task.h", "src/parsing/duplicate-finder.h", "src/parsing/expression-classifier.h", "src/parsing/expression-scope-reparenter.cc", @@ -1948,12 +1975,20 @@ v8_source_set("v8_base") { "src/setup-isolate.h", "src/signature.h", "src/simulator.h", + "src/snapshot/builtin-deserializer-allocator.cc", + "src/snapshot/builtin-deserializer-allocator.h", "src/snapshot/builtin-deserializer.cc", "src/snapshot/builtin-deserializer.h", + "src/snapshot/builtin-serializer-allocator.cc", + "src/snapshot/builtin-serializer-allocator.h", "src/snapshot/builtin-serializer.cc", "src/snapshot/builtin-serializer.h", + "src/snapshot/builtin-snapshot-utils.cc", + "src/snapshot/builtin-snapshot-utils.h", "src/snapshot/code-serializer.cc", "src/snapshot/code-serializer.h", + "src/snapshot/default-deserializer-allocator.cc", + "src/snapshot/default-deserializer-allocator.h", "src/snapshot/default-serializer-allocator.cc", "src/snapshot/default-serializer-allocator.h", "src/snapshot/deserializer.cc", @@ -2038,6 +2073,9 @@ v8_source_set("v8_base") { "src/visitors.h", "src/vm-state-inl.h", "src/vm-state.h", + "src/wasm/baseline/liftoff-assembler.cc", + "src/wasm/baseline/liftoff-assembler.h", + "src/wasm/baseline/liftoff-compiler.cc", "src/wasm/compilation-manager.cc", "src/wasm/compilation-manager.h", "src/wasm/decoder.h", @@ -2061,6 +2099,8 @@ v8_source_set("v8_base") { "src/wasm/wasm-api.h", "src/wasm/wasm-code-specialization.cc", "src/wasm/wasm-code-specialization.h", + "src/wasm/wasm-code-wrapper.cc", + "src/wasm/wasm-code-wrapper.h", "src/wasm/wasm-debug.cc", "src/wasm/wasm-external-refs.cc", "src/wasm/wasm-external-refs.h", @@ -2084,6 +2124,8 @@ v8_source_set("v8_base") { "src/wasm/wasm-opcodes.h", "src/wasm/wasm-result.cc", "src/wasm/wasm-result.h", + "src/wasm/wasm-serialization.cc", + "src/wasm/wasm-serialization.h", "src/wasm/wasm-text.cc", "src/wasm/wasm-text.h", "src/wasm/wasm-value.h", @@ -2128,9 +2170,7 @@ v8_source_set("v8_base") { "src/ia32/assembler-ia32.cc", "src/ia32/assembler-ia32.h", "src/ia32/code-stubs-ia32.cc", - "src/ia32/code-stubs-ia32.h", "src/ia32/codegen-ia32.cc", - "src/ia32/codegen-ia32.h", "src/ia32/cpu-ia32.cc", "src/ia32/deoptimizer-ia32.cc", "src/ia32/disasm-ia32.cc", @@ -2142,10 +2182,10 @@ v8_source_set("v8_base") { "src/ia32/simulator-ia32.cc", "src/ia32/simulator-ia32.h", "src/ia32/sse-instr.h", - "src/ic/ia32/access-compiler-ia32.cc", - "src/ic/ia32/handler-compiler-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.h", + "src/wasm/baseline/ia32/liftoff-assembler-ia32-defs.h", + "src/wasm/baseline/ia32/liftoff-assembler-ia32.h", ] } else if (v8_current_cpu == "x64") { sources += [ ### gcmole(arch:x64) ### @@ -2156,18 +2196,16 @@ v8_source_set("v8_base") { "src/compiler/x64/unwinding-info-writer-x64.cc", "src/compiler/x64/unwinding-info-writer-x64.h", "src/debug/x64/debug-x64.cc", - "src/ic/x64/access-compiler-x64.cc", - "src/ic/x64/handler-compiler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.h", "src/third_party/valgrind/valgrind.h", + "src/wasm/baseline/x64/liftoff-assembler-x64-defs.h", + "src/wasm/baseline/x64/liftoff-assembler-x64.h", "src/x64/assembler-x64-inl.h", "src/x64/assembler-x64.cc", "src/x64/assembler-x64.h", "src/x64/code-stubs-x64.cc", - "src/x64/code-stubs-x64.h", "src/x64/codegen-x64.cc", - "src/x64/codegen-x64.h", "src/x64/cpu-x64.cc", "src/x64/deoptimizer-x64.cc", "src/x64/disasm-x64.cc", @@ -2192,7 +2230,6 @@ v8_source_set("v8_base") { "src/arm/code-stubs-arm.cc", "src/arm/code-stubs-arm.h", "src/arm/codegen-arm.cc", - "src/arm/codegen-arm.h", "src/arm/constants-arm.cc", "src/arm/constants-arm.h", "src/arm/cpu-arm.cc", @@ -2214,10 +2251,10 @@ v8_source_set("v8_base") { "src/compiler/arm/unwinding-info-writer-arm.cc", "src/compiler/arm/unwinding-info-writer-arm.h", "src/debug/arm/debug-arm.cc", - "src/ic/arm/access-compiler-arm.cc", - "src/ic/arm/handler-compiler-arm.cc", "src/regexp/arm/regexp-macro-assembler-arm.cc", "src/regexp/arm/regexp-macro-assembler-arm.h", + "src/wasm/baseline/arm/liftoff-assembler-arm-defs.h", + "src/wasm/baseline/arm/liftoff-assembler-arm.h", ] } else if (v8_current_cpu == "arm64") { sources += [ ### gcmole(arch:arm64) ### @@ -2227,7 +2264,6 @@ v8_source_set("v8_base") { "src/arm64/code-stubs-arm64.cc", "src/arm64/code-stubs-arm64.h", "src/arm64/codegen-arm64.cc", - "src/arm64/codegen-arm64.h", "src/arm64/constants-arm64.h", "src/arm64/cpu-arm64.cc", "src/arm64/decoder-arm64-inl.h", @@ -2261,10 +2297,10 @@ v8_source_set("v8_base") { "src/compiler/arm64/unwinding-info-writer-arm64.cc", "src/compiler/arm64/unwinding-info-writer-arm64.h", "src/debug/arm64/debug-arm64.cc", - "src/ic/arm64/access-compiler-arm64.cc", - "src/ic/arm64/handler-compiler-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.cc", "src/regexp/arm64/regexp-macro-assembler-arm64.h", + "src/wasm/baseline/arm64/liftoff-assembler-arm64-defs.h", + "src/wasm/baseline/arm64/liftoff-assembler-arm64.h", ] if (use_jumbo_build) { jumbo_excluded_sources += [ @@ -2280,15 +2316,12 @@ v8_source_set("v8_base") { "src/compiler/mips/instruction-scheduler-mips.cc", "src/compiler/mips/instruction-selector-mips.cc", "src/debug/mips/debug-mips.cc", - "src/ic/mips/access-compiler-mips.cc", - "src/ic/mips/handler-compiler-mips.cc", "src/mips/assembler-mips-inl.h", "src/mips/assembler-mips.cc", "src/mips/assembler-mips.h", "src/mips/code-stubs-mips.cc", "src/mips/code-stubs-mips.h", "src/mips/codegen-mips.cc", - "src/mips/codegen-mips.h", "src/mips/constants-mips.cc", "src/mips/constants-mips.h", "src/mips/cpu-mips.cc", @@ -2303,6 +2336,8 @@ v8_source_set("v8_base") { "src/mips/simulator-mips.h", "src/regexp/mips/regexp-macro-assembler-mips.cc", "src/regexp/mips/regexp-macro-assembler-mips.h", + "src/wasm/baseline/mips/liftoff-assembler-mips-defs.h", + "src/wasm/baseline/mips/liftoff-assembler-mips.h", ] } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(arch:mips64el) ### @@ -2311,15 +2346,12 @@ v8_source_set("v8_base") { "src/compiler/mips64/instruction-scheduler-mips64.cc", "src/compiler/mips64/instruction-selector-mips64.cc", "src/debug/mips64/debug-mips64.cc", - "src/ic/mips64/access-compiler-mips64.cc", - "src/ic/mips64/handler-compiler-mips64.cc", "src/mips64/assembler-mips64-inl.h", "src/mips64/assembler-mips64.cc", "src/mips64/assembler-mips64.h", "src/mips64/code-stubs-mips64.cc", "src/mips64/code-stubs-mips64.h", "src/mips64/codegen-mips64.cc", - "src/mips64/codegen-mips64.h", "src/mips64/constants-mips64.cc", "src/mips64/constants-mips64.h", "src/mips64/cpu-mips64.cc", @@ -2334,6 +2366,8 @@ v8_source_set("v8_base") { "src/mips64/simulator-mips64.h", "src/regexp/mips64/regexp-macro-assembler-mips64.cc", "src/regexp/mips64/regexp-macro-assembler-mips64.h", + "src/wasm/baseline/mips64/liftoff-assembler-mips64-defs.h", + "src/wasm/baseline/mips64/liftoff-assembler-mips64.h", ] } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { sources += [ ### gcmole(arch:ppc) ### @@ -2342,15 +2376,12 @@ v8_source_set("v8_base") { "src/compiler/ppc/instruction-scheduler-ppc.cc", "src/compiler/ppc/instruction-selector-ppc.cc", "src/debug/ppc/debug-ppc.cc", - "src/ic/ppc/access-compiler-ppc.cc", - "src/ic/ppc/handler-compiler-ppc.cc", "src/ppc/assembler-ppc-inl.h", "src/ppc/assembler-ppc.cc", "src/ppc/assembler-ppc.h", "src/ppc/code-stubs-ppc.cc", "src/ppc/code-stubs-ppc.h", "src/ppc/codegen-ppc.cc", - "src/ppc/codegen-ppc.h", "src/ppc/constants-ppc.cc", "src/ppc/constants-ppc.h", "src/ppc/cpu-ppc.cc", @@ -2365,6 +2396,8 @@ v8_source_set("v8_base") { "src/ppc/simulator-ppc.h", "src/regexp/ppc/regexp-macro-assembler-ppc.cc", "src/regexp/ppc/regexp-macro-assembler-ppc.h", + "src/wasm/baseline/ppc/liftoff-assembler-ppc-defs.h", + "src/wasm/baseline/ppc/liftoff-assembler-ppc.h", ] } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { sources += [ ### gcmole(arch:s390) ### @@ -2373,8 +2406,6 @@ v8_source_set("v8_base") { "src/compiler/s390/instruction-scheduler-s390.cc", "src/compiler/s390/instruction-selector-s390.cc", "src/debug/s390/debug-s390.cc", - "src/ic/s390/access-compiler-s390.cc", - "src/ic/s390/handler-compiler-s390.cc", "src/regexp/s390/regexp-macro-assembler-s390.cc", "src/regexp/s390/regexp-macro-assembler-s390.h", "src/s390/assembler-s390-inl.h", @@ -2383,7 +2414,6 @@ v8_source_set("v8_base") { "src/s390/code-stubs-s390.cc", "src/s390/code-stubs-s390.h", "src/s390/codegen-s390.cc", - "src/s390/codegen-s390.h", "src/s390/constants-s390.cc", "src/s390/constants-s390.h", "src/s390/cpu-s390.cc", @@ -2396,6 +2426,8 @@ v8_source_set("v8_base") { "src/s390/macro-assembler-s390.h", "src/s390/simulator-s390.cc", "src/s390/simulator-s390.h", + "src/wasm/baseline/s390/liftoff-assembler-s390-defs.h", + "src/wasm/baseline/s390/liftoff-assembler-s390.h", ] } @@ -2597,6 +2629,10 @@ v8_component("v8_libplatform") { "include/libplatform/libplatform-export.h", "include/libplatform/libplatform.h", "include/libplatform/v8-tracing.h", + "src/libplatform/default-background-task-runner.cc", + "src/libplatform/default-background-task-runner.h", + "src/libplatform/default-foreground-task-runner.cc", + "src/libplatform/default-foreground-task-runner.h", "src/libplatform/default-platform.cc", "src/libplatform/default-platform.h", "src/libplatform/task-queue.cc", @@ -2660,11 +2696,35 @@ v8_source_set("fuzzer_support") { ] } +############################################################################### +# Produce a single static library for embedders +# + +if (v8_monolithic) { + # A component build is not monolithic. + assert(!is_component_build) + + # Using external startup data would produce separate files. + assert(!v8_use_external_startup_data) + v8_static_library("v8_monolith") { + deps = [ + ":v8", + ":v8_libbase", + ":v8_libplatform", + ":v8_libsampler", + "//build/config:exe_and_shlib_deps", + "//build/win:default_exe_manifest", + ] + + configs = [ ":internal_config" ] + } +} + ############################################################################### # Executables # -if (current_toolchain == v8_snapshot_toolchain) { +if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -2719,6 +2779,8 @@ group("gn_all") { } group("v8_clusterfuzz") { + testonly = true + deps = [ ":d8", ] @@ -2731,6 +2793,13 @@ group("v8_clusterfuzz") { ":d8(//build/toolchain/linux:clang_x86_v8_arm)", ] } + + if (v8_test_isolation_mode != "noop") { + deps += [ + "tools:run-deopt-fuzzer_run", + "tools:run-num-fuzzer_run", + ] + } } group("v8_archive") { diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index bed8ed97705..248b42b8d0c 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,1973 @@ +2017-11-29: Version 6.4.388 + + Performance and stability improvements on all platforms. + + +2017-11-29: Version 6.4.387 + + Performance and stability improvements on all platforms. + + +2017-11-29: Version 6.4.386 + + Performance and stability improvements on all platforms. + + +2017-11-29: Version 6.4.385 + + Performance and stability improvements on all platforms. + + +2017-11-29: Version 6.4.384 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.383 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.382 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.381 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.380 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.379 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.378 + + Performance and stability improvements on all platforms. + + +2017-11-28: Version 6.4.377 + + Performance and stability improvements on all platforms. + + +2017-11-27: Version 6.4.376 + + Performance and stability improvements on all platforms. + + +2017-11-27: Version 6.4.375 + + Performance and stability improvements on all platforms. + + +2017-11-27: Version 6.4.374 + + Performance and stability improvements on all platforms. + + +2017-11-27: Version 6.4.373 + + Performance and stability improvements on all platforms. + + +2017-11-27: Version 6.4.372 + + Performance and stability improvements on all platforms. + + +2017-11-27: Version 6.4.371 + + Performance and stability improvements on all platforms. + + +2017-11-24: Version 6.4.370 + + Performance and stability improvements on all platforms. + + +2017-11-24: Version 6.4.369 + + Performance and stability improvements on all platforms. + + +2017-11-24: Version 6.4.368 + + Performance and stability improvements on all platforms. + + +2017-11-24: Version 6.4.367 + + Performance and stability improvements on all platforms. + + +2017-11-24: Version 6.4.366 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.365 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.364 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.363 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.362 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.361 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.360 + + Performance and stability improvements on all platforms. + + +2017-11-23: Version 6.4.359 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.358 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.357 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.356 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.355 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.354 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.353 + + Performance and stability improvements on all platforms. + + +2017-11-22: Version 6.4.352 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.351 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.350 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.349 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.348 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.347 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.346 + + Performance and stability improvements on all platforms. + + +2017-11-21: Version 6.4.345 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.344 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.343 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.342 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.341 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.340 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.339 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.338 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.337 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.336 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.335 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.334 + + Performance and stability improvements on all platforms. + + +2017-11-20: Version 6.4.333 + + Performance and stability improvements on all platforms. + + +2017-11-19: Version 6.4.332 + + Performance and stability improvements on all platforms. + + +2017-11-18: Version 6.4.331 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.330 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.329 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.328 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.327 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.326 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.325 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.324 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.323 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.322 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.321 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.320 + + Performance and stability improvements on all platforms. + + +2017-11-17: Version 6.4.319 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.318 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.317 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.316 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.315 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.314 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.313 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.312 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.311 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.310 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.309 + + Performance and stability improvements on all platforms. + + +2017-11-16: Version 6.4.308 + + Performance and stability improvements on all platforms. + + +2017-11-15: Version 6.4.307 + + Performance and stability improvements on all platforms. + + +2017-11-15: Version 6.4.306 + + Performance and stability improvements on all platforms. + + +2017-11-15: Version 6.4.305 + + Performance and stability improvements on all platforms. + + +2017-11-15: Version 6.4.304 + + Performance and stability improvements on all platforms. + + +2017-11-15: Version 6.4.303 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.302 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.301 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.300 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.299 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.298 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.297 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.296 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.295 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.294 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.293 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.292 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.291 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.290 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.289 + + Performance and stability improvements on all platforms. + + +2017-11-14: Version 6.4.288 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.287 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.286 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.285 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.284 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.283 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.282 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.281 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.280 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.279 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.278 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.277 + + Performance and stability improvements on all platforms. + + +2017-11-13: Version 6.4.276 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.275 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.274 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.273 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.272 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.271 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.270 + + Performance and stability improvements on all platforms. + + +2017-11-10: Version 6.4.269 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.268 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.267 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.266 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.265 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.264 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.263 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.262 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.261 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.260 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.259 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.258 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.257 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.256 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.255 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.254 + + Performance and stability improvements on all platforms. + + +2017-11-09: Version 6.4.253 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.252 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.251 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.250 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.249 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.248 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.247 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.246 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.245 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.244 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.243 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.242 + + Performance and stability improvements on all platforms. + + +2017-11-08: Version 6.4.241 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.240 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.239 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.238 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.237 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.236 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.235 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.234 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.233 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.232 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.231 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.230 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.229 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.228 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.227 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.226 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.225 + + Performance and stability improvements on all platforms. + + +2017-11-07: Version 6.4.224 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.223 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.222 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.221 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.220 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.219 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.218 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.217 + + Performance and stability improvements on all platforms. + + +2017-11-06: Version 6.4.216 + + Performance and stability improvements on all platforms. + + +2017-11-05: Version 6.4.215 + + Performance and stability improvements on all platforms. + + +2017-11-04: Version 6.4.214 + + Performance and stability improvements on all platforms. + + +2017-11-04: Version 6.4.213 + + Performance and stability improvements on all platforms. + + +2017-11-04: Version 6.4.212 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.211 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.210 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.209 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.208 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.207 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.206 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.205 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.204 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.203 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.202 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.201 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.200 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.199 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.198 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.197 + + Performance and stability improvements on all platforms. + + +2017-11-03: Version 6.4.196 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.195 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.194 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.193 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.192 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.191 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.190 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.189 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.188 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.187 + + Performance and stability improvements on all platforms. + + +2017-11-02: Version 6.4.186 + + Performance and stability improvements on all platforms. + + +2017-11-01: Version 6.4.185 + + Performance and stability improvements on all platforms. + + +2017-11-01: Version 6.4.184 + + Performance and stability improvements on all platforms. + + +2017-11-01: Version 6.4.183 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.182 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.181 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.180 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.179 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.178 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.177 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.176 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.175 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.174 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.173 + + Performance and stability improvements on all platforms. + + +2017-10-31: Version 6.4.172 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.171 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.170 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.169 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.168 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.167 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.166 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.165 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.164 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.163 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.162 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.161 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.160 + + Performance and stability improvements on all platforms. + + +2017-10-30: Version 6.4.159 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.158 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.157 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.156 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.155 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.154 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.153 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.152 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.151 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.150 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.149 + + Performance and stability improvements on all platforms. + + +2017-10-27: Version 6.4.148 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.147 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.146 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.145 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.144 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.143 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.142 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.141 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.140 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.139 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.138 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.137 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.136 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.135 + + Performance and stability improvements on all platforms. + + +2017-10-26: Version 6.4.134 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.133 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.132 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.131 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.130 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.129 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.128 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.127 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.126 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.125 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.124 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.123 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.122 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.121 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.120 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.119 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.118 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.117 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.116 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.115 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.114 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.113 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.112 + + Performance and stability improvements on all platforms. + + +2017-10-25: Version 6.4.111 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.110 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.109 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.108 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.107 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.106 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.105 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.104 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.103 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.102 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.101 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.100 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.99 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.98 + + Performance and stability improvements on all platforms. + + +2017-10-24: Version 6.4.97 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.96 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.95 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.94 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.93 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.92 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.91 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.90 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.89 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.88 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.87 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.86 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.85 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.84 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.83 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.82 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.81 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.80 + + Performance and stability improvements on all platforms. + + +2017-10-23: Version 6.4.79 + + Performance and stability improvements on all platforms. + + +2017-10-22: Version 6.4.78 + + Performance and stability improvements on all platforms. + + +2017-10-21: Version 6.4.77 + + Performance and stability improvements on all platforms. + + +2017-10-21: Version 6.4.76 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.75 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.74 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.73 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.72 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.71 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.70 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.69 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.68 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.67 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.66 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.65 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.64 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.63 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.62 + + Performance and stability improvements on all platforms. + + +2017-10-20: Version 6.4.61 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.60 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.59 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.58 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.57 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.56 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.55 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.54 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.53 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.52 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.51 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.50 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.49 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.48 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.47 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.46 + + Performance and stability improvements on all platforms. + + +2017-10-19: Version 6.4.45 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.44 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.43 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.42 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.41 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.40 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.39 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.38 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.37 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.36 + + Performance and stability improvements on all platforms. + + +2017-10-18: Version 6.4.35 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.34 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.33 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.32 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.31 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.30 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.29 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.28 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.27 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.26 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.25 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.24 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.23 + + Performance and stability improvements on all platforms. + + +2017-10-17: Version 6.4.22 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.21 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.20 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.19 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.18 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.17 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.16 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.15 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.14 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.13 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.12 + + Performance and stability improvements on all platforms. + + +2017-10-16: Version 6.4.11 + + Performance and stability improvements on all platforms. + + +2017-10-15: Version 6.4.10 + + Performance and stability improvements on all platforms. + + +2017-10-15: Version 6.4.9 + + Performance and stability improvements on all platforms. + + +2017-10-14: Version 6.4.8 + + Performance and stability improvements on all platforms. + + +2017-10-14: Version 6.4.7 + + Performance and stability improvements on all platforms. + + +2017-10-13: Version 6.4.6 + + Performance and stability improvements on all platforms. + + +2017-10-13: Version 6.4.5 + + Performance and stability improvements on all platforms. + + +2017-10-13: Version 6.4.4 + + Performance and stability improvements on all platforms. + + +2017-10-13: Version 6.4.3 + + Performance and stability improvements on all platforms. + + +2017-10-13: Version 6.4.2 + + Performance and stability improvements on all platforms. + + +2017-10-13: Version 6.4.1 + + Performance and stability improvements on all platforms. + + +2017-10-12: Version 6.3.298 + + Performance and stability improvements on all platforms. + + +2017-10-12: Version 6.3.297 + + Performance and stability improvements on all platforms. + + +2017-10-11: Version 6.3.296 + + Performance and stability improvements on all platforms. + + +2017-10-11: Version 6.3.295 + + Performance and stability improvements on all platforms. + + +2017-10-11: Version 6.3.294 + + Performance and stability improvements on all platforms. + + +2017-10-11: Version 6.3.293 + + Performance and stability improvements on all platforms. + + 2017-10-10: Version 6.3.292 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index b675dd830ef..0d6b49d3b47 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -3,28 +3,33 @@ # all paths in here must match this assumption. vars = { + 'checkout_instrumented_libraries': False, 'chromium_url': 'https://chromium.googlesource.com', } deps = { 'v8/build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + 'adaf9e56105b814105e2d49bc4fa63e2cd4795f5', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '9338ce52d0b9bcef34c38285fbd5023b62739fac', 'v8/tools/gyp': Var('chromium_url') + '/external/gyp.git' + '@' + 'd61a9397e668fa9843c4aa7da9e79460fe590bfb', 'v8/third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '21d33b1a09a77f033478ea4ffffb61e6970f83bd', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '741688ebf328da9adc52505248bf4e2ef868722c', 'v8/third_party/instrumented_libraries': - Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '644afd349826cb68204226a16c38bde13abe9c3c', + Var('chromium_url') + '/chromium/src/third_party/instrumented_libraries.git' + '@' + '28417458ac4dc79f68915079d0f283f682504cc0', 'v8/buildtools': - Var('chromium_url') + '/chromium/buildtools.git' + '@' + 'f6d165d9d842ddd29056c127a5f3a3c5d8e0d2e3', + Var('chromium_url') + '/chromium/buildtools.git' + '@' + '505de88083136eefd056e5ee4ca0f01fe9b33de8', 'v8/base/trace_event/common': - Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + 'abcc4153b783b5e2c2dafcfbf658017ecb56989a', + Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '0e9a47d74970bee1bbfc063c47215406f8918699', 'v8/third_party/android_tools': { - 'url': Var('chromium_url') + '/android_tools.git' + '@' + 'ca9dc7245b888c75307f0619e4a39fb46a82de66', + 'url': Var('chromium_url') + '/android_tools.git' + '@' + 'a2e9bc7c1b41d983577907df51d339fb1e0fd02f', 'condition': 'checkout_android', }, 'v8/third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + 'a48a6afde0ff7eeb1c847744192977e412107d6a', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '11d7efb857ae77eff1cea4640e3f3d9ac49cba0a', + 'condition': 'checkout_android', + }, + 'v8/third_party/colorama/src': { + 'url': Var('chromium_url') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 'condition': 'checkout_android', }, 'v8/third_party/jinja2': @@ -32,7 +37,7 @@ deps = { 'v8/third_party/markupsafe': Var('chromium_url') + '/chromium/src/third_party/markupsafe.git' + '@' + '8f45f5cfa0009d2a70589bcda0349b8cb2b72783', 'v8/tools/swarming_client': - Var('chromium_url') + '/infra/luci/client-py.git' + '@' + '5e8001d9a710121ce7a68efd0804430a34b4f9e4', + Var('chromium_url') + '/infra/luci/client-py.git' + '@' + '4bd9152f8a975d57c972c071dfb4ddf668e02200', 'v8/testing/gtest': Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + '6f8a66431cb592dad629028a50b3dd418a408c87', 'v8/testing/gmock': @@ -42,15 +47,15 @@ deps = { 'v8/test/mozilla/data': Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', 'v8/test/test262/data': - Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '290799bbeeba86245a355894b6ff2bb33d946d9e', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + '5d4c667b271a9b39d0de73aef5ffe6879c6f8811', 'v8/test/test262/harness': Var('chromium_url') + '/external/github.com/test262-utils/test262-harness-py.git' + '@' + '0f2acdd882c84cff43b9d60df7574a1901e2cdcd', 'v8/tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + 'b3169f97cc1a9daa1a9fbae15752588079792098', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '8688d267571de76a56746324dcc249bf4232b85a', 'v8/tools/luci-go': - Var('chromium_url') + '/chromium/src/tools/luci-go.git' + '@' + '9f54aa9fe06499b6bac378ae1f045be2158cf2cc', + Var('chromium_url') + '/chromium/src/tools/luci-go.git' + '@' + '45a8a51fda92e123619a69e7644d9c64a320b0c1', 'v8/test/wasm-js': - Var('chromium_url') + '/external/github.com/WebAssembly/spec.git' + '@' + '89573ee3eabc690637deeb1b8dadec13a963ec30', + Var('chromium_url') + '/external/github.com/WebAssembly/spec.git' + '@' + 'a7e226a92e660a3d5413cfea4269824f513259d2', } recursedeps = [ @@ -248,15 +253,26 @@ hooks = [ ], }, { - # Pull sanitizer-instrumented third-party libraries if requested via - # GYP_DEFINES. - 'name': 'instrumented_libraries', - 'pattern': '\\.sha1', - # TODO(machenbach): Insert condition and remove GYP_DEFINES dependency. - 'action': [ - 'python', - 'v8/third_party/instrumented_libraries/scripts/download_binaries.py', - ], + 'name': 'msan_chained_origins', + 'pattern': '.', + 'condition': 'checkout_instrumented_libraries', + 'action': [ 'download_from_google_storage', + '--no_resume', + '--no_auth', + '--bucket', 'chromium-instrumented-libraries', + '-s', 'v8/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1', + ], + }, + { + 'name': 'msan_no_origins', + 'pattern': '.', + 'condition': 'checkout_instrumented_libraries', + 'action': [ 'download_from_google_storage', + '--no_resume', + '--no_auth', + '--bucket', 'chromium-instrumented-libraries', + '-s', 'v8/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1', + ], }, { # Update the Windows toolchain if necessary. @@ -283,9 +299,30 @@ hooks = [ 'pattern': '.', 'action': ['python', 'v8/tools/clang/scripts/update.py'], }, + { + 'name': 'fuchsia_sdk', + 'pattern': '.', + 'condition': 'checkout_fuchsia', + 'action': [ + 'python', + 'v8/build/fuchsia/update_sdk.py', + '226f6dd0cad1d6be63a353ce2649423470729ae9', + ], + }, { # A change to a .gyp, .gypi, or to GYP itself should run the generator. + 'name': 'regyp_if_needed', 'pattern': '.', 'action': ['python', 'v8/gypfiles/gyp_v8', '--running-as-hook'], }, + # Download and initialize "vpython" VirtualEnv environment packages. + { + 'name': 'vpython_common', + 'pattern': '.', + 'condition': 'checkout_android', + 'action': [ 'vpython', + '-vpython-spec', 'v8/.vpython', + '-vpython-tool', 'install', + ], + }, ] diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 621f375e336..2583a229b6c 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -27,10 +27,11 @@ mstarzinger@chromium.org mtrofin@chromium.org mvstanton@chromium.org mythria@chromium.org -petermarshall@chromium.org neis@chromium.org +petermarshall@chromium.org rmcilroy@chromium.org rossberg@chromium.org +sergiyb@chromium.org tebbi@chromium.org titzer@chromium.org ulan@chromium.org diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 1ef291f6fa6..a595220a090 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -281,6 +281,8 @@ def _CommonChecks(input_api, output_api): results.extend(_CheckMissingFiles(input_api, output_api)) results.extend(_CheckJSONFiles(input_api, output_api)) results.extend(_CheckMacroUndefs(input_api, output_api)) + results.extend(input_api.RunTests( + input_api.canned_checks.CheckVPythonSpec(input_api, output_api))) return results diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h index 132a4ea66fc..51869ee9525 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -189,6 +189,8 @@ // trace points would carry a significant performance cost of acquiring a lock // and resolving the category. +// Check that nobody includes this file directly. Clients are supposed to +// include the surrounding "trace_event.h" of their project instead. #if defined(TRACE_EVENT0) #error "Another copy of this file has already been included." #endif diff --git a/deps/v8/gni/isolate.gni b/deps/v8/gni/isolate.gni index 4bdf0c0fad2..6ad25c27749 100644 --- a/deps/v8/gni/isolate.gni +++ b/deps/v8/gni/isolate.gni @@ -106,6 +106,11 @@ template("v8_isolate_run") { } else { use_external_startup_data = "0" } + if (is_ubsan_vptr) { + ubsan_vptr = "1" + } else { + ubsan_vptr = "0" + } if (v8_use_snapshot) { use_snapshot = "true" } else { @@ -168,6 +173,8 @@ template("v8_isolate_run") { "--config-variable", "target_arch=$target_arch", "--config-variable", + "ubsan_vptr=$ubsan_vptr", + "--config-variable", "v8_use_external_startup_data=$use_external_startup_data", "--config-variable", "v8_use_snapshot=$use_snapshot", diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index 0467720f456..4b8292a2441 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -174,3 +174,13 @@ template("v8_component") { configs += v8_add_configs } } + +template("v8_static_library") { + static_library(target_name) { + complete_static_lib = true + forward_variables_from(invoker, "*", [ "configs" ]) + configs += invoker.configs + configs -= v8_remove_configs + configs += v8_add_configs + } +} diff --git a/deps/v8/gypfiles/all.gyp b/deps/v8/gypfiles/all.gyp index bc9d9650eb5..593ba2a7957 100644 --- a/deps/v8/gypfiles/all.gyp +++ b/deps/v8/gypfiles/all.gyp @@ -46,7 +46,7 @@ '../tools/gcmole/run_gcmole.gyp:*', '../tools/jsfunfuzz/jsfunfuzz.gyp:*', '../tools/run-deopt-fuzzer.gyp:*', - '../tools/run-valgrind.gyp:*', + '../tools/run-num-fuzzer.gyp:*', ], }], ] diff --git a/deps/v8/gypfiles/features.gypi b/deps/v8/gypfiles/features.gypi index 1d3f67daee3..d285ee21da5 100644 --- a/deps/v8/gypfiles/features.gypi +++ b/deps/v8/gypfiles/features.gypi @@ -85,7 +85,7 @@ 'v8_check_microtasks_scopes_consistency%': 'false', # Enable concurrent marking. - 'v8_enable_concurrent_marking%': 0, + 'v8_enable_concurrent_marking%': 1, # Controls the threshold for on-heap/off-heap Typed Arrays. 'v8_typed_array_max_size_in_heap%': 64, diff --git a/deps/v8/gypfiles/isolate.gypi b/deps/v8/gypfiles/isolate.gypi index 149818c8d06..3e85b530e25 100644 --- a/deps/v8/gypfiles/isolate.gypi +++ b/deps/v8/gypfiles/isolate.gypi @@ -80,6 +80,7 @@ '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)', '--config-variable', 'component=<(component)', '--config-variable', 'target_arch=<(target_arch)', + '--config-variable', 'ubsan_vptr=0', '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)', '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)', ], diff --git a/deps/v8/gypfiles/standalone.gypi b/deps/v8/gypfiles/standalone.gypi index 63930d8aef1..7a45dc615f0 100644 --- a/deps/v8/gypfiles/standalone.gypi +++ b/deps/v8/gypfiles/standalone.gypi @@ -439,6 +439,7 @@ '-Wno-undefined-var-template', # TODO(yangguo): issue 5258 '-Wno-nonportable-include-path', + '-Wno-tautological-constant-compare', ], 'conditions':[ ['OS=="android"', { @@ -783,6 +784,11 @@ # over the place. '-fno-strict-aliasing', ], + }, { + 'cflags' : [ + # TODO(hans): https://crbug.com/767059 + '-Wno-tautological-constant-compare', + ], }], [ 'clang==1 and (v8_target_arch=="x64" or v8_target_arch=="arm64" \ or v8_target_arch=="mips64el")', { diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index b615088300e..04b47b8d2e1 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/include/libplatform/libplatform.h @@ -8,6 +8,7 @@ #include "libplatform/libplatform-export.h" #include "libplatform/v8-tracing.h" #include "v8-platform.h" // NOLINT(build/include) +#include "v8config.h" // NOLINT(build/include) namespace v8 { namespace platform { @@ -33,12 +34,21 @@ enum class MessageLoopBehavior : bool { * If |tracing_controller| is nullptr, the default platform will create a * v8::platform::TracingController instance and use it. */ -V8_PLATFORM_EXPORT v8::Platform* CreateDefaultPlatform( +V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform( int thread_pool_size = 0, IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping = InProcessStackDumping::kEnabled, - v8::TracingController* tracing_controller = nullptr); + std::unique_ptr tracing_controller = {}); + +V8_PLATFORM_EXPORT V8_DEPRECATE_SOON( + "Use NewDefaultPlatform instead", + v8::Platform* CreateDefaultPlatform( + int thread_pool_size = 0, + IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled, + InProcessStackDumping in_process_stack_dumping = + InProcessStackDumping::kEnabled, + v8::TracingController* tracing_controller = nullptr)); /** * Pumps the message loop for the given isolate. @@ -46,7 +56,7 @@ V8_PLATFORM_EXPORT v8::Platform* CreateDefaultPlatform( * The caller has to make sure that this is called from the right thread. * Returns true if a task was executed, and false otherwise. Unless requested * through the |behavior| parameter, this call does not block if no task is - * pending. The |platform| has to be created using |CreateDefaultPlatform|. + * pending. The |platform| has to be created using |NewDefaultPlatform|. */ V8_PLATFORM_EXPORT bool PumpMessageLoop( v8::Platform* platform, v8::Isolate* isolate, @@ -60,7 +70,7 @@ V8_PLATFORM_EXPORT void EnsureEventLoopInitialized(v8::Platform* platform, * * The caller has to make sure that this is called from the right thread. * This call does not block if no task is pending. The |platform| has to be - * created using |CreateDefaultPlatform|. + * created using |NewDefaultPlatform|. */ V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform, v8::Isolate* isolate, @@ -69,13 +79,14 @@ V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform, /** * Attempts to set the tracing controller for the given platform. * - * The |platform| has to be created using |CreateDefaultPlatform|. + * The |platform| has to be created using |NewDefaultPlatform|. * - * DEPRECATED: Will be removed soon. */ -V8_PLATFORM_EXPORT void SetTracingController( - v8::Platform* platform, - v8::platform::tracing::TracingController* tracing_controller); +V8_PLATFORM_EXPORT V8_DEPRECATE_SOON( + "Access the DefaultPlatform directly", + void SetTracingController( + v8::Platform* platform, + v8::platform::tracing::TracingController* tracing_controller)); } // namespace platform } // namespace v8 diff --git a/deps/v8/include/libplatform/v8-tracing.h b/deps/v8/include/libplatform/v8-tracing.h index 9dcf3d7bca7..8c1febf7627 100644 --- a/deps/v8/include/libplatform/v8-tracing.h +++ b/deps/v8/include/libplatform/v8-tracing.h @@ -43,8 +43,8 @@ class V8_PLATFORM_EXPORT TraceObject { const char** arg_names, const uint8_t* arg_types, const uint64_t* arg_values, std::unique_ptr* arg_convertables, - unsigned int flags, int64_t timestamp, int64_t cpu_timestamp); - void UpdateDuration(int64_t timestamp, int64_t cpu_timestamp); + unsigned int flags); + void UpdateDuration(); void InitializeForTesting( char phase, const uint8_t* category_enabled_flag, const char* name, const char* scope, uint64_t id, uint64_t bind_id, int num_args, @@ -247,13 +247,6 @@ class V8_PLATFORM_EXPORT TracingController const uint64_t* arg_values, std::unique_ptr* arg_convertables, unsigned int flags) override; - uint64_t AddTraceEventWithTimestamp( - char phase, const uint8_t* category_enabled_flag, const char* name, - const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, - const char** arg_names, const uint8_t* arg_types, - const uint64_t* arg_values, - std::unique_ptr* arg_convertables, - unsigned int flags, int64_t timestamp) override; void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, const char* name, uint64_t handle) override; void AddTraceStateObserver( @@ -266,10 +259,6 @@ class V8_PLATFORM_EXPORT TracingController static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag); - protected: - virtual int64_t CurrentTimestampMicroseconds(); - virtual int64_t CurrentCpuTimestampMicroseconds(); - private: const uint8_t* GetCategoryGroupEnabledInternal(const char* category_group); void UpdateCategoryGroupEnabledFlag(size_t category_index); diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index d0bb9b47fe4..5478e127f94 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -215,6 +215,20 @@ class V8_EXPORT V8InspectorClient { virtual void maxAsyncCallStackDepthChanged(int depth) {} }; +// These stack trace ids are intended to be passed between debuggers and be +// resolved later. This allows to track cross-debugger calls and step between +// them if a single client connects to multiple debuggers. +struct V8_EXPORT V8StackTraceId { + uintptr_t id; + std::pair debugger_id; + + V8StackTraceId(); + V8StackTraceId(uintptr_t id, const std::pair debugger_id); + ~V8StackTraceId() = default; + + bool IsInvalid() const; +}; + class V8_EXPORT V8Inspector { public: static std::unique_ptr create(v8::Isolate*, V8InspectorClient*); @@ -237,6 +251,11 @@ class V8_EXPORT V8Inspector { virtual void asyncTaskFinished(void* task) = 0; virtual void allAsyncTasksCanceled() = 0; + virtual V8StackTraceId storeCurrentStackTrace( + const StringView& description) = 0; + virtual void externalAsyncTaskStarted(const V8StackTraceId& parent) = 0; + virtual void externalAsyncTaskFinished(const V8StackTraceId& parent) = 0; + // Exceptions instrumentation. virtual unsigned exceptionThrown( v8::Local, const StringView& message, diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 43420a972c7..f814543e666 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -119,11 +119,11 @@ class TracingController { } /** - * Adds a trace event to the platform tracing system. These function calls are + * Adds a trace event to the platform tracing system. This function call is * usually the result of a TRACE_* macro from trace_event_common.h when * tracing and the category of the particular trace are enabled. It is not - * advisable to call these functions on their own; they are really only meant - * to be used by the trace macros. The returned handle can be used by + * advisable to call this function on its own; it is really only meant to be + * used by the trace macros. The returned handle can be used by * UpdateTraceEventDuration to update the duration of COMPLETE events. */ virtual uint64_t AddTraceEvent( @@ -135,15 +135,6 @@ class TracingController { unsigned int flags) { return 0; } - virtual uint64_t AddTraceEventWithTimestamp( - char phase, const uint8_t* category_enabled_flag, const char* name, - const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, - const char** arg_names, const uint8_t* arg_types, - const uint64_t* arg_values, - std::unique_ptr* arg_convertables, - unsigned int flags, int64_t timestamp) { - return 0; - } /** * Sets the duration field of a COMPLETE trace event. It must be called with diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index 621ca8b2157..a86402be924 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -286,6 +286,13 @@ class V8_EXPORT CpuProfiler { */ static CpuProfiler* New(Isolate* isolate); + /** + * Synchronously collect current stack sample in all profilers attached to + * the |isolate|. The call does not affect number of ticks recorded for + * the current top node. + */ + static void CollectSample(Isolate* isolate); + /** * Disposes the CPU profiler object. */ @@ -322,7 +329,8 @@ class V8_EXPORT CpuProfiler { * Recording the forced sample does not contribute to the aggregated * profile statistics. */ - void CollectSample(); + V8_DEPRECATED("Use static CollectSample(Isolate*) instead.", + void CollectSample()); /** * Tells the profiler whether the embedder is idle. diff --git a/deps/v8/include/v8-util.h b/deps/v8/include/v8-util.h index a04a5e84f80..15ea225dc12 100644 --- a/deps/v8/include/v8-util.h +++ b/deps/v8/include/v8-util.h @@ -393,9 +393,14 @@ class PersistentValueMap : public PersistentValueMapBase { */ Global SetUnique(const K& key, Global* persistent) { if (Traits::kCallbackType != kNotWeak) { + WeakCallbackType callback_type = + Traits::kCallbackType == kWeakWithInternalFields + ? WeakCallbackType::kInternalFields + : WeakCallbackType::kParameter; Local value(Local::New(this->isolate(), *persistent)); persistent->template SetWeak( - Traits::WeakCallbackParameter(this, key, value), WeakCallback); + Traits::WeakCallbackParameter(this, key, value), WeakCallback, + callback_type); } PersistentContainerValue old_value = Traits::Set(this->impl(), key, this->ClearAndLeak(persistent)); diff --git a/deps/v8/include/v8-version-string.h b/deps/v8/include/v8-version-string.h index eab0934804e..fb84144d544 100644 --- a/deps/v8/include/v8-version-string.h +++ b/deps/v8/include/v8-version-string.h @@ -29,9 +29,10 @@ "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) "." V8_S( \ V8_PATCH_LEVEL) V8_EMBEDDER_STRING V8_CANDIDATE_STRING #else -#define V8_VERSION_STRING \ - V8_S(V8_MAJOR_VERSION) \ - "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) V8_CANDIDATE_STRING +#define V8_VERSION_STRING \ + V8_S(V8_MAJOR_VERSION) \ + "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) \ + V8_EMBEDDER_STRING V8_CANDIDATE_STRING #endif #endif // V8_VERSION_STRING_H_ diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 86c50fd4f52..3503f3fbb4b 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 6 -#define V8_MINOR_VERSION 3 -#define V8_BUILD_NUMBER 292 -#define V8_PATCH_LEVEL 48 +#define V8_MINOR_VERSION 4 +#define V8_BUILD_NUMBER 388 +#define V8_PATCH_LEVEL 40 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index f1001533649..c09f6103337 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -433,20 +433,6 @@ class WeakCallbackInfo { V8_INLINE T* GetParameter() const { return parameter_; } V8_INLINE void* GetInternalField(int index) const; - V8_INLINE V8_DEPRECATED("use indexed version", - void* GetInternalField1() const) { - return embedder_fields_[0]; - } - V8_INLINE V8_DEPRECATED("use indexed version", - void* GetInternalField2() const) { - return embedder_fields_[1]; - } - - V8_DEPRECATED("Not realiable once SetSecondPassCallback() was used.", - bool IsFirstPass() const) { - return callback_ != nullptr; - } - // When first called, the embedder MUST Reset() the Global which triggered the // callback. The Global itself is unusable for anything else. No v8 other api // calls may be called in the first callback. Should additional work be @@ -579,16 +565,22 @@ template class PersistentBase { * independent handle should not assume that it will be preceded by a global * GC prologue callback or followed by a global GC epilogue callback. */ - V8_INLINE void MarkIndependent(); + V8_DEPRECATE_SOON( + "Objects are always considered independent. " + "Use MarkActive to avoid collecting otherwise dead weak handles.", + V8_INLINE void MarkIndependent()); /** * Marks the reference to this object as active. The scavenge garbage - * collection should not reclaim the objects marked as active. + * collection should not reclaim the objects marked as active, even if the + * object held by the handle is otherwise unreachable. + * * This bit is cleared after the each garbage collection pass. */ V8_INLINE void MarkActive(); - V8_INLINE bool IsIndependent() const; + V8_DEPRECATE_SOON("See MarkIndependent.", + V8_INLINE bool IsIndependent() const); /** Checks if the handle holds the only reference to an object. */ V8_INLINE bool IsNearDeath() const; @@ -984,9 +976,6 @@ class V8_EXPORT Data { }; /** - * This is an unfinished experimental feature, and is only exposed - * here for internal testing purposes. DO NOT USE. - * * A container type that holds relevant metadata for module loading. * * This is passed back to the embedder as part of @@ -1008,9 +997,6 @@ class V8_EXPORT ScriptOrModule { }; /** - * This is an unfinished experimental feature, and is only exposed - * here for internal testing purposes. DO NOT USE. - * * An array to hold Primitive values. This is used by the embedder to * pass host defined options to the ScriptOptions during compilation. * @@ -1440,6 +1426,26 @@ class V8_EXPORT ScriptCompiler { kConsumeCodeCache }; + /** + * The reason for which we are not requesting or providing a code cache. + */ + enum NoCacheReason { + kNoCacheNoReason = 0, + kNoCacheBecauseCachingDisabled, + kNoCacheBecauseNoResource, + kNoCacheBecauseInlineScript, + kNoCacheBecauseModule, + kNoCacheBecauseStreamingSource, + kNoCacheBecauseInspector, + kNoCacheBecauseScriptTooSmall, + kNoCacheBecauseCacheTooCold, + kNoCacheBecauseV8Extension, + kNoCacheBecauseExtensionModule, + kNoCacheBecausePacScript, + kNoCacheBecauseInDocumentWrite, + kNoCacheBecauseResourceWithNoCacheHandler + }; + /** * Compiles the specified script (context-independent). * Cached data as part of the source object can be optionally produced to be @@ -1456,10 +1462,12 @@ class V8_EXPORT ScriptCompiler { static V8_DEPRECATED("Use maybe version", Local CompileUnbound( Isolate* isolate, Source* source, - CompileOptions options = kNoCompileOptions)); + CompileOptions options = kNoCompileOptions, + NoCacheReason no_cache_reason = kNoCacheNoReason)); static V8_WARN_UNUSED_RESULT MaybeLocal CompileUnboundScript( Isolate* isolate, Source* source, - CompileOptions options = kNoCompileOptions); + CompileOptions options = kNoCompileOptions, + NoCacheReason no_cache_reason = kNoCacheNoReason); /** * Compiles the specified script (bound to current context). @@ -1475,10 +1483,12 @@ class V8_EXPORT ScriptCompiler { static V8_DEPRECATED( "Use maybe version", Local + @@ -254,16 +255,17 @@ let fragment = document.createDocumentFragment(); function td(tr, content, className) { - let td = document.createElement("td"); + let node = document.createElement("td"); if (typeof content == "object") { - td.appendChild(content); + node.appendChild(content); } else { - td.innerHTML = content; + node.innerHTML = content; } - td.className = className - tr.appendChild(td); - return td + node.className = className + tr.appendChild(node); + return node } + let max = Math.min(1000, entries.length) for (let i = 0; i < max; i++) { let entry = entries[i]; @@ -278,8 +280,8 @@ let omitted = entries.length - max; if (omitted > 0) { let tr = document.createElement("tr"); - let td = td(tr, 'Omitted ' + omitted + " entries."); - td.colSpan = 4; + let tdNode = td(tr, 'Omitted ' + omitted + " entries."); + tdNode.colSpan = 4; fragment.appendChild(tr); } parent.appendChild(fragment); diff --git a/deps/v8/tools/ic-processor b/deps/v8/tools/ic-processor index f41b4471742..c33052cdf6a 100755 --- a/deps/v8/tools/ic-processor +++ b/deps/v8/tools/ic-processor @@ -36,6 +36,6 @@ fi cat $log_file | $d8_exec $tools_path/splaytree.js $tools_path/codemap.js \ $tools_path/csvparser.js $tools_path/consarray.js \ $tools_path/profile.js $tools_path/profile_view.js \ - $tools_path/logreader.js $tools_path/ic-processor.js \ - $tools_path/SourceMap.js \ + $tools_path/logreader.js $tools_path/arguments.js \ + $tools_path/ic-processor.js $tools_path/SourceMap.js \ $tools_path/ic-processor-driver.js -- $@ 2>/dev/null diff --git a/deps/v8/tools/ic-processor-driver.js b/deps/v8/tools/ic-processor-driver.js index 58c608d0209..2aa52006c73 100644 --- a/deps/v8/tools/ic-processor-driver.js +++ b/deps/v8/tools/ic-processor-driver.js @@ -12,7 +12,7 @@ function processArguments(args) { } function initSourceMapSupport() { - // Pull dev tools source maps into our name space. + // Pull dev tools source maps into our name space. SourceMap = WebInspector.SourceMap; // Overwrite the load function to load scripts synchronously. diff --git a/deps/v8/tools/ic-processor.js b/deps/v8/tools/ic-processor.js index 9897de2c6cb..93f40b38a08 100644 --- a/deps/v8/tools/ic-processor.js +++ b/deps/v8/tools/ic-processor.js @@ -156,94 +156,24 @@ IcProcessor.prototype.processPropertyIC = function ( var entry = this.profile_.findEntry(pc); print(type + " (" + old_state + "->" + new_state + modifier + ") at " + this.formatName(entry) + ":" + line + ":" + column + " " + name + - " (map 0x" + map.toString(16) + ")"); + " (map 0x" + map.toString(16) + ")" + + (slow_reason ? " " + slow_reason : "")); } -function padLeft(s, len) { - s = s.toString(); - if (s.length < len) { - var padLength = len - s.length; - if (!(padLength in padLeft)) { - padLeft[padLength] = new Array(padLength + 1).join(' '); - } - s = padLeft[padLength] + s; - } - return s; -}; - - -function ArgumentsProcessor(args) { - this.args_ = args; - this.result_ = ArgumentsProcessor.DEFAULTS; - - this.argsDispatch_ = { - '--range': ['range', 'auto,auto', - 'Specify the range limit as [start],[end]'], - '--source-map': ['sourceMap', null, - 'Specify the source map that should be used for output'] - }; -}; - -ArgumentsProcessor.DEFAULTS = { - logFileName: 'v8.log', - range: 'auto,auto', -}; - - -ArgumentsProcessor.prototype.parse = function() { - while (this.args_.length) { - var arg = this.args_.shift(); - if (arg.charAt(0) != '-') { - this.result_.logFileName = arg; - continue; - } - var userValue = null; - var eqPos = arg.indexOf('='); - if (eqPos != -1) { - userValue = arg.substr(eqPos + 1); - arg = arg.substr(0, eqPos); - } - if (arg in this.argsDispatch_) { - var dispatch = this.argsDispatch_[arg]; - this.result_[dispatch[0]] = userValue == null ? dispatch[1] : userValue; - } else { - return false; - } +class ArgumentsProcessor extends BaseArgumentsProcessor { + getArgsDispatch() { + return { + '--range': ['range', 'auto,auto', + 'Specify the range limit as [start],[end]'], + '--source-map': ['sourceMap', null, + 'Specify the source map that should be used for output'] + }; } - return true; -}; - - -ArgumentsProcessor.prototype.result = function() { - return this.result_; -}; - - -ArgumentsProcessor.prototype.printUsageAndExit = function() { - - function padRight(s, len) { - s = s.toString(); - if (s.length < len) { - s = s + (new Array(len - s.length + 1).join(' ')); - } - return s; - } - - print('Cmdline args: [options] [log-file-name]\n' + - 'Default log file name is "' + - ArgumentsProcessor.DEFAULTS.logFileName + '".\n'); - print('Options:'); - for (var arg in this.argsDispatch_) { - var synonyms = [arg]; - var dispatch = this.argsDispatch_[arg]; - for (var synArg in this.argsDispatch_) { - if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { - synonyms.push(synArg); - delete this.argsDispatch_[synArg]; - } - } - print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); + getDefaultResults() { + return { + logFileName: 'v8.log', + range: 'auto,auto', + }; } - quit(2); -}; +} diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py index 7c92a4ef6ed..105be0c1b63 100755 --- a/deps/v8/tools/js2c.py +++ b/deps/v8/tools/js2c.py @@ -125,6 +125,9 @@ def add_arg(str): end = end + 1 # Remember to add the last match. add_arg(lines[last_match:end-1]) + if arg_index[0] < len(macro.args) -1: + lineno = lines.count(os.linesep, 0, start) + 1 + raise Error('line %s: Too few arguments for macro "%s"' % (lineno, name_pattern.pattern)) result = macro.expand(mapping) # Replace the occurrence of the macro with the expansion lines = lines[:start] + result + lines[end:] diff --git a/deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py b/deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py index 19eff02438f..2925213ced5 100644 --- a/deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py +++ b/deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py @@ -18,5 +18,3 @@ '-s', SHA1_PATH, '--platform=linux*' ]) -else: - print 'Skipping jsfunfuzz download as jsfunfuzz is not set in gyp flags.' diff --git a/deps/v8/tools/linux-tick-processor b/deps/v8/tools/linux-tick-processor index 0b491c3633f..705e07d514d 100755 --- a/deps/v8/tools/linux-tick-processor +++ b/deps/v8/tools/linux-tick-processor @@ -37,6 +37,6 @@ cat $log_file | $d8_exec --enable-os-system \ $tools_path/splaytree.js $tools_path/codemap.js \ $tools_path/csvparser.js $tools_path/consarray.js \ $tools_path/profile.js $tools_path/profile_view.js \ - $tools_path/logreader.js $tools_path/tickprocessor.js \ - $tools_path/SourceMap.js \ + $tools_path/logreader.js $tools_path/arguments.js \ + $tools_path/tickprocessor.js $tools_path/SourceMap.js \ $tools_path/tickprocessor-driver.js -- $@ 2>/dev/null diff --git a/deps/v8/tools/memory/asan/blacklist_win.txt b/deps/v8/tools/memory/asan/blacklist_win.txt new file mode 100644 index 00000000000..2bb1aa9714f --- /dev/null +++ b/deps/v8/tools/memory/asan/blacklist_win.txt @@ -0,0 +1,4 @@ +# The rules in this file are only applied at compile time. If you can modify the +# source in question, consider function attributes to disable instrumentation. +# +# Please think twice before you add or remove these rules. \ No newline at end of file diff --git a/deps/v8/tools/parser-shell.cc b/deps/v8/tools/parser-shell.cc index 7c7da243b5e..1a492239969 100644 --- a/deps/v8/tools/parser-shell.cc +++ b/deps/v8/tools/parser-shell.cc @@ -129,8 +129,8 @@ std::pair RunBaselineParser( int main(int argc, char* argv[]) { v8::V8::SetFlagsFromCommandLine(&argc, argv, true); v8::V8::InitializeICUDefaultLocation(argv[0]); - v8::Platform* platform = v8::platform::CreateDefaultPlatform(); - v8::V8::InitializePlatform(platform); + std::unique_ptr platform = v8::platform::NewDefaultPlatform(); + v8::V8::InitializePlatform(platform.get()); v8::V8::Initialize(); v8::V8::InitializeExternalStartupData(argv[0]); @@ -184,7 +184,6 @@ int main(int argc, char* argv[]) { } v8::V8::Dispose(); v8::V8::ShutdownPlatform(); - delete platform; delete create_params.array_buffer_allocator; return 0; } diff --git a/deps/v8/tools/perf/statistics-for-json.R b/deps/v8/tools/perf/statistics-for-json.R index fde2cd75db1..b731ccc5d3d 100644 --- a/deps/v8/tools/perf/statistics-for-json.R +++ b/deps/v8/tools/perf/statistics-for-json.R @@ -8,9 +8,9 @@ # To use the script, first get some benchmark results, for example via # tools/run_perf.py ../v8-perf/benchmarks/Octane2.1/Octane2.1-TF.json -# --outdir=out/x64.release-on --outdir-no-patch=out/x64.release-off +# --outdir=out/x64.release-on --outdir-secondary=out/x64.release-off # --json-test-results=results-on.json -# --json-test-results-no-patch=results-off.json +# --json-test-results-secondary=results-off.json # then run this script # Rscript statistics-for-json.R results-on.json results-off.json ~/SVG # to produce graphs (and get stdio output of statistical tests). diff --git a/deps/v8/tools/plot-timer-events b/deps/v8/tools/plot-timer-events index b65937cfe6d..3294e858620 100755 --- a/deps/v8/tools/plot-timer-events +++ b/deps/v8/tools/plot-timer-events @@ -78,8 +78,9 @@ fi cat $log_file | $d8_exec $tools_path/csvparser.js $tools_path/splaytree.js \ $tools_path/codemap.js $tools_path/profile.js $tools_path/profile_view.js \ - $tools_path/logreader.js $tools_path/tickprocessor.js \ - $tools_path/profviz/composer.js $tools_path/profviz/stdio.js \ + $tools_path/logreader.js $tools_path/arguments.js \ + $tools_path/tickprocessor.js$tools_path/profviz/composer.js \ + $tools_path/profviz/stdio.js \ -- $@ $options 2>/dev/null > timer-events.plot success=$? diff --git a/deps/v8/tools/presubmit.py b/deps/v8/tools/presubmit.py index c4ee310ce93..22904224594 100755 --- a/deps/v8/tools/presubmit.py +++ b/deps/v8/tools/presubmit.py @@ -54,15 +54,11 @@ # build/header_guard: Our guards have the form "V8_FOO_H_", not "SRC_FOO_H_". # build/include_what_you_use: Started giving false positives for variables # named "string" and "map" assuming that you needed to include STL headers. -# TODO(bmeurer): Fix and re-enable readability/check -# http://crrev.com/2199323003 relands. LINT_RULES = """ -build/header_guard -build/include_what_you_use --readability/check -readability/fn_size -+readability/streams -runtime/references """.split() @@ -512,11 +508,30 @@ def IsRelevant(self, name): return True def GetPathsToSearch(self): - return ['test'] + return ['test', 'tools/testrunner'] def ProcessFiles(self, files): + success = True + for status_file_path in sorted(self._GetStatusFiles(files)): + success &= statusfile.PresubmitCheck(status_file_path) + success &= _CheckStatusFileForDuplicateKeys(status_file_path) + return success + + def _GetStatusFiles(self, files): test_path = join(dirname(TOOLS_PATH), 'test') - status_files = set([]) + testrunner_path = join(TOOLS_PATH, 'testrunner') + status_files = set() + + for file_path in files: + if file_path.startswith(testrunner_path): + for suitepath in os.listdir(test_path): + suitename = os.path.basename(suitepath) + status_file = os.path.join( + test_path, suitename, suitename + ".status") + if os.path.exists(status_file): + status_files.add(status_file) + return status_files + for file_path in files: if file_path.startswith(test_path): # Strip off absolute path prefix pointing to test suites. @@ -530,12 +545,7 @@ def ProcessFiles(self, files): if not os.path.exists(status_file): continue status_files.add(status_file) - - success = True - for status_file_path in sorted(status_files): - success &= statusfile.PresubmitCheck(status_file_path) - success &= _CheckStatusFileForDuplicateKeys(status_file_path) - return success + return status_files def CheckDeps(workspace): diff --git a/deps/v8/tools/profview/profile-utils.js b/deps/v8/tools/profview/profile-utils.js index 3ccf13ab7fb..f5a85bed8d2 100644 --- a/deps/v8/tools/profview/profile-utils.js +++ b/deps/v8/tools/profview/profile-utils.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -"use strict" +"use strict"; let codeKinds = [ "UNKNOWN", @@ -80,13 +80,13 @@ function resolveCodeKindAndVmState(code, vmState) { function codeEquals(code1, code2, allowDifferentKinds = false) { if (!code1 || !code2) return false; - if (code1.name != code2.name || code1.type != code2.type) return false; + if (code1.name !== code2.name || code1.type !== code2.type) return false; - if (code1.type == 'CODE') { - if (!allowDifferentKinds && code1.kind != code2.kind) return false; - } else if (code1.type == 'JS') { - if (!allowDifferentKinds && code1.kind != code2.kind) return false; - if (code1.func != code2.func) return false; + if (code1.type === 'CODE') { + if (!allowDifferentKinds && code1.kind !== code2.kind) return false; + } else if (code1.type === 'JS') { + if (!allowDifferentKinds && code1.kind !== code2.kind) return false; + if (code1.func !== code2.func) return false; } return true; } @@ -409,7 +409,7 @@ class CategorySampler { let { tm : timestamp, vm : vmState, s : stack } = file.ticks[tickIndex]; let i = Math.floor((timestamp - this.firstTime) / this.step); - if (i == this.buckets.length) i--; + if (i === this.buckets.length) i--; console.assert(i >= 0 && i < this.buckets.length); let bucket = this.buckets[i]; @@ -440,7 +440,7 @@ class FunctionTimelineProcessor { // ignoring any filtered entries. let stackCode = undefined; let functionPosInStack = -1; - let filteredI = 0 + let filteredI = 0; for (let i = 0; i < stack.length - 1; i += 2) { let codeId = stack[i]; let code = codeId >= 0 ? file.code[codeId] : undefined; @@ -461,7 +461,7 @@ class FunctionTimelineProcessor { if (functionPosInStack >= 0) { let stackKind = resolveCodeKindAndVmState(stackCode, vmState); - let codeIsTopOfStack = (functionPosInStack == 0); + let codeIsTopOfStack = (functionPosInStack === 0); if (this.currentBlock !== null) { this.currentBlock.end = timestamp; diff --git a/deps/v8/tools/profview/profview.js b/deps/v8/tools/profview/profview.js index 96a6a683282..d480cd4a771 100644 --- a/deps/v8/tools/profview/profview.js +++ b/deps/v8/tools/profview/profview.js @@ -49,7 +49,7 @@ let main = { currentState : emptyState(), setMode(mode) { - if (mode != main.currentState.mode) { + if (mode !== main.currentState.mode) { function setCallTreeModifiers(attribution, categories, sort) { let callTreeState = Object.assign({}, main.currentState.callTree); @@ -84,7 +84,7 @@ let main = { }, setCallTreeAttribution(attribution) { - if (attribution != main.currentState.attribution) { + if (attribution !== main.currentState.attribution) { let callTreeState = Object.assign({}, main.currentState.callTree); callTreeState.attribution = attribution; main.currentState = setCallTreeState(main.currentState, callTreeState); @@ -93,7 +93,7 @@ let main = { }, setCallTreeSort(sort) { - if (sort != main.currentState.sort) { + if (sort !== main.currentState.sort) { let callTreeState = Object.assign({}, main.currentState.callTree); callTreeState.sort = sort; main.currentState = setCallTreeState(main.currentState, callTreeState); @@ -102,7 +102,7 @@ let main = { }, setCallTreeCategories(categories) { - if (categories != main.currentState.categories) { + if (categories !== main.currentState.categories) { let callTreeState = Object.assign({}, main.currentState.callTree); callTreeState.categories = categories; main.currentState = setCallTreeState(main.currentState, callTreeState); @@ -111,8 +111,8 @@ let main = { }, setViewInterval(start, end) { - if (start != main.currentState.start || - end != main.currentState.end) { + if (start !== main.currentState.start || + end !== main.currentState.end) { main.currentState = Object.assign({}, main.currentState); main.currentState.start = start; main.currentState.end = end; @@ -121,8 +121,8 @@ let main = { }, setTimeLineDimensions(width, height) { - if (width != main.currentState.timeLine.width || - height != main.currentState.timeLine.height) { + if (width !== main.currentState.timeLine.width || + height !== main.currentState.timeLine.height) { let timeLine = Object.assign({}, main.currentState.timeLine); timeLine.width = width; timeLine.height = height; @@ -133,7 +133,7 @@ let main = { }, setFile(file) { - if (file != main.currentState.file) { + if (file !== main.currentState.file) { main.currentState = Object.assign({}, main.currentState); main.currentState.file = file; main.delayRender(); @@ -141,7 +141,7 @@ let main = { }, setCurrentCode(codeId) { - if (codeId != main.currentState.currentCodeId) { + if (codeId !== main.currentState.currentCodeId) { main.currentState = Object.assign({}, main.currentState); main.currentState.currentCodeId = codeId; main.delayRender(); @@ -235,7 +235,7 @@ let bucketDescriptors = text : "Unknown" } ]; -let kindToBucketDescriptor = {} +let kindToBucketDescriptor = {}; for (let i = 0; i < bucketDescriptors.length; i++) { let bucket = bucketDescriptors[i]; for (let j = 0; j < bucket.kinds.length; j++) { @@ -335,11 +335,11 @@ function createTableExpander(indent) { } function createFunctionNode(name, codeId) { - if (codeId == -1) { + if (codeId === -1) { return document.createTextNode(name); } let nameElement = document.createElement("span"); - nameElement.classList.add("codeid-link") + nameElement.classList.add("codeid-link"); nameElement.onclick = function() { main.setCurrentCode(codeId); }; @@ -377,13 +377,13 @@ class CallTreeView { if (c1.ticks < c2.ticks) return 1; else if (c1.ticks > c2.ticks) return -1; return c2.ownTicks - c1.ownTicks; - } + }; case "own-time": return (c1, c2) => { if (c1.ownTicks < c2.ownTicks) return 1; else if (c1.ownTicks > c2.ownTicks) return -1; return c2.ticks - c1.ticks; - } + }; case "category-time": return (c1, c2) => { if (c1.type === c2.type) return c2.ticks - c1.ticks; @@ -439,7 +439,7 @@ class CallTreeView { let row = this.rows.insertRow(index); row.id = id + i + "/"; - if (node.type != "CAT") { + if (node.type !== "CAT") { row.style.backgroundColor = bucketFromKind(node.type).backgroundColor; } @@ -631,7 +631,7 @@ class CallTreeView { } else { console.assert(mode === "bottom-up"); - if (this.currentState.callTree.categories == "none") { + if (this.currentState.callTree.categories === "none") { stackProcessor = new PlainCallTreeProcessor(filter, true); } else { diff --git a/deps/v8/tools/profviz/profviz.js b/deps/v8/tools/profviz/profviz.js index 8ac0881eb6f..a7593a6f65f 100644 --- a/deps/v8/tools/profviz/profviz.js +++ b/deps/v8/tools/profviz/profviz.js @@ -33,6 +33,7 @@ var worker_scripts = [ "../profile.js", "../profile_view.js", "../logreader.js", + "../arguments.js", "../tickprocessor.js", "composer.js", "gnuplot-4.6.3-emscripten.js" diff --git a/deps/v8/tools/release/auto_roll.py b/deps/v8/tools/release/auto_roll.py index da4cc7efea4..b27675e60c8 100755 --- a/deps/v8/tools/release/auto_roll.py +++ b/deps/v8/tools/release/auto_roll.py @@ -159,6 +159,7 @@ def RunStep(self): force=True, bypass_hooks=True, cq=self._options.use_commit_queue, + cq_dry_run=self._options.use_dry_run, cwd=cwd) print "CL uploaded." else: @@ -195,9 +196,13 @@ def _PrepareOptions(self, parser): "specified."), parser.add_argument("--roll", help="Deprecated.", default=True, action="store_true") - parser.add_argument("--use-commit-queue", - help="Check the CQ bit on upload.", - default=True, action="store_true") + group = parser.add_mutually_exclusive_group() + group.add_argument("--use-commit-queue", + help="Trigger the CQ full run on upload.", + default=False, action="store_true") + group.add_argument("--use-dry-run", + help="Trigger the CQ dry run on upload.", + default=True, action="store_true") def _ProcessOptions(self, options): # pragma: no cover if not options.author or not options.reviewer: diff --git a/deps/v8/tools/release/check_clusterfuzz.py b/deps/v8/tools/release/check_clusterfuzz.py index 0fdffd93ac2..8af835136b7 100755 --- a/deps/v8/tools/release/check_clusterfuzz.py +++ b/deps/v8/tools/release/check_clusterfuzz.py @@ -214,7 +214,8 @@ def Main(): issues = APIRequest(key, **args) assert issues is not None for issue in issues: - if re.match(spec["crash_state"], issue["crash_state"]): + if (re.match(spec["crash_state"], issue["crash_state"]) and + not issue.get('has_bug_flag')): results.append(issue["id"]) if options.results_file: diff --git a/deps/v8/tools/release/git_recipes.py b/deps/v8/tools/release/git_recipes.py index d831aa3a200..9dedae8a939 100644 --- a/deps/v8/tools/release/git_recipes.py +++ b/deps/v8/tools/release/git_recipes.py @@ -206,7 +206,8 @@ def GitApplyPatch(self, patch_file, reverse=False, **kwargs): self.Git(MakeArgs(args), **kwargs) def GitUpload(self, reviewer="", author="", force=False, cq=False, - bypass_hooks=False, cc="", private=False, **kwargs): + cq_dry_run=False, bypass_hooks=False, cc="", private=False, + **kwargs): args = ["cl upload --send-mail"] if author: args += ["--email", Quoted(author)] @@ -216,6 +217,8 @@ def GitUpload(self, reviewer="", author="", force=False, cq=False, args.append("-f") if cq: args.append("--use-commit-queue") + if cq_dry_run: + args.append("--cq-dry-run") if bypass_hooks: args.append("--bypass-hooks") if cc: diff --git a/deps/v8/tools/release/test_scripts.py b/deps/v8/tools/release/test_scripts.py index 42bbd5a0a1f..759012d8334 100755 --- a/deps/v8/tools/release/test_scripts.py +++ b/deps/v8/tools/release/test_scripts.py @@ -1119,7 +1119,8 @@ def WriteDeps(): self.ROLL_COMMIT_MSG), "", cwd=chrome_dir), Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f " - "--use-commit-queue --bypass-hooks --gerrit", "", cwd=chrome_dir), + "--cq-dry-run --bypass-hooks --gerrit", "", + cwd=chrome_dir), Cmd("git checkout -f master", "", cwd=chrome_dir), Cmd("git branch -D work-branch", "", cwd=chrome_dir), ] diff --git a/deps/v8/tools/release/testdata/node/deps/v8/.gitignore b/deps/v8/tools/release/testdata/node/deps/v8/.gitignore new file mode 100644 index 00000000000..23c2024827b --- /dev/null +++ b/deps/v8/tools/release/testdata/node/deps/v8/.gitignore @@ -0,0 +1,7 @@ +/unrelated +/testing/gtest/* +!/testing/gtest/include +/testing/gtest/include/* +!/testing/gtest/include/gtest +/testing/gtest/include/gtest/* +!/testing/gtest/include/gtest/gtest_prod.h diff --git a/deps/v8/tools/release/testdata/node/deps/v8/baz/delete_me b/deps/v8/tools/release/testdata/node/deps/v8/baz/delete_me new file mode 100644 index 00000000000..eb1ae458f8e --- /dev/null +++ b/deps/v8/tools/release/testdata/node/deps/v8/baz/delete_me @@ -0,0 +1 @@ +... diff --git a/deps/v8/tools/release/testdata/node/deps/v8/baz/v8_foo b/deps/v8/tools/release/testdata/node/deps/v8/baz/v8_foo new file mode 100644 index 00000000000..eb1ae458f8e --- /dev/null +++ b/deps/v8/tools/release/testdata/node/deps/v8/baz/v8_foo @@ -0,0 +1 @@ +... diff --git a/deps/v8/tools/release/testdata/node/deps/v8/delete_me b/deps/v8/tools/release/testdata/node/deps/v8/delete_me new file mode 100644 index 00000000000..eb1ae458f8e --- /dev/null +++ b/deps/v8/tools/release/testdata/node/deps/v8/delete_me @@ -0,0 +1 @@ +... diff --git a/deps/v8/tools/release/testdata/node/deps/v8/include/v8-version.h b/deps/v8/tools/release/testdata/node/deps/v8/include/v8-version.h new file mode 100644 index 00000000000..fe8b2712e3d --- /dev/null +++ b/deps/v8/tools/release/testdata/node/deps/v8/include/v8-version.h @@ -0,0 +1,20 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_INCLUDE_VERSION_H_ // V8_VERSION_H_ conflicts with src/version.h +#define V8_INCLUDE_VERSION_H_ + +// These macros define the version number for the current version. +// NOTE these macros are used by some of the tool scripts and the build +// system so their names cannot be changed without changing the scripts. +#define V8_MAJOR_VERSION 1 +#define V8_MINOR_VERSION 2 +#define V8_BUILD_NUMBER 3 +#define V8_PATCH_LEVEL 4321 + +// Use 1 for candidates and 0 otherwise. +// (Boolean macro values are not supported by all preprocessors.) +#define V8_IS_CANDIDATE_VERSION 0 + +#endif // V8_INCLUDE_VERSION_H_ diff --git a/deps/v8/tools/release/testdata/node/deps/v8/v8_foo b/deps/v8/tools/release/testdata/node/deps/v8/v8_foo new file mode 100644 index 00000000000..eb1ae458f8e --- /dev/null +++ b/deps/v8/tools/release/testdata/node/deps/v8/v8_foo @@ -0,0 +1 @@ +... diff --git a/deps/v8/tools/release/update_node.py b/deps/v8/tools/release/update_node.py index 5ce32e4ec24..d060e5c6157 100755 --- a/deps/v8/tools/release/update_node.py +++ b/deps/v8/tools/release/update_node.py @@ -28,6 +28,7 @@ import shutil import subprocess import sys +import stat TARGET_SUBDIR = os.path.join("deps", "v8") @@ -61,7 +62,11 @@ def UninitGit(path): target = os.path.join(path, ".git") if os.path.isdir(target): print ">> Cleaning up %s" % path - shutil.rmtree(target) + def OnRmError(func, path, exec_info): + # This might happen on Windows + os.chmod(path, stat.S_IWRITE) + os.unlink(path) + shutil.rmtree(target, onerror=OnRmError) def CommitPatch(options): """Makes a dummy commit for the changes in the index. diff --git a/deps/v8/tools/run-deopt-fuzzer.py b/deps/v8/tools/run-deopt-fuzzer.py index 1f50e026024..ac2344b530f 100755 --- a/deps/v8/tools/run-deopt-fuzzer.py +++ b/deps/v8/tools/run-deopt-fuzzer.py @@ -1,492 +1,14 @@ #!/usr/bin/env python # -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. -import json -import math -import multiprocessing -import optparse -import os -from os.path import join -import random -import shlex -import subprocess import sys -import time - -from testrunner.local import execution -from testrunner.local import progress -from testrunner.local import testsuite -from testrunner.local import utils -from testrunner.local import verbose -from testrunner.objects import context - - -# Base dir of the v8 checkout to be used as cwd. -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -ARCH_GUESS = utils.DefaultArch() -DEFAULT_TESTS = ["mjsunit", "webkit"] -TIMEOUT_DEFAULT = 60 -TIMEOUT_SCALEFACTOR = {"debug" : 4, - "release" : 1 } - -MODE_FLAGS = { - "debug" : ["--nohard-abort", "--enable-slow-asserts", - "--verify-heap", "--noconcurrent-recompilation"], - "release" : ["--nohard-abort", "--noconcurrent-recompilation"]} - -SUPPORTED_ARCHS = ["android_arm", - "android_ia32", - "arm", - "ia32", - "ppc", - "ppc64", - "s390", - "s390x", - "mipsel", - "x64"] -# Double the timeout for these: -SLOW_ARCHS = ["android_arm", - "android_ia32", - "arm", - "mipsel"] -MAX_DEOPT = 1000000000 -DISTRIBUTION_MODES = ["smooth", "random"] - - -class RandomDistribution: - def __init__(self, seed=None): - seed = seed or random.randint(1, sys.maxint) - print "Using random distribution with seed %d" % seed - self._random = random.Random(seed) - - def Distribute(self, n, m): - if n > m: - n = m - return self._random.sample(xrange(1, m + 1), n) - - -class SmoothDistribution: - """Distribute n numbers into the interval [1:m]. - F1: Factor of the first derivation of the distribution function. - F2: Factor of the second derivation of the distribution function. - With F1 and F2 set to 0, the distribution will be equal. - """ - def __init__(self, factor1=2.0, factor2=0.2): - self._factor1 = factor1 - self._factor2 = factor2 - - def Distribute(self, n, m): - if n > m: - n = m - if n <= 1: - return [ 1 ] - - result = [] - x = 0.0 - dx = 1.0 - ddx = self._factor1 - dddx = self._factor2 - for i in range(0, n): - result += [ x ] - x += dx - dx += ddx - ddx += dddx - - # Project the distribution into the interval [0:M]. - result = [ x * m / result[-1] for x in result ] - - # Equalize by n. The closer n is to m, the more equal will be the - # distribution. - for (i, x) in enumerate(result): - # The value of x if it was equally distributed. - equal_x = i / float(n - 1) * float(m - 1) + 1 - - # Difference factor between actual and equal distribution. - diff = 1 - (x / equal_x) - - # Equalize x dependent on the number of values to distribute. - result[i] = int(x + (i + 1) * diff) - return result - - -def Distribution(options): - if options.distribution_mode == "random": - return RandomDistribution(options.seed) - if options.distribution_mode == "smooth": - return SmoothDistribution(options.distribution_factor1, - options.distribution_factor2) - - -def BuildOptions(): - result = optparse.OptionParser() - result.add_option("--arch", - help=("The architecture to run tests for, " - "'auto' or 'native' for auto-detect"), - default="ia32,x64,arm") - result.add_option("--arch-and-mode", - help="Architecture and mode in the format 'arch.mode'", - default=None) - result.add_option("--asan", - help="Regard test expectations for ASAN", - default=False, action="store_true") - result.add_option("--buildbot", - help="Adapt to path structure used on buildbots", - default=False, action="store_true") - result.add_option("--dcheck-always-on", - help="Indicates that V8 was compiled with DCHECKs enabled", - default=False, action="store_true") - result.add_option("--command-prefix", - help="Prepended to each shell command used to run a test", - default="") - result.add_option("--coverage", help=("Exponential test coverage " - "(range 0.0, 1.0) -- 0.0: one test, 1.0 all tests (slow)"), - default=0.4, type="float") - result.add_option("--coverage-lift", help=("Lifts test coverage for tests " - "with a small number of deopt points (range 0, inf)"), - default=20, type="int") - result.add_option("--download-data", help="Download missing test suite data", - default=False, action="store_true") - result.add_option("--distribution-factor1", help=("Factor of the first " - "derivation of the distribution function"), default=2.0, - type="float") - result.add_option("--distribution-factor2", help=("Factor of the second " - "derivation of the distribution function"), default=0.7, - type="float") - result.add_option("--distribution-mode", help=("How to select deopt points " - "for a given test (smooth|random)"), - default="smooth") - result.add_option("--dump-results-file", help=("Dump maximum number of " - "deopt points per test to a file")) - result.add_option("--extra-flags", - help="Additional flags to pass to each test command", - default="") - result.add_option("--isolates", help="Whether to test isolates", - default=False, action="store_true") - result.add_option("-j", help="The number of parallel tasks to run", - default=0, type="int") - result.add_option("-m", "--mode", - help="The test modes in which to run (comma-separated)", - default="release,debug") - result.add_option("--outdir", help="Base directory with compile output", - default="out") - result.add_option("-p", "--progress", - help=("The style of progress indicator" - " (verbose, dots, color, mono)"), - choices=progress.PROGRESS_INDICATORS.keys(), - default="mono") - result.add_option("--shard-count", - help="Split testsuites into this number of shards", - default=1, type="int") - result.add_option("--shard-run", - help="Run this shard from the split up tests.", - default=1, type="int") - result.add_option("--shell-dir", help="Directory containing executables", - default="") - result.add_option("--seed", help="The seed for the random distribution", - type="int") - result.add_option("-t", "--timeout", help="Timeout in seconds", - default= -1, type="int") - result.add_option("-v", "--verbose", help="Verbose output", - default=False, action="store_true") - result.add_option("--random-seed", default=0, dest="random_seed", - help="Default seed for initializing random generator") - return result - - -def ProcessOptions(options): - global VARIANT_FLAGS - - # Architecture and mode related stuff. - if options.arch_and_mode: - tokens = options.arch_and_mode.split(".") - options.arch = tokens[0] - options.mode = tokens[1] - options.mode = options.mode.split(",") - for mode in options.mode: - if not mode.lower() in ["debug", "release"]: - print "Unknown mode %s" % mode - return False - if options.arch in ["auto", "native"]: - options.arch = ARCH_GUESS - options.arch = options.arch.split(",") - for arch in options.arch: - if not arch in SUPPORTED_ARCHS: - print "Unknown architecture %s" % arch - return False - - # Special processing of other options, sorted alphabetically. - options.command_prefix = shlex.split(options.command_prefix) - options.extra_flags = shlex.split(options.extra_flags) - if options.j == 0: - options.j = multiprocessing.cpu_count() - while options.random_seed == 0: - options.random_seed = random.SystemRandom().randint(-2147483648, 2147483647) - if not options.distribution_mode in DISTRIBUTION_MODES: - print "Unknown distribution mode %s" % options.distribution_mode - return False - if options.distribution_factor1 < 0.0: - print ("Distribution factor1 %s is out of range. Defaulting to 0.0" - % options.distribution_factor1) - options.distribution_factor1 = 0.0 - if options.distribution_factor2 < 0.0: - print ("Distribution factor2 %s is out of range. Defaulting to 0.0" - % options.distribution_factor2) - options.distribution_factor2 = 0.0 - if options.coverage < 0.0 or options.coverage > 1.0: - print ("Coverage %s is out of range. Defaulting to 0.4" - % options.coverage) - options.coverage = 0.4 - if options.coverage_lift < 0: - print ("Coverage lift %s is out of range. Defaulting to 0" - % options.coverage_lift) - options.coverage_lift = 0 - return True - - -def ShardTests(tests, shard_count, shard_run): - if shard_count < 2: - return tests - if shard_run < 1 or shard_run > shard_count: - print "shard-run not a valid number, should be in [1:shard-count]" - print "defaulting back to running all tests" - return tests - count = 0 - shard = [] - for test in tests: - if count % shard_count == shard_run - 1: - shard.append(test) - count += 1 - return shard - - -def Main(): - # Use the v8 root as cwd as some test cases use "load" with relative paths. - os.chdir(BASE_DIR) - - parser = BuildOptions() - (options, args) = parser.parse_args() - if not ProcessOptions(options): - parser.print_help() - return 1 - - exit_code = 0 - - suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test")) - - if len(args) == 0: - suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] - else: - args_suites = set() - for arg in args: - suite = arg.split(os.path.sep)[0] - if not suite in args_suites: - args_suites.add(suite) - suite_paths = [ s for s in suite_paths if s in args_suites ] - - suites = [] - for root in suite_paths: - suite = testsuite.TestSuite.LoadTestSuite( - os.path.join(BASE_DIR, "test", root)) - if suite: - suites.append(suite) - - if options.download_data: - for s in suites: - s.DownloadData() - - for mode in options.mode: - for arch in options.arch: - try: - code = Execute(arch, mode, args, options, suites, BASE_DIR) - exit_code = exit_code or code - except KeyboardInterrupt: - return 2 - return exit_code - - -def CalculateNTests(m, options): - """Calculates the number of tests from m deopt points with exponential - coverage. - The coverage is expected to be between 0.0 and 1.0. - The 'coverage lift' lifts the coverage for tests with smaller m values. - """ - c = float(options.coverage) - l = float(options.coverage_lift) - return int(math.pow(m, (m * c + l) / (m + l))) - - -def Execute(arch, mode, args, options, suites, workspace): - print(">>> Running tests for %s.%s" % (arch, mode)) - - dist = Distribution(options) - - shell_dir = options.shell_dir - if not shell_dir: - if options.buildbot: - shell_dir = os.path.join(workspace, options.outdir, mode) - mode = mode.lower() - else: - shell_dir = os.path.join(workspace, options.outdir, - "%s.%s" % (arch, mode)) - shell_dir = os.path.relpath(shell_dir) - - # Populate context object. - mode_flags = MODE_FLAGS[mode] - timeout = options.timeout - if timeout == -1: - # Simulators are slow, therefore allow a longer default timeout. - if arch in SLOW_ARCHS: - timeout = 2 * TIMEOUT_DEFAULT; - else: - timeout = TIMEOUT_DEFAULT; - - timeout *= TIMEOUT_SCALEFACTOR[mode] - ctx = context.Context(arch, mode, shell_dir, - mode_flags, options.verbose, - timeout, options.isolates, - options.command_prefix, - options.extra_flags, - False, # Keep i18n on by default. - options.random_seed, - True, # No sorting of test cases. - 0, # Don't rerun failing tests. - 0, # No use of a rerun-failing-tests maximum. - False, # No predictable mode. - False, # No no_harness mode. - False, # Don't use perf data. - False) # Coverage not supported. - - # Find available test suites and read test cases from them. - variables = { - "arch": arch, - "asan": options.asan, - "deopt_fuzzer": True, - "gc_stress": False, - "gcov_coverage": False, - "isolates": options.isolates, - "mode": mode, - "no_i18n": False, - "no_snap": False, - "simulator": utils.UseSimulator(arch), - "system": utils.GuessOS(), - "tsan": False, - "msan": False, - "dcheck_always_on": options.dcheck_always_on, - "novfp3": False, - "predictable": False, - "byteorder": sys.byteorder, - "no_harness": False, - "ubsan_vptr": False, - } - all_tests = [] - num_tests = 0 - test_id = 0 - - # Remember test case prototypes for the fuzzing phase. - test_backup = dict((s, []) for s in suites) - - for s in suites: - s.ReadStatusFile(variables) - s.ReadTestCases(ctx) - if len(args) > 0: - s.FilterTestCasesByArgs(args) - all_tests += s.tests - s.FilterTestCasesByStatus(False) - test_backup[s] = s.tests - analysis_flags = ["--deopt-every-n-times", "%d" % MAX_DEOPT, - "--print-deopt-stress"] - s.tests = [ t.CopyAddingFlags(t.variant, analysis_flags) for t in s.tests ] - num_tests += len(s.tests) - for t in s.tests: - t.id = test_id - test_id += 1 - - if num_tests == 0: - print "No tests to run." - return 0 - - print(">>> Collection phase") - progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() - runner = execution.Runner(suites, progress_indicator, ctx) - - exit_code = runner.Run(options.j) - - print(">>> Analysis phase") - num_tests = 0 - test_id = 0 - for s in suites: - test_results = {} - for t in s.tests: - for line in t.output.stdout.splitlines(): - if line.startswith("=== Stress deopt counter: "): - test_results[t.path] = MAX_DEOPT - int(line.split(" ")[-1]) - for t in s.tests: - if t.path not in test_results: - print "Missing results for %s" % t.path - if options.dump_results_file: - results_dict = dict((t.path, n) for (t, n) in test_results.iteritems()) - with file("%s.%d.txt" % (dump_results_file, time.time()), "w") as f: - f.write(json.dumps(results_dict)) - - # Reset tests and redistribute the prototypes from the collection phase. - s.tests = [] - if options.verbose: - print "Test distributions:" - for t in test_backup[s]: - max_deopt = test_results.get(t.path, 0) - if max_deopt == 0: - continue - n_deopt = CalculateNTests(max_deopt, options) - distribution = dist.Distribute(n_deopt, max_deopt) - if options.verbose: - print "%s %s" % (t.path, distribution) - for i in distribution: - fuzzing_flags = ["--deopt-every-n-times", "%d" % i] - s.tests.append(t.CopyAddingFlags(t.variant, fuzzing_flags)) - num_tests += len(s.tests) - for t in s.tests: - t.id = test_id - test_id += 1 - - if num_tests == 0: - print "No tests to run." - return 0 - - print(">>> Deopt fuzzing phase (%d test cases)" % num_tests) - progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() - runner = execution.Runner(suites, progress_indicator, ctx) - code = runner.Run(options.j) - return exit_code or code +from testrunner import deopt_fuzzer if __name__ == "__main__": - sys.exit(Main()) + sys.exit(deopt_fuzzer.DeoptFuzzer().execute()) diff --git a/deps/v8/tools/run-gc-fuzzer.py b/deps/v8/tools/run-gc-fuzzer.py new file mode 100755 index 00000000000..6311d4fd295 --- /dev/null +++ b/deps/v8/tools/run-gc-fuzzer.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +import sys + +from testrunner import gc_fuzzer + + +if __name__ == "__main__": + sys.exit(gc_fuzzer.GCFuzzer().execute()) diff --git a/deps/v8/tools/run-valgrind.gyp b/deps/v8/tools/run-num-fuzzer.gyp similarity index 76% rename from deps/v8/tools/run-valgrind.gyp rename to deps/v8/tools/run-num-fuzzer.gyp index 02dd26d22ca..bd3b9d6423d 100644 --- a/deps/v8/tools/run-valgrind.gyp +++ b/deps/v8/tools/run-num-fuzzer.gyp @@ -1,4 +1,4 @@ -# Copyright 2016 the V8 project authors. All rights reserved. +# Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -7,7 +7,7 @@ ['test_isolation_mode != "noop"', { 'targets': [ { - 'target_name': 'run_valgrind_run', + 'target_name': 'run_num_fuzzer_run', 'type': 'none', 'dependencies': [ '../src/d8.gyp:d8_run', @@ -17,7 +17,7 @@ '../gypfiles/isolate.gypi', ], 'sources': [ - 'run-valgrind.isolate', + 'run-num-fuzzer.isolate', ], }, ], diff --git a/deps/v8/tools/run-num-fuzzer.isolate b/deps/v8/tools/run-num-fuzzer.isolate new file mode 100644 index 00000000000..4bd3d8b6c0b --- /dev/null +++ b/deps/v8/tools/run-num-fuzzer.isolate @@ -0,0 +1,20 @@ +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'command': [ + 'run-deopt-fuzzer.py', + ], + 'files': [ + 'run-deopt-fuzzer.py', + 'run-gc-fuzzer.py', + ], + }, + 'includes': [ + 'testrunner/testrunner.isolate', + '../src/d8.isolate', + '../test/mjsunit/mjsunit.isolate', + '../test/webkit/webkit.isolate', + ], +} diff --git a/deps/v8/tools/run-tests.py b/deps/v8/tools/run-tests.py index 2dd3782ae57..2ca93855485 100755 --- a/deps/v8/tools/run-tests.py +++ b/deps/v8/tools/run-tests.py @@ -1,973 +1,14 @@ #!/usr/bin/env python # -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. -from collections import OrderedDict -import itertools -import json -import multiprocessing -import optparse -import os -from os.path import getmtime, isdir, join -import platform -import random -import shlex -import subprocess import sys -import time - -from testrunner.local import execution -from testrunner.local import progress -from testrunner.local import testsuite -from testrunner.local.variants import ALL_VARIANTS -from testrunner.local import utils -from testrunner.local import verbose -from testrunner.network import network_execution -from testrunner.objects import context - - -# Base dir of the v8 checkout to be used as cwd. -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -DEFAULT_OUT_GN = "out.gn" - -ARCH_GUESS = utils.DefaultArch() - -# Map of test name synonyms to lists of test suites. Should be ordered by -# expected runtimes (suites with slow test cases first). These groups are -# invoked in separate steps on the bots. -TEST_MAP = { - # This needs to stay in sync with test/bot_default.isolate. - "bot_default": [ - "debugger", - "mjsunit", - "cctest", - "wasm-spec-tests", - "inspector", - "webkit", - "mkgrokdump", - "fuzzer", - "message", - "preparser", - "intl", - "unittests", - ], - # This needs to stay in sync with test/default.isolate. - "default": [ - "debugger", - "mjsunit", - "cctest", - "wasm-spec-tests", - "inspector", - "mkgrokdump", - "fuzzer", - "message", - "preparser", - "intl", - "unittests", - ], - # This needs to stay in sync with test/optimize_for_size.isolate. - "optimize_for_size": [ - "debugger", - "mjsunit", - "cctest", - "inspector", - "webkit", - "intl", - ], - "unittests": [ - "unittests", - ], -} - -TIMEOUT_DEFAULT = 60 - -# Variants ordered by expected runtime (slowest first). -VARIANTS = ["default"] - -MORE_VARIANTS = [ - "stress", - "stress_incremental_marking", - "nooptimization", - "stress_asm_wasm", - "wasm_traps", -] - -EXHAUSTIVE_VARIANTS = MORE_VARIANTS + VARIANTS - -VARIANT_ALIASES = { - # The default for developer workstations. - "dev": VARIANTS, - # Additional variants, run on all bots. - "more": MORE_VARIANTS, - # TODO(machenbach): Deprecate this after the step is removed on infra side. - # Additional variants, run on a subset of bots. - "extra": [], -} - -DEBUG_FLAGS = ["--nohard-abort", "--enable-slow-asserts", "--verify-heap"] -RELEASE_FLAGS = ["--nohard-abort"] - -MODES = { - "debug": { - "flags": DEBUG_FLAGS, - "timeout_scalefactor": 4, - "status_mode": "debug", - "execution_mode": "debug", - "output_folder": "debug", - }, - "optdebug": { - "flags": DEBUG_FLAGS, - "timeout_scalefactor": 4, - "status_mode": "debug", - "execution_mode": "debug", - "output_folder": "optdebug", - }, - "release": { - "flags": RELEASE_FLAGS, - "timeout_scalefactor": 1, - "status_mode": "release", - "execution_mode": "release", - "output_folder": "release", - }, - # Normal trybot release configuration. There, dchecks are always on which - # implies debug is set. Hence, the status file needs to assume debug-like - # behavior/timeouts. - "tryrelease": { - "flags": RELEASE_FLAGS, - "timeout_scalefactor": 1, - "status_mode": "debug", - "execution_mode": "release", - "output_folder": "release", - }, - # This mode requires v8 to be compiled with dchecks and slow dchecks. - "slowrelease": { - "flags": RELEASE_FLAGS + ["--enable-slow-asserts"], - "timeout_scalefactor": 2, - "status_mode": "debug", - "execution_mode": "release", - "output_folder": "release", - }, -} - -GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction", - "--concurrent-recompilation-queue-length=64", - "--concurrent-recompilation-delay=500", - "--concurrent-recompilation"] - -SUPPORTED_ARCHS = ["android_arm", - "android_arm64", - "android_ia32", - "android_x64", - "arm", - "ia32", - "mips", - "mipsel", - "mips64", - "mips64el", - "s390", - "s390x", - "ppc", - "ppc64", - "x64", - "x32", - "arm64"] -# Double the timeout for these: -SLOW_ARCHS = ["android_arm", - "android_arm64", - "android_ia32", - "android_x64", - "arm", - "mips", - "mipsel", - "mips64", - "mips64el", - "s390", - "s390x", - "arm64"] - - -def BuildOptions(): - result = optparse.OptionParser() - result.usage = '%prog [options] [tests]' - result.description = """TESTS: %s""" % (TEST_MAP["default"]) - result.add_option("--arch", - help=("The architecture to run tests for, " - "'auto' or 'native' for auto-detect: %s" % SUPPORTED_ARCHS)) - result.add_option("--arch-and-mode", - help="Architecture and mode in the format 'arch.mode'") - result.add_option("--asan", - help="Regard test expectations for ASAN", - default=False, action="store_true") - result.add_option("--sancov-dir", - help="Directory where to collect coverage data") - result.add_option("--cfi-vptr", - help="Run tests with UBSAN cfi_vptr option.", - default=False, action="store_true") - result.add_option("--buildbot", - help="Adapt to path structure used on buildbots", - default=False, action="store_true") - result.add_option("--dcheck-always-on", - help="Indicates that V8 was compiled with DCHECKs enabled", - default=False, action="store_true") - result.add_option("--novfp3", - help="Indicates that V8 was compiled without VFP3 support", - default=False, action="store_true") - result.add_option("--cat", help="Print the source of the tests", - default=False, action="store_true") - result.add_option("--slow-tests", - help="Regard slow tests (run|skip|dontcare)", - default="dontcare") - result.add_option("--pass-fail-tests", - help="Regard pass|fail tests (run|skip|dontcare)", - default="dontcare") - result.add_option("--gc-stress", - help="Switch on GC stress mode", - default=False, action="store_true") - result.add_option("--gcov-coverage", - help="Uses executables instrumented for gcov coverage", - default=False, action="store_true") - result.add_option("--command-prefix", - help="Prepended to each shell command used to run a test", - default="") - result.add_option("--download-data", help="Download missing test suite data", - default=False, action="store_true") - result.add_option("--download-data-only", - help="Deprecated", - default=False, action="store_true") - result.add_option("--extra-flags", - help="Additional flags to pass to each test command", - action="append", default=[]) - result.add_option("--isolates", help="Whether to test isolates", - default=False, action="store_true") - result.add_option("-j", help="The number of parallel tasks to run", - default=0, type="int") - result.add_option("-m", "--mode", - help="The test modes in which to run (comma-separated," - " uppercase for ninja and buildbot builds): %s" % MODES.keys()) - result.add_option("--no-harness", "--noharness", - help="Run without test harness of a given suite", - default=False, action="store_true") - result.add_option("--no-i18n", "--noi18n", - help="Skip internationalization tests", - default=False, action="store_true") - result.add_option("--network", help="Distribute tests on the network", - default=False, dest="network", action="store_true") - result.add_option("--no-network", "--nonetwork", - help="Don't distribute tests on the network", - dest="network", action="store_false") - result.add_option("--no-presubmit", "--nopresubmit", - help='Skip presubmit checks (deprecated)', - default=False, dest="no_presubmit", action="store_true") - result.add_option("--no-snap", "--nosnap", - help='Test a build compiled without snapshot.', - default=False, dest="no_snap", action="store_true") - result.add_option("--no-sorting", "--nosorting", - help="Don't sort tests according to duration of last run.", - default=False, dest="no_sorting", action="store_true") - result.add_option("--no-variants", "--novariants", - help="Don't run any testing variants", - default=False, dest="no_variants", action="store_true") - result.add_option("--variants", - help="Comma-separated list of testing variants;" - " default: \"%s\"" % ",".join(VARIANTS)) - result.add_option("--exhaustive-variants", - default=False, action="store_true", - help="Use exhaustive set of default variants:" - " \"%s\"" % ",".join(EXHAUSTIVE_VARIANTS)) - result.add_option("--outdir", help="Base directory with compile output", - default="out") - result.add_option("--gn", help="Scan out.gn for the last built configuration", - default=False, action="store_true") - result.add_option("--predictable", - help="Compare output of several reruns of each test", - default=False, action="store_true") - result.add_option("-p", "--progress", - help=("The style of progress indicator" - " (verbose, dots, color, mono)"), - choices=progress.PROGRESS_INDICATORS.keys(), default="mono") - result.add_option("--quickcheck", default=False, action="store_true", - help=("Quick check mode (skip slow tests)")) - result.add_option("--report", help="Print a summary of the tests to be run", - default=False, action="store_true") - result.add_option("--json-test-results", - help="Path to a file for storing json results.") - result.add_option("--flakiness-results", - help="Path to a file for storing flakiness json.") - result.add_option("--rerun-failures-count", - help=("Number of times to rerun each failing test case. " - "Very slow tests will be rerun only once."), - default=0, type="int") - result.add_option("--rerun-failures-max", - help="Maximum number of failing test cases to rerun.", - default=100, type="int") - result.add_option("--shard-count", - help="Split testsuites into this number of shards", - default=1, type="int") - result.add_option("--shard-run", - help="Run this shard from the split up tests.", - default=1, type="int") - result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") - result.add_option("--shell-dir", help="Directory containing executables", - default="") - result.add_option("--dont-skip-slow-simulator-tests", - help="Don't skip more slow tests when using a simulator.", - default=False, action="store_true", - dest="dont_skip_simulator_slow_tests") - result.add_option("--swarming", - help="Indicates running test driver on swarming.", - default=False, action="store_true") - result.add_option("--time", help="Print timing information after running", - default=False, action="store_true") - result.add_option("-t", "--timeout", help="Timeout in seconds", - default=TIMEOUT_DEFAULT, type="int") - result.add_option("--tsan", - help="Regard test expectations for TSAN", - default=False, action="store_true") - result.add_option("-v", "--verbose", help="Verbose output", - default=False, action="store_true") - result.add_option("--valgrind", help="Run tests through valgrind", - default=False, action="store_true") - result.add_option("--warn-unused", help="Report unused rules", - default=False, action="store_true") - result.add_option("--junitout", help="File name of the JUnit output") - result.add_option("--junittestsuite", - help="The testsuite name in the JUnit output file", - default="v8tests") - result.add_option("--random-seed", default=0, dest="random_seed", type="int", - help="Default seed for initializing random generator") - result.add_option("--random-seed-stress-count", default=1, type="int", - dest="random_seed_stress_count", - help="Number of runs with different random seeds") - result.add_option("--ubsan-vptr", - help="Regard test expectations for UBSanVptr", - default=False, action="store_true") - result.add_option("--msan", - help="Regard test expectations for UBSanVptr", - default=False, action="store_true") - return result - - -def RandomSeed(): - seed = 0 - while not seed: - seed = random.SystemRandom().randint(-2147483648, 2147483647) - return seed - - -def BuildbotToV8Mode(config): - """Convert buildbot build configs to configs understood by the v8 runner. - - V8 configs are always lower case and without the additional _x64 suffix for - 64 bit builds on windows with ninja. - """ - mode = config[:-4] if config.endswith('_x64') else config - return mode.lower() - -def SetupEnvironment(options): - """Setup additional environment variables.""" - - # Many tests assume an English interface. - os.environ['LANG'] = 'en_US.UTF-8' - - symbolizer = 'external_symbolizer_path=%s' % ( - os.path.join( - BASE_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'bin', - 'llvm-symbolizer', - ) - ) - - if options.asan: - asan_options = [symbolizer, "allow_user_segv_handler=1"] - if not utils.GuessOS() == 'macos': - # LSAN is not available on mac. - asan_options.append('detect_leaks=1') - os.environ['ASAN_OPTIONS'] = ":".join(asan_options) - - if options.sancov_dir: - assert os.path.exists(options.sancov_dir) - os.environ['ASAN_OPTIONS'] = ":".join([ - 'coverage=1', - 'coverage_dir=%s' % options.sancov_dir, - symbolizer, - "allow_user_segv_handler=1", - ]) - - if options.cfi_vptr: - os.environ['UBSAN_OPTIONS'] = ":".join([ - 'print_stacktrace=1', - 'print_summary=1', - 'symbolize=1', - symbolizer, - ]) - - if options.ubsan_vptr: - os.environ['UBSAN_OPTIONS'] = ":".join([ - 'print_stacktrace=1', - symbolizer, - ]) - - if options.msan: - os.environ['MSAN_OPTIONS'] = symbolizer - - if options.tsan: - suppressions_file = os.path.join( - BASE_DIR, 'tools', 'sanitizers', 'tsan_suppressions.txt') - os.environ['TSAN_OPTIONS'] = " ".join([ - symbolizer, - 'suppressions=%s' % suppressions_file, - 'exit_code=0', - 'report_thread_leaks=0', - 'history_size=7', - 'report_destroy_locked=0', - ]) - -def ProcessOptions(options): - global VARIANTS - - # First try to auto-detect configurations based on the build if GN was - # used. This can't be overridden by cmd-line arguments. - options.auto_detect = False - if options.gn: - gn_out_dir = os.path.join(BASE_DIR, DEFAULT_OUT_GN) - latest_timestamp = -1 - latest_config = None - for gn_config in os.listdir(gn_out_dir): - gn_config_dir = os.path.join(gn_out_dir, gn_config) - if not isdir(gn_config_dir): - continue - if os.path.getmtime(gn_config_dir) > latest_timestamp: - latest_timestamp = os.path.getmtime(gn_config_dir) - latest_config = gn_config - if latest_config: - print(">>> Latest GN build found is %s" % latest_config) - options.outdir = os.path.join(DEFAULT_OUT_GN, latest_config) - - if options.buildbot: - build_config_path = os.path.join( - BASE_DIR, options.outdir, options.mode, "v8_build_config.json") - else: - build_config_path = os.path.join( - BASE_DIR, options.outdir, "v8_build_config.json") - - # Auto-detect test configurations based on the build (GN only). - if os.path.exists(build_config_path): - try: - with open(build_config_path) as f: - build_config = json.load(f) - except Exception: - print ("%s exists but contains invalid json. Is your build up-to-date?" % - build_config_path) - return False - options.auto_detect = True - - # In auto-detect mode the outdir is always where we found the build config. - # This ensures that we'll also take the build products from there. - options.outdir = os.path.dirname(build_config_path) - options.arch_and_mode = None - if options.mode: - # In auto-detect mode we don't use the mode for more path-magic. - # Therefore transform the buildbot mode here to fit to the GN build - # config. - options.mode = BuildbotToV8Mode(options.mode) - - # In V8 land, GN's x86 is called ia32. - if build_config["v8_target_cpu"] == "x86": - build_config["v8_target_cpu"] = "ia32" - - # Update options based on the build config. Sanity check that we're not - # trying to use inconsistent options. - for param, value in ( - ('arch', build_config["v8_target_cpu"]), - ('asan', build_config["is_asan"]), - ('dcheck_always_on', build_config["dcheck_always_on"]), - ('gcov_coverage', build_config["is_gcov_coverage"]), - ('mode', 'debug' if build_config["is_debug"] else 'release'), - ('msan', build_config["is_msan"]), - ('no_i18n', not build_config["v8_enable_i18n_support"]), - ('no_snap', not build_config["v8_use_snapshot"]), - ('tsan', build_config["is_tsan"]), - ('ubsan_vptr', build_config["is_ubsan_vptr"])): - cmd_line_value = getattr(options, param) - if cmd_line_value not in [None, True, False] and cmd_line_value != value: - # TODO(machenbach): This is for string options only. Requires options - # to not have default values. We should make this more modular and - # implement it in our own version of the option parser. - print "Attempted to set %s to %s, while build is %s." % ( - param, cmd_line_value, value) - return False - if cmd_line_value == True and value == False: - print "Attempted to turn on %s, but it's not available." % ( - param) - return False - if cmd_line_value != value: - print ">>> Auto-detected %s=%s" % (param, value) - setattr(options, param, value) - - else: - # Non-GN build without auto-detect. Set default values for missing - # parameters. - if not options.mode: - options.mode = "release,debug" - if not options.arch: - options.arch = "ia32,x64,arm" - - # Architecture and mode related stuff. - if options.arch_and_mode: - options.arch_and_mode = [arch_and_mode.split(".") - for arch_and_mode in options.arch_and_mode.split(",")] - options.arch = ",".join([tokens[0] for tokens in options.arch_and_mode]) - options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode]) - options.mode = options.mode.split(",") - for mode in options.mode: - if not BuildbotToV8Mode(mode) in MODES: - print "Unknown mode %s" % mode - return False - if options.arch in ["auto", "native"]: - options.arch = ARCH_GUESS - options.arch = options.arch.split(",") - for arch in options.arch: - if not arch in SUPPORTED_ARCHS: - print "Unknown architecture %s" % arch - return False - - # Store the final configuration in arch_and_mode list. Don't overwrite - # predefined arch_and_mode since it is more expressive than arch and mode. - if not options.arch_and_mode: - options.arch_and_mode = itertools.product(options.arch, options.mode) - - # Special processing of other options, sorted alphabetically. - - if options.buildbot: - options.network = False - if options.command_prefix and options.network: - print("Specifying --command-prefix disables network distribution, " - "running tests locally.") - options.network = False - options.command_prefix = shlex.split(options.command_prefix) - options.extra_flags = sum(map(shlex.split, options.extra_flags), []) - - if options.gc_stress: - options.extra_flags += GC_STRESS_FLAGS - - if options.asan: - options.extra_flags.append("--invoke-weak-callbacks") - options.extra_flags.append("--omit-quit") - - 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 - - # TODO(machenbach): Figure out how to test a bigger subset of variants on - # msan and tsan. - if options.msan: - VARIANTS = ["default"] - - if options.tsan: - VARIANTS = ["default"] - - if options.j == 0: - options.j = multiprocessing.cpu_count() - - if options.random_seed_stress_count <= 1 and options.random_seed == 0: - options.random_seed = RandomSeed() - - def excl(*args): - """Returns true if zero or one of multiple arguments are true.""" - return reduce(lambda x, y: x + y, args) <= 1 - - if not excl(options.no_variants, bool(options.variants)): - print("Use only one of --no-variants or --variants.") - return False - if options.quickcheck: - VARIANTS = ["default", "stress"] - options.slow_tests = "skip" - options.pass_fail_tests = "skip" - if options.no_variants: - VARIANTS = ["default"] - if options.variants: - VARIANTS = options.variants.split(",") - - # Resolve variant aliases. - VARIANTS = reduce( - list.__add__, - (VARIANT_ALIASES.get(v, [v]) for v in VARIANTS), - [], - ) - - if not set(VARIANTS).issubset(ALL_VARIANTS): - print "All variants must be in %s" % str(ALL_VARIANTS) - return False - if options.predictable: - VARIANTS = ["default"] - options.extra_flags.append("--predictable") - options.extra_flags.append("--verify_predictable") - options.extra_flags.append("--no-inline-new") - - # Dedupe. - VARIANTS = list(set(VARIANTS)) - - if not options.shell_dir: - if options.shell: - print "Warning: --shell is deprecated, use --shell-dir instead." - options.shell_dir = os.path.dirname(options.shell) - if options.valgrind: - run_valgrind = os.path.join("tools", "run-valgrind.py") - # This is OK for distributed running, so we don't need to disable network. - options.command_prefix = (["python", "-u", run_valgrind] + - options.command_prefix) - def CheckTestMode(name, option): - if not option in ["run", "skip", "dontcare"]: - print "Unknown %s mode %s" % (name, option) - return False - return True - if not CheckTestMode("slow test", options.slow_tests): - return False - if not CheckTestMode("pass|fail test", options.pass_fail_tests): - return False - if options.no_i18n: - TEST_MAP["bot_default"].remove("intl") - TEST_MAP["default"].remove("intl") - return True - - -def ShardTests(tests, options): - # Read gtest shard configuration from environment (e.g. set by swarming). - # If none is present, use values passed on the command line. - shard_count = int(os.environ.get('GTEST_TOTAL_SHARDS', options.shard_count)) - shard_run = os.environ.get('GTEST_SHARD_INDEX') - if shard_run is not None: - # The v8 shard_run starts at 1, while GTEST_SHARD_INDEX starts at 0. - shard_run = int(shard_run) + 1 - else: - shard_run = options.shard_run - - if options.shard_count > 1: - # Log if a value was passed on the cmd line and it differs from the - # environment variables. - if options.shard_count != shard_count: - print("shard_count from cmd line differs from environment variable " - "GTEST_TOTAL_SHARDS") - if options.shard_run > 1 and options.shard_run != shard_run: - print("shard_run from cmd line differs from environment variable " - "GTEST_SHARD_INDEX") - - if shard_count < 2: - return tests - if shard_run < 1 or shard_run > shard_count: - print "shard-run not a valid number, should be in [1:shard-count]" - print "defaulting back to running all tests" - return tests - count = 0 - shard = [] - for test in tests: - if count % shard_count == shard_run - 1: - shard.append(test) - count += 1 - return shard - - -def Main(): - # Use the v8 root as cwd as some test cases use "load" with relative paths. - os.chdir(BASE_DIR) - - parser = BuildOptions() - (options, args) = parser.parse_args() - if not ProcessOptions(options): - parser.print_help() - return 1 - SetupEnvironment(options) - - if options.swarming: - # Swarming doesn't print how isolated commands are called. Lets make this - # less cryptic by printing it ourselves. - print ' '.join(sys.argv) - - exit_code = 0 - - suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test")) - - # Use default tests if no test configuration was provided at the cmd line. - if len(args) == 0: - args = ["default"] - - # Expand arguments with grouped tests. The args should reflect the list of - # suites as otherwise filters would break. - def ExpandTestGroups(name): - if name in TEST_MAP: - return [suite for suite in TEST_MAP[name]] - else: - return [name] - args = reduce(lambda x, y: x + y, - [ExpandTestGroups(arg) for arg in args], - []) - - args_suites = OrderedDict() # Used as set - for arg in args: - args_suites[arg.split('/')[0]] = True - suite_paths = [ s for s in args_suites if s in suite_paths ] - - suites = [] - for root in suite_paths: - suite = testsuite.TestSuite.LoadTestSuite( - os.path.join(BASE_DIR, "test", root)) - if suite: - suites.append(suite) - - if options.download_data or options.download_data_only: - for s in suites: - s.DownloadData() - - if options.download_data_only: - return exit_code - - for s in suites: - s.PrepareSources() - - for (arch, mode) in options.arch_and_mode: - try: - code = Execute(arch, mode, args, options, suites) - except KeyboardInterrupt: - return 2 - exit_code = exit_code or code - return exit_code - - -def Execute(arch, mode, args, options, suites): - print(">>> Running tests for %s.%s" % (arch, mode)) - - shell_dir = options.shell_dir - if not shell_dir: - if options.auto_detect: - # If an output dir with a build was passed, test directly in that - # directory. - shell_dir = os.path.join(BASE_DIR, options.outdir) - elif options.buildbot: - # TODO(machenbach): Get rid of different output folder location on - # buildbot. Currently this is capitalized Release and Debug. - shell_dir = os.path.join(BASE_DIR, options.outdir, mode) - mode = BuildbotToV8Mode(mode) - else: - shell_dir = os.path.join( - BASE_DIR, - options.outdir, - "%s.%s" % (arch, MODES[mode]["output_folder"]), - ) - if not os.path.exists(shell_dir): - raise Exception('Could not find shell_dir: "%s"' % shell_dir) - - # Populate context object. - mode_flags = MODES[mode]["flags"] - - # Simulators are slow, therefore allow a longer timeout. - if arch in SLOW_ARCHS: - options.timeout *= 2 - - options.timeout *= MODES[mode]["timeout_scalefactor"] - - if options.predictable: - # Predictable mode is slower. - options.timeout *= 2 - - ctx = context.Context(arch, MODES[mode]["execution_mode"], shell_dir, - mode_flags, options.verbose, - options.timeout, - options.isolates, - options.command_prefix, - options.extra_flags, - options.no_i18n, - options.random_seed, - options.no_sorting, - options.rerun_failures_count, - options.rerun_failures_max, - options.predictable, - options.no_harness, - use_perf_data=not options.swarming, - sancov_dir=options.sancov_dir) - - # TODO(all): Combine "simulator" and "simulator_run". - # TODO(machenbach): In GN we can derive simulator run from - # target_arch != v8_target_arch in the dumped build config. - simulator_run = not options.dont_skip_simulator_slow_tests and \ - arch in ['arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', \ - 'ppc', 'ppc64', 's390', 's390x'] and \ - bool(ARCH_GUESS) and arch != ARCH_GUESS - # Find available test suites and read test cases from them. - variables = { - "arch": arch, - "asan": options.asan, - "deopt_fuzzer": False, - "gc_stress": options.gc_stress, - "gcov_coverage": options.gcov_coverage, - "isolates": options.isolates, - "mode": MODES[mode]["status_mode"], - "no_i18n": options.no_i18n, - "no_snap": options.no_snap, - "simulator_run": simulator_run, - "simulator": utils.UseSimulator(arch), - "system": utils.GuessOS(), - "tsan": options.tsan, - "msan": options.msan, - "dcheck_always_on": options.dcheck_always_on, - "novfp3": options.novfp3, - "predictable": options.predictable, - "byteorder": sys.byteorder, - "no_harness": options.no_harness, - "ubsan_vptr": options.ubsan_vptr, - } - all_tests = [] - num_tests = 0 - for s in suites: - s.ReadStatusFile(variables) - s.ReadTestCases(ctx) - if len(args) > 0: - s.FilterTestCasesByArgs(args) - all_tests += s.tests - - # First filtering by status applying the generic rules (independent of - # variants). - s.FilterTestCasesByStatus(options.warn_unused, options.slow_tests, - options.pass_fail_tests) - - if options.cat: - verbose.PrintTestSource(s.tests) - continue - variant_gen = s.CreateVariantGenerator(VARIANTS) - variant_tests = [ t.CopyAddingFlags(v, flags) - for t in s.tests - for v in variant_gen.FilterVariantsByTest(t) - for flags in variant_gen.GetFlagSets(t, v) ] - - if options.random_seed_stress_count > 1: - # Duplicate test for random seed stress mode. - def iter_seed_flags(): - for i in range(0, options.random_seed_stress_count): - # Use given random seed for all runs (set by default in execution.py) - # or a new random seed if none is specified. - if options.random_seed: - yield [] - else: - yield ["--random-seed=%d" % RandomSeed()] - s.tests = [ - t.CopyAddingFlags(t.variant, flags) - for t in variant_tests - for flags in iter_seed_flags() - ] - else: - s.tests = variant_tests - - # Second filtering by status applying the variant-dependent rules. - s.FilterTestCasesByStatus(options.warn_unused, options.slow_tests, - options.pass_fail_tests, variants=True) - - s.tests = ShardTests(s.tests, options) - num_tests += len(s.tests) - - if options.cat: - return 0 # We're done here. - - if options.report: - verbose.PrintReport(all_tests) - - # Run the tests, either locally or distributed on the network. - start_time = time.time() - progress_indicator = progress.IndicatorNotifier() - progress_indicator.Register(progress.PROGRESS_INDICATORS[options.progress]()) - if options.junitout: - progress_indicator.Register(progress.JUnitTestProgressIndicator( - options.junitout, options.junittestsuite)) - if options.json_test_results: - progress_indicator.Register(progress.JsonTestProgressIndicator( - options.json_test_results, arch, MODES[mode]["execution_mode"], - ctx.random_seed)) - if options.flakiness_results: - progress_indicator.Register(progress.FlakinessTestProgressIndicator( - options.flakiness_results)) - - run_networked = options.network - if not run_networked: - if options.verbose: - print("Network distribution disabled, running tests locally.") - elif utils.GuessOS() != "linux": - print("Network distribution is only supported on Linux, sorry!") - run_networked = False - peers = [] - if run_networked: - peers = network_execution.GetPeers() - if not peers: - print("No connection to distribution server; running tests locally.") - run_networked = False - elif len(peers) == 1: - print("No other peers on the network; running tests locally.") - run_networked = False - elif num_tests <= 100: - print("Less than 100 tests, running them locally.") - run_networked = False - - if run_networked: - runner = network_execution.NetworkedRunner(suites, progress_indicator, - ctx, peers, BASE_DIR) - else: - runner = execution.Runner(suites, progress_indicator, ctx) - - exit_code = runner.Run(options.j) - overall_duration = time.time() - start_time - - if options.time: - verbose.PrintTestDurations(suites, overall_duration) - - if num_tests == 0: - print("Warning: no tests were run!") - - if exit_code == 1 and options.json_test_results: - print("Force exit code 0 after failures. Json test results file generated " - "with failure information.") - exit_code = 0 - - if options.sancov_dir: - # If tests ran with sanitizer coverage, merge coverage files in the end. - try: - print "Merging sancov files." - subprocess.check_call([ - sys.executable, - join(BASE_DIR, "tools", "sanitizers", "sancov_merger.py"), - "--coverage-dir=%s" % options.sancov_dir]) - except: - print >> sys.stderr, "Error: Merging sancov files failed." - exit_code = 1 - return exit_code +from testrunner import standard_runner if __name__ == "__main__": - sys.exit(Main()) + sys.exit(standard_runner.StandardTestRunner().execute()) diff --git a/deps/v8/tools/run-valgrind.isolate b/deps/v8/tools/run-valgrind.isolate deleted file mode 100644 index 5947409e175..00000000000 --- a/deps/v8/tools/run-valgrind.isolate +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2016 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'variables': { - 'command': [ - 'run-valgrind.py', - ], - 'files': [ - 'run-valgrind.py', - ], - }, - 'conditions': [ - ['has_valgrind==1', { - 'variables': { - 'files': [ - # This assumes vagrind binaries have been fetched as a custom deps - # into v8/third_party/valgrind. It is not clear on which target - # machine this will run, but grabbing both is cheap. - '../third_party/valgrind/linux_x86/', - '../third_party/valgrind/linux_x64/', - ], - }, - }], - ], - 'includes': [ - '../src/d8.isolate', - ], -} diff --git a/deps/v8/tools/run-valgrind.py b/deps/v8/tools/run-valgrind.py deleted file mode 100755 index e3f84f58fed..00000000000 --- a/deps/v8/tools/run-valgrind.py +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Simple wrapper for running valgrind and checking the output on -# stderr for memory leaks. -# Uses valgrind from third_party/valgrind. Assumes the executable is passed -# with a path relative to the v8 root. - - -from os import path -import platform -import re -import subprocess -import sys - -V8_ROOT = path.dirname(path.dirname(path.abspath(__file__))) -MACHINE = 'linux_x64' if platform.machine() == 'x86_64' else 'linux_x86' -VALGRIND_ROOT = path.join(V8_ROOT, 'third_party', 'valgrind', MACHINE) -VALGRIND_BIN = path.join(VALGRIND_ROOT, 'bin', 'valgrind') -VALGRIND_LIB = path.join(VALGRIND_ROOT, 'lib', 'valgrind') - -VALGRIND_ARGUMENTS = [ - VALGRIND_BIN, - '--error-exitcode=1', - '--leak-check=full', - '--smc-check=all', -] - -if len(sys.argv) < 2: - print 'Please provide an executable to analyze.' - sys.exit(1) - -executable = path.join(V8_ROOT, sys.argv[1]) -if not path.exists(executable): - print 'Cannot find the file specified: %s' % executable - sys.exit(1) - -# Compute the command line. -command = VALGRIND_ARGUMENTS + [executable] + sys.argv[2:] - -# Run valgrind. -process = subprocess.Popen( - command, - stderr=subprocess.PIPE, - env={'VALGRIND_LIB': VALGRIND_LIB} -) -code = process.wait(); -errors = process.stderr.readlines(); - -# If valgrind produced an error, we report that to the user. -if code != 0: - sys.stderr.writelines(errors) - sys.exit(code) - -# Look through the leak details and make sure that we don't -# have any definitely, indirectly, and possibly lost bytes. -LEAK_RE = r"(?:definitely|indirectly|possibly) lost: " -LEAK_LINE_MATCHER = re.compile(LEAK_RE) -LEAK_OKAY_MATCHER = re.compile(r"lost: 0 bytes in 0 blocks") -leaks = [] -for line in errors: - if LEAK_LINE_MATCHER.search(line): - leaks.append(line) - if not LEAK_OKAY_MATCHER.search(line): - sys.stderr.writelines(errors) - sys.exit(1) - -# Make sure we found between 2 and 3 leak lines. -if len(leaks) < 2 or len(leaks) > 3: - sys.stderr.writelines(errors) - sys.stderr.write('\n\n#### Malformed valgrind output.\n#### Exiting.\n') - sys.exit(1) - -# No leaks found. -sys.stderr.writelines(errors) -sys.exit(0) diff --git a/deps/v8/tools/run_perf.py b/deps/v8/tools/run_perf.py index b22a4f11eaa..0f1646d9eae 100755 --- a/deps/v8/tools/run_perf.py +++ b/deps/v8/tools/run_perf.py @@ -221,8 +221,8 @@ def GetResults(self): class NullMeasurement(object): - """Null object to avoid having extra logic for configurations that didn't - run like running without patch on trybots. + """Null object to avoid having extra logic for configurations that don't + require secondary run, e.g. CI bots. """ def ConsumeOutput(self, stdout): pass @@ -260,7 +260,7 @@ def RunResultsProcessor(results_processor, stdout, count): def AccumulateResults( - graph_names, trace_configs, iter_output, trybot, no_patch, calc_total): + graph_names, trace_configs, iter_output, perform_measurement, calc_total): """Iterates over the output of multiple benchmark reruns and accumulates results for a configured list of traces. @@ -270,14 +270,15 @@ def AccumulateResults( trace_configs: List of "TraceConfig" instances. Each trace config defines how to perform a measurement. iter_output: Iterator over the standard output of each test run. - trybot: Indicates that this is run in trybot mode, i.e. run twice, once - with once without patch. - no_patch: Indicates weather this is a trybot run without patch. + perform_measurement: Whether to actually run tests and perform measurements. + This is needed so that we reuse this script for both CI + and trybot, but want to ignore second run on CI without + having to spread this logic throughout the script. calc_total: Boolean flag to speficy the calculation of a summary trace. Returns: A "Results" object. """ measurements = [ - trace.CreateMeasurement(trybot, no_patch) for trace in trace_configs] + trace.CreateMeasurement(perform_measurement) for trace in trace_configs] for stdout in iter_output(): for measurement in measurements: measurement.ConsumeOutput(stdout) @@ -451,9 +452,8 @@ def __init__(self, suite, parent, arch): super(TraceConfig, self).__init__(suite, parent, arch) assert self.results_regexp - def CreateMeasurement(self, trybot, no_patch): - if not trybot and no_patch: - # Use null object for no-patch logic if this is not a trybot run. + def CreateMeasurement(self, perform_measurement): + if not perform_measurement: return NullMeasurement() return Measurement( @@ -505,22 +505,20 @@ def GetCommand(self, shell_dir, extra_flags=None): def Run(self, runner, trybot): """Iterates over several runs and handles the output for all traces.""" - stdout_with_patch, stdout_no_patch = Unzip(runner()) + stdout, stdout_secondary = Unzip(runner()) return ( AccumulateResults( self.graphs, self._children, - iter_output=self.PostProcess(stdout_with_patch), - trybot=trybot, - no_patch=False, + iter_output=self.PostProcess(stdout), + perform_measurement=True, calc_total=self.total, ), AccumulateResults( self.graphs, self._children, - iter_output=self.PostProcess(stdout_no_patch), - trybot=trybot, - no_patch=True, + iter_output=self.PostProcess(stdout_secondary), + perform_measurement=trybot, # only run second time on trybots calc_total=self.total, ), ) @@ -533,14 +531,14 @@ def __init__(self, suite, parent, arch): def Run(self, runner, trybot): """Iterates over several runs and handles the output.""" - measurement_with_patch = self.CreateMeasurement(trybot, False) - measurement_no_patch = self.CreateMeasurement(trybot, True) - for stdout_with_patch, stdout_no_patch in runner(): - measurement_with_patch.ConsumeOutput(stdout_with_patch) - measurement_no_patch.ConsumeOutput(stdout_no_patch) + measurement = self.CreateMeasurement(perform_measurement=True) + measurement_secondary = self.CreateMeasurement(perform_measurement=trybot) + for stdout, stdout_secondary in runner(): + measurement.ConsumeOutput(stdout) + measurement_secondary.ConsumeOutput(stdout_secondary) return ( - measurement_with_patch.GetResults(), - measurement_no_patch.GetResults(), + measurement.GetResults(), + measurement_secondary.GetResults(), ) @@ -550,10 +548,10 @@ def __init__(self, suite, parent, arch): super(RunnableGenericConfig, self).__init__(suite, parent, arch) def Run(self, runner, trybot): - stdout_with_patch, stdout_no_patch = Unzip(runner()) + stdout, stdout_secondary = Unzip(runner()) return ( - AccumulateGenericResults(self.graphs, self.units, stdout_with_patch), - AccumulateGenericResults(self.graphs, self.units, stdout_no_patch), + AccumulateGenericResults(self.graphs, self.units, stdout), + AccumulateGenericResults(self.graphs, self.units, stdout_secondary), ) @@ -615,7 +613,7 @@ def FlattenRunnables(node, node_cb): class Platform(object): def __init__(self, options): self.shell_dir = options.shell_dir - self.shell_dir_no_patch = options.shell_dir_no_patch + self.shell_dir_secondary = options.shell_dir_secondary self.extra_flags = options.extra_flags.split() @staticmethod @@ -625,24 +623,23 @@ def GetPlatform(options): else: return DesktopPlatform(options) - def _Run(self, runnable, count, no_patch=False): + def _Run(self, runnable, count, secondary=False): raise NotImplementedError() # pragma: no cover def Run(self, runnable, count): """Execute the benchmark's main file. - If options.shell_dir_no_patch is specified, the benchmark is run once with - and once without patch. + If options.shell_dir_secondary is specified, the benchmark is run twice, + e.g. with and without patch. Args: runnable: A Runnable benchmark instance. count: The number of this (repeated) run. - Returns: A tuple with the benchmark outputs with and without patch. The - latter will be None if options.shell_dir_no_patch was not - specified. + Returns: A tuple with the two benchmark outputs. The latter will be None if + options.shell_dir_secondary was not specified. """ - stdout = self._Run(runnable, count, no_patch=False) - if self.shell_dir_no_patch: - return stdout, self._Run(runnable, count, no_patch=True) + stdout = self._Run(runnable, count, secondary=False) + if self.shell_dir_secondary: + return stdout, self._Run(runnable, count, secondary=True) else: return stdout, None @@ -676,9 +673,9 @@ def PreTests(self, node, path): if isinstance(node, RunnableConfig): node.ChangeCWD(path) - def _Run(self, runnable, count, no_patch=False): - suffix = ' - without patch' if no_patch else '' - shell_dir = self.shell_dir_no_patch if no_patch else self.shell_dir + def _Run(self, runnable, count, secondary=False): + suffix = ' - secondary' if secondary else '' + shell_dir = self.shell_dir_secondary if secondary else self.shell_dir title = ">>> %%s (#%d)%s:" % ((count + 1), suffix) if runnable.process_size: command = ["/usr/bin/time", "--format=MaxMemory: %MKB"] @@ -816,18 +813,18 @@ def PreTests(self, node, path): bench_abs = suite_dir self._PushExecutable(self.shell_dir, "bin", node.binary) - if self.shell_dir_no_patch: + if self.shell_dir_secondary: self._PushExecutable( - self.shell_dir_no_patch, "bin_no_patch", node.binary) + self.shell_dir_secondary, "bin_secondary", node.binary) if isinstance(node, RunnableConfig): self._PushFile(bench_abs, node.main, bench_rel) for resource in node.resources: self._PushFile(bench_abs, resource, bench_rel) - def _Run(self, runnable, count, no_patch=False): - suffix = ' - without patch' if no_patch else '' - target_dir = "bin_no_patch" if no_patch else "bin" + def _Run(self, runnable, count, secondary=False): + suffix = ' - secondary' if secondary else '' + target_dir = "bin_secondary" if secondary else "bin" title = ">>> %%s (#%d)%s:" % ((count + 1), suffix) cache = cache_control.CacheControl(self.device) cache.DropRamCaches() @@ -984,17 +981,20 @@ def Main(args): default="") parser.add_option("--json-test-results", help="Path to a file for storing json results.") - parser.add_option("--json-test-results-no-patch", + parser.add_option("--json-test-results-secondary", + "--json-test-results-no-patch", # TODO(sergiyb): Deprecate. help="Path to a file for storing json results from run " - "without patch.") + "without patch or for reference build run.") parser.add_option("--outdir", help="Base directory with compile output", default="out") - parser.add_option("--outdir-no-patch", - help="Base directory with compile output without patch") + parser.add_option("--outdir-secondary", + "--outdir-no-patch", # TODO(sergiyb): Deprecate. + help="Base directory with compile output without patch or " + "for reference build") parser.add_option("--binary-override-path", help="JavaScript engine binary. By default, d8 under " "architecture-specific build dir. " - "Not supported in conjunction with outdir-no-patch.") + "Not supported in conjunction with outdir-secondary.") parser.add_option("--prioritize", help="Raise the priority to nice -20 for the benchmarking " "process.Requires Linux, schedtool, and sudo privileges.", @@ -1040,10 +1040,10 @@ def Main(args): print "Specifying a device requires Android build tools." return 1 - if (options.json_test_results_no_patch and - not options.outdir_no_patch): # pragma: no cover - print("For writing json test results without patch, an outdir without " - "patch must be specified.") + if (options.json_test_results_secondary and + not options.outdir_secondary): # pragma: no cover + print("For writing secondary json test results, a secondary outdir patch " + "must be specified.") return 1 workspace = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) @@ -1060,25 +1060,25 @@ def Main(args): if not os.path.isfile(options.binary_override_path): print "binary-override-path must be a file name" return 1 - if options.outdir_no_patch: - print "specify either binary-override-path or outdir-no-patch" + if options.outdir_secondary: + print "specify either binary-override-path or outdir-secondary" return 1 options.shell_dir = os.path.abspath( os.path.dirname(options.binary_override_path)) default_binary_name = os.path.basename(options.binary_override_path) - if options.outdir_no_patch: - options.shell_dir_no_patch = os.path.join( - workspace, options.outdir_no_patch, build_config) + if options.outdir_secondary: + options.shell_dir_secondary = os.path.join( + workspace, options.outdir_secondary, build_config) else: - options.shell_dir_no_patch = None + options.shell_dir_secondary = None if options.json_test_results: options.json_test_results = os.path.abspath(options.json_test_results) - if options.json_test_results_no_patch: - options.json_test_results_no_patch = os.path.abspath( - options.json_test_results_no_patch) + if options.json_test_results_secondary: + options.json_test_results_secondary = os.path.abspath( + options.json_test_results_secondary) # Ensure all arguments have absolute path before we start changing current # directory. @@ -1089,7 +1089,7 @@ def Main(args): platform = Platform.GetPlatform(options) results = Results() - results_no_patch = Results() + results_secondary = Results() with CustomMachineConfiguration(governor = options.cpu_governor, disable_aslr = options.noaslr) as conf: for path in args: @@ -1129,10 +1129,10 @@ def Runner(): yield platform.Run(runnable, i) # Let runnable iterate over all runs and handle output. - result, result_no_patch = runnable.Run( - Runner, trybot=options.shell_dir_no_patch) + result, result_secondary = runnable.Run( + Runner, trybot=options.shell_dir_secondary) results += result - results_no_patch += result_no_patch + results_secondary += result_secondary platform.PostExecution() if options.json_test_results: @@ -1140,10 +1140,10 @@ def Runner(): else: # pragma: no cover print results - if options.json_test_results_no_patch: - results_no_patch.WriteToFile(options.json_test_results_no_patch) + if options.json_test_results_secondary: + results_secondary.WriteToFile(options.json_test_results_secondary) else: # pragma: no cover - print results_no_patch + print results_secondary return min(1, len(results.errors)) diff --git a/deps/v8/tools/test-server.py b/deps/v8/tools/test-server.py deleted file mode 100755 index ab927de75f4..00000000000 --- a/deps/v8/tools/test-server.py +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import os -import subprocess -import sys - - -PIDFILE = "/tmp/v8-distributed-testing-server.pid" -ROOT = os.path.abspath(os.path.dirname(sys.argv[0])) - - -def _PrintUsage(): - print("""Usage: python %s COMMAND - -Where COMMAND can be any of: - start Starts the server. Forks to the background. - stop Stops the server. - restart Stops, then restarts the server. - setup Creates or updates the environment for the server to run. - update Alias for "setup". - trust Adds the given public key to the list of trusted keys. - help Displays this help text. - """ % sys.argv[0]) - - -def _IsDaemonRunning(): - return os.path.exists(PIDFILE) - - -def _Cmd(cmd): - code = subprocess.call(cmd, shell=True) - if code != 0: - print("Command '%s' returned error code %d" % (cmd, code)) - sys.exit(code) - - -def Update(): - # Create directory for private data storage. - data_dir = os.path.join(ROOT, "data") - if not os.path.exists(data_dir): - os.makedirs(data_dir) - - # Create directory for trusted public keys of peers (and self). - trusted_dir = os.path.join(ROOT, "trusted") - if not os.path.exists(trusted_dir): - os.makedirs(trusted_dir) - - # Install UltraJSON. It is much faster than Python's builtin json. - try: - import ujson #@UnusedImport - except ImportError: - # Install pip if it doesn't exist. - code = subprocess.call("which pip > /dev/null", shell=True) - if code != 0: - apt_get_code = subprocess.call("which apt-get > /dev/null", shell=True) - if apt_get_code == 0: - print("Installing pip...") - _Cmd("sudo apt-get install python-pip") - else: - print("Please install pip on your machine. You can get it at: " - "http://www.pip-installer.org/en/latest/installing.html " - "or via your distro's package manager.") - sys.exit(1) - print("Using pip to install UltraJSON...") - _Cmd("sudo pip install ujson") - - # Make sure we have a key pair for signing binaries. - privkeyfile = os.path.expanduser("~/.ssh/v8_dtest") - if not os.path.exists(privkeyfile): - _Cmd("ssh-keygen -t rsa -f %s -N '' -q" % privkeyfile) - fingerprint = subprocess.check_output("ssh-keygen -lf %s" % privkeyfile, - shell=True) - fingerprint = fingerprint.split(" ")[1].replace(":", "")[:16] - pubkeyfile = os.path.join(trusted_dir, "%s.pem" % fingerprint) - if (not os.path.exists(pubkeyfile) or - os.path.getmtime(pubkeyfile) < os.path.getmtime(privkeyfile)): - _Cmd("openssl rsa -in %s -out %s -pubout" % (privkeyfile, pubkeyfile)) - with open(pubkeyfile, "a") as f: - f.write(fingerprint + "\n") - datafile = os.path.join(data_dir, "mypubkey") - with open(datafile, "w") as f: - f.write(fingerprint + "\n") - - # Check out or update the server implementation in the current directory. - testrunner_dir = os.path.join(ROOT, "testrunner") - if os.path.exists(os.path.join(testrunner_dir, "server/daemon.py")): - _Cmd("cd %s; svn up" % testrunner_dir) - else: - path = ("http://v8.googlecode.com/svn/branches/bleeding_edge/" - "tools/testrunner") - _Cmd("svn checkout --force %s %s" % (path, testrunner_dir)) - - # Update this very script. - path = ("http://v8.googlecode.com/svn/branches/bleeding_edge/" - "tools/test-server.py") - scriptname = os.path.abspath(sys.argv[0]) - _Cmd("svn cat %s > %s" % (path, scriptname)) - - # Check out or update V8. - v8_dir = os.path.join(ROOT, "v8") - if os.path.exists(v8_dir): - _Cmd("cd %s; git fetch" % v8_dir) - else: - _Cmd("git clone git://github.com/v8/v8.git %s" % v8_dir) - - print("Finished.") - - -# Handle "setup" here, because when executing that we can't import anything -# else yet. -if __name__ == "__main__" and len(sys.argv) == 2: - if sys.argv[1] in ("setup", "update"): - if _IsDaemonRunning(): - print("Please stop the server before updating. Exiting.") - sys.exit(1) - Update() - sys.exit(0) - # Other parameters are handled below. - - -#========================================================== -# At this point we can assume that the implementation is available, -# so we can import it. -try: - from testrunner.server import constants - from testrunner.server import local_handler - from testrunner.server import main -except Exception, e: - print(e) - print("Failed to import implementation. Have you run 'setup'?") - sys.exit(1) - - -def _StartDaemon(daemon): - if not os.path.isdir(os.path.join(ROOT, "v8")): - print("No 'v8' working directory found. Have you run 'setup'?") - sys.exit(1) - daemon.start() - - -if __name__ == "__main__": - if len(sys.argv) == 2: - arg = sys.argv[1] - if arg == "start": - daemon = main.Server(PIDFILE, ROOT) - _StartDaemon(daemon) - elif arg == "stop": - daemon = main.Server(PIDFILE, ROOT) - daemon.stop() - elif arg == "restart": - daemon = main.Server(PIDFILE, ROOT) - daemon.stop() - _StartDaemon(daemon) - elif arg in ("help", "-h", "--help"): - _PrintUsage() - elif arg == "status": - if not _IsDaemonRunning(): - print("Server not running.") - else: - print(local_handler.LocalQuery([constants.REQUEST_STATUS])) - else: - print("Unknown command") - _PrintUsage() - sys.exit(2) - elif len(sys.argv) == 3: - arg = sys.argv[1] - if arg == "approve": - filename = sys.argv[2] - if not os.path.exists(filename): - print("%s does not exist.") - sys.exit(1) - filename = os.path.abspath(filename) - if _IsDaemonRunning(): - response = local_handler.LocalQuery([constants.ADD_TRUSTED, filename]) - else: - daemon = main.Server(PIDFILE, ROOT) - response = daemon.CopyToTrusted(filename) - print("Added certificate %s to trusted certificates." % response) - else: - print("Unknown command") - _PrintUsage() - sys.exit(2) - else: - print("Unknown command") - _PrintUsage() - sys.exit(2) - sys.exit(0) diff --git a/deps/v8/tools/testrunner/README b/deps/v8/tools/testrunner/README deleted file mode 100644 index 0771ef9dc27..00000000000 --- a/deps/v8/tools/testrunner/README +++ /dev/null @@ -1,168 +0,0 @@ -Test suite runner for V8, including support for distributed running. -==================================================================== - - -Local usage instructions: -========================= - -Run the main script with --help to get detailed usage instructions: - -$ tools/run-tests.py --help - -The interface is mostly the same as it was for the old test runner. -You'll likely want something like this: - -$ tools/run-tests.py --nonetwork --arch ia32 --mode release - ---nonetwork is the default on Mac and Windows. If you don't specify --arch -and/or --mode, all available values will be used and run in turn (e.g., -omitting --mode from the above example will run ia32 in both Release and Debug -modes). - - -Networked usage instructions: -============================= - -Networked running is only supported on Linux currently. Make sure that all -machines participating in the cluster are binary-compatible (e.g. mixing -Ubuntu Lucid and Precise doesn't work). - -Setup: ------- - -1.) Copy tools/test-server.py to a new empty directory anywhere on your hard - drive (preferably not inside your V8 checkout just to keep things clean). - Please do create a copy, not just a symlink. - -2.) Navigate to the new directory and let the server setup itself: - -$ ./test-server.py setup - - This will install PIP and UltraJSON, create a V8 working directory, and - generate a keypair. - -3.) Swap public keys with someone who's already part of the networked cluster. - -$ cp trusted/`cat data/mypubkey`.pem /where/peers/can/see/it/myname.pem -$ ./test-server.py approve /wherever/they/put/it/yourname.pem - - -Usage: ------- - -1.) Start your server: - -$ ./test-server.py start - -2.) (Optionally) inspect the server's status: - -$ ./test-server.py status - -3.) From your regular V8 working directory, run tests: - -$ tool/run-tests.py --arch ia32 --mode debug - -4.) (Optionally) enjoy the speeeeeeeeeeeeeeeed - - -Architecture overview: -====================== - -Code organization: ------------------- - -This section is written from the point of view of the tools/ directory. - -./run-tests.py: - Main script. Parses command-line options and drives the test execution - procedure from a high level. Imports the actual implementation of all - steps from the testrunner/ directory. - -./test-server.py: - Interface to interact with the server. Contains code to setup the server's - working environment and can start and stop server daemon processes. - Imports some stuff from the testrunner/server/ directory. - -./testrunner/local/*: - Implementation needed to run tests locally. Used by run-tests.py. Inspired by - (and partly copied verbatim from) the original test.py script. - -./testrunner/objects/*: - A bunch of data container classes, used by the scripts in the various other - directories; serializable for transmission over the network. - -./testrunner/network/*: - Equivalents and extensions of some of the functionality in ./testrunner/local/ - as required when dispatching tests to peers on the network. - -./testrunner/network/network_execution.py: - Drop-in replacement for ./testrunner/local/execution that distributes - test jobs to network peers instead of running them locally. - -./testrunner/network/endpoint.py: - Receiving end of a network distributed job, uses the implementation - in ./testrunner/local/execution.py for actually running the tests. - -./testrunner/server/*: - Implementation of the daemon that accepts and runs test execution jobs from - peers on the network. Should ideally have no dependencies on any of the other - directories, but that turned out to be impractical, so there are a few - exceptions. - -./testrunner/server/compression.py: - Defines a wrapper around Python TCP sockets that provides JSON based - serialization, gzip based compression, and ensures message completeness. - - -Networking architecture: ------------------------- - -The distribution stuff is designed to be a layer between deciding which tests -to run on the one side, and actually running them on the other. The frontend -that the user interacts with is the same for local and networked execution, -and the actual test execution and result gathering code is the same too. - -The server daemon starts four separate servers, each listening on another port: -- "Local": Communication with a run-tests.py script running on the same host. - The test driving script e.g. needs to ask for available peers. It then talks - to those peers directly (one of them will be the locally running server). -- "Work": Listens for test job requests from run-tests.py scripts on the network - (including localhost). Accepts an arbitrary number of connections at the - same time, but only works on them in a serialized fashion. -- "Status": Used for communication with other servers on the network, e.g. for - exchanging trusted public keys to create the transitive trust closure. -- "Discovery": Used to detect presence of other peers on the network. - In contrast to the other three, this uses UDP (as opposed to TCP). - - -Give us a diagram! We love diagrams! ------------------------------------- - . - Machine A . Machine B - . -+------------------------------+ . -| run-tests.py | . -| with flag: | . -|--nonetwork --network | . -| | / | | . -| | / | | . -| v / v | . -|BACKEND / distribution | . -+--------- / --------| \ ------+ . - / | \_____________________ - / | . \ - / | . \ -+----- v ----------- v --------+ . +---- v -----------------------+ -| LocalHandler | WorkHandler | . | WorkHandler | LocalHandler | -| | | | . | | | | -| | v | . | v | | -| | BACKEND | . | BACKEND | | -|------------- +---------------| . |---------------+--------------| -| Discovery | StatusHandler <----------> StatusHandler | Discovery | -+---- ^ -----------------------+ . +-------------------- ^ -------+ - | . | - +---------------------------------------------------------+ - -Note that the three occurrences of "BACKEND" are the same code -(testrunner/local/execution.py and its imports), but running from three -distinct directories (and on two different machines). diff --git a/deps/v8/tools/testrunner/base_runner.py b/deps/v8/tools/testrunner/base_runner.py new file mode 100644 index 00000000000..b6ef6fb5cd5 --- /dev/null +++ b/deps/v8/tools/testrunner/base_runner.py @@ -0,0 +1,438 @@ +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +import json +import optparse +import os +import sys + + +# Add testrunner to the path. +sys.path.insert( + 0, + os.path.dirname( + os.path.dirname(os.path.abspath(__file__)))) + + +from local import utils + + +BASE_DIR = ( + os.path.dirname( + os.path.dirname( + os.path.dirname( + os.path.abspath(__file__))))) + +DEFAULT_OUT_GN = 'out.gn' + +ARCH_GUESS = utils.DefaultArch() + +# Map of test name synonyms to lists of test suites. Should be ordered by +# expected runtimes (suites with slow test cases first). These groups are +# invoked in separate steps on the bots. +TEST_MAP = { + # This needs to stay in sync with test/bot_default.isolate. + "bot_default": [ + "debugger", + "mjsunit", + "cctest", + "wasm-spec-tests", + "inspector", + "webkit", + "mkgrokdump", + "fuzzer", + "message", + "preparser", + "intl", + "unittests", + ], + # This needs to stay in sync with test/default.isolate. + "default": [ + "debugger", + "mjsunit", + "cctest", + "wasm-spec-tests", + "inspector", + "mkgrokdump", + "fuzzer", + "message", + "preparser", + "intl", + "unittests", + ], + # This needs to stay in sync with test/optimize_for_size.isolate. + "optimize_for_size": [ + "debugger", + "mjsunit", + "cctest", + "inspector", + "webkit", + "intl", + ], + "unittests": [ + "unittests", + ], +} + + +class ModeConfig(object): + def __init__(self, flags, timeout_scalefactor, status_mode, execution_mode): + self.flags = flags + self.timeout_scalefactor = timeout_scalefactor + self.status_mode = status_mode + self.execution_mode = execution_mode + + +DEBUG_FLAGS = ["--nohard-abort", "--enable-slow-asserts", "--verify-heap"] +RELEASE_FLAGS = ["--nohard-abort"] +MODES = { + "debug": ModeConfig( + flags=DEBUG_FLAGS, + timeout_scalefactor=4, + status_mode="debug", + execution_mode="debug", + ), + "optdebug": ModeConfig( + flags=DEBUG_FLAGS, + timeout_scalefactor=4, + status_mode="debug", + execution_mode="debug", + ), + "release": ModeConfig( + flags=RELEASE_FLAGS, + timeout_scalefactor=1, + status_mode="release", + execution_mode="release", + ), + # Normal trybot release configuration. There, dchecks are always on which + # implies debug is set. Hence, the status file needs to assume debug-like + # behavior/timeouts. + "tryrelease": ModeConfig( + flags=RELEASE_FLAGS, + timeout_scalefactor=1, + status_mode="debug", + execution_mode="release", + ), + # This mode requires v8 to be compiled with dchecks and slow dchecks. + "slowrelease": ModeConfig( + flags=RELEASE_FLAGS + ["--enable-slow-asserts"], + timeout_scalefactor=2, + status_mode="debug", + execution_mode="release", + ), +} + + +class TestRunnerError(Exception): + pass + + +class BuildConfig(object): + def __init__(self, build_config): + # In V8 land, GN's x86 is called ia32. + if build_config['v8_target_cpu'] == 'x86': + self.arch = 'ia32' + else: + self.arch = build_config['v8_target_cpu'] + + self.is_debug = build_config['is_debug'] + self.asan = build_config['is_asan'] + self.cfi_vptr = build_config['is_cfi'] + self.dcheck_always_on = build_config['dcheck_always_on'] + self.gcov_coverage = build_config['is_gcov_coverage'] + self.msan = build_config['is_msan'] + self.no_i18n = not build_config['v8_enable_i18n_support'] + self.no_snap = not build_config['v8_use_snapshot'] + self.predictable = build_config['v8_enable_verify_predictable'] + self.tsan = build_config['is_tsan'] + self.ubsan_vptr = build_config['is_ubsan_vptr'] + + def __str__(self): + detected_options = [] + + if self.asan: + detected_options.append('asan') + if self.cfi_vptr: + detected_options.append('cfi_vptr') + if self.dcheck_always_on: + detected_options.append('dcheck_always_on') + if self.gcov_coverage: + detected_options.append('gcov_coverage') + if self.msan: + detected_options.append('msan') + if self.no_i18n: + detected_options.append('no_i18n') + if self.no_snap: + detected_options.append('no_snap') + if self.predictable: + detected_options.append('predictable') + if self.tsan: + detected_options.append('tsan') + if self.ubsan_vptr: + detected_options.append('ubsan_vptr') + + return '\n'.join(detected_options) + + +class BaseTestRunner(object): + def __init__(self): + self.outdir = None + self.build_config = None + self.mode_name = None + self.mode_options = None + + def execute(self): + try: + parser = self._create_parser() + options, args = self._parse_args(parser) + + self._load_build_config(options) + + try: + self._process_default_options(options) + self._process_options(options) + except TestRunnerError: + parser.print_help() + raise + + self._setup_env() + return self._do_execute(options, args) + except TestRunnerError: + return 1 + + def _create_parser(self): + parser = optparse.OptionParser() + parser.usage = '%prog [options] [tests]' + parser.description = """TESTS: %s""" % (TEST_MAP["default"]) + self._add_parser_default_options(parser) + self._add_parser_options(parser) + return parser + + def _add_parser_default_options(self, parser): + parser.add_option("--gn", help="Scan out.gn for the last built" + " configuration", + default=False, action="store_true") + parser.add_option("--outdir", help="Base directory with compile output", + default="out") + parser.add_option("--buildbot", help="DEPRECATED!", + default=False, action="store_true") + parser.add_option("--arch", + help="The architecture to run tests for") + parser.add_option("-m", "--mode", + help="The test mode in which to run (uppercase for ninja" + " and buildbot builds): %s" % MODES.keys()) + parser.add_option("--shell-dir", help="DEPRECATED! Executables from build " + "directory will be used") + parser.add_option("-v", "--verbose", help="Verbose output", + default=False, action="store_true") + + def _add_parser_options(self, parser): + pass + + def _parse_args(self, parser): + options, args = parser.parse_args() + + if any(map(lambda v: v and ',' in v, + [options.arch, options.mode])): + print 'Multiple arch/mode are deprecated' + raise TestRunnerError() + + return options, args + + def _load_build_config(self, options): + for outdir in self._possible_outdirs(options): + try: + self.build_config = self._do_load_build_config(outdir, options.verbose) + except TestRunnerError: + pass + + if not self.build_config: + print 'Failed to load build config' + raise TestRunnerError + + print 'Build found: %s' % self.outdir + if str(self.build_config): + print '>>> Autodetected:' + print self.build_config + + # Returns possible build paths in order: + # gn + # outdir + # outdir/arch.mode + # Each path is provided in two versions: and /mode for buildbot. + def _possible_outdirs(self, options): + def outdirs(): + if options.gn: + yield self._get_gn_outdir() + return + + yield options.outdir + if options.arch and options.mode: + yield os.path.join(options.outdir, + '%s.%s' % (options.arch, options.mode)) + + for outdir in outdirs(): + yield os.path.join(BASE_DIR, outdir) + + # buildbot option + if options.mode: + yield os.path.join(BASE_DIR, outdir, options.mode) + + def _get_gn_outdir(self): + gn_out_dir = os.path.join(BASE_DIR, DEFAULT_OUT_GN) + latest_timestamp = -1 + latest_config = None + for gn_config in os.listdir(gn_out_dir): + gn_config_dir = os.path.join(gn_out_dir, gn_config) + if not os.path.isdir(gn_config_dir): + continue + if os.path.getmtime(gn_config_dir) > latest_timestamp: + latest_timestamp = os.path.getmtime(gn_config_dir) + latest_config = gn_config + if latest_config: + print(">>> Latest GN build found: %s" % latest_config) + return os.path.join(DEFAULT_OUT_GN, latest_config) + + def _do_load_build_config(self, outdir, verbose=False): + build_config_path = os.path.join(outdir, "v8_build_config.json") + if not os.path.exists(build_config_path): + if verbose: + print("Didn't find build config: %s" % build_config_path) + raise TestRunnerError() + + with open(build_config_path) as f: + try: + build_config_json = json.load(f) + except Exception: + print("%s exists but contains invalid json. Is your build up-to-date?" + % build_config_path) + raise TestRunnerError() + + # In auto-detect mode the outdir is always where we found the build config. + # This ensures that we'll also take the build products from there. + self.outdir = os.path.dirname(build_config_path) + + return BuildConfig(build_config_json) + + def _process_default_options(self, options): + # We don't use the mode for more path-magic. + # Therefore transform the buildbot mode here to fix build_config value. + if options.mode: + options.mode = self._buildbot_to_v8_mode(options.mode) + + build_config_mode = 'debug' if self.build_config.is_debug else 'release' + if options.mode: + if options.mode not in MODES: + print '%s mode is invalid' % options.mode + raise TestRunnerError() + if MODES[options.mode].execution_mode != build_config_mode: + print ('execution mode (%s) for %s is inconsistent with build config ' + '(%s)' % ( + MODES[options.mode].execution_mode, + options.mode, + build_config_mode)) + raise TestRunnerError() + + self.mode_name = options.mode + else: + self.mode_name = build_config_mode + + self.mode_options = MODES[self.mode_name] + + if options.arch and options.arch != self.build_config.arch: + print('--arch value (%s) inconsistent with build config (%s).' % ( + options.arch, self.build_config.arch)) + raise TestRunnerError() + + if options.shell_dir: + print('Warning: --shell-dir is deprecated. Searching for executables in ' + 'build directory (%s) instead.' % self.outdir) + + def _buildbot_to_v8_mode(self, config): + """Convert buildbot build configs to configs understood by the v8 runner. + + V8 configs are always lower case and without the additional _x64 suffix + for 64 bit builds on windows with ninja. + """ + mode = config[:-4] if config.endswith('_x64') else config + return mode.lower() + + def _process_options(self, options): + pass + + def _setup_env(self): + # Use the v8 root as cwd as some test cases use "load" with relative paths. + os.chdir(BASE_DIR) + + # Many tests assume an English interface. + os.environ['LANG'] = 'en_US.UTF-8' + + symbolizer_option = self._get_external_symbolizer_option() + + if self.build_config.asan: + asan_options = [ + symbolizer_option, + 'allow_user_segv_handler=1', + 'allocator_may_return_null=1', + ] + if not utils.GuessOS() in ['macos', 'windows']: + # LSAN is not available on mac and windows. + asan_options.append('detect_leaks=1') + else: + asan_options.append('detect_leaks=0') + os.environ['ASAN_OPTIONS'] = ":".join(asan_options) + + if self.build_config.cfi_vptr: + os.environ['UBSAN_OPTIONS'] = ":".join([ + 'print_stacktrace=1', + 'print_summary=1', + 'symbolize=1', + symbolizer_option, + ]) + + if self.build_config.ubsan_vptr: + os.environ['UBSAN_OPTIONS'] = ":".join([ + 'print_stacktrace=1', + symbolizer_option, + ]) + + if self.build_config.msan: + os.environ['MSAN_OPTIONS'] = symbolizer_option + + if self.build_config.tsan: + suppressions_file = os.path.join( + BASE_DIR, + 'tools', + 'sanitizers', + 'tsan_suppressions.txt') + os.environ['TSAN_OPTIONS'] = " ".join([ + symbolizer_option, + 'suppressions=%s' % suppressions_file, + 'exit_code=0', + 'report_thread_leaks=0', + 'history_size=7', + 'report_destroy_locked=0', + ]) + + def _get_external_symbolizer_option(self): + external_symbolizer_path = os.path.join( + BASE_DIR, + 'third_party', + 'llvm-build', + 'Release+Asserts', + 'bin', + 'llvm-symbolizer', + ) + + if utils.IsWindows(): + # Quote, because sanitizers might confuse colon as option separator. + external_symbolizer_path = '"%s.exe"' % external_symbolizer_path + + return 'external_symbolizer_path=%s' % external_symbolizer_path + + + # TODO(majeski): remove options & args parameters + def _do_execute(self, options, args): + raise NotImplementedError() diff --git a/deps/v8/tools/testrunner/deopt_fuzzer.py b/deps/v8/tools/testrunner/deopt_fuzzer.py new file mode 100755 index 00000000000..75878d442c7 --- /dev/null +++ b/deps/v8/tools/testrunner/deopt_fuzzer.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python +# +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +from os.path import join +import json +import math +import multiprocessing +import os +import random +import shlex +import sys +import time + +# Adds testrunner to the path hence it has to be imported at the beggining. +import base_runner + +from testrunner.local import execution +from testrunner.local import progress +from testrunner.local import testsuite +from testrunner.local import utils +from testrunner.local import verbose +from testrunner.objects import context + + +DEFAULT_TESTS = ["mjsunit", "webkit"] +TIMEOUT_DEFAULT = 60 + +# Double the timeout for these: +SLOW_ARCHS = ["arm", + "mipsel"] +MAX_DEOPT = 1000000000 +DISTRIBUTION_MODES = ["smooth", "random"] + + +class DeoptFuzzer(base_runner.BaseTestRunner): + def __init__(self): + super(DeoptFuzzer, self).__init__() + + class RandomDistribution: + def __init__(self, seed=None): + seed = seed or random.randint(1, sys.maxint) + print "Using random distribution with seed %d" % seed + self._random = random.Random(seed) + + def Distribute(self, n, m): + if n > m: + n = m + return self._random.sample(xrange(1, m + 1), n) + + class SmoothDistribution: + """Distribute n numbers into the interval [1:m]. + F1: Factor of the first derivation of the distribution function. + F2: Factor of the second derivation of the distribution function. + With F1 and F2 set to 0, the distribution will be equal. + """ + def __init__(self, factor1=2.0, factor2=0.2): + self._factor1 = factor1 + self._factor2 = factor2 + + def Distribute(self, n, m): + if n > m: + n = m + if n <= 1: + return [ 1 ] + + result = [] + x = 0.0 + dx = 1.0 + ddx = self._factor1 + dddx = self._factor2 + for i in range(0, n): + result += [ x ] + x += dx + dx += ddx + ddx += dddx + + # Project the distribution into the interval [0:M]. + result = [ x * m / result[-1] for x in result ] + + # Equalize by n. The closer n is to m, the more equal will be the + # distribution. + for (i, x) in enumerate(result): + # The value of x if it was equally distributed. + equal_x = i / float(n - 1) * float(m - 1) + 1 + + # Difference factor between actual and equal distribution. + diff = 1 - (x / equal_x) + + # Equalize x dependent on the number of values to distribute. + result[i] = int(x + (i + 1) * diff) + return result + + + def _distribution(self, options): + if options.distribution_mode == "random": + return self.RandomDistribution(options.seed) + if options.distribution_mode == "smooth": + return self.SmoothDistribution(options.distribution_factor1, + options.distribution_factor2) + + + def _add_parser_options(self, parser): + parser.add_option("--command-prefix", + help="Prepended to each shell command used to run a test", + default="") + parser.add_option("--coverage", help=("Exponential test coverage " + "(range 0.0, 1.0) - 0.0: one test, 1.0 all tests (slow)"), + default=0.4, type="float") + parser.add_option("--coverage-lift", help=("Lifts test coverage for tests " + "with a small number of deopt points (range 0, inf)"), + default=20, type="int") + parser.add_option("--distribution-factor1", help=("Factor of the first " + "derivation of the distribution function"), default=2.0, + type="float") + parser.add_option("--distribution-factor2", help=("Factor of the second " + "derivation of the distribution function"), default=0.7, + type="float") + parser.add_option("--distribution-mode", help=("How to select deopt points " + "for a given test (smooth|random)"), + default="smooth") + parser.add_option("--dump-results-file", help=("Dump maximum number of " + "deopt points per test to a file")) + parser.add_option("--extra-flags", + help="Additional flags to pass to each test command", + default="") + parser.add_option("--isolates", help="Whether to test isolates", + default=False, action="store_true") + parser.add_option("-j", help="The number of parallel tasks to run", + default=0, type="int") + parser.add_option("-p", "--progress", + help=("The style of progress indicator" + " (verbose, dots, color, mono)"), + choices=progress.PROGRESS_INDICATORS.keys(), + default="mono") + parser.add_option("--shard-count", + help="Split testsuites into this number of shards", + default=1, type="int") + parser.add_option("--shard-run", + help="Run this shard from the split up tests.", + default=1, type="int") + parser.add_option("--seed", help="The seed for the random distribution", + type="int") + parser.add_option("-t", "--timeout", help="Timeout in seconds", + default= -1, type="int") + parser.add_option("--random-seed", default=0, dest="random_seed", + help="Default seed for initializing random generator") + parser.add_option("--fuzzer-random-seed", default=0, + help="Default seed for initializing fuzzer random " + "generator") + return parser + + + def _process_options(self, options): + # Special processing of other options, sorted alphabetically. + options.command_prefix = shlex.split(options.command_prefix) + options.extra_flags = shlex.split(options.extra_flags) + if options.j == 0: + options.j = multiprocessing.cpu_count() + while options.random_seed == 0: + options.random_seed = random.SystemRandom().randint(-2147483648, + 2147483647) + if not options.distribution_mode in DISTRIBUTION_MODES: + print "Unknown distribution mode %s" % options.distribution_mode + return False + if options.distribution_factor1 < 0.0: + print ("Distribution factor1 %s is out of range. Defaulting to 0.0" + % options.distribution_factor1) + options.distribution_factor1 = 0.0 + if options.distribution_factor2 < 0.0: + print ("Distribution factor2 %s is out of range. Defaulting to 0.0" + % options.distribution_factor2) + options.distribution_factor2 = 0.0 + if options.coverage < 0.0 or options.coverage > 1.0: + print ("Coverage %s is out of range. Defaulting to 0.4" + % options.coverage) + options.coverage = 0.4 + if options.coverage_lift < 0: + print ("Coverage lift %s is out of range. Defaulting to 0" + % options.coverage_lift) + options.coverage_lift = 0 + return True + + def _shard_tests(self, tests, shard_count, shard_run): + if shard_count < 2: + return tests + if shard_run < 1 or shard_run > shard_count: + print "shard-run not a valid number, should be in [1:shard-count]" + print "defaulting back to running all tests" + return tests + count = 0 + shard = [] + for test in tests: + if count % shard_count == shard_run - 1: + shard.append(test) + count += 1 + return shard + + def _do_execute(self, options, args): + suite_paths = utils.GetSuitePaths(join(base_runner.BASE_DIR, "test")) + + if len(args) == 0: + suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] + else: + args_suites = set() + for arg in args: + suite = arg.split(os.path.sep)[0] + if not suite in args_suites: + args_suites.add(suite) + suite_paths = [ s for s in suite_paths if s in args_suites ] + + suites = [] + for root in suite_paths: + suite = testsuite.TestSuite.LoadTestSuite( + os.path.join(base_runner.BASE_DIR, "test", root)) + if suite: + suites.append(suite) + + try: + return self._execute(args, options, suites) + except KeyboardInterrupt: + return 2 + + + def _calculate_n_tests(self, m, options): + """Calculates the number of tests from m deopt points with exponential + coverage. + The coverage is expected to be between 0.0 and 1.0. + The 'coverage lift' lifts the coverage for tests with smaller m values. + """ + c = float(options.coverage) + l = float(options.coverage_lift) + return int(math.pow(m, (m * c + l) / (m + l))) + + + def _execute(self, args, options, suites): + print(">>> Running tests for %s.%s" % (self.build_config.arch, + self.mode_name)) + + dist = self._distribution(options) + + # Populate context object. + timeout = options.timeout + if timeout == -1: + # Simulators are slow, therefore allow a longer default timeout. + if self.build_config.arch in SLOW_ARCHS: + timeout = 2 * TIMEOUT_DEFAULT; + else: + timeout = TIMEOUT_DEFAULT; + + timeout *= self.mode_options.timeout_scalefactor + ctx = context.Context(self.build_config.arch, + self.mode_options.execution_mode, + self.outdir, + self.mode_options.flags, options.verbose, + timeout, options.isolates, + options.command_prefix, + options.extra_flags, + False, # Keep i18n on by default. + options.random_seed, + True, # No sorting of test cases. + 0, # Don't rerun failing tests. + 0, # No use of a rerun-failing-tests maximum. + False, # No predictable mode. + False, # No no_harness mode. + False, # Don't use perf data. + False) # Coverage not supported. + + # Find available test suites and read test cases from them. + variables = { + "arch": self.build_config.arch, + "asan": self.build_config.asan, + "byteorder": sys.byteorder, + "dcheck_always_on": self.build_config.dcheck_always_on, + "deopt_fuzzer": True, + "gc_fuzzer": False, + "gc_stress": False, + "gcov_coverage": self.build_config.gcov_coverage, + "isolates": options.isolates, + "mode": self.mode_options.status_mode, + "msan": self.build_config.msan, + "no_harness": False, + "no_i18n": self.build_config.no_i18n, + "no_snap": self.build_config.no_snap, + "novfp3": False, + "predictable": self.build_config.predictable, + "simulator": utils.UseSimulator(self.build_config.arch), + "simulator_run": False, + "system": utils.GuessOS(), + "tsan": self.build_config.tsan, + "ubsan_vptr": self.build_config.ubsan_vptr, + } + num_tests = 0 + test_id = 0 + + # Remember test case prototypes for the fuzzing phase. + test_backup = dict((s, []) for s in suites) + + for s in suites: + s.ReadStatusFile(variables) + s.ReadTestCases(ctx) + if len(args) > 0: + s.FilterTestCasesByArgs(args) + s.FilterTestCasesByStatus(False) + for t in s.tests: + t.flags += s.GetStatusfileFlags(t) + + test_backup[s] = s.tests + analysis_flags = ["--deopt-every-n-times", "%d" % MAX_DEOPT, + "--print-deopt-stress"] + s.tests = [t.CopyAddingFlags(t.variant, analysis_flags) for t in s.tests] + num_tests += len(s.tests) + for t in s.tests: + t.id = test_id + test_id += 1 + + if num_tests == 0: + print "No tests to run." + return 0 + + print(">>> Collection phase") + progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() + runner = execution.Runner(suites, progress_indicator, ctx) + + exit_code = runner.Run(options.j) + + print(">>> Analysis phase") + num_tests = 0 + test_id = 0 + for s in suites: + test_results = {} + for t in s.tests: + for line in t.output.stdout.splitlines(): + if line.startswith("=== Stress deopt counter: "): + test_results[t.path] = MAX_DEOPT - int(line.split(" ")[-1]) + for t in s.tests: + if t.path not in test_results: + print "Missing results for %s" % t.path + if options.dump_results_file: + results_dict = dict((t.path, n) for (t, n) in test_results.iteritems()) + with file("%s.%d.txt" % (options.dump_results_file, time.time()), + "w") as f: + f.write(json.dumps(results_dict)) + + # Reset tests and redistribute the prototypes from the collection phase. + s.tests = [] + if options.verbose: + print "Test distributions:" + for t in test_backup[s]: + max_deopt = test_results.get(t.path, 0) + if max_deopt == 0: + continue + n_deopt = self._calculate_n_tests(max_deopt, options) + distribution = dist.Distribute(n_deopt, max_deopt) + if options.verbose: + print "%s %s" % (t.path, distribution) + for i in distribution: + fuzzing_flags = ["--deopt-every-n-times", "%d" % i] + s.tests.append(t.CopyAddingFlags(t.variant, fuzzing_flags)) + num_tests += len(s.tests) + for t in s.tests: + t.id = test_id + test_id += 1 + + if num_tests == 0: + print "No tests to run." + return 0 + + print(">>> Deopt fuzzing phase (%d test cases)" % num_tests) + progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() + runner = execution.Runner(suites, progress_indicator, ctx) + + code = runner.Run(options.j) + return exit_code or code + + +if __name__ == '__main__': + sys.exit(DeoptFuzzer().execute()) diff --git a/deps/v8/tools/testrunner/gc_fuzzer.py b/deps/v8/tools/testrunner/gc_fuzzer.py new file mode 100755 index 00000000000..4130fff8bed --- /dev/null +++ b/deps/v8/tools/testrunner/gc_fuzzer.py @@ -0,0 +1,341 @@ +#!/usr/bin/env python +# +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +from os.path import join +import itertools +import json +import math +import multiprocessing +import os +import random +import shlex +import sys +import time + +# Adds testrunner to the path hence it has to be imported at the beggining. +import base_runner + +from testrunner.local import execution +from testrunner.local import progress +from testrunner.local import testsuite +from testrunner.local import utils +from testrunner.local import verbose +from testrunner.objects import context + + +DEFAULT_TESTS = ["mjsunit", "webkit"] +TIMEOUT_DEFAULT = 60 + +# Double the timeout for these: +SLOW_ARCHS = ["arm", + "mipsel"] + + +class GCFuzzer(base_runner.BaseTestRunner): + def __init__(self): + super(GCFuzzer, self).__init__() + + self.fuzzer_rng = None + + def _add_parser_options(self, parser): + parser.add_option("--command-prefix", + help="Prepended to each shell command used to run a test", + default="") + parser.add_option("--coverage", help=("Exponential test coverage " + "(range 0.0, 1.0) - 0.0: one test, 1.0 all tests (slow)"), + default=0.4, type="float") + parser.add_option("--coverage-lift", help=("Lifts test coverage for tests " + "with a low memory size reached (range 0, inf)"), + default=20, type="int") + parser.add_option("--dump-results-file", help="Dump maximum limit reached") + parser.add_option("--extra-flags", + help="Additional flags to pass to each test command", + default="") + parser.add_option("--isolates", help="Whether to test isolates", + default=False, action="store_true") + parser.add_option("-j", help="The number of parallel tasks to run", + default=0, type="int") + parser.add_option("-p", "--progress", + help=("The style of progress indicator" + " (verbose, dots, color, mono)"), + choices=progress.PROGRESS_INDICATORS.keys(), + default="mono") + parser.add_option("--shard-count", + help="Split testsuites into this number of shards", + default=1, type="int") + parser.add_option("--shard-run", + help="Run this shard from the split up tests.", + default=1, type="int") + parser.add_option("-t", "--timeout", help="Timeout in seconds", + default= -1, type="int") + parser.add_option("--random-seed", default=0, + help="Default seed for initializing random generator") + parser.add_option("--fuzzer-random-seed", default=0, + help="Default seed for initializing fuzzer random " + "generator") + parser.add_option("--stress-compaction", default=False, action="store_true", + help="Enable stress_compaction_percentage flag") + + parser.add_option("--distribution-factor1", help="DEPRECATED") + parser.add_option("--distribution-factor2", help="DEPRECATED") + parser.add_option("--distribution-mode", help="DEPRECATED") + parser.add_option("--seed", help="DEPRECATED") + return parser + + + def _process_options(self, options): + # Special processing of other options, sorted alphabetically. + options.command_prefix = shlex.split(options.command_prefix) + options.extra_flags = shlex.split(options.extra_flags) + if options.j == 0: + options.j = multiprocessing.cpu_count() + while options.random_seed == 0: + options.random_seed = random.SystemRandom().randint(-2147483648, + 2147483647) + while options.fuzzer_random_seed == 0: + options.fuzzer_random_seed = random.SystemRandom().randint(-2147483648, + 2147483647) + self.fuzzer_rng = random.Random(options.fuzzer_random_seed) + return True + + def _shard_tests(self, tests, shard_count, shard_run): + if shard_count < 2: + return tests + if shard_run < 1 or shard_run > shard_count: + print "shard-run not a valid number, should be in [1:shard-count]" + print "defaulting back to running all tests" + return tests + count = 0 + shard = [] + for test in tests: + if count % shard_count == shard_run - 1: + shard.append(test) + count += 1 + return shard + + def _do_execute(self, options, args): + suite_paths = utils.GetSuitePaths(join(base_runner.BASE_DIR, "test")) + + if len(args) == 0: + suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] + else: + args_suites = set() + for arg in args: + suite = arg.split(os.path.sep)[0] + if not suite in args_suites: + args_suites.add(suite) + suite_paths = [ s for s in suite_paths if s in args_suites ] + + suites = [] + for root in suite_paths: + suite = testsuite.TestSuite.LoadTestSuite( + os.path.join(base_runner.BASE_DIR, "test", root)) + if suite: + suites.append(suite) + + try: + return self._execute(args, options, suites) + except KeyboardInterrupt: + return 2 + + + def _calculate_n_tests(self, m, options): + """Calculates the number of tests from m points with exponential coverage. + The coverage is expected to be between 0.0 and 1.0. + The 'coverage lift' lifts the coverage for tests with smaller m values. + """ + c = float(options.coverage) + l = float(options.coverage_lift) + return int(math.pow(m, (m * c + l) / (m + l))) + + + def _execute(self, args, options, suites): + print(">>> Running tests for %s.%s" % (self.build_config.arch, + self.mode_name)) + + # Populate context object. + timeout = options.timeout + if timeout == -1: + # Simulators are slow, therefore allow a longer default timeout. + if self.build_config.arch in SLOW_ARCHS: + timeout = 2 * TIMEOUT_DEFAULT; + else: + timeout = TIMEOUT_DEFAULT; + + timeout *= self.mode_options.timeout_scalefactor + ctx = context.Context(self.build_config.arch, + self.mode_options.execution_mode, + self.outdir, + self.mode_options.flags, options.verbose, + timeout, options.isolates, + options.command_prefix, + options.extra_flags, + False, # Keep i18n on by default. + options.random_seed, + True, # No sorting of test cases. + 0, # Don't rerun failing tests. + 0, # No use of a rerun-failing-tests maximum. + False, # No predictable mode. + False, # No no_harness mode. + False, # Don't use perf data. + False) # Coverage not supported. + + num_tests = self._load_tests(args, options, suites, ctx) + if num_tests == 0: + print "No tests to run." + return 0 + + test_backup = dict(map(lambda s: (s, s.tests), suites)) + + print('>>> Collection phase') + for s in suites: + analysis_flags = [ + # > 100% to not influence default incremental marking, but we need this + # flag to print reached incremental marking limit. + '--stress_marking', '1000', + '--trace_incremental_marking', + ] + s.tests = map(lambda t: t.CopyAddingFlags(t.variant, analysis_flags), + s.tests) + + progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() + runner = execution.Runner(suites, progress_indicator, ctx) + exit_code = runner.Run(options.j) + + print('>>> Analysis phase') + test_results = dict() + for s in suites: + for t in s.tests: + # Skip failed tests. + if s.HasUnexpectedOutput(t): + print '%s failed, skipping' % t.path + continue + max_limit = self._get_max_limit_reached(t) + if max_limit: + test_results[t.path] = max_limit + + if options.dump_results_file: + with file("%s.%d.txt" % (options.dump_results_file, time.time()), + "w") as f: + f.write(json.dumps(test_results)) + + num_tests = 0 + for s in suites: + s.tests = [] + for t in test_backup[s]: + max_percent = test_results.get(t.path, 0) + if not max_percent or max_percent < 1.0: + continue + max_percent = int(max_percent) + + subtests_count = self._calculate_n_tests(max_percent, options) + + if options.verbose: + print ('%s [x%d] (max marking limit=%.02f)' % + (t.path, subtests_count, max_percent)) + for _ in xrange(0, subtests_count): + fuzzer_seed = self._next_fuzzer_seed() + fuzzing_flags = [ + '--stress_marking', str(max_percent), + '--fuzzer_random_seed', str(fuzzer_seed), + ] + if options.stress_compaction: + fuzzing_flags.append('--stress_compaction_random') + s.tests.append(t.CopyAddingFlags(t.variant, fuzzing_flags)) + num_tests += len(s.tests) + + if num_tests == 0: + print "No tests to run." + return 0 + + print(">>> Fuzzing phase (%d test cases)" % num_tests) + progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() + runner = execution.Runner(suites, progress_indicator, ctx) + + return runner.Run(options.j) or exit_code + + def _load_tests(self, args, options, suites, ctx): + # Find available test suites and read test cases from them. + variables = { + "arch": self.build_config.arch, + "asan": self.build_config.asan, + "byteorder": sys.byteorder, + "dcheck_always_on": self.build_config.dcheck_always_on, + "deopt_fuzzer": False, + "gc_fuzzer": True, + "gc_stress": False, + "gcov_coverage": self.build_config.gcov_coverage, + "isolates": options.isolates, + "mode": self.mode_options.status_mode, + "msan": self.build_config.msan, + "no_harness": False, + "no_i18n": self.build_config.no_i18n, + "no_snap": self.build_config.no_snap, + "novfp3": False, + "predictable": self.build_config.predictable, + "simulator": utils.UseSimulator(self.build_config.arch), + "simulator_run": False, + "system": utils.GuessOS(), + "tsan": self.build_config.tsan, + "ubsan_vptr": self.build_config.ubsan_vptr, + } + + num_tests = 0 + test_id = 0 + for s in suites: + s.ReadStatusFile(variables) + s.ReadTestCases(ctx) + if len(args) > 0: + s.FilterTestCasesByArgs(args) + s.FilterTestCasesByStatus(False) + for t in s.tests: + t.flags += s.GetStatusfileFlags(t) + + num_tests += len(s.tests) + for t in s.tests: + t.id = test_id + test_id += 1 + + return num_tests + + # Parses test stdout and returns what was the highest reached percent of the + # incremental marking limit (0-100). + # Skips values >=100% since they already trigger incremental marking. + @staticmethod + def _get_max_limit_reached(test): + def is_im_line(l): + return 'IncrementalMarking' in l and '% of the memory limit reached' in l + + def line_to_percent(l): + return filter(lambda part: '%' in part, l.split(' '))[0] + + def percent_str_to_float(s): + return float(s[:-1]) + + if not (test.output and test.output.stdout): + return None + + im_lines = filter(is_im_line, test.output.stdout.splitlines()) + percents_str = map(line_to_percent, im_lines) + percents = map(percent_str_to_float, percents_str) + + # Skip >= 100%. + percents = filter(lambda p: p < 100, percents) + + if not percents: + return None + return max(percents) + + def _next_fuzzer_seed(self): + fuzzer_seed = None + while not fuzzer_seed: + fuzzer_seed = self.fuzzer_rng.randint(-2147483648, 2147483647) + return fuzzer_seed + + +if __name__ == '__main__': + sys.exit(GCFuzzer().execute()) diff --git a/deps/v8/tools/testrunner/local/commands.py b/deps/v8/tools/testrunner/local/commands.py index b2dc74e4d49..4afd450d2f7 100644 --- a/deps/v8/tools/testrunner/local/commands.py +++ b/deps/v8/tools/testrunner/local/commands.py @@ -106,7 +106,24 @@ def kill_process(process, timeout_result): print "Return code: %d" % tk.returncode sys.stdout.flush() else: + if utils.GuessOS() == "macos": + # TODO(machenbach): Temporary output for investigating hanging test + # driver on mac. + print "Attempting to kill process %d - cmd %s" % (process.pid, args) + try: + print subprocess.check_output( + "ps -e | egrep 'd8|cctest|unittests'", shell=True) + except Exception: + pass + sys.stdout.flush() process.kill() + if utils.GuessOS() == "macos": + # TODO(machenbach): Temporary output for investigating hanging test + # driver on mac. This will probably not print much, since kill only + # sends the signal. + print "Return code after signalling the kill: %s" % process.returncode + sys.stdout.flush() + except OSError: sys.stderr.write('Error: Process %s already ended.\n' % process.pid) @@ -127,6 +144,9 @@ def kill_process(process, timeout_result): ) +# TODO(machenbach): Instead of passing args around, we should introduce an +# immutable Command class (that just represents the command with all flags and +# is pretty-printable) and a member method for running such a command. def Execute(args, verbose=False, timeout=None, env=None): args = [ c for c in args if c != "" ] return RunProcess(verbose, timeout, args, env or {}) diff --git a/deps/v8/tools/testrunner/local/execution.py b/deps/v8/tools/testrunner/local/execution.py index dc55129a147..8cc3556cae8 100644 --- a/deps/v8/tools/testrunner/local/execution.py +++ b/deps/v8/tools/testrunner/local/execution.py @@ -85,23 +85,28 @@ def MakeProcessContext(context, suite_names): def GetCommand(test, context): d8testflag = [] - shell = test.shell() + shell = test.suite.GetShellForTestCase(test) if shell == "d8": d8testflag = ["--test"] if utils.IsWindows(): shell += ".exe" if context.random_seed: d8testflag += ["--random-seed=%s" % context.random_seed] - cmd = (context.command_prefix + - [os.path.abspath(os.path.join(context.shell_dir, shell))] + - d8testflag + - test.suite.GetFlagsForTestCase(test, context) + - context.extra_flags) - return cmd + files, flags, env = test.suite.GetParametersForTestCase(test, context) + cmd = ( + context.command_prefix + + [os.path.abspath(os.path.join(context.shell_dir, shell))] + + d8testflag + + files + + context.extra_flags + + # Flags from test cases can overwrite extra cmd-line flags. + flags + ) + return cmd, env def _GetInstructions(test, context): - command = GetCommand(test, context) + command, env = GetCommand(test, context) timeout = context.timeout if ("--stress-opt" in test.flags or "--stress-opt" in context.mode_flags or @@ -109,11 +114,10 @@ def _GetInstructions(test, context): timeout *= 4 if "--noenable-vfp3" in context.extra_flags: timeout *= 2 - # FIXME(machenbach): Make this more OO. Don't expose default outcomes or - # the like. - if statusfile.IsSlow(test.outcomes or [statusfile.PASS]): - timeout *= 2 - return Instructions(command, test.id, timeout, context.verbose, test.env) + + # TODO(majeski): make it slow outcome dependent. + timeout *= 2 + return Instructions(command, test.id, timeout, context.verbose, env) class Job(object): @@ -156,8 +160,9 @@ def _rename_coverage_data(self, output, context): failures). """ if context.sancov_dir and output.pid is not None: + shell = self.test.suite.GetShellForTestCase(self.test) sancov_file = os.path.join( - context.sancov_dir, "%s.%d.sancov" % (self.test.shell(), output.pid)) + context.sancov_dir, "%s.%d.sancov" % (shell, output.pid)) # Some tests are expected to fail and don't produce coverage data. if os.path.exists(sancov_file): @@ -177,6 +182,7 @@ def Run(self, process_context): self.test.SetSuiteObject(process_context.suites) instr = _GetInstructions(self.test, process_context.context) except Exception, e: + # TODO(majeski): Better exception reporting. return SetupProblem(e, self.test) start_time = time.time() @@ -203,7 +209,7 @@ def __init__(self, suites, progress_indicator, context): self.suite_names = [s.name for s in suites] # Always pre-sort by status file, slowest tests first. - slow_key = lambda t: statusfile.IsSlow(t.outcomes) + slow_key = lambda t: statusfile.IsSlow(t.suite.GetStatusFileOutcomes(t)) self.tests.sort(key=slow_key, reverse=True) # Sort by stored duration of not opted out. diff --git a/deps/v8/tools/testrunner/local/progress.py b/deps/v8/tools/testrunner/local/progress.py index 6321cadece8..e57a6e36c90 100644 --- a/deps/v8/tools/testrunner/local/progress.py +++ b/deps/v8/tools/testrunner/local/progress.py @@ -71,7 +71,7 @@ def PrintFailureHeader(self, test): } def _EscapeCommand(self, test): - command = execution.GetCommand(test, self.runner.context) + command, _ = execution.GetCommand(test, self.runner.context) parts = [] for part in command: if ' ' in part: @@ -336,7 +336,8 @@ def Done(self): "flags": test.flags, "command": self._EscapeCommand(test).replace(ABS_PATH_PREFIX, ""), "duration": test.duration, - "marked_slow": statusfile.IsSlow(test.outcomes), + "marked_slow": statusfile.IsSlow( + test.suite.GetStatusFileOutcomes(test)), } for test in timed_tests[:20] ] @@ -369,13 +370,13 @@ def HasRun(self, test, has_unexpected_output): "stderr": test.output.stderr, "exit_code": test.output.exit_code, "result": test.suite.GetOutcome(test), - "expected": list(test.outcomes or ["PASS"]), + "expected": test.suite.GetExpectedOutcomes(test), "duration": test.duration, # TODO(machenbach): This stores only the global random seed from the # context and not possible overrides when using random-seed stress. "random_seed": self.random_seed, - "target_name": test.suite.shell(), + "target_name": test.suite.GetShellForTestCase(test), "variant": test.variant, }) @@ -414,11 +415,7 @@ def HasRun(self, test, has_unexpected_output): assert outcome in ["PASS", "FAIL", "CRASH", "TIMEOUT"] if test.run == 1: # First run of this test. - expected_outcomes = ([ - expected - for expected in (test.outcomes or ["PASS"]) - if expected in ["PASS", "FAIL", "CRASH", "TIMEOUT"] - ] or ["PASS"]) + expected_outcomes = test.suite.GetExpectedOutcomes(test) self.results[key] = { "actual": outcome, "expected": " ".join(expected_outcomes), diff --git a/deps/v8/tools/testrunner/local/statusfile.py b/deps/v8/tools/testrunner/local/statusfile.py index 880837b8a72..7caf0711cac 100644 --- a/deps/v8/tools/testrunner/local/statusfile.py +++ b/deps/v8/tools/testrunner/local/statusfile.py @@ -31,31 +31,29 @@ from variants import ALL_VARIANTS from utils import Freeze -# These outcomes can occur in a TestCase's outcomes list: -SKIP = "SKIP" +# Possible outcomes FAIL = "FAIL" PASS = "PASS" -OKAY = "OKAY" -TIMEOUT = "TIMEOUT" -CRASH = "CRASH" +TIMEOUT = "TIMEOUT" # TODO(majeski): unused in status files +CRASH = "CRASH" # TODO(majeski): unused in status files + +# Outcomes only for status file, need special handling +FAIL_OK = "FAIL_OK" +FAIL_SLOPPY = "FAIL_SLOPPY" + +# Modifiers +SKIP = "SKIP" SLOW = "SLOW" FAST_VARIANTS = "FAST_VARIANTS" NO_VARIANTS = "NO_VARIANTS" -# These are just for the status files and are mapped below in DEFS: -FAIL_OK = "FAIL_OK" -PASS_OR_FAIL = "PASS_OR_FAIL" -FAIL_SLOPPY = "FAIL_SLOPPY" ALWAYS = "ALWAYS" KEYWORDS = {} -for key in [SKIP, FAIL, PASS, OKAY, CRASH, SLOW, FAIL_OK, - FAST_VARIANTS, NO_VARIANTS, PASS_OR_FAIL, FAIL_SLOPPY, ALWAYS]: +for key in [SKIP, FAIL, PASS, CRASH, SLOW, FAIL_OK, FAST_VARIANTS, NO_VARIANTS, + FAIL_SLOPPY, ALWAYS]: KEYWORDS[key] = key -DEFS = {FAIL_OK: [FAIL, OKAY], - PASS_OR_FAIL: [PASS, FAIL]} - # Support arches, modes to be written as keywords instead of strings. VARIABLES = {ALWAYS: True} for var in ["debug", "release", "big", "little", @@ -87,25 +85,13 @@ def OnlyFastVariants(outcomes): def IsPassOrFail(outcomes): - return ((PASS in outcomes) and (FAIL in outcomes) and - (not CRASH in outcomes) and (not OKAY in outcomes)) + return (PASS in outcomes and + FAIL in outcomes and + CRASH not in outcomes) def IsFailOk(outcomes): - return (FAIL in outcomes) and (OKAY in outcomes) - - -def _AddOutcome(result, new): - global DEFS - if new in DEFS: - mapped = DEFS[new] - if type(mapped) == list: - for m in mapped: - _AddOutcome(result, m) - elif type(mapped) == str: - _AddOutcome(result, mapped) - else: - result.add(new) + return FAIL_OK in outcomes def _JoinsPassAndFail(outcomes1, outcomes2): @@ -114,13 +100,17 @@ def _JoinsPassAndFail(outcomes1, outcomes2): """ return ( PASS in outcomes1 and - not FAIL in outcomes1 and - FAIL in outcomes2 + not (FAIL in outcomes1 or FAIL_OK in outcomes1) and + (FAIL in outcomes2 or FAIL_OK in outcomes2) ) VARIANT_EXPRESSION = object() def _EvalExpression(exp, variables): + """Evaluates expression and returns its result. In case of NameError caused by + undefined "variant" identifier returns VARIANT_EXPRESSION marker. + """ + try: return eval(exp, variables) except NameError as e: @@ -129,32 +119,35 @@ def _EvalExpression(exp, variables): return VARIANT_EXPRESSION -def _EvalVariantExpression(section, rules, wildcards, variant, variables): - variables_with_variant = {} - variables_with_variant.update(variables) +def _EvalVariantExpression( + condition, section, variables, variant, rules, prefix_rules): + variables_with_variant = dict(variables) variables_with_variant["variant"] = variant - result = _EvalExpression(section[0], variables_with_variant) + result = _EvalExpression(condition, variables_with_variant) assert result != VARIANT_EXPRESSION if result is True: _ReadSection( - section[1], - rules[variant], - wildcards[variant], + section, variables_with_variant, + rules[variant], + prefix_rules[variant], ) else: assert result is False, "Make sure expressions evaluate to boolean values" -def _ParseOutcomeList(rule, outcomes, target_dict, variables): +def _ParseOutcomeList(rule, outcomes, variables, target_dict): + """Outcome list format: [condition, outcome, outcome, ...]""" + result = set([]) if type(outcomes) == str: outcomes = [outcomes] for item in outcomes: if type(item) == str: - _AddOutcome(result, item) + result.add(item) elif type(item) == list: - exp = _EvalExpression(item[0], variables) + condition = item[0] + exp = _EvalExpression(condition, variables) assert exp != VARIANT_EXPRESSION, ( "Nested variant expressions are not supported") if exp is False: @@ -166,10 +159,11 @@ def _ParseOutcomeList(rule, outcomes, target_dict, variables): for outcome in item[1:]: assert type(outcome) == str - _AddOutcome(result, outcome) + result.add(outcome) else: assert False - if len(result) == 0: return + if len(result) == 0: + return if rule in target_dict: # A FAIL without PASS in one rule has always precedence over a single # PASS (without FAIL) in another. Otherwise the default PASS expectation @@ -186,51 +180,69 @@ def _ParseOutcomeList(rule, outcomes, target_dict, variables): def ReadContent(content): - global KEYWORDS return eval(content, KEYWORDS) def ReadStatusFile(content, variables): - # Empty defaults for rules and wildcards. Variant-independent + """Status file format + Status file := [section] + section = [CONDITION, section_rules] + section_rules := {path: outcomes} + outcomes := outcome | [outcome, ...] + outcome := SINGLE_OUTCOME | [CONDITION, SINGLE_OUTCOME, SINGLE_OUTCOME, ...] + """ + + # Empty defaults for rules and prefix_rules. Variant-independent # rules are mapped by "", others by the variant name. rules = {variant: {} for variant in ALL_VARIANTS} rules[""] = {} - wildcards = {variant: {} for variant in ALL_VARIANTS} - wildcards[""] = {} + prefix_rules = {variant: {} for variant in ALL_VARIANTS} + prefix_rules[""] = {} variables.update(VARIABLES) - for section in ReadContent(content): - assert type(section) == list - assert len(section) == 2 - exp = _EvalExpression(section[0], variables) + for conditional_section in ReadContent(content): + assert type(conditional_section) == list + assert len(conditional_section) == 2 + condition, section = conditional_section + exp = _EvalExpression(condition, variables) + + # The expression is variant-independent and evaluates to False. if exp is False: - # The expression is variant-independent and evaluates to False. continue - elif exp == VARIANT_EXPRESSION: - # If the expression contains one or more "variant" keywords, we evaluate - # it for all possible variants and create rules for those that apply. - for variant in ALL_VARIANTS: - _EvalVariantExpression(section, rules, wildcards, variant, variables) - else: - # The expression is variant-independent and evaluates to True. - assert exp is True, "Make sure expressions evaluate to boolean values" + + # The expression is variant-independent and evaluates to True. + if exp is True: _ReadSection( - section[1], - rules[""], - wildcards[""], + section, variables, + rules[''], + prefix_rules[''], ) - return Freeze(rules), Freeze(wildcards) + continue + # The expression is variant-dependent (contains "variant" keyword) + if exp == VARIANT_EXPRESSION: + # If the expression contains one or more "variant" keywords, we evaluate + # it for all possible variants and create rules for those that apply. + for variant in ALL_VARIANTS: + _EvalVariantExpression( + condition, section, variables, variant, rules, prefix_rules) + continue -def _ReadSection(section, rules, wildcards, variables): + assert False, "Make sure expressions evaluate to boolean values" + + return Freeze(rules), Freeze(prefix_rules) + + +def _ReadSection(section, variables, rules, prefix_rules): assert type(section) == dict - for rule in section: + for rule, outcome_list in section.iteritems(): assert type(rule) == str + if rule[-1] == '*': - _ParseOutcomeList(rule, section[rule], wildcards, variables) + _ParseOutcomeList(rule[:-1], outcome_list, variables, prefix_rules) else: - _ParseOutcomeList(rule, section[rule], rules, variables) + _ParseOutcomeList(rule, outcome_list, variables, rules) JS_TEST_PATHS = { 'debugger': [[]], @@ -266,6 +278,8 @@ def _assert(check, message): # Like "assert", but doesn't throw. "Suite name prefix must not be used in rule keys") _assert(not rule.endswith('.js'), ".js extension must not be used in rule keys.") + _assert('*' not in rule or (rule.count('*') == 1 and rule[-1] == '*'), + "Only the last character of a rule key can be a wildcard") if basename in JS_TEST_PATHS and '*' not in rule: _assert(any(os.path.exists(os.path.join(os.path.dirname(path), *(paths + [rule + ".js"]))) diff --git a/deps/v8/tools/testrunner/local/statusfile_unittest.py b/deps/v8/tools/testrunner/local/statusfile_unittest.py index f64ab3425ef..299e332c1c8 100755 --- a/deps/v8/tools/testrunner/local/statusfile_unittest.py +++ b/deps/v8/tools/testrunner/local/statusfile_unittest.py @@ -87,7 +87,7 @@ def test_eval_expression(self): ) def test_read_statusfile_section_true(self): - rules, wildcards = statusfile.ReadStatusFile( + rules, prefix_rules = statusfile.ReadStatusFile( TEST_STATUS_FILE % 'system==linux', make_variables()) self.assertEquals( @@ -99,15 +99,15 @@ def test_read_statusfile_section_true(self): ) self.assertEquals( { - 'foo/*': set(['SLOW', 'FAIL']), + 'foo/': set(['SLOW', 'FAIL']), }, - wildcards[''], + prefix_rules[''], ) self.assertEquals({}, rules['default']) - self.assertEquals({}, wildcards['default']) + self.assertEquals({}, prefix_rules['default']) def test_read_statusfile_section_false(self): - rules, wildcards = statusfile.ReadStatusFile( + rules, prefix_rules = statusfile.ReadStatusFile( TEST_STATUS_FILE % 'system==windows', make_variables()) self.assertEquals( @@ -119,15 +119,15 @@ def test_read_statusfile_section_false(self): ) self.assertEquals( { - 'foo/*': set(['PASS', 'SLOW']), + 'foo/': set(['PASS', 'SLOW']), }, - wildcards[''], + prefix_rules[''], ) self.assertEquals({}, rules['default']) - self.assertEquals({}, wildcards['default']) + self.assertEquals({}, prefix_rules['default']) def test_read_statusfile_section_variant(self): - rules, wildcards = statusfile.ReadStatusFile( + rules, prefix_rules = statusfile.ReadStatusFile( TEST_STATUS_FILE % 'system==linux and variant==default', make_variables(), ) @@ -141,9 +141,9 @@ def test_read_statusfile_section_variant(self): ) self.assertEquals( { - 'foo/*': set(['PASS', 'SLOW']), + 'foo/': set(['PASS', 'SLOW']), }, - wildcards[''], + prefix_rules[''], ) self.assertEquals( { @@ -153,9 +153,9 @@ def test_read_statusfile_section_variant(self): ) self.assertEquals( { - 'foo/*': set(['FAIL']), + 'foo/': set(['FAIL']), }, - wildcards['default'], + prefix_rules['default'], ) diff --git a/deps/v8/tools/testrunner/local/testsuite.py b/deps/v8/tools/testrunner/local/testsuite.py index 3b8f956a7ff..946e89a3fca 100644 --- a/deps/v8/tools/testrunner/local/testsuite.py +++ b/deps/v8/tools/testrunner/local/testsuite.py @@ -50,15 +50,17 @@ def __init__(self, suite, variants): def FilterVariantsByTest(self, testcase): result = self.all_variants - if testcase.outcomes: - if statusfile.OnlyStandardVariant(testcase.outcomes): + outcomes = testcase.suite.GetStatusFileOutcomes(testcase) + if outcomes: + if statusfile.OnlyStandardVariant(outcomes): return self.standard_variant - if statusfile.OnlyFastVariants(testcase.outcomes): + if statusfile.OnlyFastVariants(outcomes): result = self.fast_variants return result def GetFlagSets(self, testcase, variant): - if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes): + outcomes = testcase.suite.GetStatusFileOutcomes(testcase) + if outcomes and statusfile.OnlyFastVariants(outcomes): return FAST_VARIANT_FLAGS[variant] else: return ALL_VARIANT_FLAGS[variant] @@ -86,12 +88,11 @@ def __init__(self, name, root): self.name = name # string self.root = root # string containing path self.tests = None # list of TestCase objects - self.rules = None # dictionary mapping test path to list of outcomes - self.wildcards = None # dictionary mapping test paths to list of outcomes + self.rules = None # {variant: {test name: [rule]}} + self.prefix_rules = None # {variant: {test name prefix: [rule]}} self.total_duration = None # float, assigned on demand - def shell(self): - return "d8" + self._outcomes_cache = dict() def suffix(self): return ".js" @@ -131,109 +132,104 @@ def PrepareSources(self): """ pass - def DownloadData(self): - pass - def ReadStatusFile(self, variables): with open(self.status_file()) as f: - self.rules, self.wildcards = ( + self.rules, self.prefix_rules = ( statusfile.ReadStatusFile(f.read(), variables)) def ReadTestCases(self, context): self.tests = self.ListTests(context) - @staticmethod - def _FilterSlow(slow, mode): - return (mode == "run" and not slow) or (mode == "skip" and slow) + def GetStatusfileFlags(self, test): + """Gets runtime flags from a status file. - @staticmethod - def _FilterPassFail(pass_fail, mode): - return (mode == "run" and not pass_fail) or (mode == "skip" and pass_fail) - - def FilterTestCasesByStatus(self, warn_unused_rules, - slow_tests="dontcare", - pass_fail_tests="dontcare", - variants=False): - - # Use only variants-dependent rules and wildcards when filtering - # respective test cases and generic rules when filtering generic test - # cases. - if not variants: - rules = self.rules[""] - wildcards = self.wildcards[""] - else: - # We set rules and wildcards to a variant-specific version for each test - # below. - rules = {} - wildcards = {} + Every outcome that starts with "--" is a flag. Status file has to be loaded + before using this function. + """ + flags = [] + for outcome in self.GetStatusFileOutcomes(test): + if outcome.startswith('--'): + flags.append(outcome) + return flags - filtered = [] + def FilterTestCasesByStatus(self, + slow_tests_mode=None, + pass_fail_tests_mode=None): + """Filters tests by outcomes from status file. + + Status file has to be loaded before using this function. + + Args: + slow_tests_mode: What to do with slow tests. + pass_fail_tests_mode: What to do with pass or fail tests. - # Remember used rules as tuples of (rule, variant), where variant is "" for - # variant-independent rules. + Mode options: + None (default) - don't skip + "skip" - skip if slow/pass_fail + "run" - skip if not slow/pass_fail + """ + def _skip_slow(is_slow, mode): + return ( + (mode == 'run' and not is_slow) or + (mode == 'skip' and is_slow)) + + def _skip_pass_fail(pass_fail, mode): + return ( + (mode == 'run' and not pass_fail) or + (mode == 'skip' and pass_fail)) + + def _compliant(test): + outcomes = self.GetStatusFileOutcomes(test) + if statusfile.DoSkip(outcomes): + return False + if _skip_slow(statusfile.IsSlow(outcomes), slow_tests_mode): + return False + if _skip_pass_fail(statusfile.IsPassOrFail(outcomes), + pass_fail_tests_mode): + return False + return True + + self.tests = filter(_compliant, self.tests) + + def WarnUnusedRules(self, check_variant_rules=False): + """Finds and prints unused rules in status file. + + Rule X is unused when it doesn't apply to any tests, which can also mean + that all matching tests were skipped by another rule before evaluating X. + + Status file has to be loaded before using this function. + """ + + if check_variant_rules: + variants = list(ALL_VARIANTS) + else: + variants = [''] used_rules = set() for t in self.tests: - slow = False - pass_fail = False testname = self.CommonTestName(t) variant = t.variant or "" - if variants: - rules = self.rules[variant] - wildcards = self.wildcards[variant] - if testname in rules: - used_rules.add((testname, variant)) - # Even for skipped tests, as the TestCase object stays around and - # PrintReport() uses it. - t.outcomes = t.outcomes | rules[testname] - if statusfile.DoSkip(t.outcomes): - continue # Don't add skipped tests to |filtered|. - for outcome in t.outcomes: - if outcome.startswith('Flags: '): - t.flags += outcome[7:].split() - slow = statusfile.IsSlow(t.outcomes) - pass_fail = statusfile.IsPassOrFail(t.outcomes) - skip = False - for rule in wildcards: - assert rule[-1] == '*' - if testname.startswith(rule[:-1]): - used_rules.add((rule, variant)) - t.outcomes = t.outcomes | wildcards[rule] - if statusfile.DoSkip(t.outcomes): - skip = True - break # "for rule in wildcards" - slow = slow or statusfile.IsSlow(t.outcomes) - pass_fail = pass_fail or statusfile.IsPassOrFail(t.outcomes) - if (skip - or self._FilterSlow(slow, slow_tests) - or self._FilterPassFail(pass_fail, pass_fail_tests)): - continue # "for t in self.tests" - filtered.append(t) - self.tests = filtered - - if not warn_unused_rules: - return - - if not variants: - for rule in self.rules[""]: - if (rule, "") not in used_rules: - print("Unused rule: %s -> %s (variant independent)" % ( - rule, self.rules[""][rule])) - for rule in self.wildcards[""]: - if (rule, "") not in used_rules: - print("Unused rule: %s -> %s (variant independent)" % ( - rule, self.wildcards[""][rule])) - else: - for variant in ALL_VARIANTS: - for rule in self.rules[variant]: - if (rule, variant) not in used_rules: - print("Unused rule: %s -> %s (variant: %s)" % ( - rule, self.rules[variant][rule], variant)) - for rule in self.wildcards[variant]: - if (rule, variant) not in used_rules: - print("Unused rule: %s -> %s (variant: %s)" % ( - rule, self.wildcards[variant][rule], variant)) + if testname in self.rules.get(variant, {}): + used_rules.add((testname, variant)) + if statusfile.DoSkip(self.rules[variant][testname]): + continue + + for prefix in self.prefix_rules.get(variant, {}): + if testname.startswith(prefix): + used_rules.add((prefix, variant)) + if statusfile.DoSkip(self.prefix_rules[variant][prefix]): + break + + for variant in variants: + for rule, value in (list(self.rules.get(variant, {}).iteritems()) + + list(self.prefix_rules.get(variant, {}).iteritems())): + if (rule, variant) not in used_rules: + if variant == '': + variant_desc = 'variant independent' + else: + variant_desc = 'variant: %s' % variant + print('Unused rule: %s -> %s (%s)' % (rule, value, variant_desc)) def FilterTestCasesByArgs(self, args): """Filter test cases based on command-line arguments. @@ -260,7 +256,66 @@ def FilterTestCasesByArgs(self, args): break self.tests = filtered - def GetFlagsForTestCase(self, testcase, context): + def GetExpectedOutcomes(self, testcase): + """Gets expected outcomes from status file. + + It differs from GetStatusFileOutcomes by selecting only outcomes that can + be result of test execution. + Status file has to be loaded before using this function. + """ + outcomes = self.GetStatusFileOutcomes(testcase) + + expected = [] + if (statusfile.FAIL in outcomes or + statusfile.FAIL_OK in outcomes): + expected.append(statusfile.FAIL) + + if statusfile.CRASH in outcomes: + expected.append(statusfile.CRASH) + + if statusfile.PASS in outcomes: + expected.append(statusfile.PASS) + + return expected or [statusfile.PASS] + + def GetStatusFileOutcomes(self, testcase): + """Gets outcomes from status file. + + Merges variant dependent and independent rules. Status file has to be loaded + before using this function. + """ + variant = testcase.variant or '' + testname = self.CommonTestName(testcase) + cache_key = '%s$%s' % (testname, variant) + + if cache_key not in self._outcomes_cache: + # Load statusfile to get outcomes for the first time. + assert(self.rules is not None) + assert(self.prefix_rules is not None) + + outcomes = frozenset() + + for key in set([variant, '']): + rules = self.rules.get(key, {}) + prefix_rules = self.prefix_rules.get(key, {}) + + if testname in rules: + outcomes |= rules[testname] + + for prefix in prefix_rules: + if testname.startswith(prefix): + outcomes |= prefix_rules[prefix] + + self._outcomes_cache[cache_key] = outcomes + + return self._outcomes_cache[cache_key] + + def GetShellForTestCase(self, testcase): + """Returns shell to be executed for this test case.""" + return 'd8' + + def GetParametersForTestCase(self, testcase, context): + """Returns a tuple of (files, flags, env) for this test case.""" raise NotImplementedError def GetSourceForTest(self, testcase): @@ -290,8 +345,7 @@ def GetOutcome(self, testcase): return statusfile.PASS def HasUnexpectedOutput(self, testcase): - outcome = self.GetOutcome(testcase) - return not outcome in (testcase.outcomes or [statusfile.PASS]) + return self.GetOutcome(testcase) not in self.GetExpectedOutcomes(testcase) def StripOutputForTransmit(self, testcase): if not self.HasUnexpectedOutput(testcase): @@ -315,18 +369,24 @@ def __init__(self, name, root): super(GoogleTestSuite, self).__init__(name, root) def ListTests(self, context): - shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) + shell = os.path.abspath( + os.path.join(context.shell_dir, self.GetShellForTestCase(None))) if utils.IsWindows(): shell += ".exe" output = None for i in xrange(3): # Try 3 times in case of errors. - output = commands.Execute(context.command_prefix + - [shell, "--gtest_list_tests"] + - context.extra_flags) + cmd = ( + context.command_prefix + + [shell, "--gtest_list_tests"] + + context.extra_flags + ) + output = commands.Execute(cmd) if output.exit_code == 0: break - print "Test executable failed to list the tests (try %d).\n\nStdout:" % i + print "Test executable failed to list the tests (try %d).\n\nCmd:" % i + print ' '.join(cmd) + print "\nStdout:" print output.stdout print "\nStderr:" print output.stderr @@ -346,14 +406,17 @@ def ListTests(self, context): tests.sort(key=lambda t: t.path) return tests - def GetFlagsForTestCase(self, testcase, context): - return (testcase.flags + ["--gtest_filter=" + testcase.path] + - ["--gtest_random_seed=%s" % context.random_seed] + - ["--gtest_print_time=0"] + - context.mode_flags) + def GetParametersForTestCase(self, testcase, context): + flags = ( + testcase.flags + + ["--gtest_filter=" + testcase.path] + + ["--gtest_random_seed=%s" % context.random_seed] + + ["--gtest_print_time=0"] + + context.mode_flags) + return [], flags, {} def _VariantGeneratorFactory(self): return StandardVariantGenerator - def shell(self): + def GetShellForTestCase(self, testcase): return self.name diff --git a/deps/v8/tools/testrunner/local/testsuite_unittest.py b/deps/v8/tools/testrunner/local/testsuite_unittest.py index 1e10ef5564e..a8483b9fc0a 100755 --- a/deps/v8/tools/testrunner/local/testsuite_unittest.py +++ b/deps/v8/tools/testrunner/local/testsuite_unittest.py @@ -29,17 +29,18 @@ def test_filter_testcases_by_status_first_pass(self): 'baz/bar': set(['PASS', 'FAIL']), }, } - suite.wildcards = { + suite.prefix_rules = { '': { - 'baz/*': set(['PASS', 'SLOW']), + 'baz/': set(['PASS', 'SLOW']), }, } - suite.FilterTestCasesByStatus(warn_unused_rules=False) + suite.FilterTestCasesByStatus() self.assertEquals( [TestCase(suite, 'baz/bar')], suite.tests, ) - self.assertEquals(set(['PASS', 'FAIL', 'SLOW']), suite.tests[0].outcomes) + outcomes = suite.GetStatusFileOutcomes(suite.tests[0]) + self.assertEquals(set(['PASS', 'FAIL', 'SLOW']), outcomes) def test_filter_testcases_by_status_second_pass(self): suite = TestSuite('foo', 'bar') @@ -47,10 +48,6 @@ def test_filter_testcases_by_status_second_pass(self): test1 = TestCase(suite, 'foo/bar') test2 = TestCase(suite, 'baz/bar') - # Contrived outcomes from filtering by variant-independent rules. - test1.outcomes = set(['PREV']) - test2.outcomes = set(['PREV']) - suite.tests = [ test1.CopyAddingFlags(variant='default', flags=[]), test1.CopyAddingFlags(variant='stress', flags=['-v']), @@ -59,6 +56,9 @@ def test_filter_testcases_by_status_second_pass(self): ] suite.rules = { + '': { + 'foo/bar': set(['PREV']), + }, 'default': { 'foo/bar': set(['PASS', 'SKIP']), 'baz/bar': set(['PASS', 'FAIL']), @@ -67,15 +67,18 @@ def test_filter_testcases_by_status_second_pass(self): 'baz/bar': set(['SKIP']), }, } - suite.wildcards = { + suite.prefix_rules = { + '': { + 'baz/': set(['PREV']), + }, 'default': { - 'baz/*': set(['PASS', 'SLOW']), + 'baz/': set(['PASS', 'SLOW']), }, 'stress': { - 'foo/*': set(['PASS', 'SLOW']), + 'foo/': set(['PASS', 'SLOW']), }, } - suite.FilterTestCasesByStatus(warn_unused_rules=False, variants=True) + suite.FilterTestCasesByStatus() self.assertEquals( [ TestCase(suite, 'foo/bar', flags=['-v']), @@ -85,14 +88,32 @@ def test_filter_testcases_by_status_second_pass(self): ) self.assertEquals( - set(['PASS', 'SLOW', 'PREV']), - suite.tests[0].outcomes, + set(['PREV', 'PASS', 'SLOW']), + suite.GetStatusFileOutcomes(suite.tests[0]), ) self.assertEquals( - set(['PASS', 'FAIL', 'SLOW', 'PREV']), - suite.tests[1].outcomes, + set(['PREV', 'PASS', 'FAIL', 'SLOW']), + suite.GetStatusFileOutcomes(suite.tests[1]), ) + def test_fail_ok_outcome(self): + suite = TestSuite('foo', 'bar') + suite.tests = [ + TestCase(suite, 'foo/bar'), + TestCase(suite, 'baz/bar'), + ] + suite.rules = { + '': { + 'foo/bar': set(['FAIL_OK']), + 'baz/bar': set(['FAIL']), + }, + } + suite.prefix_rules = {} + + for t in suite.tests: + expected_outcomes = suite.GetExpectedOutcomes(t) + self.assertEquals(['FAIL'], expected_outcomes) + if __name__ == '__main__': unittest.main() diff --git a/deps/v8/tools/testrunner/local/variants.py b/deps/v8/tools/testrunner/local/variants.py index 9efa060bba5..c8c7ce64a8d 100644 --- a/deps/v8/tools/testrunner/local/variants.py +++ b/deps/v8/tools/testrunner/local/variants.py @@ -5,28 +5,37 @@ # Use this to run several variants of the tests. ALL_VARIANT_FLAGS = { "default": [[]], + "future": [["--future"]], + "liftoff": [["--liftoff"]], "stress": [["--stress-opt", "--always-opt"]], - "stress_incremental_marking": [["--stress-incremental-marking"]], + # TODO(6792): Write protected code has been temporary added to the below + # variant until the feature has been enabled (or staged) by default. + "stress_incremental_marking": [["--stress-incremental-marking", "--write-protect-code-memory"]], # No optimization means disable all optimizations. OptimizeFunctionOnNextCall # would not force optimization too. It turns into a Nop. Please see # https://chromium-review.googlesource.com/c/452620/ for more discussion. "nooptimization": [["--noopt"]], - "stress_asm_wasm": [["--validate-asm", "--stress-validate-asm", "--suppress-asm-messages"]], - "wasm_traps": [["--wasm_trap_handler", "--invoke-weak-callbacks"]], + "stress_background_compile": [["--background-compile", "--stress-background-compile"]], + "wasm_traps": [["--wasm_trap_handler", "--invoke-weak-callbacks", "--wasm-jit-to-native"]], } # FAST_VARIANTS implies no --always-opt. FAST_VARIANT_FLAGS = { "default": [[]], + "future": [["--future"]], + "liftoff": [["--liftoff"]], "stress": [["--stress-opt"]], - "stress_incremental_marking": [["--stress-incremental-marking"]], + # TODO(6792): Write protected code has been temporary added to the below + # variant until the feature has been enabled (or staged) by default. + "stress_incremental_marking": [["--stress-incremental-marking", "--write-protect-code-memory"]], # No optimization means disable all optimizations. OptimizeFunctionOnNextCall # would not force optimization too. It turns into a Nop. Please see # https://chromium-review.googlesource.com/c/452620/ for more discussion. "nooptimization": [["--noopt"]], - "stress_asm_wasm": [["--validate-asm", "--stress-validate-asm", "--suppress-asm-messages"]], - "wasm_traps": [["--wasm_trap_handler", "--invoke-weak-callbacks"]], + "stress_background_compile": [["--background-compile", "--stress-background-compile"]], + "wasm_traps": [["--wasm_trap_handler", "--invoke-weak-callbacks", "--wasm-jit-to-native"]], } -ALL_VARIANTS = set(["default", "stress", "stress_incremental_marking", - "nooptimization", "stress_asm_wasm", "wasm_traps"]) +ALL_VARIANTS = set(["default", "future", "liftoff", "stress", + "stress_incremental_marking", "nooptimization", + "stress_background_compile", "wasm_traps"]) diff --git a/deps/v8/tools/testrunner/local/verbose.py b/deps/v8/tools/testrunner/local/verbose.py index 00c330d2d9c..f28398fa426 100644 --- a/deps/v8/tools/testrunner/local/verbose.py +++ b/deps/v8/tools/testrunner/local/verbose.py @@ -35,7 +35,6 @@ REPORT_TEMPLATE = ( """Total: %(total)i tests * %(skipped)4d tests will be skipped - * %(timeout)4d tests are expected to timeout sometimes * %(nocrash)4d tests are expected to be flaky but not crash * %(pass)4d tests are expected to pass * %(fail_ok)4d tests are expected to fail that we won't fix @@ -44,24 +43,27 @@ def PrintReport(tests): total = len(tests) - skipped = timeout = nocrash = passes = fail_ok = fail = 0 + skipped = nocrash = passes = fail_ok = fail = 0 for t in tests: - if "outcomes" not in dir(t) or not t.outcomes: + outcomes = t.suite.GetStatusFileOutcomes(t) + if not outcomes: passes += 1 continue - o = t.outcomes - if statusfile.DoSkip(o): + if statusfile.DoSkip(outcomes): skipped += 1 continue - if statusfile.TIMEOUT in o: timeout += 1 - if statusfile.IsPassOrFail(o): nocrash += 1 - if list(o) == [statusfile.PASS]: passes += 1 - if statusfile.IsFailOk(o): fail_ok += 1 - if list(o) == [statusfile.FAIL]: fail += 1 + if statusfile.IsPassOrFail(outcomes): + nocrash += 1 + if list(outcomes) == [statusfile.PASS]: + passes += 1 + if statusfile.IsFailOk(outcomes): + fail_ok += 1 + if list(outcomes) == [statusfile.FAIL]: + fail += 1 + print REPORT_TEMPLATE % { "total": total, "skipped": skipped, - "timeout": timeout, "nocrash": nocrash, "pass": passes, "fail_ok": fail_ok, diff --git a/deps/v8/tools/testrunner/network/__init__.py b/deps/v8/tools/testrunner/network/__init__.py deleted file mode 100644 index 202a262709c..00000000000 --- a/deps/v8/tools/testrunner/network/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/v8/tools/testrunner/network/distro.py b/deps/v8/tools/testrunner/network/distro.py deleted file mode 100644 index 9d5a471d444..00000000000 --- a/deps/v8/tools/testrunner/network/distro.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -class Shell(object): - def __init__(self, shell): - self.shell = shell - self.tests = [] - self.total_duration = 0.0 - - def AddSuite(self, suite): - self.tests += suite.tests - self.total_duration += suite.total_duration - - def SortTests(self): - self.tests.sort(cmp=lambda x, y: cmp(x.duration, y.duration)) - - -def Assign(suites, peers): - total_work = 0.0 - for s in suites: - total_work += s.CalculateTotalDuration() - - total_power = 0.0 - for p in peers: - p.assigned_work = 0.0 - total_power += p.jobs * p.relative_performance - for p in peers: - p.needed_work = total_work * p.jobs * p.relative_performance / total_power - - shells = {} - for s in suites: - shell = s.shell() - if not shell in shells: - shells[shell] = Shell(shell) - shells[shell].AddSuite(s) - # Convert |shells| to list and sort it, shortest total_duration first. - shells = [ shells[s] for s in shells ] - shells.sort(cmp=lambda x, y: cmp(x.total_duration, y.total_duration)) - # Sort tests within each shell, longest duration last (so it's - # pop()'ed first). - for s in shells: s.SortTests() - # Sort peers, least needed_work first. - peers.sort(cmp=lambda x, y: cmp(x.needed_work, y.needed_work)) - index = 0 - for shell in shells: - while len(shell.tests) > 0: - while peers[index].needed_work <= 0: - index += 1 - if index == len(peers): - print("BIG FAT WARNING: Assigning tests to peers failed. " - "Remaining tests: %d. Going to slow mode." % len(shell.tests)) - # Pick the least-busy peer. Sorting the list for each test - # is terribly slow, but this is just an emergency fallback anyway. - peers.sort(cmp=lambda x, y: cmp(x.needed_work, y.needed_work)) - peers[0].ForceAddOneTest(shell.tests.pop(), shell) - # If the peer already has a shell assigned and would need this one - # and then yet another, try to avoid it. - peer = peers[index] - if (shell.total_duration < peer.needed_work and - len(peer.shells) > 0 and - index < len(peers) - 1 and - shell.total_duration <= peers[index + 1].needed_work): - peers[index + 1].AddTests(shell) - else: - peer.AddTests(shell) diff --git a/deps/v8/tools/testrunner/network/endpoint.py b/deps/v8/tools/testrunner/network/endpoint.py deleted file mode 100644 index 516578ace49..00000000000 --- a/deps/v8/tools/testrunner/network/endpoint.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import multiprocessing -import os -import Queue -import threading -import time - -from ..local import execution -from ..local import progress -from ..local import testsuite -from ..local import utils -from ..server import compression - - -class EndpointProgress(progress.ProgressIndicator): - def __init__(self, sock, server, ctx): - super(EndpointProgress, self).__init__() - self.sock = sock - self.server = server - self.context = ctx - self.results_queue = [] # Accessors must synchronize themselves. - self.sender_lock = threading.Lock() - self.senderthread = threading.Thread(target=self._SenderThread) - self.senderthread.start() - - def HasRun(self, test, has_unexpected_output): - # The runners that call this have a lock anyway, so this is safe. - self.results_queue.append(test) - - def _SenderThread(self): - keep_running = True - tests = [] - self.sender_lock.acquire() - while keep_running: - time.sleep(0.1) - # This should be "atomic enough" without locking :-) - # (We don't care which list any new elements get appended to, as long - # as we don't lose any and the last one comes last.) - current = self.results_queue - self.results_queue = [] - for c in current: - if c is None: - keep_running = False - else: - tests.append(c) - if keep_running and len(tests) < 1: - continue # Wait for more results. - if len(tests) < 1: break # We're done here. - result = [] - for t in tests: - result.append(t.PackResult()) - try: - compression.Send(result, self.sock) - except: - self.runner.terminate = True - for t in tests: - self.server.CompareOwnPerf(t, self.context.arch, self.context.mode) - tests = [] - self.sender_lock.release() - - -def Execute(workspace, ctx, tests, sock, server): - suite_paths = utils.GetSuitePaths(os.path.join(workspace, "test")) - suites = [] - for root in suite_paths: - suite = testsuite.TestSuite.LoadTestSuite( - os.path.join(workspace, "test", root)) - if suite: - suite.SetupWorkingDirectory() - suites.append(suite) - - suites_dict = {} - for s in suites: - suites_dict[s.name] = s - s.tests = [] - for t in tests: - suite = suites_dict[t.suite] - t.suite = suite - suite.tests.append(t) - - suites = [ s for s in suites if len(s.tests) > 0 ] - for s in suites: - s.DownloadData() - - progress_indicator = EndpointProgress(sock, server, ctx) - runner = execution.Runner(suites, progress_indicator, ctx) - try: - runner.Run(server.jobs) - except IOError, e: - if e.errno == 2: - message = ("File not found: %s, maybe you forgot to 'git add' it?" % - e.filename) - else: - message = "%s" % e - compression.Send([[-1, message]], sock) - progress_indicator.HasRun(None, None) # Sentinel to signal the end. - progress_indicator.sender_lock.acquire() # Released when sending is done. - progress_indicator.sender_lock.release() diff --git a/deps/v8/tools/testrunner/network/network_execution.py b/deps/v8/tools/testrunner/network/network_execution.py deleted file mode 100644 index a95440178b4..00000000000 --- a/deps/v8/tools/testrunner/network/network_execution.py +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import os -import socket -import subprocess -import threading -import time - -from . import distro -from ..local import execution -from ..local import perfdata -from ..objects import peer -from ..objects import workpacket -from ..server import compression -from ..server import constants -from ..server import local_handler -from ..server import signatures - - -def GetPeers(): - data = local_handler.LocalQuery([constants.REQUEST_PEERS]) - if not data: return [] - return [ peer.Peer.Unpack(p) for p in data ] - - -class NetworkedRunner(execution.Runner): - def __init__(self, suites, progress_indicator, context, peers, workspace): - self.suites = suites - datapath = os.path.join("out", "testrunner_data") - # TODO(machenbach): These fields should exist now in the superclass. - # But there is no super constructor call. Check if this is a problem. - self.perf_data_manager = perfdata.PerfDataManager(datapath) - self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode) - for s in suites: - for t in s.tests: - t.duration = self.perfdata.FetchPerfData(t) or 1.0 - self._CommonInit(suites, progress_indicator, context) - self.tests = [] # Only used if we need to fall back to local execution. - self.tests_lock = threading.Lock() - self.peers = peers - self.pubkey_fingerprint = None # Fetched later. - self.base_rev = subprocess.check_output( - "cd %s; git log -1 --format=%%H --grep=git-svn-id" % workspace, - shell=True).strip() - self.base_svn_rev = subprocess.check_output( - "cd %s; git log -1 %s" # Get commit description. - " | grep -e '^\s*git-svn-id:'" # Extract "git-svn-id" line. - " | awk '{print $2}'" # Extract "repository@revision" part. - " | sed -e 's/.*@//'" % # Strip away "repository@". - (workspace, self.base_rev), shell=True).strip() - self.patch = subprocess.check_output( - "cd %s; git diff %s" % (workspace, self.base_rev), shell=True) - self.binaries = {} - self.initialization_lock = threading.Lock() - self.initialization_lock.acquire() # Released when init is done. - self._OpenLocalConnection() - self.local_receiver_thread = threading.Thread( - target=self._ListenLocalConnection) - self.local_receiver_thread.daemon = True - self.local_receiver_thread.start() - self.initialization_lock.acquire() - self.initialization_lock.release() - - def _OpenLocalConnection(self): - self.local_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - code = self.local_socket.connect_ex(("localhost", constants.CLIENT_PORT)) - if code != 0: - raise RuntimeError("Failed to connect to local server") - compression.Send([constants.REQUEST_PUBKEY_FINGERPRINT], self.local_socket) - - def _ListenLocalConnection(self): - release_lock_countdown = 1 # Pubkey. - self.local_receiver = compression.Receiver(self.local_socket) - while not self.local_receiver.IsDone(): - data = self.local_receiver.Current() - if data[0] == constants.REQUEST_PUBKEY_FINGERPRINT: - pubkey = data[1] - if not pubkey: raise RuntimeError("Received empty public key") - self.pubkey_fingerprint = pubkey - release_lock_countdown -= 1 - if release_lock_countdown == 0: - self.initialization_lock.release() - release_lock_countdown -= 1 # Prevent repeated triggering. - self.local_receiver.Advance() - - def Run(self, jobs): - self.indicator.Starting() - need_libv8 = False - for s in self.suites: - shell = s.shell() - if shell not in self.binaries: - path = os.path.join(self.context.shell_dir, shell) - # Check if this is a shared library build. - try: - ldd = subprocess.check_output("ldd %s | grep libv8\\.so" % (path), - shell=True) - ldd = ldd.strip().split(" ") - assert ldd[0] == "libv8.so" - assert ldd[1] == "=>" - need_libv8 = True - binary_needs_libv8 = True - libv8 = signatures.ReadFileAndSignature(ldd[2]) - except: - binary_needs_libv8 = False - binary = signatures.ReadFileAndSignature(path) - if binary[0] is None: - print("Error: Failed to create signature.") - assert binary[1] != 0 - return binary[1] - binary.append(binary_needs_libv8) - self.binaries[shell] = binary - if need_libv8: - self.binaries["libv8.so"] = libv8 - distro.Assign(self.suites, self.peers) - # Spawn one thread for each peer. - threads = [] - for p in self.peers: - thread = threading.Thread(target=self._TalkToPeer, args=[p]) - threads.append(thread) - thread.start() - try: - for thread in threads: - # Use a timeout so that signals (Ctrl+C) will be processed. - thread.join(timeout=10000000) - self._AnalyzePeerRuntimes() - except KeyboardInterrupt: - self.terminate = True - raise - except Exception, _e: - # If there's an exception we schedule an interruption for any - # remaining threads... - self.terminate = True - # ...and then reraise the exception to bail out. - raise - compression.Send(constants.END_OF_STREAM, self.local_socket) - self.local_socket.close() - if self.tests: - self._RunInternal(jobs) - self.indicator.Done() - return not self.failed - - def _TalkToPeer(self, peer): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(self.context.timeout + 10) - code = sock.connect_ex((peer.address, constants.PEER_PORT)) - if code == 0: - try: - peer.runtime = None - start_time = time.time() - packet = workpacket.WorkPacket(peer=peer, context=self.context, - base_revision=self.base_svn_rev, - patch=self.patch, - pubkey=self.pubkey_fingerprint) - data, test_map = packet.Pack(self.binaries) - compression.Send(data, sock) - compression.Send(constants.END_OF_STREAM, sock) - rec = compression.Receiver(sock) - while not rec.IsDone() and not self.terminate: - data_list = rec.Current() - for data in data_list: - test_id = data[0] - if test_id < 0: - # The peer is reporting an error. - with self.lock: - print("\nPeer %s reports error: %s" % (peer.address, data[1])) - continue - test = test_map.pop(test_id) - test.MergeResult(data) - try: - self.perfdata.UpdatePerfData(test) - except Exception, e: - print("UpdatePerfData exception: %s" % e) - pass # Just keep working. - with self.lock: - perf_key = self.perfdata.GetKey(test) - compression.Send( - [constants.INFORM_DURATION, perf_key, test.duration, - self.context.arch, self.context.mode], - self.local_socket) - has_unexpected_output = test.suite.HasUnexpectedOutput(test) - if has_unexpected_output: - self.failed.append(test) - if test.output.HasCrashed(): - self.crashed += 1 - else: - self.succeeded += 1 - self.remaining -= 1 - self.indicator.HasRun(test, has_unexpected_output) - rec.Advance() - peer.runtime = time.time() - start_time - except KeyboardInterrupt: - sock.close() - raise - except Exception, e: - print("Got exception: %s" % e) - pass # Fall back to local execution. - else: - compression.Send([constants.UNRESPONSIVE_PEER, peer.address], - self.local_socket) - sock.close() - if len(test_map) > 0: - # Some tests have not received any results. Run them locally. - print("\nNo results for %d tests, running them locally." % len(test_map)) - self._EnqueueLocally(test_map) - - def _EnqueueLocally(self, test_map): - with self.tests_lock: - for test in test_map: - self.tests.append(test_map[test]) - - def _AnalyzePeerRuntimes(self): - total_runtime = 0.0 - total_work = 0.0 - for p in self.peers: - if p.runtime is None: - return - total_runtime += p.runtime - total_work += p.assigned_work - for p in self.peers: - p.assigned_work /= total_work - p.runtime /= total_runtime - perf_correction = p.assigned_work / p.runtime - old_perf = p.relative_performance - p.relative_performance = (old_perf + perf_correction) / 2.0 - compression.Send([constants.UPDATE_PERF, p.address, - p.relative_performance], - self.local_socket) diff --git a/deps/v8/tools/testrunner/objects/context.py b/deps/v8/tools/testrunner/objects/context.py index 6bcbfb67aa4..fb5d717728e 100644 --- a/deps/v8/tools/testrunner/objects/context.py +++ b/deps/v8/tools/testrunner/objects/context.py @@ -49,18 +49,3 @@ def __init__(self, arch, mode, shell_dir, mode_flags, verbose, timeout, self.no_harness = no_harness self.use_perf_data = use_perf_data self.sancov_dir = sancov_dir - - def Pack(self): - return [self.arch, self.mode, self.mode_flags, self.timeout, self.isolates, - self.command_prefix, self.extra_flags, self.noi18n, - self.random_seed, self.no_sorting, self.rerun_failures_count, - self.rerun_failures_max, self.predictable, self.no_harness, - self.use_perf_data, self.sancov_dir] - - @staticmethod - def Unpack(packed): - # For the order of the fields, refer to Pack() above. - return Context(packed[0], packed[1], None, packed[2], False, - packed[3], packed[4], packed[5], packed[6], packed[7], - packed[8], packed[9], packed[10], packed[11], packed[12], - packed[13], packed[14], packed[15]) diff --git a/deps/v8/tools/testrunner/objects/output.py b/deps/v8/tools/testrunner/objects/output.py index b4bb01f797a..99d61376983 100644 --- a/deps/v8/tools/testrunner/objects/output.py +++ b/deps/v8/tools/testrunner/objects/output.py @@ -51,11 +51,3 @@ def HasCrashed(self): def HasTimedOut(self): return self.timed_out - - def Pack(self): - return [self.exit_code, self.timed_out, self.stdout, self.stderr, self.pid] - - @staticmethod - def Unpack(packed): - # For the order of the fields, refer to Pack() above. - return Output(packed[0], packed[1], packed[2], packed[3], packed[4]) diff --git a/deps/v8/tools/testrunner/objects/peer.py b/deps/v8/tools/testrunner/objects/peer.py deleted file mode 100644 index 18a6bec7a8a..00000000000 --- a/deps/v8/tools/testrunner/objects/peer.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -class Peer(object): - def __init__(self, address, jobs, rel_perf, pubkey): - self.address = address # string: IP address - self.jobs = jobs # integer: number of CPUs - self.relative_performance = rel_perf - self.pubkey = pubkey # string: pubkey's fingerprint - self.shells = set() # set of strings - self.needed_work = 0 - self.assigned_work = 0 - self.tests = [] # list of TestCase objects - self.trusting_me = False # This peer trusts my public key. - self.trusted = False # I trust this peer's public key. - - def __str__(self): - return ("Peer at %s, jobs: %d, performance: %.2f, trust I/O: %s/%s" % - (self.address, self.jobs, self.relative_performance, - self.trusting_me, self.trusted)) - - def AddTests(self, shell): - """Adds tests from |shell| to this peer. - - Stops when self.needed_work reaches zero, or when all of shell's tests - are assigned.""" - assert self.needed_work > 0 - if shell.shell not in self.shells: - self.shells.add(shell.shell) - while len(shell.tests) > 0 and self.needed_work > 0: - t = shell.tests.pop() - self.needed_work -= t.duration - self.assigned_work += t.duration - shell.total_duration -= t.duration - self.tests.append(t) - - def ForceAddOneTest(self, test, shell): - """Forcibly adds another test to this peer, disregarding needed_work.""" - if shell.shell not in self.shells: - self.shells.add(shell.shell) - self.needed_work -= test.duration - self.assigned_work += test.duration - shell.total_duration -= test.duration - self.tests.append(test) - - - def Pack(self): - """Creates a JSON serializable representation of this Peer.""" - return [self.address, self.jobs, self.relative_performance] - - @staticmethod - def Unpack(packed): - """Creates a Peer object built from a packed representation.""" - pubkey_dummy = "" # Callers of this don't care (only the server does). - return Peer(packed[0], packed[1], packed[2], pubkey_dummy) diff --git a/deps/v8/tools/testrunner/objects/testcase.py b/deps/v8/tools/testrunner/objects/testcase.py index 37e3cb4ec2b..fd8c27bc59b 100644 --- a/deps/v8/tools/testrunner/objects/testcase.py +++ b/deps/v8/tools/testrunner/objects/testcase.py @@ -26,76 +26,29 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from . import output - class TestCase(object): - def __init__(self, suite, path, variant=None, flags=None, - override_shell=None): + def __init__(self, suite, path, variant=None, flags=None): self.suite = suite # TestSuite object self.path = path # string, e.g. 'div-mod', 'test-api/foo' self.flags = flags or [] # list of strings, flags specific to this test self.variant = variant # name of the used testing variant - self.override_shell = override_shell - self.outcomes = frozenset([]) self.output = None self.id = None # int, used to map result back to TestCase instance self.duration = None # assigned during execution self.run = 1 # The nth time this test is executed. - self.env = {} def CopyAddingFlags(self, variant, flags): - copy = TestCase(self.suite, self.path, variant, self.flags + flags, - self.override_shell) - copy.outcomes = self.outcomes - copy.env = self.env - return copy - - def PackTask(self): - """ - Extracts those parts of this object that are required to run the test - and returns them as a JSON serializable object. - """ - assert self.id is not None - return [self.suitename(), self.path, self.variant, self.flags, - self.override_shell, list(self.outcomes or []), - self.id, self.env] - - @staticmethod - def UnpackTask(task): - """Creates a new TestCase object based on packed task data.""" - # For the order of the fields, refer to PackTask() above. - test = TestCase(str(task[0]), task[1], task[2], task[3], task[4]) - test.outcomes = frozenset(task[5]) - test.id = task[6] - test.run = 1 - test.env = task[7] - return test + return TestCase(self.suite, self.path, variant, self.flags + flags) def SetSuiteObject(self, suites): self.suite = suites[self.suite] - def PackResult(self): - """Serializes the output of the TestCase after it has run.""" - self.suite.StripOutputForTransmit(self) - return [self.id, self.output.Pack(), self.duration] - - def MergeResult(self, result): - """Applies the contents of a Result to this object.""" - assert result[0] == self.id - self.output = output.Output.Unpack(result[1]) - self.duration = result[2] - def suitename(self): return self.suite.name def GetLabel(self): return self.suitename() + "/" + self.suite.CommonTestName(self) - def shell(self): - if self.override_shell: - return self.override_shell - return self.suite.shell() - def __getstate__(self): """Representation to pickle test cases. diff --git a/deps/v8/tools/testrunner/objects/workpacket.py b/deps/v8/tools/testrunner/objects/workpacket.py deleted file mode 100644 index d07efe76ec5..00000000000 --- a/deps/v8/tools/testrunner/objects/workpacket.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -from . import context -from . import testcase - -class WorkPacket(object): - def __init__(self, peer=None, context=None, tests=None, binaries=None, - base_revision=None, patch=None, pubkey=None): - self.peer = peer - self.context = context - self.tests = tests - self.binaries = binaries - self.base_revision = base_revision - self.patch = patch - self.pubkey_fingerprint = pubkey - - def Pack(self, binaries_dict): - """ - Creates a JSON serializable object containing the data of this - work packet. - """ - need_libv8 = False - binaries = [] - for shell in self.peer.shells: - prefetched_binary = binaries_dict[shell] - binaries.append({"name": shell, - "blob": prefetched_binary[0], - "sign": prefetched_binary[1]}) - if prefetched_binary[2]: - need_libv8 = True - if need_libv8: - libv8 = binaries_dict["libv8.so"] - binaries.append({"name": "libv8.so", - "blob": libv8[0], - "sign": libv8[1]}) - tests = [] - test_map = {} - for t in self.peer.tests: - test_map[t.id] = t - tests.append(t.PackTask()) - result = { - "binaries": binaries, - "pubkey": self.pubkey_fingerprint, - "context": self.context.Pack(), - "base_revision": self.base_revision, - "patch": self.patch, - "tests": tests - } - return result, test_map - - @staticmethod - def Unpack(packed): - """ - Creates a WorkPacket object from the given packed representation. - """ - binaries = packed["binaries"] - pubkey_fingerprint = packed["pubkey"] - ctx = context.Context.Unpack(packed["context"]) - base_revision = packed["base_revision"] - patch = packed["patch"] - tests = [ testcase.TestCase.UnpackTask(t) for t in packed["tests"] ] - return WorkPacket(context=ctx, tests=tests, binaries=binaries, - base_revision=base_revision, patch=patch, - pubkey=pubkey_fingerprint) diff --git a/deps/v8/tools/testrunner/server/__init__.py b/deps/v8/tools/testrunner/server/__init__.py deleted file mode 100644 index 202a262709c..00000000000 --- a/deps/v8/tools/testrunner/server/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/v8/tools/testrunner/server/compression.py b/deps/v8/tools/testrunner/server/compression.py deleted file mode 100644 index d5ed4159766..00000000000 --- a/deps/v8/tools/testrunner/server/compression.py +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import cStringIO as StringIO -try: - import ujson as json -except ImportError: - import json -import os -import struct -import zlib - -from . import constants - -def Send(obj, sock): - """ - Sends a JSON encodable object over the specified socket (zlib-compressed). - """ - obj = json.dumps(obj) - compression_level = 2 # 1 = fastest, 9 = best compression - compressed = zlib.compress(obj, compression_level) - payload = struct.pack('>i', len(compressed)) + compressed - sock.sendall(payload) - - -class Receiver(object): - def __init__(self, sock): - self.sock = sock - self.data = StringIO.StringIO() - self.datalength = 0 - self._next = self._GetNext() - - def IsDone(self): - return self._next == None - - def Current(self): - return self._next - - def Advance(self): - try: - self._next = self._GetNext() - except: - raise - - def _GetNext(self): - try: - while self.datalength < constants.SIZE_T: - try: - chunk = self.sock.recv(8192) - except: - raise - if not chunk: return None - self._AppendData(chunk) - size = self._PopData(constants.SIZE_T) - size = struct.unpack(">i", size)[0] - while self.datalength < size: - try: - chunk = self.sock.recv(8192) - except: - raise - if not chunk: return None - self._AppendData(chunk) - result = self._PopData(size) - result = zlib.decompress(result) - result = json.loads(result) - if result == constants.END_OF_STREAM: - return None - return result - except: - raise - - def _AppendData(self, new): - self.data.seek(0, os.SEEK_END) - self.data.write(new) - self.datalength += len(new) - - def _PopData(self, length): - self.data.seek(0) - chunk = self.data.read(length) - remaining = self.data.read() - self.data.close() - self.data = StringIO.StringIO() - self.data.write(remaining) - assert self.datalength - length == len(remaining) - self.datalength = len(remaining) - return chunk diff --git a/deps/v8/tools/testrunner/server/constants.py b/deps/v8/tools/testrunner/server/constants.py deleted file mode 100644 index 5aefcbad0d3..00000000000 --- a/deps/v8/tools/testrunner/server/constants.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -CLIENT_PORT = 9991 # Port for the local client to connect to. -PEER_PORT = 9992 # Port for peers on the network to connect to. -PRESENCE_PORT = 9993 # Port for presence daemon. -STATUS_PORT = 9994 # Port for network requests not related to workpackets. - -END_OF_STREAM = "end of dtest stream" # Marker for end of network requests. -SIZE_T = 4 # Number of bytes used for network request size header. - -# Messages understood by the local request handler. -ADD_TRUSTED = "add trusted" -INFORM_DURATION = "inform about duration" -REQUEST_PEERS = "get peers" -UNRESPONSIVE_PEER = "unresponsive peer" -REQUEST_PUBKEY_FINGERPRINT = "get pubkey fingerprint" -REQUEST_STATUS = "get status" -UPDATE_PERF = "update performance" - -# Messages understood by the status request handler. -LIST_TRUSTED_PUBKEYS = "list trusted pubkeys" -GET_SIGNED_PUBKEY = "pass on signed pubkey" -NOTIFY_NEW_TRUSTED = "new trusted peer" -TRUST_YOU_NOW = "trust you now" -DO_YOU_TRUST = "do you trust" diff --git a/deps/v8/tools/testrunner/server/daemon.py b/deps/v8/tools/testrunner/server/daemon.py deleted file mode 100644 index baa66fbea91..00000000000 --- a/deps/v8/tools/testrunner/server/daemon.py +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env python - -# This code has been written by Sander Marechal and published at: -# http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ -# where the author has placed it in the public domain (see comment #6 at -# http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/#c6 -# ). -# Some minor modifications have been made by the V8 authors. The work remains -# in the public domain. - -import atexit -import os -from signal import SIGTERM -from signal import SIGINT -import sys -import time - - -class Daemon(object): - """ - A generic daemon class. - - Usage: subclass the Daemon class and override the run() method - """ - def __init__(self, pidfile, stdin='/dev/null', - stdout='/dev/null', stderr='/dev/null'): - self.stdin = stdin - self.stdout = stdout - self.stderr = stderr - self.pidfile = pidfile - - def daemonize(self): - """ - do the UNIX double-fork magic, see Stevens' "Advanced - Programming in the UNIX Environment" for details (ISBN 0201563177) - http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 - """ - try: - pid = os.fork() - if pid > 0: - # exit first parent - sys.exit(0) - except OSError, e: - sys.stderr.write("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) - sys.exit(1) - - # decouple from parent environment - os.chdir("/") - os.setsid() - os.umask(0) - - # do second fork - try: - pid = os.fork() - if pid > 0: - # exit from second parent - sys.exit(0) - except OSError, e: - sys.stderr.write("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) - sys.exit(1) - - # redirect standard file descriptors - sys.stdout.flush() - sys.stderr.flush() - si = file(self.stdin, 'r') - so = file(self.stdout, 'a+') - se = file(self.stderr, 'a+', 0) - # TODO: (debug) re-enable this! - #os.dup2(si.fileno(), sys.stdin.fileno()) - #os.dup2(so.fileno(), sys.stdout.fileno()) - #os.dup2(se.fileno(), sys.stderr.fileno()) - - # write pidfile - atexit.register(self.delpid) - pid = str(os.getpid()) - file(self.pidfile, 'w+').write("%s\n" % pid) - - def delpid(self): - os.remove(self.pidfile) - - def start(self): - """ - Start the daemon - """ - # Check for a pidfile to see if the daemon already runs - try: - pf = file(self.pidfile, 'r') - pid = int(pf.read().strip()) - pf.close() - except IOError: - pid = None - - if pid: - message = "pidfile %s already exist. Daemon already running?\n" - sys.stderr.write(message % self.pidfile) - sys.exit(1) - - # Start the daemon - self.daemonize() - self.run() - - def stop(self): - """ - Stop the daemon - """ - # Get the pid from the pidfile - try: - pf = file(self.pidfile, 'r') - pid = int(pf.read().strip()) - pf.close() - except IOError: - pid = None - - if not pid: - message = "pidfile %s does not exist. Daemon not running?\n" - sys.stderr.write(message % self.pidfile) - return # not an error in a restart - - # Try killing the daemon process - try: - # Give the process a one-second chance to exit gracefully. - os.kill(pid, SIGINT) - time.sleep(1) - while 1: - os.kill(pid, SIGTERM) - time.sleep(0.1) - except OSError, err: - err = str(err) - if err.find("No such process") > 0: - if os.path.exists(self.pidfile): - os.remove(self.pidfile) - else: - print str(err) - sys.exit(1) - - def restart(self): - """ - Restart the daemon - """ - self.stop() - self.start() - - def run(self): - """ - You should override this method when you subclass Daemon. It will be - called after the process has been daemonized by start() or restart(). - """ diff --git a/deps/v8/tools/testrunner/server/local_handler.py b/deps/v8/tools/testrunner/server/local_handler.py deleted file mode 100644 index 3b3ac495d0c..00000000000 --- a/deps/v8/tools/testrunner/server/local_handler.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import socket -import SocketServer -import StringIO - -from . import compression -from . import constants - - -def LocalQuery(query): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - code = sock.connect_ex(("localhost", constants.CLIENT_PORT)) - if code != 0: return None - compression.Send(query, sock) - compression.Send(constants.END_OF_STREAM, sock) - rec = compression.Receiver(sock) - data = None - while not rec.IsDone(): - data = rec.Current() - assert data[0] == query[0] - data = data[1] - rec.Advance() - sock.close() - return data - - -class LocalHandler(SocketServer.BaseRequestHandler): - def handle(self): - rec = compression.Receiver(self.request) - while not rec.IsDone(): - data = rec.Current() - action = data[0] - - if action == constants.REQUEST_PEERS: - with self.server.daemon.peer_list_lock: - response = [ p.Pack() for p in self.server.daemon.peers - if p.trusting_me ] - compression.Send([action, response], self.request) - - elif action == constants.UNRESPONSIVE_PEER: - self.server.daemon.DeletePeer(data[1]) - - elif action == constants.REQUEST_PUBKEY_FINGERPRINT: - compression.Send([action, self.server.daemon.pubkey_fingerprint], - self.request) - - elif action == constants.REQUEST_STATUS: - compression.Send([action, self._GetStatusMessage()], self.request) - - elif action == constants.ADD_TRUSTED: - fingerprint = self.server.daemon.CopyToTrusted(data[1]) - compression.Send([action, fingerprint], self.request) - - elif action == constants.INFORM_DURATION: - test_key = data[1] - test_duration = data[2] - arch = data[3] - mode = data[4] - self.server.daemon.AddPerfData(test_key, test_duration, arch, mode) - - elif action == constants.UPDATE_PERF: - address = data[1] - perf = data[2] - self.server.daemon.UpdatePeerPerformance(data[1], data[2]) - - rec.Advance() - compression.Send(constants.END_OF_STREAM, self.request) - - def _GetStatusMessage(self): - sio = StringIO.StringIO() - sio.write("Peers:\n") - with self.server.daemon.peer_list_lock: - for p in self.server.daemon.peers: - sio.write("%s\n" % p) - sio.write("My own jobs: %d, relative performance: %.2f\n" % - (self.server.daemon.jobs, self.server.daemon.relative_perf)) - # Low-priority TODO: Return more information. Ideas: - # - currently running anything, - # - time since last job, - # - time since last repository fetch - # - number of workpackets/testcases handled since startup - # - slowest test(s) - result = sio.getvalue() - sio.close() - return result - - -class LocalSocketServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): - def __init__(self, daemon): - SocketServer.TCPServer.__init__(self, ("localhost", constants.CLIENT_PORT), - LocalHandler) - self.daemon = daemon diff --git a/deps/v8/tools/testrunner/server/main.py b/deps/v8/tools/testrunner/server/main.py deleted file mode 100644 index c237e1adb4c..00000000000 --- a/deps/v8/tools/testrunner/server/main.py +++ /dev/null @@ -1,245 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import multiprocessing -import os -import shutil -import subprocess -import threading -import time - -from . import daemon -from . import local_handler -from . import presence_handler -from . import signatures -from . import status_handler -from . import work_handler -from ..network import perfdata - - -class Server(daemon.Daemon): - - def __init__(self, pidfile, root, stdin="/dev/null", - stdout="/dev/null", stderr="/dev/null"): - super(Server, self).__init__(pidfile, stdin, stdout, stderr) - self.root = root - self.local_handler = None - self.local_handler_thread = None - self.work_handler = None - self.work_handler_thread = None - self.status_handler = None - self.status_handler_thread = None - self.presence_daemon = None - self.presence_daemon_thread = None - self.peers = [] - self.jobs = multiprocessing.cpu_count() - self.peer_list_lock = threading.Lock() - self.perf_data_lock = None - self.presence_daemon_lock = None - self.datadir = os.path.join(self.root, "data") - pubkey_fingerprint_filename = os.path.join(self.datadir, "mypubkey") - with open(pubkey_fingerprint_filename) as f: - self.pubkey_fingerprint = f.read().strip() - self.relative_perf_filename = os.path.join(self.datadir, "myperf") - if os.path.exists(self.relative_perf_filename): - with open(self.relative_perf_filename) as f: - try: - self.relative_perf = float(f.read()) - except: - self.relative_perf = 1.0 - else: - self.relative_perf = 1.0 - - def run(self): - os.nice(20) - self.ip = presence_handler.GetOwnIP() - self.perf_data_manager = perfdata.PerfDataManager(self.datadir) - self.perf_data_lock = threading.Lock() - - self.local_handler = local_handler.LocalSocketServer(self) - self.local_handler_thread = threading.Thread( - target=self.local_handler.serve_forever) - self.local_handler_thread.start() - - self.work_handler = work_handler.WorkSocketServer(self) - self.work_handler_thread = threading.Thread( - target=self.work_handler.serve_forever) - self.work_handler_thread.start() - - self.status_handler = status_handler.StatusSocketServer(self) - self.status_handler_thread = threading.Thread( - target=self.status_handler.serve_forever) - self.status_handler_thread.start() - - self.presence_daemon = presence_handler.PresenceDaemon(self) - self.presence_daemon_thread = threading.Thread( - target=self.presence_daemon.serve_forever) - self.presence_daemon_thread.start() - - self.presence_daemon.FindPeers() - time.sleep(0.5) # Give those peers some time to reply. - - with self.peer_list_lock: - for p in self.peers: - if p.address == self.ip: continue - status_handler.RequestTrustedPubkeys(p, self) - - while True: - try: - self.PeriodicTasks() - time.sleep(60) - except Exception, e: - print("MAIN LOOP EXCEPTION: %s" % e) - self.Shutdown() - break - except KeyboardInterrupt: - self.Shutdown() - break - - def Shutdown(self): - with open(self.relative_perf_filename, "w") as f: - f.write("%s" % self.relative_perf) - self.presence_daemon.shutdown() - self.presence_daemon.server_close() - self.local_handler.shutdown() - self.local_handler.server_close() - self.work_handler.shutdown() - self.work_handler.server_close() - self.status_handler.shutdown() - self.status_handler.server_close() - - def PeriodicTasks(self): - # If we know peers we don't trust, see if someone else trusts them. - with self.peer_list_lock: - for p in self.peers: - if p.trusted: continue - if self.IsTrusted(p.pubkey): - p.trusted = True - status_handler.ITrustYouNow(p) - continue - for p2 in self.peers: - if not p2.trusted: continue - status_handler.TryTransitiveTrust(p2, p.pubkey, self) - # TODO: Ping for more peers waiting to be discovered. - # TODO: Update the checkout (if currently idle). - - def AddPeer(self, peer): - with self.peer_list_lock: - for p in self.peers: - if p.address == peer.address: - return - self.peers.append(peer) - if peer.trusted: - status_handler.ITrustYouNow(peer) - - def DeletePeer(self, peer_address): - with self.peer_list_lock: - for i in xrange(len(self.peers)): - if self.peers[i].address == peer_address: - del self.peers[i] - return - - def MarkPeerAsTrusting(self, peer_address): - with self.peer_list_lock: - for p in self.peers: - if p.address == peer_address: - p.trusting_me = True - break - - def UpdatePeerPerformance(self, peer_address, performance): - with self.peer_list_lock: - for p in self.peers: - if p.address == peer_address: - p.relative_performance = performance - - def CopyToTrusted(self, pubkey_filename): - with open(pubkey_filename, "r") as f: - lines = f.readlines() - fingerprint = lines[-1].strip() - target_filename = self._PubkeyFilename(fingerprint) - shutil.copy(pubkey_filename, target_filename) - with self.peer_list_lock: - for peer in self.peers: - if peer.address == self.ip: continue - if peer.pubkey == fingerprint: - status_handler.ITrustYouNow(peer) - else: - result = self.SignTrusted(fingerprint) - status_handler.NotifyNewTrusted(peer, result) - return fingerprint - - def _PubkeyFilename(self, pubkey_fingerprint): - return os.path.join(self.root, "trusted", "%s.pem" % pubkey_fingerprint) - - def IsTrusted(self, pubkey_fingerprint): - return os.path.exists(self._PubkeyFilename(pubkey_fingerprint)) - - def ListTrusted(self): - path = os.path.join(self.root, "trusted") - if not os.path.exists(path): return [] - return [ f[:-4] for f in os.listdir(path) if f.endswith(".pem") ] - - def SignTrusted(self, pubkey_fingerprint): - if not self.IsTrusted(pubkey_fingerprint): - return [] - filename = self._PubkeyFilename(pubkey_fingerprint) - result = signatures.ReadFileAndSignature(filename) # Format: [key, sig]. - return [pubkey_fingerprint, result[0], result[1], self.pubkey_fingerprint] - - def AcceptNewTrusted(self, data): - # The format of |data| matches the return value of |SignTrusted()|. - if not data: return - fingerprint = data[0] - pubkey = data[1] - signature = data[2] - signer = data[3] - if not self.IsTrusted(signer): - return - if self.IsTrusted(fingerprint): - return # Already trusted. - filename = self._PubkeyFilename(fingerprint) - signer_pubkeyfile = self._PubkeyFilename(signer) - if not signatures.VerifySignature(filename, pubkey, signature, - signer_pubkeyfile): - return - return # Nothing more to do. - - def AddPerfData(self, test_key, duration, arch, mode): - data_store = self.perf_data_manager.GetStore(arch, mode) - data_store.RawUpdatePerfData(str(test_key), duration) - - def CompareOwnPerf(self, test, arch, mode): - data_store = self.perf_data_manager.GetStore(arch, mode) - observed = data_store.FetchPerfData(test) - if not observed: return - own_perf_estimate = observed / test.duration - with self.perf_data_lock: - kLearnRateLimiter = 9999 - self.relative_perf *= kLearnRateLimiter - self.relative_perf += own_perf_estimate - self.relative_perf /= (kLearnRateLimiter + 1) diff --git a/deps/v8/tools/testrunner/server/presence_handler.py b/deps/v8/tools/testrunner/server/presence_handler.py deleted file mode 100644 index 1dc2ef163ab..00000000000 --- a/deps/v8/tools/testrunner/server/presence_handler.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import socket -import SocketServer -import threading -try: - import ujson as json -except: - import json - -from . import constants -from ..objects import peer - - -STARTUP_REQUEST = "V8 test peer starting up" -STARTUP_RESPONSE = "Let's rock some tests!" -EXIT_REQUEST = "V8 testing peer going down" - - -def GetOwnIP(): - s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - s.connect(("8.8.8.8", 80)) - ip = s.getsockname()[0] - s.close() - return ip - - -class PresenceHandler(SocketServer.BaseRequestHandler): - - def handle(self): - data = json.loads(self.request[0].strip()) - - if data[0] == STARTUP_REQUEST: - jobs = data[1] - relative_perf = data[2] - pubkey_fingerprint = data[3] - trusted = self.server.daemon.IsTrusted(pubkey_fingerprint) - response = [STARTUP_RESPONSE, self.server.daemon.jobs, - self.server.daemon.relative_perf, - self.server.daemon.pubkey_fingerprint, trusted] - response = json.dumps(response) - self.server.SendTo(self.client_address[0], response) - p = peer.Peer(self.client_address[0], jobs, relative_perf, - pubkey_fingerprint) - p.trusted = trusted - self.server.daemon.AddPeer(p) - - elif data[0] == STARTUP_RESPONSE: - jobs = data[1] - perf = data[2] - pubkey_fingerprint = data[3] - p = peer.Peer(self.client_address[0], jobs, perf, pubkey_fingerprint) - p.trusted = self.server.daemon.IsTrusted(pubkey_fingerprint) - p.trusting_me = data[4] - self.server.daemon.AddPeer(p) - - elif data[0] == EXIT_REQUEST: - self.server.daemon.DeletePeer(self.client_address[0]) - if self.client_address[0] == self.server.daemon.ip: - self.server.shutdown_lock.release() - - -class PresenceDaemon(SocketServer.ThreadingMixIn, SocketServer.UDPServer): - def __init__(self, daemon): - self.daemon = daemon - address = (daemon.ip, constants.PRESENCE_PORT) - SocketServer.UDPServer.__init__(self, address, PresenceHandler) - self.shutdown_lock = threading.Lock() - - def shutdown(self): - self.shutdown_lock.acquire() - self.SendToAll(json.dumps([EXIT_REQUEST])) - self.shutdown_lock.acquire() - self.shutdown_lock.release() - SocketServer.UDPServer.shutdown(self) - - def SendTo(self, target, message): - sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - sock.sendto(message, (target, constants.PRESENCE_PORT)) - sock.close() - - def SendToAll(self, message): - sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - ip = self.daemon.ip.split(".") - for i in range(1, 254): - ip[-1] = str(i) - sock.sendto(message, (".".join(ip), constants.PRESENCE_PORT)) - sock.close() - - def FindPeers(self): - request = [STARTUP_REQUEST, self.daemon.jobs, self.daemon.relative_perf, - self.daemon.pubkey_fingerprint] - request = json.dumps(request) - self.SendToAll(request) diff --git a/deps/v8/tools/testrunner/server/signatures.py b/deps/v8/tools/testrunner/server/signatures.py deleted file mode 100644 index 9957a18a267..00000000000 --- a/deps/v8/tools/testrunner/server/signatures.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import base64 -import os -import subprocess - - -def ReadFileAndSignature(filename): - with open(filename, "rb") as f: - file_contents = base64.b64encode(f.read()) - signature_file = filename + ".signature" - if (not os.path.exists(signature_file) or - os.path.getmtime(signature_file) < os.path.getmtime(filename)): - private_key = "~/.ssh/v8_dtest" - code = subprocess.call("openssl dgst -out %s -sign %s %s" % - (signature_file, private_key, filename), - shell=True) - if code != 0: return [None, code] - with open(signature_file) as f: - signature = base64.b64encode(f.read()) - return [file_contents, signature] - - -def VerifySignature(filename, file_contents, signature, pubkeyfile): - with open(filename, "wb") as f: - f.write(base64.b64decode(file_contents)) - signature_file = filename + ".foreign_signature" - with open(signature_file, "wb") as f: - f.write(base64.b64decode(signature)) - code = subprocess.call("openssl dgst -verify %s -signature %s %s" % - (pubkeyfile, signature_file, filename), - shell=True) - matched = (code == 0) - if not matched: - os.remove(signature_file) - os.remove(filename) - return matched diff --git a/deps/v8/tools/testrunner/server/status_handler.py b/deps/v8/tools/testrunner/server/status_handler.py deleted file mode 100644 index 3f2271dc697..00000000000 --- a/deps/v8/tools/testrunner/server/status_handler.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import socket -import SocketServer - -from . import compression -from . import constants - - -def _StatusQuery(peer, query): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - code = sock.connect_ex((peer.address, constants.STATUS_PORT)) - if code != 0: - # TODO(jkummerow): disconnect (after 3 failures?) - return - compression.Send(query, sock) - compression.Send(constants.END_OF_STREAM, sock) - rec = compression.Receiver(sock) - data = None - while not rec.IsDone(): - data = rec.Current() - assert data[0] == query[0] - data = data[1] - rec.Advance() - sock.close() - return data - - -def RequestTrustedPubkeys(peer, server): - pubkey_list = _StatusQuery(peer, [constants.LIST_TRUSTED_PUBKEYS]) - for pubkey in pubkey_list: - if server.IsTrusted(pubkey): continue - result = _StatusQuery(peer, [constants.GET_SIGNED_PUBKEY, pubkey]) - server.AcceptNewTrusted(result) - - -def NotifyNewTrusted(peer, data): - _StatusQuery(peer, [constants.NOTIFY_NEW_TRUSTED] + data) - - -def ITrustYouNow(peer): - _StatusQuery(peer, [constants.TRUST_YOU_NOW]) - - -def TryTransitiveTrust(peer, pubkey, server): - if _StatusQuery(peer, [constants.DO_YOU_TRUST, pubkey]): - result = _StatusQuery(peer, [constants.GET_SIGNED_PUBKEY, pubkey]) - server.AcceptNewTrusted(result) - - -class StatusHandler(SocketServer.BaseRequestHandler): - def handle(self): - rec = compression.Receiver(self.request) - while not rec.IsDone(): - data = rec.Current() - action = data[0] - - if action == constants.LIST_TRUSTED_PUBKEYS: - response = self.server.daemon.ListTrusted() - compression.Send([action, response], self.request) - - elif action == constants.GET_SIGNED_PUBKEY: - response = self.server.daemon.SignTrusted(data[1]) - compression.Send([action, response], self.request) - - elif action == constants.NOTIFY_NEW_TRUSTED: - self.server.daemon.AcceptNewTrusted(data[1:]) - pass # No response. - - elif action == constants.TRUST_YOU_NOW: - self.server.daemon.MarkPeerAsTrusting(self.client_address[0]) - pass # No response. - - elif action == constants.DO_YOU_TRUST: - response = self.server.daemon.IsTrusted(data[1]) - compression.Send([action, response], self.request) - - rec.Advance() - compression.Send(constants.END_OF_STREAM, self.request) - - -class StatusSocketServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): - def __init__(self, daemon): - address = (daemon.ip, constants.STATUS_PORT) - SocketServer.TCPServer.__init__(self, address, StatusHandler) - self.daemon = daemon diff --git a/deps/v8/tools/testrunner/server/work_handler.py b/deps/v8/tools/testrunner/server/work_handler.py deleted file mode 100644 index 6bf7d43cf94..00000000000 --- a/deps/v8/tools/testrunner/server/work_handler.py +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright 2012 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: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import os -import SocketServer -import stat -import subprocess -import threading - -from . import compression -from . import constants -from . import signatures -from ..network import endpoint -from ..objects import workpacket - - -class WorkHandler(SocketServer.BaseRequestHandler): - - def handle(self): - rec = compression.Receiver(self.request) - while not rec.IsDone(): - data = rec.Current() - with self.server.job_lock: - self._WorkOnWorkPacket(data) - rec.Advance() - - def _WorkOnWorkPacket(self, data): - server_root = self.server.daemon.root - v8_root = os.path.join(server_root, "v8") - os.chdir(v8_root) - packet = workpacket.WorkPacket.Unpack(data) - self.ctx = packet.context - self.ctx.shell_dir = os.path.join("out", - "%s.%s" % (self.ctx.arch, self.ctx.mode)) - if not os.path.isdir(self.ctx.shell_dir): - os.makedirs(self.ctx.shell_dir) - for binary in packet.binaries: - if not self._UnpackBinary(binary, packet.pubkey_fingerprint): - return - - if not self._CheckoutRevision(packet.base_revision): - return - - if not self._ApplyPatch(packet.patch): - return - - tests = packet.tests - endpoint.Execute(v8_root, self.ctx, tests, self.request, self.server.daemon) - self._SendResponse() - - def _SendResponse(self, error_message=None): - try: - if error_message: - compression.Send([[-1, error_message]], self.request) - compression.Send(constants.END_OF_STREAM, self.request) - return - except Exception, e: - pass # Peer is gone. There's nothing we can do. - # Clean up. - self._Call("git checkout -f") - self._Call("git clean -f -d") - self._Call("rm -rf %s" % self.ctx.shell_dir) - - def _UnpackBinary(self, binary, pubkey_fingerprint): - binary_name = binary["name"] - if binary_name == "libv8.so": - libdir = os.path.join(self.ctx.shell_dir, "lib.target") - if not os.path.exists(libdir): os.makedirs(libdir) - target = os.path.join(libdir, binary_name) - else: - target = os.path.join(self.ctx.shell_dir, binary_name) - pubkeyfile = "../trusted/%s.pem" % pubkey_fingerprint - if not signatures.VerifySignature(target, binary["blob"], - binary["sign"], pubkeyfile): - self._SendResponse("Signature verification failed") - return False - os.chmod(target, stat.S_IRWXU) - return True - - def _CheckoutRevision(self, base_svn_revision): - get_hash_cmd = ( - "git log -1 --format=%%H --remotes --grep='^git-svn-id:.*@%s'" % - base_svn_revision) - try: - base_revision = subprocess.check_output(get_hash_cmd, shell=True) - if not base_revision: raise ValueError - except: - self._Call("git fetch") - try: - base_revision = subprocess.check_output(get_hash_cmd, shell=True) - if not base_revision: raise ValueError - except: - self._SendResponse("Base revision not found.") - return False - code = self._Call("git checkout -f %s" % base_revision) - if code != 0: - self._SendResponse("Error trying to check out base revision.") - return False - code = self._Call("git clean -f -d") - if code != 0: - self._SendResponse("Failed to reset checkout") - return False - return True - - def _ApplyPatch(self, patch): - if not patch: return True # Just skip if the patch is empty. - patchfilename = "_dtest_incoming_patch.patch" - with open(patchfilename, "w") as f: - f.write(patch) - code = self._Call("git apply %s" % patchfilename) - if code != 0: - self._SendResponse("Error applying patch.") - return False - return True - - def _Call(self, cmd): - return subprocess.call(cmd, shell=True) - - -class WorkSocketServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): - def __init__(self, daemon): - address = (daemon.ip, constants.PEER_PORT) - SocketServer.TCPServer.__init__(self, address, WorkHandler) - self.job_lock = threading.Lock() - self.daemon = daemon diff --git a/deps/v8/tools/testrunner/standard_runner.py b/deps/v8/tools/testrunner/standard_runner.py new file mode 100755 index 00000000000..d838df783c7 --- /dev/null +++ b/deps/v8/tools/testrunner/standard_runner.py @@ -0,0 +1,553 @@ +#!/usr/bin/env python +# +# Copyright 2017 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +from collections import OrderedDict +from os.path import join +import multiprocessing +import os +import random +import shlex +import subprocess +import sys +import time + +# Adds testrunner to the path hence it has to be imported at the beggining. +import base_runner + +from testrunner.local import execution +from testrunner.local import progress +from testrunner.local import testsuite +from testrunner.local import utils +from testrunner.local import verbose +from testrunner.local.variants import ALL_VARIANTS +from testrunner.objects import context + + +TIMEOUT_DEFAULT = 60 + +# Variants ordered by expected runtime (slowest first). +VARIANTS = ["default"] + +MORE_VARIANTS = [ + "stress", + "stress_incremental_marking", + "nooptimization", + "stress_background_compile", + "wasm_traps", +] + +VARIANT_ALIASES = { + # The default for developer workstations. + "dev": VARIANTS, + # Additional variants, run on all bots. + "more": MORE_VARIANTS, + # Shortcut for the two above ("more" first - it has the longer running tests). + "exhaustive": MORE_VARIANTS + VARIANTS, + # Additional variants, run on a subset of bots. + "extra": ["future", "liftoff"], +} + +GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction", + "--concurrent-recompilation-queue-length=64", + "--concurrent-recompilation-delay=500", + "--concurrent-recompilation"] + +# Double the timeout for these: +SLOW_ARCHS = ["arm", + "mips", + "mipsel", + "mips64", + "mips64el", + "s390", + "s390x", + "arm64"] + + +class StandardTestRunner(base_runner.BaseTestRunner): + def __init__(self): + super(StandardTestRunner, self).__init__() + + self.sancov_dir = None + + def _do_execute(self, options, args): + if options.swarming: + # Swarming doesn't print how isolated commands are called. Lets make + # this less cryptic by printing it ourselves. + print ' '.join(sys.argv) + + if utils.GuessOS() == "macos": + # TODO(machenbach): Temporary output for investigating hanging test + # driver on mac. + print "V8 related processes running on this host:" + try: + print subprocess.check_output( + "ps -e | egrep 'd8|cctest|unittests'", shell=True) + except Exception: + pass + + suite_paths = utils.GetSuitePaths(join(base_runner.BASE_DIR, "test")) + + # Use default tests if no test configuration was provided at the cmd line. + if len(args) == 0: + args = ["default"] + + # Expand arguments with grouped tests. The args should reflect the list + # of suites as otherwise filters would break. + def ExpandTestGroups(name): + if name in base_runner.TEST_MAP: + return [suite for suite in base_runner.TEST_MAP[name]] + else: + return [name] + args = reduce(lambda x, y: x + y, + [ExpandTestGroups(arg) for arg in args], + []) + + args_suites = OrderedDict() # Used as set + for arg in args: + args_suites[arg.split('/')[0]] = True + suite_paths = [ s for s in args_suites if s in suite_paths ] + + suites = [] + for root in suite_paths: + suite = testsuite.TestSuite.LoadTestSuite( + os.path.join(base_runner.BASE_DIR, "test", root)) + if suite: + suites.append(suite) + + for s in suites: + s.PrepareSources() + + try: + return self._execute(args, options, suites) + except KeyboardInterrupt: + return 2 + + def _add_parser_options(self, parser): + parser.add_option("--sancov-dir", + help="Directory where to collect coverage data") + parser.add_option("--cfi-vptr", + help="Run tests with UBSAN cfi_vptr option.", + default=False, action="store_true") + parser.add_option("--novfp3", + help="Indicates that V8 was compiled without VFP3" + " support", + default=False, action="store_true") + parser.add_option("--cat", help="Print the source of the tests", + default=False, action="store_true") + parser.add_option("--slow-tests", + help="Regard slow tests (run|skip|dontcare)", + default="dontcare") + parser.add_option("--pass-fail-tests", + help="Regard pass|fail tests (run|skip|dontcare)", + default="dontcare") + parser.add_option("--gc-stress", + help="Switch on GC stress mode", + default=False, action="store_true") + parser.add_option("--command-prefix", + help="Prepended to each shell command used to run a" + " test", + default="") + parser.add_option("--extra-flags", + help="Additional flags to pass to each test command", + action="append", default=[]) + parser.add_option("--isolates", help="Whether to test isolates", + default=False, action="store_true") + parser.add_option("-j", help="The number of parallel tasks to run", + default=0, type="int") + parser.add_option("--no-harness", "--noharness", + help="Run without test harness of a given suite", + default=False, action="store_true") + parser.add_option("--no-presubmit", "--nopresubmit", + help='Skip presubmit checks (deprecated)', + default=False, dest="no_presubmit", action="store_true") + parser.add_option("--no-sorting", "--nosorting", + help="Don't sort tests according to duration of last" + " run.", + default=False, dest="no_sorting", action="store_true") + parser.add_option("--no-variants", "--novariants", + help="Deprecated. " + "Equivalent to passing --variants=default", + default=False, dest="no_variants", action="store_true") + parser.add_option("--variants", + help="Comma-separated list of testing variants;" + " default: \"%s\"" % ",".join(VARIANTS)) + parser.add_option("--exhaustive-variants", + default=False, action="store_true", + help="Deprecated. " + "Equivalent to passing --variants=exhaustive") + parser.add_option("-p", "--progress", + help=("The style of progress indicator" + " (verbose, dots, color, mono)"), + choices=progress.PROGRESS_INDICATORS.keys(), + default="mono") + parser.add_option("--quickcheck", default=False, action="store_true", + help=("Quick check mode (skip slow tests)")) + parser.add_option("--report", help="Print a summary of the tests to be" + " run", + default=False, action="store_true") + parser.add_option("--json-test-results", + help="Path to a file for storing json results.") + parser.add_option("--flakiness-results", + help="Path to a file for storing flakiness json.") + parser.add_option("--rerun-failures-count", + help=("Number of times to rerun each failing test case." + " Very slow tests will be rerun only once."), + default=0, type="int") + parser.add_option("--rerun-failures-max", + help="Maximum number of failing test cases to rerun.", + default=100, type="int") + parser.add_option("--shard-count", + help="Split testsuites into this number of shards", + default=1, type="int") + parser.add_option("--shard-run", + help="Run this shard from the split up tests.", + default=1, type="int") + parser.add_option("--dont-skip-slow-simulator-tests", + help="Don't skip more slow tests when using a" + " simulator.", + default=False, action="store_true", + dest="dont_skip_simulator_slow_tests") + parser.add_option("--swarming", + help="Indicates running test driver on swarming.", + default=False, action="store_true") + parser.add_option("--time", help="Print timing information after running", + default=False, action="store_true") + parser.add_option("-t", "--timeout", help="Timeout in seconds", + default=TIMEOUT_DEFAULT, type="int") + parser.add_option("--warn-unused", help="Report unused rules", + default=False, action="store_true") + parser.add_option("--junitout", help="File name of the JUnit output") + parser.add_option("--junittestsuite", + help="The testsuite name in the JUnit output file", + default="v8tests") + parser.add_option("--random-seed", default=0, dest="random_seed", + help="Default seed for initializing random generator", + type=int) + parser.add_option("--random-seed-stress-count", default=1, type="int", + dest="random_seed_stress_count", + help="Number of runs with different random seeds") + + def _process_options(self, options): + global VARIANTS + + if options.sancov_dir: + self.sancov_dir = options.sancov_dir + if not os.path.exists(self.sancov_dir): + print("sancov-dir %s doesn't exist" % self.sancov_dir) + raise base_runner.TestRunnerError() + + options.command_prefix = shlex.split(options.command_prefix) + options.extra_flags = sum(map(shlex.split, options.extra_flags), []) + + if options.gc_stress: + options.extra_flags += GC_STRESS_FLAGS + + if self.build_config.asan: + options.extra_flags.append("--invoke-weak-callbacks") + options.extra_flags.append("--omit-quit") + + if options.novfp3: + options.extra_flags.append("--noenable-vfp3") + + if options.no_variants: + print ("Option --no-variants is deprecated. " + "Pass --variants=default instead.") + assert not options.variants + options.variants = "default" + + if options.exhaustive_variants: + # TODO(machenbach): Switch infra to --variants=exhaustive after M65. + print ("Option --exhaustive-variants is deprecated. " + "Pass --variants=exhaustive instead.") + # This is used on many bots. It includes a larger set of default + # variants. + # Other options for manipulating variants still apply afterwards. + assert not options.variants + options.variants = "exhaustive" + + if options.quickcheck: + assert not options.variants + options.variants = "stress,default" + options.slow_tests = "skip" + options.pass_fail_tests = "skip" + + if self.build_config.predictable: + options.variants = "default" + options.extra_flags.append("--predictable") + options.extra_flags.append("--verify_predictable") + options.extra_flags.append("--no-inline-new") + + # TODO(machenbach): Figure out how to test a bigger subset of variants on + # msan. + if self.build_config.msan: + options.variants = "default" + + if options.j == 0: + options.j = multiprocessing.cpu_count() + + if options.random_seed_stress_count <= 1 and options.random_seed == 0: + options.random_seed = self._random_seed() + + # Use developer defaults if no variant was specified. + options.variants = options.variants or "dev" + + # Resolve variant aliases and dedupe. + # TODO(machenbach): Don't mutate global variable. Rather pass mutated + # version as local variable. + VARIANTS = list(set(reduce( + list.__add__, + (VARIANT_ALIASES.get(v, [v]) for v in options.variants.split(",")), + [], + ))) + + if not set(VARIANTS).issubset(ALL_VARIANTS): + print "All variants must be in %s" % str(ALL_VARIANTS) + raise base_runner.TestRunnerError() + + def CheckTestMode(name, option): + if not option in ["run", "skip", "dontcare"]: + print "Unknown %s mode %s" % (name, option) + raise base_runner.TestRunnerError() + CheckTestMode("slow test", options.slow_tests) + CheckTestMode("pass|fail test", options.pass_fail_tests) + if self.build_config.no_i18n: + base_runner.TEST_MAP["bot_default"].remove("intl") + base_runner.TEST_MAP["default"].remove("intl") + + def _setup_env(self): + super(StandardTestRunner, self)._setup_env() + + symbolizer_option = self._get_external_symbolizer_option() + + if self.sancov_dir: + os.environ['ASAN_OPTIONS'] = ":".join([ + 'coverage=1', + 'coverage_dir=%s' % self.sancov_dir, + symbolizer_option, + "allow_user_segv_handler=1", + ]) + + def _random_seed(self): + seed = 0 + while not seed: + seed = random.SystemRandom().randint(-2147483648, 2147483647) + return seed + + def _execute(self, args, options, suites): + print(">>> Running tests for %s.%s" % (self.build_config.arch, + self.mode_name)) + # Populate context object. + + # Simulators are slow, therefore allow a longer timeout. + if self.build_config.arch in SLOW_ARCHS: + options.timeout *= 2 + + options.timeout *= self.mode_options.timeout_scalefactor + + if self.build_config.predictable: + # Predictable mode is slower. + options.timeout *= 2 + + ctx = context.Context(self.build_config.arch, + self.mode_options.execution_mode, + self.outdir, + self.mode_options.flags, + options.verbose, + options.timeout, + options.isolates, + options.command_prefix, + options.extra_flags, + self.build_config.no_i18n, + options.random_seed, + options.no_sorting, + options.rerun_failures_count, + options.rerun_failures_max, + self.build_config.predictable, + options.no_harness, + use_perf_data=not options.swarming, + sancov_dir=self.sancov_dir) + + # TODO(all): Combine "simulator" and "simulator_run". + # TODO(machenbach): In GN we can derive simulator run from + # target_arch != v8_target_arch in the dumped build config. + simulator_run = ( + not options.dont_skip_simulator_slow_tests and + self.build_config.arch in [ + 'arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', 'ppc', + 'ppc64', 's390', 's390x'] and + bool(base_runner.ARCH_GUESS) and + self.build_config.arch != base_runner.ARCH_GUESS) + # Find available test suites and read test cases from them. + variables = { + "arch": self.build_config.arch, + "asan": self.build_config.asan, + "byteorder": sys.byteorder, + "dcheck_always_on": self.build_config.dcheck_always_on, + "deopt_fuzzer": False, + "gc_fuzzer": False, + "gc_stress": options.gc_stress, + "gcov_coverage": self.build_config.gcov_coverage, + "isolates": options.isolates, + "mode": self.mode_options.status_mode, + "msan": self.build_config.msan, + "no_harness": options.no_harness, + "no_i18n": self.build_config.no_i18n, + "no_snap": self.build_config.no_snap, + "novfp3": options.novfp3, + "predictable": self.build_config.predictable, + "simulator": utils.UseSimulator(self.build_config.arch), + "simulator_run": simulator_run, + "system": utils.GuessOS(), + "tsan": self.build_config.tsan, + "ubsan_vptr": self.build_config.ubsan_vptr, + } + all_tests = [] + num_tests = 0 + for s in suites: + s.ReadStatusFile(variables) + s.ReadTestCases(ctx) + if len(args) > 0: + s.FilterTestCasesByArgs(args) + all_tests += s.tests + + # First filtering by status applying the generic rules (tests without + # variants) + if options.warn_unused: + s.WarnUnusedRules(check_variant_rules=False) + s.FilterTestCasesByStatus(options.slow_tests, options.pass_fail_tests) + + if options.cat: + verbose.PrintTestSource(s.tests) + continue + variant_gen = s.CreateVariantGenerator(VARIANTS) + variant_tests = [ t.CopyAddingFlags(v, flags) + for t in s.tests + for v in variant_gen.FilterVariantsByTest(t) + for flags in variant_gen.GetFlagSets(t, v) ] + + if options.random_seed_stress_count > 1: + # Duplicate test for random seed stress mode. + def iter_seed_flags(): + for _ in range(0, options.random_seed_stress_count): + # Use given random seed for all runs (set by default in + # execution.py) or a new random seed if none is specified. + if options.random_seed: + yield [] + else: + yield ["--random-seed=%d" % self._random_seed()] + s.tests = [ + t.CopyAddingFlags(t.variant, flags) + for t in variant_tests + for flags in iter_seed_flags() + ] + else: + s.tests = variant_tests + + # Second filtering by status applying also the variant-dependent rules. + if options.warn_unused: + s.WarnUnusedRules(check_variant_rules=True) + s.FilterTestCasesByStatus(options.slow_tests, options.pass_fail_tests) + + for t in s.tests: + t.flags += s.GetStatusfileFlags(t) + + s.tests = self._shard_tests(s.tests, options) + num_tests += len(s.tests) + + if options.cat: + return 0 # We're done here. + + if options.report: + verbose.PrintReport(all_tests) + + # Run the tests. + start_time = time.time() + progress_indicator = progress.IndicatorNotifier() + progress_indicator.Register( + progress.PROGRESS_INDICATORS[options.progress]()) + if options.junitout: + progress_indicator.Register(progress.JUnitTestProgressIndicator( + options.junitout, options.junittestsuite)) + if options.json_test_results: + progress_indicator.Register(progress.JsonTestProgressIndicator( + options.json_test_results, + self.build_config.arch, + self.mode_options.execution_mode, + ctx.random_seed)) + if options.flakiness_results: + progress_indicator.Register(progress.FlakinessTestProgressIndicator( + options.flakiness_results)) + + runner = execution.Runner(suites, progress_indicator, ctx) + exit_code = runner.Run(options.j) + overall_duration = time.time() - start_time + + if options.time: + verbose.PrintTestDurations(suites, overall_duration) + + if num_tests == 0: + print("Warning: no tests were run!") + + if exit_code == 1 and options.json_test_results: + print("Force exit code 0 after failures. Json test results file " + "generated with failure information.") + exit_code = 0 + + if self.sancov_dir: + # If tests ran with sanitizer coverage, merge coverage files in the end. + try: + print "Merging sancov files." + subprocess.check_call([ + sys.executable, + join( + base_runner.BASE_DIR, "tools", "sanitizers", "sancov_merger.py"), + "--coverage-dir=%s" % self.sancov_dir]) + except: + print >> sys.stderr, "Error: Merging sancov files failed." + exit_code = 1 + + return exit_code + + def _shard_tests(self, tests, options): + # Read gtest shard configuration from environment (e.g. set by swarming). + # If none is present, use values passed on the command line. + shard_count = int( + os.environ.get('GTEST_TOTAL_SHARDS', options.shard_count)) + shard_run = os.environ.get('GTEST_SHARD_INDEX') + if shard_run is not None: + # The v8 shard_run starts at 1, while GTEST_SHARD_INDEX starts at 0. + shard_run = int(shard_run) + 1 + else: + shard_run = options.shard_run + + if options.shard_count > 1: + # Log if a value was passed on the cmd line and it differs from the + # environment variables. + if options.shard_count != shard_count: + print("shard_count from cmd line differs from environment variable " + "GTEST_TOTAL_SHARDS") + if options.shard_run > 1 and options.shard_run != shard_run: + print("shard_run from cmd line differs from environment variable " + "GTEST_SHARD_INDEX") + + if shard_count < 2: + return tests + if shard_run < 1 or shard_run > shard_count: + print "shard-run not a valid number, should be in [1:shard-count]" + print "defaulting back to running all tests" + return tests + count = 0 + shard = [] + for test in tests: + if count % shard_count == shard_run - 1: + shard.append(test) + count += 1 + return shard + + +if __name__ == '__main__': + sys.exit(StandardTestRunner().execute()) diff --git a/deps/v8/tools/tick-processor.html b/deps/v8/tools/tick-processor.html index 3cb4a0b2c36..b841cc0bd32 100644 --- a/deps/v8/tools/tick-processor.html +++ b/deps/v8/tools/tick-processor.html @@ -50,6 +50,7 @@ +