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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 849 |
850 // Check that the object isn't a smi. | 850 // Check that the object isn't a smi. |
851 __ JumpIfSmi(edx, &slow); | 851 __ JumpIfSmi(edx, &slow); |
852 // Get the map from the receiver. | 852 // Get the map from the receiver. |
853 __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset)); | 853 __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset)); |
854 // Check that the receiver does not require access checks. We need | 854 // Check that the receiver does not require access checks. We need |
855 // to do this because this generic stub does not perform map checks. | 855 // to do this because this generic stub does not perform map checks. |
856 __ test_b(FieldOperand(edi, Map::kBitFieldOffset), | 856 __ test_b(FieldOperand(edi, Map::kBitFieldOffset), |
857 1 << Map::kIsAccessCheckNeeded); | 857 1 << Map::kIsAccessCheckNeeded); |
858 __ j(not_zero, &slow); | 858 __ j(not_zero, &slow); |
| 859 // Check that the receiver is not observed. Observed objects are always |
| 860 // handled by the runtime. |
| 861 __ test_b(FieldOperand(edi, Map::kBitFieldOffset), |
| 862 1 << Map::kIsObserved); |
| 863 __ j(not_zero, &slow); |
859 // Check that the key is a smi. | 864 // Check that the key is a smi. |
860 __ JumpIfNotSmi(ecx, &slow); | 865 __ JumpIfNotSmi(ecx, &slow); |
861 __ CmpInstanceType(edi, JS_ARRAY_TYPE); | 866 __ CmpInstanceType(edi, JS_ARRAY_TYPE); |
862 __ j(equal, &array); | 867 __ j(equal, &array); |
863 // Check that the object is some kind of JSObject. | 868 // Check that the object is some kind of JSObject. |
864 __ CmpInstanceType(edi, FIRST_JS_OBJECT_TYPE); | 869 __ CmpInstanceType(edi, FIRST_JS_OBJECT_TYPE); |
865 __ j(below, &slow); | 870 __ j(below, &slow); |
866 | 871 |
867 // Object case: Check key against length in the elements array. | 872 // Object case: Check key against length in the elements array. |
868 // eax: value | 873 // eax: value |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1663 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1659 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1664 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1660 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1665 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1661 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1666 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1662 } | 1667 } |
1663 | 1668 |
1664 | 1669 |
1665 } } // namespace v8::internal | 1670 } } // namespace v8::internal |
1666 | 1671 |
1667 #endif // V8_TARGET_ARCH_IA32 | 1672 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |