Commit 9eebd147 authored by Manos Koukoutos's avatar Manos Koukoutos Committed by V8 LUCI CQ

[wasm][comment] Explain magic wasm-to-js wrapper parameter

Change-Id: Ic0edb4a424b7358a40c54984f0f56f5c0ba05b09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930171
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75045}
parent 191b637f
......@@ -6848,7 +6848,12 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
return false;
}
// The callable is passed as the last parameter, after Wasm arguments.
// The Wasm-to-JS wrapper gets passed a pair of (instance, JS callable) in
// parameter kWasmInstanceParameterIndex, instead of just the instance, like
// most wasm functions. In {CodeGenerator::AssembleConstructFrame}, the pair
// expanded into kWasmInstanceRegister and kJSFunctionRegister. The TF call
// descriptor for import wrappers is then adapted to contain an additional
// parameter mapped to kJSFunctionRegister (in {GetWasmCallDescriptor}).
Node* callable_node = Param(wasm_count + 1);
Node* undefined_node = UndefinedValue();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment