| 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; |
| 10576 switch (kind) { | 10577 switch (kind) { |
| 10577 case CALL_IC: | 10578 case CALL_IC: |
| 10578 if (extra == STRING_INDEX_OUT_OF_BOUNDS) { | 10579 if (extra == STRING_INDEX_OUT_OF_BOUNDS) { |
| 10579 name = "STRING_INDEX_OUT_OF_BOUNDS"; | 10580 name = "STRING_INDEX_OUT_OF_BOUNDS"; |
| 10580 } | 10581 } |
| 10581 break; | 10582 break; |
| 10582 case STORE_IC: | 10583 case STORE_IC: |
| 10583 case KEYED_STORE_IC: | 10584 case KEYED_STORE_IC: |
| 10584 if (extra == kStrictMode) { | 10585 if (extra == kStrictMode) { |
| 10585 name = "STRICT"; | 10586 name = "STRICT"; |
| 10586 } | 10587 } |
| 10587 break; | 10588 break; |
| 10588 default: | 10589 default: |
| 10589 break; | 10590 break; |
| 10590 } | 10591 } |
| 10591 if (name != NULL) { | 10592 if (name != NULL) { |
| 10592 PrintF(out, "extra_ic_state = %s\n", name); | 10593 PrintF(out, "%s\n", name); |
| 10593 } else { | 10594 } else { |
| 10594 PrintF(out, "extra_ic_state = %d\n", extra); | 10595 PrintF(out, "%d\n", extra); |
| 10595 } | 10596 } |
| 10596 } | 10597 } |
| 10597 | 10598 |
| 10598 | 10599 |
| 10599 void Code::Disassemble(const char* name, FILE* out) { | 10600 void Code::Disassemble(const char* name, FILE* out) { |
| 10600 PrintF(out, "kind = %s\n", Kind2String(kind())); | 10601 PrintF(out, "kind = %s\n", Kind2String(kind())); |
| 10601 if (is_inline_cache_stub()) { | 10602 if (is_inline_cache_stub()) { |
| 10602 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); | 10603 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); |
| 10603 PrintExtraICState(out, kind(), extra_ic_state()); | 10604 PrintExtraICState(out, kind(), needs_extended_extra_ic_state(kind()) ? |
| 10605 extended_extra_ic_state() : extra_ic_state()); |
| 10604 if (ic_state() == MONOMORPHIC) { | 10606 if (ic_state() == MONOMORPHIC) { |
| 10605 PrintF(out, "type = %s\n", StubType2String(type())); | 10607 PrintF(out, "type = %s\n", StubType2String(type())); |
| 10606 } | 10608 } |
| 10607 if (is_call_stub() || is_keyed_call_stub()) { | 10609 if (is_call_stub() || is_keyed_call_stub()) { |
| 10608 PrintF(out, "argc = %d\n", arguments_count()); | 10610 PrintF(out, "argc = %d\n", arguments_count()); |
| 10609 } | 10611 } |
| 10610 if (is_compare_ic_stub()) { | 10612 if (is_compare_ic_stub()) { |
| 10611 ASSERT(major_key() == CodeStub::CompareIC); | 10613 ASSERT(major_key() == CodeStub::CompareIC); |
| 10612 CompareIC::State left_state, right_state, handler_state; | 10614 CompareIC::State left_state, right_state, handler_state; |
| 10613 Token::Value op; | 10615 Token::Value op; |
| (...skipping 5135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15749 return static_cast<Type*>(type_raw()); | 15751 return static_cast<Type*>(type_raw()); |
| 15750 } | 15752 } |
| 15751 | 15753 |
| 15752 | 15754 |
| 15753 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { | 15755 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { |
| 15754 set_type_raw(type, ignored); | 15756 set_type_raw(type, ignored); |
| 15755 } | 15757 } |
| 15756 | 15758 |
| 15757 | 15759 |
| 15758 } } // namespace v8::internal | 15760 } } // namespace v8::internal |
| OLD | NEW |