Files
Alex Crichton 0dee5a7f4d Skip type checks on tables that don't need it (#8172)
* Enhance `typed-funcrefs.wast` test with more cases

Have the same function with slightly different variations to compare
codegen between the possible strategies.

* Skip type checks on tables that don't need it

This commit implements an optimization to skip type checks in
`call_indirect` for tables that don't require it. With the
function-references proposal it's possible to have tables of a single
type of function as opposed to today's default `funcref` which is a
heterogenous set of functions. In this situation it's possible that a
`call_indirect`'s type tag matches the type tag of a
`table`-of-typed-`funcref`-values, meaning that it's impossible for the
type check to fail.

The type check of a function pointer in `call_indirect` is refactored
here to take the table's type into account. Various things are shuffled
around to ensure that the right traps still show up in the right places
but the important part is that, when possible, the type check is omitted
entirely.

* Update crates/cranelift/src/func_environ.rs

Co-authored-by: Jamey Sharp <jamey@minilop.net>

---------

Co-authored-by: Jamey Sharp <jamey@minilop.net>
2024-03-18 21:48:54 +00:00
..
2023-05-26 15:26:00 +00:00
2023-05-26 15:26:00 +00:00
2023-05-26 15:26:00 +00:00
2023-05-26 15:26:00 +00:00