Conversation
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
lambdai
left a comment
There was a problem hiding this comment.
Everything is good except for that I don't dare to look into the core v8.cc
Will get back to you next week.
| } else if (wasm_vm == WasmVmNames::get().Wavm) { | ||
| return Wavm::createVm(); | ||
| } else { | ||
| UNREFERENCED_PARAMETER(wasm_vm); |
There was a problem hiding this comment.
Why wasm_vm is unreferenced? It is in above ifs
There was a problem hiding this comment.
Good catch. This was a leftover from another change that is allowing selection of one of the VMs (or none) at the build-time.
| tar -zxf cmake-3.12.3-Linux-x86_64.tar.gz -C /usr --strip-components=1 | ||
| # Install ninja 1.8.2. | ||
| curl -sLO https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip | ||
| echo "d2fea9ff33b3ef353161ed906f260d565ca55b8ca0568fa07b1d2cab90a84a07 ninja-linux.zip" | sha256sum --check |
There was a problem hiding this comment.
Reason? Do we need >= 1.8.2 or <=1.8.2 in this case?
|
|
||
| // Helper functions. | ||
|
|
||
| const char* printValKind(wasm::ValKind kind) { |
There was a problem hiding this comment.
Hmm, I guess this is not supposed be prepared for ADL, maybe you wanna declare it static, or put in anonymous namespace
| } | ||
| } | ||
|
|
||
| std::string printValTypes(const wasm::vec<wasm::ValType*>& types) { |
| return s; | ||
| } | ||
|
|
||
| bool equalValTypes(const wasm::vec<wasm::ValType*>& left, const wasm::vec<wasm::ValType*>& right) { |
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
| absl::StrCat("vm_config:\n vm: \"envoy.wasm.vm.wavm\"\n", " code: { inline_bytes: \"", | ||
| Base64::encode(code.data(), code.size()), "\" }\n"); | ||
| const std::string yaml = absl::StrCat(R"EOF( | ||
| vm_config: |
There was a problem hiding this comment.
To be honest, I'd rather leave it as-is.
| ASSERT(std::isnan(emscripten_NaN_->get())); | ||
| ASSERT(std::isinf(emscripten_Infinity_->get())); | ||
| // TODO(PiotrSikora): re-enable those checks after v8 starts returning globals. | ||
| // ASSERT(std::isnan(emscripten_NaN_->get())); |
There was a problem hiding this comment.
I did & I didn't... This is something I forgot to discuss with you yesterday.
The way globals are implemented in V8, the VM retains ownership of the global instance (same as functions), but the current model passes ownership back to the abstraction layer, where it's never used (other than for those 2 asserts). Do we need to do that?
There was a problem hiding this comment.
There should be a way to get the value from v8 for a global so that the Global object is just a proxy for calls into v8?
There was a problem hiding this comment.
I could add a proxy, yes... My point is, that's an extra code that doesn't provide any value, since we never access globals from the host (outside of those 2 asserts).
There was a problem hiding this comment.
Depending on how and whether we end up supporting threads in the context of emscripten we may need to modify the internal emscripten value stack variables. So, while we are not using the globals right now it doesn't mean we will not use them in the future. That said, we don't need the support right now and I'd rather get v8 in, so let's leave a TODO and add it to the spreadsheet and resolve this conversation :)
There was a problem hiding this comment.
Added proxy, let me know if this works for you.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
|
@jplevyak @silentdai Please take another pass, I think all comments were addressed and this should be good to go. Thanks! |
|
Let's get this in so I can do the merge and get the null vm in before kubecon. |
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Piotr Sikora piotrsikora@google.com