[webkit-changes] [WebKit/WebKit] 95d4c8: Correctly discard stack values when adding else to...

EWS noreply at github.com
Mon Mar 6 19:05:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95d4c84bd6e95250495fbaa40ac88a01eab3cb7f
      https://github.com/WebKit/WebKit/commit/95d4c84bd6e95250495fbaa40ac88a01eab3cb7f
  Author: David Degazio <d_degazio at apple.com>
  Date:   2023-03-06 (Mon, 06 Mar 2023)

  Changed paths:
    A JSTests/wasm/stress/block-results-into-unreachable-else.js
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp

  Log Message:
  -----------
  Correctly discard stack values when adding else to unreachable in BBQ JIT
https://bugs.webkit.org/show_bug.cgi?id=253457
rdar://106292162

Reviewed by Yusuke Suzuki.

Adds a flush at the end of the preceding block when we end an unreachable block
with an else. Since it's unreachable, we don't consider setting up block arguments
for any successors, and instead just want to make sure all the values on the stack
are consumed properly. This deallocates their registers, if any, so we enter the
else block with the BBQ allocator in the expected state.

* JSTests/wasm/stress/block-results-into-unreachable-else.js: Added.
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::addElseToUnreachable):

Canonical link: https://commits.webkit.org/261304@main




More information about the webkit-changes mailing list