<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Optimize typed array access with a masked index"
href="https://bugs.webkit.org/show_bug.cgi?id=142966#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Optimize typed array access with a masked index"
href="https://bugs.webkit.org/show_bug.cgi?id=142966">bug 142966</a>
from <span class="vcard"><a class="email" href="mailto:fpizlo@apple.com" title="Filip Pizlo <fpizlo@apple.com>"> <span class="fn">Filip Pizlo</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=249236&action=diff" name="attach_249236" title="Optimize away bounds checks when given masked typed array indexes">attachment 249236</a> <a href="attachment.cgi?id=249236&action=edit" title="Optimize away bounds checks when given masked typed array indexes">[details]</a></span>
Optimize away bounds checks when given masked typed array indexes
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=249236&action=review">https://bugs.webkit.org/attachment.cgi?id=249236&action=review</a>
<span class="quote">> Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:57
> + JSValue shiftValue = indexNode->child2().node()->value.value();</span >
It is an antipattern to access the abstract value of a node directly. You should use AbstractInterpreter::forNode(node). Also, we usually access the inferred constant value using m_value, not value().
<span class="quote">> Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:68
> + JSValue offsetValue = indexNode->child2().node()->value.value();</span >
Ditto.
<span class="quote">> Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:93
> + JSValue maskValue = indexNode->child2().node()->value.value();</span >
Ditto.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>