[webkit-changes] [WebKit/WebKit] ca2d70: Remove empty switch statements generated by opcode...

Ian noreply at github.com
Mon Jul 24 18:28:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ca2d701ed88485940fc7979244bdcba0bf3c8b32
      https://github.com/WebKit/WebKit/commit/ca2d701ed88485940fc7979244bdcba0bf3c8b32
  Author: Ian Grunert <ian.grunert at gmail.com>
  Date:   2023-07-24 (Mon, 24 Jul 2023)

  Changed paths:
    M Source/JavaScriptCore/b3/air/opcode_generator.rb

  Log Message:
  -----------
  Remove empty switch statements generated by opcode_generator.rb
https://bugs.webkit.org/show_bug.cgi?id=259429

Reviewed by Yusuke Suzuki.

The opcode_generator.rb was generating switch statements with no case
clauses:

```
switch (argIndex) {
    default:
      break;
}
```

This is compiled by clang into a jmp instruction to the next line. This
change only generates the switch statement if there's at least one case
clause for it.

* Source/JavaScriptCore/b3/air/opcode_generator.rb:

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




More information about the webkit-changes mailing list