Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e2f1a867ae69cfe07c4fe23b51b24186b32ab991
      
https://github.com/WebKit/WebKit/commit/e2f1a867ae69cfe07c4fe23b51b24186b32ab991
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-09-05 (Sat, 05 Sep 2026)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
    M Source/JavaScriptCore/dfg/DFGGraph.h
    M Source/JavaScriptCore/dfg/DFGInsertionSet.h
    M Source/JavaScriptCore/dfg/DFGNode.h
    M Source/JavaScriptCore/dfg/DFGNodeOrigin.h

  Log Message:
  -----------
  [JSC] Move CodeOrigin instead of copying it when creating DFG nodes
https://bugs.webkit.org/show_bug.cgi?id=323490
rdar://186725447

Reviewed by Yusuke Suzuki.

Copying a CodeOrigin heap allocates an OutOfLineCodeOrigin when the bytecode 
index is too large to
pack into the spare top address bits. Its move constructor just steals the 
composite word, so every
copy we avoid along the node creation path is one malloc/free avoided for large 
or deeply inlined
code.

withSemantic() and withForExitAndExitOK() now construct the result directly 
rather than copying
*this and overwriting a field, propagating wasHoisted explicitly.

No behavior change.

* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::currentNodeOrigin):
* Source/JavaScriptCore/dfg/DFGGraph.h:
* Source/JavaScriptCore/dfg/DFGInsertionSet.h:
(JSC::DFG::InsertionSet::insertNode):
* Source/JavaScriptCore/dfg/DFGNode.h:
(JSC::DFG::Node::Node):
* Source/JavaScriptCore/dfg/DFGNodeOrigin.h:
(JSC::DFG::NodeOrigin::NodeOrigin):
(JSC::DFG::NodeOrigin::withSemantic const):
(JSC::DFG::NodeOrigin::withForExitAndExitOK const):

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



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

Reply via email to