#include "include/libplatform/libplatform.h"
#include "src/api/api-inl.h"
#include "src/base/vector.h"
#include "src/handles/global-handles-inl.h"
#include "src/init/v8.h"
#include "src/objects/managed.h"
#include "src/objects/objects-inl.h"
#include "src/wasm/module-compiler.h"
#include "src/wasm/module-decoder.h"
#include "src/wasm/streaming-decoder.h"
#include "src/wasm/wasm-engine.h"
#include "src/wasm/wasm-module-builder.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects-inl.h"
#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-serialization.h"
#include "test/cctest/cctest.h"
#include "test/common/wasm/flag-utils.h"
#include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h"
#include "test/common/wasm/wasm-module-runner.h"
namespace v8::internal::wasm {
class MockPlatform final : public TestPlatform { … };
namespace {
enum class CompilationState { … };
class TestResolver : public CompilationResultResolver { … };
class StreamTester { … };
}
#define RUN_STREAM(name) …
#define STREAM_TEST …
constexpr const char* kExportNames[] = …;
ZoneBuffer GetValidModuleBytes(Zone* zone) { … }
ZoneBuffer GetValidCompiledModuleBytes(v8::Isolate* isolate, Zone* zone,
ZoneBuffer wire_bytes) { … }
STREAM_TEST(TestAllBytesArriveImmediatelyStreamFinishesFirst) { … }
STREAM_TEST(TestAllBytesArriveAOTCompilerFinishesFirst) { … }
size_t GetFunctionOffset(i::Isolate* isolate, base::Vector<const uint8_t> bytes,
size_t index) { … }
STREAM_TEST(TestCutAfterOneFunctionStreamFinishesFirst) { … }
STREAM_TEST(TestCutAfterOneFunctionCompilerFinishesFirst) { … }
ZoneBuffer GetModuleWithInvalidSection(Zone* zone) { … }
STREAM_TEST(TestErrorInSectionStreamFinishesFirst) { … }
STREAM_TEST(TestErrorInSectionCompilerFinishesFirst) { … }
STREAM_TEST(TestErrorInSectionWithCuts) { … }
ZoneBuffer GetModuleWithInvalidSectionSize(Zone* zone) { … }
STREAM_TEST(TestErrorInSectionSizeStreamFinishesFirst) { … }
STREAM_TEST(TestErrorInSectionSizeCompilerFinishesFirst) { … }
STREAM_TEST(TestErrorInSectionSizeWithCuts) { … }
STREAM_TEST(TestErrorInCodeSectionDetectedByModuleDecoder) { … }
STREAM_TEST(TestSectionOrderErrorWithEmptyCodeSection) { … }
STREAM_TEST(TestSectionOrderErrorWithNonEmptyCodeSection) { … }
STREAM_TEST(TestErrorInCodeSectionDetectedByStreamingDecoder) { … }
STREAM_TEST(TestErrorInCodeSectionDetectedByCompiler) { … }
STREAM_TEST(TestAbortImmediately) { … }
STREAM_TEST(TestAbortWithinSection1) { … }
STREAM_TEST(TestAbortWithinSection2) { … }
STREAM_TEST(TestAbortAfterSection) { … }
STREAM_TEST(TestAbortAfterFunctionsCount1) { … }
STREAM_TEST(TestAbortAfterFunctionsCount2) { … }
STREAM_TEST(TestAbortAfterFunctionGotCompiled1) { … }
STREAM_TEST(TestAbortAfterFunctionGotCompiled2) { … }
STREAM_TEST(TestAbortAfterCodeSection1) { … }
STREAM_TEST(TestAbortAfterCodeSection2) { … }
STREAM_TEST(TestAbortAfterCompilationError1) { … }
STREAM_TEST(TestAbortAfterCompilationError2) { … }
STREAM_TEST(TestOnlyModuleHeader) { … }
STREAM_TEST(TestModuleWithZeroFunctions) { … }
STREAM_TEST(TestModuleWithMultipleFunctions) { … }
STREAM_TEST(TestModuleWithDataSection) { … }
STREAM_TEST(TestModuleWithImportedFunction) { … }
STREAM_TEST(TestIncrementalCaching) { … }
STREAM_TEST(TestModuleWithErrorAfterDataSection) { … }
STREAM_TEST(TestDeserializationBypassesCompilation) { … }
STREAM_TEST(TestDeserializationFails) { … }
STREAM_TEST(TestFunctionSectionWithoutCodeSection) { … }
STREAM_TEST(TestMoreFunctionsCanBeSerializedCallback) { … }
STREAM_TEST(TestMoreFunctionsCanBeSerializedCallbackWithTimeout) { … }
STREAM_TEST(TestHardCachingThreshold) { … }
STREAM_TEST(TestCompileErrorFunctionName) { … }
STREAM_TEST(TestSetModuleCodeSection) { … }
STREAM_TEST(TestProfilingMidStreaming) { … }
STREAM_TEST(TierDownWithError) { … }
STREAM_TEST(Regress1334651) { … }
#undef STREAM_TEST
}