chromium/v8/test/cctest/wasm/test-gc.cc

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stdint.h>

#include "src/base/vector.h"
#include "src/codegen/signature.h"
#include "src/wasm/module-decoder.h"
#include "src/wasm/struct-types.h"
#include "src/wasm/wasm-arguments.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-opcodes.h"
#include "test/cctest/cctest.h"
#include "test/cctest/wasm/wasm-run-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 {
namespace internal {
namespace wasm {
namespace test_gc {

F;

class WasmGCTester {};

ValueType ref(uint32_t type_index) {}
ValueType refNull(uint32_t type_index) {}

WASM_COMPILED_EXEC_TEST(WasmBasicStruct) {}

// Test struct.get, ref.as_non_null and ref-typed globals.
WASM_COMPILED_EXEC_TEST(WasmRefAsNonNull) {}

WASM_COMPILED_EXEC_TEST(WasmRefAsNonNullSkipCheck) {}

WASM_COMPILED_EXEC_TEST(WasmBrOnNull) {}

WASM_COMPILED_EXEC_TEST(WasmBrOnNonNull) {}

WASM_COMPILED_EXEC_TEST(RefCast) {}

WASM_COMPILED_EXEC_TEST(RefCastNoChecks) {}

WASM_COMPILED_EXEC_TEST(BrOnCast) {}

WASM_COMPILED_EXEC_TEST(BrOnCastFail) {}

WASM_COMPILED_EXEC_TEST(WasmRefEq) {}

WASM_COMPILED_EXEC_TEST(WasmPackedStructU) {}

WASM_COMPILED_EXEC_TEST(WasmPackedStructS) {}

WASM_COMPILED_EXEC_TEST(WasmBasicArray) {}

WASM_COMPILED_EXEC_TEST(WasmPackedArrayU) {}

WASM_COMPILED_EXEC_TEST(WasmPackedArrayS) {}

WASM_COMPILED_EXEC_TEST(WasmArrayCopy) {}

WASM_COMPILED_EXEC_TEST(NewDefault) {}

WASM_COMPILED_EXEC_TEST(RefTrivialCastsStatic) {}

WASM_COMPILED_EXEC_TEST(TrivialAbstractCasts) {}

WASM_COMPILED_EXEC_TEST(ArrayNewMap) {}

WASM_COMPILED_EXEC_TEST(FunctionRefs) {}

WASM_COMPILED_EXEC_TEST(CallRef) {}

// Test that calling a function expecting any ref accepts the abstract null
// type argument (nullref, nullfuncref, nullexternref).
WASM_COMPILED_EXEC_TEST(CallAbstractNullTypeImplicitConversion) {}

WASM_COMPILED_EXEC_TEST(CastNullRef) {}

WASM_COMPILED_EXEC_TEST(CallReftypeParameters) {}

WASM_COMPILED_EXEC_TEST(AbstractTypeChecks) {}

// This flushed out a few bugs, so it serves as a regression test. It can also
// be modified (made to run longer) to measure performance of casts.
WASM_COMPILED_EXEC_TEST(CastsBenchmark) {}

WASM_COMPILED_EXEC_TEST(GlobalInitReferencingGlobal) {}

WASM_COMPILED_EXEC_TEST(GCTables) {}

WASM_COMPILED_EXEC_TEST(JsAccess) {}

WASM_COMPILED_EXEC_TEST(WasmAnyConvertExtern) {}

WASM_COMPILED_EXEC_TEST(WasmExternConvertAny) {}

}  // namespace test_gc
}  // namespace wasm
}  // namespace internal
}  // namespace v8