v8 patch - attempting to apply to current tree - apparent regressions.
Trying to apply the v8 patch you have here to the current tree. I get this (below).
Also, seems the BUILD.gn patch is out of date. Patches into v8_source_set("v8_base_without_compiler") now if I'm following correctly.
Build system: Windows, vs2019 Build command : ninja -C out.gn/x64.release
/wasm-v8-lowlevel.cc /Foobj/v8_base_without_compiler/wasm-v8-lowlevel.obj /Fd"obj/v8_base_without_compiler_cc.pdb" ../../src/wasm-v8-lowlevel.cc(133,3): error: statement requires expression of integer type ('v8::internal::wasm::ValueType' invalid) switch (v8_valtype) { ^ ~~~~~~~~~~ ../../src/wasm-v8-lowlevel.cc(148,36): error: cannot initialize a variable of type 'v8::internal::wasm::FunctionSig *' (aka 'Signaturev8::internal::wasm::ValueType *') with an lvalue of type 'const v8::internal::wasm::FunctionSig *const' (aka 'const Signaturev8::internal::wasm::ValueType const') v8::internal::wasm::FunctionSig sig = ^ ../../src/wasm-v8-lowlevel.cc(156,36): error: cannot initialize a variable of type 'v8::internal::wasm::FunctionSig *' (aka 'Signaturev8::internal::wasm::ValueType *') with an lvalue of type 'const v8::internal::wasm::FunctionSig *const' (aka 'const Signaturev8::internal::wasm::ValueType const') v8::internal::wasm::FunctionSig sig = ^ ../../src/wasm-v8-lowlevel.cc(164,36): error: cannot initialize a variable of type 'v8::internal::wasm::FunctionSig *' (aka 'Signaturev8::internal::wasm::ValueType *') with an lvalue of type 'const v8::internal::wasm::FunctionSig *const' (aka 'const Signaturev8::internal::wasm::ValueType const') v8::internal::wasm::FunctionSig sig = ^ ../../src/wasm-v8-lowlevel.cc(172,36): error: cannot initialize a variable of type 'v8::internal::wasm::FunctionSig *' (aka 'Signaturev8::internal::wasm::ValueType *') with an lvalue of type 'const v8::internal::wasm::FunctionSig const' (aka 'const Signaturev8::internal::wasm::ValueType const') v8::internal::wasm::FunctionSig sig = ^ ../../src/wasm-v8-lowlevel.cc(251,62): error: too few arguments to function call, expected 4, have 3 {reinterpret_cast<const uint8_t>(binary), binary_size}); ^ ../../src/wasm/wasm-serialization.h(53,49): note: 'DeserializeNativeModule' declared here V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> DeserializeNativeModule( ^ ../../src/wasm-v8-lowlevel.cc(359,13): error: comparison of integers of different signs: 'size_t' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare] if (index > v8_table->current_length()) return v8::MaybeLocalv8::Value(); ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/wasm-v8-lowlevel.cc(374,13): error: comparison of integers of different signs: 'size_t' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare] if (index >= v8_table->current_length()) return false; ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/wasm-v8-lowlevel.cc(139,30): error: no member named 'kWasmAnyFunc' in namespace 'v8::internal::wasm' case v8::internal::wasm::kWasmAnyFunc: return FUNCREF; ~~~~~~~~~~~~~~~~~~~~^ 9 errors generated. ninja: build stopped: subcommand failed.
I don't think it's necessary to patch v8 anymore, it has support upstream for the wasm-c-api.
Nice to know. Please could the docs here show that so noobs don't go doing things that don't need doing :) Or remove the section altogether if it's outdated.