Commit 88b1d7e4 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap: Add basic type aliases for cppgc

First batch of type aliases for cppgc which are just forwarding
existing Blink types to their cppgc counterparts.

Bug: chromium:1056170
Change-Id: I186ffd39e69feef2f96f1979c94c040f307e7926
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527143
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: default avatarOmer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825611}
parent fc54ac6c
......@@ -77,6 +77,16 @@ blink_platform_sources("heap") {
"visitor.h",
]
deps = [
":blink_heap_buildflags",
"//base",
"//third_party/blink/renderer/platform:make_platform_generated",
"//third_party/blink/renderer/platform/heap:heap_unsanitized",
"//third_party/blink/renderer/platform/heap/asm",
"//third_party/icu",
"//v8",
]
if (enable_blink_heap_use_v8_oilpan) {
sources += [
"v8_wrapper/blink_gc.h",
......@@ -97,6 +107,8 @@ blink_platform_sources("heap") {
"v8_wrapper/unified_heap_marking_visitor.h",
"v8_wrapper/visitor.h",
]
deps += [ "//v8:cppgc" ]
} else {
sources += [
"impl/atomic_entry_flag.h",
......@@ -155,16 +167,6 @@ blink_platform_sources("heap") {
]
}
deps = [
":blink_heap_buildflags",
"//base",
"//third_party/blink/renderer/platform:make_platform_generated",
"//third_party/blink/renderer/platform/heap:heap_unsanitized",
"//third_party/blink/renderer/platform/heap/asm",
"//third_party/icu",
"//v8",
]
if (!is_debug && !optimize_for_size) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
......
......@@ -5,6 +5,15 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_HEAP_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_HEAP_H_
// TODO(chromium:1056170): Implement wrapper.
#include "v8/include/cppgc/garbage-collected.h"
namespace blink {
template <typename T>
using GarbageCollected = cppgc::GarbageCollected<T>;
using GarbageCollectedMixin = cppgc::GarbageCollectedMixin;
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_HEAP_H_
......@@ -5,6 +5,19 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_MEMBER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_MEMBER_H_
// TODO(chromium:1056170): Implement wrapper.
#include "v8/include/cppgc/member.h"
namespace blink {
template <typename T>
using Member = cppgc::Member<T>;
template <typename T>
using WeakMember = cppgc::WeakMember<T>;
template <typename T>
using UntracedMember = cppgc::UntracedMember<T>;
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_MEMBER_H_
......@@ -5,6 +5,16 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_PERSISTENT_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_PERSISTENT_H_
// TODO(chromium:1056170): Implement wrapper.
#include "v8/include/cppgc/persistent.h"
namespace blink {
template <typename T>
using Persistent = cppgc::Persistent<T>;
template <typename T>
using WeakPersistent = cppgc::WeakPersistent<T>;
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_PERSISTENT_H_
......@@ -5,6 +5,13 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_THREAD_STATE_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_THREAD_STATE_H_
// TODO(chromium:1056170): Implement wrapper.
#include "v8/include/cppgc/prefinalizer.h"
namespace blink {
#define USING_PRE_FINALIZER(Class, PreFinalizer) \
CPPGC_USING_PRE_FINALIZER(Class, PreFinalizer)
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_THREAD_STATE_H_
......@@ -5,6 +5,12 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_VISITOR_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_VISITOR_H_
// TODO(chromium:1056170): Implement wrapper.
#include "v8/include/cppgc/visitor.h"
namespace blink {
using Visitor = cppgc::Visitor;
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_V8_WRAPPER_VISITOR_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment