cppgc: Move LivenessBrokerFactory to corresponding file
Bug: chromium:1056170 Change-Id: I24442979954f63dc8a2f8fd0494cc5d537b733a6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2273131 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/master@{#68587}
This commit is contained in:
parent
ca674858e5
commit
441cb86805
1
BUILD.gn
1
BUILD.gn
@ -4197,6 +4197,7 @@ v8_source_set("cppgc_base") {
|
||||
"src/heap/cppgc/heap.cc",
|
||||
"src/heap/cppgc/heap.h",
|
||||
"src/heap/cppgc/liveness-broker.cc",
|
||||
"src/heap/cppgc/liveness-broker.h",
|
||||
"src/heap/cppgc/logging.cc",
|
||||
"src/heap/cppgc/marker.cc",
|
||||
"src/heap/cppgc/marker.h",
|
||||
|
@ -74,11 +74,6 @@ void CheckConfig(Heap::Config config) {
|
||||
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
cppgc::LivenessBroker LivenessBrokerFactory::Create() {
|
||||
return cppgc::LivenessBroker();
|
||||
}
|
||||
|
||||
Heap::Heap(std::shared_ptr<cppgc::Platform> platform,
|
||||
cppgc::Heap::HeapOptions options)
|
||||
: HeapBase(platform, options.custom_spaces.size()),
|
||||
|
@ -16,11 +16,6 @@
|
||||
namespace cppgc {
|
||||
namespace internal {
|
||||
|
||||
class V8_EXPORT_PRIVATE LivenessBrokerFactory {
|
||||
public:
|
||||
static LivenessBroker Create();
|
||||
};
|
||||
|
||||
class V8_EXPORT_PRIVATE Heap final : public HeapBase,
|
||||
public cppgc::Heap,
|
||||
public GarbageCollector {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "include/cppgc/liveness-broker.h"
|
||||
|
||||
#include "src/heap/cppgc/heap-object-header-inl.h"
|
||||
#include "src/heap/cppgc/liveness-broker.h"
|
||||
|
||||
namespace cppgc {
|
||||
|
||||
@ -12,4 +13,13 @@ bool LivenessBroker::IsHeapObjectAliveImpl(const void* payload) const {
|
||||
return internal::HeapObjectHeader::FromPayload(payload).IsMarked();
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
|
||||
// static
|
||||
cppgc::LivenessBroker LivenessBrokerFactory::Create() {
|
||||
return cppgc::LivenessBroker();
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace cppgc
|
||||
|
22
src/heap/cppgc/liveness-broker.h
Normal file
22
src/heap/cppgc/liveness-broker.h
Normal file
@ -0,0 +1,22 @@
|
||||
// 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_LIVENESS_BROKER_H_
|
||||
#define V8_HEAP_CPPGC_LIVENESS_BROKER_H_
|
||||
|
||||
#include "include/cppgc/liveness-broker.h"
|
||||
#include "src/base/macros.h"
|
||||
|
||||
namespace cppgc {
|
||||
namespace internal {
|
||||
|
||||
class V8_EXPORT_PRIVATE LivenessBrokerFactory {
|
||||
public:
|
||||
static LivenessBroker Create();
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace cppgc
|
||||
|
||||
#endif // V8_HEAP_CPPGC_LIVENESS_BROKER_H_
|
@ -9,6 +9,7 @@
|
||||
#include "src/heap/cppgc/heap-page-inl.h"
|
||||
#include "src/heap/cppgc/heap-visitor.h"
|
||||
#include "src/heap/cppgc/heap.h"
|
||||
#include "src/heap/cppgc/liveness-broker.h"
|
||||
#include "src/heap/cppgc/marking-visitor.h"
|
||||
#include "src/heap/cppgc/stats-collector.h"
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "src/heap/cppgc/heap-object-header-inl.h"
|
||||
#include "src/heap/cppgc/heap-page-inl.h"
|
||||
#include "src/heap/cppgc/heap.h"
|
||||
#include "src/heap/cppgc/liveness-broker.h"
|
||||
|
||||
namespace cppgc {
|
||||
namespace internal {
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "src/base/platform/platform.h"
|
||||
#include "src/heap/cppgc/heap-page-inl.h"
|
||||
#include "src/heap/cppgc/heap.h"
|
||||
#include "src/heap/cppgc/liveness-broker.h"
|
||||
|
||||
namespace cppgc {
|
||||
namespace internal {
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "include/cppgc/member.h"
|
||||
#include "include/cppgc/type-traits.h"
|
||||
#include "src/heap/cppgc/heap.h"
|
||||
#include "src/heap/cppgc/liveness-broker.h"
|
||||
#include "src/heap/cppgc/visitor.h"
|
||||
#include "test/unittests/heap/cppgc/tests.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "include/cppgc/trace-trait.h"
|
||||
#include "src/base/macros.h"
|
||||
#include "src/heap/cppgc/heap.h"
|
||||
#include "src/heap/cppgc/liveness-broker.h"
|
||||
#include "test/unittests/heap/cppgc/tests.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user