Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b6dc732b40aaa92fb82d874683456e8d2e508d8f
      
https://github.com/WebKit/WebKit/commit/b6dc732b40aaa92fb82d874683456e8d2e508d8f
  Author: Yusuke Suzuki <[email protected]>
  Date:   2024-07-21 (Sun, 21 Jul 2024)

  Changed paths:
    M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

  Log Message:
  -----------
  [JSC] Emit more efficient bytecodes for some patterns in the wild
https://bugs.webkit.org/show_bug.cgi?id=276858
rdar://132180708

Reviewed by Yijia Huang.

Through careful review of Angular generated code, we found several patterns. 
This patch optimizes them.

1. When try-catch-finally is used, we were not using 
emitNodeInIgnoreResultPosition. We should use that
   so that we can potentially convert some of call bytecodes to 
call_ignore_result.
2. !(function () { ... })() pattern is used well in the wild. This patch 
attempts to remove `!` when we detect
   that the resulted value is not used since ! is not user-observable.

* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::UnaryOpNode::emitBytecode):
(JSC::TryNode::emitBytecode):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to