v8
13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
c
d
e
f
g
i
j
k
m
n
o
p
r
s
t
u
v
Variables
f
g
i
k
m
t
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
e
g
h
i
j
k
l
m
n
p
s
t
w
Enumerator
a
b
c
d
e
g
i
j
k
l
n
o
p
r
s
Concepts
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
g
i
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
Enumerator
b
c
d
e
h
j
k
n
o
p
r
s
t
u
w
Related Symbols
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Files
File List
Globals
All
a
c
d
e
p
s
v
Macros
a
c
d
e
p
s
v
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
macros.h
Go to the documentation of this file.
1
// Copyright 2020 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef INCLUDE_CPPGC_MACROS_H_
6
#define INCLUDE_CPPGC_MACROS_H_
7
8
#include <cstddef>
9
10
#include "
cppgc/internal/compiler-specific.h
"
11
12
namespace
cppgc
{
13
14
#define CPPGC_DISALLOW_NEW() \
15
public: \
16
using IsDisallowNewMarker CPPGC_UNUSED = int; \
17
void* operator new(size_t, void* location) { return location; } \
18
void* operator new(size_t) = delete; \
19
static_assert(true, "Force semicolon.")
14
#define CPPGC_DISALLOW_NEW() \
…
20
21
// Use CPPGC_STACK_ALLOCATED if the object is only stack allocated.
22
// Add the CPPGC_STACK_ALLOCATED_IGNORE annotation on a case-by-case basis when
23
// enforcement of CPPGC_STACK_ALLOCATED should be suppressed.
24
#if defined(__clang__)
25
26
#define CPPGC_STACK_ALLOCATED() \
27
public: \
28
using IsStackAllocatedTypeMarker CPPGC_UNUSED = int; \
29
\
30
private: \
31
void* operator new(size_t) = delete; \
32
void* operator new(size_t, void*) = delete; \
33
static_assert(true, "Force semicolon.")
34
35
#define CPPGC_STACK_ALLOCATED_IGNORE(bug_or_reason) \
36
__attribute__((annotate("stack_allocated_ignore")))
37
38
#define CPPGC_PLUGIN_IGNORE(bug_or_reason) \
39
__attribute__((annotate("blink_gc_plugin_ignore"), \
40
annotate("stack_allocated_ignore")))
41
42
#else
// !defined(__clang__)
43
44
#define CPPGC_STACK_ALLOCATED() static_assert(true, "Force semicolon.")
45
#define CPPGC_STACK_ALLOCATED_IGNORE(bug_or_reason)
46
#define CPPGC_PLUGIN_IGNORE(bug_or_reason)
47
48
#endif
// !defined(__clang__)
49
50
template
<
typename
T>
51
concept
IsStackAllocatedType
=
52
requires
{
typename
T::IsStackAllocatedTypeMarker; };
51
concept
IsStackAllocatedType
= {
…
}
53
54
}
// namespace cppgc
55
56
#endif
// INCLUDE_CPPGC_MACROS_H_
compiler-specific.h
cppgc::IsStackAllocatedType
Definition
macros.h:51
cppgc
Definition
allocation.h:38
include
cppgc
macros.h
Generated on Fri May 30 2025 01:56:44 for v8 by
1.13.2