Changeset 153177 in webkit
- Timestamp:
- Jul 24, 2013, 9:00:54 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r153176 r153177 1 2013-05-22 Filip Pizlo <[email protected]> 2 3 Rename getJITCode and getJITType to jitCode and jitType. 4 5 Rubber stampted by Mark Hahnenberg. 6 7 * assembler/RepatchBuffer.h: 8 (JSC::RepatchBuffer::RepatchBuffer): 9 * bytecode/CodeBlock.cpp: 10 (JSC::CodeBlock::dump): 11 (JSC::CodeBlock::visitAggregate): 12 (JSC::CodeBlock::finalizeUnconditionally): 13 (JSC::CodeBlock::resetStubInternal): 14 (JSC::CodeBlock::stronglyVisitWeakReferences): 15 (JSC::CodeBlock::baselineVersion): 16 (JSC::CodeBlock::hasOptimizedReplacement): 17 (JSC::CodeBlock::bytecodeOffset): 18 (JSC::CodeBlock::codeOriginForReturn): 19 (JSC::ProgramCodeBlock::compileOptimized): 20 (JSC::EvalCodeBlock::compileOptimized): 21 (JSC::FunctionCodeBlock::compileOptimized): 22 (JSC::ProgramCodeBlock::jettison): 23 (JSC::EvalCodeBlock::jettison): 24 (JSC::FunctionCodeBlock::jettison): 25 (JSC::ProgramCodeBlock::jitCompileImpl): 26 (JSC::EvalCodeBlock::jitCompileImpl): 27 (JSC::FunctionCodeBlock::jitCompileImpl): 28 (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): 29 (JSC::CodeBlock::adjustedExitCountThreshold): 30 (JSC::CodeBlock::tallyFrequentExitSites): 31 * bytecode/CodeBlock.h: 32 (JSC::CodeBlock::getCallLinkInfo): 33 (JSC::CodeBlock::jitCode): 34 (JSC::CodeBlock::jitCodeWithArityCheck): 35 (JSC::CodeBlock::jitType): 36 (JSC::CodeBlock::hasBaselineJITProfiling): 37 (JSC::CodeBlock::jitCompile): 38 (JSC::CodeBlock::addFrequentExitSite): 39 (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan): 40 (JSC::ExecState::isInlineCallFrame): 41 * dfg/DFGAssemblyHelpers.cpp: 42 (JSC::DFG::AssemblyHelpers::decodedCodeMapFor): 43 * dfg/DFGAssemblyHelpers.h: 44 (JSC::DFG::AssemblyHelpers::AssemblyHelpers): 45 * dfg/DFGDriver.cpp: 46 (JSC::DFG::compile): 47 * dfg/DFGOSREntry.cpp: 48 (JSC::DFG::prepareOSREntry): 49 * dfg/DFGOSRExit.cpp: 50 (JSC::DFG::OSRExit::codeLocationForRepatch): 51 * dfg/DFGOSRExitCompiler.cpp: 52 * dfg/DFGOSRExitCompilerCommon.cpp: 53 (JSC::DFG::reifyInlinedCallFrames): 54 (JSC::DFG::adjustAndJumpToTarget): 55 * dfg/DFGOperations.cpp: 56 * dfg/DFGVariableEventStream.cpp: 57 (JSC::DFG::VariableEventStream::reconstruct): 58 * ftl/FTLOSRExit.cpp: 59 (JSC::FTL::OSRExit::codeLocationForRepatch): 60 * ftl/FTLOSRExitCompiler.cpp: 61 (JSC::FTL::compileFTLOSRExit): 62 * heap/DFGCodeBlocks.cpp: 63 (JSC::DFGCodeBlocks::~DFGCodeBlocks): 64 (JSC::DFGCodeBlocks::jettison): 65 (JSC::DFGCodeBlocks::clearMarks): 66 (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks): 67 (JSC::DFGCodeBlocks::traceMarkedCodeBlocks): 68 * interpreter/Interpreter.cpp: 69 (JSC::getLineNumberForCallFrame): 70 (JSC::getCallerInfo): 71 * jit/JITDriver.h: 72 (JSC::jitCompileIfAppropriateImpl): 73 (JSC::jitCompileFunctionIfAppropriateImpl): 74 * jit/JITStubs.cpp: 75 (JSC::DEFINE_STUB_FUNCTION): 76 * llint/LLIntSlowPaths.cpp: 77 (JSC::LLInt::entryOSR): 78 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 79 * runtime/Executable.cpp: 80 (JSC::jettisonCodeBlock): 81 (JSC::EvalExecutable::compileOptimized): 82 (JSC::EvalExecutable::jettisonOptimizedCode): 83 (JSC::ProgramExecutable::compileOptimized): 84 (JSC::ProgramExecutable::jettisonOptimizedCode): 85 (JSC::FunctionExecutable::baselineCodeBlockFor): 86 (JSC::FunctionExecutable::compileOptimizedForCall): 87 (JSC::FunctionExecutable::compileOptimizedForConstruct): 88 (JSC::FunctionExecutable::jettisonOptimizedCodeForCall): 89 (JSC::FunctionExecutable::jettisonOptimizedCodeForConstruct): 90 * tools/CodeProfile.cpp: 91 (JSC::CodeProfile::sample): 92 1 93 2013-05-22 Filip Pizlo <[email protected]> 2 94 -
trunk/Source/JavaScriptCore/assembler/RepatchBuffer.h
r153121 r153177 48 48 { 49 49 #if ENABLE(ASSEMBLER_WX_EXCLUSIVE) 50 RefPtr<JITCode> code = codeBlock-> getJITCode();50 RefPtr<JITCode> code = codeBlock->jitCode(); 51 51 m_start = code->start(); 52 52 m_size = code->size(); -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r153170 r153177 118 118 void CodeBlock::dump(PrintStream& out) const 119 119 { 120 dumpAssumingJITType(out, getJITType());120 dumpAssumingJITType(out, jitType()); 121 121 } 122 122 … … 2053 2053 { 2054 2054 #if ENABLE(PARALLEL_GC) && ENABLE(DFG_JIT) 2055 if (JITCode::isOptimizingJIT( getJITType())) {2055 if (JITCode::isOptimizingJIT(jitType())) { 2056 2056 DFG::CommonData* dfgCommon = m_jitCode->dfgCommon(); 2057 2057 … … 2302 2302 #if ENABLE(JIT) 2303 2303 // Handle inline caches. 2304 if (!! getJITCode()) {2304 if (!!jitCode()) { 2305 2305 RepatchBuffer repatchBuffer(this); 2306 2306 for (unsigned i = 0; i < numberOfCallLinkInfos(); ++i) { … … 2362 2362 dataLog("Clearing structure cache (kind ", static_cast<int>(stubInfo.accessType), ") in ", *this, ".\n"); 2363 2363 2364 switch ( getJITType()) {2364 switch (jitType()) { 2365 2365 case JITCode::BaselineJIT: 2366 2366 if (isGetByIdAccess(accessType)) … … 2413 2413 2414 2414 #if ENABLE(DFG_JIT) 2415 if (!JITCode::isOptimizingJIT( getJITType()))2415 if (!JITCode::isOptimizingJIT(jitType())) 2416 2416 return; 2417 2417 … … 2436 2436 // to get its replacement. But we'll know that it's the original baseline code 2437 2437 // block because it won't have JIT code yet and it won't have an alternative. 2438 if ( getJITType() == JITCode::None && !alternative())2438 if (jitType() == JITCode::None && !alternative()) 2439 2439 return this; 2440 2440 … … 2444 2444 result = result->alternative(); 2445 2445 ASSERT(result); 2446 ASSERT(JITCode::isBaselineCode(result-> getJITType()));2446 ASSERT(JITCode::isBaselineCode(result->jitType())); 2447 2447 return result; 2448 2448 #else … … 2454 2454 bool CodeBlock::hasOptimizedReplacement() 2455 2455 { 2456 ASSERT(JITCode::isBaselineCode( getJITType()));2457 bool result = JITCode::isHigherTier(replacement()-> getJITType(), getJITType());2456 ASSERT(JITCode::isBaselineCode(jitType())); 2457 bool result = JITCode::isHigherTier(replacement()->jitType(), jitType()); 2458 2458 if (result) 2459 ASSERT(JITCode::isOptimizingJIT(replacement()-> getJITType()));2459 ASSERT(JITCode::isOptimizingJIT(replacement()->jitType())); 2460 2460 else { 2461 ASSERT(JITCode::isBaselineCode(replacement()-> getJITType()));2461 ASSERT(JITCode::isBaselineCode(replacement()->jitType())); 2462 2462 ASSERT(replacement() == this); 2463 2463 } … … 2709 2709 RELEASE_ASSERT(exec->codeBlock()); 2710 2710 RELEASE_ASSERT(exec->codeBlock() == this); 2711 RELEASE_ASSERT(JITCode::isBaselineCode( getJITType()));2711 RELEASE_ASSERT(JITCode::isBaselineCode(jitType())); 2712 2712 Instruction* instruction = exec->currentVPC(); 2713 2713 RELEASE_ASSERT(instruction); … … 2725 2725 return 1; 2726 2726 2727 if ( getJITCode()->contains(returnAddress.value())) {2728 unsigned callReturnOffset = getJITCode()->offsetOf(returnAddress.value());2727 if (jitCode()->contains(returnAddress.value())) { 2728 unsigned callReturnOffset = jitCode()->offsetOf(returnAddress.value()); 2729 2729 CallReturnOffsetToBytecodeOffset* result = 2730 2730 binarySearch<CallReturnOffsetToBytecodeOffset, unsigned>( … … 2759 2759 return false; 2760 2760 2761 if (! getJITCode()->contains(returnAddress.value())) {2761 if (!jitCode()->contains(returnAddress.value())) { 2762 2762 ClosureCallStubRoutine* stub = findClosureCallForReturnPC(returnAddress); 2763 2763 ASSERT(stub); … … 2768 2768 } 2769 2769 2770 unsigned offset = getJITCode()->offsetOf(returnAddress.value());2770 unsigned offset = jitCode()->offsetOf(returnAddress.value()); 2771 2771 CodeOriginAtCallReturnOffset* entry = 2772 2772 tryBinarySearch<CodeOriginAtCallReturnOffset, unsigned>( … … 2842 2842 JSObject* ProgramCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex) 2843 2843 { 2844 if (JITCode::isHigherTier(replacement()-> getJITType(), getJITType())) {2844 if (JITCode::isHigherTier(replacement()->jitType(), jitType())) { 2845 2845 result = CompilationNotNeeded; 2846 2846 return 0; … … 2857 2857 JSObject* EvalCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex) 2858 2858 { 2859 if (JITCode::isHigherTier(replacement()-> getJITType(), getJITType())) {2859 if (JITCode::isHigherTier(replacement()->jitType(), jitType())) { 2860 2860 result = CompilationNotNeeded; 2861 2861 return 0; … … 2872 2872 JSObject* FunctionCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex) 2873 2873 { 2874 if (JITCode::isHigherTier(replacement()-> getJITType(), getJITType())) {2874 if (JITCode::isHigherTier(replacement()->jitType(), jitType())) { 2875 2875 result = CompilationNotNeeded; 2876 2876 return 0; … … 2904 2904 void CodeBlock::jettison() 2905 2905 { 2906 ASSERT(JITCode::isOptimizingJIT( getJITType()));2906 ASSERT(JITCode::isOptimizingJIT(jitType())); 2907 2907 ASSERT(this == replacement()); 2908 2908 alternative()->optimizeAfterWarmUp(); … … 2920 2920 void EvalCodeBlock::jettisonImpl() 2921 2921 { 2922 ASSERT(JITCode::isOptimizingJIT(jitType())); 2923 ASSERT(this == replacement()); 2924 if (DFG::shouldShowDisassembly()) 2925 dataLog("Jettisoning ", *this, ".\n"); 2922 2926 static_cast<EvalExecutable*>(ownerExecutable())->jettisonOptimizedCode(*vm()); 2923 2927 } … … 2925 2929 void FunctionCodeBlock::jettisonImpl() 2926 2930 { 2931 ASSERT(JITCode::isOptimizingJIT(jitType())); 2932 ASSERT(this == replacement()); 2933 if (DFG::shouldShowDisassembly()) 2934 dataLog("Jettisoning ", *this, ".\n"); 2927 2935 static_cast<FunctionExecutable*>(ownerExecutable())->jettisonOptimizedCodeFor(*vm(), m_isConstructor ? CodeForConstruct : CodeForCall); 2928 2936 } … … 2930 2938 CompilationResult ProgramCodeBlock::jitCompileImpl(ExecState* exec) 2931 2939 { 2932 ASSERT( getJITType() == JITCode::InterpreterThunk);2940 ASSERT(jitType() == JITCode::InterpreterThunk); 2933 2941 ASSERT(this == replacement()); 2934 2942 return static_cast<ProgramExecutable*>(ownerExecutable())->jitCompile(exec); … … 2937 2945 CompilationResult EvalCodeBlock::jitCompileImpl(ExecState* exec) 2938 2946 { 2939 ASSERT( getJITType() == JITCode::InterpreterThunk);2947 ASSERT(jitType() == JITCode::InterpreterThunk); 2940 2948 ASSERT(this == replacement()); 2941 2949 return static_cast<EvalExecutable*>(ownerExecutable())->jitCompile(exec); … … 2944 2952 CompilationResult FunctionCodeBlock::jitCompileImpl(ExecState* exec) 2945 2953 { 2946 ASSERT( getJITType() == JITCode::InterpreterThunk);2954 ASSERT(jitType() == JITCode::InterpreterThunk); 2947 2955 ASSERT(this == replacement()); 2948 2956 return static_cast<FunctionExecutable*>(ownerExecutable())->jitCompileFor(exec, m_isConstructor ? CodeForConstruct : CodeForCall); … … 3148 3156 void CodeBlock::setOptimizationThresholdBasedOnCompilationResult(CompilationResult result) 3149 3157 { 3150 RELEASE_ASSERT( getJITType() == JITCode::BaselineJIT);3158 RELEASE_ASSERT(jitType() == JITCode::BaselineJIT); 3151 3159 RELEASE_ASSERT((result == CompilationSuccessful) == (replacement() != this)); 3152 3160 switch (result) { 3153 3161 case CompilationSuccessful: 3154 RELEASE_ASSERT(JITCode::isOptimizingJIT(replacement()-> getJITType()));3162 RELEASE_ASSERT(JITCode::isOptimizingJIT(replacement()->jitType())); 3155 3163 optimizeNextInvocation(); 3156 3164 break; … … 3180 3188 uint32_t CodeBlock::adjustedExitCountThreshold(uint32_t desiredThreshold) 3181 3189 { 3182 ASSERT(JITCode::isOptimizingJIT( getJITType()));3190 ASSERT(JITCode::isOptimizingJIT(jitType())); 3183 3191 // Compute this the lame way so we don't saturate. This is called infrequently 3184 3192 // enough that this loop won't hurt us. … … 3325 3333 void CodeBlock::tallyFrequentExitSites() 3326 3334 { 3327 ASSERT(JITCode::isOptimizingJIT( getJITType()));3328 ASSERT(alternative()-> getJITType() == JITCode::BaselineJIT);3335 ASSERT(JITCode::isOptimizingJIT(jitType())); 3336 ASSERT(alternative()->jitType() == JITCode::BaselineJIT); 3329 3337 3330 3338 CodeBlock* profiledBlock = alternative(); 3331 3339 3332 switch ( getJITType()) {3340 switch (jitType()) { 3333 3341 case JITCode::DFGJIT: { 3334 3342 DFG::JITCode* jitCode = m_jitCode->dfg(); -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r153176 r153177 193 193 CallLinkInfo& getCallLinkInfo(unsigned bytecodeIndex) 194 194 { 195 ASSERT(JITCode::isBaselineCode( getJITType()));195 ASSERT(JITCode::isBaselineCode(jitType())); 196 196 return *(binarySearch<CallLinkInfo, unsigned>(m_callLinkInfos, m_callLinkInfos.size(), bytecodeIndex, getCallLinkInfoBytecodeIndex)); 197 197 } … … 285 285 #endif 286 286 } 287 PassRefPtr<JITCode> getJITCode() { return m_jitCode; }288 MacroAssemblerCodePtr getJITCodeWithArityCheck() { return m_jitCodeWithArityCheck; }289 JITCode::JITType getJITType() const287 PassRefPtr<JITCode> jitCode() { return m_jitCode; } 288 MacroAssemblerCodePtr jitCodeWithArityCheck() { return m_jitCodeWithArityCheck; } 289 JITCode::JITType jitType() const 290 290 { 291 291 JITCode* jitCode = m_jitCode.get(); … … 297 297 bool hasBaselineJITProfiling() const 298 298 { 299 return getJITType() == JITCode::BaselineJIT;299 return jitType() == JITCode::BaselineJIT; 300 300 } 301 301 virtual JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex) = 0; … … 304 304 CompilationResult jitCompile(ExecState* exec) 305 305 { 306 if ( getJITType() != JITCode::InterpreterThunk) {307 ASSERT( getJITType() == JITCode::BaselineJIT);306 if (jitType() != JITCode::InterpreterThunk) { 307 ASSERT(jitType() == JITCode::BaselineJIT); 308 308 return CompilationNotNeeded; 309 309 } … … 323 323 bool hasOptimizedReplacement(); 324 324 #else 325 JITCode::JITType getJITType() const { return JITCode::BaselineJIT; }325 JITCode::JITType jitType() const { return JITCode::BaselineJIT; } 326 326 #endif 327 327 … … 635 635 bool addFrequentExitSite(const DFG::FrequentExitSite& site) 636 636 { 637 ASSERT(JITCode::isBaselineCode( getJITType()));637 ASSERT(JITCode::isBaselineCode(jitType())); 638 638 return m_exitProfile.add(site); 639 639 } … … 989 989 // stale. So if a basline JIT CodeBlock gets scanned, we can assume that 990 990 // this means that it's live. 991 if (!JITCode::isOptimizingJIT( getJITType()))991 if (!JITCode::isOptimizingJIT(jitType())) 992 992 return true; 993 993 … … 1261 1261 inline bool ExecState::isInlineCallFrame() 1262 1262 { 1263 if (LIKELY(!codeBlock() || !JITCode::isOptimizingJIT(codeBlock()-> getJITType())))1263 if (LIKELY(!codeBlock() || !JITCode::isOptimizingJIT(codeBlock()->jitType()))) 1264 1264 return false; 1265 1265 return isInlineCallFrameSlow(); -
trunk/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp
r131858 r153177 42 42 { 43 43 ASSERT(codeBlock == codeBlock->baselineVersion()); 44 ASSERT(codeBlock-> getJITType() == JITCode::BaselineJIT);44 ASSERT(codeBlock->jitType() == JITCode::BaselineJIT); 45 45 ASSERT(codeBlock->jitCodeMap()); 46 46 -
trunk/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h
r153116 r153177 53 53 ASSERT(m_baselineCodeBlock); 54 54 ASSERT(!m_baselineCodeBlock->alternative()); 55 ASSERT(m_baselineCodeBlock-> getJITType() == JITCode::BaselineJIT);55 ASSERT(m_baselineCodeBlock->jitType() == JITCode::BaselineJIT); 56 56 } 57 57 } -
trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp
r153169 r153177 61 61 ASSERT(codeBlock); 62 62 ASSERT(codeBlock->alternative()); 63 ASSERT(codeBlock->alternative()-> getJITType() == JITCode::BaselineJIT);63 ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT); 64 64 65 65 ASSERT(osrEntryBytecodeIndex != UINT_MAX); -
trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
r153169 r153177 41 41 { 42 42 #if DFG_ENABLE(OSR_ENTRY) 43 ASSERT(codeBlock-> getJITType() == JITCode::DFGJIT);43 ASSERT(codeBlock->jitType() == JITCode::DFGJIT); 44 44 ASSERT(codeBlock->alternative()); 45 ASSERT(codeBlock->alternative()-> getJITType() == JITCode::BaselineJIT);45 ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT); 46 46 ASSERT(!codeBlock->jitCodeMap()); 47 47 … … 53 53 54 54 VM* vm = &exec->vm(); 55 OSREntryData* entry = codeBlock-> getJITCode()->dfg()->osrEntryDataForBytecodeIndex(bytecodeIndex);55 OSREntryData* entry = codeBlock->jitCode()->dfg()->osrEntryDataForBytecodeIndex(bytecodeIndex); 56 56 57 57 if (!entry) { … … 164 164 // 5) Find and return the destination machine code address. 165 165 166 void* result = codeBlock-> getJITCode()->executableAddressAtOffset(entry->m_machineCodeOffset);166 void* result = codeBlock->jitCode()->executableAddressAtOffset(entry->m_machineCodeOffset); 167 167 168 168 if (Options::verboseOSR()) -
trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
r153121 r153177 61 61 CodeLocationJump OSRExit::codeLocationForRepatch(CodeBlock* dfgCodeBlock) const 62 62 { 63 return CodeLocationJump(dfgCodeBlock-> getJITCode()->dataAddressAtOffset(m_patchableCodeOffset));63 return CodeLocationJump(dfgCodeBlock->jitCode()->dataAddressAtOffset(m_patchableCodeOffset)); 64 64 } 65 65 -
trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp
r153121 r153177 49 49 50 50 ASSERT(codeBlock); 51 ASSERT(codeBlock-> getJITType() == JITCode::DFGJIT);51 ASSERT(codeBlock->jitType() == JITCode::DFGJIT); 52 52 53 53 VM* vm = &exec->vm(); 54 54 55 55 uint32_t exitIndex = vm->osrExitIndex; 56 OSRExit& exit = codeBlock-> getJITCode()->dfg()->osrExit[exitIndex];56 OSRExit& exit = codeBlock->jitCode()->dfg()->osrExit[exitIndex]; 57 57 58 58 prepareCodeOriginForOSRExit(exec, exit.m_codeOrigin); … … 60 60 // Compute the value recoveries. 61 61 Operands<ValueRecovery> operands; 62 codeBlock-> getJITCode()->dfg()->variableEventStream.reconstruct(codeBlock, exit.m_codeOrigin, codeBlock->getJITCode()->dfg()->minifiedDFG, exit.m_streamIndex, operands);62 codeBlock->jitCode()->dfg()->variableEventStream.reconstruct(codeBlock, exit.m_codeOrigin, codeBlock->jitCode()->dfg()->minifiedDFG, exit.m_streamIndex, operands); 63 63 64 64 // There may be an override, for forward speculations. … … 70 70 SpeculationRecovery* recovery = 0; 71 71 if (exit.m_recoveryIndex != UINT_MAX) 72 recovery = &codeBlock-> getJITCode()->dfg()->speculationRecovery[exit.m_recoveryIndex];72 recovery = &codeBlock->jitCode()->dfg()->speculationRecovery[exit.m_recoveryIndex]; 73 73 74 74 #if DFG_ENABLE(DEBUG_VERBOSE) … … 85 85 jit.jitAssertHasValidCallFrame(); 86 86 87 if (vm->m_perBytecodeProfiler && codeBlock-> getJITCode()->dfgCommon()->compilation) {87 if (vm->m_perBytecodeProfiler && codeBlock->jitCode()->dfgCommon()->compilation) { 88 88 Profiler::Database& database = *vm->m_perBytecodeProfiler; 89 Profiler::Compilation* compilation = codeBlock-> getJITCode()->dfgCommon()->compilation.get();89 Profiler::Compilation* compilation = codeBlock->jitCode()->dfgCommon()->compilation.get(); 90 90 91 91 Profiler::OSRExit* profilerExit = compilation->addOSRExit( -
trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp
r153121 r153177 79 79 { 80 80 #if USE(JSVALUE64) 81 ASSERT(jit.baselineCodeBlock()-> getJITType() == JITCode::BaselineJIT);81 ASSERT(jit.baselineCodeBlock()->jitType() == JITCode::BaselineJIT); 82 82 jit.storePtr(AssemblyHelpers::TrustedImmPtr(jit.baselineCodeBlock()), AssemblyHelpers::addressFor((VirtualRegister)JSStack::CodeBlock)); 83 83 … … 93 93 ASSERT(mapping->m_bytecodeIndex == returnBytecodeIndex); 94 94 95 void* jumpTarget = baselineCodeBlockForCaller-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);95 void* jumpTarget = baselineCodeBlockForCaller->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 96 96 97 97 GPRReg callerFrameGPR; … … 112 112 } 113 113 #else // USE(JSVALUE64) // so this is the 32-bit part 114 ASSERT(jit.baselineCodeBlock()-> getJITType() == JITCode::BaselineJIT);114 ASSERT(jit.baselineCodeBlock()->jitType() == JITCode::BaselineJIT); 115 115 jit.storePtr(AssemblyHelpers::TrustedImmPtr(jit.baselineCodeBlock()), AssemblyHelpers::addressFor((VirtualRegister)JSStack::CodeBlock)); 116 116 … … 126 126 ASSERT(mapping->m_bytecodeIndex == returnBytecodeIndex); 127 127 128 void* jumpTarget = baselineCodeBlockForCaller-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);128 void* jumpTarget = baselineCodeBlockForCaller->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 129 129 130 130 GPRReg callerFrameGPR; … … 163 163 ASSERT(mapping->m_bytecodeIndex == exit.m_codeOrigin.bytecodeIndex); 164 164 165 void* jumpTarget = baselineCodeBlock-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);165 void* jumpTarget = baselineCodeBlock->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 166 166 167 167 jit.move(AssemblyHelpers::TrustedImmPtr(jumpTarget), GPRInfo::regT2); -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r153169 r153177 1726 1726 dataLog(*codeBlock, ": Entered reoptimize\n"); 1727 1727 // We must be called with the baseline code block. 1728 ASSERT(JITCode::isBaselineCode(codeBlock-> getJITType()));1728 ASSERT(JITCode::isBaselineCode(codeBlock->jitType())); 1729 1729 1730 1730 // If I am my own replacement, then reoptimization has already been triggered. … … 1736 1736 // to check our logic. 1737 1737 ASSERT(codeBlock->hasOptimizedReplacement()); 1738 ASSERT(JITCode::isOptimizingJIT(codeBlock->replacement()-> getJITType()));1738 ASSERT(JITCode::isOptimizingJIT(codeBlock->replacement()->jitType())); 1739 1739 1740 1740 codeBlock->reoptimize(); -
trunk/Source/JavaScriptCore/dfg/DFGVariableEventStream.cpp
r153121 r153177 111 111 unsigned index, Operands<ValueRecovery>& valueRecoveries) const 112 112 { 113 ASSERT(codeBlock-> getJITType() == JITCode::DFGJIT);113 ASSERT(codeBlock->jitType() == JITCode::DFGJIT); 114 114 CodeBlock* baselineCodeBlock = codeBlock->baselineVersion(); 115 115 -
trunk/Source/JavaScriptCore/ftl/FTLOSRExit.cpp
r153121 r153177 58 58 return CodeLocationJump( 59 59 reinterpret_cast<char*>( 60 ftlCodeBlock-> getJITCode()->ftl()->exitThunks().dataLocation()) +60 ftlCodeBlock->jitCode()->ftl()->exitThunks().dataLocation()) + 61 61 m_patchableCodeOffset); 62 62 } -
trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
r153121 r153177 173 173 174 174 ASSERT(codeBlock); 175 ASSERT(codeBlock-> getJITType() == JITCode::FTLJIT);175 ASSERT(codeBlock->jitType() == JITCode::FTLJIT); 176 176 177 177 VM* vm = &exec->vm(); 178 178 179 OSRExit& exit = codeBlock-> getJITCode()->ftl()->osrExit[exitID];179 OSRExit& exit = codeBlock->jitCode()->ftl()->osrExit[exitID]; 180 180 181 181 prepareCodeOriginForOSRExit(exec, exit.m_codeOrigin); -
trunk/Source/JavaScriptCore/heap/DFGCodeBlocks.cpp
r153147 r153177 42 42 43 43 for (HashSet<CodeBlock*>::iterator iter = m_set.begin(); iter != m_set.end(); ++iter) { 44 if ((*iter)-> getJITCode()->dfgCommon()->isJettisoned)44 if ((*iter)->jitCode()->dfgCommon()->isJettisoned) 45 45 toRemove.append(adoptRef(*iter)); 46 46 } … … 53 53 54 54 ASSERT(codeBlock); 55 ASSERT(JITCode::isOptimizingJIT(codeBlock-> getJITType()));55 ASSERT(JITCode::isOptimizingJIT(codeBlock->jitType())); 56 56 57 57 // It should not have already been jettisoned. 58 ASSERT(!codeBlock-> getJITCode()->dfgCommon()->isJettisoned);58 ASSERT(!codeBlock->jitCode()->dfgCommon()->isJettisoned); 59 59 60 60 // We should have this block already. 61 61 ASSERT(m_set.find(codeBlock) != m_set.end()); 62 62 63 codeBlock-> getJITCode()->dfgCommon()->isJettisoned = true;63 codeBlock->jitCode()->dfgCommon()->isJettisoned = true; 64 64 } 65 65 … … 67 67 { 68 68 for (HashSet<CodeBlock*>::iterator iter = m_set.begin(); iter != m_set.end(); ++iter) { 69 (*iter)-> getJITCode()->dfgCommon()->mayBeExecuting = false;70 (*iter)-> getJITCode()->dfgCommon()->visitAggregateHasBeenCalled = false;69 (*iter)->jitCode()->dfgCommon()->mayBeExecuting = false; 70 (*iter)->jitCode()->dfgCommon()->visitAggregateHasBeenCalled = false; 71 71 } 72 72 } … … 77 77 78 78 for (HashSet<CodeBlock*>::iterator iter = m_set.begin(); iter != m_set.end(); ++iter) { 79 if ((*iter)-> getJITCode()->dfgCommon()->isJettisoned && !(*iter)->getJITCode()->dfgCommon()->mayBeExecuting)79 if ((*iter)->jitCode()->dfgCommon()->isJettisoned && !(*iter)->jitCode()->dfgCommon()->mayBeExecuting) 80 80 toRemove.append(adoptRef(*iter)); 81 81 } … … 85 85 { 86 86 for (HashSet<CodeBlock*>::iterator iter = m_set.begin(); iter != m_set.end(); ++iter) { 87 if ((*iter)-> getJITCode()->dfgCommon()->mayBeExecuting)87 if ((*iter)->jitCode()->dfgCommon()->mayBeExecuting) 88 88 (*iter)->visitAggregate(visitor); 89 89 } -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r153145 r153177 473 473 return 0; 474 474 #if ENABLE(DFG_JIT) 475 if (JITCode::isOptimizingJIT(codeBlock-> getJITType()))475 if (JITCode::isOptimizingJIT(codeBlock->jitType())) 476 476 return codeBlock->codeOrigin(callFrame->codeOriginIndexForDFG()).bytecodeIndex; 477 477 #endif … … 500 500 if (wasCalledByHost) { 501 501 #if ENABLE(DFG_JIT) 502 if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock-> getJITType())) {502 if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock->jitType())) { 503 503 unsigned codeOriginIndex = callFrame->callerFrame()->removeHostCallFrameFlag()->codeOriginIndexForDFG(); 504 504 CodeOrigin origin = callerCodeBlock->codeOrigin(codeOriginIndex); … … 521 521 callerCodeBlock = newCodeBlock; 522 522 } 523 } else if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock-> getJITType())) {523 } else if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock->jitType())) { 524 524 CodeOrigin origin; 525 525 if (!callerCodeBlock->codeOriginForReturn(callFrame->returnPC(), origin)) { -
trunk/Source/JavaScriptCore/jit/JITDriver.h
r153165 r153177 46 46 VM& vm = exec->vm(); 47 47 48 if (jitType == codeBlock-> getJITType())48 if (jitType == codeBlock->jitType()) 49 49 return CompilationNotNeeded; 50 50 … … 83 83 VM& vm = exec->vm(); 84 84 85 if (jitType == codeBlock-> getJITType())85 if (jitType == codeBlock->jitType()) 86 86 return CompilationNotNeeded; 87 87 -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r153170 r153177 1090 1090 1091 1091 CodeBlock* optimizedCodeBlock = codeBlock->replacement(); 1092 ASSERT(JITCode::isOptimizingJIT(optimizedCodeBlock-> getJITType()));1093 1094 if (optimizedCodeBlock-> getJITType() == JITCode::FTLJIT) {1092 ASSERT(JITCode::isOptimizingJIT(optimizedCodeBlock->jitType())); 1093 1094 if (optimizedCodeBlock->jitType() == JITCode::FTLJIT) { 1095 1095 // FTL JIT doesn't support OSR entry yet. 1096 1096 // https://bugs.webkit.org/show_bug.cgi?id=113625 -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r153170 r153177 328 328 329 329 if (kind == Prologue) 330 LLINT_RETURN_TWO(codeBlock-> getJITCode()->executableAddress(), exec);330 LLINT_RETURN_TWO(codeBlock->jitCode()->executableAddress(), exec); 331 331 ASSERT(kind == ArityCheck); 332 LLINT_RETURN_TWO(codeBlock-> getJITCodeWithArityCheck().executableAddress(), exec);332 LLINT_RETURN_TWO(codeBlock->jitCodeWithArityCheck().executableAddress(), exec); 333 333 } 334 334 … … 376 376 LLINT_RETURN_TWO(0, exec); 377 377 378 ASSERT(codeBlock-> getJITType() == JITCode::BaselineJIT);378 ASSERT(codeBlock->jitType() == JITCode::BaselineJIT); 379 379 380 380 Vector<BytecodeAndMachineOffset> map; … … 384 384 ASSERT(mapping->m_bytecodeIndex == static_cast<unsigned>(pc - codeBlock->instructions().begin())); 385 385 386 void* jumpTarget = codeBlock-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);386 void* jumpTarget = codeBlock->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 387 387 ASSERT(jumpTarget); 388 388 -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r153170 r153177 97 97 static void jettisonCodeBlock(VM& vm, RefPtr<T>& codeBlock) 98 98 { 99 ASSERT(JITCode::isOptimizingJIT(codeBlock-> getJITType()));99 ASSERT(JITCode::isOptimizingJIT(codeBlock->jitType())); 100 100 ASSERT(codeBlock->alternative()); 101 101 RefPtr<T> codeBlockToJettison = codeBlock.release(); … … 163 163 ASSERT(!!m_evalCodeBlock); 164 164 JSObject* error = 0; 165 if (!JITCode::isOptimizingJIT(m_evalCodeBlock-> getJITType()))166 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_evalCodeBlock-> getJITType()), &result, bytecodeIndex);165 if (!JITCode::isOptimizingJIT(m_evalCodeBlock->jitType())) 166 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_evalCodeBlock->jitType()), &result, bytecodeIndex); 167 167 else 168 168 result = CompilationNotNeeded; … … 249 249 { 250 250 jettisonCodeBlock(vm, m_evalCodeBlock); 251 m_jitCodeForCall = m_evalCodeBlock-> getJITCode();251 m_jitCodeForCall = m_evalCodeBlock->jitCode(); 252 252 ASSERT(!m_jitCodeForCallWithArityCheck); 253 253 } … … 300 300 ASSERT(!!m_programCodeBlock); 301 301 JSObject* error = 0; 302 if (!JITCode::isOptimizingJIT(m_programCodeBlock-> getJITType()))303 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_programCodeBlock-> getJITType()), &result, bytecodeIndex);302 if (!JITCode::isOptimizingJIT(m_programCodeBlock->jitType())) 303 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_programCodeBlock->jitType()), &result, bytecodeIndex); 304 304 else 305 305 result = CompilationNotNeeded; … … 355 355 { 356 356 jettisonCodeBlock(vm, m_programCodeBlock); 357 m_jitCodeForCall = m_programCodeBlock-> getJITCode();357 m_jitCodeForCall = m_programCodeBlock->jitCode(); 358 358 ASSERT(!m_jitCodeForCallWithArityCheck); 359 359 } … … 465 465 result = static_cast<FunctionCodeBlock*>(result->alternative()); 466 466 RELEASE_ASSERT(result); 467 ASSERT(JITCode::isBaselineCode(result-> getJITType()));467 ASSERT(JITCode::isBaselineCode(result->jitType())); 468 468 return result; 469 469 } … … 474 474 ASSERT(!!m_codeBlockForCall); 475 475 JSObject* error = 0; 476 if (!JITCode::isOptimizingJIT(m_codeBlockForCall-> getJITType()))477 error = compileForCallInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForCall-> getJITType()), &result, bytecodeIndex);476 if (!JITCode::isOptimizingJIT(m_codeBlockForCall->jitType())) 477 error = compileForCallInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForCall->jitType()), &result, bytecodeIndex); 478 478 else 479 479 result = CompilationNotNeeded; … … 487 487 ASSERT(!!m_codeBlockForConstruct); 488 488 JSObject* error = 0; 489 if (!JITCode::isOptimizingJIT(m_codeBlockForConstruct-> getJITType()))490 error = compileForConstructInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForConstruct-> getJITType()), &result, bytecodeIndex);489 if (!JITCode::isOptimizingJIT(m_codeBlockForConstruct->jitType())) 490 error = compileForConstructInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForConstruct->jitType()), &result, bytecodeIndex); 491 491 else 492 492 result = CompilationNotNeeded; … … 613 613 { 614 614 jettisonCodeBlock(vm, m_codeBlockForCall); 615 m_jitCodeForCall = m_codeBlockForCall-> getJITCode();616 m_jitCodeForCallWithArityCheck = m_codeBlockForCall-> getJITCodeWithArityCheck();615 m_jitCodeForCall = m_codeBlockForCall->jitCode(); 616 m_jitCodeForCallWithArityCheck = m_codeBlockForCall->jitCodeWithArityCheck(); 617 617 } 618 618 … … 620 620 { 621 621 jettisonCodeBlock(vm, m_codeBlockForConstruct); 622 m_jitCodeForConstruct = m_codeBlockForConstruct-> getJITCode();623 m_jitCodeForConstructWithArityCheck = m_codeBlockForConstruct-> getJITCodeWithArityCheck();622 m_jitCodeForConstruct = m_codeBlockForConstruct->jitCode(); 623 m_jitCodeForConstructWithArityCheck = m_codeBlockForConstruct->jitCodeWithArityCheck(); 624 624 } 625 625 #endif -
trunk/Source/JavaScriptCore/tools/CodeProfile.cpp
r140594 r153177 106 106 else { 107 107 CodeBlock* codeBlock = static_cast<CodeBlock*>(ownerUID); 108 if (codeBlock-> getJITType() == JITCode::DFGJIT)108 if (codeBlock->jitType() == JITCode::DFGJIT) 109 109 type = DFGJIT; 110 110 else if (codeBlock->canCompileWithDFGState() != DFG::CanCompile)
Note:
See TracChangeset
for help on using the changeset viewer.