![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <name-provider.h>
Public Member Functions | |
virtual | ~NameProvider ()=default |
virtual const char * | GetHumanReadableName () const =0 |
Static Public Member Functions | |
static constexpr bool | SupportsCppClassNamesAsObjectNames () |
Static Public Attributes | |
static constexpr const char | kHiddenName [] = "InternalNode" |
static constexpr const char | kNoNameDeducible [] = "<No name>" |
NameProvider allows for providing a human-readable name for garbage-collected objects.
There's two cases of names to distinguish: a. Explicitly specified names via using NameProvider. Such names are always preserved in the system. b. Internal names that Oilpan infers from a C++ type on the class hierarchy of the object. This is not necessarily the type of the actually instantiated object.
Depending on the build configuration, Oilpan may hide names, i.e., represent them with kHiddenName, of case b. to avoid exposing internal details.
Definition at line 26 of file name-provider.h.
|
virtualdefault |
|
pure virtual |
Specifies a name for the garbage-collected object. Such names will never be hidden, as they are explicitly specified by the user of this API.
Implementations of this function must not allocate garbage-collected objects or otherwise modify the cppgc heap.
V8 may call this function while generating a heap snapshot or at other times. If V8 is currently generating a heap snapshot (according to HeapProfiler::IsTakingSnapshot), then the returned string must stay alive until the snapshot generation has completed. Otherwise, the returned string must stay alive forever. If you need a place to store a temporary string during snapshot generation, use HeapProfiler::CopyNameForHeapSnapshot.
|
inlinestaticconstexpr |
Indicating whether the build supports extracting C++ names as object names.
Definition at line 44 of file name-provider.h.
|
staticconstexpr |
Name that is used when hiding internals.
Definition at line 31 of file name-provider.h.
|
staticconstexpr |
Name that is used in case compiler support is missing for composing a name from C++ types.
Definition at line 37 of file name-provider.h.