diff --git a/deps/v8/include/v8-debug.h b/deps/v8/include/v8-debug.h index e41df29ad053c7..50314501e3b3b9 100644 --- a/deps/v8/include/v8-debug.h +++ b/deps/v8/include/v8-debug.h @@ -18,11 +18,13 @@ enum DebugEvent { Exception = 2, NewFunction = 3, BeforeCompile = 4, - AfterCompile = 5, + AfterCompile = 5, CompileError = 6, - AsyncTaskEvent = 7, + PromiseEvent = 7, + AsyncTaskEvent = 8, }; + class V8_EXPORT Debug { public: /** diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index 4023a5b234fd4b..11f8d51f02573e 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -152,9 +152,9 @@ class Platform { */ virtual uint64_t AddTraceEvent( 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, unsigned int flags) { + 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) { return 0; } diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 703a4f4f4ad575..ad2e5f60c2a68a 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -5212,8 +5212,8 @@ class V8_EXPORT HeapStatistics { size_t total_available_size_; size_t used_heap_size_; size_t heap_size_limit_; - size_t malloced_memory_; bool does_zap_garbage_; + size_t malloced_memory_; friend class V8; friend class Isolate; @@ -7330,7 +7330,7 @@ class Internals { 1 * kApiPointerSize + kApiIntSize; static const int kStringResourceOffset = 3 * kApiPointerSize; - static const int kOddballKindOffset = 5 * kApiPointerSize; + static const int kOddballKindOffset = 4 * kApiPointerSize; static const int kForeignAddressOffset = kApiPointerSize; static const int kJSObjectHeaderSize = 3 * kApiPointerSize; static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; @@ -7349,12 +7349,12 @@ class Internals { static const int kIsolateRootsOffset = kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size + kApiPointerSize; - static const int kUndefinedValueRootIndex = 4; - static const int kTheHoleValueRootIndex = 5; - static const int kNullValueRootIndex = 6; - static const int kTrueValueRootIndex = 7; - static const int kFalseValueRootIndex = 8; - static const int kEmptyStringRootIndex = 9; + static const int kUndefinedValueRootIndex = 5; + static const int kNullValueRootIndex = 7; + static const int kTrueValueRootIndex = 8; + static const int kFalseValueRootIndex = 9; + static const int kEmptyStringRootIndex = 10; + static const int kTheHoleValueRootIndex = 11; // The external allocation limit should be below 256 MB on all architectures // to avoid that resource-constrained embedders run low on memory. @@ -7370,7 +7370,7 @@ class Internals { static const int kNodeIsPartiallyDependentShift = 4; static const int kNodeIsActiveShift = 4; - static const int kJSObjectType = 0xb8; + static const int kJSObjectType = 0xb5; static const int kFirstNonstringType = 0x80; static const int kOddballType = 0x83; static const int kForeignType = 0x87; diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 5d326981cd6320..dc954d3f143595 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -5526,8 +5526,8 @@ HeapStatistics::HeapStatistics() total_available_size_(0), used_heap_size_(0), heap_size_limit_(0), - malloced_memory_(0), - does_zap_garbage_(0) {} + does_zap_garbage_(0), + malloced_memory_(0) {} HeapSpaceStatistics::HeapSpaceStatistics(): space_name_(0), space_size_(0), diff --git a/deps/v8/src/builtins.cc b/deps/v8/src/builtins.cc index 9c3ff5956b29d7..1ad19946cb0acd 100644 --- a/deps/v8/src/builtins.cc +++ b/deps/v8/src/builtins.cc @@ -223,7 +223,8 @@ inline bool PrototypeHasNoElements(Isolate* isolate, JSObject* object) { HeapObject* empty = isolate->heap()->empty_fixed_array(); while (prototype != null) { Map* map = prototype->map(); - if (map->instance_type() <= LAST_CUSTOM_ELEMENTS_RECEIVER) return false; + if (map->instance_type() <= LAST_CUSTOM_ELEMENTS_RECEIVER || + map->instance_type() == JS_GLOBAL_PROXY_TYPE) return false; if (JSObject::cast(prototype)->elements() != empty) return false; prototype = HeapObject::cast(map->prototype()); } @@ -237,6 +238,7 @@ inline bool IsJSArrayFastElementMovingAllowed(Isolate* isolate, inline bool HasSimpleElements(JSObject* current) { return current->map()->instance_type() > LAST_CUSTOM_ELEMENTS_RECEIVER && + current->map()->instance_type() != JS_GLOBAL_PROXY_TYPE && !current->GetElementsAccessor()->HasAccessors(current); } @@ -421,9 +423,13 @@ void Builtins::Generate_ObjectHasOwnProperty( { Label if_objectissimple(assembler); - assembler->Branch(assembler->Int32LessThanOrEqual( - instance_type, - assembler->Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)), + assembler->Branch(assembler->Word32Or( + assembler->Int32LessThanOrEqual( + instance_type, assembler->Int32Constant( + LAST_SPECIAL_RECEIVER_TYPE)), + assembler->Word32Equal( + instance_type, assembler->Int32Constant( + JS_GLOBAL_PROXY_TYPE))), &call_runtime, &if_objectissimple); assembler->Bind(&if_objectissimple); } @@ -481,9 +487,13 @@ void Builtins::Generate_ObjectHasOwnProperty( assembler->Bind(&keyisindex); { Label if_objectissimple(assembler); - assembler->Branch(assembler->Int32LessThanOrEqual( - instance_type, assembler->Int32Constant( + assembler->Branch(assembler->Word32Or( + assembler->Int32LessThanOrEqual( + instance_type, assembler->Int32Constant( LAST_CUSTOM_ELEMENTS_RECEIVER)), + assembler->Word32Equal( + instance_type, assembler->Int32Constant( + JS_GLOBAL_PROXY_TYPE))), &call_runtime, &if_objectissimple); assembler->Bind(&if_objectissimple); } diff --git a/deps/v8/src/code-stubs-hydrogen.cc b/deps/v8/src/code-stubs-hydrogen.cc index 1d2fb811fbb2c2..c08be58945837b 100644 --- a/deps/v8/src/code-stubs-hydrogen.cc +++ b/deps/v8/src/code-stubs-hydrogen.cc @@ -923,6 +923,9 @@ HValue* CodeStubGraphBuilder::BuildCodeStub() { check_instance_type.If( instance_type, Add(LAST_CUSTOM_ELEMENTS_RECEIVER), Token::LTE); + check_instance_type.Or(); + check_instance_type.If( + instance_type, Add(JS_GLOBAL_PROXY_TYPE), Token::EQ); check_instance_type.ThenDeopt(Deoptimizer::kFastArrayPushFailed); check_instance_type.End(); diff --git a/deps/v8/src/d8.cc b/deps/v8/src/d8.cc index 06883803f90091..967d1e4fd43c62 100644 --- a/deps/v8/src/d8.cc +++ b/deps/v8/src/d8.cc @@ -133,7 +133,7 @@ class PredictablePlatform : public Platform { } uint64_t AddTraceEvent(char phase, const uint8_t* categoryEnabledFlag, - const char* name, const char* scope, uint64_t id, + const char* name, uint64_t id, uint64_t bind_id, int numArgs, const char** argNames, const uint8_t* argTypes, const uint64_t* argValues, unsigned int flags) override { diff --git a/deps/v8/src/debug/debug.cc b/deps/v8/src/debug/debug.cc index 6e9401257967cd..7c76742bb973cb 100644 --- a/deps/v8/src/debug/debug.cc +++ b/deps/v8/src/debug/debug.cc @@ -1708,6 +1708,13 @@ MaybeHandle Debug::MakeCompileEvent(Handle