| 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 6696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6707 if (current_map->DictionaryElementsInPrototypeChainOnly()) { | 6707 if (current_map->DictionaryElementsInPrototypeChainOnly()) { |
| 6708 force_generic = true; | 6708 force_generic = true; |
| 6709 monomorphic = false; | 6709 monomorphic = false; |
| 6710 break; | 6710 break; |
| 6711 } | 6711 } |
| 6712 } | 6712 } |
| 6713 } | 6713 } |
| 6714 | 6714 |
| 6715 if (monomorphic) { | 6715 if (monomorphic) { |
| 6716 Handle<Map> map = types->first(); | 6716 Handle<Map> map = types->first(); |
| 6717 if (map->has_slow_elements_kind()) { | 6717 if (map->has_slow_elements_kind() || !map->IsJSObjectMap()) { |
| 6718 instr = is_store ? BuildStoreKeyedGeneric(obj, key, val) | 6718 instr = is_store ? BuildStoreKeyedGeneric(obj, key, val) |
| 6719 : BuildLoadKeyedGeneric(obj, key); | 6719 : BuildLoadKeyedGeneric(obj, key); |
| 6720 AddInstruction(instr); | 6720 AddInstruction(instr); |
| 6721 } else { | 6721 } else { |
| 6722 BuildCheckHeapObject(obj); | 6722 BuildCheckHeapObject(obj); |
| 6723 instr = BuildMonomorphicElementAccess( | 6723 instr = BuildMonomorphicElementAccess( |
| 6724 obj, key, val, NULL, map, is_store, expr->GetStoreMode()); | 6724 obj, key, val, NULL, map, is_store, expr->GetStoreMode()); |
| 6725 } | 6725 } |
| 6726 } else if (!force_generic && (types != NULL && !types->is_empty())) { | 6726 } else if (!force_generic && (types != NULL && !types->is_empty())) { |
| 6727 return HandlePolymorphicElementAccess( | 6727 return HandlePolymorphicElementAccess( |
| (...skipping 4732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11460 if (ShouldProduceTraceOutput()) { | 11460 if (ShouldProduceTraceOutput()) { |
| 11461 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11461 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11462 } | 11462 } |
| 11463 | 11463 |
| 11464 #ifdef DEBUG | 11464 #ifdef DEBUG |
| 11465 graph_->Verify(false); // No full verify. | 11465 graph_->Verify(false); // No full verify. |
| 11466 #endif | 11466 #endif |
| 11467 } | 11467 } |
| 11468 | 11468 |
| 11469 } } // namespace v8::internal | 11469 } } // namespace v8::internal |
| OLD | NEW |