Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1284 value = reinterpret_cast<intptr_t>( | 1284 value = reinterpret_cast<intptr_t>( |
| 1285 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE)); | 1285 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE)); |
| 1286 output_frame->SetFrameSlot(output_frame_offset, value); | 1286 output_frame->SetFrameSlot(output_frame_offset, value); |
| 1287 if (trace_) { | 1287 if (trace_) { |
| 1288 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1288 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1289 V8PRIxPTR " ; function (stub failure sentinel)\n", | 1289 V8PRIxPTR " ; function (stub failure sentinel)\n", |
| 1290 top_address + output_frame_offset, output_frame_offset, value); | 1290 top_address + output_frame_offset, output_frame_offset, value); |
| 1291 } | 1291 } |
| 1292 | 1292 |
| 1293 intptr_t caller_arg_count = 0; | 1293 intptr_t caller_arg_count = 0; |
| 1294 if (descriptor->stack_parameter_count_ != NULL) { | 1294 bool arg_count_known = descriptor->stack_parameter_count_ == NULL; |
| 1295 caller_arg_count = | |
| 1296 input_->GetRegister(descriptor->stack_parameter_count_->code()); | |
| 1297 } | |
| 1298 | 1295 |
| 1299 // Build the Arguments object for the caller's parameters and a pointer to it. | 1296 // Build the Arguments object for the caller's parameters and a pointer to it. |
| 1300 output_frame_offset -= kPointerSize; | 1297 output_frame_offset -= kPointerSize; |
| 1301 value = frame_ptr + StandardFrameConstants::kCallerSPOffset + | 1298 int args_arguments_offset = output_frame_offset; |
| 1302 (caller_arg_count - 1) * kPointerSize; | 1299 intptr_t the_hole = reinterpret_cast<intptr_t>( |
| 1303 output_frame->SetFrameSlot(output_frame_offset, value); | 1300 isolate_->heap()->the_hole_value()); |
| 1301 if (arg_count_known) { | |
| 1302 value = frame_ptr + StandardFrameConstants::kCallerSPOffset + | |
| 1303 (caller_arg_count - 1) * kPointerSize; | |
| 1304 } else { | |
| 1305 value = the_hole; | |
| 1306 } | |
| 1307 | |
| 1308 output_frame->SetFrameSlot(args_arguments_offset, value); | |
| 1304 if (trace_) { | 1309 if (trace_) { |
| 1305 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1310 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1306 V8PRIxPTR " ; args.arguments\n", | 1311 V8PRIxPTR " ; args.arguments %s\n", |
| 1307 top_address + output_frame_offset, output_frame_offset, value); | 1312 top_address + args_arguments_offset, args_arguments_offset, value, |
| 1313 arg_count_known ? "" : "(the hole)"); | |
| 1308 } | 1314 } |
| 1309 | 1315 |
| 1310 output_frame_offset -= kPointerSize; | 1316 output_frame_offset -= kPointerSize; |
| 1311 value = caller_arg_count; | 1317 int length_frame_offset = output_frame_offset; |
| 1312 output_frame->SetFrameSlot(output_frame_offset, value); | 1318 value = arg_count_known ? caller_arg_count : the_hole; |
| 1319 output_frame->SetFrameSlot(length_frame_offset, value); | |
| 1313 if (trace_) { | 1320 if (trace_) { |
| 1314 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1321 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1315 V8PRIxPTR " ; args.length\n", | 1322 V8PRIxPTR " ; args.length %s\n", |
| 1316 top_address + output_frame_offset, output_frame_offset, value); | 1323 top_address + length_frame_offset, length_frame_offset, value, |
| 1324 arg_count_known ? "" : "(the hole)"); | |
| 1317 } | 1325 } |
| 1318 | 1326 |
| 1319 output_frame_offset -= kPointerSize; | 1327 output_frame_offset -= kPointerSize; |
| 1320 value = frame_ptr - (output_frame_size - output_frame_offset) - | 1328 value = frame_ptr - (output_frame_size - output_frame_offset) - |
| 1321 StandardFrameConstants::kMarkerOffset + kPointerSize; | 1329 StandardFrameConstants::kMarkerOffset + kPointerSize; |
| 1322 output_frame->SetFrameSlot(output_frame_offset, value); | 1330 output_frame->SetFrameSlot(output_frame_offset, value); |
| 1323 if (trace_) { | 1331 if (trace_) { |
| 1324 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | 1332 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" |
| 1325 V8PRIxPTR " ; args*\n", | 1333 V8PRIxPTR " ; args*\n", |
| 1326 top_address + output_frame_offset, output_frame_offset, value); | 1334 top_address + output_frame_offset, output_frame_offset, value); |
| 1327 } | 1335 } |
| 1328 | 1336 |
| 1329 // Copy the register parameters to the failure frame. | 1337 // Copy the register parameters to the failure frame. |
| 1330 for (int i = 0; i < descriptor->register_param_count_; ++i) { | 1338 for (int i = 0; i < descriptor->register_param_count_; ++i) { |
| 1331 output_frame_offset -= kPointerSize; | 1339 output_frame_offset -= kPointerSize; |
| 1332 DoTranslateCommand(iterator, 0, output_frame_offset); | 1340 DoTranslateCommand(iterator, 0, output_frame_offset); |
| 1333 } | 1341 } |
| 1334 | 1342 |
| 1343 if (!arg_count_known) { | |
| 1344 DoTranslateCommand(iterator, 0, length_frame_offset, true); | |
| 1345 caller_arg_count = output_frame->GetFrameSlot(length_frame_offset); | |
| 1346 value = frame_ptr + StandardFrameConstants::kCallerSPOffset + | |
| 1347 (caller_arg_count - 1) * kPointerSize; | |
| 1348 output_frame->SetFrameSlot(args_arguments_offset, value); | |
| 1349 if (trace_) { | |
| 1350 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" | |
| 1351 V8PRIxPTR " ; args.arguments\n", | |
| 1352 top_address + args_arguments_offset, args_arguments_offset, value); | |
| 1353 } | |
| 1354 } | |
| 1355 | |
| 1335 ASSERT(0 == output_frame_offset); | 1356 ASSERT(0 == output_frame_offset); |
| 1336 | 1357 |
| 1337 // Copy the double registers from the input into the output frame. | 1358 // Copy the double registers from the input into the output frame. |
| 1338 CopyDoubleRegisters(output_frame); | 1359 CopyDoubleRegisters(output_frame); |
| 1339 | 1360 |
| 1340 // Fill registers containing handler and number of parameters. | 1361 // Fill registers containing handler and number of parameters. |
| 1341 SetPlatformCompiledStubRegisters(output_frame, descriptor); | 1362 SetPlatformCompiledStubRegisters(output_frame, descriptor); |
| 1342 | 1363 |
| 1343 // Compute this frame's PC, state, and continuation. | 1364 // Compute this frame's PC, state, and continuation. |
| 1344 Code* trampoline = NULL; | 1365 Code* trampoline = NULL; |
| 1345 int extra = descriptor->extra_expression_stack_count_; | 1366 bool acting_as_js_function = descriptor->acting_as_js_function_; |
| 1346 StubFailureTrampolineStub(extra).FindCodeInCache(&trampoline, isolate_); | 1367 StubFailureTrampolineStub(acting_as_js_function).FindCodeInCache(&trampoline, |
| 1368 isolate_); | |
| 1347 ASSERT(trampoline != NULL); | 1369 ASSERT(trampoline != NULL); |
| 1348 output_frame->SetPc(reinterpret_cast<intptr_t>( | 1370 output_frame->SetPc(reinterpret_cast<intptr_t>( |
| 1349 trampoline->instruction_start())); | 1371 trampoline->instruction_start())); |
| 1350 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); | 1372 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); |
| 1351 Code* notify_failure = | 1373 Code* notify_failure = |
| 1352 isolate_->builtins()->builtin(Builtins::kNotifyStubFailure); | 1374 isolate_->builtins()->builtin(Builtins::kNotifyStubFailure); |
| 1353 output_frame->SetContinuation( | 1375 output_frame->SetContinuation( |
| 1354 reinterpret_cast<intptr_t>(notify_failure->entry())); | 1376 reinterpret_cast<intptr_t>(notify_failure->entry())); |
| 1355 } | 1377 } |
| 1356 | 1378 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1480 index); | 1502 index); |
| 1481 } | 1503 } |
| 1482 | 1504 |
| 1483 info->SetExpression(index, *num); | 1505 info->SetExpression(index, *num); |
| 1484 } | 1506 } |
| 1485 } | 1507 } |
| 1486 } | 1508 } |
| 1487 #endif | 1509 #endif |
| 1488 | 1510 |
| 1489 | 1511 |
| 1512 static const char* TraceValueType(bool is_smi, bool is_native_value) { | |
| 1513 if (is_native_value) { | |
| 1514 return "native"; | |
| 1515 } else if (is_smi) { | |
| 1516 return "smi"; | |
| 1517 } | |
| 1518 | |
| 1519 return "heap number"; | |
| 1520 } | |
| 1521 | |
| 1522 | |
| 1490 void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, | 1523 void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, |
| 1491 int frame_index, | 1524 int frame_index, |
| 1492 unsigned output_offset) { | 1525 unsigned output_offset, |
| 1526 bool is_native_value) { | |
|
danno
2013/03/20 21:07:33
I think an enum is better here:
enum DeoptimizerTr
mvstanton
2013/03/21 11:47:35
Done, though I kept a bool local is_native for the
| |
| 1493 disasm::NameConverter converter; | 1527 disasm::NameConverter converter; |
| 1494 // A GC-safe temporary placeholder that we can put in the output frame. | 1528 // A GC-safe temporary placeholder that we can put in the output frame. |
| 1495 const intptr_t kPlaceholder = reinterpret_cast<intptr_t>(Smi::FromInt(0)); | 1529 const intptr_t kPlaceholder = reinterpret_cast<intptr_t>(Smi::FromInt(0)); |
| 1496 | 1530 |
| 1497 // Ignore commands marked as duplicate and act on the first non-duplicate. | 1531 // Ignore commands marked as duplicate and act on the first non-duplicate. |
| 1498 Translation::Opcode opcode = | 1532 Translation::Opcode opcode = |
| 1499 static_cast<Translation::Opcode>(iterator->Next()); | 1533 static_cast<Translation::Opcode>(iterator->Next()); |
| 1500 while (opcode == Translation::DUPLICATE) { | 1534 while (opcode == Translation::DUPLICATE) { |
| 1501 opcode = static_cast<Translation::Opcode>(iterator->Next()); | 1535 opcode = static_cast<Translation::Opcode>(iterator->Next()); |
| 1502 iterator->Skip(Translation::NumberOfOperandsFor(opcode)); | 1536 iterator->Skip(Translation::NumberOfOperandsFor(opcode)); |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 1528 reinterpret_cast<Object*>(input_value)->ShortPrint(); | 1562 reinterpret_cast<Object*>(input_value)->ShortPrint(); |
| 1529 PrintF("\n"); | 1563 PrintF("\n"); |
| 1530 } | 1564 } |
| 1531 output_[frame_index]->SetFrameSlot(output_offset, input_value); | 1565 output_[frame_index]->SetFrameSlot(output_offset, input_value); |
| 1532 return; | 1566 return; |
| 1533 } | 1567 } |
| 1534 | 1568 |
| 1535 case Translation::INT32_REGISTER: { | 1569 case Translation::INT32_REGISTER: { |
| 1536 int input_reg = iterator->Next(); | 1570 int input_reg = iterator->Next(); |
| 1537 intptr_t value = input_->GetRegister(input_reg); | 1571 intptr_t value = input_->GetRegister(input_reg); |
| 1538 bool is_smi = Smi::IsValid(value); | 1572 bool is_smi = !is_native_value && Smi::IsValid(value); |
| 1573 | |
| 1539 if (trace_) { | 1574 if (trace_) { |
| 1540 PrintF( | 1575 PrintF( |
| 1541 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n", | 1576 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n", |
| 1542 output_[frame_index]->GetTop() + output_offset, | 1577 output_[frame_index]->GetTop() + output_offset, |
| 1543 output_offset, | 1578 output_offset, |
| 1544 value, | 1579 value, |
| 1545 converter.NameOfCPURegister(input_reg), | 1580 converter.NameOfCPURegister(input_reg), |
| 1546 is_smi ? "smi" : "heap number"); | 1581 TraceValueType(is_smi, is_native_value)); |
| 1547 } | 1582 } |
| 1548 if (is_smi) { | 1583 if (is_smi) { |
| 1549 intptr_t tagged_value = | 1584 intptr_t tagged_value = |
| 1550 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); | 1585 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); |
| 1551 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); | 1586 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); |
| 1587 } else if (is_native_value) { | |
| 1588 output_[frame_index]->SetFrameSlot(output_offset, value); | |
| 1552 } else { | 1589 } else { |
| 1553 // We save the untagged value on the side and store a GC-safe | 1590 // We save the untagged value on the side and store a GC-safe |
| 1554 // temporary placeholder in the frame. | 1591 // temporary placeholder in the frame. |
| 1555 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, | 1592 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
| 1556 static_cast<double>(static_cast<int32_t>(value))); | 1593 static_cast<double>(static_cast<int32_t>(value))); |
| 1557 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); | 1594 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
| 1558 } | 1595 } |
| 1559 return; | 1596 return; |
| 1560 } | 1597 } |
| 1561 | 1598 |
| 1562 case Translation::UINT32_REGISTER: { | 1599 case Translation::UINT32_REGISTER: { |
| 1563 int input_reg = iterator->Next(); | 1600 int input_reg = iterator->Next(); |
| 1564 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg)); | 1601 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg)); |
| 1565 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); | 1602 bool is_smi = !is_native_value && |
| 1603 (value <= static_cast<uintptr_t>(Smi::kMaxValue)); | |
| 1566 if (trace_) { | 1604 if (trace_) { |
| 1567 PrintF( | 1605 PrintF( |
| 1568 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIuPTR | 1606 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIuPTR |
| 1569 " ; uint %s (%s)\n", | 1607 " ; uint %s (%s)\n", |
| 1570 output_[frame_index]->GetTop() + output_offset, | 1608 output_[frame_index]->GetTop() + output_offset, |
| 1571 output_offset, | 1609 output_offset, |
| 1572 value, | 1610 value, |
| 1573 converter.NameOfCPURegister(input_reg), | 1611 converter.NameOfCPURegister(input_reg), |
| 1574 is_smi ? "smi" : "heap number"); | 1612 TraceValueType(is_smi, is_native_value)); |
| 1575 } | 1613 } |
| 1576 if (is_smi) { | 1614 if (is_smi) { |
| 1577 intptr_t tagged_value = | 1615 intptr_t tagged_value = |
| 1578 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); | 1616 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); |
| 1579 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); | 1617 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); |
| 1618 } else if (is_native_value) { | |
| 1619 output_[frame_index]->SetFrameSlot(output_offset, value); | |
| 1580 } else { | 1620 } else { |
| 1581 // We save the untagged value on the side and store a GC-safe | 1621 // We save the untagged value on the side and store a GC-safe |
| 1582 // temporary placeholder in the frame. | 1622 // temporary placeholder in the frame. |
| 1583 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, | 1623 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
| 1584 static_cast<double>(static_cast<uint32_t>(value))); | 1624 static_cast<double>(static_cast<uint32_t>(value))); |
| 1585 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); | 1625 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
| 1586 } | 1626 } |
| 1587 return; | 1627 return; |
| 1588 } | 1628 } |
| 1589 | 1629 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1621 } | 1661 } |
| 1622 output_[frame_index]->SetFrameSlot(output_offset, input_value); | 1662 output_[frame_index]->SetFrameSlot(output_offset, input_value); |
| 1623 return; | 1663 return; |
| 1624 } | 1664 } |
| 1625 | 1665 |
| 1626 case Translation::INT32_STACK_SLOT: { | 1666 case Translation::INT32_STACK_SLOT: { |
| 1627 int input_slot_index = iterator->Next(); | 1667 int input_slot_index = iterator->Next(); |
| 1628 unsigned input_offset = | 1668 unsigned input_offset = |
| 1629 input_->GetOffsetFromSlotIndex(input_slot_index); | 1669 input_->GetOffsetFromSlotIndex(input_slot_index); |
| 1630 intptr_t value = input_->GetFrameSlot(input_offset); | 1670 intptr_t value = input_->GetFrameSlot(input_offset); |
| 1631 bool is_smi = Smi::IsValid(value); | 1671 bool is_smi = !is_native_value && Smi::IsValid(value); |
| 1632 if (trace_) { | 1672 if (trace_) { |
| 1633 PrintF(" 0x%08" V8PRIxPTR ": ", | 1673 PrintF(" 0x%08" V8PRIxPTR ": ", |
| 1634 output_[frame_index]->GetTop() + output_offset); | 1674 output_[frame_index]->GetTop() + output_offset); |
| 1635 PrintF("[top + %d] <- %" V8PRIdPTR " ; [sp + %d] (%s)\n", | 1675 PrintF("[top + %d] <- %" V8PRIdPTR " ; [sp + %d] (%s)\n", |
| 1636 output_offset, | 1676 output_offset, |
| 1637 value, | 1677 value, |
| 1638 input_offset, | 1678 input_offset, |
| 1639 is_smi ? "smi" : "heap number"); | 1679 TraceValueType(is_smi, is_native_value)); |
| 1640 } | 1680 } |
| 1641 if (is_smi) { | 1681 if (is_smi) { |
| 1642 intptr_t tagged_value = | 1682 intptr_t tagged_value = |
| 1643 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); | 1683 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); |
| 1644 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); | 1684 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); |
| 1685 } else if (is_native_value) { | |
| 1686 output_[frame_index]->SetFrameSlot(output_offset, value); | |
| 1645 } else { | 1687 } else { |
| 1646 // We save the untagged value on the side and store a GC-safe | 1688 // We save the untagged value on the side and store a GC-safe |
| 1647 // temporary placeholder in the frame. | 1689 // temporary placeholder in the frame. |
| 1648 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, | 1690 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
| 1649 static_cast<double>(static_cast<int32_t>(value))); | 1691 static_cast<double>(static_cast<int32_t>(value))); |
| 1650 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); | 1692 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
| 1651 } | 1693 } |
| 1652 return; | 1694 return; |
| 1653 } | 1695 } |
| 1654 | 1696 |
| 1655 case Translation::UINT32_STACK_SLOT: { | 1697 case Translation::UINT32_STACK_SLOT: { |
| 1656 int input_slot_index = iterator->Next(); | 1698 int input_slot_index = iterator->Next(); |
| 1657 unsigned input_offset = | 1699 unsigned input_offset = |
| 1658 input_->GetOffsetFromSlotIndex(input_slot_index); | 1700 input_->GetOffsetFromSlotIndex(input_slot_index); |
| 1659 uintptr_t value = | 1701 uintptr_t value = |
| 1660 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset)); | 1702 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset)); |
| 1661 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); | 1703 bool is_smi = !is_native_value && |
| 1704 (value <= static_cast<uintptr_t>(Smi::kMaxValue)); | |
| 1662 if (trace_) { | 1705 if (trace_) { |
| 1663 PrintF(" 0x%08" V8PRIxPTR ": ", | 1706 PrintF(" 0x%08" V8PRIxPTR ": ", |
| 1664 output_[frame_index]->GetTop() + output_offset); | 1707 output_[frame_index]->GetTop() + output_offset); |
| 1665 PrintF("[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n", | 1708 PrintF("[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n", |
| 1666 output_offset, | 1709 output_offset, |
| 1667 value, | 1710 value, |
| 1668 input_offset, | 1711 input_offset, |
| 1669 is_smi ? "smi" : "heap number"); | 1712 TraceValueType(is_smi, is_native_value)); |
| 1670 } | 1713 } |
| 1671 if (is_smi) { | 1714 if (is_smi) { |
| 1672 intptr_t tagged_value = | 1715 intptr_t tagged_value = |
| 1673 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); | 1716 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); |
| 1674 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); | 1717 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); |
| 1718 } else if (is_native_value) { | |
| 1719 output_[frame_index]->SetFrameSlot(output_offset, value); | |
| 1675 } else { | 1720 } else { |
| 1676 // We save the untagged value on the side and store a GC-safe | 1721 // We save the untagged value on the side and store a GC-safe |
| 1677 // temporary placeholder in the frame. | 1722 // temporary placeholder in the frame. |
| 1678 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, | 1723 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
| 1679 static_cast<double>(static_cast<uint32_t>(value))); | 1724 static_cast<double>(static_cast<uint32_t>(value))); |
| 1680 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); | 1725 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
| 1681 } | 1726 } |
| 1682 return; | 1727 return; |
| 1683 } | 1728 } |
| 1684 | 1729 |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2684 | 2729 |
| 2685 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 2730 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 2686 v->VisitPointer(BitCast<Object**>(&function_)); | 2731 v->VisitPointer(BitCast<Object**>(&function_)); |
| 2687 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 2732 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 2688 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 2733 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 2689 } | 2734 } |
| 2690 | 2735 |
| 2691 #endif // ENABLE_DEBUGGER_SUPPORT | 2736 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2692 | 2737 |
| 2693 } } // namespace v8::internal | 2738 } } // namespace v8::internal |
| OLD | NEW |