OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |