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 10554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10565 case INTERCEPTOR: return "INTERCEPTOR"; | 10565 case INTERCEPTOR: return "INTERCEPTOR"; |
10566 case MAP_TRANSITION: return "MAP_TRANSITION"; | 10566 case MAP_TRANSITION: return "MAP_TRANSITION"; |
10567 case NONEXISTENT: return "NONEXISTENT"; | 10567 case NONEXISTENT: return "NONEXISTENT"; |
10568 } | 10568 } |
10569 UNREACHABLE(); // keep the compiler happy | 10569 UNREACHABLE(); // keep the compiler happy |
10570 return NULL; | 10570 return NULL; |
10571 } | 10571 } |
10572 | 10572 |
10573 | 10573 |
10574 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { | 10574 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { |
| 10575 PrintF(out, "extra_ic_state = "); |
10575 const char* name = NULL; | 10576 const char* name = NULL; |
| 10577 HeapStringAllocator allocator; |
| 10578 StringStream str(&allocator); |
10576 switch (kind) { | 10579 switch (kind) { |
10577 case CALL_IC: | 10580 case CALL_IC: |
10578 if (extra == STRING_INDEX_OUT_OF_BOUNDS) { | 10581 if (extra == STRING_INDEX_OUT_OF_BOUNDS) { |
10579 name = "STRING_INDEX_OUT_OF_BOUNDS"; | 10582 name = "STRING_INDEX_OUT_OF_BOUNDS"; |
10580 } | 10583 } |
10581 break; | 10584 break; |
10582 case STORE_IC: | 10585 case STORE_IC: |
10583 case KEYED_STORE_IC: | 10586 case KEYED_STORE_IC: |
10584 if (extra == kStrictMode) { | 10587 if (extra == kStrictMode) { |
10585 name = "STRICT"; | 10588 name = "STRICT"; |
10586 } | 10589 } |
10587 break; | 10590 break; |
| 10591 case UNARY_OP_IC: |
| 10592 UnaryOpStub(extra).PrintName(&str); |
| 10593 break; |
10588 default: | 10594 default: |
10589 break; | 10595 break; |
10590 } | 10596 } |
10591 if (name != NULL) { | 10597 if (str.length()) { |
10592 PrintF(out, "extra_ic_state = %s\n", name); | 10598 str.Add("\n"); |
| 10599 str.OutputToFile(out); |
| 10600 } else if (name != NULL) { |
| 10601 PrintF(out, "%s\n", name); |
10593 } else { | 10602 } else { |
10594 PrintF(out, "extra_ic_state = %d\n", extra); | 10603 PrintF(out, "%d\n", extra); |
10595 } | 10604 } |
10596 } | 10605 } |
10597 | 10606 |
10598 | 10607 |
10599 void Code::Disassemble(const char* name, FILE* out) { | 10608 void Code::Disassemble(const char* name, FILE* out) { |
10600 PrintF(out, "kind = %s\n", Kind2String(kind())); | 10609 PrintF(out, "kind = %s\n", Kind2String(kind())); |
10601 if (is_inline_cache_stub()) { | 10610 if (is_inline_cache_stub()) { |
10602 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); | 10611 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); |
10603 PrintExtraICState(out, kind(), extra_ic_state()); | 10612 PrintExtraICState(out, kind(), extra_ic_state()); |
10604 if (ic_state() == MONOMORPHIC) { | 10613 if (ic_state() == MONOMORPHIC) { |
(...skipping 5144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15749 return static_cast<Type*>(type_raw()); | 15758 return static_cast<Type*>(type_raw()); |
15750 } | 15759 } |
15751 | 15760 |
15752 | 15761 |
15753 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { | 15762 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { |
15754 set_type_raw(type, ignored); | 15763 set_type_raw(type, ignored); |
15755 } | 15764 } |
15756 | 15765 |
15757 | 15766 |
15758 } } // namespace v8::internal | 15767 } } // namespace v8::internal |
OLD | NEW |