Changeset 229609 in webkit
- Timestamp:
- Mar 14, 2018, 1:05:37 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 70 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r229608 r229609 1 2018-03-14 Mark Lam <mark.lam@apple.com> 2 3 Enhance the MacroAssembler and LinkBuffer to support pointer profiling. 4 https://bugs.webkit.org/show_bug.cgi?id=183623 5 <rdar://problem/38443314> 6 7 Reviewed by Michael Saboff. 8 9 1. Added a PtrTag argument to indirect call() and indirect jump() MacroAssembler 10 emitters to support pointer profiling. 11 12 2. Also added tagPtr(), untagPtr(), and removePtrTag() placeholder methods. 13 14 3. Added a PtrTag to LinkBuffer finalizeCodeWithoutDisassembly() and clients. 15 16 4. Updated clients to pass a PtrTag. For the most part, I just apply NoPtrTag as 17 a placeholder until we have time to analyze what pointer profile each client 18 site has later. 19 20 5. Apply PtrTags to the YarrJIT. 21 22 * assembler/ARM64Assembler.h: 23 (JSC::ARM64Assembler::linkJumpOrCall): 24 * assembler/AbstractMacroAssembler.h: 25 (JSC::AbstractMacroAssembler::getLinkerAddress): 26 (JSC::AbstractMacroAssembler::tagPtr): 27 (JSC::AbstractMacroAssembler::untagPtr): 28 (JSC::AbstractMacroAssembler::removePtrTag): 29 * assembler/LinkBuffer.cpp: 30 (JSC::LinkBuffer::finalizeCodeWithoutDisassembly): 31 (JSC::LinkBuffer::finalizeCodeWithDisassembly): 32 * assembler/LinkBuffer.h: 33 (JSC::LinkBuffer::link): 34 (JSC::LinkBuffer::locationOfNearCall): 35 (JSC::LinkBuffer::locationOf): 36 * assembler/MacroAssemblerARM.h: 37 (JSC::MacroAssemblerARM::jump): 38 (JSC::MacroAssemblerARM::call): 39 (JSC::MacroAssemblerARM::readCallTarget): 40 * assembler/MacroAssemblerARM64.h: 41 (JSC::MacroAssemblerARM64::call): 42 (JSC::MacroAssemblerARM64::jump): 43 (JSC::MacroAssemblerARM64::readCallTarget): 44 (JSC::MacroAssemblerARM64::linkCall): 45 * assembler/MacroAssemblerARMv7.h: 46 (JSC::MacroAssemblerARMv7::jump): 47 (JSC::MacroAssemblerARMv7::relativeTableJump): 48 (JSC::MacroAssemblerARMv7::call): 49 (JSC::MacroAssemblerARMv7::readCallTarget): 50 * assembler/MacroAssemblerCodeRef.cpp: 51 (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): 52 (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): 53 * assembler/MacroAssemblerCodeRef.h: 54 (JSC::FunctionPtr::FunctionPtr): 55 (JSC::FunctionPtr::value const): 56 (JSC::MacroAssemblerCodePtr:: const): 57 (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef): 58 (JSC::MacroAssemblerCodeRef::retaggedCode const): 59 * assembler/MacroAssemblerMIPS.h: 60 (JSC::MacroAssemblerMIPS::jump): 61 (JSC::MacroAssemblerMIPS::call): 62 (JSC::MacroAssemblerMIPS::readCallTarget): 63 * assembler/MacroAssemblerX86.h: 64 (JSC::MacroAssemblerX86::call): 65 (JSC::MacroAssemblerX86::jump): 66 (JSC::MacroAssemblerX86::readCallTarget): 67 * assembler/MacroAssemblerX86Common.cpp: 68 (JSC::MacroAssembler::probe): 69 * assembler/MacroAssemblerX86Common.h: 70 (JSC::MacroAssemblerX86Common::jump): 71 (JSC::MacroAssemblerX86Common::call): 72 * assembler/MacroAssemblerX86_64.h: 73 (JSC::MacroAssemblerX86_64::call): 74 (JSC::MacroAssemblerX86_64::jump): 75 (JSC::MacroAssemblerX86_64::readCallTarget): 76 * assembler/testmasm.cpp: 77 (JSC::compile): 78 (JSC::invoke): 79 * b3/B3Compile.cpp: 80 (JSC::B3::compile): 81 * b3/B3LowerMacros.cpp: 82 * b3/air/AirCCallSpecial.cpp: 83 (JSC::B3::Air::CCallSpecial::generate): 84 * b3/air/testair.cpp: 85 * b3/testb3.cpp: 86 (JSC::B3::invoke): 87 (JSC::B3::testInterpreter): 88 (JSC::B3::testEntrySwitchSimple): 89 (JSC::B3::testEntrySwitchNoEntrySwitch): 90 (JSC::B3::testEntrySwitchWithCommonPaths): 91 (JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint): 92 (JSC::B3::testEntrySwitchLoop): 93 * bytecode/AccessCase.cpp: 94 (JSC::AccessCase::generateImpl): 95 * bytecode/AccessCaseSnippetParams.cpp: 96 (JSC::SlowPathCallGeneratorWithArguments::generateImpl): 97 * bytecode/InlineAccess.cpp: 98 (JSC::linkCodeInline): 99 (JSC::InlineAccess::rewireStubAsJump): 100 * bytecode/PolymorphicAccess.cpp: 101 (JSC::AccessGenerationState::emitExplicitExceptionHandler): 102 (JSC::PolymorphicAccess::regenerate): 103 * dfg/DFGJITCompiler.cpp: 104 (JSC::DFG::JITCompiler::compileExceptionHandlers): 105 (JSC::DFG::JITCompiler::link): 106 (JSC::DFG::JITCompiler::compileFunction): 107 (JSC::DFG::JITCompiler::noticeCatchEntrypoint): 108 * dfg/DFGJITCompiler.h: 109 (JSC::DFG::JITCompiler::appendCall): 110 * dfg/DFGJITFinalizer.cpp: 111 (JSC::DFG::JITFinalizer::finalize): 112 (JSC::DFG::JITFinalizer::finalizeFunction): 113 * dfg/DFGOSRExit.cpp: 114 (JSC::DFG::OSRExit::emitRestoreArguments): 115 (JSC::DFG::OSRExit::compileOSRExit): 116 * dfg/DFGOSRExitCompilerCommon.cpp: 117 (JSC::DFG::handleExitCounts): 118 (JSC::DFG::osrWriteBarrier): 119 (JSC::DFG::adjustAndJumpToTarget): 120 * dfg/DFGSpeculativeJIT.cpp: 121 (JSC::DFG::SpeculativeJIT::emitSwitchIntJump): 122 (JSC::DFG::SpeculativeJIT::emitSwitchImm): 123 (JSC::DFG::SpeculativeJIT::emitSwitchStringOnString): 124 * dfg/DFGSpeculativeJIT64.cpp: 125 (JSC::DFG::SpeculativeJIT::compile): 126 * dfg/DFGThunks.cpp: 127 (JSC::DFG::osrExitThunkGenerator): 128 (JSC::DFG::osrExitGenerationThunkGenerator): 129 (JSC::DFG::osrEntryThunkGenerator): 130 * ftl/FTLCompile.cpp: 131 (JSC::FTL::compile): 132 * ftl/FTLJITFinalizer.cpp: 133 (JSC::FTL::JITFinalizer::finalizeCommon): 134 * ftl/FTLLazySlowPath.cpp: 135 (JSC::FTL::LazySlowPath::generate): 136 * ftl/FTLLink.cpp: 137 (JSC::FTL::link): 138 * ftl/FTLLowerDFGToB3.cpp: 139 (JSC::FTL::DFG::LowerDFGToB3::lower): 140 (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread): 141 (JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs): 142 (JSC::FTL::DFG::LowerDFGToB3::compileCallEval): 143 * ftl/FTLOSRExitCompiler.cpp: 144 (JSC::FTL::compileStub): 145 (JSC::FTL::compileFTLOSRExit): 146 * ftl/FTLSlowPathCall.cpp: 147 (JSC::FTL::SlowPathCallContext::makeCall): 148 * ftl/FTLThunks.cpp: 149 (JSC::FTL::genericGenerationThunkGenerator): 150 (JSC::FTL::osrExitGenerationThunkGenerator): 151 (JSC::FTL::lazySlowPathGenerationThunkGenerator): 152 (JSC::FTL::slowPathCallThunkGenerator): 153 * jit/AssemblyHelpers.cpp: 154 (JSC::AssemblyHelpers::callExceptionFuzz): 155 (JSC::AssemblyHelpers::debugCall): 156 * jit/CCallHelpers.cpp: 157 (JSC::CCallHelpers::ensureShadowChickenPacket): 158 * jit/CCallHelpers.h: 159 (JSC::CCallHelpers::jumpToExceptionHandler): 160 * jit/ExecutableAllocator.cpp: 161 (JSC::FixedVMPoolExecutableAllocator::jitWriteThunkGenerator): 162 * jit/JIT.cpp: 163 (JSC::JIT::emitEnterOptimizationCheck): 164 (JSC::JIT::link): 165 (JSC::JIT::privateCompileExceptionHandlers): 166 * jit/JIT.h: 167 (JSC::JIT::appendCall): 168 * jit/JITMathIC.h: 169 (JSC::isProfileEmpty): 170 * jit/JITOpcodes.cpp: 171 (JSC::JIT::emit_op_catch): 172 (JSC::JIT::emit_op_switch_imm): 173 (JSC::JIT::emit_op_switch_char): 174 (JSC::JIT::emit_op_switch_string): 175 (JSC::JIT::emitSlow_op_loop_hint): 176 (JSC::JIT::privateCompileHasIndexedProperty): 177 * jit/JITOpcodes32_64.cpp: 178 (JSC::JIT::emit_op_catch): 179 (JSC::JIT::emit_op_switch_imm): 180 (JSC::JIT::emit_op_switch_char): 181 (JSC::JIT::emit_op_switch_string): 182 (JSC::JIT::privateCompileHasIndexedProperty): 183 * jit/JITPropertyAccess.cpp: 184 (JSC::JIT::stringGetByValStubGenerator): 185 (JSC::JIT::privateCompileGetByVal): 186 (JSC::JIT::privateCompileGetByValWithCachedId): 187 (JSC::JIT::privateCompilePutByVal): 188 (JSC::JIT::privateCompilePutByValWithCachedId): 189 * jit/JITPropertyAccess32_64.cpp: 190 (JSC::JIT::stringGetByValStubGenerator): 191 * jit/JITStubRoutine.h: 192 * jit/Repatch.cpp: 193 (JSC::readCallTarget): 194 (JSC::appropriateOptimizingPutByIdFunction): 195 (JSC::linkPolymorphicCall): 196 (JSC::resetPutByID): 197 * jit/SlowPathCall.h: 198 (JSC::JITSlowPathCall::call): 199 * jit/SpecializedThunkJIT.h: 200 (JSC::SpecializedThunkJIT::finalize): 201 (JSC::SpecializedThunkJIT::callDoubleToDouble): 202 * jit/ThunkGenerators.cpp: 203 (JSC::throwExceptionFromCallSlowPathGenerator): 204 (JSC::slowPathFor): 205 (JSC::linkCallThunkGenerator): 206 (JSC::linkPolymorphicCallThunkGenerator): 207 (JSC::virtualThunkFor): 208 (JSC::nativeForGenerator): 209 (JSC::arityFixupGenerator): 210 (JSC::unreachableGenerator): 211 (JSC::boundThisNoArgsFunctionCallGenerator): 212 * llint/LLIntThunks.cpp: 213 (JSC::LLInt::generateThunkWithJumpTo): 214 (JSC::LLInt::functionForCallEntryThunkGenerator): 215 (JSC::LLInt::functionForConstructEntryThunkGenerator): 216 (JSC::LLInt::functionForCallArityCheckThunkGenerator): 217 (JSC::LLInt::functionForConstructArityCheckThunkGenerator): 218 (JSC::LLInt::evalEntryThunkGenerator): 219 (JSC::LLInt::programEntryThunkGenerator): 220 (JSC::LLInt::moduleProgramEntryThunkGenerator): 221 * runtime/PtrTag.h: 222 * wasm/WasmB3IRGenerator.cpp: 223 (JSC::Wasm::B3IRGenerator::addCall): 224 (JSC::Wasm::B3IRGenerator::addCallIndirect): 225 * wasm/WasmBBQPlan.cpp: 226 (JSC::Wasm::BBQPlan::complete): 227 * wasm/WasmBinding.cpp: 228 (JSC::Wasm::wasmToWasm): 229 * wasm/WasmOMGPlan.cpp: 230 (JSC::Wasm::OMGPlan::work): 231 * wasm/WasmThunks.cpp: 232 (JSC::Wasm::throwExceptionFromWasmThunkGenerator): 233 (JSC::Wasm::throwStackOverflowFromWasmThunkGenerator): 234 (JSC::Wasm::triggerOMGTierUpThunkGenerator): 235 * wasm/js/WasmToJS.cpp: 236 (JSC::Wasm::handleBadI64Use): 237 (JSC::Wasm::wasmToJS): 238 * yarr/YarrJIT.cpp: 239 (JSC::Yarr::YarrGenerator::loadFromFrameAndJump): 240 (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels): 241 (JSC::Yarr::YarrGenerator::generateTryReadUnicodeCharacterHelper): 242 (JSC::Yarr::YarrGenerator::generateEnter): 243 (JSC::Yarr::YarrGenerator::YarrGenerator): 244 (JSC::Yarr::YarrGenerator::compile): 245 (JSC::Yarr::jitCompile): 246 * yarr/YarrJIT.h: 247 (JSC::Yarr::YarrCodeBlock::execute): 248 1 249 2018-03-14 Caitlin Potter <caitp@igalia.com> 2 250 -
trunk/Source/JavaScriptCore/assembler/ARM64Assembler.h
r228932 r229609 30 30 #include "AssemblerBuffer.h" 31 31 #include "AssemblerCommon.h" 32 #include "PtrTag.h" 32 33 #include <limits.h> 33 34 #include <wtf/Assertions.h> … … 3034 3035 ASSERT(!(reinterpret_cast<intptr_t>(from) & 3)); 3035 3036 ASSERT(!(reinterpret_cast<intptr_t>(to) & 3)); 3036 intptr_t offset = (re interpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(fromInstruction)) >> 2;3037 intptr_t offset = (removeCodePtrTag<intptr_t>(to) - removeCodePtrTag<intptr_t>(fromInstruction)) >> 2; 3037 3038 ASSERT(static_cast<int>(offset) == offset); 3038 3039 -
trunk/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
r229547 r229609 35 35 #include "MacroAssemblerHelpers.h" 36 36 #include "Options.h" 37 #include "PtrTag.h" 37 38 #include <wtf/CryptographicallyRandomNumber.h> 38 39 #include <wtf/Noncopyable.h> … … 872 873 } 873 874 874 static void* getLinkerAddress(void* code, AssemblerLabel label) 875 { 876 return AssemblerType::getRelocatedAddress(code, label); 875 // FIXME: remove the default PtrTag value once we've tagged all the clients. 876 static void* getLinkerAddress(void* code, AssemblerLabel label, PtrTag tag = NoPtrTag) 877 { 878 return tagCodePtr(AssemblerType::getRelocatedAddress(code, label), tag); 877 879 } 878 880 … … 951 953 buffer.setCodeSize(targetCodeSize); 952 954 } 955 956 ALWAYS_INLINE void tagPtr(RegisterID, PtrTag) { } 957 ALWAYS_INLINE void tagPtr(RegisterID, RegisterID) { } 958 ALWAYS_INLINE void untagPtr(RegisterID, PtrTag) { } 959 ALWAYS_INLINE void untagPtr(RegisterID, RegisterID) { } 960 ALWAYS_INLINE void removePtrTag(RegisterID) { } 953 961 954 962 protected: -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.cpp
r225363 r229609 1 1 /* 2 * Copyright (C) 2012-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2012-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 45 45 } 46 46 47 LinkBuffer::CodeRef LinkBuffer::finalizeCodeWithoutDisassembly( )47 LinkBuffer::CodeRef LinkBuffer::finalizeCodeWithoutDisassembly(PtrTag tag) 48 48 { 49 49 performFinalization(); … … 51 51 ASSERT(m_didAllocate); 52 52 if (m_executableMemory) 53 return CodeRef(*m_executableMemory );54 55 return CodeRef::createSelfManagedCodeRef(MacroAssemblerCodePtr( m_code));56 } 57 58 LinkBuffer::CodeRef LinkBuffer::finalizeCodeWithDisassembly( const char* format, ...)59 { 60 CodeRef result = finalizeCodeWithoutDisassembly( );53 return CodeRef(*m_executableMemory, tag); 54 55 return CodeRef::createSelfManagedCodeRef(MacroAssemblerCodePtr(tagCodePtr(m_code, tag))); 56 } 57 58 LinkBuffer::CodeRef LinkBuffer::finalizeCodeWithDisassembly(PtrTag tag, const char* format, ...) 59 { 60 CodeRef result = finalizeCodeWithoutDisassembly(tag); 61 61 62 62 if (m_alreadyDisassembled) … … 71 71 out.printf(":\n"); 72 72 73 out.printf(" Code at [%p, %p):\n", result.code().executableAddress(), result.code().executableAddress<char*>() + result.size()); 73 uint8_t* executableAddress = removeCodePtrTag<uint8_t*>(result.code().executableAddress()); 74 out.printf(" Code at [%p, %p):\n", executableAddress, executableAddress + result.size()); 74 75 75 76 CString header = out.toCString(); -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
r229054 r229609 122 122 // These methods are used to link or set values at code generation time. 123 123 124 template<typename Func, typename = std::enable_if_t<std::is_function<typename std::remove_pointer<Func>::type>::value>> 125 void link(Call call, Func funcName, PtrTag tag) 126 { 127 FunctionPtr function(funcName, tag); 128 link(call, function); 129 } 130 124 131 void link(Call call, FunctionPtr function) 125 132 { … … 176 183 ASSERT(call.isFlagSet(Call::Linkable)); 177 184 ASSERT(call.isFlagSet(Call::Near)); 178 return CodeLocationNearCall(MacroAssembler::getLinkerAddress(code(), applyOffset(call.m_label) ),185 return CodeLocationNearCall(MacroAssembler::getLinkerAddress(code(), applyOffset(call.m_label), NearCallPtrTag), 179 186 call.isFlagSet(Call::Tail) ? NearCallMode::Tail : NearCallMode::Regular); 180 187 } … … 185 192 } 186 193 187 CodeLocationLabel locationOf(Label label) 188 { 189 return CodeLocationLabel(MacroAssembler::getLinkerAddress(code(), applyOffset(label.m_label))); 194 // FIXME: remove the default PtrTag value once we've tagged all the clients. 195 CodeLocationLabel locationOf(Label label, PtrTag tag = NoPtrTag) 196 { 197 return CodeLocationLabel(MacroAssembler::getLinkerAddress(code(), applyOffset(label.m_label), tag)); 190 198 } 191 199 … … 233 241 // displaying disassembly. 234 242 235 JS_EXPORT_PRIVATE CodeRef finalizeCodeWithoutDisassembly( );236 JS_EXPORT_PRIVATE CodeRef finalizeCodeWithDisassembly( const char* format, ...) WTF_ATTRIBUTE_PRINTF(2, 3);243 JS_EXPORT_PRIVATE CodeRef finalizeCodeWithoutDisassembly(PtrTag); 244 JS_EXPORT_PRIVATE CodeRef finalizeCodeWithDisassembly(PtrTag, const char* format, ...) WTF_ATTRIBUTE_PRINTF(3, 4); 237 245 238 246 CodePtr trampolineAt(Label label) … … 308 316 }; 309 317 310 #define FINALIZE_CODE_IF(condition, linkBufferReference, ...) \318 #define FINALIZE_CODE_IF(condition, linkBufferReference, resultPtrTag, ...) \ 311 319 (UNLIKELY((condition)) \ 312 ? (linkBufferReference).finalizeCodeWithDisassembly( __VA_ARGS__) \313 : (linkBufferReference).finalizeCodeWithoutDisassembly( ))320 ? (linkBufferReference).finalizeCodeWithDisassembly(resultPtrTag, __VA_ARGS__) \ 321 : (linkBufferReference).finalizeCodeWithoutDisassembly(resultPtrTag)) 314 322 315 323 bool shouldDumpDisassemblyFor(CodeBlock*); 316 324 317 #define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, ...) \318 FINALIZE_CODE_IF((shouldDumpDisassemblyFor(codeBlock) || Options::asyncDisassembly()), linkBufferReference, __VA_ARGS__)325 #define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, resultPtrTag, ...) \ 326 FINALIZE_CODE_IF((shouldDumpDisassemblyFor(codeBlock) || Options::asyncDisassembly()), linkBufferReference, resultPtrTag, __VA_ARGS__) 319 327 320 328 // Use this to finalize code, like so: 321 329 // 322 // CodeRef code = FINALIZE_CODE(linkBuffer, "my super thingy number %d", number);330 // CodeRef code = FINALIZE_CODE(linkBuffer, tag, "my super thingy number %d", number); 323 331 // 324 332 // Which, in disassembly mode, will print: … … 334 342 // is true, so you can hide expensive disassembly-only computations inside there. 335 343 336 #define FINALIZE_CODE(linkBufferReference, ...) \337 FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly()), linkBufferReference, __VA_ARGS__)338 339 #define FINALIZE_DFG_CODE(linkBufferReference, ...) \340 FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly() || Options::dumpDFGDisassembly()), linkBufferReference, __VA_ARGS__)344 #define FINALIZE_CODE(linkBufferReference, resultPtrTag, ...) \ 345 FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly()), linkBufferReference, resultPtrTag, __VA_ARGS__) 346 347 #define FINALIZE_DFG_CODE(linkBufferReference, resultPtrTag, ...) \ 348 FINALIZE_CODE_IF((JSC::Options::asyncDisassembly() || JSC::Options::dumpDisassembly() || Options::dumpDFGDisassembly()), linkBufferReference, resultPtrTag, __VA_ARGS__) 341 349 342 350 } // namespace JSC -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM.h
r229087 r229609 790 790 } 791 791 792 void jump(RegisterID target )792 void jump(RegisterID target, PtrTag) 793 793 { 794 794 m_assembler.bx(target); 795 795 } 796 796 797 void jump(Address address )797 void jump(Address address, PtrTag) 798 798 { 799 799 load32(address, ARMRegisters::pc); 800 800 } 801 801 802 void jump(AbsoluteAddress address )802 void jump(AbsoluteAddress address, PtrTag) 803 803 { 804 804 move(TrustedImmPtr(address.m_ptr), ARMRegisters::S0); … … 989 989 } 990 990 991 Call call(RegisterID target )991 Call call(RegisterID target, PtrTag) 992 992 { 993 993 return Call(m_assembler.blx(target), Call::None); 994 994 } 995 995 996 void call(Address address )996 void call(Address address, PtrTag) 997 997 { 998 998 call32(address.base, address.offset); … … 1119 1119 } 1120 1120 1121 Call call( )1121 Call call(PtrTag) 1122 1122 { 1123 1123 ensureSpace(2 * sizeof(ARMWord), sizeof(ARMWord)); … … 1500 1500 static FunctionPtr readCallTarget(CodeLocationCall call) 1501 1501 { 1502 return FunctionPtr(reinterpret_cast<void(*)()>(ARMAssembler::readCallTarget(call.dataLocation())) );1502 return FunctionPtr(reinterpret_cast<void(*)()>(ARMAssembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag); 1503 1503 } 1504 1504 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
r229391 r229609 3085 3085 // Jumps, calls, returns 3086 3086 3087 ALWAYS_INLINE Call call( )3087 ALWAYS_INLINE Call call(PtrTag) 3088 3088 { 3089 3089 AssemblerLabel pointerLabel = m_assembler.label(); … … 3096 3096 } 3097 3097 3098 ALWAYS_INLINE Call call(RegisterID target )3098 ALWAYS_INLINE Call call(RegisterID target, PtrTag) 3099 3099 { 3100 3100 invalidateAllTempRegisters(); … … 3103 3103 } 3104 3104 3105 ALWAYS_INLINE Call call(Address address )3105 ALWAYS_INLINE Call call(Address address, PtrTag tag) 3106 3106 { 3107 3107 load64(address, getCachedDataTempRegisterIDAndInvalidate()); 3108 return call(dataTempRegister );3108 return call(dataTempRegister, tag); 3109 3109 } 3110 3110 … … 3116 3116 } 3117 3117 3118 void jump(RegisterID target )3118 void jump(RegisterID target, PtrTag) 3119 3119 { 3120 3120 m_assembler.br(target); 3121 3121 } 3122 3122 3123 void jump(Address address )3123 void jump(Address address, PtrTag) 3124 3124 { 3125 3125 load64(address, getCachedDataTempRegisterIDAndInvalidate()); … … 3127 3127 } 3128 3128 3129 void jump(BaseIndex address )3129 void jump(BaseIndex address, PtrTag) 3130 3130 { 3131 3131 load64(address, getCachedDataTempRegisterIDAndInvalidate()); … … 3133 3133 } 3134 3134 3135 void jump(AbsoluteAddress address )3135 void jump(AbsoluteAddress address, PtrTag) 3136 3136 { 3137 3137 move(TrustedImmPtr(address.m_ptr), getCachedDataTempRegisterIDAndInvalidate()); … … 3765 3765 static FunctionPtr readCallTarget(CodeLocationCall call) 3766 3766 { 3767 return FunctionPtr(reinterpret_cast<void(*)()>(Assembler::readCallTarget(call.dataLocation())) );3767 return FunctionPtr(reinterpret_cast<void(*)()>(Assembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag); 3768 3768 } 3769 3769 … … 4432 4432 { 4433 4433 if (!call.isFlagSet(Call::Near)) 4434 Assembler::linkPointer(code, call.m_label.labelAtOffset(REPATCH_OFFSET_CALL_TO_POINTER), function. value());4434 Assembler::linkPointer(code, call.m_label.labelAtOffset(REPATCH_OFFSET_CALL_TO_POINTER), function.executableAddress()); 4435 4435 else if (call.isFlagSet(Call::Tail)) 4436 Assembler::linkJump(code, call.m_label, function. value());4436 Assembler::linkJump(code, call.m_label, function.executableAddress()); 4437 4437 else 4438 Assembler::linkCall(code, call.m_label, function. value());4438 Assembler::linkCall(code, call.m_label, function.executableAddress()); 4439 4439 } 4440 4440 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
r229087 r229609 1600 1600 } 1601 1601 1602 void jump(RegisterID target )1602 void jump(RegisterID target, PtrTag) 1603 1603 { 1604 1604 m_assembler.bx(target); … … 1606 1606 1607 1607 // Address is a memory location containing the address to jump to 1608 void jump(Address address )1608 void jump(Address address, PtrTag) 1609 1609 { 1610 1610 load32(address, dataTempRegister); … … 1612 1612 } 1613 1613 1614 void jump(AbsoluteAddress address )1614 void jump(AbsoluteAddress address, PtrTag) 1615 1615 { 1616 1616 move(TrustedImmPtr(address.m_ptr), dataTempRegister); … … 1764 1764 ShiftTypeAndAmount shift(SRType_LSL, scale); 1765 1765 m_assembler.add(dataTempRegister, dataTempRegister, index, shift); 1766 jump(dataTempRegister );1766 jump(dataTempRegister, NoPtrTag); 1767 1767 } 1768 1768 … … 1788 1788 } 1789 1789 1790 ALWAYS_INLINE Call call( )1790 ALWAYS_INLINE Call call(PtrTag) 1791 1791 { 1792 1792 moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister); … … 1794 1794 } 1795 1795 1796 ALWAYS_INLINE Call call(RegisterID target )1796 ALWAYS_INLINE Call call(RegisterID target, PtrTag) 1797 1797 { 1798 1798 return Call(m_assembler.blx(target), Call::None); 1799 1799 } 1800 1800 1801 ALWAYS_INLINE Call call(Address address )1801 ALWAYS_INLINE Call call(Address address, PtrTag) 1802 1802 { 1803 1803 load32(address, dataTempRegister); … … 1978 1978 static FunctionPtr readCallTarget(CodeLocationCall call) 1979 1979 { 1980 return FunctionPtr(reinterpret_cast<void(*)()>(ARMv7Assembler::readCallTarget(call.dataLocation())) );1980 return FunctionPtr(reinterpret_cast<void(*)()>(ARMv7Assembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag); 1981 1981 } 1982 1982 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.cpp
r225437 r229609 1 1 /* 2 * Copyright (C) 2016-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 34 34 namespace JSC { 35 35 36 MacroAssemblerCodePtr MacroAssemblerCodePtr::createLLIntCodePtr(OpcodeID codeId)36 MacroAssemblerCodePtr MacroAssemblerCodePtr::createLLIntCodePtr(OpcodeID opcodeID) 37 37 { 38 return createFromExecutableAddress(LLInt::getCodePtr(codeId)); 38 ASSERT(opcodeID >= NUMBER_OF_BYTECODE_IDS); 39 return createFromExecutableAddress(LLInt::getCodePtr(opcodeID)); 39 40 } 40 41 … … 57 58 } 58 59 59 MacroAssemblerCodeRef MacroAssemblerCodeRef::createLLIntCodeRef(OpcodeID codeId)60 MacroAssemblerCodeRef MacroAssemblerCodeRef::createLLIntCodeRef(OpcodeID opcodeID) 60 61 { 61 return createSelfManagedCodeRef(MacroAssemblerCodePtr::create FromExecutableAddress(LLInt::getCodePtr(codeId)));62 return createSelfManagedCodeRef(MacroAssemblerCodePtr::createLLIntCodePtr(opcodeID)); 62 63 } 63 64 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
r229367 r229609 28 28 #include "ExecutableAllocator.h" 29 29 #include "JSCPoison.h" 30 #include "PtrTag.h" 30 31 #include <wtf/DataLog.h> 31 32 #include <wtf/PrintStream.h> … … 64 65 FunctionPtr() { } 65 66 66 template<typename returnType, typename... Arguments>67 FunctionPtr( returnType(*value)(Arguments...))68 : m_value( reinterpret_cast<void*>(value))67 template<typename ReturnType, typename... Arguments> 68 FunctionPtr(ReturnType(*value)(Arguments...), PtrTag tag = SlowPathPtrTag) 69 : m_value(tagCFunctionPtr<void*>(value, tag)) 69 70 { 70 71 PoisonedMasmPtr::assertIsNotPoisoned(m_value); … … 76 77 #if CALLING_CONVENTION_IS_STDCALL && !OS(WINDOWS) 77 78 78 template<typename returnType, typename... Arguments>79 FunctionPtr( returnType(CDECL *value)(Arguments...))80 : m_value( reinterpret_cast<void*>(value))79 template<typename ReturnType, typename... Arguments> 80 FunctionPtr(ReturnType(CDECL *value)(Arguments...), PtrTag tag = SlowPathPtrTag) 81 : m_value(tagCFunctionPtr<void*>(value, tag)) 81 82 { 82 83 PoisonedMasmPtr::assertIsNotPoisoned(m_value); … … 88 89 #if COMPILER_SUPPORTS(FASTCALL_CALLING_CONVENTION) 89 90 90 template<typename returnType, typename... Arguments>91 FunctionPtr( returnType(FASTCALL *value)(Arguments...))92 : m_value( reinterpret_cast<void*>(value))91 template<typename ReturnType, typename... Arguments> 92 FunctionPtr(ReturnType(FASTCALL *value)(Arguments...), PtrTag tag = SlowPathPtrTag) 93 : m_value(tagCFunctionPtr<void*>(value, tag)) 93 94 { 94 95 PoisonedMasmPtr::assertIsNotPoisoned(m_value); … … 99 100 100 101 template<typename FunctionType> 101 explicit FunctionPtr(FunctionType* value )102 explicit FunctionPtr(FunctionType* value, PtrTag tag = SlowPathPtrTag) 102 103 // Using a C-ctyle cast here to avoid compiler error on RVTC: 103 104 // Error: #694: reinterpret_cast cannot cast away const or other type qualifiers 104 105 // (I guess on RVTC function pointers have a different constness to GCC/MSVC?) 105 : m_value( (void*)value)106 : m_value(tagCodePtr<void*>(value, tag)) 106 107 { 107 108 PoisonedMasmPtr::assertIsNotPoisoned(m_value); … … 114 115 { 115 116 PoisonedMasmPtr::assertIsNotPoisoned(m_value); 116 return m_value;117 return removeCodePtrTag(m_value); 117 118 } 118 119 void* executableAddress() const … … 184 185 ASSERT_VALID_CODE_POINTER(m_value.unpoisoned()); 185 186 } 186 187 187 188 static MacroAssemblerCodePtr createFromExecutableAddress(void* value) 188 189 { … … 228 229 m_value.assertIsPoisoned(); 229 230 ASSERT_VALID_CODE_POINTER(m_value); 230 return m_value.unpoisoned<T>();231 return bitwise_cast<T>(m_value ? removeCodePtrTag(m_value.unpoisoned()) : nullptr); 231 232 } 232 233 #endif … … 316 317 } 317 318 318 MacroAssemblerCodeRef(Ref<ExecutableMemoryHandle>&& executableMemory )319 : m_codePtr( executableMemory->start())319 MacroAssemblerCodeRef(Ref<ExecutableMemoryHandle>&& executableMemory, PtrTag tag) 320 : m_codePtr(tagCodePtr(executableMemory->start(), tag)) 320 321 , m_executableMemory(WTFMove(executableMemory)) 321 322 { … … 345 346 return m_codePtr; 346 347 } 347 348 349 MacroAssemblerCodePtr retaggedCode(PtrTag oldTag, PtrTag newTag) const 350 { 351 return MacroAssemblerCodePtr(retagCodePtr(m_codePtr.executableAddress(), oldTag, newTag)); 352 } 353 348 354 size_t size() const 349 355 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h
r229087 r229609 1757 1757 } 1758 1758 1759 void jump(RegisterID target )1759 void jump(RegisterID target, PtrTag) 1760 1760 { 1761 1761 move(target, MIPSRegisters::t9); … … 1764 1764 } 1765 1765 1766 void jump(Address address )1766 void jump(Address address, PtrTag) 1767 1767 { 1768 1768 m_fixedWidth = true; … … 1773 1773 } 1774 1774 1775 void jump(AbsoluteAddress address )1775 void jump(AbsoluteAddress address, PtrTag) 1776 1776 { 1777 1777 m_fixedWidth = true; … … 2251 2251 } 2252 2252 2253 Call call( )2253 Call call(PtrTag) 2254 2254 { 2255 2255 m_assembler.lui(MIPSRegisters::t9, 0); … … 2260 2260 } 2261 2261 2262 Call call(RegisterID target )2262 Call call(RegisterID target, PtrTag) 2263 2263 { 2264 2264 move(target, MIPSRegisters::t9); … … 2268 2268 } 2269 2269 2270 Call call(Address address )2270 Call call(Address address, PtrTag) 2271 2271 { 2272 2272 m_fixedWidth = true; … … 3079 3079 static FunctionPtr readCallTarget(CodeLocationCall call) 3080 3080 { 3081 return FunctionPtr(reinterpret_cast<void(*)()>(MIPSAssembler::readCallTarget(call.dataLocation())) );3081 return FunctionPtr(reinterpret_cast<void(*)()>(MIPSAssembler::readCallTarget(call.dataLocation())), CodeEntryPtrTag); 3082 3082 } 3083 3083 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86.h
r229391 r229609 1 1 /* 2 * Copyright (C) 2008 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2008-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 214 214 } 215 215 216 Call call( )216 Call call(PtrTag) 217 217 { 218 218 return Call(m_assembler.call(), Call::Linkable); … … 220 220 221 221 // Address is a memory location containing the address to jump to 222 void jump(AbsoluteAddress address )222 void jump(AbsoluteAddress address, PtrTag) 223 223 { 224 224 m_assembler.jmp_m(address.m_ptr); … … 299 299 { 300 300 intptr_t offset = reinterpret_cast<int32_t*>(call.dataLocation())[-1]; 301 return FunctionPtr(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(call.dataLocation()) + offset) );301 return FunctionPtr(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(call.dataLocation()) + offset), CodeEntryPtrTag); 302 302 } 303 303 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp
r221032 r229609 1 1 /* 2 * Copyright (C) 2013-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 754 754 push(RegisterID::ebx); 755 755 move(TrustedImmPtr(arg), RegisterID::ebx); 756 call(RegisterID::eax );756 call(RegisterID::eax, CFunctionPtrTag); 757 757 } 758 758 #endif // ENABLE(MASM_PROBE) -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
r229391 r229609 2697 2697 } 2698 2698 2699 void jump(RegisterID target )2699 void jump(RegisterID target, PtrTag) 2700 2700 { 2701 2701 m_assembler.jmp_r(target); … … 2703 2703 2704 2704 // Address is a memory location containing the address to jump to 2705 void jump(Address address )2705 void jump(Address address, PtrTag) 2706 2706 { 2707 2707 m_assembler.jmp_m(address.offset, address.base); … … 2709 2709 2710 2710 // Address is a memory location containing the address to jump to 2711 void jump(BaseIndex address )2711 void jump(BaseIndex address, PtrTag) 2712 2712 { 2713 2713 m_assembler.jmp_m(address.offset, address.base, address.index, address.scale); … … 2895 2895 } 2896 2896 2897 Call call(RegisterID target )2897 Call call(RegisterID target, PtrTag) 2898 2898 { 2899 2899 return Call(m_assembler.call(target), Call::None); 2900 2900 } 2901 2901 2902 void call(Address address )2902 void call(Address address, PtrTag) 2903 2903 { 2904 2904 m_assembler.call_m(address.offset, address.base); -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h
r229087 r229609 191 191 #endif 192 192 193 Call call( )193 Call call(PtrTag) 194 194 { 195 195 #if OS(WINDOWS) … … 225 225 226 226 // Address is a memory location containing the address to jump to 227 void jump(AbsoluteAddress address )227 void jump(AbsoluteAddress address, PtrTag tag) 228 228 { 229 229 move(TrustedImmPtr(address.m_ptr), scratchRegister()); 230 jump(Address(scratchRegister()) );230 jump(Address(scratchRegister()), tag); 231 231 } 232 232 … … 1871 1871 static FunctionPtr readCallTarget(CodeLocationCall call) 1872 1872 { 1873 return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-REPATCH_OFFSET_CALL_R11).dataLocation()) );1873 return FunctionPtr(X86Assembler::readPointer(call.dataLabelPtrAtOffset(-REPATCH_OFFSET_CALL_R11).dataLocation()), CodeEntryPtrTag); 1874 1874 } 1875 1875 -
trunk/Source/JavaScriptCore/assembler/testmasm.cpp
r229476 r229609 150 150 generate(jit); 151 151 LinkBuffer linkBuffer(jit, nullptr); 152 return FINALIZE_CODE(linkBuffer, "testmasm compilation");152 return FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testmasm compilation"); 153 153 } 154 154 … … 156 156 T invoke(MacroAssemblerCodeRef code, Arguments... arguments) 157 157 { 158 T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(code.code().executableAddress()); 158 void* executableAddress = untagCFunctionPtr(code.code().executableAddress(), JITCodePtrTag); 159 T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(executableAddress); 159 160 return function(arguments...); 160 161 } -
trunk/Source/JavaScriptCore/b3/B3Compile.cpp
r229054 r229609 49 49 LinkBuffer linkBuffer(jit, nullptr); 50 50 51 return Compilation(FINALIZE_CODE(linkBuffer, "B3::Compilation"), proc.releaseByproducts());51 return Compilation(FINALIZE_CODE(linkBuffer, JITCodePtrTag, "B3::Compilation"), proc.releaseByproducts()); 52 52 } 53 53 -
trunk/Source/JavaScriptCore/b3/B3LowerMacros.cpp
r227527 r229609 512 512 jit.load64(CCallHelpers::BaseIndex(scratch, index, CCallHelpers::timesPtr()), scratch); 513 513 jit.xor64(poisonScratch, scratch); 514 jit.jump(scratch );514 jit.jump(scratch, NoPtrTag); 515 515 516 516 // These labels are guaranteed to be populated before either late paths or -
trunk/Source/JavaScriptCore/b3/air/AirCCallSpecial.cpp
r216306 r229609 1 1 /* 2 * Copyright (C) 2015-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2015-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 135 135 case Arg::BigImm: 136 136 jit.move(inst.args[calleeArgOffset].asTrustedImmPtr(), scratchRegister); 137 jit.call(scratchRegister );137 jit.call(scratchRegister, NoPtrTag); 138 138 break; 139 139 case Arg::Tmp: 140 jit.call(inst.args[calleeArgOffset].gpr() );140 jit.call(inst.args[calleeArgOffset].gpr(), NoPtrTag); 141 141 break; 142 142 case Arg::Addr: 143 143 case Arg::ExtendedOffsetAddr: 144 jit.call(inst.args[calleeArgOffset].asAddress() );144 jit.call(inst.args[calleeArgOffset].asAddress(), NoPtrTag); 145 145 break; 146 146 default: -
trunk/Source/JavaScriptCore/b3/air/testair.cpp
r229054 r229609 91 91 92 92 return std::make_unique<B3::Compilation>( 93 FINALIZE_CODE(linkBuffer, "testair compilation"), proc.releaseByproducts());93 FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testair compilation"), proc.releaseByproducts()); 94 94 } 95 95 … … 97 97 T invoke(const B3::Compilation& code, Arguments... arguments) 98 98 { 99 T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(code.code().executableAddress()); 99 void* executableAddress = untagCFunctionPtr(code.code().executableAddress(), JITCodePtrTag); 100 T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(executableAddress); 100 101 return function(arguments...); 101 102 } -
trunk/Source/JavaScriptCore/b3/testb3.cpp
r229517 r229609 128 128 T invoke(MacroAssemblerCodePtr ptr, Arguments... arguments) 129 129 { 130 T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(ptr.executableAddress()); 130 void* executableAddress = untagCFunctionPtr(ptr.executableAddress(), JITCodePtrTag); 131 T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(executableAddress); 131 132 return function(arguments...); 132 133 } … … 13043 13044 jit.load64(CCallHelpers::BaseIndex(scratch, params[0].gpr(), CCallHelpers::timesPtr()), scratch); 13044 13045 jit.xor64(poisonScratch, scratch); 13045 jit.jump(scratch );13046 jit.jump(scratch, NoPtrTag); 13046 13047 13047 13048 jit.addLinkTask( 13048 13049 [&, jumpTable, labels] (LinkBuffer& linkBuffer) { 13049 13050 for (unsigned i = labels.size(); i--;) 13050 jumpTable[i] = linkBuffer.locationOf(*labels[i] );13051 jumpTable[i] = linkBuffer.locationOf(*labels[i], NoPtrTag); 13051 13052 }); 13052 13053 }); … … 13297 13298 generate(proc, jit); 13298 13299 LinkBuffer linkBuffer(jit, nullptr); 13299 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0) );13300 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1) );13301 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2) );13302 13303 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");13304 13300 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0), JITCodePtrTag); 13301 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1), JITCodePtrTag); 13302 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2), JITCodePtrTag); 13303 13304 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testb3 compilation"); 13305 13305 13306 CHECK(invoke<int>(labelOne, 1, 2) == 3); 13306 13307 CHECK(invoke<int>(labelTwo, 1, 2) == -1); … … 13330 13331 generate(proc, jit); 13331 13332 LinkBuffer linkBuffer(jit, nullptr); 13332 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0) );13333 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1) );13334 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2) );13335 13336 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");13337 13333 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0), JITCodePtrTag); 13334 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1), JITCodePtrTag); 13335 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2), JITCodePtrTag); 13336 13337 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testb3 compilation"); 13338 13338 13339 CHECK_EQ(invoke<int>(labelOne, 1, 2), 3); 13339 13340 CHECK_EQ(invoke<int>(labelTwo, 1, 2), 3); … … 13417 13418 generate(proc, jit); 13418 13419 LinkBuffer linkBuffer(jit, nullptr); 13419 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0) );13420 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1) );13421 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2) );13422 13423 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");13424 13420 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0), JITCodePtrTag); 13421 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1), JITCodePtrTag); 13422 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2), JITCodePtrTag); 13423 13424 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testb3 compilation"); 13425 13425 13426 CHECK_EQ(invoke<int>(labelOne, 1, 2, 10), 3); 13426 13427 CHECK_EQ(invoke<int>(labelTwo, 1, 2, 10), -1); … … 13534 13535 generate(proc, jit); 13535 13536 LinkBuffer linkBuffer(jit, nullptr); 13536 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0) );13537 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1) );13538 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2) );13539 13540 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");13541 13537 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0), JITCodePtrTag); 13538 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1), JITCodePtrTag); 13539 CodeLocationLabel labelThree = linkBuffer.locationOf(proc.entrypointLabel(2), JITCodePtrTag); 13540 13541 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testb3 compilation"); 13542 13542 13543 CHECK_EQ(invoke<int>(labelOne, 1, 2, 10, false), 3); 13543 13544 CHECK_EQ(invoke<int>(labelTwo, 1, 2, 10, false), -1); … … 13612 13613 generate(proc, jit); 13613 13614 LinkBuffer linkBuffer(jit, nullptr); 13614 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0) );13615 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1) );13616 13617 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, "testb3 compilation");13615 CodeLocationLabel labelOne = linkBuffer.locationOf(proc.entrypointLabel(0), JITCodePtrTag); 13616 CodeLocationLabel labelTwo = linkBuffer.locationOf(proc.entrypointLabel(1), JITCodePtrTag); 13617 13618 MacroAssemblerCodeRef codeRef = FINALIZE_CODE(linkBuffer, JITCodePtrTag, "testb3 compilation"); 13618 13619 13619 13620 CHECK(invoke<int>(labelOne, 0) == 1); -
trunk/Source/JavaScriptCore/bytecode/AccessCase.cpp
r229518 r229609 864 864 jit.storePtr(GPRInfo::callFrameRegister, &vm.topCallFrame); 865 865 866 operationCall = jit.call( );866 operationCall = jit.call(NoPtrTag); 867 867 jit.addLinkTask([=] (LinkBuffer& linkBuffer) { 868 868 linkBuffer.link(operationCall, FunctionPtr(this->as<GetterSetterAccessCase>().m_customAccessor.opaque)); … … 1008 1008 jit.setupArguments<decltype(operationReallocateButterflyToHavePropertyStorageWithInitialCapacity)>(baseGPR); 1009 1009 1010 CCallHelpers::Call operationCall = jit.call( );1010 CCallHelpers::Call operationCall = jit.call(NoPtrTag); 1011 1011 jit.addLinkTask([=] (LinkBuffer& linkBuffer) { 1012 1012 linkBuffer.link( … … 1020 1020 baseGPR, CCallHelpers::TrustedImm32(newSize / sizeof(JSValue))); 1021 1021 1022 CCallHelpers::Call operationCall = jit.call( );1022 CCallHelpers::Call operationCall = jit.call(NoPtrTag); 1023 1023 jit.addLinkTask([=] (LinkBuffer& linkBuffer) { 1024 1024 linkBuffer.link( -
trunk/Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.cpp
r229391 r229609 62 62 jit.setupArguments<FunctionType>(std::get<ArgumentsIndex>(m_arguments)...); 63 63 64 CCallHelpers::Call operationCall = jit.call( );64 CCallHelpers::Call operationCall = jit.call(NoPtrTag); 65 65 auto function = m_function; 66 66 jit.addLinkTask([=] (LinkBuffer& linkBuffer) { -
trunk/Source/JavaScriptCore/bytecode/InlineAccess.cpp
r229054 r229609 136 136 ASSERT(linkBuffer.isValid()); 137 137 function(linkBuffer); 138 FINALIZE_CODE(linkBuffer, "InlineAccessType: '%s'", name);138 FINALIZE_CODE(linkBuffer, JITCodePtrTag, "InlineAccessType: '%s'", name); 139 139 return true; 140 140 } … … 291 291 linkBuffer.link(jump, target); 292 292 293 FINALIZE_CODE(linkBuffer, "InlineAccess: linking constant jump");293 FINALIZE_CODE(linkBuffer, JITCodePtrTag, "InlineAccess: linking constant jump"); 294 294 } 295 295 -
trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
r229391 r229609 200 200 } else { 201 201 jit->setupArguments<decltype(lookupExceptionHandler)>(CCallHelpers::TrustedImmPtr(&m_vm), GPRInfo::callFrameRegister); 202 CCallHelpers::Call lookupExceptionHandlerCall = jit->call( );202 CCallHelpers::Call lookupExceptionHandlerCall = jit->call(NoPtrTag); 203 203 jit->addLinkTask( 204 204 [=] (LinkBuffer& linkBuffer) { 205 linkBuffer.link(lookupExceptionHandlerCall, lookupExceptionHandler );205 linkBuffer.link(lookupExceptionHandlerCall, lookupExceptionHandler, NoPtrTag); 206 206 }); 207 207 jit->jumpToExceptionHandler(m_vm); … … 539 539 540 540 HandlerInfo handlerToRegister = oldHandler; 541 handlerToRegister.nativeCode = linkBuffer.locationOf(makeshiftCatchHandler );541 handlerToRegister.nativeCode = linkBuffer.locationOf(makeshiftCatchHandler, NoPtrTag); 542 542 handlerToRegister.start = newExceptionHandlingCallSite.bits(); 543 543 handlerToRegister.end = newExceptionHandlingCallSite.bits() + 1; … … 569 569 570 570 MacroAssemblerCodeRef code = FINALIZE_CODE_FOR( 571 codeBlock, linkBuffer, 571 codeBlock, linkBuffer, NoPtrTag, 572 572 "%s", toCString("Access stub for ", *codeBlock, " ", stubInfo.codeOrigin, " with return point ", successLabel, ": ", listDump(cases)).data()); 573 573 -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
r229444 r229609 162 162 poke(GPRInfo::argumentGPR1, 1); 163 163 #endif 164 m_calls.append(CallLinkRecord(call( ), lookupExceptionHandlerFromCallerFrame));164 m_calls.append(CallLinkRecord(call(NoPtrTag), lookupExceptionHandlerFromCallerFrame)); 165 165 166 166 jumpToExceptionHandler(*vm()); … … 181 181 poke(GPRInfo::argumentGPR1, 1); 182 182 #endif 183 m_calls.append(CallLinkRecord(call( ), lookupExceptionHandler));183 m_calls.append(CallLinkRecord(call(NoPtrTag), lookupExceptionHandler)); 184 184 185 185 jumpToExceptionHandler(*vm()); … … 215 215 usedJumpTables.set(data.switchTableIndex); 216 216 SimpleJumpTable& table = m_codeBlock->switchJumpTable(data.switchTableIndex); 217 table.ctiDefault = linkBuffer.locationOf(m_blockHeads[data.fallThrough.block->index] );217 table.ctiDefault = linkBuffer.locationOf(m_blockHeads[data.fallThrough.block->index], NoPtrTag); 218 218 table.ctiOffsets.grow(table.branchOffsets.size()); 219 219 for (unsigned j = table.ctiOffsets.size(); j--;) … … 222 222 SwitchCase& myCase = data.cases[j]; 223 223 table.ctiOffsets[myCase.value.switchLookupValue(data.kind) - table.min] = 224 linkBuffer.locationOf(m_blockHeads[myCase.target.block->index] );224 linkBuffer.locationOf(m_blockHeads[myCase.target.block->index], NoPtrTag); 225 225 } 226 226 } … … 245 245 246 246 StringJumpTable& table = m_codeBlock->stringSwitchJumpTable(data.switchTableIndex); 247 table.ctiDefault = linkBuffer.locationOf(m_blockHeads[data.fallThrough.block->index] );247 table.ctiDefault = linkBuffer.locationOf(m_blockHeads[data.fallThrough.block->index], NoPtrTag); 248 248 StringJumpTable::StringOffsetTable::iterator iter; 249 249 StringJumpTable::StringOffsetTable::iterator end = table.offsetTable.end(); … … 254 254 iter = table.offsetTable.find(myCase.value.stringImpl()); 255 255 RELEASE_ASSERT(iter != end); 256 iter->value.ctiOffset = linkBuffer.locationOf(m_blockHeads[myCase.target.block->index] );256 iter->value.ctiOffset = linkBuffer.locationOf(m_blockHeads[myCase.target.block->index], NoPtrTag); 257 257 } 258 258 } … … 276 276 277 277 ptrdiff_t inlineSize = MacroAssembler::differenceBetweenCodePtr( 278 start, linkBuffer.locationOf(m_ins[i].m_done ));278 start, linkBuffer.locationOf(m_ins[i].m_done, NoPtrTag)); 279 279 RELEASE_ASSERT(inlineSize >= 0); 280 280 info.patch.inlineSize = inlineSize; … … 284 284 285 285 info.patch.deltaFromStartToSlowPathStart = MacroAssembler::differenceBetweenCodePtr( 286 start, linkBuffer.locationOf(m_ins[i].m_slowPathGenerator->label() ));286 start, linkBuffer.locationOf(m_ins[i].m_slowPathGenerator->label(), NoPtrTag)); 287 287 } 288 288 … … 298 298 for (JSDirectCallRecord& record : m_jsDirectCalls) { 299 299 CallLinkInfo& info = *record.info; 300 linkBuffer.link(record.call, linkBuffer.locationOf(record.slowPath ));300 linkBuffer.link(record.call, linkBuffer.locationOf(record.slowPath, NoPtrTag)); 301 301 info.setCallLocations( 302 302 CodeLocationLabel(), 303 linkBuffer.locationOf(record.slowPath ),303 linkBuffer.locationOf(record.slowPath, NoPtrTag), 304 304 linkBuffer.locationOfNearCall(record.call)); 305 305 } … … 309 309 info.setCallLocations( 310 310 linkBuffer.locationOf(record.patchableJump), 311 linkBuffer.locationOf(record.slowPath ),311 linkBuffer.locationOf(record.slowPath, NoPtrTag), 312 312 linkBuffer.locationOfNearCall(record.call)); 313 313 } … … 324 324 if (info.m_replacementSource.isSet()) { 325 325 m_jitCode->common.jumpReplacements.append(JumpReplacement( 326 linkBuffer.locationOf(info.m_replacementSource ),327 linkBuffer.locationOf(info.m_replacementDestination )));326 linkBuffer.locationOf(info.m_replacementSource, NoPtrTag), 327 linkBuffer.locationOf(info.m_replacementDestination, NoPtrTag))); 328 328 } 329 329 } … … 335 335 Vector<const void*> addresses; 336 336 for (unsigned j = 0; j < labels.size(); ++j) 337 addresses.append(linkBuffer.locationOf(labels[j] ).executableAddress());337 addresses.append(linkBuffer.locationOf(labels[j], NoPtrTag).executableAddress()); 338 338 m_graph.compilation()->addOSRExitSite(addresses); 339 339 } … … 352 352 // If this *is set*, it means we will be landing at this code location from genericUnwind from an 353 353 // exception thrown in a child call frame. 354 CodeLocationLabel catchLabel = linkBuffer.locationOf(info.m_replacementDestination );354 CodeLocationLabel catchLabel = linkBuffer.locationOf(info.m_replacementDestination, NoPtrTag); 355 355 HandlerInfo newExceptionHandler = m_exceptionHandlerOSRExitCallSites[i].baselineExceptionHandler; 356 356 CallSiteIndex callSite = m_exceptionHandlerOSRExitCallSites[i].callSiteIndex; … … 505 505 emitStoreCodeOrigin(CodeOrigin(0)); 506 506 move(GPRInfo::returnValueGPR, GPRInfo::argumentGPR0); 507 m_callArityFixup = call( );507 m_callArityFixup = call(NoPtrTag); 508 508 jump(fromArityCheck); 509 509 … … 535 535 disassemble(*linkBuffer); 536 536 537 MacroAssemblerCodePtr withArityCheck = linkBuffer->locationOf(m_arityCheck );537 MacroAssemblerCodePtr withArityCheck = linkBuffer->locationOf(m_arityCheck, NoPtrTag); 538 538 539 539 m_graph.m_plan.finalizer = std::make_unique<JITFinalizer>( … … 575 575 RELEASE_ASSERT(basicBlock.isCatchEntrypoint); 576 576 RELEASE_ASSERT(basicBlock.intersectionOfCFAHasVisited); // An entrypoint is reachable by definition. 577 m_jitCode->common.appendCatchEntrypoint(basicBlock.bytecodeBegin, linkBuffer.locationOf(blockHead ).executableAddress(), WTFMove(argumentFormats));577 m_jitCode->common.appendCatchEntrypoint(basicBlock.bytecodeBegin, linkBuffer.locationOf(blockHead, NoPtrTag).executableAddress(), WTFMove(argumentFormats)); 578 578 } 579 579 -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h
r221196 r229609 159 159 Call appendCall(const FunctionPtr& function) 160 160 { 161 Call functionCall = call( );161 Call functionCall = call(NoPtrTag); 162 162 m_calls.append(CallLinkRecord(functionCall, function)); 163 163 return functionCall; -
trunk/Source/JavaScriptCore/dfg/DFGJITFinalizer.cpp
r229054 r229609 1 1 /* 2 * Copyright (C) 2013 , 2015-2016Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 58 58 { 59 59 m_jitCode->initializeCodeRef( 60 FINALIZE_DFG_CODE(*m_linkBuffer, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()),60 FINALIZE_DFG_CODE(*m_linkBuffer, NoPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()), 61 61 MacroAssemblerCodePtr()); 62 62 … … 72 72 RELEASE_ASSERT(!m_withArityCheck.isEmptyValue()); 73 73 m_jitCode->initializeCodeRef( 74 FINALIZE_DFG_CODE(*m_linkBuffer, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()),74 FINALIZE_DFG_CODE(*m_linkBuffer, NoPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::DFGJIT)).data()), 75 75 m_withArityCheck); 76 76 m_plan.codeBlock->setJITCode(m_jitCode.copyRef()); -
trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
r229391 r229609 1001 1001 break; 1002 1002 } 1003 jit.call(GPRInfo::nonArgGPR0 );1003 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 1004 1004 jit.storeCell(GPRInfo::returnValueGPR, AssemblyHelpers::addressFor(operand)); 1005 1005 … … 1070 1070 exit.m_code = FINALIZE_CODE_IF( 1071 1071 shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseDFGOSRExit(), 1072 patchBuffer, 1072 patchBuffer, NoPtrTag, 1073 1073 "DFG OSR exit #%u (%s, %s) from %s, with operands = %s", 1074 1074 exitIndex, toCString(exit.m_codeOrigin).data(), -
trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp
r229391 r229609 111 111 #endif 112 112 jit.move(AssemblyHelpers::TrustedImmPtr(bitwise_cast<void*>(triggerReoptimizationNow)), GPRInfo::nonArgGPR0); 113 jit.call(GPRInfo::nonArgGPR0 );113 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 114 114 AssemblyHelpers::Jump doneAdjusting = jit.jump(); 115 115 … … 264 264 jit.setupArguments<decltype(operationOSRWriteBarrier)>(owner); 265 265 jit.move(MacroAssembler::TrustedImmPtr(reinterpret_cast<void*>(operationOSRWriteBarrier)), scratch); 266 jit.call(scratch );266 jit.call(scratch, NoPtrTag); 267 267 268 268 #if CPU(X86) … … 319 319 320 320 jit.move(AssemblyHelpers::TrustedImmPtr(jumpTarget), GPRInfo::regT2); 321 jit.jump(GPRInfo::regT2 );321 jit.jump(GPRInfo::regT2, NoPtrTag); 322 322 } 323 323 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r229545 r229609 9890 9890 m_jit.xor64(poisonScratch, scratch); 9891 9891 #endif 9892 m_jit.jump(scratch );9892 m_jit.jump(scratch, NoPtrTag); 9893 9893 data->didUseJumpTable = true; 9894 9894 } … … 9928 9928 callOperation(operationFindSwitchImmTargetForDouble, scratch, valueRegs.gpr(), data->switchTableIndex); 9929 9929 silentFillAllRegisters(); 9930 m_jit.jump(scratch );9930 m_jit.jump(scratch, NoPtrTag); 9931 9931 #else 9932 9932 JITCompiler::Jump notInt = m_jit.branch32( … … 9943 9943 silentFillAllRegisters(); 9944 9944 9945 m_jit.jump(scratch );9945 m_jit.jump(scratch, NoPtrTag); 9946 9946 #endif 9947 9947 noResult(node, UseChildrenCalledExplicitly); … … 10207 10207 operationSwitchString, string, static_cast<size_t>(data->switchTableIndex), string); 10208 10208 m_jit.exceptionCheck(); 10209 m_jit.jump(string );10209 m_jit.jump(string, NoPtrTag); 10210 10210 return; 10211 10211 } … … 10245 10245 silentFillAllRegisters(); 10246 10246 m_jit.exceptionCheck(); 10247 m_jit.jump(string );10247 m_jit.jump(string, NoPtrTag); 10248 10248 } 10249 10249 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r229514 r229609 5683 5683 } 5684 5684 m_jit.emitRestoreCalleeSaves(); 5685 m_jit.jump(tempGPR );5685 m_jit.jump(tempGPR, NoPtrTag); 5686 5686 }); 5687 5687 break; -
trunk/Source/JavaScriptCore/dfg/DFGThunks.cpp
r229087 r229609 46 46 jit.probe(OSRExit::executeOSRExit, vm); 47 47 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 48 return FINALIZE_CODE(patchBuffer, "DFG OSR exit thunk");48 return FINALIZE_CODE(patchBuffer, NoPtrTag, "DFG OSR exit thunk"); 49 49 } 50 50 … … 83 83 #endif 84 84 85 MacroAssembler::Call functionCall = jit.call( );85 MacroAssembler::Call functionCall = jit.call(NoPtrTag); 86 86 87 87 jit.move(MacroAssembler::TrustedImmPtr(scratchBuffer->addressOfActiveLength()), GPRInfo::regT0); … … 99 99 #endif 100 100 } 101 102 jit.jump(MacroAssembler::AbsoluteAddress(&vm->osrExitJumpDestination) );103 101 102 jit.jump(MacroAssembler::AbsoluteAddress(&vm->osrExitJumpDestination), NoPtrTag); 103 104 104 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 105 105 106 patchBuffer.link(functionCall, OSRExit::compileOSRExit );106 patchBuffer.link(functionCall, OSRExit::compileOSRExit, NoPtrTag); 107 107 108 return FINALIZE_CODE(patchBuffer, "DFG OSR exit generation thunk");108 return FINALIZE_CODE(patchBuffer, NoPtrTag, "DFG OSR exit generation thunk"); 109 109 } 110 110 … … 144 144 jit.emitMaterializeTagCheckRegisters(); 145 145 146 jit.jump(GPRInfo::regT1 );146 jit.jump(GPRInfo::regT1, NoPtrTag); 147 147 148 148 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 149 return FINALIZE_CODE(patchBuffer, "DFG OSR entry thunk");149 return FINALIZE_CODE(patchBuffer, NoPtrTag, "DFG OSR entry thunk"); 150 150 } 151 151 -
trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp
r225524 r229609 135 135 jit.move(MacroAssembler::TrustedImmPtr(&vm), GPRInfo::argumentGPR0); 136 136 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1); 137 CCallHelpers::Call call = jit.call( );137 CCallHelpers::Call call = jit.call(NoPtrTag); 138 138 jit.jumpToExceptionHandler(vm); 139 139 jit.addLinkTask( -
trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp
r229054 r229609 76 76 jitCode->initializeB3Code( 77 77 FINALIZE_CODE_IF( 78 dumpDisassembly, *b3CodeLinkBuffer, 78 dumpDisassembly, *b3CodeLinkBuffer, CodeEntryPtrTag, 79 79 "FTL B3 code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data())); 80 80 … … 82 82 jitCode->initializeArityCheckEntrypoint( 83 83 FINALIZE_CODE_IF( 84 dumpDisassembly, *entrypointLinkBuffer, 84 dumpDisassembly, *entrypointLinkBuffer, CodeEntryWithArityCheckPtrTag, 85 85 "FTL entrypoint thunk for %s with B3 generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock, JITCode::FTLJIT)).data(), function)); 86 86 } -
trunk/Source/JavaScriptCore/ftl/FTLLazySlowPath.cpp
r229054 r229609 68 68 if (m_exceptionTarget) 69 69 linkBuffer.link(exceptionJumps, m_exceptionTarget); 70 m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, "Lazy slow path call stub");70 m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, NoPtrTag, "Lazy slow path call stub"); 71 71 72 72 MacroAssembler::repatchJump(m_patchableJump, CodeLocationLabel(m_stub.code())); -
trunk/Source/JavaScriptCore/ftl/FTLLink.cpp
r225363 r229609 141 141 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 142 142 jit.storePtr(GPRInfo::callFrameRegister, &vm.topCallFrame); 143 CCallHelpers::Call callArityCheck = jit.call( );143 CCallHelpers::Call callArityCheck = jit.call(NoPtrTag); 144 144 145 145 auto noException = jit.branch32(CCallHelpers::GreaterThanOrEqual, GPRInfo::returnValueGPR, CCallHelpers::TrustedImm32(0)); … … 147 147 jit.move(CCallHelpers::TrustedImmPtr(&vm), GPRInfo::argumentGPR0); 148 148 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1); 149 CCallHelpers::Call callLookupExceptionHandlerFromCallerFrame = jit.call( );149 CCallHelpers::Call callLookupExceptionHandlerFromCallerFrame = jit.call(NoPtrTag); 150 150 jit.jumpToExceptionHandler(vm); 151 151 noException.link(&jit); … … 160 160 mainPathJumps.append(jit.branchTest32(CCallHelpers::Zero, GPRInfo::argumentGPR0)); 161 161 jit.emitFunctionPrologue(); 162 CCallHelpers::Call callArityFixup = jit.call( );162 CCallHelpers::Call callArityFixup = jit.call(NoPtrTag); 163 163 jit.emitFunctionEpilogue(); 164 164 mainPathJumps.append(jit.jump()); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r229518 r229609 287 287 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 288 288 jit.move(CCallHelpers::TrustedImmPtr(jit.codeBlock()), GPRInfo::argumentGPR1); 289 CCallHelpers::Call throwCall = jit.call( );289 CCallHelpers::Call throwCall = jit.call(NoPtrTag); 290 290 291 291 jit.move(CCallHelpers::TrustedImmPtr(vm), GPRInfo::argumentGPR0); 292 292 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1); 293 CCallHelpers::Call lookupExceptionHandlerCall = jit.call( );293 CCallHelpers::Call lookupExceptionHandlerCall = jit.call(NoPtrTag); 294 294 jit.jumpToExceptionHandler(*vm); 295 295 … … 7637 7637 auto callWithExceptionCheck = [&] (void* callee) { 7638 7638 jit.move(CCallHelpers::TrustedImmPtr(callee), GPRInfo::nonPreservedNonArgumentGPR); 7639 jit.call(GPRInfo::nonPreservedNonArgumentGPR );7639 jit.call(GPRInfo::nonPreservedNonArgumentGPR, NoPtrTag); 7640 7640 exceptions->append(jit.emitExceptionCheck(*vm, AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth)); 7641 7641 }; … … 7976 7976 auto callWithExceptionCheck = [&] (void* callee) { 7977 7977 jit.move(CCallHelpers::TrustedImmPtr(callee), GPRInfo::nonPreservedNonArgumentGPR); 7978 jit.call(GPRInfo::nonPreservedNonArgumentGPR );7978 jit.call(GPRInfo::nonPreservedNonArgumentGPR, NoPtrTag); 7979 7979 exceptions->append(jit.emitExceptionCheck(*vm, AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth)); 7980 7980 }; … … 8164 8164 jit.setupArguments<decltype(operationCallEval)>(GPRInfo::regT1); 8165 8165 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(operationCallEval)), GPRInfo::nonPreservedNonArgumentGPR); 8166 jit.call(GPRInfo::nonPreservedNonArgumentGPR );8166 jit.call(GPRInfo::nonPreservedNonArgumentGPR, NoPtrTag); 8167 8167 exceptions->append(jit.emitExceptionCheck(state->vm(), AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth)); 8168 8168 -
trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
r229391 r229609 340 340 CCallHelpers::TrustedImmPtr(materializationArguments)); 341 341 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(operationMaterializeObjectInOSR)), GPRInfo::nonArgGPR0); 342 jit.call(GPRInfo::nonArgGPR0 );342 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 343 343 jit.storePtr(GPRInfo::returnValueGPR, materializationToPointer.get(materialization)); 344 344 … … 368 368 CCallHelpers::TrustedImmPtr(materializationArguments)); 369 369 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(operationPopulateObjectInOSR)), GPRInfo::nonArgGPR0); 370 jit.call(GPRInfo::nonArgGPR0 );370 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 371 371 } 372 372 … … 495 495 exit.m_code = FINALIZE_CODE_IF( 496 496 shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit(), 497 patchBuffer, 497 patchBuffer, NoPtrTag, 498 498 "FTL OSR exit #%u (%s, %s) from %s, with operands = %s", 499 499 exitID, toCString(exit.m_codeOrigin).data(), … … 542 542 543 543 prepareCodeOriginForOSRExit(exec, exit.m_codeOrigin); 544 544 545 545 compileStub(exitID, jitCode, exit, &vm, codeBlock); 546 546 -
trunk/Source/JavaScriptCore/ftl/FTLSlowPathCall.cpp
r214571 r229609 121 121 SlowPathCall SlowPathCallContext::makeCall(VM& vm, void* callTarget) 122 122 { 123 SlowPathCall result = SlowPathCall(m_jit.call( ), keyWithTarget(callTarget));123 SlowPathCall result = SlowPathCall(m_jit.call(NoPtrTag), keyWithTarget(callTarget)); 124 124 125 125 m_jit.addLinkTask( -
trunk/Source/JavaScriptCore/ftl/FTLThunks.cpp
r229087 r229609 87 87 GPRInfo::argumentGPR1, 88 88 (stackMisalignment - MacroAssembler::pushToSaveByteOffset()) / sizeof(void*)); 89 MacroAssembler::Call functionCall = jit.call( );89 MacroAssembler::Call functionCall = jit.call(NoPtrTag); 90 90 91 91 // At this point we want to make a tail call to what was returned to us in the … … 120 120 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 121 121 patchBuffer.link(functionCall, generationFunction); 122 return FINALIZE_CODE(patchBuffer, "%s", name);122 return FINALIZE_CODE(patchBuffer, NoPtrTag, "%s", name); 123 123 } 124 124 … … 127 127 unsigned extraPopsToRestore = 0; 128 128 return genericGenerationThunkGenerator( 129 vm, compileFTLOSRExit, "FTL OSR exit generation thunk", extraPopsToRestore, FrameAndStackAdjustmentRequirement::Needed);129 vm, FunctionPtr(compileFTLOSRExit, NoPtrTag), "FTL OSR exit generation thunk", extraPopsToRestore, FrameAndStackAdjustmentRequirement::Needed); 130 130 } 131 131 … … 134 134 unsigned extraPopsToRestore = 1; 135 135 return genericGenerationThunkGenerator( 136 vm, compileFTLLazySlowPath, "FTL lazy slow path generation thunk", extraPopsToRestore, FrameAndStackAdjustmentRequirement::NotNeeded);136 vm, FunctionPtr(compileFTLLazySlowPath, NoPtrTag), "FTL lazy slow path generation thunk", extraPopsToRestore, FrameAndStackAdjustmentRequirement::NotNeeded); 137 137 } 138 138 … … 198 198 registerClobberCheck(jit, key.argumentRegisters()); 199 199 200 AssemblyHelpers::Call call = jit.call( );200 AssemblyHelpers::Call call = jit.call(NoPtrTag); 201 201 202 202 jit.loadPtr(AssemblyHelpers::Address(MacroAssembler::stackPointerRegister, key.offset()), GPRInfo::nonPreservedNonReturnGPR); … … 225 225 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 226 226 patchBuffer.link(call, FunctionPtr(key.callTarget())); 227 return FINALIZE_CODE(patchBuffer, "FTL slow path call thunk for %s", toCString(key).data());227 return FINALIZE_CODE(patchBuffer, NoPtrTag, "FTL slow path call thunk for %s", toCString(key).data()); 228 228 } 229 229 -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp
r229391 r229609 347 347 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 348 348 #endif 349 move(TrustedImmPtr( bitwise_cast<void*>(operationExceptionFuzz)), GPRInfo::nonPreservedNonReturnGPR);350 call(GPRInfo::nonPreservedNonReturnGPR );349 move(TrustedImmPtr(tagCFunctionPtr(operationExceptionFuzz, SlowPathPtrTag)), GPRInfo::nonPreservedNonReturnGPR); 350 call(GPRInfo::nonPreservedNonReturnGPR, SlowPathPtrTag); 351 351 352 352 for (unsigned i = 0; i < FPRInfo::numberOfRegisters; ++i) { … … 941 941 #error "JIT not supported on this platform." 942 942 #endif 943 move(TrustedImmPtr( reinterpret_cast<void*>(function)), scratch);944 call(scratch );943 move(TrustedImmPtr(tagCFunctionPtr(function, SlowPathPtrTag)), scratch); 944 call(scratch, SlowPathPtrTag); 945 945 946 946 move(TrustedImmPtr(scratchBuffer->addressOfActiveLength()), GPRInfo::regT0); -
trunk/Source/JavaScriptCore/jit/CCallHelpers.cpp
r229391 r229609 1 1 /* 2 * Copyright (C) 2016 Apple Inc. All rights reserved.2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 60 60 Jump ok = branchPtr(Below, shadowPacket, TrustedImmPtr(vm.shadowChicken().logEnd())); 61 61 setupArguments<decltype(operationProcessShadowChickenLog)>(); 62 move(TrustedImmPtr( bitwise_cast<void*>(operationProcessShadowChickenLog)), scratch1NonArgGPR);63 call(scratch1NonArgGPR );62 move(TrustedImmPtr(tagCFunctionPtr(operationProcessShadowChickenLog, SlowPathPtrTag)), scratch1NonArgGPR); 63 call(scratch1NonArgGPR, SlowPathPtrTag); 64 64 move(TrustedImmPtr(vm.shadowChicken().addressOfLogCursor()), scratch1NonArgGPR); 65 65 loadPtr(Address(scratch1NonArgGPR), shadowPacket); -
trunk/Source/JavaScriptCore/jit/CCallHelpers.h
r229432 r229609 1 1 /* 2 * Copyright (C) 2011 , 2015-2016Apple Inc. All rights reserved.2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 519 519 // and the address of the handler in vm->targetMachinePCForThrow. 520 520 loadPtr(&vm.targetMachinePCForThrow, GPRInfo::regT1); 521 jump(GPRInfo::regT1 );521 jump(GPRInfo::regT1, ExceptionHandlerPtrTag); 522 522 } 523 523 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r229054 r229609 299 299 // The second is we can't guarantee that the code is readable when using the 300 300 // asyncDisassembly option as our caller will set our pages execute only. 301 return linkBuffer.finalizeCodeWithoutDisassembly( );301 return linkBuffer.finalizeCodeWithoutDisassembly(NoPtrTag); 302 302 } 303 303 #else // CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION) -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r229444 r229609 110 110 skipOptimize.append(branchTestPtr(Zero, returnValueGPR)); 111 111 move(returnValueGPR2, stackPointerRegister); 112 jump(returnValueGPR );112 jump(returnValueGPR, NoPtrTag); 113 113 skipOptimize.link(this); 114 114 } … … 777 777 ASSERT(record.jumpTable.simpleJumpTable->branchOffsets.size() == record.jumpTable.simpleJumpTable->ctiOffsets.size()); 778 778 779 record.jumpTable.simpleJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset] );779 record.jumpTable.simpleJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset], NoPtrTag); 780 780 781 781 for (unsigned j = 0; j < record.jumpTable.simpleJumpTable->branchOffsets.size(); ++j) { 782 782 unsigned offset = record.jumpTable.simpleJumpTable->branchOffsets[j]; 783 record.jumpTable.simpleJumpTable->ctiOffsets[j] = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset] ) : record.jumpTable.simpleJumpTable->ctiDefault;783 record.jumpTable.simpleJumpTable->ctiOffsets[j] = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset], NoPtrTag) : record.jumpTable.simpleJumpTable->ctiDefault; 784 784 } 785 785 } else { 786 786 ASSERT(record.type == SwitchRecord::String); 787 787 788 record.jumpTable.stringJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset]); 789 790 for (auto& location : record.jumpTable.stringJumpTable->offsetTable.values()) { 788 auto* stringJumpTable = record.jumpTable.stringJumpTable; 789 stringJumpTable->ctiDefault = 790 patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset], NoPtrTag); 791 792 for (auto& location : stringJumpTable->offsetTable.values()) { 791 793 unsigned offset = location.branchOffset; 792 location.ctiOffset = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset]) : record.jumpTable.stringJumpTable->ctiDefault; 794 location.ctiOffset = offset 795 ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset], NoPtrTag) 796 : stringJumpTable->ctiDefault; 793 797 } 794 798 } … … 797 801 for (size_t i = 0; i < m_codeBlock->numberOfExceptionHandlers(); ++i) { 798 802 HandlerInfo& handler = m_codeBlock->exceptionHandler(i); 799 handler.nativeCode = patchBuffer.locationOf(m_labels[handler.target] );803 handler.nativeCode = patchBuffer.locationOf(m_labels[handler.target], ExceptionHandlerPtrTag); 800 804 } 801 805 802 806 for (auto& record : m_calls) { 803 807 if (record.to) 804 patchBuffer.link(record.from, FunctionPtr(record.to ));808 patchBuffer.link(record.from, FunctionPtr(record.to, SlowPathPtrTag)); 805 809 } 806 810 … … 813 817 814 818 if (m_byValCompilationInfo.size()) { 815 CodeLocationLabel exceptionHandler = patchBuffer.locationOf(m_exceptionHandler );819 CodeLocationLabel exceptionHandler = patchBuffer.locationOf(m_exceptionHandler, ExceptionHandlerPtrTag); 816 820 817 821 for (const auto& byValCompilationInfo : m_byValCompilationInfo) { … … 821 825 notIndexJump = CodeLocationJump(patchBuffer.locationOf(patchableNotIndexJump)); 822 826 CodeLocationJump badTypeJump = CodeLocationJump(patchBuffer.locationOf(byValCompilationInfo.badTypeJump)); 823 CodeLocationLabel doneTarget = patchBuffer.locationOf(byValCompilationInfo.doneTarget );824 CodeLocationLabel nextHotPathTarget = patchBuffer.locationOf(byValCompilationInfo.nextHotPathTarget );825 CodeLocationLabel slowPathTarget = patchBuffer.locationOf(byValCompilationInfo.slowPathTarget );827 CodeLocationLabel doneTarget = patchBuffer.locationOf(byValCompilationInfo.doneTarget, NoPtrTag); 828 CodeLocationLabel nextHotPathTarget = patchBuffer.locationOf(byValCompilationInfo.nextHotPathTarget, NoPtrTag); 829 CodeLocationLabel slowPathTarget = patchBuffer.locationOf(byValCompilationInfo.slowPathTarget, NoPtrTag); 826 830 CodeLocationCall returnAddress = patchBuffer.locationOf(byValCompilationInfo.returnAddress); 827 831 … … 856 860 MacroAssemblerCodePtr withArityCheck; 857 861 if (m_codeBlock->codeType() == FunctionCode) 858 withArityCheck = patchBuffer.locationOf(m_arityCheck );862 withArityCheck = patchBuffer.locationOf(m_arityCheck, CodeEntryWithArityCheckPtrTag); 859 863 860 864 if (Options::dumpDisassembly()) { … … 872 876 873 877 CodeRef result = FINALIZE_CODE( 874 patchBuffer, 878 patchBuffer, CodeEntryPtrTag, 875 879 "Baseline JIT code for %s", toCString(CodeBlockWithJITType(m_codeBlock, JITCode::BaselineJIT)).data()); 876 880 … … 914 918 poke(GPRInfo::argumentGPR1, 1); 915 919 #endif 916 m_calls.append(CallRecord(call( ), std::numeric_limits<unsigned>::max(), FunctionPtr(lookupExceptionHandlerFromCallerFrame).value()));920 m_calls.append(CallRecord(call(SlowPathPtrTag), std::numeric_limits<unsigned>::max(), FunctionPtr(lookupExceptionHandlerFromCallerFrame, SlowPathPtrTag).value())); 917 921 jumpToExceptionHandler(*vm()); 918 922 } … … 933 937 poke(GPRInfo::argumentGPR1, 1); 934 938 #endif 935 m_calls.append(CallRecord(call( ), std::numeric_limits<unsigned>::max(), FunctionPtr(lookupExceptionHandler).value()));939 m_calls.append(CallRecord(call(SlowPathPtrTag), std::numeric_limits<unsigned>::max(), FunctionPtr(lookupExceptionHandler, SlowPathPtrTag).value())); 936 940 jumpToExceptionHandler(*vm()); 937 941 } -
trunk/Source/JavaScriptCore/jit/JIT.h
r229391 r229609 270 270 Call appendCall(const FunctionPtr& function) 271 271 { 272 Call functionCall = call( );272 Call functionCall = call(NoPtrTag); 273 273 m_calls.append(CallRecord(functionCall, m_bytecodeOffset, function.value())); 274 274 return functionCall; -
trunk/Source/JavaScriptCore/jit/JITMathIC.h
r229054 r229609 140 140 RELEASE_ASSERT(linkBuffer.isValid()); 141 141 linkBuffer.link(jump, CodeLocationLabel(m_code.code())); 142 FINALIZE_CODE(linkBuffer, "JITMathIC: linking constant jump to out of line stub");142 FINALIZE_CODE(linkBuffer, NoPtrTag, "JITMathIC: linking constant jump to out of line stub"); 143 143 }; 144 144 … … 167 167 168 168 m_code = FINALIZE_CODE_FOR( 169 codeBlock, linkBuffer, "JITMathIC: generating out of line fast IC snippet");169 codeBlock, linkBuffer, NoPtrTag, "JITMathIC: generating out of line fast IC snippet"); 170 170 171 171 if (!generationState.shouldSlowPathRepatch) { … … 209 209 210 210 m_code = FINALIZE_CODE_FOR( 211 codeBlock, linkBuffer, "JITMathIC: generating out of line IC snippet");211 codeBlock, linkBuffer, NoPtrTag, "JITMathIC: generating out of line IC snippet"); 212 212 } 213 213 … … 217 217 void finalizeInlineCode(const MathICGenerationState& state, LinkBuffer& linkBuffer) 218 218 { 219 CodeLocationLabel start = linkBuffer.locationOf(state.fastPathStart );219 CodeLocationLabel start = linkBuffer.locationOf(state.fastPathStart, NoPtrTag); 220 220 m_inlineStart = start; 221 221 222 222 m_inlineSize = MacroAssembler::differenceBetweenCodePtr( 223 start, linkBuffer.locationOf(state.fastPathEnd ));223 start, linkBuffer.locationOf(state.fastPathEnd, NoPtrTag)); 224 224 ASSERT(m_inlineSize > 0); 225 225 … … 227 227 start, linkBuffer.locationOf(state.slowPathCall)); 228 228 m_deltaFromStartToSlowPathStart = MacroAssembler::differenceBetweenCodePtr( 229 start, linkBuffer.locationOf(state.slowPathStart ));229 start, linkBuffer.locationOf(state.slowPathStart, SlowPathPtrTag)); 230 230 } 231 231 -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r229391 r229609 573 573 auto skipOSREntry = branchTestPtr(Zero, returnValueGPR); 574 574 emitRestoreCalleeSaves(); 575 jump(returnValueGPR );575 jump(returnValueGPR, NoPtrTag); 576 576 skipOSREntry.link(this); 577 577 if (buffer && shouldEmitProfiling()) { … … 611 611 emitGetVirtualRegister(scrutinee, regT0); 612 612 callOperation(operationSwitchImmWithUnknownKeyType, regT0, tableIndex); 613 jump(returnValueGPR );613 jump(returnValueGPR, NoPtrTag); 614 614 } 615 615 … … 627 627 emitGetVirtualRegister(scrutinee, regT0); 628 628 callOperation(operationSwitchCharWithUnknownKeyType, regT0, tableIndex); 629 jump(returnValueGPR );629 jump(returnValueGPR, NoPtrTag); 630 630 } 631 631 … … 642 642 emitGetVirtualRegister(scrutinee, regT0); 643 643 callOperation(operationSwitchStringWithUnknownKeyType, regT0, tableIndex); 644 jump(returnValueGPR );644 jump(returnValueGPR, NoPtrTag); 645 645 } 646 646 … … 878 878 ok.link(this); 879 879 } 880 jump(returnValueGPR );880 jump(returnValueGPR, NoPtrTag); 881 881 noOptimizedEntry.link(this); 882 882 … … 1082 1082 1083 1083 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1084 m_codeBlock, patchBuffer, 1084 m_codeBlock, patchBuffer, NoPtrTag, 1085 1085 "Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1086 1086 1087 1087 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); 1088 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationHasIndexedPropertyGeneric ));1088 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationHasIndexedPropertyGeneric, SlowPathPtrTag)); 1089 1089 } 1090 1090 -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r229391 r229609 739 739 auto skipOSREntry = branchTestPtr(Zero, returnValueGPR); 740 740 emitRestoreCalleeSaves(); 741 jump(returnValueGPR );741 jump(returnValueGPR, NoPtrTag); 742 742 skipOSREntry.link(this); 743 743 if (buffer && shouldEmitProfiling()) { … … 777 777 emitLoad(scrutinee, regT1, regT0); 778 778 callOperation(operationSwitchImmWithUnknownKeyType, JSValueRegs(regT1, regT0), tableIndex); 779 jump(returnValueGPR );779 jump(returnValueGPR, NoPtrTag); 780 780 } 781 781 … … 793 793 emitLoad(scrutinee, regT1, regT0); 794 794 callOperation(operationSwitchCharWithUnknownKeyType, JSValueRegs(regT1, regT0), tableIndex); 795 jump(returnValueGPR );795 jump(returnValueGPR, NoPtrTag); 796 796 } 797 797 … … 808 808 emitLoad(scrutinee, regT1, regT0); 809 809 callOperation(operationSwitchStringWithUnknownKeyType, JSValueRegs(regT1, regT0), tableIndex); 810 jump(returnValueGPR );810 jump(returnValueGPR, NoPtrTag); 811 811 } 812 812 … … 933 933 934 934 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 935 m_codeBlock, patchBuffer, 935 m_codeBlock, patchBuffer, NoPtrTag, 936 936 "Baseline has_indexed_property stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 937 937 938 938 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); 939 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationHasIndexedPropertyGeneric ));939 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationHasIndexedPropertyGeneric, SlowPathPtrTag)); 940 940 } 941 941 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r229518 r229609 91 91 92 92 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 93 return FINALIZE_CODE(patchBuffer, "String get_by_val stub");93 return FINALIZE_CODE(patchBuffer, NoPtrTag, "String get_by_val stub"); 94 94 } 95 95 … … 1266 1266 1267 1267 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1268 m_codeBlock, patchBuffer, 1268 m_codeBlock, patchBuffer, NoPtrTag, 1269 1269 "Baseline get_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1270 1270 1271 1271 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); 1272 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationGetByValGeneric ));1272 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationGetByValGeneric, SlowPathPtrTag)); 1273 1273 } 1274 1274 … … 1293 1293 for (const auto& callSite : m_calls) { 1294 1294 if (callSite.to) 1295 patchBuffer.link(callSite.from, FunctionPtr(callSite.to ));1295 patchBuffer.link(callSite.from, FunctionPtr(callSite.to, SlowPathPtrTag)); 1296 1296 } 1297 1297 gen.finalize(patchBuffer); 1298 1298 1299 1299 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1300 m_codeBlock, patchBuffer, 1300 m_codeBlock, patchBuffer, NoPtrTag, 1301 1301 "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()); 1302 1302 byValInfo->stubInfo = gen.stubInfo(); 1303 1303 1304 1304 MacroAssembler::repatchJump(byValInfo->notIndexJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); 1305 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationGetByValGeneric ));1305 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(operationGetByValGeneric, SlowPathPtrTag)); 1306 1306 } 1307 1307 … … 1347 1347 if (needsLinkForWriteBarrier) { 1348 1348 ASSERT(m_calls.last().to == operationWriteBarrierSlowPath); 1349 patchBuffer.link(m_calls.last().from, operationWriteBarrierSlowPath );1349 patchBuffer.link(m_calls.last().from, operationWriteBarrierSlowPath, SlowPathPtrTag); 1350 1350 } 1351 1351 … … 1353 1353 if (!isDirect) { 1354 1354 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1355 m_codeBlock, patchBuffer, 1355 m_codeBlock, patchBuffer, NoPtrTag, 1356 1356 "Baseline put_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1357 1357 1358 1358 } else { 1359 1359 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1360 m_codeBlock, patchBuffer, 1360 m_codeBlock, patchBuffer, NoPtrTag, 1361 1361 "Baseline put_by_val_direct stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()); 1362 1362 } 1363 1363 MacroAssembler::repatchJump(byValInfo->badTypeJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); 1364 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(isDirect ? operationDirectPutByValGeneric : operationPutByValGeneric ));1364 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(isDirect ? operationDirectPutByValGeneric : operationPutByValGeneric, SlowPathPtrTag)); 1365 1365 } 1366 1366 … … 1383 1383 for (const auto& callSite : m_calls) { 1384 1384 if (callSite.to) 1385 patchBuffer.link(callSite.from, FunctionPtr(callSite.to ));1385 patchBuffer.link(callSite.from, FunctionPtr(callSite.to, SlowPathPtrTag)); 1386 1386 } 1387 1387 gen.finalize(patchBuffer); 1388 1388 1389 1389 byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB( 1390 m_codeBlock, patchBuffer, 1390 m_codeBlock, patchBuffer, NoPtrTag, 1391 1391 "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()); 1392 1392 byValInfo->stubInfo = gen.stubInfo(); 1393 1393 1394 1394 MacroAssembler::repatchJump(byValInfo->notIndexJump, CodeLocationLabel(byValInfo->stubRoutine->code().code())); 1395 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(putKind == Direct ? operationDirectPutByValGeneric : operationPutByValGeneric ));1395 MacroAssembler::repatchCall(CodeLocationCall(MacroAssemblerCodePtr(returnAddress)), FunctionPtr(putKind == Direct ? operationDirectPutByValGeneric : operationPutByValGeneric, SlowPathPtrTag)); 1396 1396 } 1397 1397 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r229518 r229609 179 179 180 180 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 181 return FINALIZE_CODE(patchBuffer, "String get_by_val stub");181 return FINALIZE_CODE(patchBuffer, NoPtrTag, "String get_by_val stub"); 182 182 } 183 183 -
trunk/Source/JavaScriptCore/jit/JITStubRoutine.h
r229054 r229609 115 115 116 116 // Helper for the creation of simple stub routines that need no help from the GC. 117 #define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, ...) \118 (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), __VA_ARGS__))))117 #define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, resultPtrTag, ...) \ 118 (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), (resultPtrTag), __VA_ARGS__)))) 119 119 120 120 } // namespace JSC -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r229413 r229609 74 74 return FunctionPtr(codeBlock->vm()->ftlThunks->keyForSlowPathCallThunk( 75 75 MacroAssemblerCodePtr::createFromExecutableAddress( 76 result.executableAddress())).callTarget() );76 result.executableAddress())).callTarget(), CodeEntryPtrTag); 77 77 } 78 78 #else … … 387 387 static V_JITOperation_ESsiJJI appropriateOptimizingPutByIdFunction(const PutPropertySlot &slot, PutKind putKind) 388 388 { 389 if (slot.isStrictMode()) { 389 auto pickSlowPath = [&] () -> V_JITOperation_ESsiJJI { 390 if (slot.isStrictMode()) { 391 if (putKind == Direct) 392 return operationPutByIdDirectStrictOptimize; 393 return operationPutByIdStrictOptimize; 394 } 390 395 if (putKind == Direct) 391 return operationPutByIdDirectStrictOptimize; 392 return operationPutByIdStrictOptimize; 393 } 394 if (putKind == Direct) 395 return operationPutByIdDirectNonStrictOptimize; 396 return operationPutByIdNonStrictOptimize; 396 return operationPutByIdDirectNonStrictOptimize; 397 return operationPutByIdNonStrictOptimize; 398 }; 399 return tagCFunctionPtr(pickSlowPath(), SlowPathPtrTag); 397 400 } 398 401 … … 1069 1072 bool isTailCall = callToCodePtr.call.isFlagSet(CCallHelpers::Call::Tail); 1070 1073 patchBuffer.link( 1071 callToCodePtr.call, FunctionPtr( isTailCall ? callToCodePtr.codePtr.dataLocation() : callToCodePtr.codePtr.executableAddress()));1074 callToCodePtr.call, FunctionPtr(tagCodePtr(isTailCall ? callToCodePtr.codePtr.dataLocation() : callToCodePtr.codePtr.executableAddress(), CodeEntryPtrTag))); 1072 1075 } 1073 1076 if (isWebAssembly || JITCode::isOptimizingJIT(callerCodeBlock->jitType())) … … 1079 1082 auto stubRoutine = adoptRef(*new PolymorphicCallStubRoutine( 1080 1083 FINALIZE_CODE_FOR( 1081 callerCodeBlock, patchBuffer, 1084 callerCodeBlock, patchBuffer, NoPtrTag, 1082 1085 "Polymorphic call stub for %s, return point %p, targets %s", 1083 1086 isWebAssembly ? "WebAssembly" : toCString(*callerCodeBlock).data(), callLinkInfo.callReturnLocation().labelAtOffset(0).executableAddress(), … … 1125 1128 } 1126 1129 1127 ftlThunkAwareRepatchCall(codeBlock, stubInfo.slowPathCallLocation(), optimizedFunction);1130 ftlThunkAwareRepatchCall(codeBlock, stubInfo.slowPathCallLocation(), tagCFunctionPtr(optimizedFunction, SlowPathPtrTag)); 1128 1131 InlineAccess::rewireStubAsJump(stubInfo, stubInfo.slowPathStartLocation()); 1129 1132 } -
trunk/Source/JavaScriptCore/jit/SlowPathCall.h
r224626 r229609 62 62 m_jit->move(JIT::TrustedImmPtr(m_pc), JIT::argumentGPR1); 63 63 #endif 64 JIT::Call call = m_jit->call( );64 JIT::Call call = m_jit->call(NoPtrTag); 65 65 m_jit->m_calls.append(CallRecord(call, m_jit->m_bytecodeOffset, m_stub.value())); 66 66 -
trunk/Source/JavaScriptCore/jit/SpecializedThunkJIT.h
r229054 r229609 171 171 for (unsigned i = 0; i < m_calls.size(); i++) 172 172 patchBuffer.link(m_calls[i].first, m_calls[i].second); 173 return FINALIZE_CODE(patchBuffer, "Specialized thunk for %s", thunkKind);173 return FINALIZE_CODE(patchBuffer, NoPtrTag, "Specialized thunk for %s", thunkKind); 174 174 } 175 175 … … 178 178 void callDoubleToDouble(FunctionPtr function) 179 179 { 180 m_calls.append(std::make_pair(call( ), function));180 m_calls.append(std::make_pair(call(SlowPathPtrTag), function)); 181 181 } 182 182 -
trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp
r229391 r229609 72 72 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(lookupExceptionHandler)), GPRInfo::nonArgGPR0); 73 73 emitPointerValidation(jit, GPRInfo::nonArgGPR0); 74 jit.call(GPRInfo::nonArgGPR0 );74 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 75 75 jit.jumpToExceptionHandler(*vm); 76 76 77 77 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 78 return FINALIZE_CODE(patchBuffer, "Throw exception from call slow path thunk");78 return FINALIZE_CODE(patchBuffer, NoPtrTag, "Throw exception from call slow path thunk"); 79 79 } 80 80 … … 96 96 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(slowPathFunction)), GPRInfo::nonArgGPR0); 97 97 emitPointerValidation(jit, GPRInfo::nonArgGPR0); 98 jit.call(GPRInfo::nonArgGPR0 );98 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 99 99 jit.loadPtr(CCallHelpers::Address(GPRInfo::returnValueGPR, 8), GPRInfo::returnValueGPR2); 100 100 jit.loadPtr(CCallHelpers::Address(GPRInfo::returnValueGPR), GPRInfo::returnValueGPR); … … 106 106 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(slowPathFunction)), GPRInfo::nonArgGPR0); 107 107 emitPointerValidation(jit, GPRInfo::nonArgGPR0); 108 jit.call(GPRInfo::nonArgGPR0 );108 jit.call(GPRInfo::nonArgGPR0, NoPtrTag); 109 109 if (maxFrameExtentForSlowPathCall) 110 110 jit.addPtr(CCallHelpers::TrustedImm32(maxFrameExtentForSlowPathCall), CCallHelpers::stackPointerRegister); … … 127 127 128 128 doNotTrash.link(&jit); 129 jit.jump(GPRInfo::returnValueGPR );129 jit.jump(GPRInfo::returnValueGPR, NoPtrTag); 130 130 } 131 131 … … 142 142 143 143 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 144 return FINALIZE_CODE(patchBuffer, "Link call slow path thunk");144 return FINALIZE_CODE(patchBuffer, NoPtrTag, "Link call slow path thunk"); 145 145 } 146 146 … … 154 154 155 155 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 156 return FINALIZE_CODE(patchBuffer, "Link polymorphic call slow path thunk");156 return FINALIZE_CODE(patchBuffer, NoPtrTag, "Link polymorphic call slow path thunk"); 157 157 } 158 158 … … 227 227 jit.prepareForTailCallSlow(GPRInfo::regT4); 228 228 } 229 jit.jump(GPRInfo::regT4 );229 jit.jump(GPRInfo::regT4, NoPtrTag); 230 230 231 231 notJSFunction.link(&jit); … … 237 237 238 238 // Here we don't know anything, so revert to the full slow path. 239 240 239 slowPathFor(jit, vm, operationVirtualCall); 241 240 242 241 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 243 242 return FINALIZE_CODE( 244 patchBuffer, 243 patchBuffer, NoPtrTag, 245 244 "Virtual %s slow path thunk", 246 245 callLinkInfo.callMode() == CallMode::Regular ? "call" : callLinkInfo.callMode() == CallMode::Tail ? "tail call" : "construct"); … … 295 294 jit.loadPtr(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, JSFunction::offsetOfExecutable()), JSInterfaceJIT::regT1); 296 295 jit.xorPtr(JSInterfaceJIT::TrustedImmPtr(JSFunctionPoison::key()), JSInterfaceJIT::regT1); 297 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, executableOffsetToFunction) );296 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, executableOffsetToFunction), NoPtrTag); 298 297 } else 299 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, InternalFunction::offsetOfNativeFunctionFor(kind)) );298 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT1, InternalFunction::offsetOfNativeFunctionFor(kind)), NoPtrTag); 300 299 301 300 jit.addPtr(JSInterfaceJIT::TrustedImm32(8), JSInterfaceJIT::stackPointerRegister); … … 316 315 jit.move(JSInterfaceJIT::TrustedImm64(NativeCodePoison::key()), X86Registers::esi); 317 316 jit.xor64(X86Registers::esi, X86Registers::r9); 318 jit.call(X86Registers::r9 );317 jit.call(X86Registers::r9, NoPtrTag); 319 318 320 319 #else … … 331 330 jit.loadPtr(JSInterfaceJIT::Address(X86Registers::edx, JSFunction::offsetOfExecutable()), X86Registers::r9); 332 331 jit.xorPtr(JSInterfaceJIT::TrustedImmPtr(JSFunctionPoison::key()), X86Registers::r9); 333 jit.call(JSInterfaceJIT::Address(X86Registers::r9, executableOffsetToFunction) );332 jit.call(JSInterfaceJIT::Address(X86Registers::r9, executableOffsetToFunction), NoPtrTag); 334 333 } else 335 jit.call(JSInterfaceJIT::Address(X86Registers::edx, InternalFunction::offsetOfNativeFunctionFor(kind)) );334 jit.call(JSInterfaceJIT::Address(X86Registers::edx, InternalFunction::offsetOfNativeFunctionFor(kind)), NoPtrTag); 336 335 337 336 jit.addPtr(JSInterfaceJIT::TrustedImm32(4 * sizeof(int64_t)), JSInterfaceJIT::stackPointerRegister); … … 355 354 jit.move(JSInterfaceJIT::TrustedImm64(NativeCodePoison::key()), ARM64Registers::x1); 356 355 jit.xor64(ARM64Registers::x1, ARM64Registers::x2); 357 jit.call(ARM64Registers::x2 );356 jit.call(ARM64Registers::x2, NoPtrTag); 358 357 359 358 #elif CPU(ARM) || CPU(MIPS) … … 371 370 jit.loadPtr(JSInterfaceJIT::Address(JSInterfaceJIT::argumentGPR1, JSFunction::offsetOfExecutable()), JSInterfaceJIT::regT2); 372 371 jit.xorPtr(JSInterfaceJIT::TrustedImmPtr(JSFunctionPoison::key()), JSInterfaceJIT::regT2); 373 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT2, executableOffsetToFunction) );372 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::regT2, executableOffsetToFunction), NoPtrTag); 374 373 } else 375 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::argumentGPR1, InternalFunction::offsetOfNativeFunctionFor(kind)) );374 jit.call(JSInterfaceJIT::Address(JSInterfaceJIT::argumentGPR1, InternalFunction::offsetOfNativeFunctionFor(kind)), NoPtrTag); 376 375 377 376 #if CPU(MIPS) … … 417 416 jit.move(JSInterfaceJIT::callFrameRegister, JSInterfaceJIT::argumentGPR0); 418 417 #endif 419 jit.move(JSInterfaceJIT::TrustedImmPtr(FunctionPtr(operationVMHandleException ).value()), JSInterfaceJIT::regT3);420 jit.call(JSInterfaceJIT::regT3 );418 jit.move(JSInterfaceJIT::TrustedImmPtr(FunctionPtr(operationVMHandleException, NoPtrTag).value()), JSInterfaceJIT::regT3); 419 jit.call(JSInterfaceJIT::regT3, NoPtrTag); 421 420 #if CPU(X86) && USE(JSVALUE32_64) 422 421 jit.addPtr(JSInterfaceJIT::TrustedImm32(8), JSInterfaceJIT::stackPointerRegister); … … 428 427 429 428 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 430 return FINALIZE_CODE(patchBuffer, "%s %s%s trampoline", thunkFunctionType == ThunkFunctionType::JSFunction ? "native" : "internal", entryType == EnterViaJumpWithSavedTags ? "Tail With Saved Tags " : entryType == EnterViaJumpWithoutSavedTags ? "Tail Without Saved Tags " : "", toCString(kind).data());429 return FINALIZE_CODE(patchBuffer, NoPtrTag, "%s %s%s trampoline", thunkFunctionType == ThunkFunctionType::JSFunction ? "native" : "internal", entryType == EnterViaJumpWithSavedTags ? "Tail With Saved Tags " : entryType == EnterViaJumpWithoutSavedTags ? "Tail Without Saved Tags " : "", toCString(kind).data()); 431 430 } 432 431 … … 585 584 586 585 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 587 return FINALIZE_CODE(patchBuffer, "fixup arity");586 return FINALIZE_CODE(patchBuffer, NoPtrTag, "fixup arity"); 588 587 } 589 588 … … 595 594 596 595 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 597 return FINALIZE_CODE(patchBuffer, "unreachable thunk");596 return FINALIZE_CODE(patchBuffer, NoPtrTag, "unreachable thunk"); 598 597 } 599 598 … … 1183 1182 #endif 1184 1183 emitPointerValidation(jit, GPRInfo::regT0); 1185 jit.call(GPRInfo::regT0 );1184 jit.call(GPRInfo::regT0, NoPtrTag); 1186 1185 1187 1186 jit.emitFunctionEpilogue(); … … 1191 1190 linkBuffer.link(noCode, CodeLocationLabel(vm->jitStubs->ctiNativeTailCallWithoutSavedTags(vm))); 1192 1191 return FINALIZE_CODE( 1193 linkBuffer, "Specialized thunk for bound function calls with no arguments");1192 linkBuffer, NoPtrTag, "Specialized thunk for bound function calls with no arguments"); 1194 1193 } 1195 1194 -
trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
r229054 r229609 52 52 namespace LLInt { 53 53 54 static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, void (*target)(), const char *thunkKind)54 static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, OpcodeID opcodeID, PtrTag thunkTag, const char *thunkKind) 55 55 { 56 56 JSInterfaceJIT jit(vm); 57 57 58 58 // FIXME: there's probably a better way to do it on X86, but I'm not sure I care. 59 LLIntCode target = LLInt::getCodeFunctionPtr(opcodeID); 59 60 jit.move(JSInterfaceJIT::TrustedImmPtr(bitwise_cast<void*>(target)), JSInterfaceJIT::regT0); 60 jit.jump(JSInterfaceJIT::regT0 );61 61 jit.jump(JSInterfaceJIT::regT0, ptrTag(BytecodeHelperPtrTag, opcodeID)); 62 62 63 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 63 return FINALIZE_CODE(patchBuffer, "LLInt %s prologue thunk", thunkKind);64 return FINALIZE_CODE(patchBuffer, thunkTag, "LLInt %s prologue thunk", thunkKind); 64 65 } 65 66 66 67 MacroAssemblerCodeRef functionForCallEntryThunkGenerator(VM* vm) 67 68 { 68 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_prologue), "function for call");69 return generateThunkWithJumpTo(vm, llint_function_for_call_prologue, CodeEntryPtrTag, "function for call"); 69 70 } 70 71 71 72 MacroAssemblerCodeRef functionForConstructEntryThunkGenerator(VM* vm) 72 73 { 73 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_prologue), "function for construct");74 return generateThunkWithJumpTo(vm, llint_function_for_construct_prologue, CodeEntryPtrTag, "function for construct"); 74 75 } 75 76 76 77 MacroAssemblerCodeRef functionForCallArityCheckThunkGenerator(VM* vm) 77 78 { 78 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_call_arity_check), "function for call with arity check");79 return generateThunkWithJumpTo(vm, llint_function_for_call_arity_check, CodeEntryWithArityCheckPtrTag, "function for call with arity check"); 79 80 } 80 81 81 82 MacroAssemblerCodeRef functionForConstructArityCheckThunkGenerator(VM* vm) 82 83 { 83 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_function_for_construct_arity_check), "function for construct with arity check");84 return generateThunkWithJumpTo(vm, llint_function_for_construct_arity_check, CodeEntryWithArityCheckPtrTag, "function for construct with arity check"); 84 85 } 85 86 86 87 MacroAssemblerCodeRef evalEntryThunkGenerator(VM* vm) 87 88 { 88 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_eval_prologue), "eval");89 return generateThunkWithJumpTo(vm, llint_eval_prologue, CodeEntryPtrTag, "eval"); 89 90 } 90 91 91 92 MacroAssemblerCodeRef programEntryThunkGenerator(VM* vm) 92 93 { 93 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_program_prologue), "program");94 return generateThunkWithJumpTo(vm, llint_program_prologue, CodeEntryPtrTag, "program"); 94 95 } 95 96 96 97 MacroAssemblerCodeRef moduleProgramEntryThunkGenerator(VM* vm) 97 98 { 98 return generateThunkWithJumpTo(vm, LLInt::getCodeFunctionPtr(llint_module_program_prologue), "module_program");99 return generateThunkWithJumpTo(vm, llint_module_program_prologue, CodeEntryPtrTag, "module_program"); 99 100 } 100 101 -
trunk/Source/JavaScriptCore/runtime/PtrTag.h
r229551 r229609 34 34 NearCallPtrTag, 35 35 NearJumpPtrTag, 36 36 37 CFunctionPtrTag, 37 38 … … 44 45 NativeCodePtrTag, 45 46 SlowPathPtrTag, 47 48 Yarr8BitPtrTag, 49 Yarr16BitPtrTag, 50 YarrMatchOnly8BitPtrTag, 51 YarrMatchOnly16BitPtrTag, 52 YarrBacktrackPtrTag, 46 53 }; 47 54 -
trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
r228966 r229609 1148 1148 patchpoint->setGenerator([returnType] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) { 1149 1149 AllowMacroScratchRegisterUsage allowScratch(jit); 1150 jit.call(params[returnType == Void ? 0 : 1].gpr() );1150 jit.call(params[returnType == Void ? 0 : 1].gpr(), NoPtrTag); 1151 1151 }); 1152 1152 }); … … 1331 1331 patchpoint->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) { 1332 1332 AllowMacroScratchRegisterUsage allowScratch(jit); 1333 jit.call(params[returnType == Void ? 0 : 1].gpr() );1333 jit.call(params[returnType == Void ? 0 : 1].gpr(), NoPtrTag); 1334 1334 }); 1335 1335 }); -
trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
r229054 r229609 309 309 310 310 m_wasmInternalFunctions[functionIndex]->entrypoint.compilation = std::make_unique<B3::Compilation>( 311 FINALIZE_CODE(linkBuffer, "WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()),311 FINALIZE_CODE(linkBuffer, NoPtrTag, "WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()), 312 312 WTFMove(context.wasmEntrypointByproducts)); 313 313 } … … 321 321 322 322 embedderToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>( 323 FINALIZE_CODE(linkBuffer, "Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()),323 FINALIZE_CODE(linkBuffer, NoPtrTag, "Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()), 324 324 WTFMove(context.embedderEntrypointByproducts)); 325 325 } -
trunk/Source/JavaScriptCore/wasm/WasmBinding.cpp
r229054 r229609 77 77 // Tail call into the callee WebAssembly function. 78 78 jit.loadPtr(scratch, scratch); 79 jit.jump(scratch );79 jit.jump(scratch, NoPtrTag); 80 80 81 81 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID, JITCompilationCanFail); … … 83 83 return makeUnexpected(BindingFailure::OutOfMemory); 84 84 85 return FINALIZE_CODE(patchBuffer, "WebAssembly->WebAssembly import[%i]", importIndex);85 return FINALIZE_CODE(patchBuffer, NoPtrTag, "WebAssembly->WebAssembly import[%i]", importIndex); 86 86 } 87 87 -
trunk/Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
r229054 r229609 99 99 100 100 omgEntrypoint.compilation = std::make_unique<B3::Compilation>( 101 FINALIZE_CODE(linkBuffer, "WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()),101 FINALIZE_CODE(linkBuffer, NoPtrTag, "WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data()), 102 102 WTFMove(context.wasmEntrypointByproducts)); 103 103 -
trunk/Source/JavaScriptCore/wasm/WasmThunks.cpp
r229054 r229609 52 52 jit.copyCalleeSavesToEntryFrameCalleeSavesBuffer(GPRInfo::argumentGPR0); 53 53 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 54 CCallHelpers::Call call = jit.call( );55 jit.jump(GPRInfo::returnValueGPR );54 CCallHelpers::Call call = jit.call(NoPtrTag); 55 jit.jump(GPRInfo::returnValueGPR, NoPtrTag); 56 56 jit.breakpoint(); // We should not reach this. 57 57 … … 60 60 LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID); 61 61 linkBuffer.link(call, FunctionPtr(throwWasmException)); 62 return FINALIZE_CODE(linkBuffer, "Throw exception from Wasm");62 return FINALIZE_CODE(linkBuffer, NoPtrTag, "Throw exception from Wasm"); 63 63 } 64 64 … … 74 74 LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID); 75 75 linkBuffer.link(jumpToExceptionHandler, CodeLocationLabel(Thunks::singleton().stub(locker, throwExceptionFromWasmThunkGenerator).code())); 76 return FINALIZE_CODE(linkBuffer, "Throw stack overflow from Wasm");76 return FINALIZE_CODE(linkBuffer, NoPtrTag, "Throw stack overflow from Wasm"); 77 77 } 78 78 … … 93 93 Run run = OMGPlan::runForIndex; 94 94 jit.move(MacroAssembler::TrustedImmPtr(reinterpret_cast<void*>(run)), GPRInfo::argumentGPR2); 95 jit.call(GPRInfo::argumentGPR2 );95 jit.call(GPRInfo::argumentGPR2, NoPtrTag); 96 96 97 97 ScratchRegisterAllocator::restoreRegistersFromStackForCall(jit, registersToSpill, RegisterSet(), numberOfStackBytesUsedForRegisterPreservation, extraPaddingBytes); … … 100 100 jit.ret(); 101 101 LinkBuffer linkBuffer(jit, GLOBAL_THUNK_ID); 102 return FINALIZE_CODE(linkBuffer, "Trigger OMG tier up");102 return FINALIZE_CODE(linkBuffer, NoPtrTag, "Trigger OMG tier up"); 103 103 } 104 104 -
trunk/Source/JavaScriptCore/wasm/js/WasmToJS.cpp
r229391 r229609 94 94 jit.move(CCallHelpers::TrustedImm32(0), GPRInfo::argumentGPR3); 95 95 96 auto call = jit.call( );96 auto call = jit.call(NoPtrTag); 97 97 jit.jumpToExceptionHandler(*vm); 98 98 … … 117 117 118 118 linkBuffer.link(call, throwBadI64); 119 return FINALIZE_CODE(linkBuffer, "WebAssembly->JavaScript invalid i64 use in import[%i]", importIndex);119 return FINALIZE_CODE(linkBuffer, NoPtrTag, "WebAssembly->JavaScript invalid i64 use in import[%i]", importIndex); 120 120 } 121 121 … … 303 303 static_assert(GPRInfo::numberOfArgumentRegisters >= 4, "We rely on this with the call below."); 304 304 jit.setupArguments<decltype(callFunc)>(GPRInfo::argumentGPR1, CCallHelpers::TrustedImm32(signatureIndex), CCallHelpers::TrustedImmPtr(buffer)); 305 auto call = jit.call( );305 auto call = jit.call(NoPtrTag); 306 306 auto noException = jit.emitExceptionCheck(*vm, AssemblyHelpers::InvertedExceptionCheck); 307 307 … … 315 315 ASSERT(!!vm->callFrameForCatch); 316 316 }; 317 auto exceptionCall = jit.call( );317 auto exceptionCall = jit.call(NoPtrTag); 318 318 jit.jumpToExceptionHandler(*vm); 319 319 … … 343 343 linkBuffer.link(exceptionCall, doUnwinding); 344 344 345 return FINALIZE_CODE(linkBuffer, "WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data());345 return FINALIZE_CODE(linkBuffer, NoPtrTag, "WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data()); 346 346 } 347 347 … … 547 547 slowPath.link(&jit); 548 548 jit.setupArguments<decltype(convertToI32)>(GPRInfo::returnValueGPR); 549 auto call = jit.call( );549 auto call = jit.call(NoPtrTag); 550 550 exceptionChecks.append(jit.emitJumpIfException(*vm)); 551 551 … … 582 582 notANumber.link(&jit); 583 583 jit.setupArguments<decltype(convertToF32)>(GPRInfo::returnValueGPR); 584 auto call = jit.call( );584 auto call = jit.call(NoPtrTag); 585 585 exceptionChecks.append(jit.emitJumpIfException(*vm)); 586 586 … … 616 616 notANumber.link(&jit); 617 617 jit.setupArguments<decltype(convertToF64)>(GPRInfo::returnValueGPR); 618 auto call = jit.call( );618 auto call = jit.call(NoPtrTag); 619 619 exceptionChecks.append(jit.emitJumpIfException(*vm)); 620 620 … … 635 635 jit.copyCalleeSavesToEntryFrameCalleeSavesBuffer(vm->topEntryFrame); 636 636 jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 637 auto call = jit.call( );637 auto call = jit.call(NoPtrTag); 638 638 jit.jumpToExceptionHandler(*vm); 639 639 … … 660 660 callLinkInfo->setCallLocations(callReturnLocation, hotPathBegin, hotPathOther); 661 661 662 return FINALIZE_CODE(patchBuffer, "WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data());662 return FINALIZE_CODE(patchBuffer, NoPtrTag, "WebAssembly->JavaScript import[%i] %s", importIndex, signature.toString().ascii().data()); 663 663 } 664 664 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r229444 r229609 42 42 template<YarrJITCompileMode compileMode> 43 43 class YarrGenerator : private MacroAssembler { 44 friend void jitCompile(VM*, YarrCodeBlock& jitObject, const String& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);44 friend void jitCompile(VM*, YarrCodeBlock&, const String& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline); 45 45 46 46 #if CPU(ARM) … … 605 605 void loadFromFrameAndJump(unsigned frameLocation) 606 606 { 607 jump(Address(stackPointerRegister, frameLocation * sizeof(void*)) );607 jump(Address(stackPointerRegister, frameLocation * sizeof(void*)), ptrTag(YarrBacktrackPtrTag, &m_codeBlock)); 608 608 } 609 609 … … 928 928 929 929 // Called at the end of code generation to link all return addresses. 930 void linkDataLabels(LinkBuffer& linkBuffer )930 void linkDataLabels(LinkBuffer& linkBuffer, YarrCodeBlock& codeBlock) 931 931 { 932 932 ASSERT(isEmpty()); 933 933 for (unsigned i = 0; i < m_backtrackRecords.size(); ++i) 934 linkBuffer.patch(m_backtrackRecords[i].m_dataLabel, linkBuffer.locationOf(m_backtrackRecords[i].m_backtrackLocation ));934 linkBuffer.patch(m_backtrackRecords[i].m_dataLabel, linkBuffer.locationOf(m_backtrackRecords[i].m_backtrackLocation, ptrTag(YarrBacktrackPtrTag, &codeBlock))); 935 935 } 936 936 … … 3283 3283 m_tryReadUnicodeCharacterEntry = label(); 3284 3284 3285 #if CPU(ARM64) 3286 tagPtr(linkRegister, stackPointerRegister); 3287 #endif 3288 3285 3289 tryReadUnicodeCharImpl(regT0); 3286 3290 … … 3344 3348 #endif 3345 3349 #elif CPU(ARM64) 3350 tagPtr(linkRegister, stackPointerRegister); 3346 3351 if (m_decodeSurrogatePairs) { 3347 3352 pushPair(framePointerRegister, linkRegister); … … 3418 3423 3419 3424 public: 3420 YarrGenerator(VM* vm, YarrPattern& pattern, YarrC harSize charSize)3425 YarrGenerator(VM* vm, YarrPattern& pattern, YarrCodeBlock& codeBlock, YarrCharSize charSize) 3421 3426 : m_vm(vm) 3422 3427 , m_pattern(pattern) 3428 , m_codeBlock(codeBlock) 3423 3429 , m_charSize(charSize) 3424 3430 , m_decodeSurrogatePairs(m_charSize == Char16 && m_pattern.unicode()) … … 3432 3438 } 3433 3439 3434 void compile(YarrCodeBlock& jitObject) 3435 { 3440 void compile() 3441 { 3442 YarrCodeBlock& codeBlock = m_codeBlock; 3443 3436 3444 #ifndef JIT_UNICODE_EXPRESSIONS 3437 3445 if (m_decodeSurrogatePairs) { 3438 jitObject.setFallBackWithFailureReason(JITFailureReason::DecodeSurrogatePair);3446 codeBlock.setFallBackWithFailureReason(JITFailureReason::DecodeSurrogatePair); 3439 3447 return; 3440 3448 } … … 3443 3451 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS) 3444 3452 if (m_containsNestedSubpatterns) 3445 jitObject.setUsesPaternContextBuffer();3453 codeBlock.setUsesPaternContextBuffer(); 3446 3454 #endif 3447 3455 … … 3451 3459 3452 3460 if (m_failureReason) { 3453 jitObject.setFallBackWithFailureReason(*m_failureReason);3461 codeBlock.setFallBackWithFailureReason(*m_failureReason); 3454 3462 return; 3455 3463 } … … 3498 3506 LinkBuffer linkBuffer(*this, REGEXP_CODE_ID, JITCompilationCanFail); 3499 3507 if (linkBuffer.didFailToAllocate()) { 3500 jitObject.setFallBackWithFailureReason(JITFailureReason::ExecutableMemoryAllocationFailure);3508 codeBlock.setFallBackWithFailureReason(JITFailureReason::ExecutableMemoryAllocationFailure); 3501 3509 return; 3502 3510 } 3503 3511 3504 3512 if (!m_tryReadUnicodeCharacterCalls.isEmpty()) { 3505 CodeLocationLabel tryReadUnicodeCharacterHelper = linkBuffer.locationOf(m_tryReadUnicodeCharacterEntry );3513 CodeLocationLabel tryReadUnicodeCharacterHelper = linkBuffer.locationOf(m_tryReadUnicodeCharacterEntry, NearCallPtrTag); 3506 3514 3507 3515 for (auto call : m_tryReadUnicodeCharacterCalls) … … 3509 3517 } 3510 3518 3511 m_backtrackingState.linkDataLabels(linkBuffer );3519 m_backtrackingState.linkDataLabels(linkBuffer, codeBlock); 3512 3520 3513 3521 if (compileMode == MatchOnly) { 3514 3522 if (m_charSize == Char8) 3515 jitObject.set8BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, "Match-only 8-bit regular expression"));3523 codeBlock.set8BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, ptrTag(YarrMatchOnly8BitPtrTag, &codeBlock), "Match-only 8-bit regular expression")); 3516 3524 else 3517 jitObject.set16BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, "Match-only 16-bit regular expression"));3525 codeBlock.set16BitCodeMatchOnly(FINALIZE_CODE(linkBuffer, ptrTag(YarrMatchOnly16BitPtrTag, &codeBlock), "Match-only 16-bit regular expression")); 3518 3526 } else { 3519 3527 if (m_charSize == Char8) 3520 jitObject.set8BitCode(FINALIZE_CODE(linkBuffer, "8-bit regular expression"));3528 codeBlock.set8BitCode(FINALIZE_CODE(linkBuffer, ptrTag(Yarr8BitPtrTag, &codeBlock), "8-bit regular expression")); 3521 3529 else 3522 jitObject.set16BitCode(FINALIZE_CODE(linkBuffer, "16-bit regular expression"));3530 codeBlock.set16BitCode(FINALIZE_CODE(linkBuffer, ptrTag(Yarr16BitPtrTag, &codeBlock), "16-bit regular expression")); 3523 3531 } 3524 3532 if (m_failureReason) 3525 jitObject.setFallBackWithFailureReason(*m_failureReason);3533 codeBlock.setFallBackWithFailureReason(*m_failureReason); 3526 3534 } 3527 3535 … … 3531 3539 YarrPattern& m_pattern; 3532 3540 3541 YarrCodeBlock& m_codeBlock; 3533 3542 YarrCharSize m_charSize; 3534 3543 … … 3592 3601 } 3593 3602 3594 void jitCompile(YarrPattern& pattern, YarrCharSize charSize, VM* vm, YarrCodeBlock& jitObject, YarrJITCompileMode mode)3603 void jitCompile(YarrPattern& pattern, YarrCharSize charSize, VM* vm, YarrCodeBlock& codeBlock, YarrJITCompileMode mode) 3595 3604 { 3596 3605 if (mode == MatchOnly) 3597 YarrGenerator<MatchOnly>(vm, pattern, c harSize).compile(jitObject);3606 YarrGenerator<MatchOnly>(vm, pattern, codeBlock, charSize).compile(); 3598 3607 else 3599 YarrGenerator<IncludeSubpatterns>(vm, pattern, c harSize).compile(jitObject);3600 3601 if (auto failureReason = jitObject.failureReason()) {3608 YarrGenerator<IncludeSubpatterns>(vm, pattern, codeBlock, charSize).compile(); 3609 3610 if (auto failureReason = codeBlock.failureReason()) { 3602 3611 if (Options::dumpCompiledRegExpPatterns()) 3603 3612 dumpCompileFailure(*failureReason); -
trunk/Source/JavaScriptCore/yarr/YarrJIT.h
r228481 r229609 1 1 /* 2 * Copyright (C) 2009-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2009-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 102 102 { 103 103 ASSERT(has8BitCode()); 104 return MatchResult( reinterpret_cast<YarrJITCode8>(m_ref8.code().executableAddress())(input, start, length, output, freeParenContext, parenContextSize));104 return MatchResult(untagCFunctionPtr<YarrJITCode8>(m_ref8.code().executableAddress(), ptrTag(Yarr8BitPtrTag, this))(input, start, length, output, freeParenContext, parenContextSize)); 105 105 } 106 106 … … 108 108 { 109 109 ASSERT(has16BitCode()); 110 return MatchResult( reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output, freeParenContext, parenContextSize));110 return MatchResult(untagCFunctionPtr<YarrJITCode16>(m_ref16.code().executableAddress(), ptrTag(Yarr16BitPtrTag, this))(input, start, length, output, freeParenContext, parenContextSize)); 111 111 } 112 112 … … 114 114 { 115 115 ASSERT(has8BitCodeMatchOnly()); 116 return MatchResult( reinterpret_cast<YarrJITCodeMatchOnly8>(m_matchOnly8.code().executableAddress())(input, start, length, 0, freeParenContext, parenContextSize));116 return MatchResult(untagCFunctionPtr<YarrJITCodeMatchOnly8>(m_matchOnly8.code().executableAddress(), ptrTag(YarrMatchOnly8BitPtrTag, this))(input, start, length, 0, freeParenContext, parenContextSize)); 117 117 } 118 118 … … 120 120 { 121 121 ASSERT(has16BitCodeMatchOnly()); 122 return MatchResult( reinterpret_cast<YarrJITCodeMatchOnly16>(m_matchOnly16.code().executableAddress())(input, start, length, 0, freeParenContext, parenContextSize));122 return MatchResult(untagCFunctionPtr<YarrJITCodeMatchOnly16>(m_matchOnly16.code().executableAddress(), ptrTag(YarrMatchOnly16BitPtrTag, this))(input, start, length, 0, freeParenContext, parenContextSize)); 123 123 } 124 124 #else -
trunk/Source/WebCore/ChangeLog
r229603 r229609 1 2018-03-14 Mark Lam <mark.lam@apple.com> 2 3 Enhance the MacroAssembler and LinkBuffer to support pointer profiling. 4 https://bugs.webkit.org/show_bug.cgi?id=183623 5 <rdar://problem/38443314> 6 7 Reviewed by Michael Saboff. 8 9 No new tests. Just adding PtrTags required by new MacroAssembler API. 10 11 * cssjit/FunctionCall.h: 12 (WebCore::FunctionCall::prepareAndCall): 13 * cssjit/SelectorCompiler.cpp: 14 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile): 15 1 16 2018-03-14 Chris Fleizach <cfleizach@apple.com> 2 17 -
trunk/Source/WebCore/cssjit/FunctionCall.h
r208646 r229609 148 148 } 149 149 150 JSC::MacroAssembler::Call call = m_assembler.call( );150 JSC::MacroAssembler::Call call = m_assembler.call(JSC::CFunctionPtrTag); 151 151 m_callRegistry.append(std::make_pair(call, m_functionAddress)); 152 152 } -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r229537 r229609 1245 1245 1246 1246 #if CSS_SELECTOR_JIT_DEBUGGING 1247 codeRef = linkBuffer.finalizeCodeWithDisassembly( "CSS Selector JIT for \"%s\"", m_originalSelector->selectorText().utf8().data());1247 codeRef = linkBuffer.finalizeCodeWithDisassembly(JSC::NoPtrTag, "CSS Selector JIT for \"%s\"", m_originalSelector->selectorText().utf8().data()); 1248 1248 #else 1249 codeRef = FINALIZE_CODE(linkBuffer, "CSS Selector JIT");1249 codeRef = FINALIZE_CODE(linkBuffer, JSC::NoPtrTag, "CSS Selector JIT"); 1250 1250 #endif 1251 1251
Note:
See TracChangeset
for help on using the changeset viewer.