Skip to content

Commit 3a16b3c

Browse files
committed
Update FIXME comment in DFG CSE to be more descriptive
https://bugs.webkit.org/show_bug.cgi?id=244783 Reviewed by Yusuke Suzuki. The comment was describing what the code was doing, but now why it was doing it. This patch describes why. * Source/JavaScriptCore/dfg/DFGCSEPhase.cpp: Canonical link: https://commits.webkit.org/254154@main
1 parent 9ba0246 commit 3a16b3c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Source/JavaScriptCore/dfg/DFGCSEPhase.cpp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,11 @@ class LocalCSEPhase : public Phase {
398398
LazyNode addImpure(HeapLocation location, LazyNode node)
399399
{
400400
// FIXME: If we are using small maps, we must not def() derived values.
401-
// For now the only derived values we def() are constant-based.
401+
// This is because we rely on one node defining at most one value so
402+
// that we can have constant capacity buffers for pure map and impure map.
403+
// If we use the derived index inside heap location, this property doesn't hold.
404+
// For example, if you look at NewArrayBuffer, it is a single node that can
405+
// have an arbitrary number of defs.
402406
if (location.index() && !location.index().isNode())
403407
return nullptr;
404408
if (LazyNode result = findReplacement(location))

0 commit comments

Comments
 (0)