Changeset 239187 in webkit
- Timestamp:
- Dec 13, 2018 4:19:23 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r239183 r239187 1 2018-12-13 David Kilzer <ddkilzer@apple.com> 2 3 clang-tidy: Fix unnecessary object copies in JavaScriptCore 4 <https://webkit.org/b/192680> 5 <rdar://problem/46708767> 6 7 Reviewed by Mark Lam. 8 9 * assembler/testmasm.cpp: 10 (JSC::invoke): 11 - Make MacroAssemblerCodeRef<JSEntryPtrTag> argument a const 12 reference. 13 14 * b3/testb3.cpp: 15 (JSC::B3::checkDisassembly): 16 - Make CString argument a const reference. 17 18 * dfg/DFGSpeculativeJIT.cpp: 19 (JSC::DFG::SpeculativeJIT::compileStringEquality): 20 * dfg/DFGSpeculativeJIT.h: 21 * dfg/DFGSpeculativeJIT32_64.cpp: 22 (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): 23 * dfg/DFGSpeculativeJIT64.cpp: 24 (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): 25 - Make JITCompiler::JumpList arguments a const reference. 26 27 * ftl/FTLLowerDFGToB3.cpp: 28 (JSC::FTL::DFG::LowerDFGToB3::checkStructure): 29 - Make RegisteredStructureSet argument a const reference. 30 31 * jsc.cpp: 32 (GlobalObject::moduleLoaderImportModule): Make local auto 33 variables const references. 34 (Workers::report): Make String argument a const reference. 35 (addOption): Make Identifier argument a const reference. 36 (runJSC): Make CString loop variable a const reference. 37 1 38 2018-12-13 Devin Rousso <drousso@apple.com> 2 39 -
trunk/Source/JavaScriptCore/assembler/testmasm.cpp
r238439 r239187 154 154 155 155 template<typename T, typename... Arguments> 156 T invoke( MacroAssemblerCodeRef<JSEntryPtrTag>code, Arguments... arguments)156 T invoke(const MacroAssemblerCodeRef<JSEntryPtrTag>& code, Arguments... arguments) 157 157 { 158 158 void* executableAddress = untagCFunctionPtr<JSEntryPtrTag>(code.code().executableAddress()); -
trunk/Source/JavaScriptCore/b3/testb3.cpp
r237173 r239187 165 165 166 166 template<typename Func> 167 void checkDisassembly(Compilation& compilation, const Func& func, CStringfailText)167 void checkDisassembly(Compilation& compilation, const Func& func, const CString& failText) 168 168 { 169 169 CString disassembly = compilation.disassembly(); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r239158 r239187 6314 6314 Node* node, GPRReg leftGPR, GPRReg rightGPR, GPRReg lengthGPR, GPRReg leftTempGPR, 6315 6315 GPRReg rightTempGPR, GPRReg leftTemp2GPR, GPRReg rightTemp2GPR, 6316 JITCompiler::JumpList fastTrue, JITCompiler::JumpListfastFalse)6316 const JITCompiler::JumpList& fastTrue, const JITCompiler::JumpList& fastFalse) 6317 6317 { 6318 6318 JITCompiler::JumpList trueCase; -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r239158 r239187 725 725 #if USE(JSVALUE64) 726 726 void cachedGetById(CodeOrigin, GPRReg baseGPR, GPRReg resultGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType); 727 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, unsigned identifierNumber, JITCompiler::JumpListslowPathTarget = JITCompiler::JumpList());727 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, unsigned identifierNumber, const JITCompiler::JumpList& slowPathTarget = JITCompiler::JumpList()); 728 728 #elif USE(JSVALUE32_64) 729 729 void cachedGetById(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, unsigned identifierNumber, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType); 730 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPROrNone, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, unsigned identifierNumber, JITCompiler::JumpListslowPathTarget = JITCompiler::JumpList());730 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPROrNone, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, unsigned identifierNumber, const JITCompiler::JumpList& slowPathTarget = JITCompiler::JumpList()); 731 731 #endif 732 732 … … 1200 1200 Node*, GPRReg leftGPR, GPRReg rightGPR, GPRReg lengthGPR, 1201 1201 GPRReg leftTempGPR, GPRReg rightTempGPR, GPRReg leftTemp2GPR, 1202 GPRReg rightTemp2GPR, JITCompiler::JumpListfastTrue,1203 JITCompiler::JumpListfastSlow);1202 GPRReg rightTemp2GPR, const JITCompiler::JumpList& fastTrue, 1203 const JITCompiler::JumpList& fastSlow); 1204 1204 void compileStringEquality(Node*); 1205 1205 void compileStringIdentEquality(Node*); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r239158 r239187 229 229 void SpeculativeJIT::cachedGetByIdWithThis( 230 230 CodeOrigin codeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPR, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, 231 unsigned identifierNumber, JITCompiler::JumpListslowPathTarget)231 unsigned identifierNumber, const JITCompiler::JumpList& slowPathTarget) 232 232 { 233 233 RegisterSet usedRegisters = this->usedRegisters(); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r239158 r239187 188 188 } 189 189 190 void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, unsigned identifierNumber, JITCompiler::JumpListslowPathTarget)190 void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, unsigned identifierNumber, const JITCompiler::JumpList& slowPathTarget) 191 191 { 192 192 CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size()); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r239158 r239187 11386 11386 void checkStructure( 11387 11387 LValue structureDiscriminant, const FormattedValue& formattedValue, ExitKind exitKind, 11388 RegisteredStructureSetset, const Functor& weakStructureDiscriminant)11388 const RegisteredStructureSet& set, const Functor& weakStructureDiscriminant) 11389 11389 { 11390 11390 if (set.isEmpty()) { -
trunk/Source/JavaScriptCore/jsc.cpp
r238766 r239187 217 217 218 218 template<typename Func> 219 int runJSC( CommandLine, bool isWorker, const Func&);219 int runJSC(const CommandLine&, bool isWorker, const Func&); 220 220 static void checkException(ExecState*, GlobalObject*, bool isLastFile, bool hasException, JSValue, CommandLine&, bool& success); 221 221 … … 258 258 void broadcast(const Func&); 259 259 260 void report( String);260 void report(const String&); 261 261 String tryGetReport(); 262 262 String getReport(); … … 818 818 return reject(createError(exec, "Could not resolve the module specifier."_s)); 819 819 820 autoreferrer = sourceOrigin.string();821 automoduleName = moduleNameValue->value(exec);820 const auto& referrer = sourceOrigin.string(); 821 const auto& moduleName = moduleNameValue->value(exec); 822 822 if (UNLIKELY(catchScope.exception())) 823 823 return reject(catchScope.exception()); … … 1644 1644 } 1645 1645 1646 void Workers::report( Stringstring)1646 void Workers::report(const String& string) 1647 1647 { 1648 1648 auto locker = holdLock(m_lock); … … 1924 1924 1925 1925 template<typename ValueType> 1926 typename std::enable_if<!std::is_fundamental<ValueType>::value>::type addOption(VM&, JSObject*, Identifier, ValueType) { }1926 typename std::enable_if<!std::is_fundamental<ValueType>::value>::type addOption(VM&, JSObject*, const Identifier&, ValueType) { } 1927 1927 1928 1928 template<typename ValueType> 1929 typename std::enable_if<std::is_fundamental<ValueType>::value>::type addOption(VM& vm, JSObject* optionsObject, Identifieridentifier, ValueType value)1929 typename std::enable_if<std::is_fundamental<ValueType>::value>::type addOption(VM& vm, JSObject* optionsObject, const Identifier& identifier, ValueType value) 1930 1930 { 1931 1931 optionsObject->putDirect(vm, identifier, JSValue(value)); … … 2760 2760 2761 2761 template<typename Func> 2762 int runJSC( CommandLineoptions, bool isWorker, const Func& func)2762 int runJSC(const CommandLine& options, bool isWorker, const Func& func) 2763 2763 { 2764 2764 Worker worker(Workers::singleton()); … … 2821 2821 compileTimeKeys.append(entry.key); 2822 2822 std::sort(compileTimeKeys.begin(), compileTimeKeys.end()); 2823 for ( CStringkey : compileTimeKeys)2823 for (const CString& key : compileTimeKeys) 2824 2824 printf("%40s: %.3lf ms\n", key.data(), compileTimeStats.get(key).milliseconds()); 2825 2825 }
Note: See TracChangeset
for help on using the changeset viewer.