Lines Matching defs:streaming
5 #include "src/wasm/streaming-decoder.h"
126 virtual size_t ReadBytes(AsyncStreamingDecoder* streaming,
129 // Returns the next state of the streaming decoding.
131 AsyncStreamingDecoder* streaming) = 0;
137 // A flag to indicate if finishing the streaming decoder is allowed without
254 AsyncStreamingDecoder* streaming, base::Vector<const uint8_t> bytes) {
381 size_t ReadBytes(AsyncStreamingDecoder* streaming,
385 AsyncStreamingDecoder* streaming) override;
388 AsyncStreamingDecoder* streaming) = 0;
407 AsyncStreamingDecoder* streaming) override;
427 AsyncStreamingDecoder* streaming) override;
443 AsyncStreamingDecoder* streaming) override;
459 AsyncStreamingDecoder* streaming) override;
472 AsyncStreamingDecoder* streaming) override;
492 AsyncStreamingDecoder* streaming) override;
519 AsyncStreamingDecoder* streaming) override;
530 AsyncStreamingDecoder* streaming, base::Vector<const uint8_t> bytes) {
538 streaming->module_offset() - static_cast<uint32_t>(offset()));
544 streaming->Error(decoder.error());
565 AsyncStreamingDecoder::DecodeVarInt32::Next(AsyncStreamingDecoder* streaming) {
566 if (!streaming->ok()) return nullptr;
572 return streaming->Error(oss.str());
575 return NextWithValue(streaming);
580 AsyncStreamingDecoder* streaming) {
582 streaming->ProcessModuleHeader();
583 if (!streaming->ok()) return nullptr;
584 return std::make_unique<DecodeSectionID>(streaming->module_offset());
588 AsyncStreamingDecoder::DecodeSectionID::Next(AsyncStreamingDecoder* streaming) {
594 if (streaming->code_section_processed_) {
596 // for non-streaming decoding. Bring them in sync and test.
597 return streaming->Error("code section can only appear once");
599 streaming->code_section_processed_ = true;
606 AsyncStreamingDecoder* streaming) {
609 streaming->CreateNewBuffer(module_offset_, section_id_, value_,
614 return streaming->Error("code section cannot have size 0");
618 streaming->ProcessSection(buf);
619 if (!streaming->ok()) return nullptr;
621 return std::make_unique<DecodeSectionID>(streaming->module_offset_);
633 AsyncStreamingDecoder* streaming) {
635 streaming->ProcessSection(section_buffer_);
636 if (!streaming->ok()) return nullptr;
637 return std::make_unique<DecodeSectionID>(streaming->module_offset());
642 AsyncStreamingDecoder* streaming) {
647 return streaming->Error("invalid code section length");
654 return streaming->Error("not all code section bytes were used");
656 return std::make_unique<DecodeSectionID>(streaming->module_offset());
666 streaming->StartCodeSection(static_cast<int>(value_),
667 streaming->section_buffers_.back(),
669 if (!streaming->ok()) return nullptr;
677 AsyncStreamingDecoder* streaming) {
683 return streaming->Error("read past code section end");
688 if (value_ == 0) return streaming->Error("invalid function length (0)");
691 return streaming->Error("not enough code section bytes");
696 num_remaining_functions_, streaming->module_offset());
701 AsyncStreamingDecoder* streaming) {
703 streaming->ProcessFunctionBody(buffer(), module_offset_);
704 if (!streaming->ok()) return nullptr;
713 return streaming->Error("not all code section bytes were used");
715 return std::make_unique<DecodeSectionID>(streaming->module_offset());