Changeset 118270 in webkit for trunk/Source/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- May 23, 2012, 5:05:21 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JIT.cpp
r117198 r118270 97 97 void JIT::emitOptimizationCheck(OptimizationCheckKind kind) 98 98 { 99 if (! shouldEmitProfiling())99 if (!canBeOptimized()) 100 100 return; 101 101 … … 418 418 #if ENABLE(VALUE_PROFILER) 419 419 RareCaseProfile* rareCaseProfile = 0; 420 if ( m_canBeOptimized)420 if (shouldEmitProfiling()) 421 421 rareCaseProfile = m_codeBlock->addRareCaseProfile(m_bytecodeOffset); 422 422 #endif … … 498 498 499 499 #if ENABLE(VALUE_PROFILER) 500 if ( m_canBeOptimized)500 if (shouldEmitProfiling()) 501 501 add32(TrustedImm32(1), AbsoluteAddress(&rareCaseProfile->m_counter)); 502 502 #endif … … 566 566 567 567 #if ENABLE(VALUE_PROFILER) 568 m_canBeOptimized = m_codeBlock->canCompileWithDFG(); 568 DFG::CapabilityLevel level = m_codeBlock->canCompileWithDFG(); 569 switch (level) { 570 case DFG::CannotCompile: 571 m_canBeOptimized = false; 572 m_shouldEmitProfiling = false; 573 break; 574 case DFG::ShouldProfile: 575 m_canBeOptimized = false; 576 m_shouldEmitProfiling = true; 577 break; 578 case DFG::CanCompile: 579 m_canBeOptimized = true; 580 m_shouldEmitProfiling = true; 581 break; 582 default: 583 ASSERT_NOT_REACHED(); 584 break; 585 } 569 586 #endif 570 587 … … 620 637 621 638 #if ENABLE(VALUE_PROFILER) 622 if ( m_canBeOptimized)639 if (canBeOptimized()) 623 640 add32(TrustedImm32(1), AbsoluteAddress(&m_codeBlock->m_executionEntryCount)); 624 641 #endif
Note:
See TracChangeset
for help on using the changeset viewer.