V8 Project
v8::ScriptCompiler::CachedData Struct Reference

Compilation data that the embedder can cache and pass back to speed up future compilations. More...

#include <v8.h>

+ Collaboration diagram for v8::ScriptCompiler::CachedData:

Public Types

enum  BufferPolicy { BufferNotOwned , BufferOwned }
 

Public Member Functions

 CachedData ()
 
 CachedData (const uint8_t *data, int length, BufferPolicy buffer_policy=BufferNotOwned)
 
 ~CachedData ()
 

Public Attributes

const uint8_t * data
 
int length
 
BufferPolicy buffer_policy
 

Private Member Functions

 CachedData (const CachedData &)
 
CachedDataoperator= (const CachedData &)
 

Detailed Description

Compilation data that the embedder can cache and pass back to speed up future compilations.

The data is produced if the CompilerOptions passed to the compilation functions in ScriptCompiler contains produce_data_to_cache = true. The data to cache can then can be retrieved from UnboundScript.

Definition at line 1028 of file v8.h.

Member Enumeration Documentation

◆ BufferPolicy

Enumerator
BufferNotOwned 
BufferOwned 

Definition at line 1029 of file v8.h.

1029  {
1031  BufferOwned
1032  };

Constructor & Destructor Documentation

◆ CachedData() [1/3]

v8::ScriptCompiler::CachedData::CachedData ( )
inline

Definition at line 1034 of file v8.h.

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
BufferPolicy buffer_policy
Definition: v8.h:1047
const uint8_t * data
Definition: v8.h:1045

◆ CachedData() [2/3]

v8::ScriptCompiler::CachedData::CachedData ( const uint8_t *  data,
int  length,
BufferPolicy  buffer_policy = BufferNotOwned 
)

Definition at line 1557 of file api.cc.

1559  : data(data_), length(length_), buffer_policy(buffer_policy_) {}

◆ ~CachedData()

v8::ScriptCompiler::CachedData::~CachedData ( )

Definition at line 1562 of file api.cc.

1562  {
1563  if (buffer_policy == BufferOwned) {
1564  delete[] data;
1565  }
1566 }

◆ CachedData() [3/3]

v8::ScriptCompiler::CachedData::CachedData ( const CachedData )
private

Member Function Documentation

◆ operator=()

CachedData& v8::ScriptCompiler::CachedData::operator= ( const CachedData )
private

Member Data Documentation

◆ buffer_policy

BufferPolicy v8::ScriptCompiler::CachedData::buffer_policy

Definition at line 1047 of file v8.h.

◆ data

const uint8_t* v8::ScriptCompiler::CachedData::data

Definition at line 1045 of file v8.h.

Referenced by v8::Shell::CompileString(), and v8::ScriptCompiler::CompileUnbound().

◆ length

int v8::ScriptCompiler::CachedData::length

Definition at line 1046 of file v8.h.

Referenced by v8::Shell::CompileString(), and v8::ScriptCompiler::CompileUnbound().


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