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_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 times_pointer_size, | 1314 times_pointer_size, |
1315 SeededNumberDictionary::kElementsStartOffset)); | 1315 SeededNumberDictionary::kElementsStartOffset)); |
1316 if (i != (kNumberDictionaryProbes - 1)) { | 1316 if (i != (kNumberDictionaryProbes - 1)) { |
1317 j(equal, &done); | 1317 j(equal, &done); |
1318 } else { | 1318 } else { |
1319 j(not_equal, miss); | 1319 j(not_equal, miss); |
1320 } | 1320 } |
1321 } | 1321 } |
1322 | 1322 |
1323 bind(&done); | 1323 bind(&done); |
1324 // Check that the value is a normal propety. | 1324 // Check that the value is a field property. |
1325 const int kDetailsOffset = | 1325 const int kDetailsOffset = |
1326 SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize; | 1326 SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize; |
1327 DCHECK_EQ(NORMAL, 0); | 1327 DCHECK_EQ(FIELD, 0); |
1328 test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset), | 1328 test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset), |
1329 Immediate(PropertyDetails::TypeField::kMask << kSmiTagSize)); | 1329 Immediate(PropertyDetails::TypeField::kMask << kSmiTagSize)); |
1330 j(not_zero, miss); | 1330 j(not_zero, miss); |
1331 | 1331 |
1332 // Get the value at the masked, scaled index. | 1332 // Get the value at the masked, scaled index. |
1333 const int kValueOffset = | 1333 const int kValueOffset = |
1334 SeededNumberDictionary::kElementsStartOffset + kPointerSize; | 1334 SeededNumberDictionary::kElementsStartOffset + kPointerSize; |
1335 mov(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); | 1335 mov(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); |
1336 } | 1336 } |
1337 | 1337 |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3362 if (mag.shift > 0) sar(edx, mag.shift); | 3362 if (mag.shift > 0) sar(edx, mag.shift); |
3363 mov(eax, dividend); | 3363 mov(eax, dividend); |
3364 shr(eax, 31); | 3364 shr(eax, 31); |
3365 add(edx, eax); | 3365 add(edx, eax); |
3366 } | 3366 } |
3367 | 3367 |
3368 | 3368 |
3369 } } // namespace v8::internal | 3369 } } // namespace v8::internal |
3370 | 3370 |
3371 #endif // V8_TARGET_ARCH_X87 | 3371 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |