v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::wasm::AsyncStreamingDecoder Class Reference
Inheritance diagram for v8::internal::wasm::AsyncStreamingDecoder:
Collaboration diagram for v8::internal::wasm::AsyncStreamingDecoder:

Classes

class  DecodeFunctionBody
 
class  DecodeFunctionLength
 
class  DecodeModuleHeader
 
class  DecodeNumberOfFunctions
 
class  DecodeSectionID
 
class  DecodeSectionLength
 
class  DecodeSectionPayload
 
class  DecodeVarInt32
 
class  DecodingState
 
class  SectionBuffer
 

Public Member Functions

 AsyncStreamingDecoder (std::unique_ptr< StreamingProcessor > processor)
 
 AsyncStreamingDecoder (const AsyncStreamingDecoder &)=delete
 
AsyncStreamingDecoderoperator= (const AsyncStreamingDecoder &)=delete
 
void OnBytesReceived (base::Vector< const uint8_t > bytes) override
 
void Finish (bool can_use_compiled_module) override
 
void Abort () override
 
void NotifyCompilationDiscarded () override
 
void NotifyNativeModuleCreated (const std::shared_ptr< NativeModule > &native_module) override
 
- Public Member Functions inherited from v8::internal::wasm::StreamingDecoder
virtual ~StreamingDecoder ()=default
 
void SetMoreFunctionsCanBeSerializedCallback (MoreFunctionsCanBeSerializedCallback callback)
 
void SetCompiledModuleBytes (base::Vector< const uint8_t > bytes)
 
const std::string & url () const
 
std::shared_ptr< const std::string > shared_url () const
 
void SetUrl (base::Vector< const char > url)
 

Private Member Functions

SectionBufferCreateNewBuffer (uint32_t module_offset, uint8_t section_id, size_t length, base::Vector< const uint8_t > length_bytes)
 
std::unique_ptr< DecodingStateToErrorState ()
 
void ProcessModuleHeader ()
 
void ProcessSection (SectionBuffer *buffer)
 
void StartCodeSection (int num_functions, std::shared_ptr< WireBytesStorage > wire_bytes_storage, int code_section_start, int code_section_length)
 
void ProcessFunctionBody (base::Vector< const uint8_t > bytes, uint32_t module_offset)
 
void Fail ()
 
bool ok () const
 
uint32_t module_offset () const
 

Private Attributes

std::unique_ptr< StreamingProcessorprocessor_
 
std::unique_ptr< StreamingProcessorfailed_processor_
 
std::unique_ptr< DecodingStatestate_
 
std::vector< std::shared_ptr< SectionBuffer > > section_buffers_
 
bool code_section_processed_ = false
 
uint32_t module_offset_ = 0
 
std::vector< std::vector< uint8_t > > full_wire_bytes_ {{}}
 

Additional Inherited Members

- Public Types inherited from v8::internal::wasm::StreamingDecoder
using MoreFunctionsCanBeSerializedCallback
 
- Static Public Member Functions inherited from v8::internal::wasm::StreamingDecoder
static std::unique_ptr< StreamingDecoderCreateAsyncStreamingDecoder (std::unique_ptr< StreamingProcessor > processor)
 
static std::unique_ptr< StreamingDecoderCreateSyncStreamingDecoder (Isolate *isolate, WasmEnabledFeatures enabled, CompileTimeImports compile_imports, DirectHandle< Context > context, const char *api_method_name_for_errors, std::shared_ptr< CompilationResultResolver > resolver)
 
- Protected Member Functions inherited from v8::internal::wasm::StreamingDecoder
bool deserializing () const
 
- Protected Attributes inherited from v8::internal::wasm::StreamingDecoder
const std::shared_ptr< std::string > url_ = std::make_shared<std::string>()
 
MoreFunctionsCanBeSerializedCallback more_functions_can_be_serialized_callback_
 
base::Vector< const uint8_t > compiled_module_bytes_
 

Detailed Description

Definition at line 25 of file streaming-decoder.cc.

Constructor & Destructor Documentation

◆ AsyncStreamingDecoder() [1/2]

v8::internal::wasm::AsyncStreamingDecoder::AsyncStreamingDecoder ( std::unique_ptr< StreamingProcessor > processor)
explicit

Definition at line 755 of file streaming-decoder.cc.

◆ AsyncStreamingDecoder() [2/2]

v8::internal::wasm::AsyncStreamingDecoder::AsyncStreamingDecoder ( const AsyncStreamingDecoder & )
delete

Member Function Documentation

◆ Abort()

void v8::internal::wasm::AsyncStreamingDecoder::Abort ( )
overridevirtual

Implements v8::internal::wasm::StreamingDecoder.

Definition at line 343 of file streaming-decoder.cc.

Here is the call graph for this function:

◆ CreateNewBuffer()

AsyncStreamingDecoder::SectionBuffer * v8::internal::wasm::AsyncStreamingDecoder::CreateNewBuffer ( uint32_t module_offset,
uint8_t section_id,
size_t length,
base::Vector< const uint8_t > length_bytes )
private

Definition at line 761 of file streaming-decoder.cc.

Here is the call graph for this function:

◆ Fail()

void v8::internal::wasm::AsyncStreamingDecoder::Fail ( )
inlineprivate

Definition at line 198 of file streaming-decoder.cc.

Here is the caller graph for this function:

◆ Finish()

void v8::internal::wasm::AsyncStreamingDecoder::Finish ( bool can_use_compiled_module)
overridevirtual

Implements v8::internal::wasm::StreamingDecoder.

Definition at line 284 of file streaming-decoder.cc.

Here is the call graph for this function:

◆ module_offset()

uint32_t v8::internal::wasm::AsyncStreamingDecoder::module_offset ( ) const
inlineprivate

Definition at line 212 of file streaming-decoder.cc.

Here is the caller graph for this function:

◆ NotifyCompilationDiscarded()

void v8::internal::wasm::AsyncStreamingDecoder::NotifyCompilationDiscarded ( )
inlineoverridevirtual

Implements v8::internal::wasm::StreamingDecoder.

Definition at line 37 of file streaming-decoder.cc.

◆ NotifyNativeModuleCreated()

void v8::internal::wasm::AsyncStreamingDecoder::NotifyNativeModuleCreated ( const std::shared_ptr< NativeModule > & native_module)
overridevirtual

Implements v8::internal::wasm::StreamingDecoder.

Definition at line 391 of file streaming-decoder.cc.

◆ ok()

bool v8::internal::wasm::AsyncStreamingDecoder::ok ( ) const
inlineprivate

Definition at line 207 of file streaming-decoder.cc.

Here is the caller graph for this function:

◆ OnBytesReceived()

void v8::internal::wasm::AsyncStreamingDecoder::OnBytesReceived ( base::Vector< const uint8_t > bytes)
overridevirtual

Implements v8::internal::wasm::StreamingDecoder.

Definition at line 232 of file streaming-decoder.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

AsyncStreamingDecoder & v8::internal::wasm::AsyncStreamingDecoder::operator= ( const AsyncStreamingDecoder & )
delete

◆ ProcessFunctionBody()

void v8::internal::wasm::AsyncStreamingDecoder::ProcessFunctionBody ( base::Vector< const uint8_t > bytes,
uint32_t module_offset )
inlineprivate

Definition at line 192 of file streaming-decoder.cc.

◆ ProcessModuleHeader()

void v8::internal::wasm::AsyncStreamingDecoder::ProcessModuleHeader ( )
inlineprivate

Definition at line 164 of file streaming-decoder.cc.

◆ ProcessSection()

void v8::internal::wasm::AsyncStreamingDecoder::ProcessSection ( SectionBuffer * buffer)
inlineprivate

Definition at line 169 of file streaming-decoder.cc.

Here is the call graph for this function:

◆ StartCodeSection()

void v8::internal::wasm::AsyncStreamingDecoder::StartCodeSection ( int num_functions,
std::shared_ptr< WireBytesStorage > wire_bytes_storage,
int code_section_start,
int code_section_length )
inlineprivate

Definition at line 179 of file streaming-decoder.cc.

◆ ToErrorState()

std::unique_ptr< DecodingState > v8::internal::wasm::AsyncStreamingDecoder::ToErrorState ( )
inlineprivate

Definition at line 159 of file streaming-decoder.cc.

Member Data Documentation

◆ code_section_processed_

bool v8::internal::wasm::AsyncStreamingDecoder::code_section_processed_ = false
private

Definition at line 222 of file streaming-decoder.cc.

◆ failed_processor_

std::unique_ptr<StreamingProcessor> v8::internal::wasm::AsyncStreamingDecoder::failed_processor_
private

Definition at line 219 of file streaming-decoder.cc.

◆ full_wire_bytes_

std::vector<std::vector<uint8_t> > v8::internal::wasm::AsyncStreamingDecoder::full_wire_bytes_ {{}}
private

Definition at line 229 of file streaming-decoder.cc.

◆ module_offset_

uint32_t v8::internal::wasm::AsyncStreamingDecoder::module_offset_ = 0
private

Definition at line 223 of file streaming-decoder.cc.

◆ processor_

std::unique_ptr<StreamingProcessor> v8::internal::wasm::AsyncStreamingDecoder::processor_
private

Definition at line 218 of file streaming-decoder.cc.

◆ section_buffers_

std::vector<std::shared_ptr<SectionBuffer> > v8::internal::wasm::AsyncStreamingDecoder::section_buffers_
private

Definition at line 221 of file streaming-decoder.cc.

◆ state_

std::unique_ptr<DecodingState> v8::internal::wasm::AsyncStreamingDecoder::state_
private

Definition at line 220 of file streaming-decoder.cc.


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