Title: [230592] trunk/Source/_javascript_Core
Revision
230592
Author
mark....@apple.com
Date
2018-04-12 13:14:21 -0700 (Thu, 12 Apr 2018)

Log Message

Consolidate some PtrTags.
https://bugs.webkit.org/show_bug.cgi?id=184552
<rdar://problem/39389404>

Reviewed by Filip Pizlo.

Consolidate CodeEntryPtrTag and CodeEntryWithArityCheckPtrTag into CodePtrTag.
Consolidate NearCallPtrTag and NearJumpPtrTag into NearCodePtrTag.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::repatchNearCall):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::readCallTarget):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::readCallTarget):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::readCallTarget):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::readCallTarget):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::readCallTarget):
* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):
* bytecode/InlineAccess.cpp:
(JSC::InlineAccess::rewireStubAsJump):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::adjustAndJumpToTarget):
(JSC::DFG::OSRExit::compileOSRExit):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::adjustAndJumpToTarget):
* dfg/DFGOperations.cpp:
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::executableAddressAtOffset):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeCommon):
* ftl/FTLLazySlowPath.cpp:
(JSC::FTL::LazySlowPath::generate):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::lazySlowPath):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLOSRExitHandle.cpp:
(JSC::FTL::OSRExitHandle::emitExitThunk):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitDumbVirtualCall):
* jit/JIT.cpp:
(JSC::JIT::compileWithoutLinking):
(JSC::JIT::link):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCode.cpp:
(JSC::JITCodeWithCodeRef::executableAddressAtOffset):
(JSC::NativeJITCode::addressForCall):
* jit/JITInlines.h:
(JSC::JIT::emitNakedCall):
(JSC::JIT::emitNakedTailCall):
* jit/JITMathIC.h:
(JSC::isProfileEmpty):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileHasIndexedProperty):
* jit/JITOperations.cpp:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):
* jit/JITThunks.cpp:
(JSC::JITThunks::hostFunctionStub):
* jit/Repatch.cpp:
(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::linkPolymorphicCall):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* jit/ThunkGenerators.cpp:
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* llint/LLIntEntrypoint.cpp:
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
(JSC::LLInt::setModuleProgramEntrypoint):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):
* llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
(JSC::LLInt::functionForCallEntryThunkGenerator):
(JSC::LLInt::functionForConstructEntryThunkGenerator):
(JSC::LLInt::functionForCallArityCheckThunkGenerator):
(JSC::LLInt::functionForConstructArityCheckThunkGenerator):
(JSC::LLInt::evalEntryThunkGenerator):
(JSC::LLInt::programEntryThunkGenerator):
(JSC::LLInt::moduleProgramEntryThunkGenerator):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/NativeExecutable.cpp:
(JSC::NativeExecutable::finishCreation):
* runtime/NativeFunction.h:
(JSC::TaggedNativeFunction::TaggedNativeFunction):
(JSC::TaggedNativeFunction::operator NativeFunction):
* runtime/PtrTag.h:
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::complete):
* 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::wasmToJS):
* wasm/js/WebAssemblyFunction.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::compile):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (230591 => 230592)


--- trunk/Source/_javascript_Core/ChangeLog	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-04-12 20:14:21 UTC (rev 230592)
@@ -1,3 +1,143 @@
+2018-04-12  Mark Lam  <mark....@apple.com>
+
+        Consolidate some PtrTags.
+        https://bugs.webkit.org/show_bug.cgi?id=184552
+        <rdar://problem/39389404>
+
+        Reviewed by Filip Pizlo.
+
+        Consolidate CodeEntryPtrTag and CodeEntryWithArityCheckPtrTag into CodePtrTag.
+        Consolidate NearCallPtrTag and NearJumpPtrTag into NearCodePtrTag.
+
+        * assembler/AbstractMacroAssembler.h:
+        (JSC::AbstractMacroAssembler::repatchNearCall):
+        * assembler/MacroAssemblerARM.h:
+        (JSC::MacroAssemblerARM::readCallTarget):
+        * assembler/MacroAssemblerARMv7.h:
+        (JSC::MacroAssemblerARMv7::readCallTarget):
+        * assembler/MacroAssemblerMIPS.h:
+        (JSC::MacroAssemblerMIPS::readCallTarget):
+        * assembler/MacroAssemblerX86.h:
+        (JSC::MacroAssemblerX86::readCallTarget):
+        * assembler/MacroAssemblerX86_64.h:
+        (JSC::MacroAssemblerX86_64::readCallTarget):
+        * bytecode/AccessCase.cpp:
+        (JSC::AccessCase::generateImpl):
+        * bytecode/InlineAccess.cpp:
+        (JSC::InlineAccess::rewireStubAsJump):
+        * bytecode/PolymorphicAccess.cpp:
+        (JSC::PolymorphicAccess::regenerate):
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::linkOSRExits):
+        (JSC::DFG::JITCompiler::link):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * dfg/DFGJITFinalizer.cpp:
+        (JSC::DFG::JITFinalizer::finalize):
+        (JSC::DFG::JITFinalizer::finalizeFunction):
+        * dfg/DFGOSREntry.cpp:
+        (JSC::DFG::prepareOSREntry):
+        * dfg/DFGOSRExit.cpp:
+        (JSC::DFG::OSRExit::executeOSRExit):
+        (JSC::DFG::adjustAndJumpToTarget):
+        (JSC::DFG::OSRExit::compileOSRExit):
+        * dfg/DFGOSRExitCompilerCommon.cpp:
+        (JSC::DFG::adjustAndJumpToTarget):
+        * dfg/DFGOperations.cpp:
+        * ftl/FTLJITCode.cpp:
+        (JSC::FTL::JITCode::executableAddressAtOffset):
+        * ftl/FTLJITFinalizer.cpp:
+        (JSC::FTL::JITFinalizer::finalizeCommon):
+        * ftl/FTLLazySlowPath.cpp:
+        (JSC::FTL::LazySlowPath::generate):
+        * ftl/FTLLink.cpp:
+        (JSC::FTL::link):
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
+        (JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
+        (JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
+        (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
+        (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
+        (JSC::FTL::DFG::LowerDFGToB3::lazySlowPath):
+        * ftl/FTLOSRExitCompiler.cpp:
+        (JSC::FTL::compileFTLOSRExit):
+        * ftl/FTLOSRExitHandle.cpp:
+        (JSC::FTL::OSRExitHandle::emitExitThunk):
+        * jit/AssemblyHelpers.cpp:
+        (JSC::AssemblyHelpers::emitDumbVirtualCall):
+        * jit/JIT.cpp:
+        (JSC::JIT::compileWithoutLinking):
+        (JSC::JIT::link):
+        * jit/JITCall.cpp:
+        (JSC::JIT::compileOpCallSlowCase):
+        * jit/JITCode.cpp:
+        (JSC::JITCodeWithCodeRef::executableAddressAtOffset):
+        (JSC::NativeJITCode::addressForCall):
+        * jit/JITInlines.h:
+        (JSC::JIT::emitNakedCall):
+        (JSC::JIT::emitNakedTailCall):
+        * jit/JITMathIC.h:
+        (JSC::isProfileEmpty):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::privateCompileHasIndexedProperty):
+        * jit/JITOperations.cpp:
+        * jit/JITPropertyAccess.cpp:
+        (JSC::JIT::stringGetByValStubGenerator):
+        (JSC::JIT::privateCompileGetByVal):
+        (JSC::JIT::privateCompileGetByValWithCachedId):
+        (JSC::JIT::privateCompilePutByVal):
+        (JSC::JIT::privateCompilePutByValWithCachedId):
+        * jit/JITThunks.cpp:
+        (JSC::JITThunks::hostFunctionStub):
+        * jit/Repatch.cpp:
+        (JSC::linkSlowFor):
+        (JSC::linkFor):
+        (JSC::linkPolymorphicCall):
+        * jit/SpecializedThunkJIT.h:
+        (JSC::SpecializedThunkJIT::finalize):
+        * jit/ThunkGenerators.cpp:
+        (JSC::virtualThunkFor):
+        (JSC::nativeForGenerator):
+        (JSC::boundThisNoArgsFunctionCallGenerator):
+        * llint/LLIntData.cpp:
+        (JSC::LLInt::initialize):
+        * llint/LLIntEntrypoint.cpp:
+        (JSC::LLInt::setEvalEntrypoint):
+        (JSC::LLInt::setProgramEntrypoint):
+        (JSC::LLInt::setModuleProgramEntrypoint):
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        (JSC::LLInt::setUpCall):
+        * llint/LLIntThunks.cpp:
+        (JSC::LLInt::generateThunkWithJumpTo):
+        (JSC::LLInt::functionForCallEntryThunkGenerator):
+        (JSC::LLInt::functionForConstructEntryThunkGenerator):
+        (JSC::LLInt::functionForCallArityCheckThunkGenerator):
+        (JSC::LLInt::functionForConstructArityCheckThunkGenerator):
+        (JSC::LLInt::evalEntryThunkGenerator):
+        (JSC::LLInt::programEntryThunkGenerator):
+        (JSC::LLInt::moduleProgramEntryThunkGenerator):
+        * llint/LowLevelInterpreter.asm:
+        * llint/LowLevelInterpreter64.asm:
+        * runtime/NativeExecutable.cpp:
+        (JSC::NativeExecutable::finishCreation):
+        * runtime/NativeFunction.h:
+        (JSC::TaggedNativeFunction::TaggedNativeFunction):
+        (JSC::TaggedNativeFunction::operator NativeFunction):
+        * runtime/PtrTag.h:
+        * wasm/WasmBBQPlan.cpp:
+        (JSC::Wasm::BBQPlan::complete):
+        * 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::wasmToJS):
+        * wasm/js/WebAssemblyFunction.h:
+        * yarr/YarrJIT.cpp:
+        (JSC::Yarr::YarrGenerator::compile):
+
 2018-04-12  Michael Catanzaro  <mcatanz...@igalia.com>
 
         [WPE] Move libWPEWebInspectorResources.so to pkglibdir

Modified: trunk/Source/_javascript_Core/assembler/AbstractMacroAssembler.h (230591 => 230592)


--- trunk/Source/_javascript_Core/assembler/AbstractMacroAssembler.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/assembler/AbstractMacroAssembler.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -894,7 +894,7 @@
 
     static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination)
     {
-        assertIsTaggedWith(destination.executableAddress(), NearCallPtrTag);
+        assertIsTaggedWith(destination.executableAddress(), NearCodePtrTag);
         switch (nearCall.callMode()) {
         case NearCallMode::Tail:
             AssemblerType::relinkJump(nearCall.dataLocation(), destination.dataLocation());

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h (230591 => 230592)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -1507,7 +1507,7 @@
 
     static FunctionPtr readCallTarget(CodeLocationCall call)
     {
-        return FunctionPtr(reinterpret_cast<void(*)()>(ARMAssembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag);
+        return FunctionPtr(reinterpret_cast<void(*)()>(ARMAssembler::readCallTarget(call.dataLocation())), CodePtrTag);
     }
 
     static void replaceWithJump(CodeLocationLabel instructionStart, CodeLocationLabel destination)

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARMv7.h (230591 => 230592)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARMv7.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARMv7.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -1991,7 +1991,7 @@
     
     static FunctionPtr readCallTarget(CodeLocationCall call)
     {
-        return FunctionPtr(reinterpret_cast<void(*)()>(ARMv7Assembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag);
+        return FunctionPtr(reinterpret_cast<void(*)()>(ARMv7Assembler::readCallTarget(call.dataLocation())), CodePtrTag);
     }
     
     static bool canJumpReplacePatchableBranchPtrWithPatch() { return false; }

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h (230591 => 230592)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -3391,7 +3391,7 @@
 
     static FunctionPtr readCallTarget(CodeLocationCall call)
     {
-        return FunctionPtr(reinterpret_cast<void(*)()>(MIPSAssembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag);
+        return FunctionPtr(reinterpret_cast<void(*)()>(MIPSAssembler::readCallTarget(call.dataLocation())), CodePtrTag);
     }
 
     static void replaceWithJump(CodeLocationLabel instructionStart, CodeLocationLabel destination)

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerX86.h (230591 => 230592)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerX86.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerX86.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -302,7 +302,7 @@
     static FunctionPtr readCallTarget(CodeLocationCall call)
     {
         intptr_t offset = reinterpret_cast<int32_t*>(call.dataLocation())[-1];
-        return FunctionPtr(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(call.dataLocation()) + offset), CodeEntryPtrTag);
+        return FunctionPtr(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(call.dataLocation()) + offset), CodePtrTag);
     }
 
     static bool canJumpReplacePatchableBranchPtrWithPatch() { return true; }

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h (230591 => 230592)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -1886,7 +1886,7 @@
     
     static FunctionPtr readCallTarget(CodeLocationCall call)
     {
-        return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-REPATCH_OFFSET_CALL_R11).dataLocation()), CodeEntryPtrTag);
+        return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-REPATCH_OFFSET_CALL_R11).dataLocation()), CodePtrTag);
     }
 
     bool haveScratchRegisterForBlinding() { return m_allowScratchRegister; }

Modified: trunk/Source/_javascript_Core/bytecode/AccessCase.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/bytecode/AccessCase.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/bytecode/AccessCase.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -825,7 +825,7 @@
                 PtrTag linkTag = ptrTag(LinkCallPtrTag, &vm);
                 linkBuffer.link(
                     slowPathCall,
-                    CodeLocationLabel(vm.getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag)));
+                    CodeLocationLabel(vm.getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag)));
             });
         } else {
             ASSERT(m_type == CustomValueGetter || m_type == CustomAccessorGetter || m_type == CustomValueSetter || m_type == CustomAccessorSetter);

Modified: trunk/Source/_javascript_Core/bytecode/InlineAccess.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/bytecode/InlineAccess.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/bytecode/InlineAccess.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -290,7 +290,7 @@
     RELEASE_ASSERT(linkBuffer.isValid());
     linkBuffer.link(jump, target);
 
-    FINALIZE_CODE(linkBuffer, NearJumpPtrTag, "InlineAccess: linking constant jump");
+    FINALIZE_CODE(linkBuffer, NearCodePtrTag, "InlineAccess: linking constant jump");
 }
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -569,7 +569,7 @@
         dataLog(FullCodeOrigin(codeBlock, stubInfo.codeOrigin), ": Generating polymorphic access stub for ", listDump(cases), "\n");
 
     MacroAssemblerCodeRef code = FINALIZE_CODE_FOR(
-        codeBlock, linkBuffer, NearJumpPtrTag,
+        codeBlock, linkBuffer, NearCodePtrTag,
         "%s", toCString("Access stub for ", *codeBlock, " ", stubInfo.codeOrigin, " with return point ", successLabel, ": ", listDump(cases)).data());
 
     bool doesCalls = false;

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -87,7 +87,7 @@
     
     MacroAssemblerCodeRef osrExitThunk = vm()->getCTIStub(osrExitThunkGenerator);
     PtrTag osrExitThunkTag = ptrTag(DFGOSRExitPtrTag, vm());
-    CodeLocationLabel osrExitThunkLabel = CodeLocationLabel(osrExitThunk.retaggedCode(osrExitThunkTag, NearJumpPtrTag));
+    CodeLocationLabel osrExitThunkLabel = CodeLocationLabel(osrExitThunk.retaggedCode(osrExitThunkTag, NearCodePtrTag));
     for (unsigned i = 0; i < m_jitCode->osrExit.size(); ++i) {
         OSRExitCompilationInfo& info = m_exitCompilationInfo[i];
         JumpList& failureJumps = info.m_failureJumps;
@@ -293,7 +293,7 @@
     }
     
     PtrTag linkTag = ptrTag(LinkCallPtrTag, vm());
-    auto linkCallThunk = FunctionPtr(vm()->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag));
+    auto linkCallThunk = FunctionPtr(vm()->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag));
     for (auto& record : m_jsCalls) {
         CallLinkInfo& info = *record.info;
         linkBuffer.link(record.slowCall, linkCallThunk);
@@ -305,10 +305,10 @@
     
     for (JSDirectCallRecord& record : m_jsDirectCalls) {
         CallLinkInfo& info = *record.info;
-        linkBuffer.link(record.call, linkBuffer.locationOf(record.slowPath, NearCallPtrTag));
+        linkBuffer.link(record.call, linkBuffer.locationOf(record.slowPath, NearCodePtrTag));
         info.setCallLocations(
             CodeLocationLabel(),
-            linkBuffer.locationOf(record.slowPath, NearCallPtrTag),
+            linkBuffer.locationOf(record.slowPath, NearCodePtrTag),
             linkBuffer.locationOfNearCall(record.call));
     }
     
@@ -316,13 +316,13 @@
         CallLinkInfo& info = *record.info;
         info.setCallLocations(
             linkBuffer.locationOf(record.patchableJump),
-            linkBuffer.locationOf(record.slowPath, NearCallPtrTag),
+            linkBuffer.locationOf(record.slowPath, NearCodePtrTag),
             linkBuffer.locationOfNearCall(record.call));
     }
     
     MacroAssemblerCodeRef osrExitThunk = vm()->getCTIStub(osrExitGenerationThunkGenerator);
     PtrTag osrExitThunkTag = ptrTag(DFGOSRExitPtrTag, vm());
-    CodeLocationLabel target = CodeLocationLabel(osrExitThunk.retaggedCode(osrExitThunkTag, NearJumpPtrTag));
+    CodeLocationLabel target = CodeLocationLabel(osrExitThunk.retaggedCode(osrExitThunkTag, NearCodePtrTag));
     for (unsigned i = 0; i < m_jitCode->osrExit.size(); ++i) {
         OSRExitCompilationInfo& info = m_exitCompilationInfo[i];
         if (!Options::useProbeOSRExit()) {
@@ -332,8 +332,8 @@
         }
         if (info.m_replacementSource.isSet()) {
             m_jitCode->common.jumpReplacements.append(JumpReplacement(
-                linkBuffer.locationOf(info.m_replacementSource, NearJumpPtrTag),
-                linkBuffer.locationOf(info.m_replacementDestination, NearJumpPtrTag)));
+                linkBuffer.locationOf(info.m_replacementSource, NearCodePtrTag),
+                linkBuffer.locationOf(info.m_replacementDestination, NearCodePtrTag)));
         }
     }
     
@@ -539,11 +539,11 @@
     m_jitCode->shrinkToFit();
     codeBlock()->shrinkToFit(CodeBlock::LateShrink);
 
-    linkBuffer->link(callArityFixup, FunctionPtr(vm()->getCTIStub(arityFixupGenerator).retaggedCode(ptrTag(ArityFixupPtrTag, vm()), NearCallPtrTag)));
+    linkBuffer->link(callArityFixup, FunctionPtr(vm()->getCTIStub(arityFixupGenerator).retaggedCode(ptrTag(ArityFixupPtrTag, vm()), NearCodePtrTag)));
 
     disassemble(*linkBuffer);
 
-    MacroAssemblerCodePtr withArityCheck = linkBuffer->locationOf(m_arityCheck, CodeEntryWithArityCheckPtrTag);
+    MacroAssemblerCodePtr withArityCheck = linkBuffer->locationOf(m_arityCheck, CodePtrTag);
 
     m_graph.m_plan.finalizer = std::make_unique<JITFinalizer>(
         m_graph.m_plan, m_jitCode.releaseNonNull(), WTFMove(linkBuffer), withArityCheck);

Modified: trunk/Source/_javascript_Core/dfg/DFGJITFinalizer.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/dfg/DFGJITFinalizer.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/dfg/DFGJITFinalizer.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -56,8 +56,8 @@
 
 bool JITFinalizer::finalize()
 {
-    MacroAssemblerCodeRef codeRef = FINALIZE_DFG_CODE(*m_linkBuffer, CodeEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data());
-    m_jitCode->initializeCodeRef(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag));
+    MacroAssemblerCodeRef codeRef = FINALIZE_DFG_CODE(*m_linkBuffer, CodePtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data());
+    m_jitCode->initializeCodeRef(codeRef, codeRef.code());
     
     m_plan.codeBlock->setJITCode(m_jitCode.copyRef());
     
@@ -70,7 +70,7 @@
 {
     RELEASE_ASSERT(!m_withArityCheck.isEmptyValue());
     m_jitCode->initializeCodeRef(
-        FINALIZE_DFG_CODE(*m_linkBuffer, CodeEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()),
+        FINALIZE_DFG_CODE(*m_linkBuffer, CodePtrTag, "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/DFGOSREntry.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -273,7 +273,7 @@
     if (Options::verboseOSR())
         dataLogF("    OSR using target PC %p.\n", targetPC);
     RELEASE_ASSERT(targetPC);
-    *bitwise_cast<void**>(scratch + 1) = retagCodePtr(targetPC, CodeEntryPtrTag, bitwise_cast<PtrTag>(exec));
+    *bitwise_cast<void**>(scratch + 1) = retagCodePtr(targetPC, CodePtrTag, bitwise_cast<PtrTag>(exec));
 
     Register* pivot = scratch + 2 + CallFrame::headerSizeInRegisters;
     

Modified: trunk/Source/_javascript_Core/dfg/DFGOSRExit.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/dfg/DFGOSRExit.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/dfg/DFGOSRExit.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -393,8 +393,8 @@
         CodeLocationLabel codeLocation = codeMap.find(exit.m_codeOrigin.bytecodeIndex);
         ASSERT(codeLocation);
 
-        PtrTag locationTag = ptrTag(CodeEntryPtrTag, codeBlockForExit, exit.m_codeOrigin.bytecodeIndex);
-        void* jumpTarget = codeLocation.retagged(locationTag, CodeEntryPtrTag).executableAddress();
+        PtrTag locationTag = ptrTag(CodePtrTag, codeBlockForExit, exit.m_codeOrigin.bytecodeIndex);
+        void* jumpTarget = codeLocation.retagged(locationTag, CodePtrTag).executableAddress();
 
         // Compute the value recoveries.
         Operands<ValueRecovery> operands;
@@ -866,7 +866,7 @@
     }
 
     vm.topCallFrame = context.fp<ExecState*>();
-    context.pc() = untagCodePtr(jumpTarget, CodeEntryPtrTag);
+    context.pc() = untagCodePtr(jumpTarget, CodePtrTag);
 }
 
 static void printOSRExit(Context& context, uint32_t osrExitIndex, const OSRExit& exit)
@@ -1084,7 +1084,7 @@
                 toCString(ignoringContext<DumpContext>(operands)).data());
     }
 
-    MacroAssembler::repatchJump(exit.codeLocationForRepatch(codeBlock), CodeLocationLabel(exit.m_code.retaggedCode(exitTag, NearJumpPtrTag)));
+    MacroAssembler::repatchJump(exit.codeLocationForRepatch(codeBlock), CodeLocationLabel(exit.m_code.retaggedCode(exitTag, NearCodePtrTag)));
 
     vm->osrExitJumpDestination = exit.m_code.code().executableAddress();
 }

Modified: trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -322,7 +322,7 @@
     CodeLocationLabel codeLocation = codeBlockForExit->jitCodeMap().find(exit.m_codeOrigin.bytecodeIndex);
     ASSERT(codeLocation);
 
-    PtrTag locationTag = ptrTag(CodeEntryPtrTag, codeBlockForExit, exit.m_codeOrigin.bytecodeIndex);
+    PtrTag locationTag = ptrTag(CodePtrTag, codeBlockForExit, exit.m_codeOrigin.bytecodeIndex);
     PtrTag exitTag = ptrTag(DFGOSRExitPtrTag, nextPtrTagID());
     void* jumpTarget = codeLocation.retagged(locationTag, exitTag).executableAddress();
     jit.addPtr(AssemblyHelpers::TrustedImm32(JIT::stackPointerOffsetFor(codeBlockForExit) * sizeof(Register)), GPRInfo::callFrameRegister, AssemblyHelpers::stackPointerRegister);

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -3044,7 +3044,7 @@
                 dataLog("OSR entry: From ", RawPointer(jitCode), " got entry block ", RawPointer(entryBlock), "\n");
             if (void* address = FTL::prepareOSREntry(exec, codeBlock, entryBlock, originBytecodeIndex, streamIndex)) {
                 CODEBLOCK_LOG_EVENT(entryBlock, "osrEntry", ("at bc#", originBytecodeIndex));
-                return retagCodePtr<char*>(address, CodeEntryPtrTag, bitwise_cast<PtrTag>(exec));
+                return retagCodePtr<char*>(address, CodePtrTag, bitwise_cast<PtrTag>(exec));
             }
         }
     }
@@ -3166,7 +3166,7 @@
         exec, codeBlock, jitCode->osrEntryBlock(), originBytecodeIndex, streamIndex);
     if (!address)
         return nullptr;
-    return retagCodePtr<char*>(address, CodeEntryPtrTag, bitwise_cast<PtrTag>(exec));
+    return retagCodePtr<char*>(address, CodePtrTag, bitwise_cast<PtrTag>(exec));
 }
 
 void JIT_OPERATION triggerTierUpNowInLoop(ExecState* exec, unsigned bytecodeIndex)

Modified: trunk/Source/_javascript_Core/ftl/FTLJITCode.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLJITCode.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLJITCode.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -86,12 +86,12 @@
 void* JITCode::executableAddressAtOffset(size_t offset)
 {
     return m_addressForCall.executableAddress<char*>() + offset;
-    assertIsTaggedWith(m_addressForCall.executableAddress(), CodeEntryPtrTag);
+    assertIsTaggedWith(m_addressForCall.executableAddress(), CodePtrTag);
     if (!offset)
         return m_addressForCall.executableAddress();
 
-    char* executableAddress = untagCodePtr<char*>(m_addressForCall.executableAddress(), CodeEntryPtrTag);
-    return tagCodePtr(executableAddress + offset, CodeEntryPtrTag);
+    char* executableAddress = untagCodePtr<char*>(m_addressForCall.executableAddress(), CodePtrTag);
+    return tagCodePtr(executableAddress + offset, CodePtrTag);
 }
 
 void* JITCode::dataAddressAtOffset(size_t)

Modified: trunk/Source/_javascript_Core/ftl/FTLJITFinalizer.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLJITFinalizer.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLJITFinalizer.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -74,13 +74,13 @@
     bool dumpDisassembly = shouldDumpDisassembly() || Options::asyncDisassembly();
     
     MacroAssemblerCodeRef b3CodeRef =
-        FINALIZE_CODE_IF(dumpDisassembly, *b3CodeLinkBuffer, CodeEntryPtrTag,
+        FINALIZE_CODE_IF(dumpDisassembly, *b3CodeLinkBuffer, CodePtrTag,
             "FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data());
 
     MacroAssemblerCodeRef arityCheckCodeRef = entrypointLinkBuffer
-        ? FINALIZE_CODE_IF(dumpDisassembly, *entrypointLinkBuffer, CodeEntryWithArityCheckPtrTag,
+        ? FINALIZE_CODE_IF(dumpDisassembly, *entrypointLinkBuffer, CodePtrTag,
             "FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)
-        : MacroAssemblerCodeRef::createSelfManagedCodeRef(b3CodeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag));
+        : MacroAssemblerCodeRef::createSelfManagedCodeRef(b3CodeRef.code());
 
     jitCode->initializeB3Code(b3CodeRef);
     jitCode->initializeArityCheckEntrypoint(arityCheckCodeRef);

Modified: trunk/Source/_javascript_Core/ftl/FTLLazySlowPath.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLLazySlowPath.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLLazySlowPath.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -65,12 +65,12 @@
 
     PtrTag slowPathTag = ptrTag(FTLLazySlowPathPtrTag, bitwise_cast<PtrTag>(this));
     LinkBuffer linkBuffer(jit, codeBlock, JITCompilationMustSucceed);
-    linkBuffer.link(params.doneJumps, m_done.retagged(slowPathTag, NearJumpPtrTag));
+    linkBuffer.link(params.doneJumps, m_done.retagged(slowPathTag, NearCodePtrTag));
     if (m_exceptionTarget)
-        linkBuffer.link(exceptionJumps, m_exceptionTarget.retagged(slowPathTag, NearJumpPtrTag));
+        linkBuffer.link(exceptionJumps, m_exceptionTarget.retagged(slowPathTag, NearCodePtrTag));
     m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, slowPathTag, "Lazy slow path call stub");
 
-    MacroAssembler::repatchJump(m_patchableJump.retagged(slowPathTag, NearJumpPtrTag), CodeLocationLabel(m_stub.retaggedCode(slowPathTag, NearJumpPtrTag)));
+    MacroAssembler::repatchJump(m_patchableJump.retagged(slowPathTag, NearCodePtrTag), CodeLocationLabel(m_stub.retaggedCode(slowPathTag, NearCodePtrTag)));
 }
 
 } } // namespace JSC::FTL

Modified: trunk/Source/_javascript_Core/ftl/FTLLink.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLLink.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLLink.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -174,12 +174,12 @@
             }
             linkBuffer->link(callArityCheck, FunctionPtr(codeBlock->m_isConstructor ? operationConstructArityCheck : operationCallArityCheck, callTag));
             linkBuffer->link(callLookupExceptionHandlerFromCallerFrame, FunctionPtr(lookupExceptionHandlerFromCallerFrame, lookupTag));
-            linkBuffer->link(callArityFixup, FunctionPtr(vm.getCTIStub(arityFixupGenerator).retaggedCode(ptrTag(ArityFixupPtrTag, &vm), NearCallPtrTag)));
+            linkBuffer->link(callArityFixup, FunctionPtr(vm.getCTIStub(arityFixupGenerator).retaggedCode(ptrTag(ArityFixupPtrTag, &vm), NearCodePtrTag)));
             linkBuffer->link(mainPathJumps, CodeLocationLabel(bitwise_cast<void*>(state.generatedFunction)));
         }
         
         PtrTag entryTag = ptrTag(FTLCodePtrTag, codeBlock);
-        state.jitCode->initializeAddressForCall(MacroAssemblerCodePtr(retagCodePtr<void*>(state.generatedFunction, entryTag, CodeEntryPtrTag)));
+        state.jitCode->initializeAddressForCall(MacroAssemblerCodePtr(retagCodePtr<void*>(state.generatedFunction, entryTag, CodePtrTag)));
         break;
     }
         
@@ -200,7 +200,7 @@
         }
         linkBuffer->link(mainPathJump, CodeLocationLabel(bitwise_cast<void*>(state.generatedFunction)));
 
-        state.jitCode->initializeAddressForCall(linkBuffer->locationOf(start, CodeEntryPtrTag));
+        state.jitCode->initializeAddressForCall(linkBuffer->locationOf(start, CodePtrTag));
         break;
     }
         

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -7172,7 +7172,7 @@
                     [=] (LinkBuffer& linkBuffer) {
                         PtrTag linkTag = ptrTag(LinkCallPtrTag, vm);
                         MacroAssemblerCodePtr linkCall =
-                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag);
+                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag);
                         linkBuffer.link(slowCall, FunctionPtr(linkCall));
 
                         callLinkInfo->setCallLocations(
@@ -7368,7 +7368,7 @@
                         jit.addLinkTask(
                             [=] (LinkBuffer& linkBuffer) {
                                 CodeLocationNearCall callLocation = linkBuffer.locationOfNearCall(call);
-                                CodeLocationLabel slowPathLocation = linkBuffer.locationOf(slowPath, NearCallPtrTag);
+                                CodeLocationLabel slowPathLocation = linkBuffer.locationOf(slowPath, NearCodePtrTag);
                                 
                                 linkBuffer.link(call, slowPathLocation);
                                 
@@ -7494,7 +7494,7 @@
                     [=] (LinkBuffer& linkBuffer) {
                         PtrTag linkTag = ptrTag(LinkCallPtrTag, vm);
                         MacroAssemblerCodePtr linkCall =
-                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag);
+                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag);
                         linkBuffer.link(slowCall, FunctionPtr(linkCall));
 
                         callLinkInfo->setCallLocations(
@@ -7795,7 +7795,7 @@
                     [=] (LinkBuffer& linkBuffer) {
                         PtrTag linkTag = ptrTag(LinkCallPtrTag, vm);
                         MacroAssemblerCodePtr linkCall =
-                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag);
+                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag);
                         linkBuffer.link(slowCall, FunctionPtr(linkCall));
                         
                         callLinkInfo->setCallLocations(
@@ -8080,7 +8080,7 @@
                     [=] (LinkBuffer& linkBuffer) {
                         PtrTag linkTag = ptrTag(LinkCallPtrTag, vm);
                         MacroAssemblerCodePtr linkCall =
-                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag);
+                            vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag);
                         linkBuffer.link(slowCall, FunctionPtr(linkCall));
                         
                         callLinkInfo->setCallLocations(
@@ -13993,7 +13993,7 @@
                                 linkBuffer.link(
                                     generatorJump, CodeLocationLabel(
                                         vm->getCTIStub(
-                                            lazySlowPathGenerationThunkGenerator).retaggedCode(thunkTag, NearJumpPtrTag)));
+                                            lazySlowPathGenerationThunkGenerator).retaggedCode(thunkTag, NearCodePtrTag)));
                                 
                                 std::unique_ptr<LazySlowPath> lazySlowPath = std::make_unique<LazySlowPath>();
 

Modified: trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -548,7 +548,7 @@
     compileStub(exitID, jitCode, exit, &vm, codeBlock, thunkTag);
 
     MacroAssembler::repatchJump(
-        exit.codeLocationForRepatch(codeBlock), CodeLocationLabel(exit.m_code.retaggedCode(thunkTag, NearJumpPtrTag)));
+        exit.codeLocationForRepatch(codeBlock), CodeLocationLabel(exit.m_code.retaggedCode(thunkTag, NearCodePtrTag)));
     
     return exit.m_code.retaggedCode(thunkTag, bitwise_cast<PtrTag>(exec)).executableAddress();
 }

Modified: trunk/Source/_javascript_Core/ftl/FTLOSRExitHandle.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/ftl/FTLOSRExitHandle.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/ftl/FTLOSRExitHandle.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -52,7 +52,7 @@
             PtrTag thunkTag = ptrTag(FTLOSRExitPtrTag, &vm);
             linkBuffer.link(
                 jump.m_jump,
-                CodeLocationLabel(vm.getCTIStub(osrExitGenerationThunkGenerator).retaggedCode(thunkTag, NearJumpPtrTag)));
+                CodeLocationLabel(vm.getCTIStub(osrExitGenerationThunkGenerator).retaggedCode(thunkTag, NearCodePtrTag)));
             if (compilation)
                 compilation->addOSRExitSite({ linkBuffer.locationOf(myLabel).executableAddress() });
         });

Modified: trunk/Source/_javascript_Core/jit/AssemblyHelpers.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/AssemblyHelpers.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/AssemblyHelpers.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -716,7 +716,7 @@
             PtrTag linkTag = ptrTag(LinkVirtualCallPtrTag, &vm);
             MacroAssemblerCodeRef virtualThunk = virtualThunkFor(&vm, *info);
             info->setSlowStub(createJITStubRoutine(virtualThunk, vm, nullptr, true));
-            linkBuffer.link(call, CodeLocationLabel(virtualThunk.retaggedCode(linkTag, NearCallPtrTag)));
+            linkBuffer.link(call, CodeLocationLabel(virtualThunk.retaggedCode(linkTag, NearCodePtrTag)));
         });
 }
 

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -738,7 +738,7 @@
             addPtr(TrustedImm32(maxFrameExtentForSlowPathCall), stackPointerRegister);
         branchTest32(Zero, returnValueGPR).linkTo(beginLabel, this);
         move(returnValueGPR, GPRInfo::argumentGPR0);
-        emitNakedCall(m_vm->getCTIStub(arityFixupGenerator).retaggedCode(ptrTag(ArityFixupPtrTag, m_vm), NearCallPtrTag));
+        emitNakedCall(m_vm->getCTIStub(arityFixupGenerator).retaggedCode(ptrTag(ArityFixupPtrTag, m_vm), NearCodePtrTag));
 
 #if !ASSERT_DISABLED
         m_bytecodeOffset = std::numeric_limits<unsigned>::max(); // Reset this, in order to guard its use with ASSERTs.
@@ -869,7 +869,7 @@
     JITCodeMap jitCodeMap;
     for (unsigned bytecodeOffset = 0; bytecodeOffset < m_labels.size(); ++bytecodeOffset) {
         if (m_labels[bytecodeOffset].isSet()) {
-            PtrTag tag = ptrTag(CodeEntryPtrTag, m_codeBlock, bytecodeOffset);
+            PtrTag tag = ptrTag(CodePtrTag, m_codeBlock, bytecodeOffset);
             jitCodeMap.append(bytecodeOffset, patchBuffer.locationOf(m_labels[bytecodeOffset], tag));
         }
     }
@@ -876,7 +876,7 @@
     jitCodeMap.finish();
     m_codeBlock->setJITCodeMap(WTFMove(jitCodeMap));
 
-    MacroAssemblerCodePtr withArityCheck = patchBuffer.locationOf(m_arityCheck, CodeEntryWithArityCheckPtrTag);
+    MacroAssemblerCodePtr withArityCheck = patchBuffer.locationOf(m_arityCheck, CodePtrTag);
 
     if (Options::dumpDisassembly()) {
         m_disassembler->dump(patchBuffer);
@@ -892,7 +892,7 @@
         m_codeBlock->setPCToCodeOriginMap(std::make_unique<PCToCodeOriginMap>(WTFMove(m_pcToCodeOriginMapBuilder), patchBuffer));
     
     CodeRef result = FINALIZE_CODE(
-        patchBuffer, CodeEntryPtrTag,
+        patchBuffer, CodePtrTag,
         "Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data());
     
     m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT->add(

Modified: trunk/Source/_javascript_Core/jit/JITCall.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITCall.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITCall.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -252,7 +252,7 @@
 
     PtrTag linkTag = ptrTag(LinkCallPtrTag, m_vm);
     m_callCompilationInfo[callLinkInfoIndex].callReturnLocation =
-        emitNakedCall(m_vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag));
+        emitNakedCall(m_vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag));
 
     if (opcodeID == op_tail_call || opcodeID == op_tail_call_varargs) {
         abortWithReason(JITDidReturnFromTailCall);

Modified: trunk/Source/_javascript_Core/jit/JITCode.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITCode.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITCode.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -121,12 +121,12 @@
 void* JITCodeWithCodeRef::executableAddressAtOffset(size_t offset)
 {
     RELEASE_ASSERT(m_ref);
-    assertIsTaggedWith(m_ref.code().executableAddress(), CodeEntryPtrTag);
+    assertIsTaggedWith(m_ref.code().executableAddress(), CodePtrTag);
     if (!offset)
         return m_ref.code().executableAddress();
 
-    char* executableAddress = untagCodePtr<char*>(m_ref.code().executableAddress(), CodeEntryPtrTag);
-    return tagCodePtr(executableAddress + offset, CodeEntryPtrTag);
+    char* executableAddress = untagCodePtr<char*>(m_ref.code().executableAddress(), CodePtrTag);
+    return tagCodePtr(executableAddress + offset, CodePtrTag);
 }
 
 void* JITCodeWithCodeRef::dataAddressAtOffset(size_t offset)
@@ -223,7 +223,7 @@
     case ArityCheckNotRequired:
         return m_ref.code();
     case MustCheckArity:
-        return m_ref.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag);
+        return m_ref.code();
     }
     RELEASE_ASSERT_NOT_REACHED();
     return CodePtr();

Modified: trunk/Source/_javascript_Core/jit/JITInlines.h (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITInlines.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITInlines.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -120,7 +120,7 @@
 {
     ASSERT(m_bytecodeOffset != std::numeric_limits<unsigned>::max()); // This method should only be called during hot/cold path generation, so that m_bytecodeOffset is set.
     Call nakedCall = nearCall();
-    assertIsNullOrTaggedWith(function.executableAddress(), NearCallPtrTag);
+    assertIsNullOrTaggedWith(function.executableAddress(), NearCodePtrTag);
     m_calls.append(CallRecord(nakedCall, m_bytecodeOffset, FunctionPtr(function)));
     return nakedCall;
 }
@@ -129,7 +129,7 @@
 {
     ASSERT(m_bytecodeOffset != std::numeric_limits<unsigned>::max()); // This method should only be called during hot/cold path generation, so that m_bytecodeOffset is set.
     Call nakedCall = nearTailCall();
-    assertIsNullOrTaggedWith(function.executableAddress(), NearCallPtrTag);
+    assertIsNullOrTaggedWith(function.executableAddress(), NearCodePtrTag);
     m_calls.append(CallRecord(nakedCall, m_bytecodeOffset, FunctionPtr(function)));
     return nakedCall;
 }

Modified: trunk/Source/_javascript_Core/jit/JITMathIC.h (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITMathIC.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITMathIC.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -140,7 +140,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, NearJumpPtrTag, "JITMathIC: linking constant jump to out of line stub");
+            FINALIZE_CODE(linkBuffer, NearCodePtrTag, "JITMathIC: linking constant jump to out of line stub");
         };
 
         auto replaceCall = [&] () {
@@ -168,7 +168,7 @@
                     linkBuffer.link(jumpToDone, doneLocation());
 
                     m_code = FINALIZE_CODE_FOR(
-                        codeBlock, linkBuffer, NearJumpPtrTag, "JITMathIC: generating out of line fast IC snippet");
+                        codeBlock, linkBuffer, NearCodePtrTag, "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
@@ -210,7 +210,7 @@
             linkBuffer.link(slowPathJumpList, slowPathStartLocation());
 
             m_code = FINALIZE_CODE_FOR(
-                codeBlock, linkBuffer, NearJumpPtrTag, "JITMathIC: generating out of line IC snippet");
+                codeBlock, linkBuffer, NearCodePtrTag, "JITMathIC: generating out of line IC snippet");
         }
 
         linkJumpToOutOfLineSnippet();
@@ -218,7 +218,7 @@
 
     void finalizeInlineCode(const MathICGenerationState& state, LinkBuffer& linkBuffer)
     {
-        CodeLocationLabel start = linkBuffer.locationOf(state.fastPathStart, NearJumpPtrTag);
+        CodeLocationLabel start = linkBuffer.locationOf(state.fastPathStart, NearCodePtrTag);
         m_inlineStart = start;
 
         m_inlineSize = MacroAssembler::differenceBetweenCodePtr(

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -1169,7 +1169,7 @@
     patchBuffer.link(done, byValInfo->badTypeJump.labelAtOffset(byValInfo->badTypeJumpToDone));
     
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-        m_codeBlock, patchBuffer, NearJumpPtrTag,
+        m_codeBlock, patchBuffer, NearCodePtrTag,
         "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()));

Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITOperations.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -1018,9 +1018,9 @@
             if (!callLinkInfo->seenOnce())
                 callLinkInfo->setSeen();
             else
-                linkFor(execCallee, *callLinkInfo, nullptr, internalFunction, codePtr, CodeEntryPtrTag);
+                linkFor(execCallee, *callLinkInfo, nullptr, internalFunction, codePtr, CodePtrTag);
 
-            void* linkedTarget = retagCodePtr(codePtr.executableAddress(), CodeEntryPtrTag, linkedTargetTag);
+            void* linkedTarget = retagCodePtr(codePtr.executableAddress(), CodePtrTag, linkedTargetTag);
             return encodeResult(linkedTarget, reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
         }
         throwScope.release();
@@ -1033,11 +1033,9 @@
 
     MacroAssemblerCodePtr codePtr;
     CodeBlock* codeBlock = nullptr;
-    PtrTag codeTag = NoPtrTag;
-    if (executable->isHostFunction()) {
+    if (executable->isHostFunction())
         codePtr = executable->entrypointFor(kind, MustCheckArity);
-        codeTag = CodeEntryWithArityCheckPtrTag;
-    } else {
+    else {
         FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
 
         auto handleThrowException = [&] () {
@@ -1058,21 +1056,18 @@
             return handleThrowException();
         codeBlock = *codeBlockSlot;
         ArityCheckMode arity;
-        if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo->isVarargs()) {
+        if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo->isVarargs())
             arity = MustCheckArity;
-            codeTag = CodeEntryWithArityCheckPtrTag;
-        } else {
+        else
             arity = ArityCheckNotRequired;
-            codeTag = CodeEntryPtrTag;
-        }
         codePtr = functionExecutable->entrypointFor(kind, arity);
     }
     if (!callLinkInfo->seenOnce())
         callLinkInfo->setSeen();
     else
-        linkFor(execCallee, *callLinkInfo, codeBlock, callee, codePtr, codeTag);
+        linkFor(execCallee, *callLinkInfo, codeBlock, callee, codePtr, CodePtrTag);
 
-    return encodeResult(codePtr.retagged(codeTag, linkedTargetTag).executableAddress(), reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
+    return encodeResult(codePtr.retagged(CodePtrTag, linkedTargetTag).executableAddress(), reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
 }
 
 void JIT_OPERATION operationLinkDirectCall(ExecState* exec, CallLinkInfo* callLinkInfo, JSFunction* callee)
@@ -1105,7 +1100,7 @@
     MacroAssemblerCodePtr codePtr;
     CodeBlock* codeBlock = nullptr;
     if (executable->isHostFunction())
-        codePtr = executable->entrypointFor(kind, MustCheckArity).retagged(CodeEntryWithArityCheckPtrTag, NearCallPtrTag);
+        codePtr = executable->entrypointFor(kind, MustCheckArity).retagged(CodePtrTag, NearCodePtrTag);
     else {
         FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
 
@@ -1117,9 +1112,9 @@
             return;
         unsigned argumentStackSlots = callLinkInfo->maxNumArguments();
         if (argumentStackSlots < static_cast<size_t>(codeBlock->numParameters()))
-            codePtr = functionExecutable->entrypointFor(kind, MustCheckArity).retagged(CodeEntryWithArityCheckPtrTag, NearCallPtrTag);
+            codePtr = functionExecutable->entrypointFor(kind, MustCheckArity).retagged(CodePtrTag, NearCodePtrTag);
         else
-            codePtr = functionExecutable->entrypointFor(kind, ArityCheckNotRequired).retagged(CodeEntryPtrTag, NearCallPtrTag);
+            codePtr = functionExecutable->entrypointFor(kind, ArityCheckNotRequired).retagged(CodePtrTag, NearCodePtrTag);
     }
     
     linkDirectFor(exec, *callLinkInfo, codeBlock, codePtr);
@@ -1141,7 +1136,7 @@
         if (jsDynamicCast<InternalFunction*>(*vm, calleeAsValue)) {
             MacroAssemblerCodePtr codePtr = vm->getCTIInternalFunctionTrampolineFor(kind);
             ASSERT(!!codePtr);
-            return encodeResult(codePtr.retagged(CodeEntryPtrTag, resultTag).executableAddress(), reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
+            return encodeResult(codePtr.retagged(CodePtrTag, resultTag).executableAddress(), reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
         }
         throwScope.release();
         return handleHostCall(execCallee, calleeAsValue, callLinkInfo, resultTag);
@@ -1171,7 +1166,7 @@
         }
     }
     return encodeResult(executable->entrypointFor(
-        kind, MustCheckArity).retagged(CodeEntryWithArityCheckPtrTag, resultTag).executableAddress(),
+        kind, MustCheckArity).retagged(CodePtrTag, resultTag).executableAddress(),
         reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
 }
 

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -91,7 +91,7 @@
     jit.ret();
     
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, NearCallPtrTag, "String get_by_val stub");
+    return FINALIZE_CODE(patchBuffer, NearCodePtrTag, "String get_by_val stub");
 }
 
 void JIT::emit_op_get_by_val(Instruction* currentInstruction)
@@ -1285,7 +1285,7 @@
     patchBuffer.link(done, byValInfo->badTypeJump.labelAtOffset(byValInfo->badTypeJumpToDone));
     
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-        m_codeBlock, patchBuffer, NearJumpPtrTag,
+        m_codeBlock, patchBuffer, NearCodePtrTag,
         "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()));
@@ -1317,7 +1317,7 @@
     gen.finalize(patchBuffer);
 
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-        m_codeBlock, patchBuffer, NearJumpPtrTag,
+        m_codeBlock, patchBuffer, NearCodePtrTag,
         "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();
 
@@ -1372,12 +1372,12 @@
     bool isDirect = Interpreter::getOpcodeID(currentInstruction->u.opcode) == op_put_by_val_direct;
     if (!isDirect) {
         byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-            m_codeBlock, patchBuffer, NearJumpPtrTag,
+            m_codeBlock, patchBuffer, NearCodePtrTag,
             "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, NearJumpPtrTag,
+            m_codeBlock, patchBuffer, NearCodePtrTag,
             "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()));
@@ -1407,7 +1407,7 @@
     gen.finalize(patchBuffer);
 
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-        m_codeBlock, patchBuffer, NearJumpPtrTag,
+        m_codeBlock, patchBuffer, NearCodePtrTag,
         "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();
 

Modified: trunk/Source/_javascript_Core/jit/JITThunks.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/JITThunks.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/JITThunks.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -124,7 +124,7 @@
     RefPtr<JITCode> forCall;
     if (generator) {
         MacroAssemblerCodeRef entry = generator(vm);
-        forCall = adoptRef(new DirectJITCode(entry, entry.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::HostCallThunk));
+        forCall = adoptRef(new DirectJITCode(entry, entry.code(), JITCode::HostCallThunk));
     } else
         forCall = adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeCall(vm)), JITCode::HostCallThunk));
     

Modified: trunk/Source/_javascript_Core/jit/Repatch.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/Repatch.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/Repatch.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -691,7 +691,7 @@
 
 static void linkSlowFor(VM*, CallLinkInfo& callLinkInfo, MacroAssemblerCodeRef codeRef, PtrTag linkTag)
 {
-    MacroAssembler::repatchNearCall(callLinkInfo.callReturnLocation(), CodeLocationLabel(codeRef.retaggedCode(linkTag, NearCallPtrTag)));
+    MacroAssembler::repatchNearCall(callLinkInfo.callReturnLocation(), CodeLocationLabel(codeRef.retaggedCode(linkTag, NearCodePtrTag)));
 }
 
 static void linkSlowFor(VM* vm, CallLinkInfo& callLinkInfo, ThunkGenerator generator, PtrTag linkTag)
@@ -743,7 +743,7 @@
     if (shouldDumpDisassemblyFor(callerCodeBlock))
         dataLog("Linking call in ", FullCodeOrigin(callerCodeBlock, callLinkInfo.codeOrigin()), " to ", pointerDump(calleeCodeBlock), ", entrypoint at ", codePtr, "\n");
 
-    MacroAssembler::repatchNearCall(callLinkInfo.hotPathOther(), CodeLocationLabel(codePtr.retagged(codeTag, NearCallPtrTag)));
+    MacroAssembler::repatchNearCall(callLinkInfo.hotPathOther(), CodeLocationLabel(codePtr.retagged(codeTag, NearCodePtrTag)));
 
     if (calleeCodeBlock)
         calleeCodeBlock->linkIncomingCall(callerFrame, &callLinkInfo);
@@ -1100,7 +1100,7 @@
         void* target = isTailCall ? callToCodePtr.codePtr.dataLocation() : callToCodePtr.codePtr.executableAddress();
         patchBuffer.link(callToCodePtr.call, FunctionPtr(MacroAssemblerCodePtr::createFromExecutableAddress(target)));
 #else
-        patchBuffer.link(callToCodePtr.call, FunctionPtr(callToCodePtr.codePtr.retagged(CodeEntryPtrTag, NearCallPtrTag)));
+        patchBuffer.link(callToCodePtr.call, FunctionPtr(callToCodePtr.codePtr.retagged(CodePtrTag, NearCodePtrTag)));
 #endif
     }
     if (isWebAssembly || JITCode::isOptimizingJIT(callerCodeBlock->jitType()))
@@ -1108,11 +1108,11 @@
     else
         patchBuffer.link(done, callLinkInfo.hotPathOther().labelAtOffset(0));
     PtrTag linkTag = ptrTag(LinkPolymorphicCallPtrTag, &vm);
-    patchBuffer.link(slow, CodeLocationLabel(vm.getCTIStub(linkPolymorphicCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag)));
+    patchBuffer.link(slow, CodeLocationLabel(vm.getCTIStub(linkPolymorphicCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag)));
     
     auto stubRoutine = adoptRef(*new PolymorphicCallStubRoutine(
         FINALIZE_CODE_FOR(
-            callerCodeBlock, patchBuffer, NearJumpPtrTag,
+            callerCodeBlock, patchBuffer, NearCodePtrTag,
             "Polymorphic call stub for %s, return point %p, targets %s",
                 isWebAssembly ? "WebAssembly" : toCString(*callerCodeBlock).data(), callLinkInfo.callReturnLocation().labelAtOffset(0).executableAddress(),
                 toCString(listDump(callCases)).data()),

Modified: trunk/Source/_javascript_Core/jit/SpecializedThunkJIT.h (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/SpecializedThunkJIT.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/SpecializedThunkJIT.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -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, CodeEntryPtrTag, "Specialized thunk for %s", thunkKind);
+            return FINALIZE_CODE(patchBuffer, CodePtrTag, "Specialized thunk for %s", thunkKind);
         }
 
         // Assumes that the target function uses fpRegister0 as the first argument

Modified: trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -232,16 +232,16 @@
 
     // Make a tail call. This will return back to JIT code.
     JSInterfaceJIT::Label callCode(jit.label());
-    emitPointerValidation(jit, GPRInfo::regT4, CodeEntryWithArityCheckPtrTag);
+    emitPointerValidation(jit, GPRInfo::regT4, CodePtrTag);
     if (callLinkInfo.isTailCall()) {
         jit.preserveReturnAddressAfterCall(GPRInfo::regT0);
         jit.prepareForTailCallSlow(GPRInfo::regT4);
     }
-    jit.jump(GPRInfo::regT4, CodeEntryWithArityCheckPtrTag);
+    jit.jump(GPRInfo::regT4, CodePtrTag);
 
     notJSFunction.link(&jit);
     slowCase.append(jit.branchIfNotType(GPRInfo::regT0, InternalFunctionType));
-    void* executableAddress = vm->getCTIInternalFunctionTrampolineFor(callLinkInfo.specializationKind()).retagged(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag).executableAddress();
+    void* executableAddress = vm->getCTIInternalFunctionTrampolineFor(callLinkInfo.specializationKind()).executableAddress();
     jit.move(CCallHelpers::TrustedImmPtr(executableAddress), GPRInfo::regT4);
     jit.jump().linkTo(callCode, &jit);
 
@@ -307,9 +307,9 @@
     if (thunkFunctionType == ThunkFunctionType::JSFunction) {
         jit.loadPtr(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, JSFunction::offsetOfExecutable()), JSInterfaceJIT::regT1);
         jit.xorPtr(JSInterfaceJIT::TrustedImmPtr(JSFunctionPoison::key()), JSInterfaceJIT::regT1);
-        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, executableOffsetToFunction), CodeEntryPtrTag);
+        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, executableOffsetToFunction), CodePtrTag);
     } else
-        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, InternalFunction::offsetOfNativeFunctionFor(kind)), CodeEntryPtrTag);
+        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, InternalFunction::offsetOfNativeFunctionFor(kind)), CodePtrTag);
 
     jit.addPtr(JSInterfaceJIT::TrustedImm32(8), JSInterfaceJIT::stackPointerRegister);
 
@@ -328,7 +328,7 @@
         jit.loadPtr(JSInterfaceJIT::Address(X86Registers::esi, InternalFunction::offsetOfNativeFunctionFor(kind)), X86Registers::r9);
     jit.move(JSInterfaceJIT::TrustedImm64(NativeCodePoison::key()), X86Registers::esi);
     jit.xor64(X86Registers::esi, X86Registers::r9);
-    jit.call(X86Registers::r9, CodeEntryPtrTag);
+    jit.call(X86Registers::r9, CodePtrTag);
 
 #else
     // Calling convention:      f(ecx, edx, r8, r9, ...);
@@ -343,9 +343,9 @@
     if (thunkFunctionType == ThunkFunctionType::JSFunction) {
         jit.loadPtr(JSInterfaceJIT::Address(X86Registers::edx, JSFunction::offsetOfExecutable()), X86Registers::r9);
         jit.xorPtr(JSInterfaceJIT::TrustedImmPtr(JSFunctionPoison::key()), X86Registers::r9);
-        jit.call(JSInterfaceJIT::Address(X86Registers::r9, executableOffsetToFunction), CodeEntryPtrTag);
+        jit.call(JSInterfaceJIT::Address(X86Registers::r9, executableOffsetToFunction), CodePtrTag);
     } else
-        jit.call(JSInterfaceJIT::Address(X86Registers::edx, InternalFunction::offsetOfNativeFunctionFor(kind)), CodeEntryPtrTag);
+        jit.call(JSInterfaceJIT::Address(X86Registers::edx, InternalFunction::offsetOfNativeFunctionFor(kind)), CodePtrTag);
 
     jit.addPtr(JSInterfaceJIT::TrustedImm32(4 * sizeof(int64_t)), JSInterfaceJIT::stackPointerRegister);
 #endif
@@ -367,7 +367,7 @@
         jit.loadPtr(JSInterfaceJIT::Address(ARM64Registers::x1, InternalFunction::offsetOfNativeFunctionFor(kind)), ARM64Registers::x2);
     jit.move(JSInterfaceJIT::TrustedImm64(NativeCodePoison::key()), ARM64Registers::x1);
     jit.xor64(ARM64Registers::x1, ARM64Registers::x2);
-    jit.call(ARM64Registers::x2, CodeEntryPtrTag);
+    jit.call(ARM64Registers::x2, CodePtrTag);
 
 #elif CPU(ARM) || CPU(MIPS)
 #if CPU(MIPS)
@@ -383,9 +383,9 @@
     if (thunkFunctionType == ThunkFunctionType::JSFunction) {
         jit.loadPtr(JSInterfaceJIT::Address(JSInterfaceJIT::argumentGPR1, JSFunction::offsetOfExecutable()), JSInterfaceJIT::regT2);
         jit.xorPtr(JSInterfaceJIT::TrustedImmPtr(JSFunctionPoison::key()), JSInterfaceJIT::regT2);
-        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT2, executableOffsetToFunction), CodeEntryPtrTag);
+        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT2, executableOffsetToFunction), CodePtrTag);
     } else
-        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::argumentGPR1, InternalFunction::offsetOfNativeFunctionFor(kind)), CodeEntryPtrTag);
+        jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::argumentGPR1, InternalFunction::offsetOfNativeFunctionFor(kind)), CodePtrTag);
 
 #if CPU(MIPS)
     // Restore stack space
@@ -441,7 +441,7 @@
     jit.jumpToExceptionHandler(*vm);
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, CodeEntryPtrTag, "%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, CodePtrTag, "%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)
@@ -1217,8 +1217,8 @@
     jit.move(CCallHelpers::TrustedImm64(JITCodePoison::key()), GPRInfo::regT1);
     jit.xor64(GPRInfo::regT1, GPRInfo::regT0);
 #endif
-    emitPointerValidation(jit, GPRInfo::regT0, CodeEntryWithArityCheckPtrTag);
-    jit.call(GPRInfo::regT0, CodeEntryWithArityCheckPtrTag);
+    emitPointerValidation(jit, GPRInfo::regT0, CodePtrTag);
+    jit.call(GPRInfo::regT0, CodePtrTag);
 
     jit.emitFunctionEpilogue();
     jit.ret();
@@ -1226,7 +1226,7 @@
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
     linkBuffer.link(noCode, CodeLocationLabel(vm->jitStubs->ctiNativeTailCallWithoutSavedTags(vm)));
     return FINALIZE_CODE(
-        linkBuffer, CodeEntryPtrTag, "Specialized thunk for bound function calls with no arguments");
+        linkBuffer, CodePtrTag, "Specialized thunk for bound function calls with no arguments");
 }
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/llint/LLIntData.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/llint/LLIntData.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/llint/LLIntData.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -64,20 +64,20 @@
     }
 
     static const PtrTag tagsForOpcode[] = {
-        CodeEntryPtrTag, // llint_program_prologue
-        CodeEntryPtrTag, // llint_eval_prologue
-        CodeEntryPtrTag, // llint_module_program_prologue
-        CodeEntryPtrTag, // llint_function_for_call_prologue
-        CodeEntryPtrTag, // llint_function_for_construct_prologue
-        CodeEntryWithArityCheckPtrTag, // llint_function_for_call_arity_check
-        CodeEntryWithArityCheckPtrTag, // llint_function_for_construct_arity_check
-        CodeEntryPtrTag, // llint_generic_return_point
+        CodePtrTag, // llint_program_prologue
+        CodePtrTag, // llint_eval_prologue
+        CodePtrTag, // llint_module_program_prologue
+        CodePtrTag, // llint_function_for_call_prologue
+        CodePtrTag, // llint_function_for_construct_prologue
+        CodePtrTag, // llint_function_for_call_arity_check
+        CodePtrTag, // llint_function_for_construct_arity_check
+        CodePtrTag, // llint_generic_return_point
         BytecodePtrTag, // llint_throw_from_slow_path_trampoline
         ExceptionHandlerPtrTag, // llint_throw_during_call_trampoline
-        CodeEntryPtrTag, // llint_native_call_trampoline
-        CodeEntryPtrTag, // llint_native_construct_trampoline
-        CodeEntryPtrTag, // llint_internal_function_call_trampoline
-        CodeEntryPtrTag, // llint_internal_function_construct_trampoline
+        CodePtrTag, // llint_native_call_trampoline
+        CodePtrTag, // llint_native_construct_trampoline
+        CodePtrTag, // llint_internal_function_call_trampoline
+        CodePtrTag, // llint_internal_function_construct_trampoline
         ExceptionHandlerPtrTag, // handleUncaughtException
     };
 

Modified: trunk/Source/_javascript_Core/llint/LLIntEntrypoint.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/llint/LLIntEntrypoint.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/llint/LLIntEntrypoint.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -73,7 +73,7 @@
     if (VM::canUseJIT()) {
         MacroAssemblerCodeRef codeRef = vm.getCTIStub(evalEntryThunkGenerator);
         codeBlock->setJITCode(
-            adoptRef(*new DirectJITCode(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::InterpreterThunk)));
+            adoptRef(*new DirectJITCode(codeRef, codeRef.code(), JITCode::InterpreterThunk)));
         return;
     }
 #endif // ENABLE(JIT)
@@ -81,7 +81,7 @@
     UNUSED_PARAM(vm);
     MacroAssemblerCodeRef codeRef = MacroAssemblerCodeRef::createLLIntCodeRef(llint_eval_prologue);
     codeBlock->setJITCode(
-        adoptRef(*new DirectJITCode(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::InterpreterThunk)));
+        adoptRef(*new DirectJITCode(codeRef, codeRef.code(), JITCode::InterpreterThunk)));
 }
 
 static void setProgramEntrypoint(VM& vm, CodeBlock* codeBlock)
@@ -90,7 +90,7 @@
     if (VM::canUseJIT()) {
         MacroAssemblerCodeRef codeRef = vm.getCTIStub(programEntryThunkGenerator);
         codeBlock->setJITCode(
-            adoptRef(*new DirectJITCode(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::InterpreterThunk)));
+            adoptRef(*new DirectJITCode(codeRef, codeRef.code(), JITCode::InterpreterThunk)));
         return;
     }
 #endif // ENABLE(JIT)
@@ -98,7 +98,7 @@
     UNUSED_PARAM(vm);
     MacroAssemblerCodeRef codeRef = MacroAssemblerCodeRef::createLLIntCodeRef(llint_program_prologue);
     codeBlock->setJITCode(
-        adoptRef(*new DirectJITCode(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::InterpreterThunk)));
+        adoptRef(*new DirectJITCode(codeRef, codeRef.code(), JITCode::InterpreterThunk)));
 }
 
 static void setModuleProgramEntrypoint(VM& vm, CodeBlock* codeBlock)
@@ -107,7 +107,7 @@
     if (VM::canUseJIT()) {
         MacroAssemblerCodeRef codeRef = vm.getCTIStub(moduleProgramEntryThunkGenerator);
         codeBlock->setJITCode(
-            adoptRef(*new DirectJITCode(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::InterpreterThunk)));
+            adoptRef(*new DirectJITCode(codeRef, codeRef.code(), JITCode::InterpreterThunk)));
         return;
     }
 #endif // ENABLE(JIT)
@@ -115,7 +115,7 @@
     UNUSED_PARAM(vm);
     MacroAssemblerCodeRef codeRef = MacroAssemblerCodeRef::createLLIntCodeRef(llint_module_program_prologue);
     codeBlock->setJITCode(
-        adoptRef(*new DirectJITCode(codeRef, codeRef.retaggedCode(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag), JITCode::InterpreterThunk)));
+        adoptRef(*new DirectJITCode(codeRef, codeRef.code(), JITCode::InterpreterThunk)));
 }
 
 void setEntrypoint(VM& vm, CodeBlock* codeBlock)

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -447,8 +447,8 @@
     CodeLocationLabel codeLocation = codeMap.find(loopOSREntryBytecodeOffset);
     ASSERT(codeLocation);
 
-    PtrTag locationTag = ptrTag(CodeEntryPtrTag, codeBlock, loopOSREntryBytecodeOffset);
-    void* jumpTarget = codeLocation.retagged(locationTag, CodeEntryPtrTag).executableAddress();
+    PtrTag locationTag = ptrTag(CodePtrTag, codeBlock, loopOSREntryBytecodeOffset);
+    void* jumpTarget = codeLocation.retagged(locationTag, CodePtrTag).executableAddress();
     ASSERT(jumpTarget);
     
     LLINT_RETURN_TWO(jumpTarget, exec->topOfFrame());
@@ -1450,12 +1450,12 @@
                     callLinkInfo->remove();
                 callLinkInfo->callee.set(vm, callerCodeBlock, internalFunction);
                 callLinkInfo->lastSeenCallee.set(vm, callerCodeBlock, internalFunction);
-                callLinkInfo->machineCodeTarget = codePtr.retagged(CodeEntryPtrTag, LLIntCallICPtrTag);
+                callLinkInfo->machineCodeTarget = codePtr.retagged(CodePtrTag, LLIntCallICPtrTag);
             }
 
-            assertIsTaggedWith(codePtr.executableAddress(), CodeEntryPtrTag);
+            assertIsTaggedWith(codePtr.executableAddress(), CodePtrTag);
             PoisonedMasmPtr::assertIsNotPoisoned(codePtr.executableAddress());
-            LLINT_CALL_RETURN(exec, execCallee, codePtr.executableAddress(), CodeEntryPtrTag);
+            LLINT_CALL_RETURN(exec, execCallee, codePtr.executableAddress(), CodePtrTag);
         }
         throwScope.release();
         return handleHostCall(execCallee, pc, calleeAsValue, kind);
@@ -1464,13 +1464,11 @@
     JSScope* scope = callee->scopeUnchecked();
     ExecutableBase* executable = callee->executable();
 
-    PtrTag callPtrTag = NoPtrTag;
     MacroAssemblerCodePtr codePtr;
     CodeBlock* codeBlock = 0;
-    if (executable->isHostFunction()) {
+    if (executable->isHostFunction())
         codePtr = executable->entrypointFor(kind, MustCheckArity);
-        callPtrTag = CodeEntryWithArityCheckPtrTag;
-    } else {
+    else {
         FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
 
         if (!isCall(kind) && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct)
@@ -1484,16 +1482,12 @@
         codeBlock = *codeBlockSlot;
         ASSERT(codeBlock);
         ArityCheckMode arity;
-        if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())) {
+        if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
             arity = MustCheckArity;
-            callPtrTag = CodeEntryWithArityCheckPtrTag;
-        } else {
+        else
             arity = ArityCheckNotRequired;
-            callPtrTag = CodeEntryPtrTag;
-        }
         codePtr = functionExecutable->entrypointFor(kind, arity);
     }
-    assertIsTaggedWith(codePtr.executableAddress(), callPtrTag);
 
     ASSERT(!!codePtr);
     
@@ -1506,15 +1500,14 @@
             callLinkInfo->remove();
         callLinkInfo->callee.set(vm, callerCodeBlock, callee);
         callLinkInfo->lastSeenCallee.set(vm, callerCodeBlock, callee);
-        callLinkInfo->machineCodeTarget = codePtr.retagged(callPtrTag, LLIntCallICPtrTag);
-        RELEASE_ASSERT(callPtrTag != NoPtrTag);
+        callLinkInfo->machineCodeTarget = codePtr.retagged(CodePtrTag, LLIntCallICPtrTag);
         if (codeBlock)
             codeBlock->linkIncomingCall(exec, callLinkInfo);
     }
 
-    assertIsTaggedWith(codePtr.executableAddress(), callPtrTag);
+    assertIsTaggedWith(codePtr.executableAddress(), CodePtrTag);
     PoisonedMasmPtr::assertIsNotPoisoned(codePtr.executableAddress());
-    LLINT_CALL_RETURN(exec, execCallee, codePtr.executableAddress(), callPtrTag);
+    LLINT_CALL_RETURN(exec, execCallee, codePtr.executableAddress(), CodePtrTag);
 }
 
 inline SlowPathReturnType genericCall(ExecState* exec, Instruction* pc, CodeSpecializationKind kind)

Modified: trunk/Source/_javascript_Core/llint/LLIntThunks.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/llint/LLIntThunks.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/llint/LLIntThunks.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -51,7 +51,7 @@
 
 namespace LLInt {
 
-static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, OpcodeID opcodeID, PtrTag thunkTag, const char *thunkKind)
+static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, OpcodeID opcodeID, const char *thunkKind)
 {
     JSInterfaceJIT jit(vm);
 
@@ -58,45 +58,45 @@
     // FIXME: there's probably a better way to do it on X86, but I'm not sure I care.
     LLIntCode target = LLInt::getCodeFunctionPtr(opcodeID);
     jit.move(JSInterfaceJIT::TrustedImmPtr(bitwise_cast<void*>(target)), JSInterfaceJIT::regT0);
-    jit.jump(JSInterfaceJIT::regT0, thunkTag);
+    jit.jump(JSInterfaceJIT::regT0, CodePtrTag);
 
     LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(patchBuffer, thunkTag, "LLInt %s prologue thunk", thunkKind);
+    return FINALIZE_CODE(patchBuffer, CodePtrTag, "LLInt %s prologue thunk", thunkKind);
 }
 
 MacroAssemblerCodeRef functionForCallEntryThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_function_for_call_prologue, CodeEntryPtrTag, "function for call");
+    return generateThunkWithJumpTo(vm, llint_function_for_call_prologue, "function for call");
 }
 
 MacroAssemblerCodeRef functionForConstructEntryThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_function_for_construct_prologue, CodeEntryPtrTag, "function for construct");
+    return generateThunkWithJumpTo(vm, llint_function_for_construct_prologue, "function for construct");
 }
 
 MacroAssemblerCodeRef functionForCallArityCheckThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_function_for_call_arity_check, CodeEntryWithArityCheckPtrTag, "function for call with arity check");
+    return generateThunkWithJumpTo(vm, llint_function_for_call_arity_check, "function for call with arity check");
 }
 
 MacroAssemblerCodeRef functionForConstructArityCheckThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_function_for_construct_arity_check, CodeEntryWithArityCheckPtrTag, "function for construct with arity check");
+    return generateThunkWithJumpTo(vm, llint_function_for_construct_arity_check, "function for construct with arity check");
 }
 
 MacroAssemblerCodeRef evalEntryThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_eval_prologue, CodeEntryPtrTag, "eval");
+    return generateThunkWithJumpTo(vm, llint_eval_prologue, "eval");
 }
 
 MacroAssemblerCodeRef programEntryThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_program_prologue, CodeEntryPtrTag, "program");
+    return generateThunkWithJumpTo(vm, llint_program_prologue, "program");
 }
 
 MacroAssemblerCodeRef moduleProgramEntryThunkGenerator(VM* vm)
 {
-    return generateThunkWithJumpTo(vm, llint_module_program_prologue, CodeEntryPtrTag, "module_program");
+    return generateThunkWithJumpTo(vm, llint_module_program_prologue, "module_program");
 }
 
 } // namespace LLInt

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (230591 => 230592)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-04-12 20:14:21 UTC (rev 230592)
@@ -262,8 +262,7 @@
 
 # Pointer Tags
 const BytecodePtrTag = constexpr BytecodePtrTag
-const CodeEntryPtrTag = constexpr CodeEntryPtrTag
-const CodeEntryWithArityCheckPtrTag = constexpr CodeEntryWithArityCheckPtrTag
+const CodePtrTag = constexpr CodePtrTag
 const ExceptionHandlerPtrTag = constexpr ExceptionHandlerPtrTag
 const LLIntCallICPtrTag = constexpr LLIntCallICPtrTag
 const NoPtrTag = constexpr NoPtrTag
@@ -1000,7 +999,7 @@
 
 # Do the bare minimum required to execute code. Sets up the PC, leave the CodeBlock*
 # in t1. May also trigger prologue entry OSR.
-macro prologue(codeBlockGetter, codeBlockSetter, osrSlowPath, traceSlowPath, targetPtrTag)
+macro prologue(codeBlockGetter, codeBlockSetter, osrSlowPath, traceSlowPath)
     # Set up the call frame and check if we should OSR.
     tagReturnAddress sp
     preserveCallerPCAndCFR()
@@ -1038,7 +1037,7 @@
         else
             pop cfr
         end
-        jmp r0, targetPtrTag
+        jmp r0, CodePtrTag
     .recover:
         codeBlockGetter(t1, t2)
     .continue:
@@ -1283,34 +1282,34 @@
 end
 
 _llint_program_prologue:
-    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue, CodeEntryPtrTag)
+    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue)
     dispatch(0)
 
 
 _llint_module_program_prologue:
-    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue, CodeEntryPtrTag)
+    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue)
     dispatch(0)
 
 
 _llint_eval_prologue:
-    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue, CodeEntryPtrTag)
+    prologue(notFunctionCodeBlockGetter, notFunctionCodeBlockSetter, _llint_entry_osr, _llint_trace_prologue)
     dispatch(0)
 
 
 _llint_function_for_call_prologue:
-    prologue(functionForCallCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_call, _llint_trace_prologue_function_for_call, CodeEntryPtrTag)
+    prologue(functionForCallCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_call, _llint_trace_prologue_function_for_call)
     functionInitialization(0)
     dispatch(0)
     
 
 _llint_function_for_construct_prologue:
-    prologue(functionForConstructCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_construct, _llint_trace_prologue_function_for_construct, CodeEntryPtrTag)
+    prologue(functionForConstructCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_construct, _llint_trace_prologue_function_for_construct)
     functionInitialization(1)
     dispatch(0)
     
 
 _llint_function_for_call_arity_check:
-    prologue(functionForCallCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_call_arityCheck, _llint_trace_arityCheck_for_call, CodeEntryWithArityCheckPtrTag)
+    prologue(functionForCallCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_call_arityCheck, _llint_trace_arityCheck_for_call)
     functionArityCheck(.functionForCallBegin, _slow_path_call_arityCheck)
 .functionForCallBegin:
     functionInitialization(0)
@@ -1318,7 +1317,7 @@
 
 
 _llint_function_for_construct_arity_check:
-    prologue(functionForConstructCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_construct_arityCheck, _llint_trace_arityCheck_for_construct, CodeEntryWithArityCheckPtrTag)
+    prologue(functionForConstructCodeBlockGetter, functionCodeBlockSetter, _llint_entry_osr_function_for_construct_arityCheck, _llint_trace_arityCheck_for_construct)
     functionArityCheck(.functionForConstructBegin, _slow_path_construct_arityCheck)
 .functionForConstructBegin:
     functionInitialization(1)

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (230591 => 230592)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2018-04-12 20:14:21 UTC (rev 230592)
@@ -254,7 +254,7 @@
     if C_LOOP
         cloopCallJSFunction entry
     else
-        call entry, CodeEntryWithArityCheckPtrTag
+        call entry, CodePtrTag
     end
     subp 16, sp
 end
@@ -270,10 +270,10 @@
     elsif X86_64_WIN
         # We need to allocate 32 bytes on the stack for the shadow space.
         subp 32, sp
-        call temp, CodeEntryPtrTag
+        call temp, CodePtrTag
         addp 32, sp
     else
-        call temp, CodeEntryPtrTag
+        call temp, CodePtrTag
     end
 end
 
@@ -370,7 +370,7 @@
             cCall2(_llint_loop_osr)
             btpz r0, .recover
             move r1, sp
-            jmp r0, CodeEntryPtrTag
+            jmp r0, CodePtrTag
         .recover:
             loadi ArgumentCount + TagOffset[cfr], PC
         end)
@@ -2191,12 +2191,12 @@
     else
         if X86_64_WIN
             subp 32, sp
-            call executableOffsetToFunction[t1], CodeEntryPtrTag
+            call executableOffsetToFunction[t1], CodePtrTag
             addp 32, sp
         else
             loadp _g_NativeCodePoison, t2
             xorp executableOffsetToFunction[t1], t2
-            call t2, CodeEntryPtrTag
+            call t2, CodePtrTag
         end
     end
 
@@ -2234,12 +2234,12 @@
     else
         if X86_64_WIN
             subp 32, sp
-            call offsetOfFunction[t1], CodeEntryPtrTag
+            call offsetOfFunction[t1], CodePtrTag
             addp 32, sp
         else
             loadp _g_NativeCodePoison, t2
             xorp offsetOfFunction[t1], t2
-            call t2, CodeEntryPtrTag
+            call t2, CodePtrTag
         end
     end
 

Modified: trunk/Source/_javascript_Core/runtime/NativeExecutable.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/runtime/NativeExecutable.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/runtime/NativeExecutable.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -67,10 +67,10 @@
     m_jitCodeForConstructWithArityCheck = m_jitCodeForConstruct->addressForCall(MustCheckArity);
     m_name = name;
 
-    assertIsTaggedWith(m_jitCodeForCall->addressForCall(ArityCheckNotRequired).executableAddress(), CodeEntryPtrTag);
-    assertIsTaggedWith(m_jitCodeForConstruct->addressForCall(ArityCheckNotRequired).executableAddress(), CodeEntryPtrTag);
-    assertIsTaggedWith(m_jitCodeForCallWithArityCheck.executableAddress(), CodeEntryWithArityCheckPtrTag);
-    assertIsTaggedWith(m_jitCodeForConstructWithArityCheck.executableAddress(), CodeEntryWithArityCheckPtrTag);
+    assertIsTaggedWith(m_jitCodeForCall->addressForCall(ArityCheckNotRequired).executableAddress(), CodePtrTag);
+    assertIsTaggedWith(m_jitCodeForConstruct->addressForCall(ArityCheckNotRequired).executableAddress(), CodePtrTag);
+    assertIsTaggedWith(m_jitCodeForCallWithArityCheck.executableAddress(), CodePtrTag);
+    assertIsTaggedWith(m_jitCodeForConstructWithArityCheck.executableAddress(), CodePtrTag);
 }
 
 NativeExecutable::NativeExecutable(VM& vm, TaggedNativeFunction function, TaggedNativeFunction constructor, Intrinsic intrinsic, const DOMJIT::Signature* signature)

Modified: trunk/Source/_javascript_Core/runtime/NativeFunction.h (230591 => 230592)


--- trunk/Source/_javascript_Core/runtime/NativeFunction.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/runtime/NativeFunction.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -70,10 +70,10 @@
     explicit TaggedNativeFunction(intptr_t bits) : m_ptr(bitwise_cast<void*>(bits)) { }
 
     TaggedNativeFunction(NativeFunction func)
-        : m_ptr(tagCFunctionPtr<void*>(func.m_ptr, CodeEntryPtrTag))
+        : m_ptr(tagCFunctionPtr<void*>(func.m_ptr, CodePtrTag))
     { }
     TaggedNativeFunction(RawNativeFunction func)
-        : m_ptr(tagCFunctionPtr<void*>(func, CodeEntryPtrTag))
+        : m_ptr(tagCFunctionPtr<void*>(func, CodePtrTag))
     { }
 
     explicit operator bool() const { return !!m_ptr; }
@@ -86,7 +86,7 @@
     explicit operator NativeFunction()
     {
         ASSERT(m_ptr);
-        return untagCFunctionPtr<NativeFunction>(m_ptr, CodeEntryPtrTag);
+        return untagCFunctionPtr<NativeFunction>(m_ptr, CodePtrTag);
     }
 
     void* rawPointer() const { return m_ptr; }

Modified: trunk/Source/_javascript_Core/runtime/PtrTag.h (230591 => 230592)


--- trunk/Source/_javascript_Core/runtime/PtrTag.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/runtime/PtrTag.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -31,8 +31,7 @@
 
 #define FOR_EACH_PTRTAG_ENUM(v) \
     v(NoPtrTag) \
-    v(NearCallPtrTag) \
-    v(NearJumpPtrTag) \
+    v(NearCodePtrTag) \
     v(CFunctionPtrTag) \
     \
     v(ArityFixupPtrTag) \
@@ -39,8 +38,7 @@
     v(B3CCallPtrTag) \
     v(BytecodePtrTag) \
     v(BytecodeHelperPtrTag) \
-    v(CodeEntryPtrTag) \
-    v(CodeEntryWithArityCheckPtrTag) \
+    v(CodePtrTag) \
     v(DFGOSREntryPtrTag) \
     v(DFGOSRExitPtrTag) \
     v(DFGOperationPtrTag) \
@@ -87,8 +85,8 @@
 };
 
 static_assert(static_cast<uintptr_t>(NoPtrTag) == static_cast<uintptr_t>(0), "");
-static_assert(static_cast<uintptr_t>(NearCallPtrTag) == static_cast<uintptr_t>(1), "");
-static_assert(static_cast<uintptr_t>(NearJumpPtrTag) == static_cast<uintptr_t>(2), "");
+static_assert(static_cast<uintptr_t>(NearCodePtrTag) == static_cast<uintptr_t>(1), "");
+static_assert(static_cast<uintptr_t>(CFunctionPtrTag) == static_cast<uintptr_t>(2), "");
 
 inline const char* ptrTagName(PtrTag tag)
 {

Modified: trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -324,7 +324,7 @@
                 }
 
                 embedderToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>(
-                    FINALIZE_CODE(linkBuffer, CodeEntryPtrTag, "Embedder->WebAssembly entrypoint[%i] %s", functionIndex, signature.toString().ascii().data()),
+                    FINALIZE_CODE(linkBuffer, CodePtrTag, "Embedder->WebAssembly entrypoint[%i] %s", functionIndex, signature.toString().ascii().data()),
                     WTFMove(context.embedderEntrypointByproducts));
             }
         }
@@ -340,7 +340,7 @@
                 SignatureIndex signatureIndex = m_moduleInformation->signatureIndexFromFunctionIndexSpace(call.functionIndexSpace);
                 const Signature& signature = SignatureInformation::get(signatureIndex);
                 PtrTag oldTag = ptrTag(WasmCallPtrTag, signature.hash());
-                MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(executableAddress.retagged(oldTag, NearCallPtrTag)));
+                MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(executableAddress.retagged(oldTag, NearCodePtrTag)));
             }
         }
     }

Modified: trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/wasm/WasmOMGPlan.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -129,7 +129,7 @@
             SignatureIndex signatureIndex = m_moduleInformation->signatureIndexFromFunctionIndexSpace(call.functionIndexSpace);
             const Signature& signature = SignatureInformation::get(signatureIndex);
             PtrTag oldTag = ptrTag(WasmCallPtrTag, signature.hash());
-            MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(entrypoint.retagged(oldTag, NearCallPtrTag)));
+            MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(entrypoint.retagged(oldTag, NearCodePtrTag)));
         }
         unlinkedCalls = std::exchange(m_codeBlock->m_wasmToWasmCallsites[m_functionIndex], unlinkedCalls);
     }
@@ -152,7 +152,7 @@
                     SignatureIndex signatureIndex = m_moduleInformation->signatureIndexFromFunctionIndexSpace(call.functionIndexSpace);
                     const Signature& signature = SignatureInformation::get(signatureIndex);
                     PtrTag oldTag = ptrTag(WasmCallPtrTag, signature.hash());
-                    MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(entrypoint.retagged(oldTag, NearCallPtrTag)));
+                    MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(entrypoint.retagged(oldTag, NearCodePtrTag)));
                 }
             }
 

Modified: trunk/Source/_javascript_Core/wasm/WasmThunks.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/wasm/WasmThunks.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/wasm/WasmThunks.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -61,7 +61,7 @@
     RELEASE_ASSERT(throwWasmException);
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
     linkBuffer.link(call, FunctionPtr(throwWasmException, tag));
-    return FINALIZE_CODE(linkBuffer, NearCallPtrTag, "Throw exception from Wasm");
+    return FINALIZE_CODE(linkBuffer, NearCodePtrTag, "Throw exception from Wasm");
 }
 
 MacroAssemblerCodeRef throwStackOverflowFromWasmThunkGenerator(const AbstractLocker& locker)
@@ -75,7 +75,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, NearJumpPtrTag, "Throw stack overflow from Wasm");
+    return FINALIZE_CODE(linkBuffer, NearCodePtrTag, "Throw stack overflow from Wasm");
 }
 
 MacroAssemblerCodeRef triggerOMGTierUpThunkGenerator(const AbstractLocker&)
@@ -102,7 +102,7 @@
     jit.emitFunctionEpilogue();
     jit.ret();
     LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID);
-    return FINALIZE_CODE(linkBuffer, NearCallPtrTag, "Trigger OMG tier up");
+    return FINALIZE_CODE(linkBuffer, NearCodePtrTag, "Trigger OMG tier up");
 }
 
 static Thunks* thunks;

Modified: trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -664,7 +664,7 @@
         return makeUnexpected(BindingFailure::OutOfMemory);
 
     PtrTag linkTag = ptrTag(LinkCallPtrTag, vm);
-    patchBuffer.link(slowCall, FunctionPtr(vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCallPtrTag)));
+    patchBuffer.link(slowCall, FunctionPtr(vm->getCTIStub(linkCallThunkGenerator).retaggedCode(linkTag, NearCodePtrTag)));
     CodeLocationLabel callReturnLocation(patchBuffer.locationOfNearCall(slowCall));
     CodeLocationLabel hotPathBegin(patchBuffer.locationOf(targetToCheck));
     CodeLocationNearCall hotPathOther = patchBuffer.locationOfNearCall(fastCall);

Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.h (230591 => 230592)


--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.h	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.h	2018-04-12 20:14:21 UTC (rev 230592)
@@ -69,7 +69,7 @@
         if (arity == ArityCheckNotRequired)
             return m_jsEntrypoint;
         ASSERT(arity == MustCheckArity);
-        return m_jsEntrypoint.retagged(CodeEntryPtrTag, CodeEntryWithArityCheckPtrTag);
+        return m_jsEntrypoint;
     }
 
     static ptrdiff_t offsetOfEntrypointLoadLocation() { return OBJECT_OFFSETOF(WebAssemblyFunction, m_importableFunction) + WasmToWasmImportableFunction::offsetOfEntrypointLoadLocation(); }

Modified: trunk/Source/_javascript_Core/yarr/YarrJIT.cpp (230591 => 230592)


--- trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2018-04-12 19:57:30 UTC (rev 230591)
+++ trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2018-04-12 20:14:21 UTC (rev 230592)
@@ -3508,7 +3508,7 @@
         }
 
         if (!m_tryReadUnicodeCharacterCalls.isEmpty()) {
-            CodeLocationLabel tryReadUnicodeCharacterHelper = linkBuffer.locationOf(m_tryReadUnicodeCharacterEntry, NearCallPtrTag);
+            CodeLocationLabel tryReadUnicodeCharacterHelper = linkBuffer.locationOf(m_tryReadUnicodeCharacterEntry, NearCodePtrTag);
 
             for (auto call : m_tryReadUnicodeCharacterCalls)
                 linkBuffer.link(call, tryReadUnicodeCharacterHelper);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to