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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 } | 356 } |
357 return REMOVE_SLOT; | 357 return REMOVE_SLOT; |
358 } | 358 } |
359 case EMBEDDED_OBJECT_SLOT: { | 359 case EMBEDDED_OBJECT_SLOT: { |
360 RelocInfo rinfo(isolate, addr, RelocInfo::EMBEDDED_OBJECT, 0, NULL); | 360 RelocInfo rinfo(isolate, addr, RelocInfo::EMBEDDED_OBJECT, 0, NULL); |
361 return UpdateEmbeddedPointer(&rinfo, callback); | 361 return UpdateEmbeddedPointer(&rinfo, callback); |
362 } | 362 } |
363 case OBJECT_SLOT: { | 363 case OBJECT_SLOT: { |
364 return callback(reinterpret_cast<Object**>(addr)); | 364 return callback(reinterpret_cast<Object**>(addr)); |
365 } | 365 } |
366 case NUMBER_OF_SLOT_TYPES: | 366 case CLEARED_SLOT: |
367 break; | 367 break; |
368 } | 368 } |
369 UNREACHABLE(); | 369 UNREACHABLE(); |
370 return REMOVE_SLOT; | 370 return REMOVE_SLOT; |
371 } | 371 } |
372 }; | 372 }; |
373 | 373 |
374 inline SlotType SlotTypeForRelocInfoMode(RelocInfo::Mode rmode) { | 374 inline SlotType SlotTypeForRelocInfoMode(RelocInfo::Mode rmode) { |
375 if (RelocInfo::IsCodeTarget(rmode)) { | 375 if (RelocInfo::IsCodeTarget(rmode)) { |
376 return CODE_TARGET_SLOT; | 376 return CODE_TARGET_SLOT; |
377 } else if (RelocInfo::IsCell(rmode)) { | 377 } else if (RelocInfo::IsCell(rmode)) { |
378 return CELL_TARGET_SLOT; | 378 return CELL_TARGET_SLOT; |
379 } else if (RelocInfo::IsEmbeddedObject(rmode)) { | 379 } else if (RelocInfo::IsEmbeddedObject(rmode)) { |
380 return EMBEDDED_OBJECT_SLOT; | 380 return EMBEDDED_OBJECT_SLOT; |
381 } else if (RelocInfo::IsDebugBreakSlot(rmode)) { | 381 } else if (RelocInfo::IsDebugBreakSlot(rmode)) { |
382 return DEBUG_TARGET_SLOT; | 382 return DEBUG_TARGET_SLOT; |
383 } | 383 } |
384 UNREACHABLE(); | 384 UNREACHABLE(); |
385 return NUMBER_OF_SLOT_TYPES; | 385 return CLEARED_SLOT; |
386 } | 386 } |
387 | 387 |
388 } // namespace internal | 388 } // namespace internal |
389 } // namespace v8 | 389 } // namespace v8 |
390 | 390 |
391 #endif // V8_REMEMBERED_SET_H | 391 #endif // V8_REMEMBERED_SET_H |
OLD | NEW |