2015-12-11 12:26:16 +00:00
|
|
|
// Copyright 2015 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef TEST_SIGNATURES_H
|
|
|
|
#define TEST_SIGNATURES_H
|
|
|
|
|
2019-05-21 09:30:15 +00:00
|
|
|
#include "src/codegen/signature.h"
|
2018-10-12 09:16:54 +00:00
|
|
|
#include "src/wasm/value-type.h"
|
2015-12-11 12:26:16 +00:00
|
|
|
#include "src/wasm/wasm-opcodes.h"
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
namespace wasm {
|
|
|
|
|
|
|
|
// A helper class with many useful signatures in order to simplify tests.
|
|
|
|
class TestSignatures {
|
|
|
|
public:
|
|
|
|
TestSignatures()
|
|
|
|
: sig_i_v(1, 0, kIntTypes4),
|
|
|
|
sig_i_i(1, 1, kIntTypes4),
|
|
|
|
sig_i_ii(1, 2, kIntTypes4),
|
|
|
|
sig_i_iii(1, 3, kIntTypes4),
|
|
|
|
sig_i_f(1, 1, kIntFloatTypes4),
|
|
|
|
sig_i_ff(1, 2, kIntFloatTypes4),
|
|
|
|
sig_i_d(1, 1, kIntDoubleTypes4),
|
|
|
|
sig_i_dd(1, 2, kIntDoubleTypes4),
|
2020-06-19 03:50:08 +00:00
|
|
|
sig_i_e(1, 1, kIntExternRefTypes4),
|
|
|
|
sig_i_ee(1, 2, kIntExternRefTypes4),
|
|
|
|
sig_i_c(1, 1, kIntFuncRefTypes4),
|
2020-01-16 22:40:06 +00:00
|
|
|
sig_i_s(1, 1, kIntSimd128Types4),
|
2015-12-11 12:26:16 +00:00
|
|
|
sig_l_v(1, 0, kLongTypes4),
|
|
|
|
sig_l_l(1, 1, kLongTypes4),
|
|
|
|
sig_l_ll(1, 2, kLongTypes4),
|
|
|
|
sig_i_ll(1, 2, kIntLongTypes4),
|
2016-09-12 10:16:06 +00:00
|
|
|
sig_f_f(1, 1, kFloatTypes4),
|
2015-12-11 12:26:16 +00:00
|
|
|
sig_f_ff(1, 2, kFloatTypes4),
|
2016-09-12 10:16:06 +00:00
|
|
|
sig_d_d(1, 1, kDoubleTypes4),
|
2015-12-11 12:26:16 +00:00
|
|
|
sig_d_dd(1, 2, kDoubleTypes4),
|
2020-06-19 03:50:08 +00:00
|
|
|
sig_e_v(1, 0, kExternRefTypes4),
|
|
|
|
sig_c_v(1, 0, kFuncTypes4),
|
|
|
|
sig_e_e(1, 1, kExternRefTypes4),
|
|
|
|
sig_c_c(1, 1, kFuncTypes4),
|
2015-12-11 12:26:16 +00:00
|
|
|
sig_v_v(0, 0, kIntTypes4),
|
|
|
|
sig_v_i(0, 1, kIntTypes4),
|
|
|
|
sig_v_ii(0, 2, kIntTypes4),
|
2016-07-16 03:49:45 +00:00
|
|
|
sig_v_iii(0, 3, kIntTypes4),
|
2020-06-19 03:50:08 +00:00
|
|
|
sig_v_e(0, 1, kExternRefTypes4),
|
|
|
|
sig_v_c(0, 1, kFuncTypes4),
|
[compiler] Re-reland "Faster JS-to-Wasm calls"
This is a reland of 6ada6a90ee387d8de183208b0ef8b786f1768665
- Fixed a GC issue
https://bugs.chromium.org/p/v8/issues/detail?id=11335:
GC expected all arguments on the stack from code with
CodeKind::TURBOFAN to be tagged objects. This is not the case now with
inlined Wasm calls, and this information can be passed in
SafepointEntry for each call site.
- Disabled JS-to-Wasm inlining for calls inside try/catch.
For more details, see updated doc:
https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
Bug: v8:11092
Original change's description:
> Reland "Faster JS-to-Wasm calls"
>
> This is a reland of 860fcb1bd2bd6447e08f3636874ac7abcd77b781
>
> - Disabled the tests for this feature in V8-lite mode (the original
> change broke V8-lite tests).
> - Also modified test console-profile-wasm.js that was brittle with this
> change because it assumed that there was always a JS-to-Wasm wrapper
> but this is not the case when the TurboFan compilation completes before
> the Liftoff-compiled code starts to run.
>
> More changes in Patchset 8:
>
> - Moved inlining of the "JSToWasm Wrapper" away from simplified-lowering,
> into a new phase, wasm-inlining that reuses the JSInliner reducer.
> The doc
> https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
> describes the new logic.
>
> - Fixed a couple of small issues in wasm_compiler.cc to make sure that
> the graph "JSToWasm Wrapper" subgraph has a valid Control chain;
> this should solve the problem we had inlining the calls in functions
> that can throw exception.
Original change's description:
> Faster JS-to-Wasm calls
>
> This replaces https://chromium-review.googlesource.com/c/v8/v8/+/2376165/.
>
> Currently JS-to-Wasm calls go through a wrapper/trampoline, built on
> the basis of the signature of a Wasm function to call, and whose task
> is to:
> - set "thread_in_wasm_flag" to true
> - convert the arguments from tagged types into Wasm native types
> - calculate the address of the Wasm function to call and call it
> - convert back the result from Wasm native types into tagged types
> - reset "thread_in_wasm_flag" to false.
>
> This CL tries to improve the performance of JS-to-Wasm calls by
> inlining the code of the JS-to-Wasm wrappers in the call site.
>
> It introduces a new IR operand, JSWasmCall, which replaces JSCall for
> this kind of calls. A 'JSWasmCall' node is associated to
> WasmCallParameters, which contain information about the signature of
> the Wasm function to call.
>
> WasmWrapperGraphBuilder::BuildJSToWasmWrapper is modified to avoid
> generating code to convert the types for the arguments
> of the Wasm function, when the conversion is not necessary.
> The actual inlining of the graph generated for this wrapper happens in
> the simplified-lowering phase.
>
> A new builtin, JSToWasmLazyDeoptContinuation, is introduced to manage
> lazy deoptimizations that can happen if the Wasm function callee calls
> back some JS code that invalidates the compiled JS caller function.
>
Bug: v8:11092
Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Change-Id: Ie052634598754feab4ff36d10fd04e008b5227a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649777
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72541}
2021-02-04 15:46:10 +00:00
|
|
|
sig_v_d(0, 1, kDoubleTypes4),
|
2017-10-11 13:01:17 +00:00
|
|
|
sig_s_i(1, 1, kSimd128IntTypes4),
|
2020-09-03 17:28:44 +00:00
|
|
|
sig_s_s(1, 1, kSimd128Types4),
|
2020-09-10 20:56:27 +00:00
|
|
|
sig_s_ss(1, 2, kSimd128Types4),
|
2017-10-11 13:01:17 +00:00
|
|
|
sig_ii_v(2, 0, kIntTypes4),
|
|
|
|
sig_iii_v(3, 0, kIntTypes4) {
|
2015-12-11 12:26:16 +00:00
|
|
|
// I used C++ and you won't believe what happened next....
|
2016-12-21 13:43:00 +00:00
|
|
|
for (int i = 0; i < 4; i++) kIntTypes4[i] = kWasmI32;
|
|
|
|
for (int i = 0; i < 4; i++) kLongTypes4[i] = kWasmI64;
|
|
|
|
for (int i = 0; i < 4; i++) kFloatTypes4[i] = kWasmF32;
|
|
|
|
for (int i = 0; i < 4; i++) kDoubleTypes4[i] = kWasmF64;
|
2020-06-19 03:50:08 +00:00
|
|
|
for (int i = 0; i < 4; i++) kExternRefTypes4[i] = kWasmExternRef;
|
2019-07-08 20:23:30 +00:00
|
|
|
for (int i = 0; i < 4; i++) kFuncTypes4[i] = kWasmFuncRef;
|
2019-05-03 08:06:10 +00:00
|
|
|
for (int i = 1; i < 4; i++) kIntLongTypes4[i] = kWasmI64;
|
|
|
|
for (int i = 1; i < 4; i++) kIntFloatTypes4[i] = kWasmF32;
|
|
|
|
for (int i = 1; i < 4; i++) kIntDoubleTypes4[i] = kWasmF64;
|
2020-06-09 15:54:14 +00:00
|
|
|
for (int i = 1; i < 4; i++) kIntExternRefTypes4[i] = kWasmExternRef;
|
2019-07-08 20:23:30 +00:00
|
|
|
for (int i = 1; i < 4; i++) kIntFuncRefTypes4[i] = kWasmFuncRef;
|
2020-09-03 17:28:44 +00:00
|
|
|
for (int i = 0; i < 4; i++) kSimd128Types4[i] = kWasmS128;
|
2020-01-16 22:40:06 +00:00
|
|
|
for (int i = 1; i < 4; i++) kIntSimd128Types4[i] = kWasmS128;
|
2016-12-21 13:43:00 +00:00
|
|
|
for (int i = 0; i < 4; i++) kSimd128IntTypes4[i] = kWasmS128;
|
|
|
|
kIntLongTypes4[0] = kWasmI32;
|
|
|
|
kIntFloatTypes4[0] = kWasmI32;
|
|
|
|
kIntDoubleTypes4[0] = kWasmI32;
|
2020-06-09 15:54:14 +00:00
|
|
|
kIntExternRefTypes4[0] = kWasmI32;
|
2019-07-08 20:23:30 +00:00
|
|
|
kIntFuncRefTypes4[0] = kWasmI32;
|
2020-01-16 22:40:06 +00:00
|
|
|
kIntSimd128Types4[0] = kWasmI32;
|
2016-12-21 13:43:00 +00:00
|
|
|
kSimd128IntTypes4[1] = kWasmI32;
|
2015-12-11 12:26:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FunctionSig* i_v() { return &sig_i_v; }
|
|
|
|
FunctionSig* i_i() { return &sig_i_i; }
|
|
|
|
FunctionSig* i_ii() { return &sig_i_ii; }
|
|
|
|
FunctionSig* i_iii() { return &sig_i_iii; }
|
|
|
|
|
|
|
|
FunctionSig* i_f() { return &sig_i_f; }
|
|
|
|
FunctionSig* i_ff() { return &sig_i_ff; }
|
|
|
|
FunctionSig* i_d() { return &sig_i_d; }
|
|
|
|
FunctionSig* i_dd() { return &sig_i_dd; }
|
|
|
|
|
|
|
|
FunctionSig* l_v() { return &sig_l_v; }
|
|
|
|
FunctionSig* l_l() { return &sig_l_l; }
|
|
|
|
FunctionSig* l_ll() { return &sig_l_ll; }
|
|
|
|
FunctionSig* i_ll() { return &sig_i_ll; }
|
2020-06-19 03:50:08 +00:00
|
|
|
FunctionSig* i_e() { return &sig_i_e; }
|
|
|
|
FunctionSig* i_ee() { return &sig_i_ee; }
|
|
|
|
FunctionSig* i_c() { return &sig_i_c; }
|
2020-01-16 22:40:06 +00:00
|
|
|
FunctionSig* i_s() { return &sig_i_s; }
|
2015-12-11 12:26:16 +00:00
|
|
|
|
2016-09-12 10:16:06 +00:00
|
|
|
FunctionSig* f_f() { return &sig_f_f; }
|
2015-12-11 12:26:16 +00:00
|
|
|
FunctionSig* f_ff() { return &sig_f_ff; }
|
2016-09-12 10:16:06 +00:00
|
|
|
FunctionSig* d_d() { return &sig_d_d; }
|
2015-12-11 12:26:16 +00:00
|
|
|
FunctionSig* d_dd() { return &sig_d_dd; }
|
|
|
|
|
2020-06-19 03:50:08 +00:00
|
|
|
FunctionSig* e_v() { return &sig_e_v; }
|
|
|
|
FunctionSig* a_v() { return &sig_c_v; }
|
|
|
|
FunctionSig* e_e() { return &sig_e_e; }
|
|
|
|
FunctionSig* c_c() { return &sig_c_c; }
|
2018-03-23 10:53:57 +00:00
|
|
|
|
2015-12-11 12:26:16 +00:00
|
|
|
FunctionSig* v_v() { return &sig_v_v; }
|
|
|
|
FunctionSig* v_i() { return &sig_v_i; }
|
|
|
|
FunctionSig* v_ii() { return &sig_v_ii; }
|
|
|
|
FunctionSig* v_iii() { return &sig_v_iii; }
|
2020-06-19 03:50:08 +00:00
|
|
|
FunctionSig* v_e() { return &sig_v_e; }
|
|
|
|
FunctionSig* v_c() { return &sig_v_c; }
|
[compiler] Re-reland "Faster JS-to-Wasm calls"
This is a reland of 6ada6a90ee387d8de183208b0ef8b786f1768665
- Fixed a GC issue
https://bugs.chromium.org/p/v8/issues/detail?id=11335:
GC expected all arguments on the stack from code with
CodeKind::TURBOFAN to be tagged objects. This is not the case now with
inlined Wasm calls, and this information can be passed in
SafepointEntry for each call site.
- Disabled JS-to-Wasm inlining for calls inside try/catch.
For more details, see updated doc:
https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
Bug: v8:11092
Original change's description:
> Reland "Faster JS-to-Wasm calls"
>
> This is a reland of 860fcb1bd2bd6447e08f3636874ac7abcd77b781
>
> - Disabled the tests for this feature in V8-lite mode (the original
> change broke V8-lite tests).
> - Also modified test console-profile-wasm.js that was brittle with this
> change because it assumed that there was always a JS-to-Wasm wrapper
> but this is not the case when the TurboFan compilation completes before
> the Liftoff-compiled code starts to run.
>
> More changes in Patchset 8:
>
> - Moved inlining of the "JSToWasm Wrapper" away from simplified-lowering,
> into a new phase, wasm-inlining that reuses the JSInliner reducer.
> The doc
> https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
> describes the new logic.
>
> - Fixed a couple of small issues in wasm_compiler.cc to make sure that
> the graph "JSToWasm Wrapper" subgraph has a valid Control chain;
> this should solve the problem we had inlining the calls in functions
> that can throw exception.
Original change's description:
> Faster JS-to-Wasm calls
>
> This replaces https://chromium-review.googlesource.com/c/v8/v8/+/2376165/.
>
> Currently JS-to-Wasm calls go through a wrapper/trampoline, built on
> the basis of the signature of a Wasm function to call, and whose task
> is to:
> - set "thread_in_wasm_flag" to true
> - convert the arguments from tagged types into Wasm native types
> - calculate the address of the Wasm function to call and call it
> - convert back the result from Wasm native types into tagged types
> - reset "thread_in_wasm_flag" to false.
>
> This CL tries to improve the performance of JS-to-Wasm calls by
> inlining the code of the JS-to-Wasm wrappers in the call site.
>
> It introduces a new IR operand, JSWasmCall, which replaces JSCall for
> this kind of calls. A 'JSWasmCall' node is associated to
> WasmCallParameters, which contain information about the signature of
> the Wasm function to call.
>
> WasmWrapperGraphBuilder::BuildJSToWasmWrapper is modified to avoid
> generating code to convert the types for the arguments
> of the Wasm function, when the conversion is not necessary.
> The actual inlining of the graph generated for this wrapper happens in
> the simplified-lowering phase.
>
> A new builtin, JSToWasmLazyDeoptContinuation, is introduced to manage
> lazy deoptimizations that can happen if the Wasm function callee calls
> back some JS code that invalidates the compiled JS caller function.
>
Bug: v8:11092
Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Change-Id: Ie052634598754feab4ff36d10fd04e008b5227a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649777
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72541}
2021-02-04 15:46:10 +00:00
|
|
|
FunctionSig* v_d() { return &sig_v_d; }
|
2016-07-16 03:49:45 +00:00
|
|
|
FunctionSig* s_i() { return &sig_s_i; }
|
2020-09-03 17:28:44 +00:00
|
|
|
FunctionSig* s_s() { return &sig_s_s; }
|
2020-09-10 20:56:27 +00:00
|
|
|
FunctionSig* s_ss() { return &sig_s_ss; }
|
2015-12-11 12:26:16 +00:00
|
|
|
|
2017-10-11 13:01:17 +00:00
|
|
|
FunctionSig* ii_v() { return &sig_ii_v; }
|
|
|
|
FunctionSig* iii_v() { return &sig_iii_v; }
|
|
|
|
|
2016-12-21 13:43:00 +00:00
|
|
|
FunctionSig* many(Zone* zone, ValueType ret, ValueType param, int count) {
|
2021-03-22 06:56:01 +00:00
|
|
|
FunctionSig::Builder builder(zone, ret == kWasmVoid ? 0 : 1, count);
|
|
|
|
if (ret != kWasmVoid) builder.AddReturn(ret);
|
2016-01-21 16:10:53 +00:00
|
|
|
for (int i = 0; i < count; i++) {
|
|
|
|
builder.AddParam(param);
|
|
|
|
}
|
|
|
|
return builder.Build();
|
|
|
|
}
|
|
|
|
|
2015-12-11 12:26:16 +00:00
|
|
|
private:
|
2016-12-21 13:43:00 +00:00
|
|
|
ValueType kIntTypes4[4];
|
|
|
|
ValueType kLongTypes4[4];
|
|
|
|
ValueType kFloatTypes4[4];
|
|
|
|
ValueType kDoubleTypes4[4];
|
2020-06-19 03:50:08 +00:00
|
|
|
ValueType kExternRefTypes4[4];
|
2019-05-07 11:00:04 +00:00
|
|
|
ValueType kFuncTypes4[4];
|
2016-12-21 13:43:00 +00:00
|
|
|
ValueType kIntLongTypes4[4];
|
|
|
|
ValueType kIntFloatTypes4[4];
|
|
|
|
ValueType kIntDoubleTypes4[4];
|
2020-06-09 15:54:14 +00:00
|
|
|
ValueType kIntExternRefTypes4[4];
|
2019-07-08 20:23:30 +00:00
|
|
|
ValueType kIntFuncRefTypes4[4];
|
2020-09-03 17:28:44 +00:00
|
|
|
ValueType kSimd128Types4[4];
|
2020-01-16 22:40:06 +00:00
|
|
|
ValueType kIntSimd128Types4[4];
|
2016-12-21 13:43:00 +00:00
|
|
|
ValueType kSimd128IntTypes4[4];
|
2015-12-11 12:26:16 +00:00
|
|
|
|
|
|
|
FunctionSig sig_i_v;
|
|
|
|
FunctionSig sig_i_i;
|
|
|
|
FunctionSig sig_i_ii;
|
|
|
|
FunctionSig sig_i_iii;
|
|
|
|
|
|
|
|
FunctionSig sig_i_f;
|
|
|
|
FunctionSig sig_i_ff;
|
|
|
|
FunctionSig sig_i_d;
|
|
|
|
FunctionSig sig_i_dd;
|
2020-06-19 03:50:08 +00:00
|
|
|
FunctionSig sig_i_e;
|
|
|
|
FunctionSig sig_i_ee;
|
|
|
|
FunctionSig sig_i_c;
|
2020-01-16 22:40:06 +00:00
|
|
|
FunctionSig sig_i_s;
|
2015-12-11 12:26:16 +00:00
|
|
|
|
|
|
|
FunctionSig sig_l_v;
|
|
|
|
FunctionSig sig_l_l;
|
|
|
|
FunctionSig sig_l_ll;
|
|
|
|
FunctionSig sig_i_ll;
|
|
|
|
|
2016-09-12 10:16:06 +00:00
|
|
|
FunctionSig sig_f_f;
|
2015-12-11 12:26:16 +00:00
|
|
|
FunctionSig sig_f_ff;
|
2016-09-12 10:16:06 +00:00
|
|
|
FunctionSig sig_d_d;
|
2015-12-11 12:26:16 +00:00
|
|
|
FunctionSig sig_d_dd;
|
|
|
|
|
2020-06-19 03:50:08 +00:00
|
|
|
FunctionSig sig_e_v;
|
|
|
|
FunctionSig sig_c_v;
|
|
|
|
FunctionSig sig_e_e;
|
|
|
|
FunctionSig sig_c_c;
|
2018-03-23 10:53:57 +00:00
|
|
|
|
2015-12-11 12:26:16 +00:00
|
|
|
FunctionSig sig_v_v;
|
|
|
|
FunctionSig sig_v_i;
|
|
|
|
FunctionSig sig_v_ii;
|
|
|
|
FunctionSig sig_v_iii;
|
2020-06-19 03:50:08 +00:00
|
|
|
FunctionSig sig_v_e;
|
|
|
|
FunctionSig sig_v_c;
|
[compiler] Re-reland "Faster JS-to-Wasm calls"
This is a reland of 6ada6a90ee387d8de183208b0ef8b786f1768665
- Fixed a GC issue
https://bugs.chromium.org/p/v8/issues/detail?id=11335:
GC expected all arguments on the stack from code with
CodeKind::TURBOFAN to be tagged objects. This is not the case now with
inlined Wasm calls, and this information can be passed in
SafepointEntry for each call site.
- Disabled JS-to-Wasm inlining for calls inside try/catch.
For more details, see updated doc:
https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
Bug: v8:11092
Original change's description:
> Reland "Faster JS-to-Wasm calls"
>
> This is a reland of 860fcb1bd2bd6447e08f3636874ac7abcd77b781
>
> - Disabled the tests for this feature in V8-lite mode (the original
> change broke V8-lite tests).
> - Also modified test console-profile-wasm.js that was brittle with this
> change because it assumed that there was always a JS-to-Wasm wrapper
> but this is not the case when the TurboFan compilation completes before
> the Liftoff-compiled code starts to run.
>
> More changes in Patchset 8:
>
> - Moved inlining of the "JSToWasm Wrapper" away from simplified-lowering,
> into a new phase, wasm-inlining that reuses the JSInliner reducer.
> The doc
> https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
> describes the new logic.
>
> - Fixed a couple of small issues in wasm_compiler.cc to make sure that
> the graph "JSToWasm Wrapper" subgraph has a valid Control chain;
> this should solve the problem we had inlining the calls in functions
> that can throw exception.
Original change's description:
> Faster JS-to-Wasm calls
>
> This replaces https://chromium-review.googlesource.com/c/v8/v8/+/2376165/.
>
> Currently JS-to-Wasm calls go through a wrapper/trampoline, built on
> the basis of the signature of a Wasm function to call, and whose task
> is to:
> - set "thread_in_wasm_flag" to true
> - convert the arguments from tagged types into Wasm native types
> - calculate the address of the Wasm function to call and call it
> - convert back the result from Wasm native types into tagged types
> - reset "thread_in_wasm_flag" to false.
>
> This CL tries to improve the performance of JS-to-Wasm calls by
> inlining the code of the JS-to-Wasm wrappers in the call site.
>
> It introduces a new IR operand, JSWasmCall, which replaces JSCall for
> this kind of calls. A 'JSWasmCall' node is associated to
> WasmCallParameters, which contain information about the signature of
> the Wasm function to call.
>
> WasmWrapperGraphBuilder::BuildJSToWasmWrapper is modified to avoid
> generating code to convert the types for the arguments
> of the Wasm function, when the conversion is not necessary.
> The actual inlining of the graph generated for this wrapper happens in
> the simplified-lowering phase.
>
> A new builtin, JSToWasmLazyDeoptContinuation, is introduced to manage
> lazy deoptimizations that can happen if the Wasm function callee calls
> back some JS code that invalidates the compiled JS caller function.
>
Bug: v8:11092
Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Change-Id: Ie052634598754feab4ff36d10fd04e008b5227a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649777
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72541}
2021-02-04 15:46:10 +00:00
|
|
|
FunctionSig sig_v_d;
|
2016-07-16 03:49:45 +00:00
|
|
|
FunctionSig sig_s_i;
|
2020-09-03 17:28:44 +00:00
|
|
|
FunctionSig sig_s_s;
|
2020-09-10 20:56:27 +00:00
|
|
|
FunctionSig sig_s_ss;
|
2017-10-11 13:01:17 +00:00
|
|
|
|
|
|
|
FunctionSig sig_ii_v;
|
|
|
|
FunctionSig sig_iii_v;
|
2015-12-11 12:26:16 +00:00
|
|
|
};
|
|
|
|
} // namespace wasm
|
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|
|
|
|
|
|
|
|
#endif // TEST_SIGNATURES_H
|