Skip to content

Commit

Permalink
[NFC] Move enough of wasm-type.cpp into wasm-type.h to inline core is…
Browse files Browse the repository at this point in the history
…*() methods (#6936)

This just moves code around. As a result, isRef() vanishes entirely from the
profiling traces in #6931, since now the core isRef/Tuple/etc. methods are
all inlineable.

This also required some reordering of wasm-type.h, namely to move HeapType
up front. No changes to that class otherwise.

TypeInfo is now in the header. getTypeInfo is now a static method on Type.

This has the downside of moving internal details into the header, and it may
increase compile time a little. The upside is making the --precompute benchmark
from #6931 significantly faster, 33%, and it will also help the many
Type::isNonNullable() etc. calls we have scattered around the codebase in
other passes too.
  • Loading branch information
kripken committed Sep 16, 2024
1 parent 106f84b commit ed19e3f
Show file tree
Hide file tree
Showing 2 changed files with 300 additions and 303 deletions.
Loading

0 comments on commit ed19e3f

Please sign in to comment.