OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), | 617 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), |
618 Immediate(1 << Map::kIsAccessCheckNeeded)); | 618 Immediate(1 << Map::kIsAccessCheckNeeded)); |
619 __ j(not_zero, &slow_with_tagged_index); | 619 __ j(not_zero, &slow_with_tagged_index); |
620 // Check that the key is a smi. | 620 // Check that the key is a smi. |
621 __ JumpIfNotSmi(rcx, &slow_with_tagged_index); | 621 __ JumpIfNotSmi(rcx, &slow_with_tagged_index); |
622 __ SmiToInteger32(rcx, rcx); | 622 __ SmiToInteger32(rcx, rcx); |
623 | 623 |
624 __ CmpInstanceType(rbx, JS_ARRAY_TYPE); | 624 __ CmpInstanceType(rbx, JS_ARRAY_TYPE); |
625 __ j(equal, &array); | 625 __ j(equal, &array); |
626 // Check that the object is some kind of JSObject. | 626 // Check that the object is some kind of JSObject. |
627 __ CmpInstanceType(rbx, FIRST_JS_RECEIVER_TYPE); | 627 __ CmpInstanceType(rbx, FIRST_JS_OBJECT_TYPE); |
628 __ j(below, &slow); | 628 __ j(below, &slow); |
629 __ CmpInstanceType(rbx, JS_PROXY_TYPE); | |
630 __ j(equal, &slow); | |
631 __ CmpInstanceType(rbx, JS_FUNCTION_PROXY_TYPE); | |
632 __ j(equal, &slow); | |
633 | 629 |
634 // Object case: Check key against length in the elements array. | 630 // Object case: Check key against length in the elements array. |
635 // rax: value | 631 // rax: value |
636 // rdx: JSObject | 632 // rdx: JSObject |
637 // rcx: index | 633 // rcx: index |
638 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); | 634 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); |
639 // Check that the object is in fast mode and writable. | 635 // Check that the object is in fast mode and writable. |
640 __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset), | 636 __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset), |
641 Heap::kFixedArrayMapRootIndex); | 637 Heap::kFixedArrayMapRootIndex); |
642 __ j(not_equal, &slow); | 638 __ j(not_equal, &slow); |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1676 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1681 ? not_zero | 1677 ? not_zero |
1682 : zero; | 1678 : zero; |
1683 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1679 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1684 } | 1680 } |
1685 | 1681 |
1686 | 1682 |
1687 } } // namespace v8::internal | 1683 } } // namespace v8::internal |
1688 | 1684 |
1689 #endif // V8_TARGET_ARCH_X64 | 1685 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |