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 5679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5690 | 5690 |
5691 set_current_block(this_map); | 5691 set_current_block(this_map); |
5692 HInstruction* checked_key = NULL; | 5692 HInstruction* checked_key = NULL; |
5693 HInstruction* access = NULL; | 5693 HInstruction* access = NULL; |
5694 if (IsFastElementsKind(elements_kind)) { | 5694 if (IsFastElementsKind(elements_kind)) { |
5695 if (is_store && !IsFastDoubleElementsKind(elements_kind)) { | 5695 if (is_store && !IsFastDoubleElementsKind(elements_kind)) { |
5696 AddInstruction(HCheckMaps::New( | 5696 AddInstruction(HCheckMaps::New( |
5697 elements, isolate()->factory()->fixed_array_map(), | 5697 elements, isolate()->factory()->fixed_array_map(), |
5698 zone(), top_info(), mapcompare)); | 5698 zone(), top_info(), mapcompare)); |
5699 } | 5699 } |
5700 if (map->IsJSArray()) { | 5700 if (map->instance_type() == JS_ARRAY_TYPE) { |
5701 HInstruction* length = AddLoad(object, HObjectAccess::ForArrayLength(), | 5701 HInstruction* length = AddLoad(object, HObjectAccess::ForArrayLength(), |
5702 mapcompare, Representation::Smi()); | 5702 mapcompare, Representation::Smi()); |
5703 length->set_type(HType::Smi()); | 5703 length->set_type(HType::Smi()); |
5704 checked_key = Add<HBoundsCheck>(key, length); | 5704 checked_key = Add<HBoundsCheck>(key, length); |
5705 } else { | 5705 } else { |
5706 HInstruction* length = AddLoadFixedArrayLength(elements); | 5706 HInstruction* length = AddLoadFixedArrayLength(elements); |
5707 checked_key = Add<HBoundsCheck>(key, length); | 5707 checked_key = Add<HBoundsCheck>(key, length); |
5708 } | 5708 } |
5709 access = AddFastElementAccess( | 5709 access = AddFastElementAccess( |
5710 elements, checked_key, val, mapcompare, | 5710 elements, checked_key, val, mapcompare, |
(...skipping 4245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9956 if (ShouldProduceTraceOutput()) { | 9956 if (ShouldProduceTraceOutput()) { |
9957 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9957 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9958 } | 9958 } |
9959 | 9959 |
9960 #ifdef DEBUG | 9960 #ifdef DEBUG |
9961 graph_->Verify(false); // No full verify. | 9961 graph_->Verify(false); // No full verify. |
9962 #endif | 9962 #endif |
9963 } | 9963 } |
9964 | 9964 |
9965 } } // namespace v8::internal | 9965 } } // namespace v8::internal |
OLD | NEW |