Title: [229054] trunk/Source
Revision
229054
Author
[email protected]
Date
2018-02-26 23:50:54 -0800 (Mon, 26 Feb 2018)

Log Message

Modernize FINALIZE_CODE and peer macros to use __VA_ARGS__ arguments.
https://bugs.webkit.org/show_bug.cgi?id=183159
<rdar://problem/37930837>

Reviewed by Keith Miller.

Source/_javascript_Core:

* assembler/LinkBuffer.h:
* assembler/testmasm.cpp:
(JSC::compile):
* b3/B3Compile.cpp:
(JSC::B3::compile):
* b3/air/testair.cpp:
* b3/testb3.cpp:
(JSC::B3::testEntrySwitchSimple):
(JSC::B3::testEntrySwitchNoEntrySwitch):
(JSC::B3::testEntrySwitchWithCommonPaths):
(JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
(JSC::B3::testEntrySwitchLoop):
* bytecode/InlineAccess.cpp:
(JSC::linkCodeInline):
(JSC::InlineAccess::rewireStubAsJump):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::compileOSRExit):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrExitThunkGenerator):
(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeCommon):
* ftl/FTLLazySlowPath.cpp:
(JSC::FTL::LazySlowPath::generate):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* ftl/FTLThunks.cpp:
(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):
* jit/ExecutableAllocator.cpp:
* jit/JIT.cpp:
(JSC::JIT::link):
* jit/JITMathIC.h:
(JSC::isProfileEmpty):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileHasIndexedProperty):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileHasIndexedProperty):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
* jit/JITStubRoutine.h:
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):
* llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::complete):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* wasm/WasmThunks.cpp:
(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::throwStackOverflowFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGTierUpThunkGenerator):
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::wasmToJS):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::compile):

Source/WebCore:

No new tests needed because this is just a refactoring patch.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (229053 => 229054)


--- trunk/Source/_javascript_Core/ChangeLog	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,3 +1,95 @@
+2018-02-26  Mark Lam  <[email protected]>
+
+        Modernize FINALIZE_CODE and peer macros to use __VA_ARGS__ arguments.
+        https://bugs.webkit.org/show_bug.cgi?id=183159
+        <rdar://problem/37930837>
+
+        Reviewed by Keith Miller.
+
+        * assembler/LinkBuffer.h:
+        * assembler/testmasm.cpp:
+        (JSC::compile):
+        * b3/B3Compile.cpp:
+        (JSC::B3::compile):
+        * b3/air/testair.cpp:
+        * b3/testb3.cpp:
+        (JSC::B3::testEntrySwitchSimple):
+        (JSC::B3::testEntrySwitchNoEntrySwitch):
+        (JSC::B3::testEntrySwitchWithCommonPaths):
+        (JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
+        (JSC::B3::testEntrySwitchLoop):
+        * bytecode/InlineAccess.cpp:
+        (JSC::linkCodeInline):
+        (JSC::InlineAccess::rewireStubAsJump):
+        * bytecode/PolymorphicAccess.cpp:
+        (JSC::PolymorphicAccess::regenerate):
+        * dfg/DFGJITFinalizer.cpp:
+        (JSC::DFG::JITFinalizer::finalize):
+        (JSC::DFG::JITFinalizer::finalizeFunction):
+        * dfg/DFGOSRExit.cpp:
+        (JSC::DFG::OSRExit::compileOSRExit):
+        * dfg/DFGThunks.cpp:
+        (JSC::DFG::osrExitThunkGenerator):
+        (JSC::DFG::osrExitGenerationThunkGenerator):
+        (JSC::DFG::osrEntryThunkGenerator):
+        * ftl/FTLJITFinalizer.cpp:
+        (JSC::FTL::JITFinalizer::finalizeCommon):
+        * ftl/FTLLazySlowPath.cpp:
+        (JSC::FTL::LazySlowPath::generate):
+        * ftl/FTLOSRExitCompiler.cpp:
+        (JSC::FTL::compileStub):
+        * ftl/FTLThunks.cpp:
+        (JSC::FTL::genericGenerationThunkGenerator):
+        (JSC::FTL::slowPathCallThunkGenerator):
+        * jit/ExecutableAllocator.cpp:
+        * jit/JIT.cpp:
+        (JSC::JIT::link):
+        * jit/JITMathIC.h:
+        (JSC::isProfileEmpty):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::privateCompileHasIndexedProperty):
+        * jit/JITOpcodes32_64.cpp:
+        (JSC::JIT::privateCompileHasIndexedProperty):
+        * jit/JITPropertyAccess.cpp:
+        (JSC::JIT::stringGetByValStubGenerator):
+        (JSC::JIT::privateCompileGetByVal):
+        (JSC::JIT::privateCompileGetByValWithCachedId):
+        (JSC::JIT::privateCompilePutByVal):
+        (JSC::JIT::privateCompilePutByValWithCachedId):
+        * jit/JITPropertyAccess32_64.cpp:
+        (JSC::JIT::stringGetByValStubGenerator):
+        * jit/JITStubRoutine.h:
+        * jit/Repatch.cpp:
+        (JSC::linkPolymorphicCall):
+        * jit/SpecializedThunkJIT.h:
+        (JSC::SpecializedThunkJIT::finalize):
+        * jit/ThunkGenerators.cpp:
+        (JSC::throwExceptionFromCallSlowPathGenerator):
+        (JSC::linkCallThunkGenerator):
+        (JSC::linkPolymorphicCallThunkGenerator):
+        (JSC::virtualThunkFor):
+        (JSC::nativeForGenerator):
+        (JSC::arityFixupGenerator):
+        (JSC::unreachableGenerator):
+        (JSC::boundThisNoArgsFunctionCallGenerator):
+        * llint/LLIntThunks.cpp:
+        (JSC::LLInt::generateThunkWithJumpTo):
+        * wasm/WasmBBQPlan.cpp:
+        (JSC::Wasm::BBQPlan::complete):
+        * wasm/WasmBinding.cpp:
+        (JSC::Wasm::wasmToWasm):
+        * wasm/WasmOMGPlan.cpp:
+        (JSC::Wasm::OMGPlan::work):
+        * wasm/WasmThunks.cpp:
+        (JSC::Wasm::throwExceptionFromWasmThunkGenerator):
+        (JSC::Wasm::throwStackOverflowFromWasmThunkGenerator):
+        (JSC::Wasm::triggerOMGTierUpThunkGenerator):
+        * wasm/js/WasmToJS.cpp:
+        (JSC::Wasm::handleBadI64Use):
+        (JSC::Wasm::wasmToJS):
+        * yarr/YarrJIT.cpp:
+        (JSC::Yarr::YarrGenerator::compile):
+
 2018-02-25  Yusuke Suzuki  <[email protected]>
 
         [FTL] Support PutByVal(ArrayStorage/SlowPutArrayStorage)

Modified: trunk/Source/_javascript_Core/assembler/LinkBuffer.h (229053 => 229054)


--- trunk/Source/_javascript_Core/assembler/LinkBuffer.h	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/assembler/LinkBuffer.h	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -307,19 +307,19 @@
     Vector<RefPtr<SharedTask<void(LinkBuffer&)>>> m_linkTasks;
 };
 
-#define FINALIZE_CODE_IF(condition, linkBufferReference, dataLogFArgumentsForHeading)  \
+#define FINALIZE_CODE_IF(condition, linkBufferReference, ...)  \
     (UNLIKELY((condition))                                              \
-     ? ((linkBufferReference).finalizeCodeWithDisassembly dataLogFArgumentsForHeading) \
-     : (linkBufferReference).finalizeCodeWithoutDisassembly())
+        ? (linkBufferReference).finalizeCodeWithDisassembly(__VA_ARGS__) \
+        : (linkBufferReference).finalizeCodeWithoutDisassembly())
 
 bool shouldDumpDisassemblyFor(CodeBlock*);
 
-#define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, dataLogFArgumentsForHeading)  \
-    FINALIZE_CODE_IF(shouldDumpDisassemblyFor(codeBlock) || Options::asyncDisassembly(), linkBufferReference, dataLogFArgumentsForHeading)
+#define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, ...)  \
+    FINALIZE_CODE_IF((shouldDumpDisassemblyFor(codeBlock) || Options::asyncDisassembly()), linkBufferReference, __VA_ARGS__)
 
 // Use this to finalize code, like so:
 //
-// CodeRef code = FINALIZE_CODE(linkBuffer, ("my super thingy number %d", number));
+// CodeRef code = FINALIZE_CODE(linkBuffer, "my super thingy number %d", number);
 //
 // Which, in disassembly mode, will print:
 //
@@ -330,14 +330,14 @@
 //
 // ... and so on.
 //
-// Note that the dataLogFArgumentsForHeading are only evaluated when dumpDisassembly
+// Note that the format string and print arguments are only evaluated when dumpDisassembly
 // is true, so you can hide expensive disassembly-only computations inside there.
 
-#define FINALIZE_CODE(linkBufferReference, dataLogFArgumentsForHeading)  \
-    FINALIZE_CODE_IF(JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly(), linkBufferReference, dataLogFArgumentsForHeading)
+#define FINALIZE_CODE(linkBufferReference, ...)  \
+    FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly()), linkBufferReference, __VA_ARGS__)
 
-#define FINALIZE_DFG_CODE(linkBufferReference, dataLogFArgumentsForHeading)  \
-    FINALIZE_CODE_IF(JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly() || Options::dumpDFGDisassembly(), linkBufferReference, dataLogFArgumentsForHeading)
+#define FINALIZE_DFG_CODE(linkBufferReference, ...)  \
+    FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly() || Options::dumpDFGDisassembly()), linkBufferReference, __VA_ARGS__)
 
 } // namespace JSC
 

Modified: trunk/Source/_javascript_Core/assembler/testmasm.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/assembler/testmasm.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/assembler/testmasm.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -148,7 +148,7 @@
     CCallHelpers jit;
     generate(jit);
     LinkBuffer linkBuffer(jit, nullptr);
-    return FINALIZE_CODE(linkBuffer, ("testmasm compilation"));
+    return FINALIZE_CODE(linkBuffer, "testmasm compilation");
 }
 
 template<typename T, typename... Arguments>

Modified: trunk/Source/_javascript_Core/b3/B3Compile.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/b3/B3Compile.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/b3/B3Compile.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@
     generate(proc, jit);
     LinkBuffer linkBuffer(jit, nullptr);
 
-    return Compilation(FINALIZE_CODE(linkBuffer, ("B3::Compilation")), proc.releaseByproducts());
+    return Compilation(FINALIZE_CODE(linkBuffer, "B3::Compilation"), proc.releaseByproducts());
 }
 
 } } // namespace JSC::B3

Modified: trunk/Source/_javascript_Core/b3/air/testair.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/b3/air/testair.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/b3/air/testair.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -90,7 +90,7 @@
     LinkBuffer linkBuffer(jit, nullptr);
 
     return std::make_unique<B3::Compilation>(
-        FINALIZE_CODE(linkBuffer, ("testair compilation")), proc.releaseByproducts());
+        FINALIZE_CODE(linkBuffer, "testair compilation"), proc.releaseByproducts());
 }
 
 template<typename T, typename... Arguments>

Modified: trunk/Source/_javascript_Core/b3/testb3.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/b3/testb3.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/b3/testb3.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -13294,7 +13294,7 @@
     CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1));
     CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2));
     
-    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));
+    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");
     
     CHECK(invoke<int>(labelOne, 1, 2) == 3);
     CHECK(invoke<int>(labelTwo, 1, 2) == -1);
@@ -13327,7 +13327,7 @@
     CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1));
     CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2));
     
-    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));
+    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");
     
     CHECK_EQ(invoke<int>(labelOne, 1, 2), 3);
     CHECK_EQ(invoke<int>(labelTwo, 1, 2), 3);
@@ -13414,7 +13414,7 @@
     CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1));
     CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2));
     
-    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));
+    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");
     
     CHECK_EQ(invoke<int>(labelOne, 1, 2, 10), 3);
     CHECK_EQ(invoke<int>(labelTwo, 1, 2, 10), -1);
@@ -13531,7 +13531,7 @@
     CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1));
     CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2));
     
-    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));
+    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");
     
     CHECK_EQ(invoke<int>(labelOne, 1, 2, 10, false), 3);
     CHECK_EQ(invoke<int>(labelTwo, 1, 2, 10, false), -1);
@@ -13608,7 +13608,7 @@
     CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0));
     CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1));
     
-    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, ("testb3 compilation"));
+    MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");
 
     CHECK(invoke<int>(labelOne, 0) == 1);
     CHECK(invoke<int>(labelOne, 42) == 43);

Modified: trunk/Source/_javascript_Core/bytecode/InlineAccess.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/bytecode/InlineAccess.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/bytecode/InlineAccess.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -135,7 +135,7 @@
         LinkBuffer linkBuffer(jit, stubInfo.patch.start.dataLocation(), stubInfo.patch.inlineSize, JITCompilationMustSucceed, needsBranchCompaction);
         ASSERT(linkBuffer.isValid());
         function(linkBuffer);
-        FINALIZE_CODE(linkBuffer, ("InlineAccessType: '%s'", name));
+        FINALIZE_CODE(linkBuffer, "InlineAccessType: '%s'", name);
         return true;
     }
 
@@ -290,7 +290,7 @@
     RELEASE_ASSERT(linkBuffer.isValid());
     linkBuffer.link(jump, target);
 
-    FINALIZE_CODE(linkBuffer, ("InlineAccess: linking constant jump"));
+    FINALIZE_CODE(linkBuffer, "InlineAccess: linking constant jump");
 }
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -569,7 +569,7 @@
 
     MacroAssemblerCodeRef code = FINALIZE_CODE_FOR(
         codeBlock, linkBuffer,
-        ("%s", toCString("Access stub for ", *codeBlock, " ", stubInfo.codeOrigin, " with return point ", successLabel, ": ", listDump(cases)).data()));
+        "%s", toCString("Access stub for ", *codeBlock, " ", stubInfo.codeOrigin, " with return point ", successLabel, ": ", listDump(cases)).data());
 
     bool doesCalls = false;
     Vector<JSCell*> cellsToMark;

Modified: trunk/Source/_javascript_Core/dfg/DFGJITFinalizer.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/dfg/DFGJITFinalizer.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/dfg/DFGJITFinalizer.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -57,7 +57,7 @@
 bool JITFinalizer::finalize()
 {
     m_jitCode->initializeCodeRef(
-        FINALIZE_DFG_CODE(*m_linkBuffer, ("DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data())),
+        FINALIZE_DFG_CODE(*m_linkBuffer, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()),
         MacroAssemblerCodePtr());
     
     m_plan.codeBlock->setJITCode(m_jitCode.copyRef());
@@ -71,7 +71,7 @@
 {
     RELEASE_ASSERT(!m_withArityCheck.isEmptyValue());
     m_jitCode->initializeCodeRef(
-        FINALIZE_DFG_CODE(*m_linkBuffer, ("DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data())),
+        FINALIZE_DFG_CODE(*m_linkBuffer, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()),
         m_withArityCheck);
     m_plan.codeBlock->setJITCode(m_jitCode.copyRef());
     

Modified: trunk/Source/_javascript_Core/dfg/DFGOSRExit.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/dfg/DFGOSRExit.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/dfg/DFGOSRExit.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1069,10 +1069,10 @@
         exit.m_code = FINALIZE_CODE_IF(
             shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseDFGOSRExit(),
             patchBuffer,
-            ("DFG OSR exit #%u (%s, %s) from %s, with operands = %s",
+            "DFG OSR exit #%u (%s, %s) from %s, with operands = %s",
                 exitIndex, toCString(exit.m_codeOrigin).data(),
                 exitKindToString(exit.m_kind), toCString(*codeBlock).data(),
-                toCString(ignoringContext<DumpContext>(operands)).data()));
+                toCString(ignoringContext<DumpContext>(operands)).data());
     }
 
     MacroAssembler::repatchJump(exit.codeLocationForRepatch(codeBlock), CodeLocationLabel(exit.m_code.code()));

Modified: trunk/Source/_javascript_Core/dfg/DFGThunks.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/dfg/DFGThunks.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/dfg/DFGThunks.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@
     MacroAssembler jit;
     jit.probe(OSRExit::executeOSRExit, vm);
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("DFG OSR exit thunk"));
+    return FINALIZE_CODE(patchBuffer, "DFG OSR exit thunk");
 }
 
 MacroAssemblerCodeRef osrExitGenerationThunkGenerator(VM* vm)
@@ -105,7 +105,7 @@
     
     patchBuffer.link(functionCall, OSRExit::compileOSRExit);
     
-    return FINALIZE_CODE(patchBuffer, ("DFG OSR exit generation thunk"));
+    return FINALIZE_CODE(patchBuffer, "DFG OSR exit generation thunk");
 }
 
 MacroAssemblerCodeRef osrEntryThunkGenerator(VM* vm)
@@ -146,7 +146,7 @@
     jit.jump(GPRInfo::regT1);
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("DFG OSR entry thunk"));
+    return FINALIZE_CODE(patchBuffer, "DFG OSR entry thunk");
 }
 
 } } // namespace JSC::DFG

Modified: trunk/Source/_javascript_Core/ftl/FTLJITFinalizer.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/ftl/FTLJITFinalizer.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/ftl/FTLJITFinalizer.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -76,13 +76,13 @@
     jitCode->initializeB3Code(
         FINALIZE_CODE_IF(
             dumpDisassembly, *b3CodeLinkBuffer,
-            ("FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data())));
+            "FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data()));
 
     if (entrypointLinkBuffer) {
         jitCode->initializeArityCheckEntrypoint(
             FINALIZE_CODE_IF(
                 dumpDisassembly, *entrypointLinkBuffer,
-                ("FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)));
+                "FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function));
     }
     
     m_plan.codeBlock->setJITCode(*jitCode);

Modified: trunk/Source/_javascript_Core/ftl/FTLLazySlowPath.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/ftl/FTLLazySlowPath.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/ftl/FTLLazySlowPath.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -67,7 +67,7 @@
     linkBuffer.link(params.doneJumps, m_done);
     if (m_exceptionTarget)
         linkBuffer.link(exceptionJumps, m_exceptionTarget);
-    m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, ("Lazy slow path call stub"));
+    m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, "Lazy slow path call stub");
 
     MacroAssembler::repatchJump(m_patchableJump, CodeLocationLabel(m_stub.code()));
 }

Modified: trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -495,10 +495,10 @@
     exit.m_code = FINALIZE_CODE_IF(
         shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit(),
         patchBuffer,
-        ("FTL OSR exit #%u (%s, %s) from %s, with operands = %s",
+        "FTL OSR exit #%u (%s, %s) from %s, with operands = %s",
             exitID, toCString(exit.m_codeOrigin).data(),
             exitKindToString(exit.m_kind), toCString(*codeBlock).data(),
-            toCString(ignoringContext<DumpContext>(exit.m_descriptor->m_values)).data())
+            toCString(ignoringContext<DumpContext>(exit.m_descriptor->m_values)).data()
         );
 }
 

Modified: trunk/Source/_javascript_Core/ftl/FTLThunks.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/ftl/FTLThunks.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/ftl/FTLThunks.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -119,7 +119,7 @@
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
     patchBuffer.link(functionCall, generationFunction);
-    return FINALIZE_CODE(patchBuffer, ("%s", name));
+    return FINALIZE_CODE(patchBuffer, "%s", name);
 }
 
 MacroAssemblerCodeRef osrExitGenerationThunkGenerator(VM* vm)
@@ -224,7 +224,7 @@
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
     patchBuffer.link(call, FunctionPtr(key.callTarget()));
-    return FINALIZE_CODE(patchBuffer, ("FTL slow path call thunk for %s", toCString(key).data()));
+    return FINALIZE_CODE(patchBuffer, "FTL slow path call thunk for %s", toCString(key).data());
 }
 
 } } // namespace JSC::FTL

Modified: trunk/Source/_javascript_Core/jit/ExecutableAllocator.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/ExecutableAllocator.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/ExecutableAllocator.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2009, 2015, 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -870,7 +870,7 @@
     
     CodeRef result = FINALIZE_CODE(
         patchBuffer,
-        ("Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data()));
+        "Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data());
     
     m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT->add(
         static_cast<double>(result.size()) /

Modified: trunk/Source/_javascript_Core/jit/JITMathIC.h (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JITMathIC.h	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JITMathIC.h	2018-02-27 07:50:54 UTC (rev 229054)
@@ -139,7 +139,7 @@
             LinkBuffer linkBuffer(jit, m_inlineStart.dataLocation(), jit.m_assembler.buffer().codeSize(), JITCompilationMustSucceed, needsBranchCompaction);
             RELEASE_ASSERT(linkBuffer.isValid());
             linkBuffer.link(jump, CodeLocationLabel(m_code.code()));
-            FINALIZE_CODE(linkBuffer, ("JITMathIC: linking constant jump to out of line stub"));
+            FINALIZE_CODE(linkBuffer, "JITMathIC: linking constant jump to out of line stub");
         };
 
         auto replaceCall = [&] () {
@@ -166,7 +166,7 @@
                     linkBuffer.link(jumpToDone, doneLocation());
 
                     m_code = FINALIZE_CODE_FOR(
-                        codeBlock, linkBuffer, ("JITMathIC: generating out of line fast IC snippet"));
+                        codeBlock, linkBuffer, "JITMathIC: generating out of line fast IC snippet");
 
                     if (!generationState.shouldSlowPathRepatch) {
                         // We won't need to regenerate, so we can wire the slow path call
@@ -208,7 +208,7 @@
             linkBuffer.link(slowPathJumpList, slowPathStartLocation());
 
             m_code = FINALIZE_CODE_FOR(
-                codeBlock, linkBuffer, ("JITMathIC: generating out of line IC snippet"));
+                codeBlock, linkBuffer, "JITMathIC: generating out of line IC snippet");
         }
 
         linkJumpToOutOfLineSnippet();

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1082,7 +1082,7 @@
     
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
         m_codeBlock, patchBuffer,
-        ("Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
+        "Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value());
     
     MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));
     MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationHasIndexedPropertyGeneric));

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -933,7 +933,7 @@
     
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
         m_codeBlock, patchBuffer,
-        ("Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
+        "Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value());
     
     MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));
     MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationHasIndexedPropertyGeneric));

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -90,7 +90,7 @@
     jit.ret();
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("String get_by_val stub"));
+    return FINALIZE_CODE(patchBuffer, "String get_by_val stub");
 }
 
 void JIT::emit_op_get_by_val(Instruction* currentInstruction)
@@ -1262,7 +1262,7 @@
     
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
         m_codeBlock, patchBuffer,
-        ("Baseline get_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
+        "Baseline get_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value());
     
     MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));
     MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationGetByValGeneric));
@@ -1294,7 +1294,7 @@
 
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
         m_codeBlock, patchBuffer,
-        ("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()));
+        "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());
     byValInfo->stubInfo = gen.stubInfo();
 
     MacroAssembler::repatchJump(byValInfo->notIndexJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));
@@ -1349,12 +1349,12 @@
     if (!isDirect) {
         byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
             m_codeBlock, patchBuffer,
-            ("Baseline put_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
+            "Baseline put_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value());
         
     } else {
         byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
             m_codeBlock, patchBuffer,
-            ("Baseline put_by_val_direct stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
+            "Baseline put_by_val_direct stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value());
     }
     MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));
     MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(isDirect ? operationDirectPutByValGeneric : operationPutByValGeneric));
@@ -1384,7 +1384,7 @@
 
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
         m_codeBlock, patchBuffer,
-        ("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()));
+        "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());
     byValInfo->stubInfo = gen.stubInfo();
 
     MacroAssembler::repatchJump(byValInfo->notIndexJump, CodeLocationLabel(byValInfo->stubRoutine->code().code()));

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -178,7 +178,7 @@
     jit.ret();
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("String get_by_val stub"));
+    return FINALIZE_CODE(patchBuffer, "String get_by_val stub");
 }
 
 void JIT::emit_op_get_by_val(Instruction* currentInstruction)

Modified: trunk/Source/_javascript_Core/jit/JITStubRoutine.h (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/JITStubRoutine.h	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/JITStubRoutine.h	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -114,8 +114,8 @@
 };
 
 // Helper for the creation of simple stub routines that need no help from the GC.
-#define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, dataLogFArguments) \
-    (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), dataLogFArguments))))
+#define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, ...) \
+    (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), __VA_ARGS__))))
 
 } // namespace JSC
 

Modified: trunk/Source/_javascript_Core/jit/Repatch.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/Repatch.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/Repatch.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1079,9 +1079,9 @@
     auto stubRoutine = adoptRef(*new PolymorphicCallStubRoutine(
         FINALIZE_CODE_FOR(
             callerCodeBlock, patchBuffer,
-            ("Polymorphic call stub for %s, return point %p, targets %s",
+            "Polymorphic call stub for %s, return point %p, targets %s",
                 isWebAssembly ? "WebAssembly" : toCString(*callerCodeBlock).data(), callLinkInfo.callReturnLocation().labelAtOffset(0).executableAddress(),
-                toCString(listDump(callCases)).data())),
+                toCString(listDump(callCases)).data()),
         vm, owner, exec->callerFrame(), callLinkInfo, callCases,
         WTFMove(fastCounts)));
     

Modified: trunk/Source/_javascript_Core/jit/SpecializedThunkJIT.h (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/SpecializedThunkJIT.h	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/SpecializedThunkJIT.h	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -170,7 +170,7 @@
             patchBuffer.link(m_failures, CodeLocationLabel(fallback));
             for (unsigned i = 0; i < m_calls.size(); i++)
                 patchBuffer.link(m_calls[i].first, m_calls[i].second);
-            return FINALIZE_CODE(patchBuffer, ("Specialized thunk for %s", thunkKind));
+            return FINALIZE_CODE(patchBuffer, "Specialized thunk for %s", thunkKind);
         }
 
         // Assumes that the target function uses fpRegister0 as the first argument

Modified: trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -75,7 +75,7 @@
     jit.jumpToExceptionHandler(*vm);
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("Throw exception from call slow path thunk"));
+    return FINALIZE_CODE(patchBuffer, "Throw exception from call slow path thunk");
 }
 
 static void slowPathFor(
@@ -141,7 +141,7 @@
     slowPathFor(jit, vm, operationLinkCall);
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("Link call slow path thunk"));
+    return FINALIZE_CODE(patchBuffer, "Link call slow path thunk");
 }
 
 // For closure optimizations, we only include calls, since if you're using closures for
@@ -153,7 +153,7 @@
     slowPathFor(jit, vm, operationLinkPolymorphicCall);
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("Link polymorphic call slow path thunk"));
+    return FINALIZE_CODE(patchBuffer, "Link polymorphic call slow path thunk");
 }
 
 // FIXME: We should distinguish between a megamorphic virtual call vs. a slow
@@ -242,8 +242,8 @@
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
     return FINALIZE_CODE(
         patchBuffer,
-        ("Virtual %s slow path thunk",
-        callLinkInfo.callMode() == CallMode::Regular ? "call" : callLinkInfo.callMode() == CallMode::Tail ? "tail call" : "construct"));
+        "Virtual %s slow path thunk",
+        callLinkInfo.callMode() == CallMode::Regular ? "call" : callLinkInfo.callMode() == CallMode::Tail ? "tail call" : "construct");
 }
 
 enum ThunkEntryType { EnterViaCall, EnterViaJumpWithSavedTags, EnterViaJumpWithoutSavedTags };
@@ -427,7 +427,7 @@
     jit.jumpToExceptionHandler(*vm);
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    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()));
+    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());
 }
 
 MacroAssemblerCodeRef nativeCallGenerator(VM* vm)
@@ -584,7 +584,7 @@
 #endif
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("fixup arity"));
+    return FINALIZE_CODE(patchBuffer, "fixup arity");
 }
 
 MacroAssemblerCodeRef unreachableGenerator(VM* vm)
@@ -594,7 +594,7 @@
     jit.breakpoint();
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("unreachable thunk"));
+    return FINALIZE_CODE(patchBuffer, "unreachable thunk");
 }
 
 static void stringCharLoad(SpecializedThunkJIT& jit, VM* vm)
@@ -1190,7 +1190,7 @@
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
     linkBuffer.link(noCode, CodeLocationLabel(vm->jitStubs->ctiNativeTailCallWithoutSavedTags(vm)));
     return FINALIZE_CODE(
-        linkBuffer, ("Specialized thunk for bound function calls with no arguments"));
+        linkBuffer, "Specialized thunk for bound function calls with no arguments");
 }
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/llint/LLIntThunks.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/llint/LLIntThunks.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/llint/LLIntThunks.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -60,7 +60,7 @@
     jit.jump(JSInterfaceJIT::regT0);
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, ("LLInt %s prologue thunk", thunkKind));
+    return FINALIZE_CODE(patchBuffer, "LLInt %s prologue thunk", thunkKind);
 }
 
 MacroAssemblerCodeRef functionForCallEntryThunkGenerator(VM* vm)

Modified: trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -308,7 +308,7 @@
                 }
 
                 m_wasmInternalFunctions[functionIndex]->entrypoint.compilation = std::make_unique<B3::Compilation>(
-                    FINALIZE_CODE(linkBuffer, ("WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
+                    FINALIZE_CODE(linkBuffer, "WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()),
                     WTFMove(context.wasmEntrypointByproducts));
             }
 
@@ -320,7 +320,7 @@
                 }
 
                 embedderToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>(
-                    FINALIZE_CODE(linkBuffer, ("Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
+                    FINALIZE_CODE(linkBuffer, "Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()),
                     WTFMove(context.embedderEntrypointByproducts));
             }
         }

Modified: trunk/Source/_javascript_Core/wasm/WasmBinding.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/wasm/WasmBinding.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/wasm/WasmBinding.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -82,7 +82,7 @@
     if (UNLIKELY(patchBuffer.didFailToAllocate()))
         return makeUnexpected(BindingFailure::OutOfMemory);
 
-    return FINALIZE_CODE(patchBuffer, ("WebAssembly->WebAssembly import[%i]", importIndex));
+    return FINALIZE_CODE(patchBuffer, "WebAssembly->WebAssembly import[%i]", importIndex);
 }
 
 } } // namespace JSC::Wasm

Modified: trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -98,7 +98,7 @@
     }
 
     omgEntrypoint.compilation = std::make_unique<B3::Compilation>(
-        FINALIZE_CODE(linkBuffer, ("WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
+        FINALIZE_CODE(linkBuffer, "WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()),
         WTFMove(context.wasmEntrypointByproducts));
 
     omgEntrypoint.calleeSaveRegisters = WTFMove(parseAndCompileResult.value()->entrypoint.calleeSaveRegisters);

Modified: trunk/Source/_javascript_Core/wasm/WasmThunks.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/wasm/WasmThunks.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/wasm/WasmThunks.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -59,7 +59,7 @@
     RELEASE_ASSERT(throwWasmException);
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
     linkBuffer.link(call, FunctionPtr(throwWasmException));
-    return FINALIZE_CODE(linkBuffer, ("Throw exception from Wasm"));
+    return FINALIZE_CODE(linkBuffer, "Throw exception from Wasm");
 }
 
 MacroAssemblerCodeRef throwStackOverflowFromWasmThunkGenerator(const AbstractLocker& locker)
@@ -73,7 +73,7 @@
     auto jumpToExceptionHandler = jit.jump();
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
     linkBuffer.link(jumpToExceptionHandler, CodeLocationLabel(Thunks::singleton().stub(locker, throwExceptionFromWasmThunkGenerator).code()));
-    return FINALIZE_CODE(linkBuffer, ("Throw stack overflow from Wasm"));
+    return FINALIZE_CODE(linkBuffer, "Throw stack overflow from Wasm");
 }
 
 MacroAssemblerCodeRef triggerOMGTierUpThunkGenerator(const AbstractLocker&)
@@ -99,7 +99,7 @@
     jit.emitFunctionEpilogue();
     jit.ret();
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(linkBuffer, ("Trigger OMG tier up"));
+    return FINALIZE_CODE(linkBuffer, "Trigger OMG tier up");
 }
 
 static Thunks* thunks;

Modified: trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -116,7 +116,7 @@
             return makeUnexpected(BindingFailure::OutOfMemory);
 
         linkBuffer.link(call, throwBadI64);
-        return FINALIZE_CODE(linkBuffer, ("WebAssembly->_javascript_ invalid i64 use in import[%i]", importIndex));
+        return FINALIZE_CODE(linkBuffer, "WebAssembly->_javascript_ invalid i64 use in import[%i]", importIndex);
     }
     
     return MacroAssemblerCodeRef();
@@ -342,7 +342,7 @@
         linkBuffer.link(call, callFunc);
         linkBuffer.link(exceptionCall, doUnwinding);
 
-        return FINALIZE_CODE(linkBuffer, ("WebAssembly->_javascript_ import[%i] %s", importIndex, signature.toString().ascii().data()));
+        return FINALIZE_CODE(linkBuffer, "WebAssembly->_javascript_ import[%i] %s", importIndex, signature.toString().ascii().data());
     }
 
     // Note: We don't need to perform a stack check here since WasmB3IRGenerator
@@ -654,7 +654,7 @@
     CodeLocationNearCall hotPathOther = patchBuffer.locationOfNearCall(fastCall);
     callLinkInfo->setCallLocations(callReturnLocation, hotPathBegin, hotPathOther);
 
-    return FINALIZE_CODE(patchBuffer, ("WebAssembly->_javascript_ import[%i] %s", importIndex, signature.toString().ascii().data()));
+    return FINALIZE_CODE(patchBuffer, "WebAssembly->_javascript_ import[%i] %s", importIndex, signature.toString().ascii().data());
 }
 
 void* wasmToJSException(ExecState* exec, Wasm::ExceptionType type, Instance* wasmInstance)

Modified: trunk/Source/_javascript_Core/yarr/YarrJIT.cpp (229053 => 229054)


--- trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -3488,14 +3488,14 @@
 
         if (compileMode == MatchOnly) {
             if (m_charSize == Char8)
-                jitObject.set8BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, ("Match-only 8-bit regular _expression_")));
+                jitObject.set8BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, "Match-only 8-bit regular _expression_"));
             else
-                jitObject.set16BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, ("Match-only 16-bit regular _expression_")));
+                jitObject.set16BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, "Match-only 16-bit regular _expression_"));
         } else {
             if (m_charSize == Char8)
-                jitObject.set8BitCode(FINALIZE_CODE(linkBuffer, ("8-bit regular _expression_")));
+                jitObject.set8BitCode(FINALIZE_CODE(linkBuffer, "8-bit regular _expression_"));
             else
-                jitObject.set16BitCode(FINALIZE_CODE(linkBuffer, ("16-bit regular _expression_")));
+                jitObject.set16BitCode(FINALIZE_CODE(linkBuffer, "16-bit regular _expression_"));
         }
         if (m_failureReason)
             jitObject.setFallBackWithFailureReason(*m_failureReason);

Modified: trunk/Source/WebCore/ChangeLog (229053 => 229054)


--- trunk/Source/WebCore/ChangeLog	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/WebCore/ChangeLog	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,3 +1,16 @@
+2018-02-26  Mark Lam  <[email protected]>
+
+        Modernize FINALIZE_CODE and peer macros to use __VA_ARGS__ arguments.
+        https://bugs.webkit.org/show_bug.cgi?id=183159
+        <rdar://problem/37930837>
+
+        Reviewed by Keith Miller.
+
+        No new tests needed because this is just a refactoring patch.
+
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
+
 2018-02-26  Dan Bernstein  <[email protected]>
 
         Removed references to files that were removed in r228912.

Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (229053 => 229054)


--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp	2018-02-27 07:32:14 UTC (rev 229053)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp	2018-02-27 07:50:54 UTC (rev 229054)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
  * Copyright (C) 2014 Yusuke Suzuki <[email protected]>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1238,7 +1238,7 @@
 #if CSS_SELECTOR_JIT_DEBUGGING
     codeRef = linkBuffer.finalizeCodeWithDisassembly("CSS Selector JIT for \"%s\"", m_originalSelector->selectorText().utf8().data());
 #else
-    codeRef = FINALIZE_CODE(linkBuffer, ("CSS Selector JIT"));
+    codeRef = FINALIZE_CODE(linkBuffer, "CSS Selector JIT");
 #endif
 
     if (m_functionType == FunctionType::SimpleSelectorChecker || m_functionType == FunctionType::CannotMatchAnything)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to