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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1402393003: Ensure JSProxy correctness for PrototypeIterator uses (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reword comment Created 5 years, 1 month 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/builtins.cc ('k') | src/ic/handler-compiler.cc » ('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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 7357 matching lines...) Expand 10 before | Expand all | Expand 10 after
7368 KeyedAccessStoreMode store_mode) { 7368 KeyedAccessStoreMode store_mode) {
7369 HCheckMaps* checked_object = Add<HCheckMaps>(object, map, dependency); 7369 HCheckMaps* checked_object = Add<HCheckMaps>(object, map, dependency);
7370 7370
7371 if (access_type == STORE && map->prototype()->IsJSObject()) { 7371 if (access_type == STORE && map->prototype()->IsJSObject()) {
7372 // monomorphic stores need a prototype chain check because shape 7372 // monomorphic stores need a prototype chain check because shape
7373 // changes could allow callbacks on elements in the chain that 7373 // changes could allow callbacks on elements in the chain that
7374 // aren't compatible with monomorphic keyed stores. 7374 // aren't compatible with monomorphic keyed stores.
7375 PrototypeIterator iter(map); 7375 PrototypeIterator iter(map);
7376 JSObject* holder = NULL; 7376 JSObject* holder = NULL;
7377 while (!iter.IsAtEnd()) { 7377 while (!iter.IsAtEnd()) {
7378 // JSProxies can't occur here because we wouldn't have installed a
7379 // non-generic IC if there were any.
7378 holder = *PrototypeIterator::GetCurrent<JSObject>(iter); 7380 holder = *PrototypeIterator::GetCurrent<JSObject>(iter);
7379 iter.Advance(); 7381 iter.Advance();
7380 } 7382 }
7381 DCHECK(holder && holder->IsJSObject()); 7383 DCHECK(holder && holder->IsJSObject());
7382 7384
7383 BuildCheckPrototypeMaps(handle(JSObject::cast(map->prototype())), 7385 BuildCheckPrototypeMaps(handle(JSObject::cast(map->prototype())),
7384 Handle<JSObject>(holder)); 7386 Handle<JSObject>(holder));
7385 } 7387 }
7386 7388
7387 LoadKeyedHoleMode load_mode = BuildKeyedHoleMode(map); 7389 LoadKeyedHoleMode load_mode = BuildKeyedHoleMode(map);
(...skipping 6320 matching lines...) Expand 10 before | Expand all | Expand 10 after
13708 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13710 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13709 } 13711 }
13710 13712
13711 #ifdef DEBUG 13713 #ifdef DEBUG
13712 graph_->Verify(false); // No full verify. 13714 graph_->Verify(false); // No full verify.
13713 #endif 13715 #endif
13714 } 13716 }
13715 13717
13716 } // namespace internal 13718 } // namespace internal
13717 } // namespace v8 13719 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698