diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:39:11 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:46:25 +0100 |
commit | 6ca81ad72a3c6fdf16c683335be748f22aaa9a0d (patch) | |
tree | 33c8ee75f729aed76c2c0b89c63f9bf1b4dd66aa /deps/v8/src/common | |
parent | 1eee0b8bf8bba39b600fb16a9223e545e3bac2bc (diff) | |
download | android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.gz android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.bz2 android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.zip |
deps: update V8 to 7.9.317.20
PR-URL: https://github.com/nodejs/node/pull/30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'deps/v8/src/common')
-rw-r--r-- | deps/v8/src/common/assert-scope.cc | 2 | ||||
-rw-r--r-- | deps/v8/src/common/assert-scope.h | 17 | ||||
-rw-r--r-- | deps/v8/src/common/globals.h | 22 | ||||
-rw-r--r-- | deps/v8/src/common/message-template.h | 8 | ||||
-rw-r--r-- | deps/v8/src/common/ptr-compr-inl.h | 24 | ||||
-rw-r--r-- | deps/v8/src/common/ptr-compr.h | 1 |
6 files changed, 18 insertions, 56 deletions
diff --git a/deps/v8/src/common/assert-scope.cc b/deps/v8/src/common/assert-scope.cc index f1fe717cc0..5138ce7122 100644 --- a/deps/v8/src/common/assert-scope.cc +++ b/deps/v8/src/common/assert-scope.cc @@ -126,8 +126,6 @@ template class PerThreadAssertScope<HANDLE_ALLOCATION_ASSERT, false>; template class PerThreadAssertScope<HANDLE_ALLOCATION_ASSERT, true>; template class PerThreadAssertScope<HANDLE_DEREFERENCE_ASSERT, false>; template class PerThreadAssertScope<HANDLE_DEREFERENCE_ASSERT, true>; -template class PerThreadAssertScope<DEFERRED_HANDLE_DEREFERENCE_ASSERT, false>; -template class PerThreadAssertScope<DEFERRED_HANDLE_DEREFERENCE_ASSERT, true>; template class PerThreadAssertScope<CODE_DEPENDENCY_CHANGE_ASSERT, false>; template class PerThreadAssertScope<CODE_DEPENDENCY_CHANGE_ASSERT, true>; diff --git a/deps/v8/src/common/assert-scope.h b/deps/v8/src/common/assert-scope.h index 73729400ac..27f4112144 100644 --- a/deps/v8/src/common/assert-scope.h +++ b/deps/v8/src/common/assert-scope.h @@ -28,7 +28,6 @@ enum PerThreadAssertType { HEAP_ALLOCATION_ASSERT, HANDLE_ALLOCATION_ASSERT, HANDLE_DEREFERENCE_ASSERT, - DEFERRED_HANDLE_DEREFERENCE_ASSERT, CODE_DEPENDENCY_CHANGE_ASSERT, LAST_PER_THREAD_ASSERT_TYPE }; @@ -145,19 +144,11 @@ using DisallowHandleDereference = using AllowHandleDereference = PerThreadAssertScopeDebugOnly<HANDLE_DEREFERENCE_ASSERT, true>; -// Scope to document where we do not expect deferred handles to be dereferenced. -using DisallowDeferredHandleDereference = - PerThreadAssertScopeDebugOnly<DEFERRED_HANDLE_DEREFERENCE_ASSERT, false>; - -// Scope to introduce an exception to DisallowDeferredHandleDereference. -using AllowDeferredHandleDereference = - PerThreadAssertScopeDebugOnly<DEFERRED_HANDLE_DEREFERENCE_ASSERT, true>; - -// Scope to document where we do not expect deferred handles to be dereferenced. +// Scope to document where we do not expect code dependencies to change. using DisallowCodeDependencyChange = PerThreadAssertScopeDebugOnly<CODE_DEPENDENCY_CHANGE_ASSERT, false>; -// Scope to introduce an exception to DisallowDeferredHandleDereference. +// Scope to introduce an exception to DisallowCodeDependencyChange. using AllowCodeDependencyChange = PerThreadAssertScopeDebugOnly<CODE_DEPENDENCY_CHANGE_ASSERT, true>; @@ -243,10 +234,6 @@ extern template class PerThreadAssertScope<HANDLE_ALLOCATION_ASSERT, false>; extern template class PerThreadAssertScope<HANDLE_ALLOCATION_ASSERT, true>; extern template class PerThreadAssertScope<HANDLE_DEREFERENCE_ASSERT, false>; extern template class PerThreadAssertScope<HANDLE_DEREFERENCE_ASSERT, true>; -extern template class PerThreadAssertScope<DEFERRED_HANDLE_DEREFERENCE_ASSERT, - false>; -extern template class PerThreadAssertScope<DEFERRED_HANDLE_DEREFERENCE_ASSERT, - true>; extern template class PerThreadAssertScope<CODE_DEPENDENCY_CHANGE_ASSERT, false>; extern template class PerThreadAssertScope<CODE_DEPENDENCY_CHANGE_ASSERT, true>; diff --git a/deps/v8/src/common/globals.h b/deps/v8/src/common/globals.h index a0584b95c4..20faebfe3a 100644 --- a/deps/v8/src/common/globals.h +++ b/deps/v8/src/common/globals.h @@ -166,13 +166,14 @@ constexpr int kElidedFrameSlots = 0; #endif constexpr int kDoubleSizeLog2 = 3; +constexpr size_t kMaxWasmCodeMB = 1024; +constexpr size_t kMaxWasmCodeMemory = kMaxWasmCodeMB * MB; #if V8_TARGET_ARCH_ARM64 // ARM64 only supports direct calls within a 128 MB range. -constexpr size_t kMaxWasmCodeMB = 128; +constexpr size_t kMaxWasmCodeSpaceSize = 128 * MB; #else -constexpr size_t kMaxWasmCodeMB = 1024; +constexpr size_t kMaxWasmCodeSpaceSize = kMaxWasmCodeMemory; #endif -constexpr size_t kMaxWasmCodeMemory = kMaxWasmCodeMB * MB; #if V8_HOST_ARCH_64_BIT constexpr int kSystemPointerSizeLog2 = 3; @@ -230,7 +231,7 @@ constexpr int kTaggedSizeLog2 = 2; // These types define raw and atomic storage types for tagged values stored // on V8 heap. -using Tagged_t = int32_t; +using Tagged_t = uint32_t; using AtomicTagged_t = base::Atomic32; #else @@ -245,11 +246,6 @@ using AtomicTagged_t = base::AtomicWord; #endif // V8_COMPRESS_POINTERS -// Defines whether the branchless or branchful implementation of pointer -// decompression should be used. -constexpr bool kUseBranchlessPtrDecompressionInRuntime = false; -constexpr bool kUseBranchlessPtrDecompressionInGeneratedCode = false; - STATIC_ASSERT(kTaggedSize == (1 << kTaggedSizeLog2)); STATIC_ASSERT((kTaggedSize == 8) == TAGGED_SIZE_8_BYTES); @@ -795,8 +791,6 @@ enum InlineCacheState { NO_FEEDBACK, // Has never been executed. UNINITIALIZED, - // Has been executed but monomorphic state has been delayed. - PREMONOMORPHIC, // Has been executed and only one receiver type has been seen. MONOMORPHIC, // Check failed due to prototype (or map deprecation). @@ -816,8 +810,6 @@ inline const char* InlineCacheState2String(InlineCacheState state) { return "NOFEEDBACK"; case UNINITIALIZED: return "UNINITIALIZED"; - case PREMONOMORPHIC: - return "PREMONOMORPHIC"; case MONOMORPHIC: return "MONOMORPHIC"; case RECOMPUTE_HANDLER: @@ -1216,6 +1208,10 @@ enum VariableLocation : uint8_t { // immediately initialized upon creation (kCreatedInitialized). enum InitializationFlag : uint8_t { kNeedsInitialization, kCreatedInitialized }; +// Static variables can only be used with the class in the closest +// class scope as receivers. +enum class IsStaticFlag : uint8_t { kNotStatic, kStatic }; + enum MaybeAssignedFlag : uint8_t { kNotAssigned, kMaybeAssigned }; enum class InterpreterPushArgsMode : unsigned { diff --git a/deps/v8/src/common/message-template.h b/deps/v8/src/common/message-template.h index e3307a525c..41af7b8f18 100644 --- a/deps/v8/src/common/message-template.h +++ b/deps/v8/src/common/message-template.h @@ -10,7 +10,6 @@ namespace v8 { namespace internal { -// TODO(913887): fix the use of 'neuter' in these error messages. #define MESSAGE_TEMPLATES(T) \ /* Error */ \ T(None, "") \ @@ -34,7 +33,6 @@ namespace internal { "Derived ArrayBuffer constructor created a buffer which was too small") \ T(ArrayBufferSpeciesThis, \ "ArrayBuffer subclass returned this from species constructor") \ - T(ArrayItemNotType, "array %[%] is not type %") \ T(AwaitNotInAsyncFunction, "await is only valid in async function") \ T(AtomicsWaitNotAllowed, "Atomics.wait cannot be called in this context") \ T(BadSortComparisonFunction, \ @@ -78,7 +76,7 @@ namespace internal { T(DebuggerType, "Debugger: Parameters have wrong types.") \ T(DeclarationMissingInitializer, "Missing initializer in % declaration") \ T(DefineDisallowed, "Cannot define property %, object is not extensible") \ - T(DetachedOperation, "Cannot perform % on a neutered ArrayBuffer") \ + T(DetachedOperation, "Cannot perform % on a detached ArrayBuffer") \ T(DuplicateTemplateProperty, "Object template has duplicate property '%'") \ T(ExtendsValueNotConstructor, \ "Class extends value % is not a constructor or null") \ @@ -101,6 +99,7 @@ namespace internal { T(InvalidRegExpExecResult, \ "RegExp exec method returned something other than an Object or null") \ T(InvalidUnit, "Invalid unit argument for %() '%'") \ + T(IterableYieldedNonString, "Iterable yielded % which is not a string") \ T(IteratorResultNotAnObject, "Iterator result % is not an object") \ T(IteratorSymbolNonCallable, "Found non-callable @@iterator") \ T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \ @@ -540,6 +539,7 @@ namespace internal { T(WasmTrapFloatUnrepresentable, "float unrepresentable in integer range") \ T(WasmTrapFuncInvalid, "invalid index into function table") \ T(WasmTrapFuncSigMismatch, "function signature mismatch") \ + T(WasmTrapMultiReturnLengthMismatch, "multi-return length mismatch") \ T(WasmTrapTypeError, "wasm function signature contains illegal type") \ T(WasmTrapDataSegmentDropped, "data segment has been dropped") \ T(WasmTrapElemSegmentDropped, "element segment has been dropped") \ @@ -554,7 +554,7 @@ namespace internal { T(DataCloneError, "% could not be cloned.") \ T(DataCloneErrorOutOfMemory, "Data cannot be cloned, out of memory.") \ T(DataCloneErrorDetachedArrayBuffer, \ - "An ArrayBuffer is neutered and could not be cloned.") \ + "An ArrayBuffer is detached and could not be cloned.") \ T(DataCloneErrorSharedArrayBufferTransferred, \ "A SharedArrayBuffer could not be cloned. SharedArrayBuffer must not be " \ "transferred.") \ diff --git a/deps/v8/src/common/ptr-compr-inl.h b/deps/v8/src/common/ptr-compr-inl.h index a8fd7f245c..17239d15c2 100644 --- a/deps/v8/src/common/ptr-compr-inl.h +++ b/deps/v8/src/common/ptr-compr-inl.h @@ -29,8 +29,7 @@ V8_INLINE Address GetIsolateRoot<Address>(Address on_heap_addr) { // signed constant instead of 64-bit constant (the problem is that 2Gb looks // like a negative 32-bit value). It's correct because we will never use // leftmost address of V8 heap as |on_heap_addr|. - return RoundDown<kPtrComprIsolateRootAlignment>(on_heap_addr + - kPtrComprIsolateRootBias - 1); + return RoundDown<kPtrComprIsolateRootAlignment>(on_heap_addr); } template <> @@ -54,37 +53,20 @@ V8_INLINE Address DecompressTaggedSigned(Tagged_t raw_value) { template <typename TOnHeapAddress> V8_INLINE Address DecompressTaggedPointer(TOnHeapAddress on_heap_addr, Tagged_t raw_value) { - // Current compression scheme requires |raw_value| to be sign-extended - // from int32_t to intptr_t. - intptr_t value = static_cast<intptr_t>(static_cast<int32_t>(raw_value)); - Address root = GetIsolateRoot(on_heap_addr); - return root + static_cast<Address>(value); + return GetIsolateRoot(on_heap_addr) + static_cast<Address>(raw_value); } // Decompresses any tagged value, preserving both weak- and smi- tags. template <typename TOnHeapAddress> V8_INLINE Address DecompressTaggedAny(TOnHeapAddress on_heap_addr, Tagged_t raw_value) { - if (kUseBranchlessPtrDecompressionInRuntime) { - // Current compression scheme requires |raw_value| to be sign-extended - // from int32_t to intptr_t. - intptr_t value = static_cast<intptr_t>(static_cast<int32_t>(raw_value)); - // |root_mask| is 0 if the |value| was a smi or -1 otherwise. - Address root_mask = static_cast<Address>(-(value & kSmiTagMask)); - Address root_or_zero = root_mask & GetIsolateRoot(on_heap_addr); - return root_or_zero + static_cast<Address>(value); - } else { - return HAS_SMI_TAG(raw_value) - ? DecompressTaggedSigned(raw_value) - : DecompressTaggedPointer(on_heap_addr, raw_value); - } + return DecompressTaggedPointer(on_heap_addr, raw_value); } #ifdef V8_COMPRESS_POINTERS STATIC_ASSERT(kPtrComprHeapReservationSize == Internals::kPtrComprHeapReservationSize); -STATIC_ASSERT(kPtrComprIsolateRootBias == Internals::kPtrComprIsolateRootBias); STATIC_ASSERT(kPtrComprIsolateRootAlignment == Internals::kPtrComprIsolateRootAlignment); diff --git a/deps/v8/src/common/ptr-compr.h b/deps/v8/src/common/ptr-compr.h index 5b4a74e7e3..105d5f1a4f 100644 --- a/deps/v8/src/common/ptr-compr.h +++ b/deps/v8/src/common/ptr-compr.h @@ -14,7 +14,6 @@ namespace internal { // See v8:7703 for details about how pointer compression works. constexpr size_t kPtrComprHeapReservationSize = size_t{4} * GB; -constexpr size_t kPtrComprIsolateRootBias = kPtrComprHeapReservationSize / 2; constexpr size_t kPtrComprIsolateRootAlignment = size_t{4} * GB; } // namespace internal |