![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <v8-primitive.h>
Public Member Functions | |
ValueView (Isolate *isolate, Local< v8::String > str) | |
~ValueView () | |
const uint8_t * | data8 () const |
const uint16_t * | data16 () const |
uint32_t | length () const |
bool | is_one_byte () const |
ValueView (const ValueView &)=delete | |
void | operator= (const ValueView &)=delete |
Private Member Functions | |
void | CheckOneByte (bool is_one_byte) const |
Private Attributes | ||
Local< v8::String > | flat_str_ | |
union { | ||
const uint8_t * data8_ | ||
const uint16_t * data16_ | ||
}; | ||
uint32_t | length_ | |
bool | is_one_byte_ | |
char | no_gc_debug_scope_ [internal::Internals::kDisallowGarbageCollectionSize] | |
Returns a view onto a string's contents.
WARNING: This does not copy the string's contents, and will therefore be invalidated if the GC can move the string while the ValueView is alive. It is therefore required that no GC or allocation can happen while there is an active ValueView. This requirement may be relaxed in the future.
V8 strings are either encoded as one-byte or two-bytes per character.
Definition at line 706 of file v8-primitive.h.
v8::String::ValueView::ValueView | ( | v8::Isolate * | v8_isolate, |
Local< v8::String > | str ) |
|
delete |
|
private |
|
inline |
Definition at line 716 of file v8-primitive.h.
|
inline |
Definition at line 710 of file v8-primitive.h.
|
inline |
Definition at line 723 of file v8-primitive.h.
|
inline |
Definition at line 722 of file v8-primitive.h.
|
delete |
union { ... } v8::String::ValueView |
const uint16_t* v8::String::ValueView::data16_ |
Definition at line 735 of file v8-primitive.h.
const uint8_t* v8::String::ValueView::data8_ |
Definition at line 734 of file v8-primitive.h.
|
private |
Definition at line 732 of file v8-primitive.h.
|
private |
Definition at line 738 of file v8-primitive.h.
|
private |
Definition at line 737 of file v8-primitive.h.
|
private |
Definition at line 741 of file v8-primitive.h.