| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 Register elements_map = a6; | 615 Register elements_map = a6; |
| 616 Register elements = a7; // Elements array of the receiver. | 616 Register elements = a7; // Elements array of the receiver. |
| 617 // a4 and a5 are used as general scratch registers. | 617 // a4 and a5 are used as general scratch registers. |
| 618 | 618 |
| 619 // Check that the key is a smi. | 619 // Check that the key is a smi. |
| 620 __ JumpIfNotSmi(key, &maybe_name_key); | 620 __ JumpIfNotSmi(key, &maybe_name_key); |
| 621 // Check that the object isn't a smi. | 621 // Check that the object isn't a smi. |
| 622 __ JumpIfSmi(receiver, &slow); | 622 __ JumpIfSmi(receiver, &slow); |
| 623 // Get the map of the object. | 623 // Get the map of the object. |
| 624 __ ld(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 624 __ ld(receiver_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 625 // Check that the receiver does not require access checks and is not observed. | 625 // Check that the receiver does not require access checks. |
| 626 // The generic stub does not perform map checks or handle observed objects. | 626 // The generic stub does not perform map checks. |
| 627 __ lbu(a4, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); | 627 __ lbu(a4, FieldMemOperand(receiver_map, Map::kBitFieldOffset)); |
| 628 __ And(a4, a4, | 628 __ And(a4, a4, Operand(1 << Map::kIsAccessCheckNeeded)); |
| 629 Operand(1 << Map::kIsAccessCheckNeeded | 1 << Map::kIsObserved)); | |
| 630 __ Branch(&slow, ne, a4, Operand(zero_reg)); | 629 __ Branch(&slow, ne, a4, Operand(zero_reg)); |
| 631 // Check if the object is a JS array or not. | 630 // Check if the object is a JS array or not. |
| 632 __ lbu(a4, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); | 631 __ lbu(a4, FieldMemOperand(receiver_map, Map::kInstanceTypeOffset)); |
| 633 __ Branch(&array, eq, a4, Operand(JS_ARRAY_TYPE)); | 632 __ Branch(&array, eq, a4, Operand(JS_ARRAY_TYPE)); |
| 634 // Check that the object is some kind of JSObject. | 633 // Check that the object is some kind of JSObject. |
| 635 __ Branch(&slow, lt, a4, Operand(FIRST_JS_OBJECT_TYPE)); | 634 __ Branch(&slow, lt, a4, Operand(FIRST_JS_OBJECT_TYPE)); |
| 636 | 635 |
| 637 // Object case: Check key against length in the elements array. | 636 // Object case: Check key against length in the elements array. |
| 638 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 637 __ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
| 639 // Check array bounds. Both the key and the length of FixedArray are smis. | 638 // Check array bounds. Both the key and the length of FixedArray are smis. |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 break; | 903 break; |
| 905 default: | 904 default: |
| 906 UNIMPLEMENTED(); | 905 UNIMPLEMENTED(); |
| 907 } | 906 } |
| 908 patcher.ChangeBranchCondition(branch_instr, opcode); | 907 patcher.ChangeBranchCondition(branch_instr, opcode); |
| 909 } | 908 } |
| 910 } // namespace internal | 909 } // namespace internal |
| 911 } // namespace v8 | 910 } // namespace v8 |
| 912 | 911 |
| 913 #endif // V8_TARGET_ARCH_MIPS64 | 912 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |