Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: src/deoptimizer.cc

Issue 12490013: Deoptimizer support for hydrogen stubs that accept a variable number of arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 value = reinterpret_cast<intptr_t>( 1273 value = reinterpret_cast<intptr_t>(
1274 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE)); 1274 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE));
1275 output_frame->SetFrameSlot(output_frame_offset, value); 1275 output_frame->SetFrameSlot(output_frame_offset, value);
1276 if (trace_) { 1276 if (trace_) {
1277 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1277 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1278 V8PRIxPTR " ; function (stub failure sentinel)\n", 1278 V8PRIxPTR " ; function (stub failure sentinel)\n",
1279 top_address + output_frame_offset, output_frame_offset, value); 1279 top_address + output_frame_offset, output_frame_offset, value);
1280 } 1280 }
1281 1281
1282 intptr_t caller_arg_count = 0; 1282 intptr_t caller_arg_count = 0;
1283 if (descriptor->stack_parameter_count_ != NULL) { 1283 bool arg_count_known = descriptor->stack_parameter_count_ == NULL;
1284 caller_arg_count =
1285 input_->GetRegister(descriptor->stack_parameter_count_->code());
1286 }
1287 1284
1288 // Build the Arguments object for the caller's parameters and a pointer to it. 1285 // Build the Arguments object for the caller's parameters and a pointer to it.
1289 output_frame_offset -= kPointerSize; 1286 output_frame_offset -= kPointerSize;
1290 value = frame_ptr + StandardFrameConstants::kCallerSPOffset + 1287 int args_arguments_offset = output_frame_offset;
1291 (caller_arg_count - 1) * kPointerSize; 1288 intptr_t the_hole = reinterpret_cast<intptr_t>(
1292 output_frame->SetFrameSlot(output_frame_offset, value); 1289 isolate_->heap()->the_hole_value());
1290 if (arg_count_known) {
1291 value = frame_ptr + StandardFrameConstants::kCallerSPOffset +
1292 (caller_arg_count - 1) * kPointerSize;
1293 } else {
1294 value = the_hole;
1295 }
1296
1297 output_frame->SetFrameSlot(args_arguments_offset, value);
1293 if (trace_) { 1298 if (trace_) {
1294 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1299 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1295 V8PRIxPTR " ; args.arguments\n", 1300 V8PRIxPTR " ; args.arguments %s\n",
1296 top_address + output_frame_offset, output_frame_offset, value); 1301 top_address + args_arguments_offset, args_arguments_offset, value,
1302 arg_count_known ? "" : "(the hole)");
1297 } 1303 }
1298 1304
1299 output_frame_offset -= kPointerSize; 1305 output_frame_offset -= kPointerSize;
1300 value = caller_arg_count; 1306 int length_frame_offset = output_frame_offset;
1301 output_frame->SetFrameSlot(output_frame_offset, value); 1307 value = arg_count_known ? caller_arg_count : the_hole;
1308 output_frame->SetFrameSlot(length_frame_offset, value);
1302 if (trace_) { 1309 if (trace_) {
1303 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1310 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1304 V8PRIxPTR " ; args.length\n", 1311 V8PRIxPTR " ; args.length %s\n",
1305 top_address + output_frame_offset, output_frame_offset, value); 1312 top_address + length_frame_offset, length_frame_offset, value,
1313 arg_count_known ? "" : "(the hole)");
1306 } 1314 }
1307 1315
1308 output_frame_offset -= kPointerSize; 1316 output_frame_offset -= kPointerSize;
1309 value = frame_ptr - (output_frame_size - output_frame_offset) - 1317 value = frame_ptr - (output_frame_size - output_frame_offset) -
1310 StandardFrameConstants::kMarkerOffset + kPointerSize; 1318 StandardFrameConstants::kMarkerOffset + kPointerSize;
1311 output_frame->SetFrameSlot(output_frame_offset, value); 1319 output_frame->SetFrameSlot(output_frame_offset, value);
1312 if (trace_) { 1320 if (trace_) {
1313 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" 1321 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1314 V8PRIxPTR " ; args*\n", 1322 V8PRIxPTR " ; args*\n",
1315 top_address + output_frame_offset, output_frame_offset, value); 1323 top_address + output_frame_offset, output_frame_offset, value);
1316 } 1324 }
1317 1325
1318 // Copy the register parameters to the failure frame. 1326 // Copy the register parameters to the failure frame.
1319 for (int i = 0; i < descriptor->register_param_count_; ++i) { 1327 for (int i = 0; i < descriptor->register_param_count_; ++i) {
1320 output_frame_offset -= kPointerSize; 1328 output_frame_offset -= kPointerSize;
1321 DoTranslateCommand(iterator, 0, output_frame_offset); 1329 DoTranslateCommand(iterator, 0, output_frame_offset);
1322 } 1330 }
1323 1331
1332 if (!arg_count_known) {
1333 DoTranslateCommand(iterator, 0, length_frame_offset,
1334 TRANSLATED_VALUE_IS_NATIVE);
1335 caller_arg_count = output_frame->GetFrameSlot(length_frame_offset);
1336 value = frame_ptr + StandardFrameConstants::kCallerSPOffset +
1337 (caller_arg_count - 1) * kPointerSize;
1338 output_frame->SetFrameSlot(args_arguments_offset, value);
1339 if (trace_) {
1340 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08"
1341 V8PRIxPTR " ; args.arguments\n",
1342 top_address + args_arguments_offset, args_arguments_offset, value);
1343 }
1344 }
1345
1324 ASSERT(0 == output_frame_offset); 1346 ASSERT(0 == output_frame_offset);
1325 1347
1326 // Copy the double registers from the input into the output frame. 1348 // Copy the double registers from the input into the output frame.
1327 CopyDoubleRegisters(output_frame); 1349 CopyDoubleRegisters(output_frame);
1328 1350
1329 // Fill registers containing handler and number of parameters. 1351 // Fill registers containing handler and number of parameters.
1330 SetPlatformCompiledStubRegisters(output_frame, descriptor); 1352 SetPlatformCompiledStubRegisters(output_frame, descriptor);
1331 1353
1332 // Compute this frame's PC, state, and continuation. 1354 // Compute this frame's PC, state, and continuation.
1333 Code* trampoline = NULL; 1355 Code* trampoline = NULL;
1334 int extra = descriptor->extra_expression_stack_count_; 1356 StubFunctionMode function_mode = descriptor->function_mode_;
1335 StubFailureTrampolineStub(extra).FindCodeInCache(&trampoline, isolate_); 1357 StubFailureTrampolineStub(function_mode).FindCodeInCache(&trampoline,
1358 isolate_);
1336 ASSERT(trampoline != NULL); 1359 ASSERT(trampoline != NULL);
1337 output_frame->SetPc(reinterpret_cast<intptr_t>( 1360 output_frame->SetPc(reinterpret_cast<intptr_t>(
1338 trampoline->instruction_start())); 1361 trampoline->instruction_start()));
1339 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS)); 1362 output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS));
1340 Code* notify_failure = 1363 Code* notify_failure =
1341 isolate_->builtins()->builtin(Builtins::kNotifyStubFailure); 1364 isolate_->builtins()->builtin(Builtins::kNotifyStubFailure);
1342 output_frame->SetContinuation( 1365 output_frame->SetContinuation(
1343 reinterpret_cast<intptr_t>(notify_failure->entry())); 1366 reinterpret_cast<intptr_t>(notify_failure->entry()));
1344 } 1367 }
1345 1368
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 index); 1492 index);
1470 } 1493 }
1471 1494
1472 info->SetExpression(index, *num); 1495 info->SetExpression(index, *num);
1473 } 1496 }
1474 } 1497 }
1475 } 1498 }
1476 #endif 1499 #endif
1477 1500
1478 1501
1502 static const char* TraceValueType(bool is_smi, bool is_native) {
1503 if (is_native) {
1504 return "native";
1505 } else if (is_smi) {
1506 return "smi";
1507 }
1508
1509 return "heap number";
1510 }
1511
1512
1479 void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator, 1513 void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
1480 int frame_index, 1514 int frame_index,
1481 unsigned output_offset) { 1515 unsigned output_offset,
1516 DeoptimizerTranslatedValueType value_type) {
1482 disasm::NameConverter converter; 1517 disasm::NameConverter converter;
1483 // A GC-safe temporary placeholder that we can put in the output frame. 1518 // A GC-safe temporary placeholder that we can put in the output frame.
1484 const intptr_t kPlaceholder = reinterpret_cast<intptr_t>(Smi::FromInt(0)); 1519 const intptr_t kPlaceholder = reinterpret_cast<intptr_t>(Smi::FromInt(0));
1520 bool is_native = value_type == TRANSLATED_VALUE_IS_NATIVE;
1485 1521
1486 // Ignore commands marked as duplicate and act on the first non-duplicate. 1522 // Ignore commands marked as duplicate and act on the first non-duplicate.
1487 Translation::Opcode opcode = 1523 Translation::Opcode opcode =
1488 static_cast<Translation::Opcode>(iterator->Next()); 1524 static_cast<Translation::Opcode>(iterator->Next());
1489 while (opcode == Translation::DUPLICATE) { 1525 while (opcode == Translation::DUPLICATE) {
1490 opcode = static_cast<Translation::Opcode>(iterator->Next()); 1526 opcode = static_cast<Translation::Opcode>(iterator->Next());
1491 iterator->Skip(Translation::NumberOfOperandsFor(opcode)); 1527 iterator->Skip(Translation::NumberOfOperandsFor(opcode));
1492 opcode = static_cast<Translation::Opcode>(iterator->Next()); 1528 opcode = static_cast<Translation::Opcode>(iterator->Next());
1493 } 1529 }
1494 1530
(...skipping 22 matching lines...) Expand all
1517 reinterpret_cast<Object*>(input_value)->ShortPrint(); 1553 reinterpret_cast<Object*>(input_value)->ShortPrint();
1518 PrintF("\n"); 1554 PrintF("\n");
1519 } 1555 }
1520 output_[frame_index]->SetFrameSlot(output_offset, input_value); 1556 output_[frame_index]->SetFrameSlot(output_offset, input_value);
1521 return; 1557 return;
1522 } 1558 }
1523 1559
1524 case Translation::INT32_REGISTER: { 1560 case Translation::INT32_REGISTER: {
1525 int input_reg = iterator->Next(); 1561 int input_reg = iterator->Next();
1526 intptr_t value = input_->GetRegister(input_reg); 1562 intptr_t value = input_->GetRegister(input_reg);
1527 bool is_smi = Smi::IsValid(value); 1563 bool is_smi = (value_type == TRANSLATED_VALUE_IS_TAGGED) &&
1564 Smi::IsValid(value);
1565
1528 if (trace_) { 1566 if (trace_) {
1529 PrintF( 1567 PrintF(
1530 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n", 1568 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n",
1531 output_[frame_index]->GetTop() + output_offset, 1569 output_[frame_index]->GetTop() + output_offset,
1532 output_offset, 1570 output_offset,
1533 value, 1571 value,
1534 converter.NameOfCPURegister(input_reg), 1572 converter.NameOfCPURegister(input_reg),
1535 is_smi ? "smi" : "heap number"); 1573 TraceValueType(is_smi, is_native));
1536 } 1574 }
1537 if (is_smi) { 1575 if (is_smi) {
1538 intptr_t tagged_value = 1576 intptr_t tagged_value =
1539 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); 1577 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
1540 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); 1578 output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
1579 } else if (value_type == TRANSLATED_VALUE_IS_NATIVE) {
1580 output_[frame_index]->SetFrameSlot(output_offset, value);
1541 } else { 1581 } else {
1542 // We save the untagged value on the side and store a GC-safe 1582 // We save the untagged value on the side and store a GC-safe
1543 // temporary placeholder in the frame. 1583 // temporary placeholder in the frame.
1584 ASSERT(value_type == TRANSLATED_VALUE_IS_TAGGED);
1544 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, 1585 AddDoubleValue(output_[frame_index]->GetTop() + output_offset,
1545 static_cast<double>(static_cast<int32_t>(value))); 1586 static_cast<double>(static_cast<int32_t>(value)));
1546 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); 1587 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
1547 } 1588 }
1548 return; 1589 return;
1549 } 1590 }
1550 1591
1551 case Translation::UINT32_REGISTER: { 1592 case Translation::UINT32_REGISTER: {
1552 int input_reg = iterator->Next(); 1593 int input_reg = iterator->Next();
1553 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg)); 1594 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg));
1554 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); 1595 bool is_smi = (value_type == TRANSLATED_VALUE_IS_TAGGED) &&
1596 (value <= static_cast<uintptr_t>(Smi::kMaxValue));
1555 if (trace_) { 1597 if (trace_) {
1556 PrintF( 1598 PrintF(
1557 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIuPTR 1599 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIuPTR
1558 " ; uint %s (%s)\n", 1600 " ; uint %s (%s)\n",
1559 output_[frame_index]->GetTop() + output_offset, 1601 output_[frame_index]->GetTop() + output_offset,
1560 output_offset, 1602 output_offset,
1561 value, 1603 value,
1562 converter.NameOfCPURegister(input_reg), 1604 converter.NameOfCPURegister(input_reg),
1563 is_smi ? "smi" : "heap number"); 1605 TraceValueType(is_smi, is_native));
1564 } 1606 }
1565 if (is_smi) { 1607 if (is_smi) {
1566 intptr_t tagged_value = 1608 intptr_t tagged_value =
1567 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); 1609 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
1568 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); 1610 output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
1611 } else if (value_type == TRANSLATED_VALUE_IS_NATIVE) {
1612 output_[frame_index]->SetFrameSlot(output_offset, value);
1569 } else { 1613 } else {
1570 // We save the untagged value on the side and store a GC-safe 1614 // We save the untagged value on the side and store a GC-safe
1571 // temporary placeholder in the frame. 1615 // temporary placeholder in the frame.
1616 ASSERT(value_type == TRANSLATED_VALUE_IS_TAGGED);
1572 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, 1617 AddDoubleValue(output_[frame_index]->GetTop() + output_offset,
1573 static_cast<double>(static_cast<uint32_t>(value))); 1618 static_cast<double>(static_cast<uint32_t>(value)));
1574 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); 1619 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
1575 } 1620 }
1576 return; 1621 return;
1577 } 1622 }
1578 1623
1579 case Translation::DOUBLE_REGISTER: { 1624 case Translation::DOUBLE_REGISTER: {
1580 int input_reg = iterator->Next(); 1625 int input_reg = iterator->Next();
1581 double value = input_->GetDoubleRegister(input_reg); 1626 double value = input_->GetDoubleRegister(input_reg);
(...skipping 28 matching lines...) Expand all
1610 } 1655 }
1611 output_[frame_index]->SetFrameSlot(output_offset, input_value); 1656 output_[frame_index]->SetFrameSlot(output_offset, input_value);
1612 return; 1657 return;
1613 } 1658 }
1614 1659
1615 case Translation::INT32_STACK_SLOT: { 1660 case Translation::INT32_STACK_SLOT: {
1616 int input_slot_index = iterator->Next(); 1661 int input_slot_index = iterator->Next();
1617 unsigned input_offset = 1662 unsigned input_offset =
1618 input_->GetOffsetFromSlotIndex(input_slot_index); 1663 input_->GetOffsetFromSlotIndex(input_slot_index);
1619 intptr_t value = input_->GetFrameSlot(input_offset); 1664 intptr_t value = input_->GetFrameSlot(input_offset);
1620 bool is_smi = Smi::IsValid(value); 1665 bool is_smi = (value_type == TRANSLATED_VALUE_IS_TAGGED) &&
1666 Smi::IsValid(value);
1621 if (trace_) { 1667 if (trace_) {
1622 PrintF(" 0x%08" V8PRIxPTR ": ", 1668 PrintF(" 0x%08" V8PRIxPTR ": ",
1623 output_[frame_index]->GetTop() + output_offset); 1669 output_[frame_index]->GetTop() + output_offset);
1624 PrintF("[top + %d] <- %" V8PRIdPTR " ; [sp + %d] (%s)\n", 1670 PrintF("[top + %d] <- %" V8PRIdPTR " ; [sp + %d] (%s)\n",
1625 output_offset, 1671 output_offset,
1626 value, 1672 value,
1627 input_offset, 1673 input_offset,
1628 is_smi ? "smi" : "heap number"); 1674 TraceValueType(is_smi, is_native));
1629 } 1675 }
1630 if (is_smi) { 1676 if (is_smi) {
1631 intptr_t tagged_value = 1677 intptr_t tagged_value =
1632 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); 1678 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
1633 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); 1679 output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
1680 } else if (value_type == TRANSLATED_VALUE_IS_NATIVE) {
1681 output_[frame_index]->SetFrameSlot(output_offset, value);
1634 } else { 1682 } else {
1635 // We save the untagged value on the side and store a GC-safe 1683 // We save the untagged value on the side and store a GC-safe
1636 // temporary placeholder in the frame. 1684 // temporary placeholder in the frame.
1685 ASSERT(value_type == TRANSLATED_VALUE_IS_TAGGED);
1637 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, 1686 AddDoubleValue(output_[frame_index]->GetTop() + output_offset,
1638 static_cast<double>(static_cast<int32_t>(value))); 1687 static_cast<double>(static_cast<int32_t>(value)));
1639 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); 1688 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
1640 } 1689 }
1641 return; 1690 return;
1642 } 1691 }
1643 1692
1644 case Translation::UINT32_STACK_SLOT: { 1693 case Translation::UINT32_STACK_SLOT: {
1645 int input_slot_index = iterator->Next(); 1694 int input_slot_index = iterator->Next();
1646 unsigned input_offset = 1695 unsigned input_offset =
1647 input_->GetOffsetFromSlotIndex(input_slot_index); 1696 input_->GetOffsetFromSlotIndex(input_slot_index);
1648 uintptr_t value = 1697 uintptr_t value =
1649 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset)); 1698 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset));
1650 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); 1699 bool is_smi = (value_type == TRANSLATED_VALUE_IS_TAGGED) &&
1700 (value <= static_cast<uintptr_t>(Smi::kMaxValue));
1651 if (trace_) { 1701 if (trace_) {
1652 PrintF(" 0x%08" V8PRIxPTR ": ", 1702 PrintF(" 0x%08" V8PRIxPTR ": ",
1653 output_[frame_index]->GetTop() + output_offset); 1703 output_[frame_index]->GetTop() + output_offset);
1654 PrintF("[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n", 1704 PrintF("[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n",
1655 output_offset, 1705 output_offset,
1656 value, 1706 value,
1657 input_offset, 1707 input_offset,
1658 is_smi ? "smi" : "heap number"); 1708 TraceValueType(is_smi, is_native));
1659 } 1709 }
1660 if (is_smi) { 1710 if (is_smi) {
1661 intptr_t tagged_value = 1711 intptr_t tagged_value =
1662 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); 1712 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
1663 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); 1713 output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
1714 } else if (value_type == TRANSLATED_VALUE_IS_NATIVE) {
1715 output_[frame_index]->SetFrameSlot(output_offset, value);
1664 } else { 1716 } else {
1665 // We save the untagged value on the side and store a GC-safe 1717 // We save the untagged value on the side and store a GC-safe
1666 // temporary placeholder in the frame. 1718 // temporary placeholder in the frame.
1719 ASSERT(value_type == TRANSLATED_VALUE_IS_TAGGED);
1667 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, 1720 AddDoubleValue(output_[frame_index]->GetTop() + output_offset,
1668 static_cast<double>(static_cast<uint32_t>(value))); 1721 static_cast<double>(static_cast<uint32_t>(value)));
1669 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); 1722 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
1670 } 1723 }
1671 return; 1724 return;
1672 } 1725 }
1673 1726
1674 case Translation::DOUBLE_STACK_SLOT: { 1727 case Translation::DOUBLE_STACK_SLOT: {
1675 int input_slot_index = iterator->Next(); 1728 int input_slot_index = iterator->Next();
1676 unsigned input_offset = 1729 unsigned input_offset =
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 2725
2673 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 2726 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
2674 v->VisitPointer(BitCast<Object**>(&function_)); 2727 v->VisitPointer(BitCast<Object**>(&function_));
2675 v->VisitPointers(parameters_, parameters_ + parameters_count_); 2728 v->VisitPointers(parameters_, parameters_ + parameters_count_);
2676 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 2729 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
2677 } 2730 }
2678 2731
2679 #endif // ENABLE_DEBUGGER_SUPPORT 2732 #endif // ENABLE_DEBUGGER_SUPPORT
2680 2733
2681 } } // namespace v8::internal 2734 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698