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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 const char* reason, | 1569 const char* reason, |
1570 int modify_index, | 1570 int modify_index, |
1571 int split, | 1571 int split, |
1572 int descriptors, | 1572 int descriptors, |
1573 bool constant_to_field, | 1573 bool constant_to_field, |
1574 Representation old_representation, | 1574 Representation old_representation, |
1575 Representation new_representation) { | 1575 Representation new_representation) { |
1576 PrintF(file, "[generalizing "); | 1576 PrintF(file, "[generalizing "); |
1577 constructor_name()->PrintOn(file); | 1577 constructor_name()->PrintOn(file); |
1578 PrintF(file, "] "); | 1578 PrintF(file, "] "); |
1579 String::cast(instance_descriptors()->GetKey(modify_index))->PrintOn(file); | 1579 Name* name = instance_descriptors()->GetKey(modify_index); |
| 1580 if (name->IsString()) { |
| 1581 String::cast(name)->PrintOn(file); |
| 1582 } else { |
| 1583 PrintF(file, "{symbol %p}", static_cast<void*>(name)); |
| 1584 } |
1580 if (constant_to_field) { | 1585 if (constant_to_field) { |
1581 PrintF(file, ":c->f"); | 1586 PrintF(file, ":c->f"); |
1582 } else { | 1587 } else { |
1583 PrintF(file, ":%s->%s", | 1588 PrintF(file, ":%s->%s", |
1584 old_representation.Mnemonic(), | 1589 old_representation.Mnemonic(), |
1585 new_representation.Mnemonic()); | 1590 new_representation.Mnemonic()); |
1586 } | 1591 } |
1587 PrintF(file, " ("); | 1592 PrintF(file, " ("); |
1588 if (strlen(reason) > 0) { | 1593 if (strlen(reason) > 0) { |
1589 PrintF(file, "%s", reason); | 1594 PrintF(file, "%s", reason); |
(...skipping 19 matching lines...) Expand all Loading... |
1609 Representation n_r = n->GetDetails(i).representation(); | 1614 Representation n_r = n->GetDetails(i).representation(); |
1610 if (!o_r.Equals(n_r)) { | 1615 if (!o_r.Equals(n_r)) { |
1611 String::cast(o->GetKey(i))->PrintOn(file); | 1616 String::cast(o->GetKey(i))->PrintOn(file); |
1612 PrintF(file, ":%s->%s ", o_r.Mnemonic(), n_r.Mnemonic()); | 1617 PrintF(file, ":%s->%s ", o_r.Mnemonic(), n_r.Mnemonic()); |
1613 } else if (o->GetDetails(i).type() == CONSTANT && | 1618 } else if (o->GetDetails(i).type() == CONSTANT && |
1614 n->GetDetails(i).type() == FIELD) { | 1619 n->GetDetails(i).type() == FIELD) { |
1615 Name* name = o->GetKey(i); | 1620 Name* name = o->GetKey(i); |
1616 if (name->IsString()) { | 1621 if (name->IsString()) { |
1617 String::cast(name)->PrintOn(file); | 1622 String::cast(name)->PrintOn(file); |
1618 } else { | 1623 } else { |
1619 PrintF(file, "???"); | 1624 PrintF(file, "{symbol %p}", static_cast<void*>(name)); |
1620 } | 1625 } |
1621 PrintF(file, " "); | 1626 PrintF(file, " "); |
1622 } | 1627 } |
1623 } | 1628 } |
1624 PrintF(file, "\n"); | 1629 PrintF(file, "\n"); |
1625 } | 1630 } |
1626 | 1631 |
1627 | 1632 |
1628 void HeapObject::HeapObjectShortPrint(StringStream* accumulator) { | 1633 void HeapObject::HeapObjectShortPrint(StringStream* accumulator) { |
1629 Heap* heap = GetHeap(); | 1634 Heap* heap = GetHeap(); |
(...skipping 14862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16492 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16497 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16493 static const char* error_messages_[] = { | 16498 static const char* error_messages_[] = { |
16494 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16499 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16495 }; | 16500 }; |
16496 #undef ERROR_MESSAGES_TEXTS | 16501 #undef ERROR_MESSAGES_TEXTS |
16497 return error_messages_[reason]; | 16502 return error_messages_[reason]; |
16498 } | 16503 } |
16499 | 16504 |
16500 | 16505 |
16501 } } // namespace v8::internal | 16506 } } // namespace v8::internal |
OLD | NEW |