<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [test262] Fixing mapped arguments object property test case"
   href="https://bugs.webkit.org/show_bug.cgi?id=159398#c81">Comment # 81</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [test262] Fixing mapped arguments object property test case"
   href="https://bugs.webkit.org/show_bug.cgi?id=159398">bug 159398</a>
              from <span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=294029&amp;action=diff" name="attach_294029" title="Patch">attachment 294029</a> <a href="attachment.cgi?id=294029&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=294029&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=294029&amp;action=review</a>

patch LGTM. Just a couple comments. Also, I think the names &quot;modified&quot; and &quot;overrides&quot; are somewhat confusing. I want us to try to pick a better name to indicate that they mean.
- Overrides =&gt; argument is mapped/unmapped
- Modified =&gt; the descriptor is now changed, however, the argument may or may not be mapped

<span class="quote">&gt; Source/JavaScriptCore/runtime/DirectArguments.cpp:106
&gt; +    if (thisObject-&gt;m_modifiedArguments)
&gt; +        visitor.markAuxiliary(thisObject-&gt;m_modifiedArguments.get());</span >

This should be done in the GenericArguments visitChildren method since GenericArguments owns that field. You may need to write a visitCHildren for GenericArguments.

<span class="quote">&gt; Source/JavaScriptCore/runtime/GenericArgumentsInlines.h:226
&gt; +        if (optionalIndex &amp;&amp; thisObject-&gt;canAccessIndexQuickly(optionalIndex.value())) {</span >

Nit: You can move this branch into the above `if (optionalIndex)` statement and drop the &quot;optionalIndex&quot; part.

<span class="quote">&gt; Source/JavaScriptCore/runtime/GenericArgumentsInlines.h:239
&gt; +                thisObject-&gt;overrideArgument(vm, index);</span >

We don't need to set modified here too?

<span class="quote">&gt; Source/JavaScriptCore/runtime/PropertyDescriptor.h:82
&gt; +</span >

please revert

<span class="quote">&gt; Source/JavaScriptCore/runtime/ScopedArguments.cpp:116
&gt; +    if (thisObject-&gt;m_modifiedArguments)
&gt; +        visitor.markAuxiliary(thisObject-&gt;m_modifiedArguments.get());</span >

Ditto for this visitChildren</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>