<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FTL is not working on Windows."
   href="https://bugs.webkit.org/show_bug.cgi?id=145366#c63">Comment # 63</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - FTL is not working on Windows."
   href="https://bugs.webkit.org/show_bug.cgi?id=145366">bug 145366</a>
              from <span class="vcard"><a class="email" href="mailto:mark.lam&#64;apple.com" title="Mark Lam &lt;mark.lam&#64;apple.com&gt;"> <span class="fn">Mark Lam</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=263482&amp;action=diff" name="attach_263482" title="Patch">attachment 263482</a> <a href="attachment.cgi?id=263482&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/JavaScriptCore/CMakeLists.txt:952
&gt; +            llvm/LLVMAPI.cpp</span >

Since this file is common to WIN32 and other ports, let's keep it in the common list above.

<span class="quote">&gt; Source/JavaScriptCore/CMakeLists.txt:958
&gt; +            llvm/LLVMAPI.cpp</span >

Ditto.

<span class="quote">&gt; Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:722
&gt; +#if CPU(X86_64)
&gt; +    void loadDouble128(ImplicitAddress address, FPRegisterID src)
&gt; +    {
&gt; +        ASSERT(isSSE2Present());
&gt; +        m_assembler.movups_mr(src, address.offset, address.base);
&gt; +    }
&gt; +#endif</span >

Why is this added?  I don't see it used anywhere in this patch.

<span class="quote">&gt; Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:747
&gt; +#if CPU(X86_64)
&gt; +    void storeDouble128(FPRegisterID src, ImplicitAddress address)
&gt; +    {
&gt; +        ASSERT(isSSE2Present());
&gt; +        m_assembler.movups_rm(src, address.offset, address.base);
&gt; +    }
&gt; +#endif</span >

Why is this added?  I don't see it used anywhere in this patch.

<span class="quote">&gt; Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:197
&gt; +    Call callJIT()
&gt; +    {
&gt; +        DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister);
&gt; +        Call result = Call(m_assembler.call(scratchRegister), Call::Linkable);
&gt; +
&gt; +        ASSERT_UNUSED(label, differenceBetween(label, result) == REPTACH_OFFSET_CALL_R11);
&gt; +        return result;
&gt; +    }</span >

Why is this added?  I don't see it used anywhere in this patch.

<span class="quote">&gt; Source/JavaScriptCore/assembler/X86Assembler.h:1848
&gt; +    void movups_rm(XMMRegisterID src, int offset, RegisterID base)
&gt; +    {
&gt; +        m_formatter.twoByteOp(OP2_MOVSD_WsdVsd, (RegisterID)src, base, offset);
&gt; +    }
&gt; +
&gt; +    void movups_mr(XMMRegisterID src, int offset, RegisterID base)
&gt; +    {
&gt; +        m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)src, base, offset);
&gt; +    }</span >

Are these really needed since their only caller in this patch does not appear to be called by anyone.

<span class="quote">&gt; Source/JavaScriptCore/ftl/FTLCapabilities.cpp:213
&gt; +    case ArithPow:
&gt; +#if OS(WINDOWS)
&gt; +        // LLVM does not support powi on Windows.
&gt; +        if (node-&gt;child2().useKind() == Int32Use)
&gt; +            return CannotCompile;
&gt; +#endif
&gt; +        break;</span >

Is this still necessary?  In compileArithPow() below, you seem to have implemented support for (m_node-&gt;child2().useKind() == Int32Use) already (line 1843).  Or am I misreading it?

<span class="quote">&gt; Source/JavaScriptCore/ftl/FTLCompile.cpp:680
&gt; +            auto iter = recordMap.find(call.stackmapID());
&gt; +            if (iter != recordMap.end()) {
&gt; +                for (unsigned i = 0; i &lt; iter-&gt;value.size(); ++i) {
&gt; +                    StackMaps::Record&amp; record = iter-&gt;value[i];
&gt; +                    RegisterSet usedRegisters = usedRegistersFor(record);
&gt; +
&gt; +                    dataLog(&quot;Used registers = &quot;, usedRegisters, &quot;\n&quot;);
&gt; +                }
&gt; +            }</span >

I think this code will clash with <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - FTL should generate a unique OSR exit for each duplicated OSR exit stackmap intrinsic."
   href="show_bug.cgi?id=149970">https://bugs.webkit.org/show_bug.cgi?id=149970</a> (which is fixing a bug in this area).</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>