| 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 10859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10870 Address code_start_address = instruction_start(); | 10870 Address code_start_address = instruction_start(); |
| 10871 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 10871 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
| 10872 if (deopt_data->Pc(i)->value() == -1) continue; | 10872 if (deopt_data->Pc(i)->value() == -1) continue; |
| 10873 Address address = code_start_address + deopt_data->Pc(i)->value(); | 10873 Address address = code_start_address + deopt_data->Pc(i)->value(); |
| 10874 if (address == pc) return true; | 10874 if (address == pc) return true; |
| 10875 } | 10875 } |
| 10876 return false; | 10876 return false; |
| 10877 } | 10877 } |
| 10878 | 10878 |
| 10879 | 10879 |
| 10880 bool Code::IsContextual() { | |
| 10881 ASSERT(is_inline_cache_stub()); | |
| 10882 Kind kind = this->kind(); | |
| 10883 if (kind == STORE_IC || kind == LOAD_IC || kind == CALL_IC) { | |
| 10884 ExtraICState extra_state = extra_ic_state(); | |
| 10885 return IC::GetContextualMode(extra_state) == CONTEXTUAL; | |
| 10886 } | |
| 10887 return false; | |
| 10888 } | |
| 10889 | |
| 10890 | |
| 10891 // Identify kind of code. | 10880 // Identify kind of code. |
| 10892 const char* Code::Kind2String(Kind kind) { | 10881 const char* Code::Kind2String(Kind kind) { |
| 10893 switch (kind) { | 10882 switch (kind) { |
| 10894 #define CASE(name) case name: return #name; | 10883 #define CASE(name) case name: return #name; |
| 10895 CODE_KIND_LIST(CASE) | 10884 CODE_KIND_LIST(CASE) |
| 10896 #undef CASE | 10885 #undef CASE |
| 10897 case NUMBER_OF_KINDS: break; | 10886 case NUMBER_OF_KINDS: break; |
| 10898 } | 10887 } |
| 10899 UNREACHABLE(); | 10888 UNREACHABLE(); |
| 10900 return NULL; | 10889 return NULL; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11104 } | 11093 } |
| 11105 UNREACHABLE(); // keep the compiler happy | 11094 UNREACHABLE(); // keep the compiler happy |
| 11106 return NULL; | 11095 return NULL; |
| 11107 } | 11096 } |
| 11108 | 11097 |
| 11109 | 11098 |
| 11110 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { | 11099 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { |
| 11111 PrintF(out, "extra_ic_state = "); | 11100 PrintF(out, "extra_ic_state = "); |
| 11112 const char* name = NULL; | 11101 const char* name = NULL; |
| 11113 switch (kind) { | 11102 switch (kind) { |
| 11114 case CALL_IC: | |
| 11115 if (extra == STRING_INDEX_OUT_OF_BOUNDS) { | |
| 11116 name = "STRING_INDEX_OUT_OF_BOUNDS"; | |
| 11117 } | |
| 11118 break; | |
| 11119 case STORE_IC: | 11103 case STORE_IC: |
| 11120 case KEYED_STORE_IC: | 11104 case KEYED_STORE_IC: |
| 11121 if (extra == kStrictMode) { | 11105 if (extra == kStrictMode) { |
| 11122 name = "STRICT"; | 11106 name = "STRICT"; |
| 11123 } | 11107 } |
| 11124 break; | 11108 break; |
| 11125 default: | 11109 default: |
| 11126 break; | 11110 break; |
| 11127 } | 11111 } |
| 11128 if (name != NULL) { | 11112 if (name != NULL) { |
| (...skipping 5525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16654 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16638 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16655 static const char* error_messages_[] = { | 16639 static const char* error_messages_[] = { |
| 16656 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16640 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16657 }; | 16641 }; |
| 16658 #undef ERROR_MESSAGES_TEXTS | 16642 #undef ERROR_MESSAGES_TEXTS |
| 16659 return error_messages_[reason]; | 16643 return error_messages_[reason]; |
| 16660 } | 16644 } |
| 16661 | 16645 |
| 16662 | 16646 |
| 16663 } } // namespace v8::internal | 16647 } } // namespace v8::internal |
| OLD | NEW |