Changeset 150565 in webkit
- Timestamp:
- May 22, 2013, 9:53:58 PM (12 years ago)
- Location:
- branches/dfgFourthTier/Source/JavaScriptCore
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog
r150563 r150565 1 2013-05-22 Filip Pizlo <fpizlo@apple.com> 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 <fpizlo@apple.com> 2 94 -
branches/dfgFourthTier/Source/JavaScriptCore/assembler/RepatchBuffer.h
r148347 r150565 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(); -
branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r150466 r150565 119 119 void CodeBlock::dump(PrintStream& out) const 120 120 { 121 dumpAssumingJITType(out, getJITType());121 dumpAssumingJITType(out, jitType()); 122 122 } 123 123 … … 2048 2048 { 2049 2049 #if ENABLE(PARALLEL_GC) && ENABLE(DFG_JIT) 2050 if (JITCode::isOptimizingJIT( getJITType())) {2050 if (JITCode::isOptimizingJIT(jitType())) { 2051 2051 DFG::CommonData* dfgCommon = m_jitCode->dfgCommon(); 2052 2052 … … 2301 2301 #if ENABLE(JIT) 2302 2302 // Handle inline caches. 2303 if (!! getJITCode()) {2303 if (!!jitCode()) { 2304 2304 RepatchBuffer repatchBuffer(this); 2305 2305 for (unsigned i = 0; i < numberOfCallLinkInfos(); ++i) { … … 2361 2361 dataLog("Clearing structure cache (kind ", static_cast<int>(stubInfo.accessType), ") in ", *this, ".\n"); 2362 2362 2363 switch ( getJITType()) {2363 switch (jitType()) { 2364 2364 case JITCode::BaselineJIT: 2365 2365 if (isGetByIdAccess(accessType)) … … 2406 2406 2407 2407 #if ENABLE(DFG_JIT) 2408 if (!JITCode::isOptimizingJIT( getJITType()))2408 if (!JITCode::isOptimizingJIT(jitType())) 2409 2409 return; 2410 2410 … … 2429 2429 // to get its replacement. But we'll know that it's the original baseline code 2430 2430 // block because it won't have JIT code yet and it won't have an alternative. 2431 if ( getJITType() == JITCode::None && !alternative())2431 if (jitType() == JITCode::None && !alternative()) 2432 2432 return this; 2433 2433 … … 2437 2437 result = result->alternative(); 2438 2438 ASSERT(result); 2439 ASSERT(JITCode::isBaselineCode(result-> getJITType()));2439 ASSERT(JITCode::isBaselineCode(result->jitType())); 2440 2440 return result; 2441 2441 #else … … 2447 2447 bool CodeBlock::hasOptimizedReplacement() 2448 2448 { 2449 ASSERT(JITCode::isBaselineCode( getJITType()));2450 bool result = JITCode::isHigherTier(replacement()-> getJITType(), getJITType());2449 ASSERT(JITCode::isBaselineCode(jitType())); 2450 bool result = JITCode::isHigherTier(replacement()->jitType(), jitType()); 2451 2451 if (result) 2452 ASSERT(JITCode::isOptimizingJIT(replacement()-> getJITType()));2452 ASSERT(JITCode::isOptimizingJIT(replacement()->jitType())); 2453 2453 else { 2454 ASSERT(JITCode::isBaselineCode(replacement()-> getJITType()));2454 ASSERT(JITCode::isBaselineCode(replacement()->jitType())); 2455 2455 ASSERT(replacement() == this); 2456 2456 } … … 2689 2689 RELEASE_ASSERT(exec->codeBlock()); 2690 2690 RELEASE_ASSERT(exec->codeBlock() == this); 2691 RELEASE_ASSERT(JITCode::isBaselineCode( getJITType()));2691 RELEASE_ASSERT(JITCode::isBaselineCode(jitType())); 2692 2692 Instruction* instruction = exec->currentVPC(); 2693 2693 RELEASE_ASSERT(instruction); … … 2705 2705 return 1; 2706 2706 2707 if ( getJITCode()->contains(returnAddress.value())) {2708 unsigned callReturnOffset = getJITCode()->offsetOf(returnAddress.value());2707 if (jitCode()->contains(returnAddress.value())) { 2708 unsigned callReturnOffset = jitCode()->offsetOf(returnAddress.value()); 2709 2709 CallReturnOffsetToBytecodeOffset* result = 2710 2710 binarySearch<CallReturnOffsetToBytecodeOffset, unsigned>( … … 2728 2728 return false; 2729 2729 2730 if (! getJITCode()->contains(returnAddress.value())) {2730 if (!jitCode()->contains(returnAddress.value())) { 2731 2731 codeOrigin = findClosureCallForReturnPC(returnAddress)->codeOrigin(); 2732 2732 return true; 2733 2733 } 2734 2734 2735 unsigned offset = getJITCode()->offsetOf(returnAddress.value());2735 unsigned offset = jitCode()->offsetOf(returnAddress.value()); 2736 2736 CodeOriginAtCallReturnOffset* entry = 2737 2737 tryBinarySearch<CodeOriginAtCallReturnOffset, unsigned>( … … 2809 2809 JSObject* ProgramCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex) 2810 2810 { 2811 if (JITCode::isHigherTier(replacement()-> getJITType(), getJITType())) {2811 if (JITCode::isHigherTier(replacement()->jitType(), jitType())) { 2812 2812 result = CompilationNotNeeded; 2813 2813 return 0; … … 2824 2824 JSObject* EvalCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex) 2825 2825 { 2826 if (JITCode::isHigherTier(replacement()-> getJITType(), getJITType())) {2826 if (JITCode::isHigherTier(replacement()->jitType(), jitType())) { 2827 2827 result = CompilationNotNeeded; 2828 2828 return 0; … … 2839 2839 JSObject* FunctionCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex) 2840 2840 { 2841 if (JITCode::isHigherTier(replacement()-> getJITType(), getJITType())) {2841 if (JITCode::isHigherTier(replacement()->jitType(), jitType())) { 2842 2842 result = CompilationNotNeeded; 2843 2843 return 0; … … 2871 2871 void ProgramCodeBlock::jettison() 2872 2872 { 2873 ASSERT(JITCode::isOptimizingJIT( getJITType()));2873 ASSERT(JITCode::isOptimizingJIT(jitType())); 2874 2874 ASSERT(this == replacement()); 2875 2875 if (DFG::shouldShowDisassembly()) … … 2880 2880 void EvalCodeBlock::jettison() 2881 2881 { 2882 ASSERT(JITCode::isOptimizingJIT( getJITType()));2882 ASSERT(JITCode::isOptimizingJIT(jitType())); 2883 2883 ASSERT(this == replacement()); 2884 2884 if (DFG::shouldShowDisassembly()) … … 2889 2889 void FunctionCodeBlock::jettison() 2890 2890 { 2891 ASSERT(JITCode::isOptimizingJIT( getJITType()));2891 ASSERT(JITCode::isOptimizingJIT(jitType())); 2892 2892 ASSERT(this == replacement()); 2893 2893 if (DFG::shouldShowDisassembly()) … … 2898 2898 CompilationResult ProgramCodeBlock::jitCompileImpl(ExecState* exec) 2899 2899 { 2900 ASSERT( getJITType() == JITCode::InterpreterThunk);2900 ASSERT(jitType() == JITCode::InterpreterThunk); 2901 2901 ASSERT(this == replacement()); 2902 2902 return static_cast<ProgramExecutable*>(ownerExecutable())->jitCompile(exec); … … 2905 2905 CompilationResult EvalCodeBlock::jitCompileImpl(ExecState* exec) 2906 2906 { 2907 ASSERT( getJITType() == JITCode::InterpreterThunk);2907 ASSERT(jitType() == JITCode::InterpreterThunk); 2908 2908 ASSERT(this == replacement()); 2909 2909 return static_cast<EvalExecutable*>(ownerExecutable())->jitCompile(exec); … … 2912 2912 CompilationResult FunctionCodeBlock::jitCompileImpl(ExecState* exec) 2913 2913 { 2914 ASSERT( getJITType() == JITCode::InterpreterThunk);2914 ASSERT(jitType() == JITCode::InterpreterThunk); 2915 2915 ASSERT(this == replacement()); 2916 2916 return static_cast<FunctionExecutable*>(ownerExecutable())->jitCompileFor(exec, m_isConstructor ? CodeForConstruct : CodeForCall); … … 3116 3116 void CodeBlock::setOptimizationThresholdBasedOnCompilationResult(CompilationResult result) 3117 3117 { 3118 RELEASE_ASSERT( getJITType() == JITCode::BaselineJIT);3118 RELEASE_ASSERT(jitType() == JITCode::BaselineJIT); 3119 3119 RELEASE_ASSERT((result == CompilationSuccessful) == (replacement() != this)); 3120 3120 switch (result) { 3121 3121 case CompilationSuccessful: 3122 RELEASE_ASSERT(JITCode::isOptimizingJIT(replacement()-> getJITType()));3122 RELEASE_ASSERT(JITCode::isOptimizingJIT(replacement()->jitType())); 3123 3123 optimizeNextInvocation(); 3124 3124 break; … … 3148 3148 uint32_t CodeBlock::adjustedExitCountThreshold(uint32_t desiredThreshold) 3149 3149 { 3150 ASSERT(JITCode::isOptimizingJIT( getJITType()));3150 ASSERT(JITCode::isOptimizingJIT(jitType())); 3151 3151 // Compute this the lame way so we don't saturate. This is called infrequently 3152 3152 // enough that this loop won't hurt us. … … 3293 3293 void CodeBlock::tallyFrequentExitSites() 3294 3294 { 3295 ASSERT(JITCode::isOptimizingJIT( getJITType()));3296 ASSERT(alternative()-> getJITType() == JITCode::BaselineJIT);3295 ASSERT(JITCode::isOptimizingJIT(jitType())); 3296 ASSERT(alternative()->jitType() == JITCode::BaselineJIT); 3297 3297 3298 3298 CodeBlock* profiledBlock = alternative(); 3299 3299 3300 switch ( getJITType()) {3300 switch (jitType()) { 3301 3301 case JITCode::DFGJIT: { 3302 3302 DFG::JITCode* jitCode = m_jitCode->dfg(); -
branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h
r150563 r150565 191 191 CallLinkInfo& getCallLinkInfo(unsigned bytecodeIndex) 192 192 { 193 ASSERT(JITCode::isBaselineCode( getJITType()));193 ASSERT(JITCode::isBaselineCode(jitType())); 194 194 return *(binarySearch<CallLinkInfo, unsigned>(m_callLinkInfos, m_callLinkInfos.size(), bytecodeIndex, getCallLinkInfoBytecodeIndex)); 195 195 } … … 280 280 #endif 281 281 } 282 PassRefPtr<JITCode> getJITCode() { return m_jitCode; }283 MacroAssemblerCodePtr getJITCodeWithArityCheck() { return m_jitCodeWithArityCheck; }284 JITCode::JITType getJITType() const282 PassRefPtr<JITCode> jitCode() { return m_jitCode; } 283 MacroAssemblerCodePtr jitCodeWithArityCheck() { return m_jitCodeWithArityCheck; } 284 JITCode::JITType jitType() const 285 285 { 286 286 JITCode* jitCode = m_jitCode.get(); … … 292 292 bool hasBaselineJITProfiling() const 293 293 { 294 return getJITType() == JITCode::BaselineJIT;294 return jitType() == JITCode::BaselineJIT; 295 295 } 296 296 virtual JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex) = 0; … … 299 299 CompilationResult jitCompile(ExecState* exec) 300 300 { 301 if ( getJITType() != JITCode::InterpreterThunk) {302 ASSERT( getJITType() == JITCode::BaselineJIT);301 if (jitType() != JITCode::InterpreterThunk) { 302 ASSERT(jitType() == JITCode::BaselineJIT); 303 303 return CompilationNotNeeded; 304 304 } … … 318 318 bool hasOptimizedReplacement(); 319 319 #else 320 JITCode::JITType getJITType() const { return JITCode::BaselineJIT; }320 JITCode::JITType jitType() const { return JITCode::BaselineJIT; } 321 321 #endif 322 322 … … 622 622 bool addFrequentExitSite(const DFG::FrequentExitSite& site) 623 623 { 624 ASSERT(JITCode::isBaselineCode( getJITType()));624 ASSERT(JITCode::isBaselineCode(jitType())); 625 625 return m_exitProfile.add(site); 626 626 } … … 974 974 // stale. So if a basline JIT CodeBlock gets scanned, we can assume that 975 975 // this means that it's live. 976 if (!JITCode::isOptimizingJIT( getJITType()))976 if (!JITCode::isOptimizingJIT(jitType())) 977 977 return true; 978 978 … … 1244 1244 inline bool ExecState::isInlineCallFrame() 1245 1245 { 1246 if (LIKELY(!codeBlock() || !JITCode::isOptimizingJIT(codeBlock()-> getJITType())))1246 if (LIKELY(!codeBlock() || !JITCode::isOptimizingJIT(codeBlock()->jitType()))) 1247 1247 return false; 1248 1248 return isInlineCallFrameSlow(); -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp
r131858 r150565 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 -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h
r148697 r150565 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 } -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGDriver.cpp
r150465 r150565 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); -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
r150465 r150565 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()) -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
r148347 r150565 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 -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp
r148697 r150565 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( -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp
r148350 r150565 78 78 { 79 79 #if USE(JSVALUE64) 80 ASSERT(jit.baselineCodeBlock()-> getJITType() == JITCode::BaselineJIT);80 ASSERT(jit.baselineCodeBlock()->jitType() == JITCode::BaselineJIT); 81 81 jit.storePtr(AssemblyHelpers::TrustedImmPtr(jit.baselineCodeBlock()), AssemblyHelpers::addressFor((VirtualRegister)JSStack::CodeBlock)); 82 82 … … 92 92 ASSERT(mapping->m_bytecodeIndex == returnBytecodeIndex); 93 93 94 void* jumpTarget = baselineCodeBlockForCaller-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);94 void* jumpTarget = baselineCodeBlockForCaller->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 95 95 96 96 GPRReg callerFrameGPR; … … 111 111 } 112 112 #else // USE(JSVALUE64) // so this is the 32-bit part 113 ASSERT(jit.baselineCodeBlock()-> getJITType() == JITCode::BaselineJIT);113 ASSERT(jit.baselineCodeBlock()->jitType() == JITCode::BaselineJIT); 114 114 jit.storePtr(AssemblyHelpers::TrustedImmPtr(jit.baselineCodeBlock()), AssemblyHelpers::addressFor((VirtualRegister)JSStack::CodeBlock)); 115 115 … … 125 125 ASSERT(mapping->m_bytecodeIndex == returnBytecodeIndex); 126 126 127 void* jumpTarget = baselineCodeBlockForCaller-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);127 void* jumpTarget = baselineCodeBlockForCaller->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 128 128 129 129 GPRReg callerFrameGPR; … … 162 162 ASSERT(mapping->m_bytecodeIndex == exit.m_codeOrigin.bytecodeIndex); 163 163 164 void* jumpTarget = baselineCodeBlock-> getJITCode()->executableAddressAtOffset(mapping->m_machineCodeOffset);164 void* jumpTarget = baselineCodeBlock->jitCode()->executableAddressAtOffset(mapping->m_machineCodeOffset); 165 165 166 166 jit.move(AssemblyHelpers::TrustedImmPtr(jumpTarget), GPRInfo::regT2); -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGOperations.cpp
r150465 r150565 1690 1690 dataLog(*codeBlock, ": Entered reoptimize\n"); 1691 1691 // We must be called with the baseline code block. 1692 ASSERT(JITCode::isBaselineCode(codeBlock-> getJITType()));1692 ASSERT(JITCode::isBaselineCode(codeBlock->jitType())); 1693 1693 1694 1694 // If I am my own replacement, then reoptimization has already been triggered. … … 1700 1700 // to check our logic. 1701 1701 ASSERT(codeBlock->hasOptimizedReplacement()); 1702 ASSERT(JITCode::isOptimizingJIT(codeBlock->replacement()-> getJITType()));1702 ASSERT(JITCode::isOptimizingJIT(codeBlock->replacement()->jitType())); 1703 1703 1704 1704 codeBlock->reoptimize(); -
branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGVariableEventStream.cpp
r148347 r150565 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 -
branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLOSRExit.cpp
r148347 r150565 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 } -
branches/dfgFourthTier/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
r148697 r150565 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); -
branches/dfgFourthTier/Source/JavaScriptCore/heap/DFGCodeBlocks.cpp
r149860 r150565 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 } -
branches/dfgFourthTier/Source/JavaScriptCore/interpreter/Interpreter.cpp
r149636 r150565 581 581 #if ENABLE(JIT) || ENABLE(LLINT) 582 582 #if ENABLE(DFG_JIT) 583 if (JITCode::isOptimizingJIT(codeBlock-> getJITType()))583 if (JITCode::isOptimizingJIT(codeBlock->jitType())) 584 584 return codeBlock->lineNumberForBytecodeOffset(codeBlock->codeOrigin(callFrame->codeOriginIndexForDFG()).bytecodeIndex); 585 585 #endif … … 617 617 #if ENABLE(JIT) || ENABLE(LLINT) 618 618 #if ENABLE(DFG_JIT) 619 if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock-> getJITType())) {619 if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock->jitType())) { 620 620 unsigned codeOriginIndex = callerFrame->codeOriginIndexForDFG(); 621 621 bytecodeOffset = callerCodeBlock->codeOrigin(codeOriginIndex).bytecodeIndex; … … 637 637 callerCodeBlock = newCodeBlock; 638 638 } 639 } else if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock-> getJITType())) {639 } else if (callerCodeBlock && JITCode::isOptimizingJIT(callerCodeBlock->jitType())) { 640 640 CodeOrigin origin; 641 641 if (!callerCodeBlock->codeOriginForReturn(callFrame->returnPC(), origin)) -
branches/dfgFourthTier/Source/JavaScriptCore/jit/JITDriver.h
r150323 r150565 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 -
branches/dfgFourthTier/Source/JavaScriptCore/jit/JITStubs.cpp
r150466 r150565 1035 1035 1036 1036 CodeBlock* optimizedCodeBlock = codeBlock->replacement(); 1037 ASSERT(JITCode::isOptimizingJIT(optimizedCodeBlock-> getJITType()));1038 1039 if (optimizedCodeBlock-> getJITType() == JITCode::FTLJIT) {1037 ASSERT(JITCode::isOptimizingJIT(optimizedCodeBlock->jitType())); 1038 1039 if (optimizedCodeBlock->jitType() == JITCode::FTLJIT) { 1040 1040 // FTL JIT doesn't support OSR entry yet. 1041 1041 // https://bugs.webkit.org/show_bug.cgi?id=113625 -
branches/dfgFourthTier/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r150466 r150565 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 -
branches/dfgFourthTier/Source/JavaScriptCore/runtime/Executable.cpp
r150466 r150565 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(); … … 161 161 ASSERT(!!m_evalCodeBlock); 162 162 JSObject* error = 0; 163 if (!JITCode::isOptimizingJIT(m_evalCodeBlock-> getJITType()))164 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_evalCodeBlock-> getJITType()), &result, bytecodeIndex);163 if (!JITCode::isOptimizingJIT(m_evalCodeBlock->jitType())) 164 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_evalCodeBlock->jitType()), &result, bytecodeIndex); 165 165 else 166 166 result = CompilationNotNeeded; … … 247 247 { 248 248 jettisonCodeBlock(vm, m_evalCodeBlock); 249 m_jitCodeForCall = m_evalCodeBlock-> getJITCode();249 m_jitCodeForCall = m_evalCodeBlock->jitCode(); 250 250 ASSERT(!m_jitCodeForCallWithArityCheck); 251 251 } … … 298 298 ASSERT(!!m_programCodeBlock); 299 299 JSObject* error = 0; 300 if (!JITCode::isOptimizingJIT(m_programCodeBlock-> getJITType()))301 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_programCodeBlock-> getJITType()), &result, bytecodeIndex);300 if (!JITCode::isOptimizingJIT(m_programCodeBlock->jitType())) 301 error = compileInternal(exec, scope, JITCode::nextTierJIT(m_programCodeBlock->jitType()), &result, bytecodeIndex); 302 302 else 303 303 result = CompilationNotNeeded; … … 353 353 { 354 354 jettisonCodeBlock(vm, m_programCodeBlock); 355 m_jitCodeForCall = m_programCodeBlock-> getJITCode();355 m_jitCodeForCall = m_programCodeBlock->jitCode(); 356 356 ASSERT(!m_jitCodeForCallWithArityCheck); 357 357 } … … 463 463 result = static_cast<FunctionCodeBlock*>(result->alternative()); 464 464 RELEASE_ASSERT(result); 465 ASSERT(JITCode::isBaselineCode(result-> getJITType()));465 ASSERT(JITCode::isBaselineCode(result->jitType())); 466 466 return result; 467 467 } … … 472 472 ASSERT(!!m_codeBlockForCall); 473 473 JSObject* error = 0; 474 if (!JITCode::isOptimizingJIT(m_codeBlockForCall-> getJITType()))475 error = compileForCallInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForCall-> getJITType()), &result, bytecodeIndex);474 if (!JITCode::isOptimizingJIT(m_codeBlockForCall->jitType())) 475 error = compileForCallInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForCall->jitType()), &result, bytecodeIndex); 476 476 else 477 477 result = CompilationNotNeeded; … … 485 485 ASSERT(!!m_codeBlockForConstruct); 486 486 JSObject* error = 0; 487 if (!JITCode::isOptimizingJIT(m_codeBlockForConstruct-> getJITType()))488 error = compileForConstructInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForConstruct-> getJITType()), &result, bytecodeIndex);487 if (!JITCode::isOptimizingJIT(m_codeBlockForConstruct->jitType())) 488 error = compileForConstructInternal(exec, scope, JITCode::nextTierJIT(m_codeBlockForConstruct->jitType()), &result, bytecodeIndex); 489 489 else 490 490 result = CompilationNotNeeded; … … 607 607 { 608 608 jettisonCodeBlock(vm, m_codeBlockForCall); 609 m_jitCodeForCall = m_codeBlockForCall-> getJITCode();610 m_jitCodeForCallWithArityCheck = m_codeBlockForCall-> getJITCodeWithArityCheck();609 m_jitCodeForCall = m_codeBlockForCall->jitCode(); 610 m_jitCodeForCallWithArityCheck = m_codeBlockForCall->jitCodeWithArityCheck(); 611 611 } 612 612 … … 614 614 { 615 615 jettisonCodeBlock(vm, m_codeBlockForConstruct); 616 m_jitCodeForConstruct = m_codeBlockForConstruct-> getJITCode();617 m_jitCodeForConstructWithArityCheck = m_codeBlockForConstruct-> getJITCodeWithArityCheck();616 m_jitCodeForConstruct = m_codeBlockForConstruct->jitCode(); 617 m_jitCodeForConstructWithArityCheck = m_codeBlockForConstruct->jitCodeWithArityCheck(); 618 618 } 619 619 #endif -
branches/dfgFourthTier/Source/JavaScriptCore/tools/CodeProfile.cpp
r140594 r150565 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.