Changeset 108358 in webkit for trunk/Source/JavaScriptCore/runtime/Executable.cpp
- Timestamp:
- Feb 21, 2012, 8:26:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r108309 r108358 30 30 #include "CodeBlock.h" 31 31 #include "DFGDriver.h" 32 #include "ExecutionHarness.h"33 32 #include "JIT.h" 34 33 #include "JITDriver.h" … … 90 89 static void jettisonCodeBlock(JSGlobalData& globalData, OwnPtr<T>& codeBlock) 91 90 { 92 ASSERT( JITCode::isOptimizingJIT(codeBlock->getJITType()));91 ASSERT(codeBlock->getJITType() != JITCode::BaselineJIT); 93 92 ASSERT(codeBlock->alternative()); 94 93 OwnPtr<T> codeBlockToJettison = codeBlock.release(); … … 177 176 } 178 177 179 #if ENABLE(JIT)180 void EvalExecutable::jitCompile(JSGlobalData& globalData)181 {182 bool result = jitCompileIfAppropriate(globalData, m_evalCodeBlock, m_jitCodeForCall, JITCode::bottomTierJIT());183 ASSERT_UNUSED(result, result);184 }185 #endif186 187 inline const char* samplingDescription(JITCode::JITType jitType)188 {189 switch (jitType) {190 case JITCode::InterpreterThunk:191 return "Interpreter Compilation (TOTAL)";192 case JITCode::BaselineJIT:193 return "Baseline Compilation (TOTAL)";194 case JITCode::DFGJIT:195 return "DFG Compilation (TOTAL)";196 default:197 ASSERT_NOT_REACHED();198 return 0;199 }200 }201 202 178 JSObject* EvalExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 203 179 { 204 SamplingRegion samplingRegion( samplingDescription(jitType));180 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 205 181 206 182 #if !ENABLE(JIT) … … 243 219 244 220 #if ENABLE(JIT) 245 if (! prepareForExecution(*globalData, m_evalCodeBlock, m_jitCodeForCall, jitType))221 if (!jitCompileIfAppropriate(*globalData, m_evalCodeBlock, m_jitCodeForCall, jitType)) 246 222 return 0; 247 223 #endif … … 328 304 } 329 305 330 #if ENABLE(JIT)331 void ProgramExecutable::jitCompile(JSGlobalData& globalData)332 {333 bool result = jitCompileIfAppropriate(globalData, m_programCodeBlock, m_jitCodeForCall, JITCode::bottomTierJIT());334 ASSERT_UNUSED(result, result);335 }336 #endif337 338 306 JSObject* ProgramExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 339 307 { 340 SamplingRegion samplingRegion( samplingDescription(jitType));308 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 341 309 342 310 #if !ENABLE(JIT) … … 377 345 378 346 #if ENABLE(JIT) 379 if (! prepareForExecution(*globalData, m_programCodeBlock, m_jitCodeForCall, jitType))347 if (!jitCompileIfAppropriate(*globalData, m_programCodeBlock, m_jitCodeForCall, jitType)) 380 348 return 0; 381 349 #endif … … 453 421 result = static_cast<FunctionCodeBlock*>(result->alternative()); 454 422 ASSERT(result); 455 ASSERT( JITCode::isBaselineCode(result->getJITType()));423 ASSERT(result->getJITType() == JITCode::BaselineJIT); 456 424 return result; 457 425 } … … 478 446 return error; 479 447 } 480 481 #if ENABLE(JIT)482 void FunctionExecutable::jitCompileForCall(JSGlobalData& globalData)483 {484 bool result = jitCompileFunctionIfAppropriate(globalData, m_codeBlockForCall, m_jitCodeForCall, m_jitCodeForCallWithArityCheck, m_symbolTable, JITCode::bottomTierJIT());485 ASSERT_UNUSED(result, result);486 }487 488 void FunctionExecutable::jitCompileForConstruct(JSGlobalData& globalData)489 {490 bool result = jitCompileFunctionIfAppropriate(globalData, m_codeBlockForConstruct, m_jitCodeForConstruct, m_jitCodeForConstructWithArityCheck, m_symbolTable, JITCode::bottomTierJIT());491 ASSERT_UNUSED(result, result);492 }493 #endif494 448 495 449 FunctionCodeBlock* FunctionExecutable::codeBlockWithBytecodeFor(CodeSpecializationKind kind) … … 537 491 JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 538 492 { 539 SamplingRegion samplingRegion( samplingDescription(jitType));493 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 540 494 541 495 #if !ENABLE(JIT) … … 559 513 560 514 #if ENABLE(JIT) 561 if (! prepareFunctionForExecution(exec->globalData(), m_codeBlockForCall, m_jitCodeForCall, m_jitCodeForCallWithArityCheck, m_symbolTable, jitType, CodeForCall))515 if (!jitCompileFunctionIfAppropriate(exec->globalData(), m_codeBlockForCall, m_jitCodeForCall, m_jitCodeForCallWithArityCheck, m_symbolTable, jitType)) 562 516 return 0; 563 517 #endif … … 579 533 JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 580 534 { 581 SamplingRegion samplingRegion( samplingDescription(jitType));535 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 582 536 583 537 #if !ENABLE(JIT) … … 601 555 602 556 #if ENABLE(JIT) 603 if (! prepareFunctionForExecution(exec->globalData(), m_codeBlockForConstruct, m_jitCodeForConstruct, m_jitCodeForConstructWithArityCheck, m_symbolTable, jitType, CodeForConstruct))557 if (!jitCompileFunctionIfAppropriate(exec->globalData(), m_codeBlockForConstruct, m_jitCodeForConstruct, m_jitCodeForConstructWithArityCheck, m_symbolTable, jitType)) 604 558 return 0; 605 559 #endif
Note:
See TracChangeset
for help on using the changeset viewer.