OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_REMEMBERED_SET_H | 5 #ifndef V8_REMEMBERED_SET_H |
6 #define V8_REMEMBERED_SET_H | 6 #define V8_REMEMBERED_SET_H |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/heap/slot-set.h" | 10 #include "src/heap/slot-set.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 return callback(reinterpret_cast<Object**>(addr)); | 338 return callback(reinterpret_cast<Object**>(addr)); |
339 } | 339 } |
340 case NUMBER_OF_SLOT_TYPES: | 340 case NUMBER_OF_SLOT_TYPES: |
341 break; | 341 break; |
342 } | 342 } |
343 UNREACHABLE(); | 343 UNREACHABLE(); |
344 return REMOVE_SLOT; | 344 return REMOVE_SLOT; |
345 } | 345 } |
346 }; | 346 }; |
347 | 347 |
| 348 inline SlotType SlotTypeForRelocInfoMode(RelocInfo::Mode rmode) { |
| 349 if (RelocInfo::IsCodeTarget(rmode)) { |
| 350 return CODE_TARGET_SLOT; |
| 351 } else if (RelocInfo::IsCell(rmode)) { |
| 352 return CELL_TARGET_SLOT; |
| 353 } else if (RelocInfo::IsEmbeddedObject(rmode)) { |
| 354 return EMBEDDED_OBJECT_SLOT; |
| 355 } else if (RelocInfo::IsDebugBreakSlot(rmode)) { |
| 356 return DEBUG_TARGET_SLOT; |
| 357 } |
| 358 UNREACHABLE(); |
| 359 return NUMBER_OF_SLOT_TYPES; |
| 360 } |
| 361 |
348 } // namespace internal | 362 } // namespace internal |
349 } // namespace v8 | 363 } // namespace v8 |
350 | 364 |
351 #endif // V8_REMEMBERED_SET_H | 365 #endif // V8_REMEMBERED_SET_H |
OLD | NEW |