Open adv-sw opened 4 years ago
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.
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) { ^ ') with an lvalue of type 'const v8::internal::wasm::FunctionSig const' (aka 'const Signature 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 'Signature ') with an lvalue of type 'const v8::internal::wasm::FunctionSig const' (aka 'const Signature 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 'Signature ') with an lvalue of type 'const v8::internal::wasm::FunctionSig const' (aka 'const Signature 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 'Signature ') with an lvalue of type 'const v8::internal::wasm::FunctionSig const' (aka 'const Signature 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 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::MaybeLocal();
~~../../src/wasm-v8-lowlevel.cc(148,36): error: cannot initialize a variable of type 'v8::internal::wasm::FunctionSig ' (aka 'Signature