Changeset 187505 in webkit for trunk/Source/JavaScriptCore/jit/JITOperations.cpp
- Timestamp:
- Jul 28, 2015, 1:12:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r187351 r187505 753 753 } 754 754 755 inline char* linkFor( 756 ExecState* execCallee, CallLinkInfo* callLinkInfo, CodeSpecializationKind kind, 757 RegisterPreservationMode registers) 755 char* JIT_OPERATION operationLinkCall(ExecState* execCallee, CallLinkInfo* callLinkInfo) 758 756 { 759 757 ExecState* exec = execCallee->callerFrame(); 760 758 VM* vm = &exec->vm(); 759 CodeSpecializationKind kind = callLinkInfo->specializationKind(); 761 760 NativeCallFrameTracer tracer(vm, exec); 762 761 … … 777 776 CodeBlock* codeBlock = 0; 778 777 if (executable->isHostFunction()) 779 codePtr = executable->entrypointFor(*vm, kind, MustCheckArity, registers);778 codePtr = executable->entrypointFor(*vm, kind, MustCheckArity, callLinkInfo->registerPreservationMode()); 780 779 else { 781 780 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); … … 797 796 else 798 797 arity = ArityCheckNotRequired; 799 codePtr = functionExecutable->entrypointFor(*vm, kind, arity, registers);798 codePtr = functionExecutable->entrypointFor(*vm, kind, arity, callLinkInfo->registerPreservationMode()); 800 799 } 801 800 if (!callLinkInfo->seenOnce()) 802 801 callLinkInfo->setSeen(); 803 802 else 804 linkFor(execCallee, *callLinkInfo, codeBlock, callee, codePtr , kind, registers);803 linkFor(execCallee, *callLinkInfo, codeBlock, callee, codePtr); 805 804 806 805 return reinterpret_cast<char*>(codePtr.executableAddress()); 807 806 } 808 807 809 char* JIT_OPERATION operationLinkCall(ExecState* execCallee, CallLinkInfo* callLinkInfo)810 {811 return linkFor(execCallee, callLinkInfo, CodeForCall, RegisterPreservationNotRequired);812 }813 814 char* JIT_OPERATION operationLinkConstruct(ExecState* execCallee, CallLinkInfo* callLinkInfo)815 {816 return linkFor(execCallee, callLinkInfo, CodeForConstruct, RegisterPreservationNotRequired);817 }818 819 char* JIT_OPERATION operationLinkCallThatPreservesRegs(ExecState* execCallee, CallLinkInfo* callLinkInfo)820 {821 return linkFor(execCallee, callLinkInfo, CodeForCall, MustPreserveRegisters);822 }823 824 char* JIT_OPERATION operationLinkConstructThatPreservesRegs(ExecState* execCallee, CallLinkInfo* callLinkInfo)825 {826 return linkFor(execCallee, callLinkInfo, CodeForConstruct, MustPreserveRegisters);827 }828 829 808 inline char* virtualForWithFunction( 830 ExecState* execCallee, CodeSpecializationKind kind, RegisterPreservationMode registers, 831 JSCell*& calleeAsFunctionCell) 809 ExecState* execCallee, CallLinkInfo* callLinkInfo, JSCell*& calleeAsFunctionCell) 832 810 { 833 811 ExecState* exec = execCallee->callerFrame(); 834 812 VM* vm = &exec->vm(); 813 CodeSpecializationKind kind = callLinkInfo->specializationKind(); 835 814 NativeCallFrameTracer tracer(vm, exec); 836 815 … … 858 837 } 859 838 return reinterpret_cast<char*>(executable->entrypointFor( 860 *vm, kind, MustCheckArity, registers).executableAddress()); 861 } 862 863 inline char* virtualFor( 864 ExecState* execCallee, CodeSpecializationKind kind, RegisterPreservationMode registers) 839 *vm, kind, MustCheckArity, callLinkInfo->registerPreservationMode()).executableAddress()); 840 } 841 842 char* JIT_OPERATION operationLinkPolymorphicCall(ExecState* execCallee, CallLinkInfo* callLinkInfo) 843 { 844 ASSERT(callLinkInfo->specializationKind() == CodeForCall); 845 JSCell* calleeAsFunctionCell; 846 char* result = virtualForWithFunction(execCallee, callLinkInfo, calleeAsFunctionCell); 847 848 linkPolymorphicCall(execCallee, *callLinkInfo, CallVariant(calleeAsFunctionCell)); 849 850 return result; 851 } 852 853 char* JIT_OPERATION operationVirtualCall(ExecState* execCallee, CallLinkInfo* callLinkInfo) 865 854 { 866 855 JSCell* calleeAsFunctionCellIgnored; 867 return virtualForWithFunction(execCallee, kind, registers, calleeAsFunctionCellIgnored); 868 } 869 870 char* JIT_OPERATION operationLinkPolymorphicCall(ExecState* execCallee, CallLinkInfo* callLinkInfo) 871 { 872 JSCell* calleeAsFunctionCell; 873 char* result = virtualForWithFunction(execCallee, CodeForCall, RegisterPreservationNotRequired, calleeAsFunctionCell); 874 875 linkPolymorphicCall(execCallee, *callLinkInfo, CallVariant(calleeAsFunctionCell), RegisterPreservationNotRequired); 876 877 return result; 878 } 879 880 char* JIT_OPERATION operationVirtualCall(ExecState* execCallee, CallLinkInfo*) 881 { 882 return virtualFor(execCallee, CodeForCall, RegisterPreservationNotRequired); 883 } 884 885 char* JIT_OPERATION operationVirtualConstruct(ExecState* execCallee, CallLinkInfo*) 886 { 887 return virtualFor(execCallee, CodeForConstruct, RegisterPreservationNotRequired); 888 } 889 890 char* JIT_OPERATION operationLinkPolymorphicCallThatPreservesRegs(ExecState* execCallee, CallLinkInfo* callLinkInfo) 891 { 892 JSCell* calleeAsFunctionCell; 893 char* result = virtualForWithFunction(execCallee, CodeForCall, MustPreserveRegisters, calleeAsFunctionCell); 894 895 linkPolymorphicCall(execCallee, *callLinkInfo, CallVariant(calleeAsFunctionCell), MustPreserveRegisters); 896 897 return result; 898 } 899 900 char* JIT_OPERATION operationVirtualCallThatPreservesRegs(ExecState* execCallee, CallLinkInfo*) 901 { 902 return virtualFor(execCallee, CodeForCall, MustPreserveRegisters); 903 } 904 905 char* JIT_OPERATION operationVirtualConstructThatPreservesRegs(ExecState* execCallee, CallLinkInfo*) 906 { 907 return virtualFor(execCallee, CodeForConstruct, MustPreserveRegisters); 856 return virtualForWithFunction(execCallee, callLinkInfo, calleeAsFunctionCellIgnored); 908 857 } 909 858
Note:
See TracChangeset
for help on using the changeset viewer.