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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |