forked from v8/v8
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompaction-worklists.h
More file actions
40 lines (27 loc) · 1014 Bytes
/
compaction-worklists.h
File metadata and controls
40 lines (27 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_HEAP_CPPGC_COMPACTION_WORKLISTS_H_
#define V8_HEAP_CPPGC_COMPACTION_WORKLISTS_H_
#include <unordered_set>
#include "src/heap/base/worklist.h"
namespace cppgc {
namespace internal {
class CompactionWorklists final {
public:
CompactionWorklists() = default;
CompactionWorklists(const CompactionWorklists&) = delete;
CompactionWorklists& operator=(const CompactionWorklists&) = delete;
using MovableReference = const void*;
using MovableReferencesWorklist =
heap::base::Worklist<MovableReference*, 256 /* local entries */>;
MovableReferencesWorklist* movable_slots_worklist() {
return &movable_slots_worklist_;
}
void ClearForTesting();
private:
MovableReferencesWorklist movable_slots_worklist_;
};
} // namespace internal
} // namespace cppgc
#endif // V8_HEAP_CPPGC_COMPACTION_WORKLISTS_H_