V8 Project
v8::BinaryResource Class Reference

#include <d8.h>

+ Inheritance diagram for v8::BinaryResource:
+ Collaboration diagram for v8::BinaryResource:

Public Member Functions

 BinaryResource (const char *string, int length)
 
 ~BinaryResource ()
 
virtual const char * data () const
 The string data from the underlying buffer. More...
 
virtual size_t length () const
 The number of Latin-1 characters in the string. More...
 
- Public Member Functions inherited from v8::String::ExternalOneByteStringResource
virtual ~ExternalOneByteStringResource ()
 Override the destructor to manage the life cycle of the underlying buffer. More...
 
- Public Member Functions inherited from v8::String::ExternalStringResourceBase
virtual ~ExternalStringResourceBase ()
 

Private Attributes

const char * data_
 
size_t length_
 

Additional Inherited Members

- Protected Member Functions inherited from v8::String::ExternalOneByteStringResource
 ExternalOneByteStringResource ()
 
- Protected Member Functions inherited from v8::String::ExternalStringResourceBase
 ExternalStringResourceBase ()
 
virtual void Dispose ()
 Internally V8 will call this Dispose method when the external string resource is no longer needed. More...
 

Detailed Description

Definition at line 175 of file d8.h.

Constructor & Destructor Documentation

◆ BinaryResource()

v8::BinaryResource::BinaryResource ( const char *  string,
int  length 
)
inline

Definition at line 177 of file d8.h.

178  : data_(string),
179  length_(length) { }
virtual size_t length() const
The number of Latin-1 characters in the string.
Definition: d8.h:188
size_t length_
Definition: d8.h:192
const char * data_
Definition: d8.h:191

◆ ~BinaryResource()

v8::BinaryResource::~BinaryResource ( )
inline

Definition at line 181 of file d8.h.

181  {
182  delete[] data_;
183  data_ = NULL;
184  length_ = 0;
185  }
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

References data_, length_, and NULL.

Member Function Documentation

◆ data()

virtual const char* v8::BinaryResource::data ( ) const
inlinevirtual

The string data from the underlying buffer.

Implements v8::String::ExternalOneByteStringResource.

Definition at line 187 of file d8.h.

187 { return data_; }

References data_.

◆ length()

virtual size_t v8::BinaryResource::length ( ) const
inlinevirtual

The number of Latin-1 characters in the string.

Implements v8::String::ExternalOneByteStringResource.

Definition at line 188 of file d8.h.

188 { return length_; }

References length_.

Member Data Documentation

◆ data_

const char* v8::BinaryResource::data_
private

Definition at line 191 of file d8.h.

Referenced by data(), and ~BinaryResource().

◆ length_

size_t v8::BinaryResource::length_
private

Definition at line 192 of file d8.h.

Referenced by length(), and ~BinaryResource().


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