OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "hydrogen.h" | 5 #include "hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "v8.h" | 9 #include "v8.h" |
10 #include "allocation-site-scopes.h" | 10 #include "allocation-site-scopes.h" |
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2141 HValue* elements = AddLoadElements(checked_object); | 2141 HValue* elements = AddLoadElements(checked_object); |
2142 if (access_type == STORE && (fast_elements || fast_smi_only_elements) && | 2142 if (access_type == STORE && (fast_elements || fast_smi_only_elements) && |
2143 store_mode != STORE_NO_TRANSITION_HANDLE_COW) { | 2143 store_mode != STORE_NO_TRANSITION_HANDLE_COW) { |
2144 HCheckMaps* check_cow_map = Add<HCheckMaps>( | 2144 HCheckMaps* check_cow_map = Add<HCheckMaps>( |
2145 elements, isolate()->factory()->fixed_array_map(), top_info()); | 2145 elements, isolate()->factory()->fixed_array_map(), top_info()); |
2146 check_cow_map->ClearDependsOnFlag(kElementsKind); | 2146 check_cow_map->ClearDependsOnFlag(kElementsKind); |
2147 } | 2147 } |
2148 HInstruction* length = NULL; | 2148 HInstruction* length = NULL; |
2149 if (is_js_array) { | 2149 if (is_js_array) { |
2150 length = Add<HLoadNamedField>( | 2150 length = Add<HLoadNamedField>( |
2151 checked_object, static_cast<HValue*>(NULL), | 2151 checked_object->ActualValue(), checked_object, |
2152 HObjectAccess::ForArrayLength(elements_kind)); | 2152 HObjectAccess::ForArrayLength(elements_kind)); |
2153 } else { | 2153 } else { |
2154 length = AddLoadFixedArrayLength(elements); | 2154 length = AddLoadFixedArrayLength(elements); |
2155 } | 2155 } |
2156 length->set_type(HType::Smi()); | 2156 length->set_type(HType::Smi()); |
2157 HValue* checked_key = NULL; | 2157 HValue* checked_key = NULL; |
2158 if (IsExternalArrayElementsKind(elements_kind) || | 2158 if (IsExternalArrayElementsKind(elements_kind) || |
2159 IsFixedTypedArrayElementsKind(elements_kind)) { | 2159 IsFixedTypedArrayElementsKind(elements_kind)) { |
2160 HValue* backing_store; | 2160 HValue* backing_store; |
2161 if (IsExternalArrayElementsKind(elements_kind)) { | 2161 if (IsExternalArrayElementsKind(elements_kind)) { |
(...skipping 9505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11667 if (ShouldProduceTraceOutput()) { | 11667 if (ShouldProduceTraceOutput()) { |
11668 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11668 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11669 } | 11669 } |
11670 | 11670 |
11671 #ifdef DEBUG | 11671 #ifdef DEBUG |
11672 graph_->Verify(false); // No full verify. | 11672 graph_->Verify(false); // No full verify. |
11673 #endif | 11673 #endif |
11674 } | 11674 } |
11675 | 11675 |
11676 } } // namespace v8::internal | 11676 } } // namespace v8::internal |
OLD | NEW |