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:
Michael Lippautz 2020-06-29 17:10:24 +02:00 committed by Commit Bot
parent ca674858e5
commit 441cb86805
10 changed files with 38 additions and 10 deletions

View File

@ -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",

View File

@ -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()),

View File

@ -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 {

View File

@ -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

View 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_

View File

@ -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"

View File

@ -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 {

View File

@ -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 {

View File

@ -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"

View File

@ -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"