v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::ScriptCompiler::CachedData Struct Reference

#include <v8-script.h>

Collaboration diagram for v8::ScriptCompiler::CachedData:

Public Types

enum  BufferPolicy { BufferNotOwned , BufferOwned }
 
enum  CompatibilityCheckResult {
  kSuccess = 0 , kMagicNumberMismatch = 1 , kVersionMismatch = 2 , kSourceMismatch = 3 ,
  kFlagsMismatch = 5 , kChecksumMismatch = 6 , kInvalidHeader = 7 , kLengthMismatch = 8 ,
  kReadOnlySnapshotChecksumMismatch = 9 , kLast = kReadOnlySnapshotChecksumMismatch
}
 

Public Member Functions

 CachedData ()
 
 CachedData (const uint8_t *data, int length, BufferPolicy buffer_policy=BufferNotOwned)
 
 ~CachedData ()
 
CompatibilityCheckResult CompatibilityCheck (Isolate *isolate)
 
 CachedData (const CachedData &)=delete
 
CachedDataoperator= (const CachedData &)=delete
 

Public Attributes

const uint8_t * data
 
int length
 
bool rejected
 
BufferPolicy buffer_policy
 

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 413 of file v8-script.h.

Member Enumeration Documentation

◆ BufferPolicy

Enumerator
BufferNotOwned 
BufferOwned 

Definition at line 414 of file v8-script.h.

◆ CompatibilityCheckResult

Enumerator
kSuccess 
kMagicNumberMismatch 
kVersionMismatch 
kSourceMismatch 
kFlagsMismatch 
kChecksumMismatch 
kInvalidHeader 
kLengthMismatch 
kReadOnlySnapshotChecksumMismatch 
kLast 

Definition at line 430 of file v8-script.h.

Constructor & Destructor Documentation

◆ CachedData() [1/3]

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

Definition at line 416 of file v8-script.h.

◆ CachedData() [2/3]

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

Definition at line 1733 of file api.cc.

◆ ~CachedData()

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

Definition at line 1740 of file api.cc.

◆ CachedData() [3/3]

v8::ScriptCompiler::CachedData::CachedData ( const CachedData & )
delete

Member Function Documentation

◆ CompatibilityCheck()

ScriptCompiler::CachedData::CompatibilityCheckResult v8::ScriptCompiler::CachedData::CompatibilityCheck ( Isolate * isolate)

Definition at line 1747 of file api.cc.

Here is the call graph for this function:

◆ operator=()

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

Member Data Documentation

◆ buffer_policy

BufferPolicy v8::ScriptCompiler::CachedData::buffer_policy

Definition at line 455 of file v8-script.h.

◆ data

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

Definition at line 452 of file v8-script.h.

◆ length

int v8::ScriptCompiler::CachedData::length

Definition at line 453 of file v8-script.h.

◆ rejected

bool v8::ScriptCompiler::CachedData::rejected

Definition at line 454 of file v8-script.h.


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