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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 else if (IsTrue()) | 1662 else if (IsTrue()) |
1663 accumulator->Add("<true>"); | 1663 accumulator->Add("<true>"); |
1664 else if (IsFalse()) | 1664 else if (IsFalse()) |
1665 accumulator->Add("<false>"); | 1665 accumulator->Add("<false>"); |
1666 else | 1666 else |
1667 accumulator->Add("<Odd Oddball>"); | 1667 accumulator->Add("<Odd Oddball>"); |
1668 break; | 1668 break; |
1669 } | 1669 } |
1670 case SYMBOL_TYPE: { | 1670 case SYMBOL_TYPE: { |
1671 Symbol* symbol = Symbol::cast(this); | 1671 Symbol* symbol = Symbol::cast(this); |
1672 accumulator->Add("<Symbol: %d", symbol->Hash()); | 1672 accumulator->Add("<"); |
1673 if (!symbol->name()->IsUndefined()) { | 1673 accumulator->Add(symbol->IsPrivate() ? "Private" : "Symbol"); |
| 1674 accumulator->Add(": %d", symbol->Hash()); |
| 1675 Object* name = |
| 1676 symbol->IsPrivate() ? Private::cast(symbol)->name() : symbol->name(); |
| 1677 if (!name->IsUndefined()) { |
1674 accumulator->Add(" "); | 1678 accumulator->Add(" "); |
1675 String::cast(symbol->name())->StringShortPrint(accumulator); | 1679 String::cast(name)->StringShortPrint(accumulator); |
1676 } | 1680 } |
1677 accumulator->Add(">"); | 1681 accumulator->Add(">"); |
1678 break; | 1682 break; |
1679 } | 1683 } |
1680 case HEAP_NUMBER_TYPE: | 1684 case HEAP_NUMBER_TYPE: |
1681 accumulator->Add("<Number: "); | 1685 accumulator->Add("<Number: "); |
1682 HeapNumber::cast(this)->HeapNumberPrint(accumulator); | 1686 HeapNumber::cast(this)->HeapNumberPrint(accumulator); |
1683 accumulator->Put('>'); | 1687 accumulator->Put('>'); |
1684 break; | 1688 break; |
1685 case JS_PROXY_TYPE: | 1689 case JS_PROXY_TYPE: |
(...skipping 14710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16396 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16400 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16397 static const char* error_messages_[] = { | 16401 static const char* error_messages_[] = { |
16398 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16402 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16399 }; | 16403 }; |
16400 #undef ERROR_MESSAGES_TEXTS | 16404 #undef ERROR_MESSAGES_TEXTS |
16401 return error_messages_[reason]; | 16405 return error_messages_[reason]; |
16402 } | 16406 } |
16403 | 16407 |
16404 | 16408 |
16405 } } // namespace v8::internal | 16409 } } // namespace v8::internal |
OLD | NEW |