| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 | 117 |
| 118 bool TypeFeedbackOracle::StoreIsMegamorphicWithTypeInfo(Expression* expr) { | 118 bool TypeFeedbackOracle::StoreIsMegamorphicWithTypeInfo(Expression* expr) { |
| 119 Handle<Object> map_or_code(GetInfo(expr->id())); | 119 Handle<Object> map_or_code(GetInfo(expr->id())); |
| 120 if (map_or_code->IsCode()) { | 120 if (map_or_code->IsCode()) { |
| 121 Handle<Code> code = Handle<Code>::cast(map_or_code); | 121 Handle<Code> code = Handle<Code>::cast(map_or_code); |
| 122 Builtins* builtins = Isolate::Current()->builtins(); | 122 Builtins* builtins = Isolate::Current()->builtins(); |
| 123 return code->is_keyed_store_stub() && | 123 return code->is_keyed_store_stub() && |
| 124 *code != builtins->builtin(Builtins::kKeyedStoreIC_Generic) && | 124 *code != builtins->builtin(Builtins::kKeyedStoreIC_Generic) && |
| 125 *code != builtins->builtin(Builtins::kKeyedStoreIC_Generic_Strict) && |
| 125 code->ic_state() == MEGAMORPHIC; | 126 code->ic_state() == MEGAMORPHIC; |
| 126 } | 127 } |
| 127 return false; | 128 return false; |
| 128 } | 129 } |
| 129 | 130 |
| 130 | 131 |
| 131 bool TypeFeedbackOracle::CallIsMonomorphic(Call* expr) { | 132 bool TypeFeedbackOracle::CallIsMonomorphic(Call* expr) { |
| 132 Handle<Object> value = GetInfo(expr->id()); | 133 Handle<Object> value = GetInfo(expr->id()); |
| 133 return value->IsMap() || value->IsSmi(); | 134 return value->IsMap() || value->IsSmi(); |
| 134 } | 135 } |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 USE(maybe_result); | 538 USE(maybe_result); |
| 538 #ifdef DEBUG | 539 #ifdef DEBUG |
| 539 Object* result = NULL; | 540 Object* result = NULL; |
| 540 // Dictionary has been allocated with sufficient size for all elements. | 541 // Dictionary has been allocated with sufficient size for all elements. |
| 541 ASSERT(maybe_result->ToObject(&result)); | 542 ASSERT(maybe_result->ToObject(&result)); |
| 542 ASSERT(*dictionary_ == result); | 543 ASSERT(*dictionary_ == result); |
| 543 #endif | 544 #endif |
| 544 } | 545 } |
| 545 | 546 |
| 546 } } // namespace v8::internal | 547 } } // namespace v8::internal |
| OLD | NEW |