|
Lines 329-422
protected:
a/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h_sec1
|
| 329 |
}; |
329 |
}; |
| 330 |
|
330 |
|
| 331 |
template<typename JumpType, typename FunctionType, typename ResultType> |
331 |
template<typename JumpType, typename FunctionType, typename ResultType> |
| 332 |
inline PassOwnPtr<SlowPathGenerator> slowPathCall( |
332 |
inline std::unique_ptr<SlowPathGenerator> slowPathCall( |
| 333 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
333 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
| 334 |
ResultType result, SpillRegistersMode spillMode = NeedToSpill) |
334 |
ResultType result, SpillRegistersMode spillMode = NeedToSpill) |
| 335 |
{ |
335 |
{ |
| 336 |
return adoptPtr( |
336 |
return std::make_unique<CallResultAndNoArgumentsSlowPathGenerator<JumpType, FunctionType, ResultType>>( |
| 337 |
new CallResultAndNoArgumentsSlowPathGenerator< |
337 |
from, jit, function, spillMode, result); |
| 338 |
JumpType, FunctionType, ResultType>( |
|
|
| 339 |
from, jit, function, spillMode, result)); |
| 340 |
} |
338 |
} |
| 341 |
|
339 |
|
| 342 |
template< |
340 |
template< |
| 343 |
typename JumpType, typename FunctionType, typename ResultType, |
341 |
typename JumpType, typename FunctionType, typename ResultType, |
| 344 |
typename ArgumentType1> |
342 |
typename ArgumentType1> |
| 345 |
inline PassOwnPtr<SlowPathGenerator> slowPathCall( |
343 |
inline std::unique_ptr<SlowPathGenerator> slowPathCall( |
| 346 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
344 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
| 347 |
ResultType result, ArgumentType1 argument1, |
345 |
ResultType result, ArgumentType1 argument1, |
| 348 |
SpillRegistersMode spillMode = NeedToSpill) |
346 |
SpillRegistersMode spillMode = NeedToSpill) |
| 349 |
{ |
347 |
{ |
| 350 |
return adoptPtr( |
348 |
return std::make_unique<CallResultAndOneArgumentSlowPathGenerator<JumpType, FunctionType, ResultType, ArgumentType1>>( |
| 351 |
new CallResultAndOneArgumentSlowPathGenerator< |
349 |
from, jit, function, spillMode, result, argument1); |
| 352 |
JumpType, FunctionType, ResultType, ArgumentType1>( |
|
|
| 353 |
from, jit, function, spillMode, result, argument1)); |
| 354 |
} |
350 |
} |
| 355 |
|
351 |
|
| 356 |
template< |
352 |
template< |
| 357 |
typename JumpType, typename FunctionType, typename ResultType, |
353 |
typename JumpType, typename FunctionType, typename ResultType, |
| 358 |
typename ArgumentType1, typename ArgumentType2> |
354 |
typename ArgumentType1, typename ArgumentType2> |
| 359 |
inline PassOwnPtr<SlowPathGenerator> slowPathCall( |
355 |
inline std::unique_ptr<SlowPathGenerator> slowPathCall( |
| 360 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
356 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
| 361 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
357 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
| 362 |
SpillRegistersMode spillMode = NeedToSpill) |
358 |
SpillRegistersMode spillMode = NeedToSpill) |
| 363 |
{ |
359 |
{ |
| 364 |
return adoptPtr( |
360 |
return std::make_unique<CallResultAndTwoArgumentsSlowPathGenerator<JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2>>( |
| 365 |
new CallResultAndTwoArgumentsSlowPathGenerator< |
361 |
from, jit, function, spillMode, result, argument1, argument2); |
| 366 |
JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2>( |
|
|
| 367 |
from, jit, function, spillMode, result, argument1, argument2)); |
| 368 |
} |
362 |
} |
| 369 |
|
363 |
|
| 370 |
template< |
364 |
template< |
| 371 |
typename JumpType, typename FunctionType, typename ResultType, |
365 |
typename JumpType, typename FunctionType, typename ResultType, |
| 372 |
typename ArgumentType1, typename ArgumentType2, typename ArgumentType3> |
366 |
typename ArgumentType1, typename ArgumentType2, typename ArgumentType3> |
| 373 |
inline PassOwnPtr<SlowPathGenerator> slowPathCall( |
367 |
inline std::unique_ptr<SlowPathGenerator> slowPathCall( |
| 374 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
368 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
| 375 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
369 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
| 376 |
ArgumentType3 argument3, SpillRegistersMode spillMode = NeedToSpill) |
370 |
ArgumentType3 argument3, SpillRegistersMode spillMode = NeedToSpill) |
| 377 |
{ |
371 |
{ |
| 378 |
return adoptPtr( |
372 |
return std::make_unique<CallResultAndThreeArgumentsSlowPathGenerator<JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2, |
| 379 |
new CallResultAndThreeArgumentsSlowPathGenerator< |
373 |
ArgumentType3>>(from, jit, function, spillMode, result, argument1, argument2, argument3); |
| 380 |
JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2, |
|
|
| 381 |
ArgumentType3>( |
| 382 |
from, jit, function, spillMode, result, argument1, argument2, |
| 383 |
argument3)); |
| 384 |
} |
374 |
} |
| 385 |
|
375 |
|
| 386 |
template< |
376 |
template< |
| 387 |
typename JumpType, typename FunctionType, typename ResultType, |
377 |
typename JumpType, typename FunctionType, typename ResultType, |
| 388 |
typename ArgumentType1, typename ArgumentType2, typename ArgumentType3, |
378 |
typename ArgumentType1, typename ArgumentType2, typename ArgumentType3, |
| 389 |
typename ArgumentType4> |
379 |
typename ArgumentType4> |
| 390 |
inline PassOwnPtr<SlowPathGenerator> slowPathCall( |
380 |
inline std::unique_ptr<SlowPathGenerator> slowPathCall( |
| 391 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
381 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
| 392 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
382 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
| 393 |
ArgumentType3 argument3, ArgumentType4 argument4, |
383 |
ArgumentType3 argument3, ArgumentType4 argument4, |
| 394 |
SpillRegistersMode spillMode = NeedToSpill) |
384 |
SpillRegistersMode spillMode = NeedToSpill) |
| 395 |
{ |
385 |
{ |
| 396 |
return adoptPtr( |
386 |
return std::make_unique<CallResultAndFourArgumentsSlowPathGenerator<JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2, |
| 397 |
new CallResultAndFourArgumentsSlowPathGenerator< |
387 |
ArgumentType3, ArgumentType4>>(from, jit, function, spillMode, result, argument1, argument2, argument3, argument4); |
| 398 |
JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2, |
|
|
| 399 |
ArgumentType3, ArgumentType4>( |
| 400 |
from, jit, function, spillMode, result, argument1, argument2, |
| 401 |
argument3, argument4)); |
| 402 |
} |
388 |
} |
| 403 |
|
389 |
|
| 404 |
template< |
390 |
template< |
| 405 |
typename JumpType, typename FunctionType, typename ResultType, |
391 |
typename JumpType, typename FunctionType, typename ResultType, |
| 406 |
typename ArgumentType1, typename ArgumentType2, typename ArgumentType3, |
392 |
typename ArgumentType1, typename ArgumentType2, typename ArgumentType3, |
| 407 |
typename ArgumentType4, typename ArgumentType5> |
393 |
typename ArgumentType4, typename ArgumentType5> |
| 408 |
inline PassOwnPtr<SlowPathGenerator> slowPathCall( |
394 |
inline std::unique_ptr<SlowPathGenerator> slowPathCall( |
| 409 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
395 |
JumpType from, SpeculativeJIT* jit, FunctionType function, |
| 410 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
396 |
ResultType result, ArgumentType1 argument1, ArgumentType2 argument2, |
| 411 |
ArgumentType3 argument3, ArgumentType4 argument4, ArgumentType5 argument5, |
397 |
ArgumentType3 argument3, ArgumentType4 argument4, ArgumentType5 argument5, |
| 412 |
SpillRegistersMode spillMode = NeedToSpill) |
398 |
SpillRegistersMode spillMode = NeedToSpill) |
| 413 |
{ |
399 |
{ |
| 414 |
return adoptPtr( |
400 |
return std::make_unique<CallResultAndFiveArgumentsSlowPathGenerator<JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2, |
| 415 |
new CallResultAndFiveArgumentsSlowPathGenerator< |
401 |
ArgumentType3, ArgumentType4, ArgumentType5>>(from, jit, function, spillMode, result, argument1, argument2, argument3, |
| 416 |
JumpType, FunctionType, ResultType, ArgumentType1, ArgumentType2, |
402 |
argument4, argument5); |
| 417 |
ArgumentType3, ArgumentType4, ArgumentType5>( |
|
|
| 418 |
from, jit, function, spillMode, result, argument1, argument2, |
| 419 |
argument3, argument4, argument5)); |
| 420 |
} |
403 |
} |
| 421 |
|
404 |
|
| 422 |
template<typename JumpType, typename DestinationType, typename SourceType, unsigned numberOfAssignments> |
405 |
template<typename JumpType, typename DestinationType, typename SourceType, unsigned numberOfAssignments> |
|
Lines 449-485
private:
a/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h_sec2
|
| 449 |
}; |
432 |
}; |
| 450 |
|
433 |
|
| 451 |
template<typename JumpType, typename DestinationType, typename SourceType, unsigned numberOfAssignments> |
434 |
template<typename JumpType, typename DestinationType, typename SourceType, unsigned numberOfAssignments> |
| 452 |
inline PassOwnPtr<SlowPathGenerator> slowPathMove( |
435 |
inline std::unique_ptr<SlowPathGenerator> slowPathMove( |
| 453 |
JumpType from, SpeculativeJIT* jit, SourceType source[numberOfAssignments], DestinationType destination[numberOfAssignments]) |
436 |
JumpType from, SpeculativeJIT* jit, SourceType source[numberOfAssignments], DestinationType destination[numberOfAssignments]) |
| 454 |
{ |
437 |
{ |
| 455 |
return adoptPtr( |
438 |
return std::make_unique<AssigningSlowPathGenerator<JumpType, DestinationType, SourceType, numberOfAssignments>>( |
| 456 |
new AssigningSlowPathGenerator< |
439 |
from, jit, destination, source); |
| 457 |
JumpType, DestinationType, SourceType, numberOfAssignments>( |
|
|
| 458 |
from, jit, destination, source)); |
| 459 |
} |
440 |
} |
| 460 |
|
441 |
|
| 461 |
template<typename JumpType, typename DestinationType, typename SourceType> |
442 |
template<typename JumpType, typename DestinationType, typename SourceType> |
| 462 |
inline PassOwnPtr<SlowPathGenerator> slowPathMove( |
443 |
inline std::unique_ptr<SlowPathGenerator> slowPathMove( |
| 463 |
JumpType from, SpeculativeJIT* jit, SourceType source, DestinationType destination) |
444 |
JumpType from, SpeculativeJIT* jit, SourceType source, DestinationType destination) |
| 464 |
{ |
445 |
{ |
| 465 |
SourceType sourceArray[1] = { source }; |
446 |
SourceType sourceArray[1] = { source }; |
| 466 |
DestinationType destinationArray[1] = { destination }; |
447 |
DestinationType destinationArray[1] = { destination }; |
| 467 |
return adoptPtr( |
448 |
return std::make_unique<AssigningSlowPathGenerator<JumpType, DestinationType, SourceType, 1>>( |
| 468 |
new AssigningSlowPathGenerator< |
449 |
from, jit, destinationArray, sourceArray); |
| 469 |
JumpType, DestinationType, SourceType, 1>( |
|
|
| 470 |
from, jit, destinationArray, sourceArray)); |
| 471 |
} |
450 |
} |
| 472 |
|
451 |
|
| 473 |
template<typename JumpType, typename DestinationType, typename SourceType> |
452 |
template<typename JumpType, typename DestinationType, typename SourceType> |
| 474 |
inline PassOwnPtr<SlowPathGenerator> slowPathMove( |
453 |
inline std::unique_ptr<SlowPathGenerator> slowPathMove( |
| 475 |
JumpType from, SpeculativeJIT* jit, SourceType source1, DestinationType destination1, SourceType source2, DestinationType destination2) |
454 |
JumpType from, SpeculativeJIT* jit, SourceType source1, DestinationType destination1, SourceType source2, DestinationType destination2) |
| 476 |
{ |
455 |
{ |
| 477 |
SourceType sourceArray[2] = { source1, source2 }; |
456 |
SourceType sourceArray[2] = { source1, source2 }; |
| 478 |
DestinationType destinationArray[2] = { destination1, destination2 }; |
457 |
DestinationType destinationArray[2] = { destination1, destination2 }; |
| 479 |
return adoptPtr( |
458 |
return std::make_unique<AssigningSlowPathGenerator<JumpType, DestinationType, SourceType, 2>>( |
| 480 |
new AssigningSlowPathGenerator< |
459 |
from, jit, destinationArray, sourceArray); |
| 481 |
JumpType, DestinationType, SourceType, 2>( |
|
|
| 482 |
from, jit, destinationArray, sourceArray)); |
| 483 |
} |
460 |
} |
| 484 |
|
461 |
|
| 485 |
} } // namespace JSC::DFG |
462 |
} } // namespace JSC::DFG |