Changeset 289417 in webkit for trunk/Source/JavaScriptCore/runtime/VM.cpp
- Timestamp:
- Feb 8, 2022, 12:42:04 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/VM.cpp
r288885 r289417 633 633 case BoundFunctionCallIntrinsic: 634 634 return boundFunctionCallGenerator; 635 case RemoteFunctionCallIntrinsic: 636 return remoteFunctionCallGenerator; 635 637 default: 636 638 return nullptr; … … 708 710 return getOrCreate(m_fastCanConstructBoundExecutable); 709 711 return getOrCreate(m_fastBoundExecutable); 712 } 713 714 NativeExecutable* VM::getRemoteFunction(bool isJSFunction) 715 { 716 bool slowCase = !isJSFunction; 717 auto getOrCreate = [&] (Weak<NativeExecutable>& slot) -> NativeExecutable* { 718 if (auto* cached = slot.get()) 719 return cached; 720 NativeExecutable* result = getHostFunction( 721 slowCase ? remoteFunctionCallGeneric : remoteFunctionCallForJSFunction, 722 slowCase ? NoIntrinsic : RemoteFunctionCallIntrinsic, 723 callHostFunctionAsConstructor, nullptr, String()); 724 slot = Weak<NativeExecutable>(result); 725 return result; 726 }; 727 728 if (slowCase) 729 return getOrCreate(m_slowRemoteFunctionExecutable); 730 return getOrCreate(m_fastRemoteFunctionExecutable); 710 731 } 711 732
Note:
See TracChangeset
for help on using the changeset viewer.