Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6276c6b5f2b974c2c9398233c540a21e7c0cc413
      
https://github.com/WebKit/WebKit/commit/6276c6b5f2b974c2c9398233c540a21e7c0cc413
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-04-02 (Thu, 02 Apr 2026)

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

  Log Message:
  -----------
  [JSC] Remove redundant mov in await/yield bytecode generation
https://bugs.webkit.org/show_bug.cgi?id=311239

Reviewed by Yusuke Suzuki.

When the operand of await, yield, or yield* is a local variable or
constant, the previous newTemporary() + emitNode(temp, expr) pattern
emitted an unnecessary mov. Using emitNode(expr) returns the local or
constant register directly.

This is safe because emitAwait, emitYield, and emitDelegateYield only
read the argument and pass it to OpYield. BytecodeGeneratorification
rewrites op_yield to op_ret, which already accepts constant operands
via loadConstantOrVariable in both LLInt 64 and 32_64.

* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::YieldExprNode::emitBytecode):
(JSC::AwaitExprNode::emitBytecode):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to