<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-tidy: Fix unnecessary object copies in JavaScriptCore"
   href="https://bugs.webkit.org/show_bug.cgi?id=192680">192680</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-tidy: Fix unnecessary object copies in JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ddkilzer@webkit.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>achristensen@apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Running `clang-tidy -checks='-*,performance-*,-performance-noexcept-*' ...` on JavaScriptCore source files found these unnecessary object copies:

Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:6296:27: warning: the parameter 'fastTrue' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
    JITCompiler::JumpList fastTrue, JITCompiler::JumpList fastFalse)
                          ^
    const                &
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:6296:59: warning: the parameter 'fastFalse' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
    JITCompiler::JumpList fastTrue, JITCompiler::JumpList fastFalse)
                                                          ^
                                    const                &

Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:190:166: warning: the parameter 'slowPathTarget' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, unsigned identifierNumber, JITCompiler::JumpList slowPathTarget)
                                                                                                                                                                     ^
                                                                                                                                               const                &

Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:11291:32: warning: the parameter 'set' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
        RegisteredStructureSet set, const Functor& weakStructureDiscriminant)
                               ^
        const                 &

Source/JavaScriptCore/jsc.cpp:820:10: warning: the variable 'referrer' is copy-construct
ed from a const reference but is only used as const reference; consider making it a const reference [performance-unneces
sary-copy-initialization]
    auto referrer = sourceOrigin.string();
         ^
    const  &
Source/JavaScriptCore/jsc.cpp:821:10: warning: the variable 'moduleName' is copy-constructed from a const reference but is only used as const reference; consider making it a const reference [performance-unnecessary-copy-initialization]
    auto moduleName = moduleNameValue->value(exec);
         ^
    const  &
Source/JavaScriptCore/jsc.cpp:1646:29: warning: the parameter 'string' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void Workers::report(String string)
                            ^
                     const &
Source/JavaScriptCore/jsc.cpp:1926:107: warning: the parameter #3 is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
typename std::enable_if<!std::is_fundamental<ValueType>::value>::type addOption(VM&, JSObject*, Identifier, ValueType) { }
                                                                                                          ^
                                                                                                const     &
Source/JavaScriptCore/jsc.cpp:1929:124: warning: the parameter 'identifier' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
typename std::enable_if<std::is_fundamental<ValueType>::value>::type addOption(VM& vm, JSObject* optionsObject, Identifier identifier, ValueType value)
                                                                                                                           ^
                                                                                                                const     &
Source/JavaScriptCore/jsc.cpp:2762:24: warning: the parameter 'options' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
int runJSC(CommandLine options, bool isWorker, const Func& func)
                       ^
           const      &
Source/JavaScriptCore/jsc.cpp:2823:22: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
        for (CString key : compileTimeKeys)
                     ^
             const  &

Source/JavaScriptCore/assembler/testmasm.cpp:156:47: warning: the parameter 'code' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
T invoke(MacroAssemblerCodeRef<JSEntryPtrTag> code, Arguments... arguments)
                                              ^
         const                               &

Source/JavaScriptCore/b3/testb3.cpp:167:75: warning: the parameter 'failText' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void checkDisassembly(Compilation& compilation, const Func& func, CString failText)
                                                                          ^
                                                                  const  &</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>