46 case TranslationOpcode::BEGIN_WITH_FEEDBACK:
47 case TranslationOpcode::BEGIN_WITHOUT_FEEDBACK:
48 case TranslationOpcode::MATCH_PREVIOUS_TRANSLATION: {
52 os <<
"{frame count=" << frame_count
53 <<
", js frame count=" << jsframe_count <<
"}";
57 case TranslationOpcode::INTERPRETED_FRAME_WITH_RETURN:
58 case TranslationOpcode::INTERPRETED_FRAME_WITHOUT_RETURN: {
63 int return_value_offset = 0;
64 int return_value_count = 0;
65 if (opcode == TranslationOpcode::INTERPRETED_FRAME_WITH_RETURN) {
74 protected_literal_array->get(bytecode_array_id);
75 os <<
"{bytecode_offset=" << bytecode_offset <<
", function="
77 <<
", bytecode=" <<
Brief(bytecode_array) <<
", height=" << height
78 <<
", retval=@" << return_value_offset <<
"(#" << return_value_count
83#if V8_ENABLE_WEBASSEMBLY
84 case TranslationOpcode::WASM_INLINED_INTO_JS_FRAME: {
90 os <<
"{bailout_id=" << bailout_id <<
", function="
92 <<
", height=" << height <<
"}";
96 case TranslationOpcode::CONSTRUCT_CREATE_STUB_FRAME: {
101 os <<
"{construct create stub, function="
103 <<
", height=" << height <<
"}";
107 case TranslationOpcode::CONSTRUCT_INVOKE_STUB_FRAME: {
111 os <<
"{construct invoke stub, function="
116 case TranslationOpcode::BUILTIN_CONTINUATION_FRAME:
117 case TranslationOpcode::JAVASCRIPT_BUILTIN_CONTINUATION_FRAME:
118 case TranslationOpcode::JAVASCRIPT_BUILTIN_CONTINUATION_WITH_CATCH_FRAME: {
124 os <<
"{bailout_id=" << bailout_id <<
", function="
126 <<
", height=" << height <<
"}";
130#if V8_ENABLE_WEBASSEMBLY
131 case TranslationOpcode::JS_TO_WASM_BUILTIN_CONTINUATION_FRAME: {
138 os <<
"{bailout_id=" << bailout_id <<
", function="
140 <<
", height=" << height <<
", wasm_return_type=" << wasm_return_type
145 case v8::internal::TranslationOpcode::LIFTOFF_FRAME: {
150 os <<
"{bailout_id=" << bailout_id <<
", height=" << height
151 <<
", function_id=" << function_id <<
"}";
156 case TranslationOpcode::INLINED_EXTRA_ARGUMENTS: {
163 <<
", height=" << height <<
"}";
167 case TranslationOpcode::REGISTER: {
174 case TranslationOpcode::INT32_REGISTER: {
181 case TranslationOpcode::INT64_REGISTER: {
188 case TranslationOpcode::SIGNED_BIGINT64_REGISTER: {
192 <<
" (signed bigint64)}";
196 case TranslationOpcode::UNSIGNED_BIGINT64_REGISTER: {
200 <<
" (unsigned bigint64)}";
204 case TranslationOpcode::UINT32_REGISTER: {
211 case TranslationOpcode::BOOL_REGISTER: {
218 case TranslationOpcode::FLOAT_REGISTER: {
225 case TranslationOpcode::DOUBLE_REGISTER: {
232 case TranslationOpcode::HOLEY_DOUBLE_REGISTER: {
239 case TranslationOpcode::SIMD128_REGISTER: {
246 case TranslationOpcode::TAGGED_STACK_SLOT: {
249 os <<
"{input=" << input_slot_index <<
"}";
253 case TranslationOpcode::INT32_STACK_SLOT: {
256 os <<
"{input=" << input_slot_index <<
" (int32)}";
260 case TranslationOpcode::INT64_STACK_SLOT: {
263 os <<
"{input=" << input_slot_index <<
" (int64)}";
267 case TranslationOpcode::SIGNED_BIGINT64_STACK_SLOT: {
270 os <<
"{input=" << input_slot_index <<
" (signed bigint64)}";
274 case TranslationOpcode::UNSIGNED_BIGINT64_STACK_SLOT: {
277 os <<
"{input=" << input_slot_index <<
" (unsigned bigint64)}";
281 case TranslationOpcode::UINT32_STACK_SLOT: {
284 os <<
"{input=" << input_slot_index <<
" (uint32)}";
288 case TranslationOpcode::BOOL_STACK_SLOT: {
291 os <<
"{input=" << input_slot_index <<
" (bool)}";
295 case TranslationOpcode::FLOAT_STACK_SLOT:
296 case TranslationOpcode::DOUBLE_STACK_SLOT:
297 case TranslationOpcode::SIMD128_STACK_SLOT: {
300 os <<
"{input=" << input_slot_index <<
"}";
304 case TranslationOpcode::HOLEY_DOUBLE_STACK_SLOT: {
307 os <<
"{input=" << input_slot_index <<
" (holey)}";
311 case TranslationOpcode::OPTIMIZED_OUT: {
313 os <<
"{optimized_out}}";
317 case TranslationOpcode::LITERAL: {
321 os <<
"{literal_id=" << literal_index <<
" (" <<
Brief(literal_value)
326 case TranslationOpcode::DUPLICATED_OBJECT: {
329 os <<
"{object_index=" << object_index <<
"}";
333 case TranslationOpcode::ARGUMENTS_ELEMENTS: {
337 os <<
"{arguments_type=" << arguments_type <<
"}";
340 case TranslationOpcode::ARGUMENTS_LENGTH: {
342 os <<
"{arguments_length}";
345 case TranslationOpcode::REST_LENGTH: {
347 os <<
"{rest_length}";
351 case TranslationOpcode::CAPTURED_OBJECT: {
354 os <<
"{length=" << args_length <<
"}";
358 case TranslationOpcode::STRING_CONCAT: {
360 os <<
"{string_concat}";
364 case TranslationOpcode::UPDATE_FEEDBACK: {
368 os <<
"{feedback={vector_index=" << literal_index <<
", slot=" << slot
569 if (IsSlicedString(
object)) {
578 CHECK(IsSeqString(backing_store));
582 IsSeqOneByteString(backing_store)
585 int needed_size = IsSeqOneByteString(backing_store)
588 if (needed_size < string_size) {
591 new_end, (string_size - needed_size));
595 backing_store->set_length(string->length());
611 return backing_store;
802 static constexpr int kLeft = 1,
kRight = 1;
810#if V8_TARGET_ARCH_32_BIT
811 return ReadUnalignedValue<uint64_t>(fp + slot_offset);
813 return Memory<uint64_t>(fp + slot_offset);
818 Address address = fp + slot_offset;
819#if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT
820 return Memory<uint32_t>(address +
kIntSize);
822 return Memory<uint32_t>(address);
827#if !V8_TARGET_ARCH_S390X && !V8_TARGET_ARCH_PPC64
830 return Float32::FromBits(Memory<uint32_t>(fp + slot_offset));
853 int return_value_offset,
int return_value_count) {
862 uint32_t formal_parameter_count) {
886#if V8_ENABLE_WEBASSEMBLY
895TranslatedFrame TranslatedFrame::JSToWasmBuiltinContinuationFrame(
897 uint32_t height, std::optional<wasm::ValueKind> return_kind) {
900 frame.return_kind_ = return_kind;
904TranslatedFrame TranslatedFrame::LiftoffFrame(BytecodeOffset bytecode_offset,
906 uint32_t function_index) {
912 frame.wasm_function_index_ = function_index;
938 static constexpr int kTheFunction = 1;
943 static constexpr int kTheContext = 1;
944 static constexpr int kTheAccumulator = 1;
950 return height() + kTheFunction;
955#if V8_ENABLE_WEBASSEMBLY
956 case kJSToWasmBuiltinContinuation:
960 static constexpr int kTheContext = 1;
961 return height() + kTheContext + kTheFunction;
963#if V8_ENABLE_WEBASSEMBLY
964 case kWasmInlinedIntoJS: {
965 static constexpr int kTheContext = 1;
966 return height() + kTheContext + kTheFunction;
968 case kLiftoffFunction: {
995 : literals_on_heap_(literal_array) {}
998 std::vector<DeoptimizationLiteral> literals)
999 : literals_off_heap_(
std::move(literals)) {}
1004 int literal_index)
const {
1009#if !V8_ENABLE_WEBASSEMBLY
1039 case TranslationOpcode::INTERPRETED_FRAME_WITH_RETURN:
1040 case TranslationOpcode::INTERPRETED_FRAME_WITHOUT_RETURN: {
1045 protected_literal_array->get(
iterator->NextOperand()));
1046 uint32_t height =
iterator->NextOperandUnsigned();
1047 int return_value_offset = 0;
1048 int return_value_count = 0;
1049 if (opcode == TranslationOpcode::INTERPRETED_FRAME_WITH_RETURN) {
1050 return_value_offset =
iterator->NextOperand();
1051 return_value_count =
iterator->NextOperand();
1053 if (trace_file !=
nullptr) {
1054 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1055 PrintF(trace_file,
" reading input frame %s", name.get());
1056 int arg_count = bytecode_array->parameter_count();
1058 " => bytecode_offset=%d, args=%d, height=%u, retval=%i(#%i); "
1060 bytecode_offset.
ToInt(), arg_count, height, return_value_offset,
1061 return_value_count);
1064 bytecode_offset, shared_info, bytecode_array, height,
1065 return_value_offset, return_value_count);
1068 case TranslationOpcode::INLINED_EXTRA_ARGUMENTS: {
1071 uint32_t height =
iterator->NextOperandUnsigned();
1073 if (trace_file !=
nullptr) {
1074 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1075 PrintF(trace_file,
" reading inlined arguments frame %s", name.get());
1076 PrintF(trace_file,
" => height=%u, parameter_count=%u; inputs:\n",
1083 case TranslationOpcode::CONSTRUCT_CREATE_STUB_FRAME: {
1086 uint32_t height =
iterator->NextOperandUnsigned();
1087 if (trace_file !=
nullptr) {
1088 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1090 " reading construct create stub frame %s => height = %d; "
1092 name.get(), height);
1097 case TranslationOpcode::CONSTRUCT_INVOKE_STUB_FRAME: {
1100 if (trace_file !=
nullptr) {
1101 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1103 " reading construct invoke stub frame %s, inputs:\n",
1109 case TranslationOpcode::BUILTIN_CONTINUATION_FRAME: {
1113 uint32_t height =
iterator->NextOperandUnsigned();
1114 if (trace_file !=
nullptr) {
1115 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1116 PrintF(trace_file,
" reading builtin continuation frame %s",
1118 PrintF(trace_file,
" => bytecode_offset=%d, height=%u; inputs:\n",
1119 bytecode_offset.
ToInt(), height);
1122 shared_info, height);
1125#if V8_ENABLE_WEBASSEMBLY
1126 case TranslationOpcode::WASM_INLINED_INTO_JS_FRAME: {
1130 uint32_t height =
iterator->NextOperandUnsigned();
1131 if (trace_file !=
nullptr) {
1132 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1133 PrintF(trace_file,
" reading Wasm inlined into JS frame %s",
1135 PrintF(trace_file,
" => bailout_id=%d, height=%u ; inputs:\n",
1136 bailout_id.
ToInt(), height);
1138 return TranslatedFrame::WasmInlinedIntoJSFrame(bailout_id, shared_info,
1142 case TranslationOpcode::JS_TO_WASM_BUILTIN_CONTINUATION_FRAME: {
1146 uint32_t height =
iterator->NextOperandUnsigned();
1147 int return_kind_code =
iterator->NextOperand();
1148 std::optional<wasm::ValueKind> return_kind;
1152 if (trace_file !=
nullptr) {
1153 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1154 PrintF(trace_file,
" reading JS to Wasm builtin continuation frame %s",
1157 " => bailout_id=%d, height=%u return_type=%d; inputs:\n",
1158 bailout_id.
ToInt(), height,
1159 return_kind.has_value() ? return_kind.value() : -1);
1161 return TranslatedFrame::JSToWasmBuiltinContinuationFrame(
1162 bailout_id, shared_info, height, return_kind);
1165 case TranslationOpcode::LIFTOFF_FRAME: {
1167 uint32_t height =
iterator->NextOperandUnsigned();
1168 uint32_t function_id =
iterator->NextOperandUnsigned();
1169 if (trace_file !=
nullptr) {
1170 PrintF(trace_file,
" reading input for liftoff frame");
1172 " => bailout_id=%d, height=%u, function_id=%u ; inputs:\n",
1173 bailout_id.
ToInt(), height, function_id);
1175 return TranslatedFrame::LiftoffFrame(bailout_id, height, function_id);
1179 case TranslationOpcode::JAVASCRIPT_BUILTIN_CONTINUATION_FRAME: {
1183 uint32_t height =
iterator->NextOperandUnsigned();
1184 if (trace_file !=
nullptr) {
1185 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1186 PrintF(trace_file,
" reading JavaScript builtin continuation frame %s",
1188 PrintF(trace_file,
" => bytecode_offset=%d, height=%u; inputs:\n",
1189 bytecode_offset.
ToInt(), height);
1192 bytecode_offset, shared_info, height);
1195 case TranslationOpcode::JAVASCRIPT_BUILTIN_CONTINUATION_WITH_CATCH_FRAME: {
1199 uint32_t height =
iterator->NextOperandUnsigned();
1200 if (trace_file !=
nullptr) {
1201 std::unique_ptr<char[]> name = shared_info->DebugNameCStr();
1203 " reading JavaScript builtin continuation frame with catch %s",
1205 PrintF(trace_file,
" => bytecode_offset=%d, height=%u; inputs:\n",
1206 bytecode_offset.
ToInt(), height);
1209 bytecode_offset, shared_info, height);
1211 case TranslationOpcode::UPDATE_FEEDBACK:
1212 case TranslationOpcode::BEGIN_WITH_FEEDBACK:
1213 case TranslationOpcode::BEGIN_WITHOUT_FEEDBACK:
1214 case TranslationOpcode::DUPLICATED_OBJECT:
1215 case TranslationOpcode::ARGUMENTS_ELEMENTS:
1216 case TranslationOpcode::ARGUMENTS_LENGTH:
1217 case TranslationOpcode::REST_LENGTH:
1218 case TranslationOpcode::CAPTURED_OBJECT:
1219 case TranslationOpcode::STRING_CONCAT:
1220 case TranslationOpcode::REGISTER:
1221 case TranslationOpcode::INT32_REGISTER:
1222 case TranslationOpcode::INT64_REGISTER:
1223 case TranslationOpcode::SIGNED_BIGINT64_REGISTER:
1224 case TranslationOpcode::UNSIGNED_BIGINT64_REGISTER:
1225 case TranslationOpcode::UINT32_REGISTER:
1226 case TranslationOpcode::BOOL_REGISTER:
1227 case TranslationOpcode::FLOAT_REGISTER:
1228 case TranslationOpcode::DOUBLE_REGISTER:
1229 case TranslationOpcode::HOLEY_DOUBLE_REGISTER:
1230 case TranslationOpcode::SIMD128_REGISTER:
1231 case TranslationOpcode::TAGGED_STACK_SLOT:
1232 case TranslationOpcode::INT32_STACK_SLOT:
1233 case TranslationOpcode::INT64_STACK_SLOT:
1234 case TranslationOpcode::SIGNED_BIGINT64_STACK_SLOT:
1235 case TranslationOpcode::UNSIGNED_BIGINT64_STACK_SLOT:
1236 case TranslationOpcode::UINT32_STACK_SLOT:
1237 case TranslationOpcode::BOOL_STACK_SLOT:
1238 case TranslationOpcode::FLOAT_STACK_SLOT:
1239 case TranslationOpcode::DOUBLE_STACK_SLOT:
1240 case TranslationOpcode::SIMD128_STACK_SLOT:
1241 case TranslationOpcode::HOLEY_DOUBLE_STACK_SLOT:
1242 case TranslationOpcode::LITERAL:
1243 case TranslationOpcode::OPTIMIZED_OUT:
1244 case TranslationOpcode::MATCH_PREVIOUS_TRANSLATION:
1252 std::deque<TranslatedValue>::iterator* iter) {
1253 int values_to_skip = 1;
1254 while (values_to_skip > 0) {
1258 values_to_skip += (*iter)->GetChildrenCount();
1278 int value_index =
static_cast<int>(frame.
values_.size());
1279 if (trace_file !=
nullptr) {
1280 PrintF(trace_file,
"arguments elements object #%d (type = %d, length = %d)",
1281 object_index,
static_cast<uint8_t
>(type), length);
1293 int number_of_holes = 0;
1299 for (
int i = 0;
i < number_of_holes; ++
i) {
1302 int argc = length - number_of_holes;
1303 int start_index = number_of_holes;
1307 for (
int i = 0;
i < argc;
i++) {
1309 int offset =
i + start_index + 1;
1312 : input_frame_pointer;
1313 Address argument_slot = arguments_frame +
1337 int value_index =
static_cast<int>(frame.
values_.size());
1341 case TranslationOpcode::BEGIN_WITH_FEEDBACK:
1342 case TranslationOpcode::BEGIN_WITHOUT_FEEDBACK:
1343 case TranslationOpcode::INTERPRETED_FRAME_WITH_RETURN:
1344 case TranslationOpcode::INTERPRETED_FRAME_WITHOUT_RETURN:
1345 case TranslationOpcode::INLINED_EXTRA_ARGUMENTS:
1346 case TranslationOpcode::CONSTRUCT_CREATE_STUB_FRAME:
1347 case TranslationOpcode::CONSTRUCT_INVOKE_STUB_FRAME:
1348 case TranslationOpcode::JAVASCRIPT_BUILTIN_CONTINUATION_FRAME:
1349 case TranslationOpcode::JAVASCRIPT_BUILTIN_CONTINUATION_WITH_CATCH_FRAME:
1350 case TranslationOpcode::BUILTIN_CONTINUATION_FRAME:
1351#if V8_ENABLE_WEBASSEMBLY
1352 case TranslationOpcode::WASM_INLINED_INTO_JS_FRAME:
1353 case TranslationOpcode::JS_TO_WASM_BUILTIN_CONTINUATION_FRAME:
1354 case TranslationOpcode::LIFTOFF_FRAME:
1356 case TranslationOpcode::UPDATE_FEEDBACK:
1357 case TranslationOpcode::MATCH_PREVIOUS_TRANSLATION:
1361 case TranslationOpcode::DUPLICATED_OBJECT: {
1362 int object_id =
iterator->NextOperand();
1363 if (trace_file !=
nullptr) {
1364 PrintF(trace_file,
"duplicated object #%d", object_id);
1369 frame.
Add(translated_value);
1373 case TranslationOpcode::ARGUMENTS_ELEMENTS: {
1381 case TranslationOpcode::ARGUMENTS_LENGTH: {
1382 if (trace_file !=
nullptr) {
1383 PrintF(trace_file,
"arguments length field (length = %d)",
1390 case TranslationOpcode::REST_LENGTH: {
1393 if (trace_file !=
nullptr) {
1394 PrintF(trace_file,
"rest length field (length = %d)", rest_length);
1400 case TranslationOpcode::CAPTURED_OBJECT: {
1401 int field_count =
iterator->NextOperand();
1403 if (trace_file !=
nullptr) {
1404 PrintF(trace_file,
"captured object #%d (length = %d)", object_index,
1410 frame.
Add(translated_value);
1414 case TranslationOpcode::STRING_CONCAT: {
1416 if (trace_file !=
nullptr) {
1417 PrintF(trace_file,
"string concatenation #%d", object_index);
1423 frame.
Add(translated_value);
1427 case TranslationOpcode::REGISTER: {
1428 int input_reg =
iterator->NextOperandUnsigned();
1431 frame.
Add(translated_value);
1434 intptr_t value =
registers->GetRegister(input_reg);
1436 if (trace_file !=
nullptr) {
1443 frame.
Add(translated_value);
1447 case TranslationOpcode::INT32_REGISTER: {
1448 int input_reg =
iterator->NextOperandUnsigned();
1451 frame.
Add(translated_value);
1454 intptr_t value =
registers->GetRegister(input_reg);
1455 if (trace_file !=
nullptr) {
1461 frame.
Add(translated_value);
1465 case TranslationOpcode::INT64_REGISTER: {
1466 int input_reg =
iterator->NextOperandUnsigned();
1469 frame.
Add(translated_value);
1472 intptr_t value =
registers->GetRegister(input_reg);
1473 if (trace_file !=
nullptr) {
1479 frame.
Add(translated_value);
1483 case TranslationOpcode::SIGNED_BIGINT64_REGISTER: {
1484 int input_reg =
iterator->NextOperandUnsigned();
1487 frame.
Add(translated_value);
1490 intptr_t value =
registers->GetRegister(input_reg);
1491 if (trace_file !=
nullptr) {
1497 frame.
Add(translated_value);
1501 case TranslationOpcode::UNSIGNED_BIGINT64_REGISTER: {
1502 int input_reg =
iterator->NextOperandUnsigned();
1505 frame.
Add(translated_value);
1508 intptr_t value =
registers->GetRegister(input_reg);
1509 if (trace_file !=
nullptr) {
1515 frame.
Add(translated_value);
1519 case TranslationOpcode::UINT32_REGISTER: {
1520 int input_reg =
iterator->NextOperandUnsigned();
1523 frame.
Add(translated_value);
1526 intptr_t value =
registers->GetRegister(input_reg);
1527 if (trace_file !=
nullptr) {
1533 frame.
Add(translated_value);
1537 case TranslationOpcode::BOOL_REGISTER: {
1538 int input_reg =
iterator->NextOperandUnsigned();
1541 frame.
Add(translated_value);
1544 intptr_t value =
registers->GetRegister(input_reg);
1545 if (trace_file !=
nullptr) {
1551 frame.
Add(translated_value);
1555 case TranslationOpcode::FLOAT_REGISTER: {
1556 int input_reg =
iterator->NextOperandUnsigned();
1559 frame.
Add(translated_value);
1563 if (trace_file !=
nullptr) {
1564 PrintF(trace_file,
"%e ; %s (float)", value.get_scalar(),
1568 frame.
Add(translated_value);
1572 case TranslationOpcode::DOUBLE_REGISTER: {
1573 int input_reg =
iterator->NextOperandUnsigned();
1576 frame.
Add(translated_value);
1580 if (trace_file !=
nullptr) {
1581 PrintF(trace_file,
"%e ; %s (double)", value.get_scalar(),
1586 frame.
Add(translated_value);
1590 case TranslationOpcode::HOLEY_DOUBLE_REGISTER: {
1591 int input_reg =
iterator->NextOperandUnsigned();
1594 frame.
Add(translated_value);
1598 if (trace_file !=
nullptr) {
1599 if (value.is_hole_nan()) {
1600 PrintF(trace_file,
"the hole");
1602 PrintF(trace_file,
"%e", value.get_scalar());
1604 PrintF(trace_file,
" ; %s (holey double)",
1609 frame.
Add(translated_value);
1613 case TranslationOpcode::SIMD128_REGISTER: {
1614 int input_reg =
iterator->NextOperandUnsigned();
1617 frame.
Add(translated_value);
1621 if (trace_file !=
nullptr) {
1622 int8x16 val = value.to_i8x16();
1624 "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x "
1625 "%02x %02x %02x %02x ; %s (Simd128)",
1626 val.val[0], val.val[1], val.val[2], val.val[3], val.val[4],
1627 val.val[5], val.val[6], val.val[7], val.val[8], val.val[9],
1628 val.val[10], val.val[11], val.val[12], val.val[13], val.val[14],
1633 frame.
Add(translated_value);
1637 case TranslationOpcode::TAGGED_STACK_SLOT: {
1640 intptr_t value = *(
reinterpret_cast<intptr_t*
>(fp + slot_offset));
1642 if (trace_file !=
nullptr) {
1644 uncompressed_value, slot_offset < 0 ?
'-' :
'+',
1645 std::abs(slot_offset));
1650 frame.
Add(translated_value);
1654 case TranslationOpcode::INT32_STACK_SLOT: {
1658 if (trace_file !=
nullptr) {
1659 PrintF(trace_file,
"%d ; (int32) [fp %c %3d] ",
1660 static_cast<int32_t
>(value), slot_offset < 0 ?
'-' :
'+',
1661 std::abs(slot_offset));
1664 frame.
Add(translated_value);
1668 case TranslationOpcode::INT64_STACK_SLOT: {
1672 if (trace_file !=
nullptr) {
1674 static_cast<intptr_t
>(value), slot_offset < 0 ?
'-' :
'+',
1675 std::abs(slot_offset));
1678 frame.
Add(translated_value);
1682 case TranslationOpcode::SIGNED_BIGINT64_STACK_SLOT: {
1686 if (trace_file !=
nullptr) {
1688 static_cast<intptr_t
>(value), slot_offset < 0 ?
'-' :
'+',
1689 std::abs(slot_offset));
1693 frame.
Add(translated_value);
1697 case TranslationOpcode::UNSIGNED_BIGINT64_STACK_SLOT: {
1701 if (trace_file !=
nullptr) {
1702 PrintF(trace_file,
"%" V8PRIdPTR " ; (unsigned bigint64) [fp %c %3d] ",
1703 static_cast<intptr_t
>(value), slot_offset < 0 ?
'-' :
'+',
1704 std::abs(slot_offset));
1708 frame.
Add(translated_value);
1712 case TranslationOpcode::UINT32_STACK_SLOT: {
1716 if (trace_file !=
nullptr) {
1717 PrintF(trace_file,
"%u ; (uint32) [fp %c %3d] ", value,
1718 slot_offset < 0 ?
'-' :
'+', std::abs(slot_offset));
1722 frame.
Add(translated_value);
1726 case TranslationOpcode::BOOL_STACK_SLOT: {
1730 if (trace_file !=
nullptr) {
1731 PrintF(trace_file,
"%u ; (bool) [fp %c %3d] ", value,
1732 slot_offset < 0 ?
'-' :
'+', std::abs(slot_offset));
1735 frame.
Add(translated_value);
1739 case TranslationOpcode::FLOAT_STACK_SLOT: {
1743 if (trace_file !=
nullptr) {
1744 PrintF(trace_file,
"%e ; (float) [fp %c %3d] ", value.get_scalar(),
1745 slot_offset < 0 ?
'-' :
'+', std::abs(slot_offset));
1748 frame.
Add(translated_value);
1752 case TranslationOpcode::DOUBLE_STACK_SLOT: {
1756 if (trace_file !=
nullptr) {
1757 PrintF(trace_file,
"%e ; (double) [fp %c %d] ", value.get_scalar(),
1758 slot_offset < 0 ?
'-' :
'+', std::abs(slot_offset));
1762 frame.
Add(translated_value);
1766 case TranslationOpcode::SIMD128_STACK_SLOT: {
1770 if (trace_file !=
nullptr) {
1771 int8x16 val = value.to_i8x16();
1773 "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x "
1774 "%02x %02x %02x %02x ; (Simd128) [fp %c %d]",
1775 val.val[0], val.val[1], val.val[2], val.val[3], val.val[4],
1776 val.val[5], val.val[6], val.val[7], val.val[8], val.val[9],
1777 val.val[10], val.val[11], val.val[12], val.val[13], val.val[14],
1778 val.val[15], slot_offset < 0 ?
'-' :
'+', std::abs(slot_offset));
1782 frame.
Add(translated_value);
1786 case TranslationOpcode::HOLEY_DOUBLE_STACK_SLOT: {
1790 if (trace_file !=
nullptr) {
1791 if (value.is_hole_nan()) {
1792 PrintF(trace_file,
"the hole");
1794 PrintF(trace_file,
"%e", value.get_scalar());
1796 PrintF(trace_file,
" ; (holey double) [fp %c %d] ",
1797 slot_offset < 0 ?
'-' :
'+', std::abs(slot_offset));
1801 frame.
Add(translated_value);
1805 case TranslationOpcode::LITERAL: {
1806 int literal_index =
iterator->NextOperand();
1808 if (trace_file !=
nullptr) {
1814 switch (translated_value.
kind()) {
1817 PrintF(trace_file,
"(wasm double literal %f 0x%" PRIx64
")",
1821 PrintF(trace_file,
"(wasm double literal %f)",
1827 PrintF(trace_file,
"(wasm float literal %f 0x%x)",
1831 PrintF(trace_file,
"(wasm float literal %f)",
1836 PrintF(trace_file,
"(wasm int64 literal %" PRId64
")",
1840 PrintF(trace_file,
"(wasm int32 literal %d)",
1844 PrintF(trace_file,
" (wasm literal) ");
1849 frame.
Add(translated_value);
1853 case TranslationOpcode::OPTIMIZED_OUT: {
1854 if (trace_file !=
nullptr) {
1855 PrintF(trace_file,
"(optimized out)");
1860 frame.
Add(translated_value);
1865 FATAL(
"We should never get here - unexpected deopt info.");
1870#ifdef V8_TARGET_ARCH_LOONG64
1875 static_cast<uintptr_t
>(
value) <= std::numeric_limits<uint32_t>::max()) {
1878 isolate(),
static_cast<uint32_t
>(value));
1890 code, &deopt_index);
1893 data->FrameTranslation(), data->TranslationIndex(deopt_index).value());
1897 data->ProtectedLiteralArray(), literals,
nullptr ,
1898 nullptr , code->parameter_count_without_receiver(),
1908 int actual_argument_count) {
1924 if (opcode == TranslationOpcode::BEGIN_WITH_FEEDBACK) {
1929 std::stack<int> nested_counts;
1932 for (
int frame_index = 0; frame_index <
count; frame_index++) {
1935 iterator, protected_literal_array, literal_array, input_frame_pointer,
1941 while (values_to_process > 0 || !nested_counts.empty()) {
1942 if (trace_file !=
nullptr) {
1943 if (nested_counts.empty()) {
1950 for (
size_t j = 0; j < nested_counts.size(); j++) {
1958 input_frame_pointer,
registers, trace_file);
1960 if (trace_file !=
nullptr) {
1961 PrintF(trace_file,
"\n");
1965 values_to_process--;
1966 if (nested_count > 0) {
1967 nested_counts.push(values_to_process);
1968 values_to_process = nested_count;
1970 while (values_to_process == 0 && !nested_counts.empty()) {
1971 values_to_process = nested_counts.top();
1972 nested_counts.pop();
1999 return &(
frames_[
pos.frame_index_].values_[
pos.value_index_]);
2044 std::stack<int> worklist;
2048 while (!worklist.empty()) {
2049 int index = worklist.top();
2058 int object_index, std::stack<int>* worklist,
2075 int children_init_index = value_index;
2090 SkipSlots(1, frame, &children_init_index);
2102 switch (map->instance_type()) {
2103 case HEAP_NUMBER_TYPE:
2104 case FIXED_DOUBLE_ARRAY_TYPE:
2107 case FIXED_ARRAY_TYPE:
2108 case AWAIT_CONTEXT_TYPE:
2109 case BLOCK_CONTEXT_TYPE:
2110 case CATCH_CONTEXT_TYPE:
2111 case DEBUG_EVALUATE_CONTEXT_TYPE:
2112 case EVAL_CONTEXT_TYPE:
2113 case FUNCTION_CONTEXT_TYPE:
2114 case MODULE_CONTEXT_TYPE:
2115 case NATIVE_CONTEXT_TYPE:
2116 case SCRIPT_CONTEXT_TYPE:
2117 case WITH_CONTEXT_TYPE:
2118 case OBJECT_BOILERPLATE_DESCRIPTION_TYPE:
2119 case HASH_TABLE_TYPE:
2120 case ORDERED_HASH_MAP_TYPE:
2121 case ORDERED_HASH_SET_TYPE:
2122 case NAME_DICTIONARY_TYPE:
2123 case GLOBAL_DICTIONARY_TYPE:
2124 case NUMBER_DICTIONARY_TYPE:
2125 case SIMPLE_NUMBER_DICTIONARY_TYPE:
2126 case PROPERTY_ARRAY_TYPE:
2127 case SCRIPT_CONTEXT_TABLE_TYPE:
2128 case SLOPPY_ARGUMENTS_ELEMENTS_TYPE:
2133 CHECK(IsJSObjectMap(*map));
2137 CHECK_EQ(value_index, children_init_index);
2149 std::stack<int> worklist;
2153 while (!worklist.empty()) {
2154 int index = worklist.top();
2171 int length = frame->
values_[*value_index].GetSmiValue();
2178 frame->
values_[*value_index].kind());
2183 CHECK(value.is_identical_to(isolate()->factory()->the_hole_value()));
2195 frame->
values_[*value_index].kind());
2206enum StorageKind : uint8_t { kStoreTagged, kStoreHeapObject };
2212 while (slots_to_skip > 0) {
2225 int object_index, std::stack<int>* worklist) {
2246 switch (map->instance_type()) {
2247 case FIXED_DOUBLE_ARRAY_TYPE:
2252 case HEAP_NUMBER_TYPE:
2257 case FIXED_ARRAY_TYPE:
2258 case SCRIPT_CONTEXT_TABLE_TYPE:
2259 case AWAIT_CONTEXT_TYPE:
2260 case BLOCK_CONTEXT_TYPE:
2261 case CATCH_CONTEXT_TYPE:
2262 case DEBUG_EVALUATE_CONTEXT_TYPE:
2263 case EVAL_CONTEXT_TYPE:
2264 case FUNCTION_CONTEXT_TYPE:
2265 case MODULE_CONTEXT_TYPE:
2266 case NATIVE_CONTEXT_TYPE:
2267 case SCRIPT_CONTEXT_TYPE:
2268 case WITH_CONTEXT_TYPE:
2269 case HASH_TABLE_TYPE:
2270 case ORDERED_HASH_MAP_TYPE:
2271 case ORDERED_HASH_SET_TYPE:
2272 case NAME_DICTIONARY_TYPE:
2273 case GLOBAL_DICTIONARY_TYPE:
2274 case NUMBER_DICTIONARY_TYPE:
2275 case SIMPLE_NUMBER_DICTIONARY_TYPE: {
2277 int array_length = frame->
values_[value_index].GetSmiValue();
2283 array_length == 0) {
2291 &value_index, worklist);
2294 case SLOPPY_ARGUMENTS_ELEMENTS_TYPE: {
2296 int args_length = frame->
values_[value_index].GetSmiValue();
2304 &value_index, worklist);
2307 case PROPERTY_ARRAY_TYPE: {
2309 int length_or_hash = frame->
values_[value_index].GetSmiValue();
2318 &value_index, worklist);
2326 value_index++, remaining_children_count--;
2332 &value_index, worklist);
2338 value_index++, remaining_children_count--;
2340 !IsJSArrayMap(*map)) {
2342 value_index--, remaining_children_count++;
2359 &value_index, worklist);
2368 DCHECK(IsFixedArray(*elements) || IsFixedDoubleArray(*elements));
2369 if (IsFixedDoubleArray(*elements)) {
2370 DCHECK(!elements->IsCowArray());
2373 }
else if (!elements->IsCowArray()) {
2381 std::stack<int>* worklist) {
2424 Representation representation = descriptors->GetDetails(
i).representation();
2425 if (!index.is_inobject() &&
2427 int outobject_index = index.outobject_array_index();
2429 raw_object_storage->set(array_index, kStoreHeapObject);
2443 for (
int i = 0;
i < object_storage->length();
i++) {
2444 raw_object_storage->set(
i, kStoreTagged);
2446 return object_storage;
2451 CHECK(IsJSObjectMap(*map));
2465 Representation representation = descriptors->GetDetails(
i).representation();
2466 if (index.is_inobject() &&
2471 raw_object_storage->set(array_index, kStoreHeapObject);
2514 Address object_start = object_storage->address();
2516 isolate()->
heap()->VerifySlotRangeHasNoRecordedSlots(object_start,
2532 WRITE_FIELD(*object_storage, JSObject::kPropertiesOrHashOffset,
2534 WRITE_BARRIER(*object_storage, JSObject::kPropertiesOrHashOffset,
2541 for (
int i = 2;
i < children_count;
i++) {
2547 uint8_t marker = object_storage->ReadField<uint8_t>(
offset);
2550#ifdef V8_ENABLE_LEAPTIERING
2551 if (InstanceTypeChecker::IsJSFunction(instance_type) &&
2552 offset == JSFunction::kDispatchHandleOffset) {
2560 JSFunction::kDispatchHandleOffset,
handle.value());
2564#ifdef V8_ENABLE_SANDBOX
2565 if (InstanceTypeChecker::IsJSRegExp(instance_type) &&
2566 offset == JSRegExp::kDataOffset) {
2575 CHECK(IsRegExpData(*field_value));
2579 ->RawIndirectPointerField(
offset, kRegExpDataIndirectPointerTag)
2580 .Relaxed_Store(value);
2582 kRegExpDataIndirectPointerTag, value);
2586 if (marker == kStoreHeapObject) {
2620 Address object_start = object_storage->address();
2622 isolate()->
heap()->VerifySlotRangeHasNoRecordedSlots(object_start,
2636 for (
int i = 1;
i < children_count;
i++) {
2639 uint8_t marker = object_storage->ReadField<uint8_t>(
offset);
2641 if (
i > 1 && marker == kStoreHeapObject) {
2642 field_value = slot->
storage();
2644 CHECK(marker == kStoreTagged ||
i == 1);
2671 if (jsframe_index > 0) {
2682 int jsframe_index,
int* args_count) {
2688 if (jsframe_index > 0) {
2695 *args_count =
frames_[
i - 1].height();
2713 static constexpr int kTheContext = 1;
2714 const uint32_t height =
frames_[
i].height() + kTheContext;
2715 *args_count =
frames_[
i].ValueAt(height - 1)->GetSmiValue();
2721 *args_count =
frames_[
i].bytecode_array()->parameter_count();
2738 bool new_store =
false;
2739 if (previously_materialized_objects.
is_null()) {
2740 previously_materialized_objects =
2743 previously_materialized_objects->set(
i, *marker);
2748 CHECK_EQ(length, previously_materialized_objects->length());
2750 bool value_changed =
false;
2765 if (value.is_identical_to(marker)) {
2768 if (*previous_value == *marker) {
2769 if (
IsSmi(*value)) {
2773 previously_materialized_objects->set(
i, *value);
2774 value_changed =
true;
2776 CHECK(*previous_value == *value ||
2777 (IsHeapNumber(*previous_value) &&
IsSmi(*value) &&
2784 if (new_store && value_changed) {
2786 previously_materialized_objects);
2790 frame->
function(), LazyDeoptimizeReason::kFrameValueMaterialized,
2802 if (previously_materialized_objects.
is_null())
return;
2807 CHECK_EQ(length, previously_materialized_objects->length());
2812 if (previously_materialized_objects->get(
i) != *marker) {
2839 Object::ObjectVerify(*slot->
storage(), isolate());
2867 if (trace_file !=
nullptr) {
2868 PrintF(trace_file,
" reading FeedbackVector (slot %d)\n",
virtual const char * NameOfCPURegister(int reg) const
@ kDeoptimizerDisableSpeculation
static constexpr T decode(U value)
UnderlyingType underlying_type
static V8_EXPORT_PRIVATE Handle< BigInt > FromUint64(Isolate *isolate, uint64_t n)
static V8_EXPORT_PRIVATE Handle< BigInt > FromInt64(Isolate *isolate, int64_t n)
static constexpr int LengthFor(int size_in_bytes)
constexpr int ToInt() const
static constexpr int kFixedFrameSizeAboveFp
uint32_t NextOperandUnsigned()
Tagged< DeoptimizationLiteralArray > get_on_heap_literals() const
DeoptimizationLiteralProvider(Tagged< DeoptimizationLiteralArray > literal_array)
std::vector< DeoptimizationLiteral > literals_off_heap_
Tagged< DeoptimizationLiteralArray > literals_on_heap_
TranslatedValue Get(TranslatedState *container, int literal_index) const
~DeoptimizationLiteralProvider()
static void DeoptimizeFunction(Tagged< JSFunction > function, LazyDeoptimizeReason reason, Tagged< Code > code={})
V8_INLINE bool is_null() const
V8_WARN_UNUSED_RESULT HandleType< String >::MaybeType NewConsString(HandleType< String > left, HandleType< String > right, AllocationType allocation=AllocationType::kYoung)
Handle< HeapNumber > NewHeapNumber(double value)
Handle< ByteArray > NewByteArray(int length, AllocationType allocation=AllocationType::kYoung)
Handle< FixedArray > NewFixedArray(int length, AllocationType allocation=AllocationType::kYoung)
void SetSpeculationMode(SpeculationMode mode)
static FieldIndex ForDescriptor(Tagged< Map > map, InternalIndex descriptor_index)
uint32_t get_bits() const
uint64_t get_bits() const
double get_scalar() const
void NotifyObjectLayoutChange(Tagged< HeapObject > object, const DisallowGarbageCollection &, InvalidateRecordedSlots invalidate_recorded_slots, InvalidateExternalPointerSlots invalidate_external_pointer_slots, int new_size=0)
V8_EXPORT_PRIVATE void CreateFillerObjectAt(Address addr, int size, ClearFreedMemoryMode clear_memory_mode=ClearFreedMemoryMode::kDontClearFreedMemory)
void EnsureSweepingCompletedForObject(Tagged< HeapObject > object)
MaterializedObjectStore * materialized_object_store() const
void CountUsage(v8::Isolate::UseCounterFeature feature)
v8::internal::Factory * factory()
Tagged< JSFunction > function() const override
int GetActualArgumentCount() const override
DirectHandle< FixedArray > Get(Address fp)
void Set(Address fp, DirectHandle< FixedArray > materialized_objects)
static double NumberValue(Tagged< Number > obj)
static int StackSlotOffsetRelativeToFp(int slot_index)
Tagged< DeoptimizationData > GetDeoptimizationData(Tagged< Code > code, int *deopt_index) const
static constexpr int SizeFor(int length)
static constexpr SwVfpRegister from_code(int8_t code)
constexpr bool IsHeapObject() const
constexpr bool IsDouble() const
static constexpr int kNoDeoptIndex
static V8_INLINE constexpr int32_t SizeFor(int32_t length)
static V8_INLINE constexpr int32_t SizeFor(int32_t length)
static const uint32_t kMinLength
static constexpr Tagged< Smi > FromInt(int value)
static constexpr Tagged< Smi > FromIntptr(intptr_t value)
static bool constexpr IsValid(T value)
static constexpr int kMinValue
static constexpr int kMaxValue
V8_EXPORT_PRIVATE Tagged< Code > LookupCode() const
Isolate * isolate() const
static constexpr int SizeFor(int capacity)
V8_INLINE constexpr StorageType ptr() const
BytecodeOffset bytecode_offset() const
TranslatedFrame(Kind kind, Tagged< SharedFunctionInfo > raw_shared_info, Tagged< BytecodeArray > raw_bytecode_array, uint32_t height, int return_value_offset=0, int return_value_count=0)
int return_value_offset() const
DirectHandle< SharedFunctionInfo > shared_info() const
static TranslatedFrame UnoptimizedJSFrame(BytecodeOffset bytecode_offset, Tagged< SharedFunctionInfo > shared_info, Tagged< BytecodeArray > bytecode_array, uint32_t height, int return_value_offset, int return_value_count)
IndirectHandle< BytecodeArray > bytecode_array_
void Add(const TranslatedValue &value)
BytecodeOffset bytecode_offset_
Tagged< SharedFunctionInfo > raw_shared_info_
void Handlify(Isolate *isolate)
int GetValueCount() const
static TranslatedFrame BuiltinContinuationFrame(BytecodeOffset bailout_id, Tagged< SharedFunctionInfo > shared_info, uint32_t height)
static TranslatedFrame ConstructInvokeStubFrame(Tagged< SharedFunctionInfo > shared_info)
int formal_parameter_count() const
DirectHandle< BytecodeArray > bytecode_array() const
@ kJavaScriptBuiltinContinuationWithCatch
@ kJavaScriptBuiltinContinuation
static TranslatedFrame InlinedExtraArguments(Tagged< SharedFunctionInfo > shared_info, uint32_t height, uint32_t formal_parameter_count)
static TranslatedFrame JavaScriptBuiltinContinuationWithCatchFrame(BytecodeOffset bailout_id, Tagged< SharedFunctionInfo > shared_info, uint32_t height)
int formal_parameter_count_
IndirectHandle< SharedFunctionInfo > shared_info_
Tagged< BytecodeArray > raw_bytecode_array_
int return_value_count() const
static TranslatedFrame JavaScriptBuiltinContinuationFrame(BytecodeOffset bailout_id, Tagged< SharedFunctionInfo > shared_info, uint32_t height)
static TranslatedFrame ConstructCreateStubFrame(Tagged< SharedFunctionInfo > shared_info, uint32_t height)
static void AdvanceIterator(std::deque< TranslatedValue >::iterator *iter)
enum v8::internal::TranslatedFrame::HandleState handle_state_
TranslatedValue * ValueAt(int index)
Address stack_frame_pointer_
static Float64 GetDoubleSlot(Address fp, int slot_index)
void SkipSlots(int slots_to_skip, TranslatedFrame *frame, int *value_index)
static uint64_t GetUInt64Slot(Address fp, int slot_index)
TranslatedValue * ResolveCapturedObject(TranslatedValue *slot)
int CreateNextTranslatedValue(int frame_index, DeoptTranslationIterator *iterator, const DeoptimizationLiteralProvider &literal_array, Address fp, RegisterValues *registers, FILE *trace_file)
void ReadUpdateFeedback(DeoptTranslationIterator *iterator, Tagged< DeoptimizationLiteralArray > literal_array, FILE *trace_file)
void EnsureCapturedObjectAllocatedAt(int object_index, std::stack< int > *worklist)
TranslatedValue * GetResolvedSlot(TranslatedFrame *frame, int value_index)
void EnsureChildrenAllocated(int count, TranslatedFrame *frame, int *value_index, std::stack< int > *worklist)
void MaterializeHeapNumber(TranslatedFrame *frame, int *value_index, TranslatedValue *slot)
void MaterializeFixedDoubleArray(TranslatedFrame *frame, int *value_index, TranslatedValue *slot, DirectHandle< Map > map)
TranslatedFrame * GetArgumentsInfoFromJSFrameIndex(int jsframe_index, int *arguments_count)
void CreateArgumentsElementsTranslatedValues(int frame_index, Address input_frame_pointer, CreateArgumentsType type, FILE *trace_file)
Address DecompressIfNeeded(intptr_t value)
void EnsureJSObjectAllocated(TranslatedValue *slot, DirectHandle< Map > map)
Handle< HeapObject > InitializeObjectAt(TranslatedValue *slot)
FeedbackSlot feedback_slot_
int actual_argument_count_
void StoreMaterializedValuesAndDeopt(JavaScriptFrame *frame)
void EnsureObjectAllocatedAt(TranslatedValue *slot)
TranslatedValue * GetResolvedSlotAndAdvance(TranslatedFrame *frame, int *value_index)
void Init(Isolate *isolate, Address input_frame_pointer, Address stack_frame_pointer, DeoptTranslationIterator *iterator, Tagged< ProtectedDeoptimizationLiteralArray > protected_literal_array, const DeoptimizationLiteralProvider &literal_array, RegisterValues *registers, FILE *trace_file, int parameter_count, int actual_argument_count)
void InitializeCapturedObjectAt(int object_index, std::stack< int > *worklist, const DisallowGarbageCollection &no_gc)
void InitializeObjectWithTaggedFieldsAt(TranslatedFrame *frame, int *value_index, TranslatedValue *slot, DirectHandle< Map > map, const DisallowGarbageCollection &no_gc)
std::deque< ObjectPosition > object_positions_
TranslatedValue * GetValueByObjectIndex(int object_index)
Tagged< FeedbackVector > feedback_vector_
static Simd128 getSimd128Slot(Address fp, int slot_index)
Handle< HeapObject > ResolveStringConcat(TranslatedValue *slot)
void VerifyMaterializedObjects()
TranslatedFrame CreateNextTranslatedFrame(DeoptTranslationIterator *iterator, Tagged< ProtectedDeoptimizationLiteralArray > protected_literal_array, const DeoptimizationLiteralProvider &literal_array, Address fp, FILE *trace_file)
Handle< FeedbackVector > feedback_vector_handle_
void EnsurePropertiesAllocatedAndMarked(TranslatedValue *properties_slot, DirectHandle< Map > map)
std::vector< TranslatedFrame > frames_
static Float32 GetFloatSlot(Address fp, int slot_index)
TranslatedFrame * GetFrameFromJSFrameIndex(int jsframe_index)
void UpdateFromPreviouslyMaterializedObjects()
DirectHandle< Object > GetValueAndAdvance(TranslatedFrame *frame, int *value_index)
int formal_parameter_count_
Handle< ByteArray > AllocateStorageFor(TranslatedValue *slot)
std::vector< TranslatedFrame >::iterator iterator
void Prepare(Address stack_frame_pointer)
void InitializeJSObjectAt(TranslatedFrame *frame, int *value_index, TranslatedValue *slot, DirectHandle< Map > map, const DisallowGarbageCollection &no_gc)
static uint32_t GetUInt32Slot(Address fp, int slot_index)
static TranslatedValue NewUint64ToBigInt(TranslatedState *container, uint64_t value)
static TranslatedValue NewDouble(TranslatedState *container, Float64 value)
Handle< HeapObject > storage()
Tagged< Object > GetRawValue() const
static TranslatedValue NewDuplicateObject(TranslatedState *container, int id)
static TranslatedValue NewInt64ToBigInt(TranslatedState *container, int64_t value)
static TranslatedValue NewHoleyDouble(TranslatedState *container, Float64 value)
static TranslatedValue NewBool(TranslatedState *container, uint32_t value)
void set_initialized_storage(Handle< HeapObject > storage)
uint32_t uint32_value() const
int GetChildrenCount() const
int32_t int32_value() const
Handle< HeapObject > storage_
void set_storage(Handle< HeapObject > storage)
static TranslatedValue NewInvalid(TranslatedState *container)
static TranslatedValue NewSimd128(TranslatedState *container, Simd128 value)
static TranslatedValue NewInt32(TranslatedState *container, int32_t value)
Handle< Object > GetValue()
Isolate * isolate() const
int object_length() const
MaterializationState materialization_state_
Tagged< Object > raw_literal() const
Float32 float_value() const
TranslatedValue(TranslatedState *container, Kind kind)
void ReplaceElementsArrayWithCopy()
static TranslatedValue NewInt64(TranslatedState *container, int64_t value)
static TranslatedValue NewUint32(TranslatedState *container, uint32_t value)
MaterializationState materialization_state() const
uint64_t uint64_value() const
bool IsMaterializedObject() const
MaterializedObjectInfo materialization_info_
static TranslatedValue NewFloat(TranslatedState *container, Float32 value)
bool IsMaterializableByDebugger() const
int64_t int64_value() const
static TranslatedValue NewStringConcat(TranslatedState *container, int id)
static TranslatedValue NewTagged(TranslatedState *container, Tagged< Object > literal)
static TranslatedValue NewDeferredObject(TranslatedState *container, int length, int object_index)
static TranslatedValue NewUint64(TranslatedState *container, uint64_t value)
Tagged< Object > raw_literal_
Float64 double_value() const
Simd128 simd_value() const
TranslatedState * container_
static V8_INLINE Address DecompressTagged(TOnHeapAddress on_heap_addr, Tagged_t raw_value)
#define COMPRESS_POINTERS_BOOL
ZoneVector< RpoNumber > & result
FunctionLiteral * literal
RegListBase< RegisterT > registers
static V ReadUnalignedValue(Address p)
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
const int kNoWasmReturnKind
constexpr int kTaggedSize
bool TranslationOpcodeIsBegin(TranslationOpcode o)
bool Is(IndirectHandle< U > value)
bool DoubleToSmiInteger(double value, int *smi_int_value)
bool IsNumber(Tagged< Object > obj)
void PrintF(const char *format,...)
bool IsSmiDouble(double value)
Tagged(T object) -> Tagged< T >
int TranslationOpcodeOperandCount(TranslationOpcode o)
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
constexpr int kSystemPointerSize
void ShortPrint(Tagged< Object > obj, FILE *out)
void DeoptimizationFrameTranslationPrintSingleOpcode(std::ostream &os, TranslationOpcode opcode, DeoptimizationFrameTranslation::Iterator &iterator, Tagged< ProtectedDeoptimizationLiteralArray > protected_literal_array, Tagged< DeoptimizationLiteralArray > literal_array)
V8_INLINE constexpr bool IsHeapObject(TaggedImpl< kRefType, StorageType > obj)
V8_EXPORT_PRIVATE FlagValues v8_flags
constexpr int JSParameterCount(int param_count_without_receiver)
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
static constexpr ReleaseStoreTag kReleaseStore
#define WRITE_FIELD(p, offset, value)
#define WRITE_BARRIER(object, offset, value)
#define INDIRECT_POINTER_WRITE_BARRIER(object, offset, tag, value)
#define CHECK_GE(lhs, rhs)
#define CHECK_GT(lhs, rhs)
#define CHECK_LT(lhs, rhs)
#define DCHECK_IMPLIES(v1, v2)
#define CHECK_NE(lhs, rhs)
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define OFFSET_OF_DATA_START(Type)
#define V8_LIKELY(condition)