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

Side by Side Diff: src/hydrogen.cc

Issue 755513003: Hydrogen: fix keyed loads with string keys (Closed) Base URL: gh:v8/v8@master
Patch Set: fixes 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 | « src/ast.h ('k') | src/ic/ic.h » ('j') | src/ic/ic.h » ('J')
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 7222 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ic/ic.h » ('j') | src/ic/ic.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698