| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // If probing finds an entry in the dictionary, r0 contains the | 138 // If probing finds an entry in the dictionary, r0 contains the |
| 139 // index into the dictionary. Check that the value is a normal | 139 // index into the dictionary. Check that the value is a normal |
| 140 // property. | 140 // property. |
| 141 __ bind(&done); | 141 __ bind(&done); |
| 142 const int kElementsStartOffset = | 142 const int kElementsStartOffset = |
| 143 StringDictionary::kHeaderSize + | 143 StringDictionary::kHeaderSize + |
| 144 StringDictionary::kElementsStartIndex * kPointerSize; | 144 StringDictionary::kElementsStartIndex * kPointerSize; |
| 145 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; | 145 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
| 146 __ Test(Operand(elements, r1, times_pointer_size, | 146 __ Test(Operand(elements, r1, times_pointer_size, |
| 147 kDetailsOffset - kHeapObjectTag), | 147 kDetailsOffset - kHeapObjectTag), |
| 148 Smi::FromInt(PropertyDetails::TypeField::mask())); | 148 Smi::FromInt(PropertyDetails::TypeField::kMask)); |
| 149 __ j(not_zero, miss_label); | 149 __ j(not_zero, miss_label); |
| 150 | 150 |
| 151 // Get the value at the masked, scaled index. | 151 // Get the value at the masked, scaled index. |
| 152 const int kValueOffset = kElementsStartOffset + kPointerSize; | 152 const int kValueOffset = kElementsStartOffset + kPointerSize; |
| 153 __ movq(result, | 153 __ movq(result, |
| 154 Operand(elements, r1, times_pointer_size, | 154 Operand(elements, r1, times_pointer_size, |
| 155 kValueOffset - kHeapObjectTag)); | 155 kValueOffset - kHeapObjectTag)); |
| 156 } | 156 } |
| 157 | 157 |
| 158 | 158 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 scratch1); | 194 scratch1); |
| 195 | 195 |
| 196 // If probing finds an entry in the dictionary, scratch0 contains the | 196 // If probing finds an entry in the dictionary, scratch0 contains the |
| 197 // index into the dictionary. Check that the value is a normal | 197 // index into the dictionary. Check that the value is a normal |
| 198 // property that is not read only. | 198 // property that is not read only. |
| 199 __ bind(&done); | 199 __ bind(&done); |
| 200 const int kElementsStartOffset = | 200 const int kElementsStartOffset = |
| 201 StringDictionary::kHeaderSize + | 201 StringDictionary::kHeaderSize + |
| 202 StringDictionary::kElementsStartIndex * kPointerSize; | 202 StringDictionary::kElementsStartIndex * kPointerSize; |
| 203 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; | 203 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
| 204 const int kTypeAndReadOnlyMask | 204 const int kTypeAndReadOnlyMask = |
| 205 = (PropertyDetails::TypeField::mask() | | 205 (PropertyDetails::TypeField::kMask | |
| 206 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; | 206 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; |
| 207 __ Test(Operand(elements, | 207 __ Test(Operand(elements, |
| 208 scratch1, | 208 scratch1, |
| 209 times_pointer_size, | 209 times_pointer_size, |
| 210 kDetailsOffset - kHeapObjectTag), | 210 kDetailsOffset - kHeapObjectTag), |
| 211 Smi::FromInt(kTypeAndReadOnlyMask)); | 211 Smi::FromInt(kTypeAndReadOnlyMask)); |
| 212 __ j(not_zero, miss_label); | 212 __ j(not_zero, miss_label); |
| 213 | 213 |
| 214 // Store the value at the masked, scaled index. | 214 // Store the value at the masked, scaled index. |
| 215 const int kValueOffset = kElementsStartOffset + kPointerSize; | 215 const int kValueOffset = kElementsStartOffset + kPointerSize; |
| 216 __ lea(scratch1, Operand(elements, | 216 __ lea(scratch1, Operand(elements, |
| (...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1662 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1663 ? not_zero | 1663 ? not_zero |
| 1664 : zero; | 1664 : zero; |
| 1665 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1665 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1666 } | 1666 } |
| 1667 | 1667 |
| 1668 | 1668 |
| 1669 } } // namespace v8::internal | 1669 } } // namespace v8::internal |
| 1670 | 1670 |
| 1671 #endif // V8_TARGET_ARCH_X64 | 1671 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |