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 7197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7208 } | 7208 } |
7209 } | 7209 } |
7210 | 7210 |
7211 DCHECK(!expr->IsPropertyName()); | 7211 DCHECK(!expr->IsPropertyName()); |
7212 HInstruction* instr = NULL; | 7212 HInstruction* instr = NULL; |
7213 | 7213 |
7214 SmallMapList* types; | 7214 SmallMapList* types; |
7215 bool monomorphic = ComputeReceiverTypes(expr, obj, &types, zone()); | 7215 bool monomorphic = ComputeReceiverTypes(expr, obj, &types, zone()); |
7216 | 7216 |
7217 bool force_generic = false; | 7217 bool force_generic = false; |
7218 if (access_type == STORE && expr->GetKeyType() == PROPERTY) { | 7218 if (expr->GetKeyType() == PROPERTY) { |
7219 // Non-Generic accesses assume that elements are being accessed, and will | 7219 // Non-Generic accesses assume that elements are being accessed, and will |
7220 // deopt for non-index keys, which the IC knows will occur. | 7220 // deopt for non-index keys, which the IC knows will occur. |
7221 // TODO(jkummerow): Consider adding proper support for property accesses. | 7221 // TODO(jkummerow): Consider adding proper support for property accesses. |
7222 force_generic = true; | 7222 force_generic = true; |
7223 monomorphic = false; | 7223 monomorphic = false; |
7224 } else if (access_type == STORE && | 7224 } else if (access_type == STORE && |
7225 (monomorphic || (types != NULL && !types->is_empty()))) { | 7225 (monomorphic || (types != NULL && !types->is_empty()))) { |
7226 // Stores can't be mono/polymorphic if their prototype chain has dictionary | 7226 // Stores can't be mono/polymorphic if their prototype chain has dictionary |
7227 // elements. However a receiver map that has dictionary elements itself | 7227 // elements. However a receiver map that has dictionary elements itself |
7228 // should be left to normal mono/poly behavior (the other maps may benefit | 7228 // should be left to normal mono/poly behavior (the other maps may benefit |
(...skipping 6206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13435 if (ShouldProduceTraceOutput()) { | 13435 if (ShouldProduceTraceOutput()) { |
13436 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13436 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13437 } | 13437 } |
13438 | 13438 |
13439 #ifdef DEBUG | 13439 #ifdef DEBUG |
13440 graph_->Verify(false); // No full verify. | 13440 graph_->Verify(false); // No full verify. |
13441 #endif | 13441 #endif |
13442 } | 13442 } |
13443 | 13443 |
13444 } } // namespace v8::internal | 13444 } } // namespace v8::internal |
OLD | NEW |