OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 | 723 |
724 // Check that the object isn't a smi. | 724 // Check that the object isn't a smi. |
725 __ JumpIfSmi(rdx, &slow_with_tagged_index); | 725 __ JumpIfSmi(rdx, &slow_with_tagged_index); |
726 // Get the map from the receiver. | 726 // Get the map from the receiver. |
727 __ movq(r9, FieldOperand(rdx, HeapObject::kMapOffset)); | 727 __ movq(r9, FieldOperand(rdx, HeapObject::kMapOffset)); |
728 // Check that the receiver does not require access checks. We need | 728 // Check that the receiver does not require access checks. We need |
729 // to do this because this generic stub does not perform map checks. | 729 // to do this because this generic stub does not perform map checks. |
730 __ testb(FieldOperand(r9, Map::kBitFieldOffset), | 730 __ testb(FieldOperand(r9, Map::kBitFieldOffset), |
731 Immediate(1 << Map::kIsAccessCheckNeeded)); | 731 Immediate(1 << Map::kIsAccessCheckNeeded)); |
732 __ j(not_zero, &slow_with_tagged_index); | 732 __ j(not_zero, &slow_with_tagged_index); |
| 733 // Check that the receiver is not observed. Observed objects are always |
| 734 // handled by the runtime. |
| 735 __ testb(FieldOperand(r9, Map::kBitFieldOffset), |
| 736 Immediate(1 << Map::kIsObserved)); |
| 737 __ j(not_zero, &slow_with_tagged_index); |
733 // Check that the key is a smi. | 738 // Check that the key is a smi. |
734 __ JumpIfNotSmi(rcx, &slow_with_tagged_index); | 739 __ JumpIfNotSmi(rcx, &slow_with_tagged_index); |
735 __ SmiToInteger32(rcx, rcx); | 740 __ SmiToInteger32(rcx, rcx); |
736 | 741 |
737 __ CmpInstanceType(r9, JS_ARRAY_TYPE); | 742 __ CmpInstanceType(r9, JS_ARRAY_TYPE); |
738 __ j(equal, &array); | 743 __ j(equal, &array); |
739 // Check that the object is some kind of JSObject. | 744 // Check that the object is some kind of JSObject. |
740 __ CmpInstanceType(r9, FIRST_JS_OBJECT_TYPE); | 745 __ CmpInstanceType(r9, FIRST_JS_OBJECT_TYPE); |
741 __ j(below, &slow); | 746 __ j(below, &slow); |
742 | 747 |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1683 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1679 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1684 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1680 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1685 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1681 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1686 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1682 } | 1687 } |
1683 | 1688 |
1684 | 1689 |
1685 } } // namespace v8::internal | 1690 } } // namespace v8::internal |
1686 | 1691 |
1687 #endif // V8_TARGET_ARCH_X64 | 1692 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |