| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/deopt_instructions.h" | 5 #include "vm/deopt_instructions.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/locations.h" | 10 #include "vm/locations.h" |
| (...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 private: | 1387 private: |
| 1388 const DeoptInstr* instruction_; // Instruction that was written. | 1388 const DeoptInstr* instruction_; // Instruction that was written. |
| 1389 const intptr_t info_number_; // Index of the deopt info it was written to. | 1389 const intptr_t info_number_; // Index of the deopt info it was written to. |
| 1390 | 1390 |
| 1391 GrowableArray<TrieNode*> children_; | 1391 GrowableArray<TrieNode*> children_; |
| 1392 }; | 1392 }; |
| 1393 | 1393 |
| 1394 | 1394 |
| 1395 DeoptInfoBuilder::DeoptInfoBuilder(const intptr_t num_args) | 1395 DeoptInfoBuilder::DeoptInfoBuilder(Isolate* isolate, const intptr_t num_args) |
| 1396 : instructions_(), | 1396 : isolate_(isolate), |
| 1397 instructions_(), |
| 1397 object_table_(GrowableObjectArray::Handle( | 1398 object_table_(GrowableObjectArray::Handle( |
| 1398 GrowableObjectArray::New(Heap::kOld))), | 1399 GrowableObjectArray::New(Heap::kOld))), |
| 1399 num_args_(num_args), | 1400 num_args_(num_args), |
| 1400 trie_root_(new TrieNode()), | 1401 trie_root_(new(isolate) TrieNode()), |
| 1401 current_info_number_(0), | 1402 current_info_number_(0), |
| 1402 frame_start_(-1), | 1403 frame_start_(-1), |
| 1403 materializations_() { | 1404 materializations_() { |
| 1404 } | 1405 } |
| 1405 | 1406 |
| 1406 | 1407 |
| 1407 intptr_t DeoptInfoBuilder::FindOrAddObjectInTable(const Object& obj) const { | 1408 intptr_t DeoptInfoBuilder::FindOrAddObjectInTable(const Object& obj) const { |
| 1408 for (intptr_t i = 0; i < object_table_.Length(); i++) { | 1409 for (intptr_t i = 0; i < object_table_.Length(); i++) { |
| 1409 if (object_table_.At(i) == obj.raw()) { | 1410 if (object_table_.At(i) == obj.raw()) { |
| 1410 return i; | 1411 return i; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1429 intptr_t deopt_id, | 1430 intptr_t deopt_id, |
| 1430 intptr_t dest_index) { | 1431 intptr_t dest_index) { |
| 1431 // Check that deopt_id exists. | 1432 // Check that deopt_id exists. |
| 1432 // TODO(vegorov): verify after deoptimization targets as well. | 1433 // TODO(vegorov): verify after deoptimization targets as well. |
| 1433 #ifdef DEBUG | 1434 #ifdef DEBUG |
| 1434 ASSERT(Isolate::IsDeoptAfter(deopt_id) || | 1435 ASSERT(Isolate::IsDeoptAfter(deopt_id) || |
| 1435 (code.GetPcForDeoptId(deopt_id, PcDescriptors::kDeopt) != 0)); | 1436 (code.GetPcForDeoptId(deopt_id, PcDescriptors::kDeopt) != 0)); |
| 1436 #endif | 1437 #endif |
| 1437 const intptr_t object_table_index = FindOrAddObjectInTable(code); | 1438 const intptr_t object_table_index = FindOrAddObjectInTable(code); |
| 1438 ASSERT(dest_index == FrameSize()); | 1439 ASSERT(dest_index == FrameSize()); |
| 1439 instructions_.Add(new DeoptRetAddressInstr(object_table_index, deopt_id)); | 1440 instructions_.Add( |
| 1441 new(isolate()) DeoptRetAddressInstr(object_table_index, deopt_id)); |
| 1440 } | 1442 } |
| 1441 | 1443 |
| 1442 | 1444 |
| 1443 void DeoptInfoBuilder::AddPcMarker(const Code& code, | 1445 void DeoptInfoBuilder::AddPcMarker(const Code& code, |
| 1444 intptr_t dest_index) { | 1446 intptr_t dest_index) { |
| 1445 intptr_t object_table_index = FindOrAddObjectInTable(code); | 1447 intptr_t object_table_index = FindOrAddObjectInTable(code); |
| 1446 ASSERT(dest_index == FrameSize()); | 1448 ASSERT(dest_index == FrameSize()); |
| 1447 instructions_.Add(new DeoptPcMarkerInstr(object_table_index)); | 1449 instructions_.Add(new(isolate()) DeoptPcMarkerInstr(object_table_index)); |
| 1448 } | 1450 } |
| 1449 | 1451 |
| 1450 | 1452 |
| 1451 void DeoptInfoBuilder::AddPp(const Code& code, | 1453 void DeoptInfoBuilder::AddPp(const Code& code, |
| 1452 intptr_t dest_index) { | 1454 intptr_t dest_index) { |
| 1453 intptr_t object_table_index = FindOrAddObjectInTable(code); | 1455 intptr_t object_table_index = FindOrAddObjectInTable(code); |
| 1454 ASSERT(dest_index == FrameSize()); | 1456 ASSERT(dest_index == FrameSize()); |
| 1455 instructions_.Add(new DeoptPpInstr(object_table_index)); | 1457 instructions_.Add(new(isolate()) DeoptPpInstr(object_table_index)); |
| 1456 } | 1458 } |
| 1457 | 1459 |
| 1458 | 1460 |
| 1459 void DeoptInfoBuilder::AddCopy(Value* value, | 1461 void DeoptInfoBuilder::AddCopy(Value* value, |
| 1460 const Location& source_loc, | 1462 const Location& source_loc, |
| 1461 const intptr_t dest_index) { | 1463 const intptr_t dest_index) { |
| 1462 DeoptInstr* deopt_instr = NULL; | 1464 DeoptInstr* deopt_instr = NULL; |
| 1463 if (source_loc.IsConstant()) { | 1465 if (source_loc.IsConstant()) { |
| 1464 intptr_t object_table_index = FindOrAddObjectInTable(source_loc.constant()); | 1466 intptr_t object_table_index = FindOrAddObjectInTable(source_loc.constant()); |
| 1465 deopt_instr = new DeoptConstantInstr(object_table_index); | 1467 deopt_instr = new(isolate()) DeoptConstantInstr(object_table_index); |
| 1466 } else if (source_loc.IsRegister()) { | 1468 } else if (source_loc.IsRegister()) { |
| 1467 ASSERT(value->definition()->representation() == kTagged); | 1469 ASSERT(value->definition()->representation() == kTagged); |
| 1468 deopt_instr = new DeoptRegisterInstr(source_loc.reg()); | 1470 deopt_instr = new(isolate()) DeoptRegisterInstr(source_loc.reg()); |
| 1469 } else if (source_loc.IsFpuRegister()) { | 1471 } else if (source_loc.IsFpuRegister()) { |
| 1470 if (value->definition()->representation() == kUnboxedDouble) { | 1472 if (value->definition()->representation() == kUnboxedDouble) { |
| 1471 deopt_instr = new DeoptFpuRegisterInstr(source_loc.fpu_reg()); | 1473 deopt_instr = new(isolate()) DeoptFpuRegisterInstr(source_loc.fpu_reg()); |
| 1472 } else if (value->definition()->representation() == kUnboxedFloat32x4) { | 1474 } else if (value->definition()->representation() == kUnboxedFloat32x4) { |
| 1473 deopt_instr = new DeoptFloat32x4FpuRegisterInstr(source_loc.fpu_reg()); | 1475 deopt_instr = |
| 1476 new(isolate()) DeoptFloat32x4FpuRegisterInstr(source_loc.fpu_reg()); |
| 1474 } else if (value->definition()->representation() == kUnboxedInt32x4) { | 1477 } else if (value->definition()->representation() == kUnboxedInt32x4) { |
| 1475 deopt_instr = new DeoptInt32x4FpuRegisterInstr(source_loc.fpu_reg()); | 1478 deopt_instr = |
| 1479 new(isolate()) DeoptInt32x4FpuRegisterInstr(source_loc.fpu_reg()); |
| 1476 } else { | 1480 } else { |
| 1477 ASSERT(value->definition()->representation() == kUnboxedFloat64x2); | 1481 ASSERT(value->definition()->representation() == kUnboxedFloat64x2); |
| 1478 deopt_instr = new DeoptFloat64x2FpuRegisterInstr(source_loc.fpu_reg()); | 1482 deopt_instr = |
| 1483 new(isolate()) DeoptFloat64x2FpuRegisterInstr(source_loc.fpu_reg()); |
| 1479 } | 1484 } |
| 1480 } else if (source_loc.IsStackSlot()) { | 1485 } else if (source_loc.IsStackSlot()) { |
| 1481 ASSERT(value->definition()->representation() == kTagged); | 1486 ASSERT(value->definition()->representation() == kTagged); |
| 1482 intptr_t source_index = CalculateStackIndex(source_loc); | 1487 intptr_t source_index = CalculateStackIndex(source_loc); |
| 1483 deopt_instr = new DeoptStackSlotInstr(source_index); | 1488 deopt_instr = new(isolate()) DeoptStackSlotInstr(source_index); |
| 1484 } else if (source_loc.IsDoubleStackSlot()) { | 1489 } else if (source_loc.IsDoubleStackSlot()) { |
| 1485 intptr_t source_index = CalculateStackIndex(source_loc); | 1490 intptr_t source_index = CalculateStackIndex(source_loc); |
| 1486 if (value->definition()->representation() == kUnboxedDouble) { | 1491 if (value->definition()->representation() == kUnboxedDouble) { |
| 1487 deopt_instr = new DeoptDoubleStackSlotInstr(source_index); | 1492 deopt_instr = new(isolate()) DeoptDoubleStackSlotInstr(source_index); |
| 1488 } else { | 1493 } else { |
| 1489 ASSERT(value->definition()->representation() == kUnboxedMint); | 1494 ASSERT(value->definition()->representation() == kUnboxedMint); |
| 1490 deopt_instr = new DeoptInt64StackSlotInstr(source_index); | 1495 deopt_instr = new(isolate()) DeoptInt64StackSlotInstr(source_index); |
| 1491 } | 1496 } |
| 1492 } else if (source_loc.IsQuadStackSlot()) { | 1497 } else if (source_loc.IsQuadStackSlot()) { |
| 1493 intptr_t source_index = CalculateStackIndex(source_loc); | 1498 intptr_t source_index = CalculateStackIndex(source_loc); |
| 1494 if (value->definition()->representation() == kUnboxedFloat32x4) { | 1499 if (value->definition()->representation() == kUnboxedFloat32x4) { |
| 1495 deopt_instr = new DeoptFloat32x4StackSlotInstr(source_index); | 1500 deopt_instr = new(isolate()) DeoptFloat32x4StackSlotInstr(source_index); |
| 1496 } else if (value->definition()->representation() == kUnboxedInt32x4) { | 1501 } else if (value->definition()->representation() == kUnboxedInt32x4) { |
| 1497 deopt_instr = new DeoptInt32x4StackSlotInstr(source_index); | 1502 deopt_instr = new(isolate()) DeoptInt32x4StackSlotInstr(source_index); |
| 1498 } else { | 1503 } else { |
| 1499 ASSERT(value->definition()->representation() == kUnboxedFloat64x2); | 1504 ASSERT(value->definition()->representation() == kUnboxedFloat64x2); |
| 1500 deopt_instr = new DeoptFloat64x2StackSlotInstr(source_index); | 1505 deopt_instr = new(isolate()) DeoptFloat64x2StackSlotInstr(source_index); |
| 1501 } | 1506 } |
| 1502 } else if (source_loc.IsPairLocation()) { | 1507 } else if (source_loc.IsPairLocation()) { |
| 1503 ASSERT(value->definition()->representation() == kUnboxedMint); | 1508 ASSERT(value->definition()->representation() == kUnboxedMint); |
| 1504 // There are four cases to consider here: | 1509 // There are four cases to consider here: |
| 1505 // (R = Register, S = Stack slot). | 1510 // (R = Register, S = Stack slot). |
| 1506 // 1) R, R. | 1511 // 1) R, R. |
| 1507 // 2) S, S. | 1512 // 2) S, S. |
| 1508 // 3) R, S. | 1513 // 3) R, S. |
| 1509 // 4) S, R. | 1514 // 4) S, R. |
| 1510 PairLocation* pair = source_loc.AsPairLocation(); | 1515 PairLocation* pair = source_loc.AsPairLocation(); |
| 1511 if (pair->At(0).IsRegister() && pair->At(1).IsRegister()) { | 1516 if (pair->At(0).IsRegister() && pair->At(1).IsRegister()) { |
| 1512 deopt_instr = new DeoptInt64RegisterPairInstr(pair->At(0).reg(), | 1517 deopt_instr = |
| 1513 pair->At(1).reg()); | 1518 new(isolate()) DeoptInt64RegisterPairInstr(pair->At(0).reg(), |
| 1519 pair->At(1).reg()); |
| 1514 } else if (pair->At(0).IsStackSlot() && pair->At(1).IsStackSlot()) { | 1520 } else if (pair->At(0).IsStackSlot() && pair->At(1).IsStackSlot()) { |
| 1515 deopt_instr = new DeoptInt64StackSlotPairInstr( | 1521 deopt_instr = new(isolate()) DeoptInt64StackSlotPairInstr( |
| 1516 CalculateStackIndex(pair->At(0)), | 1522 CalculateStackIndex(pair->At(0)), |
| 1517 CalculateStackIndex(pair->At(1))); | 1523 CalculateStackIndex(pair->At(1))); |
| 1518 } else if (pair->At(0).IsRegister() && pair->At(1).IsStackSlot()) { | 1524 } else if (pair->At(0).IsRegister() && pair->At(1).IsStackSlot()) { |
| 1519 deopt_instr = new DeoptInt64StackSlotRegisterInstr( | 1525 deopt_instr = new(isolate()) DeoptInt64StackSlotRegisterInstr( |
| 1520 CalculateStackIndex(pair->At(1)), | 1526 CalculateStackIndex(pair->At(1)), |
| 1521 pair->At(0).reg(), | 1527 pair->At(0).reg(), |
| 1522 true); | 1528 true); |
| 1523 } else { | 1529 } else { |
| 1524 ASSERT(pair->At(0).IsStackSlot() && pair->At(1).IsRegister()); | 1530 ASSERT(pair->At(0).IsStackSlot() && pair->At(1).IsRegister()); |
| 1525 deopt_instr = new DeoptInt64StackSlotRegisterInstr( | 1531 deopt_instr = new(isolate()) DeoptInt64StackSlotRegisterInstr( |
| 1526 CalculateStackIndex(pair->At(0)), | 1532 CalculateStackIndex(pair->At(0)), |
| 1527 pair->At(1).reg(), | 1533 pair->At(1).reg(), |
| 1528 false); | 1534 false); |
| 1529 } | 1535 } |
| 1530 } else if (source_loc.IsInvalid() && | 1536 } else if (source_loc.IsInvalid() && |
| 1531 value->definition()->IsMaterializeObject()) { | 1537 value->definition()->IsMaterializeObject()) { |
| 1532 const intptr_t index = FindMaterialization( | 1538 const intptr_t index = FindMaterialization( |
| 1533 value->definition()->AsMaterializeObject()); | 1539 value->definition()->AsMaterializeObject()); |
| 1534 ASSERT(index >= 0); | 1540 ASSERT(index >= 0); |
| 1535 deopt_instr = new DeoptMaterializedObjectRefInstr(index); | 1541 deopt_instr = new(isolate()) DeoptMaterializedObjectRefInstr(index); |
| 1536 } else { | 1542 } else { |
| 1537 UNREACHABLE(); | 1543 UNREACHABLE(); |
| 1538 } | 1544 } |
| 1539 ASSERT(dest_index == FrameSize()); | 1545 ASSERT(dest_index == FrameSize()); |
| 1540 ASSERT(deopt_instr != NULL); | 1546 ASSERT(deopt_instr != NULL); |
| 1541 instructions_.Add(deopt_instr); | 1547 instructions_.Add(deopt_instr); |
| 1542 } | 1548 } |
| 1543 | 1549 |
| 1544 | 1550 |
| 1545 void DeoptInfoBuilder::AddCallerFp(intptr_t dest_index) { | 1551 void DeoptInfoBuilder::AddCallerFp(intptr_t dest_index) { |
| 1546 ASSERT(dest_index == FrameSize()); | 1552 ASSERT(dest_index == FrameSize()); |
| 1547 instructions_.Add(new DeoptCallerFpInstr()); | 1553 instructions_.Add(new(isolate()) DeoptCallerFpInstr()); |
| 1548 } | 1554 } |
| 1549 | 1555 |
| 1550 | 1556 |
| 1551 void DeoptInfoBuilder::AddCallerPp(intptr_t dest_index) { | 1557 void DeoptInfoBuilder::AddCallerPp(intptr_t dest_index) { |
| 1552 ASSERT(dest_index == FrameSize()); | 1558 ASSERT(dest_index == FrameSize()); |
| 1553 instructions_.Add(new DeoptCallerPpInstr()); | 1559 instructions_.Add(new(isolate()) DeoptCallerPpInstr()); |
| 1554 } | 1560 } |
| 1555 | 1561 |
| 1556 | 1562 |
| 1557 void DeoptInfoBuilder::AddCallerPc(intptr_t dest_index) { | 1563 void DeoptInfoBuilder::AddCallerPc(intptr_t dest_index) { |
| 1558 ASSERT(dest_index == FrameSize()); | 1564 ASSERT(dest_index == FrameSize()); |
| 1559 instructions_.Add(new DeoptCallerPcInstr()); | 1565 instructions_.Add(new(isolate()) DeoptCallerPcInstr()); |
| 1560 } | 1566 } |
| 1561 | 1567 |
| 1562 | 1568 |
| 1563 void DeoptInfoBuilder::AddConstant(const Object& obj, intptr_t dest_index) { | 1569 void DeoptInfoBuilder::AddConstant(const Object& obj, intptr_t dest_index) { |
| 1564 ASSERT(dest_index == FrameSize()); | 1570 ASSERT(dest_index == FrameSize()); |
| 1565 intptr_t object_table_index = FindOrAddObjectInTable(obj); | 1571 intptr_t object_table_index = FindOrAddObjectInTable(obj); |
| 1566 instructions_.Add(new DeoptConstantInstr(object_table_index)); | 1572 instructions_.Add(new(isolate()) DeoptConstantInstr(object_table_index)); |
| 1567 } | 1573 } |
| 1568 | 1574 |
| 1569 | 1575 |
| 1570 void DeoptInfoBuilder::AddMaterialization(MaterializeObjectInstr* mat) { | 1576 void DeoptInfoBuilder::AddMaterialization(MaterializeObjectInstr* mat) { |
| 1571 const intptr_t index = FindMaterialization(mat); | 1577 const intptr_t index = FindMaterialization(mat); |
| 1572 if (index >= 0) { | 1578 if (index >= 0) { |
| 1573 return; // Already added. | 1579 return; // Already added. |
| 1574 } | 1580 } |
| 1575 materializations_.Add(mat); | 1581 materializations_.Add(mat); |
| 1576 | 1582 |
| 1577 // Count initialized fields and emit kMaterializeObject instruction. | 1583 // Count initialized fields and emit kMaterializeObject instruction. |
| 1578 // There is no need to write nulls into fields because object is null | 1584 // There is no need to write nulls into fields because object is null |
| 1579 // initialized by default. | 1585 // initialized by default. |
| 1580 intptr_t non_null_fields = 0; | 1586 intptr_t non_null_fields = 0; |
| 1581 for (intptr_t i = 0; i < mat->InputCount(); i++) { | 1587 for (intptr_t i = 0; i < mat->InputCount(); i++) { |
| 1582 if (!mat->InputAt(i)->BindsToConstantNull()) { | 1588 if (!mat->InputAt(i)->BindsToConstantNull()) { |
| 1583 non_null_fields++; | 1589 non_null_fields++; |
| 1584 } | 1590 } |
| 1585 } | 1591 } |
| 1586 | 1592 |
| 1587 instructions_.Add(new DeoptMaterializeObjectInstr(non_null_fields)); | 1593 instructions_.Add( |
| 1594 new(isolate()) DeoptMaterializeObjectInstr(non_null_fields)); |
| 1588 } | 1595 } |
| 1589 | 1596 |
| 1590 | 1597 |
| 1591 intptr_t DeoptInfoBuilder::EmitMaterializationArguments(intptr_t dest_index) { | 1598 intptr_t DeoptInfoBuilder::EmitMaterializationArguments(intptr_t dest_index) { |
| 1592 ASSERT(dest_index == kDartFrameFixedSize); | 1599 ASSERT(dest_index == kDartFrameFixedSize); |
| 1593 for (intptr_t i = 0; i < materializations_.length(); i++) { | 1600 for (intptr_t i = 0; i < materializations_.length(); i++) { |
| 1594 MaterializeObjectInstr* mat = materializations_[i]; | 1601 MaterializeObjectInstr* mat = materializations_[i]; |
| 1595 // Class of the instance to allocate. | 1602 // Class of the instance to allocate. |
| 1596 AddConstant(mat->cls(), dest_index++); | 1603 AddConstant(mat->cls(), dest_index++); |
| 1597 for (intptr_t i = 0; i < mat->InputCount(); i++) { | 1604 for (intptr_t i = 0; i < mat->InputCount(); i++) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1635 TrieNode* node = suffix->FindChild(*instructions_[i]); | 1642 TrieNode* node = suffix->FindChild(*instructions_[i]); |
| 1636 if (node == NULL) break; | 1643 if (node == NULL) break; |
| 1637 suffix = node; | 1644 suffix = node; |
| 1638 ++suffix_length; | 1645 ++suffix_length; |
| 1639 } | 1646 } |
| 1640 } | 1647 } |
| 1641 | 1648 |
| 1642 // Allocate space for the translation. If the shared suffix is longer | 1649 // Allocate space for the translation. If the shared suffix is longer |
| 1643 // than one instruction, we replace it with a single suffix instruction. | 1650 // than one instruction, we replace it with a single suffix instruction. |
| 1644 if (suffix_length > 1) length -= (suffix_length - 1); | 1651 if (suffix_length > 1) length -= (suffix_length - 1); |
| 1645 const DeoptInfo& deopt_info = DeoptInfo::Handle(DeoptInfo::New(length)); | 1652 const DeoptInfo& deopt_info = |
| 1653 DeoptInfo::Handle(isolate(), DeoptInfo::New(length)); |
| 1646 | 1654 |
| 1647 // Write the unshared instructions and build their sub-tree. | 1655 // Write the unshared instructions and build their sub-tree. |
| 1648 TrieNode* node = NULL; | 1656 TrieNode* node = NULL; |
| 1649 intptr_t write_count = (suffix_length > 1) ? length - 1 : length; | 1657 intptr_t write_count = (suffix_length > 1) ? length - 1 : length; |
| 1650 for (intptr_t i = 0; i < write_count; ++i) { | 1658 for (intptr_t i = 0; i < write_count; ++i) { |
| 1651 DeoptInstr* instr = instructions_[i]; | 1659 DeoptInstr* instr = instructions_[i]; |
| 1652 deopt_info.SetAt(i, instr->kind(), instr->source_index()); | 1660 deopt_info.SetAt(i, instr->kind(), instr->source_index()); |
| 1653 TrieNode* child = node; | 1661 TrieNode* child = node; |
| 1654 node = new TrieNode(instr, current_info_number_); | 1662 node = new(isolate()) TrieNode(instr, current_info_number_); |
| 1655 node->AddChild(child); | 1663 node->AddChild(child); |
| 1656 } | 1664 } |
| 1657 | 1665 |
| 1658 if (suffix_length > 1) { | 1666 if (suffix_length > 1) { |
| 1659 suffix->AddChild(node); | 1667 suffix->AddChild(node); |
| 1660 DeoptInstr* instr = | 1668 DeoptInstr* instr = |
| 1661 new DeoptSuffixInstr(suffix->info_number(), suffix_length); | 1669 new(isolate()) DeoptSuffixInstr(suffix->info_number(), suffix_length); |
| 1662 deopt_info.SetAt(length - 1, instr->kind(), instr->source_index()); | 1670 deopt_info.SetAt(length - 1, instr->kind(), instr->source_index()); |
| 1663 } else { | 1671 } else { |
| 1664 trie_root_->AddChild(node); | 1672 trie_root_->AddChild(node); |
| 1665 } | 1673 } |
| 1666 | 1674 |
| 1667 ASSERT(deopt_info.VerifyDecompression(instructions_, deopt_table)); | 1675 ASSERT(deopt_info.VerifyDecompression(instructions_, deopt_table)); |
| 1668 instructions_.Clear(); | 1676 instructions_.Clear(); |
| 1669 materializations_.Clear(); | 1677 materializations_.Clear(); |
| 1670 frame_start_ = -1; | 1678 frame_start_ = -1; |
| 1671 | 1679 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1702 Smi* offset, | 1710 Smi* offset, |
| 1703 DeoptInfo* info, | 1711 DeoptInfo* info, |
| 1704 Smi* reason) { | 1712 Smi* reason) { |
| 1705 intptr_t i = index * kEntrySize; | 1713 intptr_t i = index * kEntrySize; |
| 1706 *offset ^= table.At(i); | 1714 *offset ^= table.At(i); |
| 1707 *info ^= table.At(i + 1); | 1715 *info ^= table.At(i + 1); |
| 1708 *reason ^= table.At(i + 2); | 1716 *reason ^= table.At(i + 2); |
| 1709 } | 1717 } |
| 1710 | 1718 |
| 1711 } // namespace dart | 1719 } // namespace dart |
| OLD | NEW |