Lines Matching defs:data
14 #include "v8-data.h" // NOLINT(build/include_directory)
137 V8_INLINE static ModuleRequest* Cast(Data* data);
288 V8_INLINE static Module* Cast(Data* data);
338 * Compilation data that the embedder can cache and pass back to speed up
339 * future compilations. The data is produced if the CompilerOptions passed to
341 * = true. The data to cache can then can be retrieved from
348 : data(nullptr),
354 // data and guarantees that it stays alive until the CachedData object is
355 // destroyed. If the policy is BufferOwned, the given data will be deleted
357 CachedData(const uint8_t* data, int length,
361 // which will be called when V8 no longer needs the data.
362 const uint8_t* data;
378 // The caller *must* ensure that the cached data is from a trusted source.
408 // Cached data from previous compilation (if a kConsume*Cache flag is
409 // set), or hold newly generated cache data (kProduce*Cache flags) are
416 * For streaming incomplete script data to V8. The embedder should implement a
424 * V8 calls this to request the next chunk of data from the embedder. This
426 * wait for the data, if the embedder doesn't have data yet. Returns the
427 * length of the data returned. When the data ends, GetMoreData should
428 * return 0. Caller takes ownership of the data.
430 * When streaming UTF-8 data, V8 handles multi-byte characters split between
431 * two data chunks, but doesn't handle multi-byte characters split between
432 * more than two data chunks. The embedder can avoid this problem by always
433 * returning at least 2 bytes of data.
435 * When streaming UTF-16 data, V8 does not handle characters split between
436 * two data chunks. The embedder has to make sure that chunks have an even
440 * GetMoreData call return 0. V8 will interpret it as end of data (and most
442 * V8 has parsed the data it received so far.
482 explicit ScriptStreamingTask(internal::ScriptStreamingData* data)
483 : data_(data) {}
537 * Cached data as part of the source object can be optionally produced to be
540 * Note that when producing cached data, the source must point to NULL for
541 * cached data. When consuming cached data, the cached data must have been
543 * cached data is the correct one for the given script.
558 * \param pre_data Pre-parsing data, as obtained by ScriptData::PreCompile()
571 * Returns a task which streams script data into V8, or NULL if the script
574 * script, and it will request data from the StreamedSource as needed. When
575 * ScriptStreamingTask::Run exits, all data has been streamed and the script
578 * This API allows to start the streaming with as little data as possible, and
579 * the remaining data (for example, the ScriptOrigin) is passed to Compile.
605 * Background: The data carried by CachedData may depend on the exact
608 * data from another V8 version, or the same version with different
614 * Alternatively, this tag can be stored alongside the cached data and
703 CachedData* data,
712 cached_data(data),
715 ScriptCompiler::Source::Source(Local<String> string, CachedData* data,
718 cached_data(data),
730 ModuleRequest* ModuleRequest::Cast(Data* data) {
732 CheckCast(data);
734 return reinterpret_cast<ModuleRequest*>(data);
737 Module* Module::Cast(Data* data) {
739 CheckCast(data);
741 return reinterpret_cast<Module*>(data);