Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information