Changeset 192912 in webkit for trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
- Timestamp:
- Dec 1, 2015, 2:12:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r192896 r192912 5284 5284 OSRExitDescriptor& exitDescriptor = m_ftlState.jitCode->osrExitDescriptors.last(); 5285 5285 5286 StackmapArgumentList arguments = 5287 buildExitArguments(exitDescriptor, FormattedValue(), exitDescriptor.m_codeOrigin); 5286 StackmapArgumentList arguments = buildExitArguments(exitDescriptor, FormattedValue()); 5288 5287 callStackmap(exitDescriptor, arguments); 5289 5288 … … 9181 9180 9182 9181 StackmapArgumentList freshList = 9183 buildExitArguments(exitDescriptor, noValue(), exitDescriptor.m_codeOrigin,offsetOfExitArguments);9182 buildExitArguments(exitDescriptor, noValue(), offsetOfExitArguments); 9184 9183 arguments.appendVector(freshList); 9185 9184 } … … 9202 9201 } 9203 9202 9204 voidappendOSRExitDescriptor(ExitKind kind, ExceptionType exceptionType, FormattedValue lowValue, Node* highValue, NodeOrigin origin)9205 { 9206 m_ftlState.jitCode->osrExitDescriptors.append(OSRExitDescriptor(9203 OSRExitDescriptor& appendOSRExitDescriptor(ExitKind kind, ExceptionType exceptionType, FormattedValue lowValue, Node* highValue, NodeOrigin origin) 9204 { 9205 return m_ftlState.jitCode->osrExitDescriptors.alloc( 9207 9206 kind, exceptionType, lowValue.format(), m_graph.methodOfGettingAValueProfileFor(highValue), 9208 9207 origin.forExit, origin.semantic, 9209 9208 availabilityMap().m_locals.numberOfArguments(), 9210 availabilityMap().m_locals.numberOfLocals()) );9209 availabilityMap().m_locals.numberOfLocals()); 9211 9210 } 9212 9211 … … 9249 9248 m_out.speculate(failCondition), kind, lowValue, highValue, origin, isExceptionHandler); 9250 9249 #else // FTL_USES_B3 9251 appendOSRExitDescriptor(kind, isExceptionHandler ? ExceptionType::CCallException : ExceptionType::None, lowValue, highValue, origin); 9252 OSRExitDescriptor& exitDescriptor = m_ftlState.jitCode->osrExitDescriptors.last(); 9250 OSRExitDescriptor& exitDescriptor = appendOSRExitDescriptor(kind, isExceptionHandler ? ExceptionType::CCallException : ExceptionType::None, lowValue, highValue, origin); 9253 9251 9254 9252 if (failCondition == m_out.booleanTrue) { … … 9278 9276 void blessSpeculation(B3::StackmapValue* value, ExitKind kind, FormattedValue lowValue, Node* highValue, NodeOrigin origin, bool isExceptionHandler = false) 9279 9277 { 9280 appendOSRExitDescriptor(kind, isExceptionHandler ? ExceptionType::CCallException : ExceptionType::None, lowValue, highValue, origin); 9281 OSRExitDescriptor& exitDescriptor = m_ftlState.jitCode->osrExitDescriptors.last(); 9282 CodeOrigin codeOrigin = exitDescriptor.m_codeOrigin; 9283 StackmapArgumentList arguments = buildExitArguments(exitDescriptor, lowValue, codeOrigin); 9284 for (LValue child : arguments) 9285 value->append(child); 9278 OSRExitDescriptor& exitDescriptor = appendOSRExitDescriptor(kind, isExceptionHandler ? ExceptionType::CCallException : ExceptionType::None, lowValue, highValue, origin); 9279 value->appendAnys(buildExitArguments(exitDescriptor, lowValue)); 9286 9280 value->setGenerator( 9287 9281 [&] (CCallHelpers& jit, const B3::StackmapGenerationParams&) { … … 9294 9288 void emitOSRExitCall(OSRExitDescriptor& exitDescriptor, FormattedValue lowValue) 9295 9289 { 9296 StackmapArgumentList arguments; 9297 9298 CodeOrigin codeOrigin = exitDescriptor.m_codeOrigin; 9299 9300 buildExitArguments(exitDescriptor, arguments, lowValue, codeOrigin); 9301 9302 callStackmap(exitDescriptor, arguments); 9290 callStackmap(exitDescriptor, buildExitArguments(exitDescriptor, lowValue)); 9303 9291 } 9304 9292 #endif 9305 9293 9306 9294 StackmapArgumentList buildExitArguments( 9307 OSRExitDescriptor& exitDescriptor, FormattedValue lowValue, CodeOrigin codeOrigin,9295 OSRExitDescriptor& exitDescriptor, FormattedValue lowValue, 9308 9296 unsigned offsetOfExitArgumentsInStackmapLocations = 0) 9309 9297 { 9310 9298 StackmapArgumentList result; 9311 9299 buildExitArguments( 9312 exitDescriptor, result, lowValue, codeOrigin,offsetOfExitArgumentsInStackmapLocations);9300 exitDescriptor, result, lowValue, offsetOfExitArgumentsInStackmapLocations); 9313 9301 return result; 9314 9302 } … … 9316 9304 void buildExitArguments( 9317 9305 OSRExitDescriptor& exitDescriptor, StackmapArgumentList& arguments, FormattedValue lowValue, 9318 CodeOrigin codeOrigin,unsigned offsetOfExitArgumentsInStackmapLocations = 0)9306 unsigned offsetOfExitArgumentsInStackmapLocations = 0) 9319 9307 { 9320 9308 if (!!lowValue) … … 9322 9310 9323 9311 AvailabilityMap availabilityMap = this->availabilityMap(); 9324 availabilityMap.pruneByLiveness(m_graph, codeOrigin);9312 availabilityMap.pruneByLiveness(m_graph, exitDescriptor.m_codeOrigin); 9325 9313 9326 9314 HashMap<Node*, ExitTimeObjectMaterialization*> map; … … 9349 9337 DFG_ASSERT( 9350 9338 m_graph, m_node, 9351 (!(availability.isDead() && m_graph.isLiveInBytecode(VirtualRegister(operand), codeOrigin))) || m_graph.m_plan.mode == FTLForOSREntryMode);9339 (!(availability.isDead() && m_graph.isLiveInBytecode(VirtualRegister(operand), exitDescriptor.m_codeOrigin))) || m_graph.m_plan.mode == FTLForOSREntryMode); 9352 9340 } 9353 9341 ExitValue exitValue = exitValueForAvailability(arguments, map, availability); … … 9379 9367 9380 9368 #if !FTL_USES_B3 9381 void callStackmap(OSRExitDescriptor& exitDescriptor, StackmapArgumentList &arguments)9369 void callStackmap(OSRExitDescriptor& exitDescriptor, StackmapArgumentList arguments) 9382 9370 { 9383 9371 exitDescriptor.m_stackmapID = m_stackmapIDs++;
Note:
See TracChangeset
for help on using the changeset viewer.