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

Side by Side Diff: src/hydrogen.cc

Issue 751513002: Assert to protect against polymorphic string loads fires on valid stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | test/mjsunit/regress/regress-435477.js » ('j') | 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 "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 7076 matching lines...) Expand 10 before | Expand all | Expand 10 after
7087 return consolidated_load; 7087 return consolidated_load;
7088 } 7088 }
7089 } 7089 }
7090 7090
7091 // Elements_kind transition support. 7091 // Elements_kind transition support.
7092 MapHandleList transition_target(maps->length()); 7092 MapHandleList transition_target(maps->length());
7093 // Collect possible transition targets. 7093 // Collect possible transition targets.
7094 MapHandleList possible_transitioned_maps(maps->length()); 7094 MapHandleList possible_transitioned_maps(maps->length());
7095 for (int i = 0; i < maps->length(); ++i) { 7095 for (int i = 0; i < maps->length(); ++i) {
7096 Handle<Map> map = maps->at(i); 7096 Handle<Map> map = maps->at(i);
7097 DCHECK(!map->IsStringMap()); 7097 // Loads from strings or loads with a mix of string and non-string maps
7098 // shouldn't be handled polymorphically.
7099 DCHECK(access_type != LOAD || !map->IsStringMap());
7098 ElementsKind elements_kind = map->elements_kind(); 7100 ElementsKind elements_kind = map->elements_kind();
7099 if (CanInlineElementAccess(map) && IsFastElementsKind(elements_kind) && 7101 if (CanInlineElementAccess(map) && IsFastElementsKind(elements_kind) &&
7100 elements_kind != GetInitialFastElementsKind()) { 7102 elements_kind != GetInitialFastElementsKind()) {
7101 possible_transitioned_maps.Add(map); 7103 possible_transitioned_maps.Add(map);
7102 } 7104 }
7103 if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) { 7105 if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) {
7104 HInstruction* result = BuildKeyedGeneric(access_type, expr, object, key, 7106 HInstruction* result = BuildKeyedGeneric(access_type, expr, object, key,
7105 val); 7107 val);
7106 *has_side_effects = result->HasObservableSideEffects(); 7108 *has_side_effects = result->HasObservableSideEffects();
7107 return AddInstruction(result); 7109 return AddInstruction(result);
(...skipping 5625 matching lines...) Expand 10 before | Expand all | Expand 10 after
12733 if (ShouldProduceTraceOutput()) { 12735 if (ShouldProduceTraceOutput()) {
12734 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12736 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12735 } 12737 }
12736 12738
12737 #ifdef DEBUG 12739 #ifdef DEBUG
12738 graph_->Verify(false); // No full verify. 12740 graph_->Verify(false); // No full verify.
12739 #endif 12741 #endif
12740 } 12742 }
12741 12743
12742 } } // namespace v8::internal 12744 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-435477.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698