| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 bool TypeFeedbackOracle::LoadIsPolymorphic(Property* expr) { | 131 bool TypeFeedbackOracle::LoadIsPolymorphic(Property* expr) { |
| 132 Handle<Object> map_or_code = GetInfo(expr->PropertyFeedbackId()); | 132 Handle<Object> map_or_code = GetInfo(expr->PropertyFeedbackId()); |
| 133 if (map_or_code->IsCode()) { | 133 if (map_or_code->IsCode()) { |
| 134 Handle<Code> code = Handle<Code>::cast(map_or_code); | 134 Handle<Code> code = Handle<Code>::cast(map_or_code); |
| 135 return code->is_keyed_load_stub() && code->ic_state() == POLYMORPHIC; | 135 return code->is_keyed_load_stub() && code->ic_state() == POLYMORPHIC; |
| 136 } | 136 } |
| 137 return false; | 137 return false; |
| 138 } | 138 } |
| 139 | 139 |
| 140 | 140 |
| 141 bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) { |
| 142 Handle<Object> map_or_code = GetInfo(ast_id); |
| 143 if (map_or_code->IsMap()) return false; |
| 144 if (!map_or_code->IsCode()) return true; |
| 145 Handle<Code> code = Handle<Code>::cast(map_or_code); |
| 146 return code->ic_state() == UNINITIALIZED; |
| 147 } |
| 148 |
| 149 |
| 141 bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) { | 150 bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) { |
| 142 Handle<Object> map_or_code = GetInfo(ast_id); | 151 Handle<Object> map_or_code = GetInfo(ast_id); |
| 143 if (map_or_code->IsMap()) return true; | 152 if (map_or_code->IsMap()) return true; |
| 144 if (map_or_code->IsCode()) { | 153 if (map_or_code->IsCode()) { |
| 145 Handle<Code> code = Handle<Code>::cast(map_or_code); | 154 Handle<Code> code = Handle<Code>::cast(map_or_code); |
| 146 bool standard_store = FLAG_compiled_keyed_stores || | 155 bool standard_store = FLAG_compiled_keyed_stores || |
| 147 (Code::GetKeyedAccessStoreMode(code->extra_ic_state()) == | 156 (Code::GetKeyedAccessStoreMode(code->extra_ic_state()) == |
| 148 STANDARD_STORE); | 157 STANDARD_STORE); |
| 149 bool preliminary_checks = | 158 bool preliminary_checks = |
| 150 code->is_keyed_store_stub() && | 159 code->is_keyed_store_stub() && |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 USE(maybe_result); | 722 USE(maybe_result); |
| 714 #ifdef DEBUG | 723 #ifdef DEBUG |
| 715 Object* result = NULL; | 724 Object* result = NULL; |
| 716 // Dictionary has been allocated with sufficient size for all elements. | 725 // Dictionary has been allocated with sufficient size for all elements. |
| 717 ASSERT(maybe_result->ToObject(&result)); | 726 ASSERT(maybe_result->ToObject(&result)); |
| 718 ASSERT(*dictionary_ == result); | 727 ASSERT(*dictionary_ == result); |
| 719 #endif | 728 #endif |
| 720 } | 729 } |
| 721 | 730 |
| 722 } } // namespace v8::internal | 731 } } // namespace v8::internal |
| OLD | NEW |