V8 Project
v8::internal::V8 Class Reference

#include <v8.h>

+ Inheritance diagram for v8::internal::V8:
+ Collaboration diagram for v8::internal::V8:

Static Public Member Functions

static bool Initialize ()
 
static void TearDown ()
 
static void FatalProcessOutOfMemory (const char *location, bool take_snapshot=false)
 
static void SetEntropySource (EntropySource source)
 
static void SetReturnAddressLocationResolver (ReturnAddressLocationResolver resolver)
 
static void SetFunctionEntryHook (FunctionEntryHook entry_hook)
 
static v8::ArrayBuffer::AllocatorArrayBufferAllocator ()
 
static void SetArrayBufferAllocator (v8::ArrayBuffer::Allocator *allocator)
 
static void InitializePlatform (v8::Platform *platform)
 
static void ShutdownPlatform ()
 
static v8::PlatformGetCurrentPlatform ()
 

Static Private Member Functions

static void InitializeOncePerProcessImpl ()
 
static void InitializeOncePerProcess ()
 

Static Private Attributes

static v8::ArrayBuffer::Allocatorarray_buffer_allocator_ = NULL
 
static v8::Platformplatform_ = NULL
 

Detailed Description

Definition at line 52 of file v8.h.

Member Function Documentation

◆ ArrayBufferAllocator()

static v8::ArrayBuffer::Allocator* v8::internal::V8::ArrayBufferAllocator ( )
inlinestatic

Definition at line 72 of file v8.h.

72  {
74  }
static v8::ArrayBuffer::Allocator * array_buffer_allocator_
Definition: v8.h:90

References array_buffer_allocator_.

Referenced by v8::internal::Runtime::FreeArrayBuffer(), v8::internal::FreeBufferExtension::FreeBuffer(), v8::internal::RUNTIME_FUNCTION(), v8::V8::SetArrayBufferAllocator(), and v8::internal::Runtime::SetupArrayBufferAllocatingData().

+ Here is the caller graph for this function:

◆ FatalProcessOutOfMemory()

static void v8::internal::V8::FatalProcessOutOfMemory ( const char *  location,
bool  take_snapshot = false 
)
static

◆ GetCurrentPlatform()

v8::Platform * v8::internal::V8::GetCurrentPlatform ( )
static

Definition at line 115 of file v8.cc.

115  {
116  DCHECK(platform_);
117  return platform_;
118 }
static v8::Platform * platform_
Definition: v8.h:92
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, and platform_.

Referenced by v8::internal::MarkCompactCollector::StartSweeperThreads().

+ Here is the caller graph for this function:

◆ Initialize()

bool v8::internal::V8::Initialize ( )
static

Definition at line 36 of file v8.cc.

36  {
38  return true;
39 }
static void InitializeOncePerProcess()
Definition: v8.cc:97

References InitializeOncePerProcess().

Referenced by v8::V8::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeOncePerProcess()

void v8::internal::V8::InitializeOncePerProcess ( )
staticprivate

Definition at line 97 of file v8.cc.

97  {
99 }
static void InitializeOncePerProcessImpl()
Definition: v8.cc:61
void CallOnce(OnceType *once, NoArgFunction init_func)
Definition: once.h:82

References v8::base::CallOnce(), and InitializeOncePerProcessImpl().

Referenced by Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeOncePerProcessImpl()

void v8::internal::V8::InitializeOncePerProcessImpl ( )
staticprivate

Definition at line 61 of file v8.cc.

61  {
63 
64  if (FLAG_predictable && FLAG_random_seed == 0) {
65  // Avoid random seeds in predictable mode.
66  FLAG_random_seed = 12347;
67  }
68 
69  if (FLAG_stress_compaction) {
70  FLAG_force_marking_deque_overflows = true;
71  FLAG_gc_global = true;
72  FLAG_max_semi_space_size = 1;
73  }
74 
75  base::OS::Initialize(FLAG_random_seed, FLAG_hard_abort, FLAG_gc_fake_mmap);
76 
78 
80  CpuFeatures::Probe(false);
82  // The custom exp implementation needs 16KB of lookup data; initialize it
83  // on demand.
85 #ifdef _WIN64
86  init_modulo_function();
87 #endif
92  ExternalReference::SetUp();
93  Bootstrapper::InitializeOncePerProcess();
94 }
static void Initialize(int64_t random_seed, bool hard_abort, const char *const gc_fake_mmap)
static void Probe(bool cross_compile)
Definition: assembler.h:172
static void InitializeOncePerProcess()
Definition: elements.cc:1736
static void EnforceFlagImplications()
Definition: flags.cc:545
static void InitializeOncePerProcess()
Definition: isolate.cc:152
static void SetUpCaches()
Definition: lithium.cc:153
static void SetUp()
Definition: sampler.cc:621
void init_fast_sqrt_function()
void init_memcopy_functions()
Definition: utils.cc:381
void SetUpJSCallerSavedCodeData()
Definition: frames.cc:1591

References v8::internal::FlagList::EnforceFlagImplications(), v8::internal::init_fast_sqrt_function(), v8::internal::init_memcopy_functions(), v8::base::OS::Initialize(), v8::internal::ElementsAccessor::InitializeOncePerProcess(), v8::internal::Isolate::InitializeOncePerProcess(), v8::internal::CpuFeatures::Probe(), v8::internal::compiler::Pipeline::SetUp(), v8::internal::Sampler::SetUp(), v8::internal::LOperand::SetUpCaches(), and v8::internal::SetUpJSCallerSavedCodeData().

Referenced by InitializeOncePerProcess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializePlatform()

void v8::internal::V8::InitializePlatform ( v8::Platform platform)
static

Definition at line 102 of file v8.cc.

102  {
103  CHECK(!platform_);
104  CHECK(platform);
105  platform_ = platform;
106 }
#define CHECK(condition)
Definition: logging.h:36

References CHECK, and platform_.

Referenced by v8::V8::InitializePlatform().

+ Here is the caller graph for this function:

◆ SetArrayBufferAllocator()

static void v8::internal::V8::SetArrayBufferAllocator ( v8::ArrayBuffer::Allocator allocator)
inlinestatic

Definition at line 76 of file v8.h.

76  {
78  array_buffer_allocator_ = allocator;
79  }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define CHECK_EQ(expected, value)
Definition: logging.h:169

References array_buffer_allocator_, CHECK_EQ, and NULL.

Referenced by v8::V8::SetArrayBufferAllocator().

+ Here is the caller graph for this function:

◆ SetEntropySource()

static void v8::internal::V8::SetEntropySource ( EntropySource  source)
static

◆ SetFunctionEntryHook()

static void v8::internal::V8::SetFunctionEntryHook ( FunctionEntryHook  entry_hook)
static

◆ SetReturnAddressLocationResolver()

void v8::internal::V8::SetReturnAddressLocationResolver ( ReturnAddressLocationResolver  resolver)
static

Definition at line 55 of file v8.cc.

56  {
57  StackFrame::SetReturnAddressLocationResolver(resolver);
58 }

Referenced by v8::V8::SetReturnAddressLocationResolver().

+ Here is the caller graph for this function:

◆ ShutdownPlatform()

void v8::internal::V8::ShutdownPlatform ( )
static

Definition at line 109 of file v8.cc.

109  {
110  CHECK(platform_);
111  platform_ = NULL;
112 }

References CHECK, NULL, and platform_.

Referenced by v8::V8::ShutdownPlatform().

+ Here is the caller graph for this function:

◆ TearDown()

void v8::internal::V8::TearDown ( )
static

Definition at line 42 of file v8.cc.

42  {
43  Bootstrapper::TearDownExtensions();
47  ExternalReference::TearDownMathExpData();
51  FlagList::ResetAllFlags(); // Frees memory held by string arguments.
52 }
static void UnregisterAll()
Definition: api.cc:387
static void ResetAllFlags()
Definition: flags.cc:508
static void GlobalTearDown()
Definition: isolate.cc:1585
static void TearDownCaches()
Definition: lithium.cc:160
static void TearDown()
Definition: sampler.cc:629

References v8::internal::Isolate::GlobalTearDown(), v8::internal::FlagList::ResetAllFlags(), v8::internal::compiler::Pipeline::TearDown(), v8::internal::ElementsAccessor::TearDown(), v8::internal::Sampler::TearDown(), v8::internal::LOperand::TearDownCaches(), and v8::RegisteredExtension::UnregisterAll().

Referenced by v8::V8::Dispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ array_buffer_allocator_

v8::ArrayBuffer::Allocator * v8::internal::V8::array_buffer_allocator_ = NULL
staticprivate

Definition at line 90 of file v8.h.

Referenced by ArrayBufferAllocator(), and SetArrayBufferAllocator().

◆ platform_

v8::Platform * v8::internal::V8::platform_ = NULL
staticprivate

Definition at line 92 of file v8.h.

Referenced by GetCurrentPlatform(), InitializePlatform(), and ShutdownPlatform().


The documentation for this class was generated from the following files: