Changeset 163027 in webkit for trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp
- Timestamp:
- Jan 29, 2014, 11:18:54 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp
r162940 r163027 1 1 /* 2 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 57 57 #if ENABLE(DFG_JIT) 58 58 static CompilationResult compileImpl( 59 VM& vm, CodeBlock* codeBlock, Co mpilationMode mode, unsigned osrEntryBytecodeIndex,60 const Operands<JSValue>& mustHandleValues,61 PassRefPtr<DeferredCompilationCallback> callback , Worklist* worklist)59 VM& vm, CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock, CompilationMode mode, 60 unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues, 61 PassRefPtr<DeferredCompilationCallback> callback) 62 62 { 63 63 SamplingRegion samplingRegion("DFG Compilation (Driver)"); … … 68 68 ASSERT(codeBlock->alternative()); 69 69 ASSERT(codeBlock->alternative()->jitType() == JITCode::BaselineJIT); 70 ASSERT(!profiledDFGCodeBlock || profiledDFGCodeBlock->jitType() == JITCode::DFGJIT); 70 71 71 72 if (!Options::useDFGJIT() || !MacroAssembler::supportsFloatingPoint()) … … 89 90 vm.getCTIStub(osrExitGenerationThunkGenerator); 90 91 vm.getCTIStub(throwExceptionFromCallSlowPathGenerator); 91 vm.getCTIStub(linkCallThunkGenerator); 92 vm.getCTIStub(linkConstructThunkGenerator); 93 vm.getCTIStub(linkClosureCallThunkGenerator); 94 vm.getCTIStub(virtualCallThunkGenerator); 95 vm.getCTIStub(virtualConstructThunkGenerator); 92 if (mode == DFGMode) { 93 vm.getCTIStub(linkCallThunkGenerator); 94 vm.getCTIStub(linkConstructThunkGenerator); 95 vm.getCTIStub(linkClosureCallThunkGenerator); 96 vm.getCTIStub(virtualCallThunkGenerator); 97 vm.getCTIStub(virtualConstructThunkGenerator); 98 } else { 99 vm.getCTIStub(linkCallThatPreservesRegsThunkGenerator); 100 vm.getCTIStub(linkConstructThatPreservesRegsThunkGenerator); 101 vm.getCTIStub(linkClosureCallThatPreservesRegsThunkGenerator); 102 vm.getCTIStub(virtualCallThatPreservesRegsThunkGenerator); 103 vm.getCTIStub(virtualConstructThatPreservesRegsThunkGenerator); 104 } 96 105 97 106 RefPtr<Plan> plan = adoptRef( 98 new Plan(codeBlock, mode, osrEntryBytecodeIndex, mustHandleValues));107 new Plan(codeBlock, profiledDFGCodeBlock, mode, osrEntryBytecodeIndex, mustHandleValues)); 99 108 100 if (worklist) { 109 bool enableConcurrentJIT; 110 #if ENABLE(CONCURRENT_JIT) 111 enableConcurrentJIT = Options::enableConcurrentJIT(); 112 #else // ENABLE(CONCURRENT_JIT) 113 enableConcurrentJIT = false; 114 #endif // ENABLE(CONCURRENT_JIT) 115 if (enableConcurrentJIT) { 116 Worklist* worklist = ensureGlobalWorklistFor(mode); 101 117 plan->callback = callback; 102 118 if (logCompilationChanges()) … … 111 127 #else // ENABLE(DFG_JIT) 112 128 static CompilationResult compileImpl( 113 VM&, CodeBlock*, Co mpilationMode, unsigned, const Operands<JSValue>&,114 PassRefPtr<DeferredCompilationCallback> , Worklist*)129 VM&, CodeBlock*, CodeBlock*, CompilationMode, unsigned, const Operands<JSValue>&, 130 PassRefPtr<DeferredCompilationCallback>) 115 131 { 116 132 return CompilationFailed; … … 119 135 120 136 CompilationResult compile( 121 VM& vm, CodeBlock* codeBlock, Co mpilationMode mode, unsigned osrEntryBytecodeIndex,122 const Operands<JSValue>& mustHandleValues,123 PassRefPtr<DeferredCompilationCallback> passedCallback , Worklist* worklist)137 VM& vm, CodeBlock* codeBlock, CodeBlock* profiledDFGCodeBlock, CompilationMode mode, 138 unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues, 139 PassRefPtr<DeferredCompilationCallback> passedCallback) 124 140 { 125 141 RefPtr<DeferredCompilationCallback> callback = passedCallback; 126 142 CompilationResult result = compileImpl( 127 vm, codeBlock, mode, osrEntryBytecodeIndex, mustHandleValues, callback, worklist); 143 vm, codeBlock, profiledDFGCodeBlock, mode, osrEntryBytecodeIndex, mustHandleValues, 144 callback); 128 145 if (result != CompilationDeferred) 129 146 callback->compilationDidComplete(codeBlock, result);
Note:
See TracChangeset
for help on using the changeset viewer.