OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef V8_X64_CODE_STUBS_X64_H_ | 5 #ifndef V8_X64_CODE_STUBS_X64_H_ |
6 #define V8_X64_CODE_STUBS_X64_H_ | 6 #define V8_X64_CODE_STUBS_X64_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 Register scratch0_orig_; | 287 Register scratch0_orig_; |
288 Register object_; | 288 Register object_; |
289 Register address_; | 289 Register address_; |
290 Register scratch0_; | 290 Register scratch0_; |
291 Register scratch1_; | 291 Register scratch1_; |
292 // Third scratch register is always rcx. | 292 // Third scratch register is always rcx. |
293 | 293 |
294 Register GetRegThatIsNotRcxOr(Register r1, | 294 Register GetRegThatIsNotRcxOr(Register r1, |
295 Register r2, | 295 Register r2, |
296 Register r3) { | 296 Register r3) { |
297 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { | 297 for (int i = 0; i < Register::kNumRegisters; i++) { |
298 Register candidate = Register::FromAllocationIndex(i); | 298 Register candidate = Register::from_code(i); |
299 if (candidate.is(rcx)) continue; | 299 if (candidate.IsAllocatable()) { |
300 if (candidate.is(r1)) continue; | 300 if (candidate.is(rcx)) continue; |
301 if (candidate.is(r2)) continue; | 301 if (candidate.is(r1)) continue; |
302 if (candidate.is(r3)) continue; | 302 if (candidate.is(r2)) continue; |
303 return candidate; | 303 if (candidate.is(r3)) continue; |
| 304 return candidate; |
| 305 } |
304 } | 306 } |
305 UNREACHABLE(); | 307 UNREACHABLE(); |
306 return no_reg; | 308 return no_reg; |
307 } | 309 } |
308 friend class RecordWriteStub; | 310 friend class RecordWriteStub; |
309 }; | 311 }; |
310 | 312 |
311 enum OnNoNeedToInformIncrementalMarker { | 313 enum OnNoNeedToInformIncrementalMarker { |
312 kReturnOnNoNeedToInformIncrementalMarker, | 314 kReturnOnNoNeedToInformIncrementalMarker, |
313 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker | 315 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 RegisterAllocation regs_; | 359 RegisterAllocation regs_; |
358 | 360 |
359 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 361 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
360 }; | 362 }; |
361 | 363 |
362 | 364 |
363 } // namespace internal | 365 } // namespace internal |
364 } // namespace v8 | 366 } // namespace v8 |
365 | 367 |
366 #endif // V8_X64_CODE_STUBS_X64_H_ | 368 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |