44#if V8_ENABLE_WEBASSEMBLY
92 "Exported format version must match latest version.");
100using JSArrayBufferViewIsBackedByRab =
101 JSArrayBufferViewIsLengthTracking::Next<bool, 1>;
107 static_assert(std::is_integral_v<T> && std::is_unsigned_v<T>,
108 "Only unsigned integer types can be written as varints.");
247enum class ArrayBufferViewTag : uint8_t {
250 kUint8ClampedArray =
'C',
258 kBigInt64Array =
'q',
259 kBigUint64Array =
'Q',
264enum class ErrorTag : uint8_t {
266 kEvalErrorPrototype =
'E',
268 kRangeErrorPrototype =
'R',
270 kReferenceErrorPrototype =
'F',
272 kSyntaxErrorPrototype =
'S',
274 kTypeErrorPrototype =
'T',
276 kUriErrorPrototype =
'U',
287enum class WasmMemoryArrayBufferTag : uint8_t {
289 kResizableNotFollowedByWasmMemory =
'r',
290 kResizableFollowedByWasmMemory =
'w'
301 array_buffer_transfer_map_(isolate->
heap(),
329 uint8_t raw_tag =
static_cast<uint8_t
>(tag);
339 static_assert(std::is_integral_v<T> && std::is_unsigned_v<T>,
340 "Only unsigned integer types can be written as varints.");
341 uint8_t stack_buffer[
sizeof(
T) * 8 / 7 + 1];
342 uint8_t* next_byte = &stack_buffer[0];
344 *next_byte = (value & 0x7F) | 0x80;
348 *(next_byte - 1) &= 0x7F;
358 static_assert(std::is_integral_v<T> && std::is_signed_v<T>,
359 "Only signed integer types can be written as zigzag.");
360 using UnsignedT = std::make_unsigned_t<T>;
362 (value >> (8 *
sizeof(T) - 1)));
385 uint32_t bitfield = bigint->GetBitfieldForSerialization();
390 bigint->SerializeDigits(dest, bytelength);
397 memcpy(dest, source, length);
403 size_t new_size = old_size + bytes;
416 size_t requested_capacity =
418 size_t provided_capacity = 0;
419 void* new_buffer =
nullptr;
425 provided_capacity = requested_capacity;
428 DCHECK(provided_capacity >= requested_capacity);
429 buffer_ =
reinterpret_cast<uint8_t*
>(new_buffer);
464 DCHECK(!array_buffer->is_shared());
474 if (
IsSmi(*
object)) {
482 switch (instance_type) {
486 case HEAP_NUMBER_TYPE:
492 case JS_TYPED_ARRAY_TYPE:
493 case JS_DATA_VIEW_TYPE:
494 case JS_RAB_GSAB_DATA_VIEW_TYPE: {
503 InstanceTypeChecker::IsJSTypedArray(instance_type)
511 if (InstanceTypeChecker::IsString(instance_type)) {
514 }
else if (InstanceTypeChecker::IsJSReceiver(instance_type)) {
524 switch (oddball->kind()) {
544 static_assert(
kSmiValueSize <= 32,
"Expected SMI <= 32 bits.");
585 if (find_result.already_exists) {
593 *find_result.entry =
id + 1;
598 instance_type != JS_SPECIAL_API_OBJECT_TYPE)) {
606 switch (instance_type) {
609 case JS_ARRAY_ITERATOR_PROTOTYPE_TYPE:
610 case JS_ITERATOR_PROTOTYPE_TYPE:
611 case JS_MAP_ITERATOR_PROTOTYPE_TYPE:
612 case JS_OBJECT_PROTOTYPE_TYPE:
614 case JS_PROMISE_PROTOTYPE_TYPE:
615 case JS_REG_EXP_PROTOTYPE_TYPE:
616 case JS_SET_ITERATOR_PROTOTYPE_TYPE:
617 case JS_SET_PROTOTYPE_TYPE:
618 case JS_STRING_ITERATOR_PROTOTYPE_TYPE:
619 case JS_TYPED_ARRAY_PROTOTYPE_TYPE:
620 case JS_API_OBJECT_TYPE: {
624 return is_host_object;
632 case JS_SPECIAL_API_OBJECT_TYPE:
637 case JS_PRIMITIVE_WRAPPER_TYPE:
639 case JS_REG_EXP_TYPE:
646 case JS_ARRAY_BUFFER_TYPE:
648 case JS_TYPED_ARRAY_TYPE:
649 case JS_DATA_VIEW_TYPE:
650 case JS_RAB_GSAB_DATA_VIEW_TYPE:
654 case JS_SHARED_ARRAY_TYPE:
656 case JS_SHARED_STRUCT_TYPE:
658 case JS_ATOMICS_MUTEX_TYPE:
659 case JS_ATOMICS_CONDITION_TYPE:
661#if V8_ENABLE_WEBASSEMBLY
662 case WASM_MODULE_OBJECT_TYPE:
664 case WASM_MEMORY_OBJECT_TYPE:
676 const bool can_serialize_fast =
677 object->HasFastProperties(
isolate_) &&
object->elements()->length() == 0;
685 uint32_t properties_written = 0;
686 bool map_changed =
false;
692 map->instance_descriptors(
isolate_)->GetDetails(
i);
696 if (
V8_LIKELY(!map_changed)) map_changed = *map !=
object->map();
707 if (!it.IsFound())
continue;
715 properties_written++;
726 uint32_t properties_written = 0;
750 const bool should_serialize_densely =
751 array->HasFastElements(cage_base) && !array->HasHoleyElements(cage_base);
753 if (should_serialize_densely) {
761 switch (array->GetElementsKind(cage_base)) {
773 if (length == 0)
break;
786 if (array->length(cage_base) != *old_length ||
829 uint32_t properties_written;
840 uint32_t properties_written = 0;
865 if (IsTrue(inner_value,
isolate_)) {
867 }
else if (IsFalse(inner_value,
isolate_)) {
869 }
else if (
IsNumber(inner_value, cage_base)) {
872 }
else if (IsBigInt(inner_value, cage_base)) {
875 }
else if (IsString(inner_value, cage_base)) {
880 DCHECK(IsSymbol(inner_value));
890 WriteVarint(
static_cast<uint32_t
>(regexp->flags()));
897 int length = table->NumberOfElements() * 2;
905 int result_index = 0;
908 if (
key == hash_table_hole)
continue;
909 raw_entries->set(result_index++,
key);
910 raw_entries->set(result_index++, raw_table->ValueAt(entry));
932 int length = table->NumberOfElements();
940 int result_index = 0;
943 if (
key == hash_table_hole)
continue;
944 raw_entries->set(result_index++,
key);
964 if (array_buffer->is_shared()) {
972 v8_isolate, Utils::ToLocalShared(array_buffer));
978#if V8_ENABLE_WEBASSEMBLY
987 auto backing_store = array_buffer->GetBackingStore();
988 if (backing_store && backing_store->is_wasm_memory()) {
989 if (array_buffer->is_resizable_by_js()) {
995 CHECK(IsWasmMemoryObject(*memory));
1001 WasmMemoryArrayBufferTag::kResizableFollowedByWasmMemory));
1007 WasmMemoryArrayBufferTag::kResizableNotFollowedByWasmMemory));
1011 static_cast<uint8_t
>(WasmMemoryArrayBufferTag::kFixedLength));
1020 if (transfer_entry) {
1025 if (array_buffer->was_detached()) {
1027 MessageTemplate::kDataCloneErrorDetachedArrayBuffer);
1029 size_t byte_length = array_buffer->byte_length();
1030 if (byte_length > std::numeric_limits<uint32_t>::max()) {
1033 if (array_buffer->is_resizable_by_js()) {
1034 size_t max_byte_length = array_buffer->max_byte_length();
1035 if (max_byte_length > std::numeric_limits<uint32_t>::max()) {
1058 ArrayBufferViewTag tag = ArrayBufferViewTag::kInt8Array;
1059 if (IsJSTypedArray(view)) {
1065#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype) \
1066 case kExternal##Type##Array: \
1067 tag = ArrayBufferViewTag::k##Type##Array; \
1070#undef TYPED_ARRAY_CASE
1073 DCHECK(IsJSDataViewOrRabGsabDataView(view));
1074 if (IsJSRabGsabDataView(view) &&
1080 tag = ArrayBufferViewTag::kDataView;
1083 WriteVarint(
static_cast<uint32_t
>(view->byte_offset()));
1084 WriteVarint(
static_cast<uint32_t
>(view->byte_length()));
1086 JSArrayBufferViewIsLengthTracking::encode(view->is_length_tracking()) |
1087 JSArrayBufferViewIsBackedByRab::encode(view->is_backed_by_rab());
1105 if (!JSObject::GetProperty(
isolate_, error,
"name").ToHandle(&name_object)) {
1114 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kEvalErrorPrototype));
1116 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kRangeErrorPrototype));
1118 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kReferenceErrorPrototype));
1120 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kSyntaxErrorPrototype));
1122 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kTypeErrorPrototype));
1124 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kUriErrorPrototype));
1136 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kMessage));
1141 .ToHandle(&stack)) {
1144 if (IsString(*stack)) {
1145 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kStack));
1154 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kCause));
1160 WriteVarint(
static_cast<uint8_t
>(ErrorTag::kEnd));
1175#if V8_ENABLE_WEBASSEMBLY
1186 if (transfer_id.
To(&
id)) {
1194Maybe<bool> ValueSerializer::WriteWasmMemory(
1195 DirectHandle<WasmMemoryObject>
object) {
1196 if (!object->array_buffer()->is_shared()) {
1201 object->array_buffer()->GetBackingStore());
1205 WriteByte(object->is_memory64() ? 1 : 0);
1207 DirectHandle<JSReceiver>(object->array_buffer(),
isolate_));
1228 std::move(v8_conveyor))) {
1245 isolate_->error_function(), MessageTemplate::kDataCloneError,
object));
1260 uint32_t properties_written = 0;
1261 int length = keys->length();
1272 if (!it.IsFound())
continue;
1279 properties_written++;
1281 return Just(properties_written);
1331 delegate_(delegate),
1334 id_map_(isolate->global_handles()->Create(
1343 id_map_(isolate->global_handles()->Create(
1363 MessageTemplate::kDataCloneDeserializationVersionError));
1371 const uint8_t* peek_position =
position_;
1383 DCHECK(actual_tag == peeked_tag);
1397template <
typename T>
1404 static_assert(std::is_integral_v<T> && std::is_unsigned_v<T>,
1405 "Only unsigned integer types can be read as varints.");
1407 auto max_read_position =
position_ +
sizeof(
T) + 1;
1416 T expected_value = maybe_expected_value.
ToChecked();
1420#define EXIT_DCHECK() \
1421 DCHECK_LE(position_, end_); \
1422 DCHECK_EQ(position_, expected_position); \
1423 DCHECK_EQ(value, expected_value)
1426#define ITERATION_SHIFTED(shift) \
1427 if (shift < sizeof(T) * 8) { \
1428 uint8_t byte = *position_; \
1430 if (byte < 0x80) { \
1431 value |= static_cast<T>(byte) << shift; \
1433 return Just(value); \
1435 value |= static_cast<T>(byte & 0x7F) << shift; \
1448#undef ITERATION_SHIFTED
1452template <
typename T>
1454 static_assert(std::is_integral_v<T> && std::is_unsigned_v<T>,
1455 "Only unsigned integer types can be read as varints.");
1458 bool has_another_byte;
1462 has_another_byte =
byte & 0x80;
1464 value |=
static_cast<T
>(
byte & 0x7F) << shift;
1469#ifdef V8_VALUE_DESERIALIZER_HARD_FAIL
1470 CHECK(!has_another_byte);
1475 }
while (has_another_byte);
1479template <
typename T>
1484 static_assert(std::is_integral_v<T> && std::is_signed_v<T>,
1485 "Only signed integer types can be read as zigzag.");
1486 using UnsignedT = std::make_unsigned_t<T>;
1487 UnsignedT unsigned_value;
1489 return Just(
static_cast<T
>((unsigned_value >> 1) ^
1490 -
static_cast<T
>(unsigned_value & 1)));
1498 if (
sizeof(
double) >
static_cast<unsigned>(
end_ -
position_)) {
1502 memcpy(&value,
position_,
sizeof(
double));
1504 if (std::isnan(value)) value = std::numeric_limits<double>::quiet_NaN();
1530 if (
static_cast<size_t>(
end_ -
position_) <
sizeof(uint8_t))
return false;
1549 if (length >
static_cast<size_t>(
end_ -
position_))
return false;
1559 *SimpleNumberDictionary::New(
isolate_, 0));
1578 const uint8_t* original_position =
position_;
1592 MessageTemplate::kDataCloneDeserializationError));
1599 DisallowJavascriptExecution no_js(
isolate_);
1618 MessageTemplate::kDataCloneDeserializationError));
1620#if defined(DEBUG) && defined(VERIFY_HEAP)
1623 Object::ObjectVerify(*
object,
isolate_);
1697 constexpr bool is_resizable =
false;
1702 constexpr bool is_resizable =
true;
1710 constexpr bool is_resizable =
false;
1715#if V8_ENABLE_WEBASSEMBLY
1717 return ReadWasmModuleTransfer();
1719 return ReadWasmMemory();
1761 uint32_t utf8_length;
1765 if (!
ReadRawBytes(utf8_length).To(&utf8_bytes))
return {};
1772 uint32_t byte_length;
1782 uint32_t byte_length;
1797 .ToHandle(&
string)) {
1804 memcpy(string->GetChars(no_gc), bytes.begin(), bytes.length());
1818 uint32_t num_properties;
1819 uint32_t expected_num_properties;
1821 .To(&num_properties) ||
1823 num_properties != expected_num_properties) {
1845 uint32_t num_properties;
1846 uint32_t expected_num_properties;
1847 uint32_t expected_length;
1849 .To(&num_properties) ||
1852 num_properties != expected_num_properties || length != expected_length) {
1883 auto elements_length =
static_cast<uint32_t
>(elements->length());
1902 elements->set(
i, *element);
1905 uint32_t num_properties;
1906 uint32_t expected_num_properties;
1907 uint32_t expected_length;
1909 .To(&num_properties) ||
1912 num_properties != expected_num_properties || length != expected_length) {
1956 value->set_value(*number_object);
1965 value->set_value(*bigint);
1974 value->set_value(*
string);
1995 uint32_t bad_flags_mask =
static_cast<uint32_t
>(-1) << JSRegExp::kFlagCount;
1997 if (!
v8_flags.enable_experimental_regexp_engine) {
1998 bad_flags_mask |= JSRegExp::kLinear;
2000 if ((raw_flags & bad_flags_mask) ||
2003 .ToHandle(®exp)) {
2021 uint32_t length = 0;
2035 AllowJavascriptExecution allow_js(
isolate_);
2043 uint32_t expected_length;
2045 length != expected_length) {
2061 uint32_t length = 0;
2073 AllowJavascriptExecution allow_js(
isolate_);
2081 uint32_t expected_length;
2083 length != expected_length) {
2098 ->GetSharedArrayBufferFromId(
2109#if V8_ENABLE_WEBASSEMBLY
2110 auto backing_store = array_buffer->GetBackingStore();
2111 if (backing_store && backing_store->is_wasm_memory()) {
2112 uint8_t resizable_subtag;
2116 switch (
static_cast<WasmMemoryArrayBufferTag
>(resizable_subtag)) {
2117 case WasmMemoryArrayBufferTag::kFixedLength:
2120 case WasmMemoryArrayBufferTag::kResizableNotFollowedByWasmMemory:
2123 array_buffer->set_is_resizable_by_js(
true);
2125 case WasmMemoryArrayBufferTag::kResizableFollowedByWasmMemory: {
2126 array_buffer->set_is_resizable_by_js(
true);
2128 if (!
ReadObject().ToHandle(&wasm_memory_obj) ||
2129 !IsWasmMemoryObject(*wasm_memory_obj,
isolate_)) {
2140 return array_buffer;
2142 uint32_t byte_length;
2146 uint32_t max_byte_length = byte_length;
2151 if (byte_length > max_byte_length) {
2167 if (byte_length > 0) {
2168 memcpy(array_buffer->backing_store(),
position_, byte_length);
2172 return array_buffer;
2178 uint32_t transfer_id;
2185 if (index.is_not_found()) {
2191 return array_buffer;
2196 uint32_t buffer_byte_length =
static_cast<uint32_t
>(buffer->GetByteLength());
2198 uint32_t byte_offset = 0;
2199 uint32_t byte_length = 0;
2204 byte_offset > buffer_byte_length ||
2205 byte_length > buffer_byte_length - byte_offset) {
2214 unsigned element_size = 0;
2216 switch (
static_cast<ArrayBufferViewTag
>(tag)) {
2217 case ArrayBufferViewTag::kDataView: {
2218 bool is_length_tracking =
false;
2226 buffer, byte_offset, byte_length, is_length_tracking);
2228 CHECK_EQ(is_length_tracking, data_view->is_length_tracking());
2232#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype) \
2233 case ArrayBufferViewTag::k##Type##Array: \
2234 external_array_type = kExternal##Type##Array; \
2235 element_size = sizeof(ctype); \
2238#undef TYPED_ARRAY_CASE
2239 case ArrayBufferViewTag::kFloat16Array: {
2242 element_size =
sizeof(uint16_t);
2247 if (element_size == 0 || byte_offset % element_size != 0 ||
2248 byte_length % element_size != 0) {
2251 bool is_length_tracking =
false;
2258 external_array_type, buffer, byte_offset, byte_length / element_size,
2259 is_length_tracking);
2260 CHECK_EQ(is_length_tracking, typed_array->is_length_tracking());
2269 is_length_tracking =
2270 JSArrayBufferViewIsLengthTracking::decode(serialized_flags);
2271 is_backed_by_rab = JSArrayBufferViewIsBackedByRab::decode(serialized_flags);
2277 if (!buffer->is_resizable_by_js()) {
2286 if (buffer->is_resizable_by_js() && !buffer->is_shared() &&
2296#define READ_NEXT_ERROR_TAG() \
2298 if (!ReadVarint<uint8_t>().To(&tag)) { \
2299 return MaybeDirectHandle<JSObject>(); \
2308 switch (
static_cast<ErrorTag
>(tag)) {
2309 case ErrorTag::kEvalErrorPrototype:
2310 constructor =
isolate_->eval_error_function();
2313 case ErrorTag::kRangeErrorPrototype:
2314 constructor =
isolate_->range_error_function();
2317 case ErrorTag::kReferenceErrorPrototype:
2318 constructor =
isolate_->reference_error_function();
2321 case ErrorTag::kSyntaxErrorPrototype:
2322 constructor =
isolate_->syntax_error_function();
2325 case ErrorTag::kTypeErrorPrototype:
2326 constructor =
isolate_->type_error_function();
2329 case ErrorTag::kUriErrorPrototype:
2330 constructor =
isolate_->uri_error_function();
2336 constructor =
isolate_->error_function();
2342 if (
static_cast<ErrorTag
>(tag) == ErrorTag::kMessage) {
2344 if (!
ReadString().ToHandle(&message_string)) {
2347 message = message_string;
2353 if (
static_cast<ErrorTag
>(tag) == ErrorTag::kStack) {
2358 stack = stack_string;
2368 undefined_options,
SKIP_NONE, no_caller,
2370 .ToHandle(&error)) {
2377 if (
static_cast<ErrorTag
>(tag) == ErrorTag::kCause) {
2391#undef READ_NEXT_ERROR_TAG
2393 if (
static_cast<ErrorTag
>(tag) != ErrorTag::kEnd) {
2399#if V8_ENABLE_WEBASSEMBLY
2401 uint32_t transfer_id = 0;
2412 DirectHandle<JSObject> module =
2418MaybeDirectHandle<WasmMemoryObject> ValueDeserializer::ReadWasmMemory() {
2421 int32_t maximum_pages;
2423 uint8_t memory64_byte;
2424 if (!
ReadByte(&memory64_byte))
return {};
2425 if (memory64_byte > 1)
return {};
2429 DirectHandle<Object> buffer_object;
2430 if (!
ReadObject().ToHandle(&buffer_object))
return {};
2431 if (!IsJSArrayBuffer(*buffer_object))
return {};
2434 if (!buffer->is_shared())
return {};
2436 DirectHandle<WasmMemoryObject>
result =
2448void ThrowDeserializationExceptionIfNonePending(Isolate* isolate) {
2449 if (!isolate->has_exception()) {
2450 isolate->Throw(*isolate->factory()->NewError(
2451 MessageTemplate::kDataCloneDeserializationError));
2453 DCHECK(isolate->has_exception());
2462 uint32_t shared_object_id;
2469 ThrowDeserializationExceptionIfNonePending(
isolate_);
2486 return shared_object;
2511 DCHECK(!object->map()->is_dictionary_map());
2517 object->WriteToField(
i, descriptors->GetDetails(
i),
2518 *properties[
i.raw_value()]);
2523 if (
IsSmi(value))
return true;
2524 auto instance_type =
Cast<HeapObject>(value)->map(isolate)->instance_type();
2525 return InstanceTypeChecker::IsName(instance_type) ||
2526 InstanceTypeChecker::IsHeapNumber(instance_type);
2531 bool can_use_transitions) {
2532 uint32_t num_properties = 0;
2535 if (can_use_transitions) {
2536 bool transitioning =
true;
2538 DCHECK(!map->is_dictionary_map());
2541 properties.reserve(8);
2543 while (transitioning) {
2547 if (tag == end_tag) {
2550 CHECK_LT(properties.size(), std::numeric_limits<uint32_t>::max());
2551 return Just(
static_cast<uint32_t
>(properties.size()));
2559 bool transition_was_found =
false;
2560 const uint8_t* start_position =
position_;
2561 uint32_t byte_length;
2566#ifdef V8_VALUE_DESERIALIZER_HARD_FAIL
2568 static_cast<uint32_t
>(std::numeric_limits<int32_t>::max()));
2576 expected_transition = transitions.ExpectedTransition(key_chars);
2581 expected_transition = transitions.ExpectedTransition(key_chars);
2587 expected_transition = transitions.ExpectedTransition(key_chars);
2590 if (!expected_transition.first.is_null()) {
2591 transition_was_found =
true;
2592 key = expected_transition.first;
2593 target = expected_transition.second;
2596 if (!transition_was_found) {
2608 transitioning =
false;
2619 if (transitioning) {
2623 if (!target->is_dictionary_map()) {
2626 target->instance_descriptors(
isolate_)->GetDetails(descriptor);
2631 target->instance_descriptors(
isolate_)->GetFieldType(
2635 *value,
isolate_, expected_representation);
2638 expected_representation, value_type);
2641 target->instance_descriptors(
isolate_)->GetFieldType(
2644 properties.push_back(value);
2649 transitioning =
false;
2655 CHECK_LT(properties.size(), std::numeric_limits<uint32_t>::max());
2656 CHECK(!map->is_dictionary_map());
2658 num_properties =
static_cast<uint32_t
>(properties.size());
2679 for (;; num_properties++) {
2682 if (tag == end_tag) {
2684 return Just(num_properties);
2706 return id < static_cast<unsigned>(
id_map_->length()) &&
2711 if (
id >=
static_cast<unsigned>(
id_map_->length())) {
2716 DCHECK(IsJSReceiver(value));
2736 uint32_t num_properties) {
2737 for (
unsigned i = 0;
i < 2 * num_properties;
i += 2) {
2752MaybeDirectHandle<Object>
2759 if (!
PeekTag().To(&tag))
break;
2768 uint32_t num_properties;
2770 stack.size() / 2 < num_properties) {
2772 MessageTemplate::kDataCloneDeserializationError));
2776 size_t begin_properties =
2777 stack.size() - 2 *
static_cast<size_t>(num_properties);
2780 if (num_properties &&
2782 isolate_, js_object, &stack[begin_properties], num_properties)
2783 .FromMaybe(
false)) {
2784 ThrowDeserializationExceptionIfNonePending(
isolate_);
2788 stack.resize(begin_properties);
2789 new_object = js_object;
2796 uint32_t num_properties;
2800 stack.size() / 2 < num_properties) {
2802 MessageTemplate::kDataCloneDeserializationError));
2809 size_t begin_properties =
2810 stack.size() - 2 *
static_cast<size_t>(num_properties);
2811 if (num_properties &&
2813 isolate_, js_array, &stack[begin_properties], num_properties)
2814 .FromMaybe(
false)) {
2815 ThrowDeserializationExceptionIfNonePending(
isolate_);
2819 stack.resize(begin_properties);
2820 new_object = js_array;
2826 MessageTemplate::kDataCloneDeserializationError));
2834 stack.push_back(new_object);
2845 if (stack.size() != 1) {
2847 MessageTemplate::kDataCloneDeserializationError));
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype)
V8_WARN_UNUSED_RESULT V8_INLINE bool To(T *out) const
V8_INLINE T FromJust() const &
V8_INLINE T ToChecked() const
V8_INLINE bool IsNothing() const
std::unique_ptr< internal::SharedObjectConveyorHandles > private_
static v8::internal::DirectHandle< To > OpenDirectHandle(v8::Local< From > handle)
virtual MaybeLocal< Object > ReadHostObject(Isolate *isolate)
virtual const SharedValueConveyor * GetSharedValueConveyor(Isolate *isolate)
virtual Maybe< uint32_t > GetWasmModuleTransferId(Isolate *isolate, Local< WasmModuleObject > module)
virtual void ThrowDataCloneError(Local< String > message)=0
virtual bool AdoptSharedValueConveyor(Isolate *isolate, SharedValueConveyor &&conveyor)
virtual Maybe< bool > IsHostObject(Isolate *isolate, Local< Object > object)
virtual void FreeBufferMemory(void *buffer)
virtual Maybe< bool > WriteHostObject(Isolate *isolate, Local< Object > object)
virtual Maybe< uint32_t > GetSharedArrayBufferId(Isolate *isolate, Local< SharedArrayBuffer > shared_array_buffer)
virtual bool HasCustomHostObject(Isolate *isolate)
virtual void * ReallocateBufferMemory(void *old_buffer, size_t size, size_t *actual_size)
constexpr T * begin() const
static size_t DigitsByteLengthForBitfield(uint32_t bitfield)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< BigInt > FromSerializedDigits(Isolate *isolate, uint32_t bitfield, base::Vector< const uint8_t > digits_storage)
V8_INLINE bool is_identical_to(Handle< S > other) const
static void SetFormattedStack(Isolate *isolate, DirectHandle< JSObject > maybe_error_object, DirectHandle< Object > formatted_stack)
static MaybeDirectHandle< JSObject > Construct(Isolate *isolate, DirectHandle< JSFunction > target, DirectHandle< Object > new_target, DirectHandle< Object > message, DirectHandle< Object > options)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle< Object > Call(Isolate *isolate, DirectHandle< Object > callable, DirectHandle< Object > receiver, base::Vector< const DirectHandle< Object > > args)
MaybeHandle< String > NewStringFromOneByte(base::Vector< const uint8_t > string, AllocationType allocation=AllocationType::kYoung)
Handle< Number > NewNumberFromInt(int32_t value)
Handle< Number > NewNumberFromUint(uint32_t value)
V8_WARN_UNUSED_RESULT MaybeHandle< SeqTwoByteString > NewRawTwoByteString(int length, AllocationType allocation=AllocationType::kYoung)
Handle< Number > NewNumber(double value)
Handle< FixedArray > NewFixedArray(int length, AllocationType allocation=AllocationType::kYoung)
Handle< JSArray > NewJSArray(ElementsKind elements_kind, int length, int capacity, ArrayStorageAllocationMode mode=ArrayStorageAllocationMode::DONT_INITIALIZE_ARRAY_ELEMENTS, AllocationType allocation=AllocationType::kYoung)
Handle< JSTypedArray > NewJSTypedArray(ExternalArrayType type, DirectHandle< JSArrayBuffer > buffer, size_t byte_offset, size_t length, bool is_length_tracking=false)
MaybeHandle< JSArrayBuffer > NewJSArrayBufferAndBackingStore(size_t byte_length, InitializedFlag initialized, AllocationType allocation=AllocationType::kYoung)
Handle< JSObject > NewJSObject(DirectHandle< JSFunction > constructor, AllocationType allocation=AllocationType::kYoung, NewJSObjectType=NewJSObjectType::kNoAPIWrapper)
V8_WARN_UNUSED_RESULT MaybeHandle< String > NewStringFromUtf8(base::Vector< const char > str, AllocationType allocation=AllocationType::kYoung)
DirectHandle< JSSet > NewJSSet()
Handle< JSDataViewOrRabGsabDataView > NewJSDataViewOrRabGsabDataView(DirectHandle< JSArrayBuffer > buffer, size_t byte_offset, size_t byte_length, bool is_length_tracking=false)
DirectHandle< JSMap > NewJSMap()
Handle< String > InternalizeString(base::Vector< const char > str, bool convert_encoding=false)
Handle< JSObject > NewError(DirectHandle< JSFunction > constructor, DirectHandle< String > message, DirectHandle< Object > options={})
static FieldIndex ForDetails(Tagged< Map > map, PropertyDetails details)
static bool NowContains(Tagged< FieldType > type, Tagged< Object > value)
static constexpr int kMaxLength
static V8_EXPORT_PRIVATE HandleType< FixedArray > SetAndGrow(Isolate *isolate, HandleType< FixedArray > array, int index, DirectHandle< Object > value)
static void Register(std::shared_ptr< BackingStore > backing_store)
static void Destroy(Address *location)
IndirectHandle< Object > Create(Tagged< Object > value)
V8_INLINE Address * location() const
HandleType< T > CloseAndEscape(HandleType< T > handle_value)
GlobalHandles * global_handles() const
Tagged< Object > Throw(Tagged< Object > exception, MessageLocation *location=nullptr)
bool has_shared_space() const
v8::internal::Factory * factory()
static V8_EXPORT_PRIVATE Maybe< bool > SetLength(DirectHandle< JSArray > array, uint32_t length)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSDate > New(DirectHandle< JSFunction > constructor, DirectHandle< JSReceiver > new_target, double tv)
static V8_WARN_UNUSED_RESULT HandleType< Object >::MaybeType DefineOwnPropertyIgnoreAttributes(LookupIterator *it, HandleType< T > value, PropertyAttributes attributes, AccessorInfoHandling handling=DONT_FORCE_FIELD, EnforceDefineSemantics semantics=EnforceDefineSemantics::kSet)
int GetEmbedderFieldCount() const
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > V8_EXPORT_PRIVATE SetOwnPropertyIgnoreAttributes(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes)
static void AllocateStorageForMap(DirectHandle< JSObject > object, DirectHandle< Map > map)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > GetOwnPropertyDescriptor(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > key, PropertyDescriptor *desc)
static V8_EXPORT_PRIVATE MaybeDirectHandle< JSRegExp > New(Isolate *isolate, DirectHandle< String > source, Flags flags, uint32_t backtrack_limit=kNoBacktrackLimit)
static MaybeHandle< FixedArray > GetKeys(Isolate *isolate, DirectHandle< JSReceiver > object, KeyCollectionMode mode, PropertyFilter filter, GetKeysConversion keys_conversion=GetKeysConversion::kKeepNumbers, bool is_for_in=false, bool skip_indices=false)
static void GeneralizeField(Isolate *isolate, DirectHandle< Map > map, InternalIndex modify_index, PropertyConstness new_constness, Representation new_representation, DirectHandle< FieldType > new_field_type)
static V8_EXPORT_PRIVATE DirectHandle< Map > Update(Isolate *isolate, DirectHandle< Map > map)
static bool ToArrayLength(Tagged< Object > obj, uint32_t *index)
static V8_WARN_UNUSED_RESULT HandleType< String >::MaybeType ToString(Isolate *isolate, HandleType< T > input)
static DirectHandle< FieldType > OptimalType(Tagged< Object > obj, Isolate *isolate, Representation representation)
static double NumberValue(Tagged< Number > obj)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle< Object > GetProperty(LookupIterator *it, bool is_global_reference=false)
static bool FitsRepresentation(Tagged< Object > obj, Representation representation, bool allow_coercion=true)
static constexpr uint8_t kNull
static constexpr uint8_t kUndefined
static constexpr uint8_t kFalse
static constexpr uint8_t kTrue
Handle< JSAny > value() const
static bool IsDataDescriptor(PropertyDescriptor *desc)
PropertyLocation location() const
Representation representation() const
PropertyKind kind() const
PropertyConstness constness() const
static V8_EXPORT_PRIVATE bool VerifyFlags(RegExpFlags flags)
constexpr bool IsHeapObject() const
uint32_t Persist(Tagged< HeapObject > shared_object)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Handle< SimpleNumberDictionary > Set(Isolate *isolate, Handle< SimpleNumberDictionary > dictionary, uint32_t key, DirectHandle< Object > value)
base::Vector< const uint8_t > ToOneByteVector() const
base::Vector< const base::uc16 > ToUC16Vector() const
static V8_INLINE HandleType< String > Flatten(Isolate *isolate, HandleType< T > string, AllocationType allocation=AllocationType::kYoung)
static bool IsAscii(const char *chars, uint32_t length)
MaybeHandle< Map > FindTransitionToField(DirectHandle< String > name)
MaybeDirectHandle< JSReceiver > GetObjectWithID(uint32_t id)
bool ReadByte(uint8_t *value) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< String > ReadString() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSArrayBuffer > ReadJSArrayBuffer(bool is_shared, bool is_resizable) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSRegExp > ReadJSRegExp() V8_WARN_UNUSED_RESULT
Maybe< double > ReadDouble() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSArray > ReadDenseJSArray() V8_WARN_UNUSED_RESULT
const SharedObjectConveyorHandles * shared_object_conveyor_
MaybeDirectHandle< JSArrayBuffer > ReadTransferredJSArrayBuffer() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< Object > ReadObject() V8_WARN_UNUSED_RESULT
MaybeIndirectHandle< SimpleNumberDictionary > array_buffer_transfer_map_
Maybe< bool > ReadHeader() V8_WARN_UNUSED_RESULT
bool HasObjectWithID(uint32_t id)
bool ValidateJSArrayBufferViewFlags(Tagged< JSArrayBuffer > buffer, uint32_t serialized_flags, bool &is_length_tracking, bool &is_backed_by_rab) V8_WARN_UNUSED_RESULT
bool ReadUint64(uint64_t *value) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< Object > ReadObjectUsingEntireBufferForLegacyFormat() V8_WARN_UNUSED_RESULT
V8_NOINLINE Maybe< T > ReadVarintLoop() V8_WARN_UNUSED_RESULT
void ConsumeTag(SerializationTag peeked_tag)
MaybeDirectHandle< JSDate > ReadJSDate() V8_WARN_UNUSED_RESULT
Maybe< base::Vector< const base::uc16 > > ReadRawTwoBytes(size_t size) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< BigInt > ReadBigInt() V8_WARN_UNUSED_RESULT
bool ReadRawBytes(size_t length, const void **data) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSArrayBufferView > ReadJSArrayBufferView(DirectHandle< JSArrayBuffer > buffer) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSArray > ReadSparseJSArray() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< Object > ReadObjectWrapper() V8_WARN_UNUSED_RESULT
const uint8_t * position_
MaybeDirectHandle< Object > ReadJSError() V8_WARN_UNUSED_RESULT
bool ReadUint32(uint32_t *value) V8_WARN_UNUSED_RESULT
v8::ValueDeserializer::Delegate *const delegate_
void TransferArrayBuffer(uint32_t transfer_id, DirectHandle< JSArrayBuffer > array_buffer)
MaybeDirectHandle< String > ReadOneByteString(AllocationType allocation=AllocationType::kYoung) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< HeapObject > ReadSharedObject() V8_WARN_UNUSED_RESULT
void AddObjectWithID(uint32_t id, DirectHandle< JSReceiver > object)
Maybe< SerializationTag > ReadTag() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSMap > ReadJSMap() V8_WARN_UNUSED_RESULT
const uint8_t *const end_
IndirectHandle< FixedArray > id_map_
MaybeDirectHandle< JSPrimitiveWrapper > ReadJSPrimitiveWrapper(SerializationTag tag) V8_WARN_UNUSED_RESULT
bool version_13_broken_data_mode_
Maybe< T > ReadZigZag() V8_WARN_UNUSED_RESULT
Maybe< uint32_t > ReadJSObjectProperties(DirectHandle< JSObject > object, SerializationTag end_tag, bool can_use_transitions)
MaybeDirectHandle< JSObject > ReadJSObject() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< String > ReadUtf8String(AllocationType allocation=AllocationType::kYoung) V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSObject > ReadHostObject() V8_WARN_UNUSED_RESULT
MaybeDirectHandle< Object > ReadObjectInternal() V8_WARN_UNUSED_RESULT
Maybe< SerializationTag > PeekTag() const V8_WARN_UNUSED_RESULT
MaybeDirectHandle< JSSet > ReadJSSet() V8_WARN_UNUSED_RESULT
ValueDeserializer(Isolate *isolate, base::Vector< const uint8_t > data, v8::ValueDeserializer::Delegate *delegate)
bool suppress_deserialization_errors_
MaybeDirectHandle< String > ReadTwoByteString(AllocationType allocation=AllocationType::kYoung) V8_WARN_UNUSED_RESULT
V8_INLINE Maybe< T > ReadVarint() V8_WARN_UNUSED_RESULT
void WriteTag(SerializationTag tag)
void WriteVarint(T value)
Maybe< uint32_t > WriteJSObjectPropertiesSlow(DirectHandle< JSObject > object, DirectHandle< FixedArray > keys) V8_WARN_UNUSED_RESULT
Maybe< bool > WriteJSArray(DirectHandle< JSArray > array) V8_WARN_UNUSED_RESULT
Maybe< bool > ExpandBuffer(size_t required_capacity)
Maybe< bool > WriteSharedObject(DirectHandle< HeapObject > object) V8_WARN_UNUSED_RESULT
void WriteOddball(Tagged< Oddball > oddball)
Maybe< bool > ThrowIfOutOfMemory()
void WriteUint32(uint32_t value)
bool treat_array_buffer_views_as_host_objects_
Maybe< bool > WriteJSError(DirectHandle< JSObject > error) V8_WARN_UNUSED_RESULT
void WriteTwoByteString(base::Vector< const base::uc16 > chars)
void WriteZigZag(T value)
Maybe< bool > WriteJSMap(DirectHandle< JSMap > map) V8_WARN_UNUSED_RESULT
void WriteHeapNumber(Tagged< HeapNumber > number)
void SetTreatArrayBufferViewsAsHostObjects(bool mode)
ValueSerializer(Isolate *isolate, v8::ValueSerializer::Delegate *delegate)
void WriteJSRegExp(DirectHandle< JSRegExp > regexp)
void WriteString(DirectHandle< String > string)
void WriteOneByteString(base::Vector< const uint8_t > chars)
Maybe< bool > WriteJSSharedStruct(DirectHandle< JSSharedStruct > shared_struct) V8_WARN_UNUSED_RESULT
Maybe< bool > WriteHostObject(DirectHandle< JSObject > object) V8_WARN_UNUSED_RESULT
Maybe< bool > WriteJSSet(DirectHandle< JSSet > map) V8_WARN_UNUSED_RESULT
v8::ValueSerializer::Delegate *const delegate_
V8_NOINLINE Maybe< bool > ThrowDataCloneError(MessageTemplate template_index) V8_WARN_UNUSED_RESULT
void WriteJSDate(Tagged< JSDate > date)
void WriteSmi(Tagged< Smi > smi)
Maybe< bool > WriteJSArrayBufferView(Tagged< JSArrayBufferView > array_buffer)
void WriteByte(uint8_t value)
IdentityMap< uint32_t, ZoneAllocationPolicy > array_buffer_transfer_map_
bool has_custom_host_objects_
Maybe< bool > WriteJSArrayBuffer(DirectHandle< JSArrayBuffer > array_buffer) V8_WARN_UNUSED_RESULT
void WriteRawBytes(const void *source, size_t length)
void WriteBigIntContents(Tagged< BigInt > bigint)
Maybe< bool > WriteJSObjectSlow(DirectHandle< JSObject > object) V8_WARN_UNUSED_RESULT
IdentityMap< uint32_t, ZoneAllocationPolicy > id_map_
void TransferArrayBuffer(uint32_t transfer_id, DirectHandle< JSArrayBuffer > array_buffer)
Maybe< bool > WriteJSObject(DirectHandle< JSObject > object) V8_WARN_UNUSED_RESULT
Maybe< bool > WriteJSReceiver(DirectHandle< JSReceiver > receiver) V8_WARN_UNUSED_RESULT
void WriteBigInt(Tagged< BigInt > bigint)
Maybe< bool > WriteJSPrimitiveWrapper(DirectHandle< JSPrimitiveWrapper > value) V8_WARN_UNUSED_RESULT
Maybe< bool > WriteObject(DirectHandle< Object > object) V8_WARN_UNUSED_RESULT
Maybe< bool > IsHostObject(DirectHandle< JSObject > object)
Maybe< uint8_t * > ReserveRawBytes(size_t bytes)
SharedObjectConveyorHandles * shared_object_conveyor_
Maybe< bool > WriteJSSharedArray(DirectHandle< JSSharedArray > shared_array) V8_WARN_UNUSED_RESULT
void WriteDouble(double value)
std::pair< uint8_t *, size_t > Release()
void WriteUint64(uint64_t value)
static V8_EXPORT_PRIVATE DirectHandle< WasmMemoryObject > New(Isolate *isolate, DirectHandle< JSArrayBuffer > buffer, int maximum, wasm::AddressType address_type)
const v8::base::TimeTicks end_
#define TYPED_ARRAYS_BASE(V)
#define RETURN_VALUE_IF_EXCEPTION(isolate, value)
#define RETURN_EXCEPTION_IF_EXCEPTION(isolate)
#define STACK_CHECK(isolate, result_value)
#define MAYBE_RETURN_NULL(call)
#define MAYBE_RETURN(call, value)
base::Vector< const DirectHandle< Object > > args
#define EXPORT_TEMPLATE_DEFINE(export)
ZoneVector< RpoNumber > & result
ZoneStack< RpoNumber > & stack
ZoneVector< Entry > entries
void * Realloc(void *memory, size_t size)
constexpr Vector< T > VectorOf(T *start, size_t size)
Vector< const char > CStrVector(const char *data)
static void CommitProperties(DirectHandle< JSObject > object, DirectHandle< Map > map, base::Vector< const DirectHandle< Object > > properties)
static constexpr uint32_t kFalse
bool IsNumber(Tagged< Object > obj)
bool IsSpecialReceiverInstanceType(InstanceType instance_type)
bool IsCustomElementsReceiverMap(Tagged< Map > map)
static size_t BytesNeededForVarint(T value)
@ kLegacyReservedFileListIndex
@ kLegacyReservedImageData
@ kLegacyReservedCryptoKey
@ kLegacyReservedMessagePort
@ kLegacyReservedImageBitmapTransfer
@ kLegacyReservedFileIndex
@ kLegacyReservedFileList
@ kLegacyReservedImageBitmap
@ kLegacyReservedBlobIndex
@ kLegacyReservedDOMFileSystem
@ kLegacyReservedOffscreenCanvas
@ kLegacyReservedRTCCertificate
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
@ TERMINAL_FAST_ELEMENTS_KIND
V8_INLINE DirectHandle< T > direct_handle(Tagged< T > object, Isolate *isolate)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long mode(MIPS/PPC only)") DEFINE_BOOL(partial_constant_pool
bool IsShared(Tagged< Object > obj)
DONT_OVERRIDE DISABLE_ALLOCATION_SITES HOLEY_ELEMENTS
V8_INLINE constexpr bool IsHeapObject(TaggedImpl< kRefType, StorageType > obj)
V8_EXPORT_PRIVATE FlagValues v8_flags
static Maybe< bool > SetPropertiesFromKeyValuePairs(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Object > *data, uint32_t num_properties)
static bool IsValidObjectKey(Tagged< Object > value, Isolate *isolate)
JSArrayBuffer::IsDetachableBit is_shared
static const uint32_t kLatestVersion
@ INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE
template const char * string
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
bool ToLocal(v8::internal::MaybeDirectHandle< v8::internal::Object > maybe, Local< T > *local)
constexpr uint32_t CurrentValueSerializerFormatVersion()
Maybe< T > Just(const T &t)
#define DCHECK_LE(v1, v2)
#define CHECK_LT(lhs, rhs)
#define CHECK_LE(lhs, rhs)
#define DCHECK_NOT_NULL(val)
#define DCHECK_GE(v1, v2)
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define DCHECK_GT(v1, v2)
#define V8_EXPORT_PRIVATE
#define V8_LIKELY(condition)
#define V8_UNLIKELY(condition)
#define READ_NEXT_ERROR_TAG()
#define ITERATION_SHIFTED(shift)