[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: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75045}
This commit is contained in:
parent
191b637f28
commit
9eebd147c0
@ -6848,7 +6848,12 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
|||||||
return false;
|
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* callable_node = Param(wasm_count + 1);
|
||||||
|
|
||||||
Node* undefined_node = UndefinedValue();
|
Node* undefined_node = UndefinedValue();
|
||||||
|
Loading…
Reference in New Issue
Block a user