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 7222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7233 } | 7233 } |
7234 } | 7234 } |
7235 | 7235 |
7236 DCHECK(!expr->IsPropertyName()); | 7236 DCHECK(!expr->IsPropertyName()); |
7237 HInstruction* instr = NULL; | 7237 HInstruction* instr = NULL; |
7238 | 7238 |
7239 SmallMapList* types; | 7239 SmallMapList* types; |
7240 bool monomorphic = ComputeReceiverTypes(expr, obj, &types, zone()); | 7240 bool monomorphic = ComputeReceiverTypes(expr, obj, &types, zone()); |
7241 | 7241 |
7242 bool force_generic = false; | 7242 bool force_generic = false; |
7243 if (access_type == STORE && expr->GetKeyType() == PROPERTY) { | 7243 if (expr->GetKeyType() == PROPERTY) { |
7244 // Non-Generic accesses assume that elements are being accessed, and will | 7244 // Non-Generic accesses assume that elements are being accessed, and will |
7245 // deopt for non-index keys, which the IC knows will occur. | 7245 // deopt for non-index keys, which the IC knows will occur. |
7246 // TODO(jkummerow): Consider adding proper support for property accesses. | 7246 // TODO(jkummerow): Consider adding proper support for property accesses. |
7247 force_generic = true; | 7247 force_generic = true; |
7248 monomorphic = false; | 7248 monomorphic = false; |
7249 } else if (access_type == STORE && | 7249 } else if (access_type == STORE && |
7250 (monomorphic || (types != NULL && !types->is_empty()))) { | 7250 (monomorphic || (types != NULL && !types->is_empty()))) { |
7251 // Stores can't be mono/polymorphic if their prototype chain has dictionary | 7251 // Stores can't be mono/polymorphic if their prototype chain has dictionary |
7252 // elements. However a receiver map that has dictionary elements itself | 7252 // elements. However a receiver map that has dictionary elements itself |
7253 // should be left to normal mono/poly behavior (the other maps may benefit | 7253 // should be left to normal mono/poly behavior (the other maps may benefit |
(...skipping 5485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12739 if (ShouldProduceTraceOutput()) { | 12739 if (ShouldProduceTraceOutput()) { |
12740 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12740 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12741 } | 12741 } |
12742 | 12742 |
12743 #ifdef DEBUG | 12743 #ifdef DEBUG |
12744 graph_->Verify(false); // No full verify. | 12744 graph_->Verify(false); // No full verify. |
12745 #endif | 12745 #endif |
12746 } | 12746 } |
12747 | 12747 |
12748 } } // namespace v8::internal | 12748 } } // namespace v8::internal |
OLD | NEW |