Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: src/hydrogen.cc

Issue 267773004: Pass dependency to HLoadNamedField for array length load (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698