| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 // If probing finds an entry in the dictionary, scratch0 contains the | 113 // If probing finds an entry in the dictionary, scratch0 contains the |
| 114 // index into the dictionary. Check that the value is a normal | 114 // index into the dictionary. Check that the value is a normal |
| 115 // property that is not read only. | 115 // property that is not read only. |
| 116 __ bind(&done); | 116 __ bind(&done); |
| 117 const int kElementsStartOffset = | 117 const int kElementsStartOffset = |
| 118 NameDictionary::kHeaderSize + | 118 NameDictionary::kHeaderSize + |
| 119 NameDictionary::kElementsStartIndex * kPointerSize; | 119 NameDictionary::kElementsStartIndex * kPointerSize; |
| 120 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; | 120 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
| 121 const int kTypeAndReadOnlyMask = | 121 const int kTypeAndReadOnlyMask = |
| 122 (PropertyDetails::TypeField::kMask | | 122 PropertyDetails::TypeField::kMask | |
| 123 PropertyDetails::AttributesField::encode(READ_ONLY)) | 123 PropertyDetails::AttributesField::encode(READ_ONLY); |
| 124 << kSmiTagSize; | |
| 125 __ Test(Operand(elements, scratch1, times_pointer_size, | 124 __ Test(Operand(elements, scratch1, times_pointer_size, |
| 126 kDetailsOffset - kHeapObjectTag), | 125 kDetailsOffset - kHeapObjectTag), |
| 127 Smi::FromInt(kTypeAndReadOnlyMask)); | 126 Smi::FromInt(kTypeAndReadOnlyMask)); |
| 128 __ j(not_zero, miss_label); | 127 __ j(not_zero, miss_label); |
| 129 | 128 |
| 130 // Store the value at the masked, scaled index. | 129 // Store the value at the masked, scaled index. |
| 131 const int kValueOffset = kElementsStartOffset + kPointerSize; | 130 const int kValueOffset = kElementsStartOffset + kPointerSize; |
| 132 __ leap(scratch1, Operand(elements, scratch1, times_pointer_size, | 131 __ leap(scratch1, Operand(elements, scratch1, times_pointer_size, |
| 133 kValueOffset - kHeapObjectTag)); | 132 kValueOffset - kHeapObjectTag)); |
| 134 __ movp(Operand(scratch1, 0), value); | 133 __ movp(Operand(scratch1, 0), value); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 Condition cc = | 969 Condition cc = |
| 971 (check == ENABLE_INLINED_SMI_CHECK) | 970 (check == ENABLE_INLINED_SMI_CHECK) |
| 972 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 971 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 973 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 972 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 974 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 973 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 975 } | 974 } |
| 976 } | 975 } |
| 977 } // namespace v8::internal | 976 } // namespace v8::internal |
| 978 | 977 |
| 979 #endif // V8_TARGET_ARCH_X64 | 978 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |