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

Side by Side Diff: src/compiler/js-native-context-specialization.cc

Issue 1427583008: [turbofan] Don't lookup private symbols on prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/js-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/compilation-dependencies.h" 8 #include "src/compilation-dependencies.h"
9 #include "src/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 } 443 }
444 444
445 // Don't search on the prototype chain for special indices in case of 445 // Don't search on the prototype chain for special indices in case of
446 // integer indexed exotic objects (see ES6 section 9.4.5). 446 // integer indexed exotic objects (see ES6 section 9.4.5).
447 if (map->IsJSTypedArrayMap() && name->IsString() && 447 if (map->IsJSTypedArrayMap() && name->IsString() &&
448 IsSpecialIndex(isolate()->unicode_cache(), String::cast(*name))) { 448 IsSpecialIndex(isolate()->unicode_cache(), String::cast(*name))) {
449 return false; 449 return false;
450 } 450 }
451 451
452 // Don't lookup private symbols on the prototype chain.
453 if (name->IsPrivate()) return false;
454
452 // Walk up the prototype chain. 455 // Walk up the prototype chain.
453 if (!map->prototype()->IsJSObject()) { 456 if (!map->prototype()->IsJSObject()) {
454 // Perform the implicit ToObject for primitives here. 457 // Perform the implicit ToObject for primitives here.
455 // Implemented according to ES6 section 7.3.2 GetV (V, P). 458 // Implemented according to ES6 section 7.3.2 GetV (V, P).
456 Handle<JSFunction> constructor; 459 Handle<JSFunction> constructor;
457 if (Map::GetConstructorFunction(map, native_context()) 460 if (Map::GetConstructorFunction(map, native_context())
458 .ToHandle(&constructor)) { 461 .ToHandle(&constructor)) {
459 map = handle(constructor->initial_map(), isolate()); 462 map = handle(constructor->initial_map(), isolate());
460 DCHECK(map->prototype()->IsJSObject()); 463 DCHECK(map->prototype()->IsJSObject());
461 } else if (map->prototype()->IsNull()) { 464 } else if (map->prototype()->IsNull()) {
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 } 941 }
939 942
940 943
941 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 944 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
942 return jsgraph()->simplified(); 945 return jsgraph()->simplified();
943 } 946 }
944 947
945 } // namespace compiler 948 } // namespace compiler
946 } // namespace internal 949 } // namespace internal
947 } // namespace v8 950 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698