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

Side by Side Diff: src/ic/ppc/handler-compiler-ppc.cc

Issue 2455953002: [ic] Remove unnecessary access rights checks from the IC handlers. (Closed)
Patch Set: Addressing comments and rebasing Created 4 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/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/s390/handler-compiler-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #if V8_TARGET_ARCH_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 436 }
437 437
438 // Keep track of the current object in register reg. 438 // Keep track of the current object in register reg.
439 Register reg = object_reg; 439 Register reg = object_reg;
440 int depth = 0; 440 int depth = 0;
441 441
442 Handle<JSObject> current = Handle<JSObject>::null(); 442 Handle<JSObject> current = Handle<JSObject>::null();
443 if (receiver_map->IsJSGlobalObjectMap()) { 443 if (receiver_map->IsJSGlobalObjectMap()) {
444 current = isolate()->global_object(); 444 current = isolate()->global_object();
445 } 445 }
446 // Check access rights to the global object. This has to happen after
447 // the map check so that we know that the object is actually a global
448 // object.
449 // This allows us to install generated handlers for accesses to the
450 // global proxy (as opposed to using slow ICs). See corresponding code
451 // in LookupForRead().
452 if (receiver_map->IsJSGlobalProxyMap()) {
453 __ CheckAccessGlobalProxy(reg, scratch2, miss);
454 }
455 446
456 Handle<JSObject> prototype = Handle<JSObject>::null(); 447 Handle<JSObject> prototype = Handle<JSObject>::null();
457 Handle<Map> current_map = receiver_map; 448 Handle<Map> current_map = receiver_map;
458 Handle<Map> holder_map(holder()->map()); 449 Handle<Map> holder_map(holder()->map());
459 // Traverse the prototype chain and check the maps in the prototype chain for 450 // Traverse the prototype chain and check the maps in the prototype chain for
460 // fast and global objects or do negative lookup for normal objects. 451 // fast and global objects or do negative lookup for normal objects.
461 while (!current_map.is_identical_to(holder_map)) { 452 while (!current_map.is_identical_to(holder_map)) {
462 ++depth; 453 ++depth;
463 454
464 // Only global objects and objects that do not require access 455 // Only global objects and objects that do not require access
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 // Return the generated code. 674 // Return the generated code.
684 return GetCode(kind(), name); 675 return GetCode(kind(), name);
685 } 676 }
686 677
687 678
688 #undef __ 679 #undef __
689 } // namespace internal 680 } // namespace internal
690 } // namespace v8 681 } // namespace v8
691 682
692 #endif // V8_TARGET_ARCH_ARM 683 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/s390/handler-compiler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698