| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 Register elements_map = r9; | 632 Register elements_map = r9; |
| 633 Register elements = r10; // Elements array of the receiver. | 633 Register elements = r10; // Elements array of the receiver. |
| 634 // r7 and r8 are used as general scratch registers. | 634 // r7 and r8 are used as general scratch registers. |
| 635 | 635 |
| 636 // Check that the key is a smi. | 636 // Check that the key is a smi. |
| 637 __ JumpIfNotSmi(key, &maybe_name_key); | 637 __ JumpIfNotSmi(key, &maybe_name_key); |
| 638 // Check that the object isn't a smi. | 638 // Check that the object isn't a smi. |
| 639 __ JumpIfSmi(receiver, &slow); | 639 __ JumpIfSmi(receiver, &slow); |
| 640 // Get the map of the object. | 640 // Get the map of the object. |
| 641 __ LoadP(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 641 __ LoadP(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 642 // Check that the receiver does not require access checks and is not observed. | 642 // Check that the receiver does not require access checks. |
| 643 // The generic stub does not perform map checks or handle observed objects. | 643 // The generic stub does not perform map checks. |
| 644 __ lbz(ip, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); | 644 __ lbz(ip, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); |
| 645 __ andi(r0, ip, | 645 __ andi(r0, ip, Operand(1 << Map::kIsAccessCheckNeeded)); |
| 646 Operand(1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved)); | |
| 647 __ bne(&slow, cr0); | 646 __ bne(&slow, cr0); |
| 648 // Check if the object is a JS array or not. | 647 // Check if the object is a JS array or not. |
| 649 __ lbz(r7, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); | 648 __ lbz(r7, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); |
| 650 __ cmpi(r7, Operand(JS_ARRAY_TYPE)); | 649 __ cmpi(r7, Operand(JS_ARRAY_TYPE)); |
| 651 __ beq(&array); | 650 __ beq(&array); |
| 652 // Check that the object is some kind of JSObject. | 651 // Check that the object is some kind of JSObject. |
| 653 __ cmpi(r7, Operand(FIRST_JS_OBJECT_TYPE)); | 652 __ cmpi(r7, Operand(FIRST_JS_OBJECT_TYPE)); |
| 654 __ blt(&slow); | 653 __ blt(&slow); |
| 655 | 654 |
| 656 // Object case: Check key against length in the elements array. | 655 // Object case: Check key against length in the elements array. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 patcher.EmitCondition(ne); | 886 patcher.EmitCondition(ne); |
| 888 } else { | 887 } else { |
| 889 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 888 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
| 890 patcher.EmitCondition(eq); | 889 patcher.EmitCondition(eq); |
| 891 } | 890 } |
| 892 } | 891 } |
| 893 } // namespace internal | 892 } // namespace internal |
| 894 } // namespace v8 | 893 } // namespace v8 |
| 895 | 894 |
| 896 #endif // V8_TARGET_ARCH_PPC | 895 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |