Changeset 229054 in webkit
- Timestamp:
- Feb 26, 2018 11:50:54 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r229053 r229054 1 2018-02-26 Mark Lam <mark.lam@apple.com> 2 3 Modernize FINALIZE_CODE and peer macros to use __VA_ARGS__ arguments. 4 https://bugs.webkit.org/show_bug.cgi?id=183159 5 <rdar://problem/37930837> 6 7 Reviewed by Keith Miller. 8 9 * assembler/LinkBuffer.h: 10 * assembler/testmasm.cpp: 11 (JSC::compile): 12 * b3/B3Compile.cpp: 13 (JSC::B3::compile): 14 * b3/air/testair.cpp: 15 * b3/testb3.cpp: 16 (JSC::B3::testEntrySwitchSimple): 17 (JSC::B3::testEntrySwitchNoEntrySwitch): 18 (JSC::B3::testEntrySwitchWithCommonPaths): 19 (JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint): 20 (JSC::B3::testEntrySwitchLoop): 21 * bytecode/InlineAccess.cpp: 22 (JSC::linkCodeInline): 23 (JSC::InlineAccess::rewireStubAsJump): 24 * bytecode/PolymorphicAccess.cpp: 25 (JSC::PolymorphicAccess::regenerate): 26 * dfg/DFGJITFinalizer.cpp: 27 (JSC::DFG::JITFinalizer::finalize): 28 (JSC::DFG::JITFinalizer::finalizeFunction): 29 * dfg/DFGOSRExit.cpp: 30 (JSC::DFG::OSRExit::compileOSRExit): 31 * dfg/DFGThunks.cpp: 32 (JSC::DFG::osrExitThunkGenerator): 33 (JSC::DFG::osrExitGenerationThunkGenerator): 34 (JSC::DFG::osrEntryThunkGenerator): 35 * ftl/FTLJITFinalizer.cpp: 36 (JSC::FTL::JITFinalizer::finalizeCommon): 37 * ftl/FTLLazySlowPath.cpp: 38 (JSC::FTL::LazySlowPath::generate): 39 * ftl/FTLOSRExitCompiler.cpp: 40 (JSC::FTL::compileStub): 41 * ftl/FTLThunks.cpp: 42 (JSC::FTL::genericGenerationThunkGenerator): 43 (JSC::FTL::slowPathCallThunkGenerator): 44 * jit/ExecutableAllocator.cpp: 45 * jit/JIT.cpp: 46 (JSC::JIT::link): 47 * jit/JITMathIC.h: 48 (JSC::isProfileEmpty): 49 * jit/JITOpcodes.cpp: 50 (JSC::JIT::privateCompileHasIndexedProperty): 51 * jit/JITOpcodes32_64.cpp: 52 (JSC::JIT::privateCompileHasIndexedProperty): 53 * jit/JITPropertyAccess.cpp: 54 (JSC::JIT::stringGetByValStubGenerator): 55 (JSC::JIT::privateCompileGetByVal): 56 (JSC::JIT::privateCompileGetByValWithCachedId): 57 (JSC::JIT::privateCompilePutByVal): 58 (JSC::JIT::privateCompilePutByValWithCachedId): 59 * jit/JITPropertyAccess32_64.cpp: 60 (JSC::JIT::stringGetByValStubGenerator): 61 * jit/JITStubRoutine.h: 62 * jit/Repatch.cpp: 63 (JSC::linkPolymorphicCall): 64 * jit/SpecializedThunkJIT.h: 65 (JSC::SpecializedThunkJIT::finalize): 66 * jit/ThunkGenerators.cpp: 67 (JSC::throwExceptionFromCallSlowPathGenerator): 68 (JSC::linkCallThunkGenerator): 69 (JSC::linkPolymorphicCallThunkGenerator): 70 (JSC::virtualThunkFor): 71 (JSC::nativeForGenerator): 72 (JSC::arityFixupGenerator): 73 (JSC::unreachableGenerator): 74 (JSC::boundThisNoArgsFunctionCallGenerator): 75 * llint/LLIntThunks.cpp: 76 (JSC::LLInt::generateThunkWithJumpTo): 77 * wasm/WasmBBQPlan.cpp: 78 (JSC::Wasm::BBQPlan::complete): 79 * wasm/WasmBinding.cpp: 80 (JSC::Wasm::wasmToWasm): 81 * wasm/WasmOMGPlan.cpp: 82 (JSC::Wasm::OMGPlan::work): 83 * wasm/WasmThunks.cpp: 84 (JSC::Wasm::throwExceptionFromWasmThunkGenerator): 85 (JSC::Wasm::throwStackOverflowFromWasmThunkGenerator): 86 (JSC::Wasm::triggerOMGTierUpThunkGenerator): 87 * wasm/js/WasmToJS.cpp: 88 (JSC::Wasm::handleBadI64Use): 89 (JSC::Wasm::wasmToJS): 90 * yarr/YarrJIT.cpp: 91 (JSC::Yarr::YarrGenerator::compile): 92 1 93 2018-02-25 Yusuke Suzuki <utatane.tea@gmail.com> 2 94 -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
r225363 r229054 1 1 /* 2 * Copyright (C) 2009-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2009-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 308 308 }; 309 309 310 #define FINALIZE_CODE_IF(condition, linkBufferReference, dataLogFArgumentsForHeading) \310 #define FINALIZE_CODE_IF(condition, linkBufferReference, ...) \ 311 311 (UNLIKELY((condition)) \ 312 ? ((linkBufferReference).finalizeCodeWithDisassembly dataLogFArgumentsForHeading) \313 : (linkBufferReference).finalizeCodeWithoutDisassembly())312 ? (linkBufferReference).finalizeCodeWithDisassembly(__VA_ARGS__) \ 313 : (linkBufferReference).finalizeCodeWithoutDisassembly()) 314 314 315 315 bool shouldDumpDisassemblyFor(CodeBlock*); 316 316 317 #define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, dataLogFArgumentsForHeading) \318 FINALIZE_CODE_IF( shouldDumpDisassemblyFor(codeBlock) || Options::asyncDisassembly(), linkBufferReference, dataLogFArgumentsForHeading)317 #define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, ...) \ 318 FINALIZE_CODE_IF((shouldDumpDisassemblyFor(codeBlock) || Options::asyncDisassembly()), linkBufferReference, __VA_ARGS__) 319 319 320 320 // Use this to finalize code, like so: 321 321 // 322 // CodeRef code = FINALIZE_CODE(linkBuffer, ("my super thingy number %d", number));322 // CodeRef code = FINALIZE_CODE(linkBuffer, "my super thingy number %d", number); 323 323 // 324 324 // Which, in disassembly mode, will print: … … 331 331 // ... and so on. 332 332 // 333 // Note that the dataLogFArgumentsForHeadingare only evaluated when dumpDisassembly333 // Note that the format string and print arguments are only evaluated when dumpDisassembly 334 334 // is true, so you can hide expensive disassembly-only computations inside there. 335 335 336 #define FINALIZE_CODE(linkBufferReference, dataLogFArgumentsForHeading) \337 FINALIZE_CODE_IF( JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly(), linkBufferReference, dataLogFArgumentsForHeading)338 339 #define FINALIZE_DFG_CODE(linkBufferReference, dataLogFArgumentsForHeading) \340 FINALIZE_CODE_IF( JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly() || Options::dumpDFGDisassembly(), linkBufferReference, dataLogFArgumentsForHeading)336 #define FINALIZE_CODE(linkBufferReference, ...) \ 337 FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly()), linkBufferReference, __VA_ARGS__) 338 339 #define FINALIZE_DFG_CODE(linkBufferReference, ...) \ 340 FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly() || Options::dumpDFGDisassembly()), linkBufferReference, __VA_ARGS__) 341 341 342 342 } // namespace JSC -
trunk/Source/JavaScriptCore/assembler/testmasm.cpp
r225778 r229054 1 1 /* 2 * Copyright (C) 2017 Apple Inc. All rights reserved.2 * Copyright (C) 2017-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 149 149 generate(jit); 150 150 LinkBuffer linkBuffer(jit, nullptr); 151 return FINALIZE_CODE(linkBuffer, ("testmasm compilation"));151 return FINALIZE_CODE(linkBuffer, "testmasm compilation"); 152 152 } 153 153 -
trunk/Source/JavaScriptCore/b3/B3Compile.cpp
r214901 r229054 1 1 /* 2 * Copyright (C) 2016 Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 49 49 LinkBuffer linkBuffer(jit, nullptr); 50 50 51 return Compilation(FINALIZE_CODE(linkBuffer, ("B3::Compilation")), proc.releaseByproducts());51 return Compilation(FINALIZE_CODE(linkBuffer, "B3::Compilation"), proc.releaseByproducts()); 52 52 } 53 53 -
trunk/Source/JavaScriptCore/b3/air/testair.cpp
r225778 r229054 1 1 /* 2 * Copyright (C) 2016-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 91 91 92 92 return std::make_unique<B3::Compilation>( 93 FINALIZE_CODE(linkBuffer, ("testair compilation")), proc.releaseByproducts());93 FINALIZE_CODE(linkBuffer, "testair compilation"), proc.releaseByproducts()); 94 94 } 95 95 -
trunk/Source/JavaScriptCore/b3/testb3.cpp
r228533 r229054 13295 13295 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2)); 13296 13296 13297 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));13297 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation"); 13298 13298 13299 13299 CHECK(invoke<int>(labelOne, 1, 2) == 3); … … 13328 13328 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2)); 13329 13329 13330 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));13330 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation"); 13331 13331 13332 13332 CHECK_EQ(invoke<int>(labelOne, 1, 2), 3); … … 13415 13415 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2)); 13416 13416 13417 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));13417 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation"); 13418 13418 13419 13419 CHECK_EQ(invoke<int>(labelOne, 1, 2, 10), 3); … … 13532 13532 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2)); 13533 13533 13534 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));13534 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation"); 13535 13535 13536 13536 CHECK_EQ(invoke<int>(labelOne, 1, 2, 10, false), 3); … … 13609 13609 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1)); 13610 13610 13611 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));13611 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation"); 13612 13612 13613 13613 CHECK(invoke<int>(labelOne, 0) == 1); -
trunk/Source/JavaScriptCore/bytecode/InlineAccess.cpp
r224564 r229054 1 1 /* 2 * Copyright (C) 2016 Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 136 136 ASSERT(linkBuffer.isValid()); 137 137 function(linkBuffer); 138 FINALIZE_CODE(linkBuffer, ("InlineAccessType: '%s'", name));138 FINALIZE_CODE(linkBuffer, "InlineAccessType: '%s'", name); 139 139 return true; 140 140 } … … 291 291 linkBuffer.link(jump, target); 292 292 293 FINALIZE_CODE(linkBuffer, ("InlineAccess: linking constant jump"));293 FINALIZE_CODE(linkBuffer, "InlineAccess: linking constant jump"); 294 294 } 295 295 -
trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
r224258 r229054 1 1 /* 2 * Copyright (C) 2014-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2014-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 570 570 MacroAssemblerCodeRef code = FINALIZE_CODE_FOR( 571 571 codeBlock, linkBuffer, 572 ("%s", toCString("Access stub for ", *codeBlock, " ", stubInfo.codeOrigin, " with return point ", successLabel, ": ", listDump(cases)).data()));572 "%s", toCString("Access stub for ", *codeBlock, " ", stubInfo.codeOrigin, " with return point ", successLabel, ": ", listDump(cases)).data()); 573 573 574 574 bool doesCalls = false; -
trunk/Source/JavaScriptCore/dfg/DFGJITFinalizer.cpp
r220556 r229054 58 58 { 59 59 m_jitCode->initializeCodeRef( 60 FINALIZE_DFG_CODE(*m_linkBuffer, ("DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data())),60 FINALIZE_DFG_CODE(*m_linkBuffer, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()), 61 61 MacroAssemblerCodePtr()); 62 62 … … 72 72 RELEASE_ASSERT(!m_withArityCheck.isEmptyValue()); 73 73 m_jitCode->initializeCodeRef( 74 FINALIZE_DFG_CODE(*m_linkBuffer, ("DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data())),74 FINALIZE_DFG_CODE(*m_linkBuffer, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()), 75 75 m_withArityCheck); 76 76 m_plan.codeBlock->setJITCode(m_jitCode.copyRef()); -
trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
r223875 r229054 1 1 /* 2 * Copyright (C) 2011-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1070 1070 shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseDFGOSRExit(), 1071 1071 patchBuffer, 1072 ("DFG OSR exit #%u (%s, %s) from %s, with operands = %s",1072 "DFG OSR exit #%u (%s, %s) from %s, with operands = %s", 1073 1073 exitIndex, toCString(exit.m_codeOrigin).data(), 1074 1074 exitKindToString(exit.m_kind), toCString(*codeBlock).data(), 1075 toCString(ignoringContext<DumpContext>(operands)).data()) );1075 toCString(ignoringContext<DumpContext>(operands)).data()); 1076 1076 } 1077 1077 -
trunk/Source/JavaScriptCore/dfg/DFGThunks.cpp
r225360 r229054 1 1 /* 2 * Copyright (C) 2011-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 46 46 jit.probe(OSRExit::executeOSRExit, vm); 47 47 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 48 return FINALIZE_CODE(patchBuffer, ("DFG OSR exit thunk"));48 return FINALIZE_CODE(patchBuffer, "DFG OSR exit thunk"); 49 49 } 50 50 … … 106 106 patchBuffer.link(functionCall, OSRExit::compileOSRExit); 107 107 108 return FINALIZE_CODE(patchBuffer, ("DFG OSR exit generation thunk"));108 return FINALIZE_CODE(patchBuffer, "DFG OSR exit generation thunk"); 109 109 } 110 110 … … 147 147 148 148 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 149 return FINALIZE_CODE(patchBuffer, ("DFG OSR entry thunk"));149 return FINALIZE_CODE(patchBuffer, "DFG OSR entry thunk"); 150 150 } 151 151 -
trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp
r221954 r229054 1 1 /* 2 * Copyright (C) 2013-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 77 77 FINALIZE_CODE_IF( 78 78 dumpDisassembly, *b3CodeLinkBuffer, 79 ("FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data())));79 "FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data())); 80 80 81 81 if (entrypointLinkBuffer) { … … 83 83 FINALIZE_CODE_IF( 84 84 dumpDisassembly, *entrypointLinkBuffer, 85 ("FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)));85 "FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)); 86 86 } 87 87 -
trunk/Source/JavaScriptCore/ftl/FTLLazySlowPath.cpp
r214571 r229054 1 1 /* 2 * Copyright (C) 2015 Apple Inc. All rights reserved.2 * Copyright (C) 2015-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 68 68 if (m_exceptionTarget) 69 69 linkBuffer.link(exceptionJumps, m_exceptionTarget); 70 m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, ("Lazy slow path call stub"));70 m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, "Lazy slow path call stub"); 71 71 72 72 MacroAssembler::repatchJump(m_patchableJump, CodeLocationLabel(m_stub.code())); -
trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
r223875 r229054 1 1 /* 2 * Copyright (C) 2013-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 496 496 shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit(), 497 497 patchBuffer, 498 ("FTL OSR exit #%u (%s, %s) from %s, with operands = %s",498 "FTL OSR exit #%u (%s, %s) from %s, with operands = %s", 499 499 exitID, toCString(exit.m_codeOrigin).data(), 500 500 exitKindToString(exit.m_kind), toCString(*codeBlock).data(), 501 toCString(ignoringContext<DumpContext>(exit.m_descriptor->m_values)).data() )501 toCString(ignoringContext<DumpContext>(exit.m_descriptor->m_values)).data() 502 502 ); 503 503 } -
trunk/Source/JavaScriptCore/ftl/FTLThunks.cpp
r220219 r229054 1 1 /* 2 * Copyright (C) 2013-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 120 120 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 121 121 patchBuffer.link(functionCall, generationFunction); 122 return FINALIZE_CODE(patchBuffer, ("%s", name));122 return FINALIZE_CODE(patchBuffer, "%s", name); 123 123 } 124 124 … … 225 225 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 226 226 patchBuffer.link(call, FunctionPtr(key.callTarget())); 227 return FINALIZE_CODE(patchBuffer, ("FTL slow path call thunk for %s", toCString(key).data()));227 return FINALIZE_CODE(patchBuffer, "FTL slow path call thunk for %s", toCString(key).data()); 228 228 } 229 229 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r227168 r229054 1 1 /* 2 * Copyright (C) 2008-20 09, 2015, 2017Apple Inc. All rights reserved.2 * Copyright (C) 2008-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r228533 r229054 871 871 CodeRef result = FINALIZE_CODE( 872 872 patchBuffer, 873 ("Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data()));873 "Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data()); 874 874 875 875 m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT->add( -
trunk/Source/JavaScriptCore/jit/JITMathIC.h
r226806 r229054 140 140 RELEASE_ASSERT(linkBuffer.isValid()); 141 141 linkBuffer.link(jump, CodeLocationLabel(m_code.code())); 142 FINALIZE_CODE(linkBuffer, ("JITMathIC: linking constant jump to out of line stub"));142 FINALIZE_CODE(linkBuffer, "JITMathIC: linking constant jump to out of line stub"); 143 143 }; 144 144 … … 167 167 168 168 m_code = FINALIZE_CODE_FOR( 169 codeBlock, linkBuffer, ("JITMathIC: generating out of line fast IC snippet"));169 codeBlock, linkBuffer, "JITMathIC: generating out of line fast IC snippet"); 170 170 171 171 if (!generationState.shouldSlowPathRepatch) { … … 209 209 210 210 m_code = FINALIZE_CODE_FOR( 211 codeBlock, linkBuffer, ("JITMathIC: generating out of line IC snippet"));211 codeBlock, linkBuffer, "JITMathIC: generating out of line IC snippet"); 212 212 } 213 213 -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r228500 r229054 1083 1083 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1084 1084 m_codeBlock, patchBuffer, 1085 ("Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));1085 "Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1086 1086 1087 1087 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r228500 r229054 934 934 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 935 935 m_codeBlock, patchBuffer, 936 ("Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));936 "Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 937 937 938 938 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r228193 r229054 91 91 92 92 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 93 return FINALIZE_CODE(patchBuffer, ("String get_by_val stub"));93 return FINALIZE_CODE(patchBuffer, "String get_by_val stub"); 94 94 } 95 95 … … 1263 1263 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1264 1264 m_codeBlock, patchBuffer, 1265 ("Baseline get_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));1265 "Baseline get_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1266 1266 1267 1267 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); … … 1295 1295 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1296 1296 m_codeBlock, patchBuffer, 1297 ("Baseline get_by_val with cached property name '%s' stub for %s, return point %p", propertyName.impl()->utf8().data(), toCString(*m_codeBlock).data(), returnAddress.value()));1297 "Baseline get_by_val with cached property name '%s' stub for %s, return point %p", propertyName.impl()->utf8().data(), toCString(*m_codeBlock).data(), returnAddress.value()); 1298 1298 byValInfo->stubInfo = gen.stubInfo(); 1299 1299 … … 1350 1350 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1351 1351 m_codeBlock, patchBuffer, 1352 ("Baseline put_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));1352 "Baseline put_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1353 1353 1354 1354 } else { 1355 1355 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1356 1356 m_codeBlock, patchBuffer, 1357 ("Baseline put_by_val_direct stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));1357 "Baseline put_by_val_direct stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1358 1358 } 1359 1359 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); … … 1385 1385 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1386 1386 m_codeBlock, patchBuffer, 1387 ("Baseline put_by_val%s with cached property name '%s' stub for %s, return point %p", (putKind == Direct) ? "_direct" : "", propertyName.impl()->utf8().data(), toCString(*m_codeBlock).data(), returnAddress.value()));1387 "Baseline put_by_val%s with cached property name '%s' stub for %s, return point %p", (putKind == Direct) ? "_direct" : "", propertyName.impl()->utf8().data(), toCString(*m_codeBlock).data(), returnAddress.value()); 1388 1388 byValInfo->stubInfo = gen.stubInfo(); 1389 1389 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r224626 r229054 1 1 /* 2 * Copyright (C) 2008-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2008-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 179 179 180 180 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 181 return FINALIZE_CODE(patchBuffer, ("String get_by_val stub"));181 return FINALIZE_CODE(patchBuffer, "String get_by_val stub"); 182 182 } 183 183 -
trunk/Source/JavaScriptCore/jit/JITStubRoutine.h
r218867 r229054 1 1 /* 2 * Copyright (C) 2012 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2012-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 115 115 116 116 // Helper for the creation of simple stub routines that need no help from the GC. 117 #define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, dataLogFArguments) \118 (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), dataLogFArguments))))117 #define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, ...) \ 118 (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), __VA_ARGS__)))) 119 119 120 120 } // namespace JSC -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r228420 r229054 1 1 /* 2 * Copyright (C) 2011-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1080 1080 FINALIZE_CODE_FOR( 1081 1081 callerCodeBlock, patchBuffer, 1082 ("Polymorphic call stub for %s, return point %p, targets %s",1082 "Polymorphic call stub for %s, return point %p, targets %s", 1083 1083 isWebAssembly ? "WebAssembly" : toCString(*callerCodeBlock).data(), callLinkInfo.callReturnLocation().labelAtOffset(0).executableAddress(), 1084 toCString(listDump(callCases)).data()) ),1084 toCString(listDump(callCases)).data()), 1085 1085 vm, owner, exec->callerFrame(), callLinkInfo, callCases, 1086 1086 WTFMove(fastCounts))); -
trunk/Source/JavaScriptCore/jit/SpecializedThunkJIT.h
r225632 r229054 1 1 /* 2 * Copyright (C) 2010-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2010-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 171 171 for (unsigned i = 0; i < m_calls.size(); i++) 172 172 patchBuffer.link(m_calls[i].first, m_calls[i].second); 173 return FINALIZE_CODE(patchBuffer, ("Specialized thunk for %s", thunkKind));173 return FINALIZE_CODE(patchBuffer, "Specialized thunk for %s", thunkKind); 174 174 } 175 175 -
trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp
r228420 r229054 76 76 77 77 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 78 return FINALIZE_CODE(patchBuffer, ("Throw exception from call slow path thunk"));78 return FINALIZE_CODE(patchBuffer, "Throw exception from call slow path thunk"); 79 79 } 80 80 … … 142 142 143 143 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 144 return FINALIZE_CODE(patchBuffer, ("Link call slow path thunk"));144 return FINALIZE_CODE(patchBuffer, "Link call slow path thunk"); 145 145 } 146 146 … … 154 154 155 155 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 156 return FINALIZE_CODE(patchBuffer, ("Link polymorphic call slow path thunk"));156 return FINALIZE_CODE(patchBuffer, "Link polymorphic call slow path thunk"); 157 157 } 158 158 … … 243 243 return FINALIZE_CODE( 244 244 patchBuffer, 245 ("Virtual %s slow path thunk",246 callLinkInfo.callMode() == CallMode::Regular ? "call" : callLinkInfo.callMode() == CallMode::Tail ? "tail call" : "construct") );245 "Virtual %s slow path thunk", 246 callLinkInfo.callMode() == CallMode::Regular ? "call" : callLinkInfo.callMode() == CallMode::Tail ? "tail call" : "construct"); 247 247 } 248 248 … … 428 428 429 429 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 430 return FINALIZE_CODE(patchBuffer, ("%s %s%s trampoline", thunkFunctionType == ThunkFunctionType::JSFunction ? "native" : "internal", entryType == EnterViaJumpWithSavedTags ? "Tail With Saved Tags " : entryType == EnterViaJumpWithoutSavedTags ? "Tail Without Saved Tags " : "", toCString(kind).data()));430 return FINALIZE_CODE(patchBuffer, "%s %s%s trampoline", thunkFunctionType == ThunkFunctionType::JSFunction ? "native" : "internal", entryType == EnterViaJumpWithSavedTags ? "Tail With Saved Tags " : entryType == EnterViaJumpWithoutSavedTags ? "Tail Without Saved Tags " : "", toCString(kind).data()); 431 431 } 432 432 … … 585 585 586 586 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 587 return FINALIZE_CODE(patchBuffer, ("fixup arity"));587 return FINALIZE_CODE(patchBuffer, "fixup arity"); 588 588 } 589 589 … … 595 595 596 596 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 597 return FINALIZE_CODE(patchBuffer, ("unreachable thunk"));597 return FINALIZE_CODE(patchBuffer, "unreachable thunk"); 598 598 } 599 599 … … 1191 1191 linkBuffer.link(noCode, CodeLocationLabel(vm->jitStubs->ctiNativeTailCallWithoutSavedTags(vm))); 1192 1192 return FINALIZE_CODE( 1193 linkBuffer, ("Specialized thunk for bound function calls with no arguments"));1193 linkBuffer, "Specialized thunk for bound function calls with no arguments"); 1194 1194 } 1195 1195 -
trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
r223738 r229054 1 1 /* 2 * Copyright (C) 2012-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2012-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 61 61 62 62 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 63 return FINALIZE_CODE(patchBuffer, ("LLInt %s prologue thunk", thunkKind));63 return FINALIZE_CODE(patchBuffer, "LLInt %s prologue thunk", thunkKind); 64 64 } 65 65 -
trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
r225363 r229054 1 1 /* 2 * Copyright (C) 2016-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 309 309 310 310 m_wasmInternalFunctions[functionIndex]->entrypoint.compilation = std::make_unique<B3::Compilation>( 311 FINALIZE_CODE(linkBuffer, ("WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),311 FINALIZE_CODE(linkBuffer, "WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()), 312 312 WTFMove(context.wasmEntrypointByproducts)); 313 313 } … … 321 321 322 322 embedderToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>( 323 FINALIZE_CODE(linkBuffer, ("Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),323 FINALIZE_CODE(linkBuffer, "Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()), 324 324 WTFMove(context.embedderEntrypointByproducts)); 325 325 } -
trunk/Source/JavaScriptCore/wasm/WasmBinding.cpp
r228966 r229054 1 1 /* 2 * Copyright (C) 2016-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 83 83 return makeUnexpected(BindingFailure::OutOfMemory); 84 84 85 return FINALIZE_CODE(patchBuffer, ("WebAssembly->WebAssembly import[%i]", importIndex));85 return FINALIZE_CODE(patchBuffer, "WebAssembly->WebAssembly import[%i]", importIndex); 86 86 } 87 87 -
trunk/Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
r225363 r229054 1 1 /* 2 * Copyright (C) 2017 Apple Inc. All rights reserved.2 * Copyright (C) 2017-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 99 99 100 100 omgEntrypoint.compilation = std::make_unique<B3::Compilation>( 101 FINALIZE_CODE(linkBuffer, ("WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),101 FINALIZE_CODE(linkBuffer, "WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()), 102 102 WTFMove(context.wasmEntrypointByproducts)); 103 103 -
trunk/Source/JavaScriptCore/wasm/WasmThunks.cpp
r228491 r229054 1 1 /* 2 * Copyright (C) 2017 Apple Inc. All rights reserved.2 * Copyright (C) 2017-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 60 60 LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID); 61 61 linkBuffer.link(call, FunctionPtr(throwWasmException)); 62 return FINALIZE_CODE(linkBuffer, ("Throw exception from Wasm"));62 return FINALIZE_CODE(linkBuffer, "Throw exception from Wasm"); 63 63 } 64 64 … … 74 74 LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID); 75 75 linkBuffer.link(jumpToExceptionHandler, CodeLocationLabel(Thunks::singleton().stub(locker, throwExceptionFromWasmThunkGenerator).code())); 76 return FINALIZE_CODE(linkBuffer, ("Throw stack overflow from Wasm"));76 return FINALIZE_CODE(linkBuffer, "Throw stack overflow from Wasm"); 77 77 } 78 78 … … 100 100 jit.ret(); 101 101 LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID); 102 return FINALIZE_CODE(linkBuffer, ("Trigger OMG tier up"));102 return FINALIZE_CODE(linkBuffer, "Trigger OMG tier up"); 103 103 } 104 104 -
trunk/Source/JavaScriptCore/wasm/js/WasmToJS.cpp
r227527 r229054 117 117 118 118 linkBuffer.link(call, throwBadI64); 119 return FINALIZE_CODE(linkBuffer, ("WebAssembly->JavaScript invalid i64 use in import[%i]", importIndex));119 return FINALIZE_CODE(linkBuffer, "WebAssembly->JavaScript invalid i64 use in import[%i]", importIndex); 120 120 } 121 121 … … 343 343 linkBuffer.link(exceptionCall, doUnwinding); 344 344 345 return FINALIZE_CODE(linkBuffer, ("WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data()));345 return FINALIZE_CODE(linkBuffer, "WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data()); 346 346 } 347 347 … … 655 655 callLinkInfo->setCallLocations(callReturnLocation, hotPathBegin, hotPathOther); 656 656 657 return FINALIZE_CODE(patchBuffer, ("WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data()));657 return FINALIZE_CODE(patchBuffer, "WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data()); 658 658 } 659 659 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r228481 r229054 1 1 /* 2 * Copyright (C) 2009-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2009-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 3489 3489 if (compileMode == MatchOnly) { 3490 3490 if (m_charSize == Char8) 3491 jitObject.set8BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, ("Match-only 8-bit regular expression")));3491 jitObject.set8BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, "Match-only 8-bit regular expression")); 3492 3492 else 3493 jitObject.set16BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, ("Match-only 16-bit regular expression")));3493 jitObject.set16BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, "Match-only 16-bit regular expression")); 3494 3494 } else { 3495 3495 if (m_charSize == Char8) 3496 jitObject.set8BitCode(FINALIZE_CODE(linkBuffer, ("8-bit regular expression")));3496 jitObject.set8BitCode(FINALIZE_CODE(linkBuffer, "8-bit regular expression")); 3497 3497 else 3498 jitObject.set16BitCode(FINALIZE_CODE(linkBuffer, ("16-bit regular expression")));3498 jitObject.set16BitCode(FINALIZE_CODE(linkBuffer, "16-bit regular expression")); 3499 3499 } 3500 3500 if (m_failureReason) -
trunk/Source/WebCore/ChangeLog
r229051 r229054 1 2018-02-26 Mark Lam <mark.lam@apple.com> 2 3 Modernize FINALIZE_CODE and peer macros to use __VA_ARGS__ arguments. 4 https://bugs.webkit.org/show_bug.cgi?id=183159 5 <rdar://problem/37930837> 6 7 Reviewed by Keith Miller. 8 9 No new tests needed because this is just a refactoring patch. 10 11 * cssjit/SelectorCompiler.cpp: 12 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile): 13 1 14 2018-02-26 Dan Bernstein <mitz@apple.com> 2 15 -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r226011 r229054 1 1 /* 2 * Copyright (C) 2013-201 6Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com> 4 4 * … … 1239 1239 codeRef = linkBuffer.finalizeCodeWithDisassembly("CSS Selector JIT for \"%s\"", m_originalSelector->selectorText().utf8().data()); 1240 1240 #else 1241 codeRef = FINALIZE_CODE(linkBuffer, ("CSS Selector JIT"));1241 codeRef = FINALIZE_CODE(linkBuffer, "CSS Selector JIT"); 1242 1242 #endif 1243 1243
Note: See TracChangeset
for help on using the changeset viewer.