Skip to content

0.27.3

Choose a tag to compare

@github-actions github-actions released this 24 Oct 02:43
· 14 commits to main since this release
80ff3de

Added

  • ModuleConfig::legacy_exceptions turns off support for the legacy exception
    handling instructions (try, catch, catch_all, delegate and
    rethrow). It defaults to true, so parsing is unchanged unless it is set
    to false, in which case modules that use them fail validation.

Changed

  • Emitting a module walks each function body once, before emission, to find
    its size, the locals and data segments it uses, and its ref.func targets,
    instead of walking every body four times for these. Emission of large
    modules is roughly 40% faster.
  • Parsing builds LocalFunction::instruction_mapping by pushing onto a Vec
    instead of inserting every operator offset into a BTreeMap. The table's
    contents are unchanged; parsing large modules is roughly a third faster.
  • Parsing skips the serial pre-scan of every function body for legacy
    catch handler types when the module has no tag with params and no function
    type with more than one result, or when ModuleConfig::legacy_exceptions is
    false, since the pre-scan can't register a type then.
  • Parsing builds each instruction sequence on a shared scratch stack and moves
    it into its InstrSeq at its exact size when the block ends, rather than
    growing every block's Vec one push at a time.
  • With the parallel feature, function bodies are parsed and emitted one
    function per rayon task. Walrus emits functions largest first, so splitting
    the function list into contiguous chunks left one thread with most of the
    work, both when emitting and when parsing walrus-emitted modules.

Fixed

  • Parsing no longer panics with "No Try instruction found to add catch clause
    to" on a valid module that has a legacy try with a catch, catch_all or
    delegate in unreachable code.