Changeset 252015 in webkit for trunk/Source/JavaScriptCore/jit/JITOperations.cpp
- Timestamp:
- Nov 4, 2019, 2:20:37 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r251903 r252015 2645 2645 } 2646 2646 2647 ALWAYS_INLINE static JSValue profiledAdd(JSGlobalObject* globalObject, JSValue op1, JSValue op2, ArithProfile& arithProfile)2647 ALWAYS_INLINE static JSValue profiledAdd(JSGlobalObject* globalObject, JSValue op1, JSValue op2, BinaryArithProfile& arithProfile) 2648 2648 { 2649 2649 arithProfile.observeLHSAndRHS(op1, op2); … … 2661 2661 } 2662 2662 2663 EncodedJSValue JIT_OPERATION operationValueAddProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, ArithProfile* arithProfile)2663 EncodedJSValue JIT_OPERATION operationValueAddProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile* arithProfile) 2664 2664 { 2665 2665 ASSERT(arithProfile); … … 2679 2679 JSValue op2 = JSValue::decode(encodedOp2); 2680 2680 2681 ArithProfile* arithProfile = addIC->arithProfile();2681 BinaryArithProfile* arithProfile = addIC->arithProfile(); 2682 2682 ASSERT(arithProfile); 2683 2683 arithProfile->observeLHSAndRHS(op1, op2); … … 2701 2701 JITOperationPrologueCallFrameTracer tracer(vm, callFrame); 2702 2702 2703 ArithProfile* arithProfile = addIC->arithProfile();2703 BinaryArithProfile* arithProfile = addIC->arithProfile(); 2704 2704 ASSERT(arithProfile); 2705 2705 return JSValue::encode(profiledAdd(globalObject, JSValue::decode(encodedOp1), JSValue::decode(encodedOp2), *arithProfile)); … … 2716 2716 2717 2717 auto nonOptimizeVariant = operationValueAddNoOptimize; 2718 if ( ArithProfile* arithProfile = addIC->arithProfile())2718 if (BinaryArithProfile* arithProfile = addIC->arithProfile()) 2719 2719 arithProfile->observeLHSAndRHS(op1, op2); 2720 2720 addIC->generateOutOfLine(callFrame->codeBlock(), nonOptimizeVariant); … … 2749 2749 } 2750 2750 2751 ALWAYS_INLINE static EncodedJSValue profiledMul(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, ArithProfile& arithProfile, bool shouldObserveLHSAndRHSTypes = true)2751 ALWAYS_INLINE static EncodedJSValue profiledMul(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile& arithProfile, bool shouldObserveLHSAndRHSTypes = true) 2752 2752 { 2753 2753 VM& vm = globalObject->vm(); … … 2790 2790 2791 2791 auto nonOptimizeVariant = operationValueMulNoOptimize; 2792 if ( ArithProfile* arithProfile = mulIC->arithProfile())2792 if (BinaryArithProfile* arithProfile = mulIC->arithProfile()) 2793 2793 arithProfile->observeLHSAndRHS(JSValue::decode(encodedOp1), JSValue::decode(encodedOp2)); 2794 2794 mulIC->generateOutOfLine(callFrame->codeBlock(), nonOptimizeVariant); … … 2801 2801 } 2802 2802 2803 EncodedJSValue JIT_OPERATION operationValueMulProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, ArithProfile* arithProfile)2803 EncodedJSValue JIT_OPERATION operationValueMulProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile* arithProfile) 2804 2804 { 2805 2805 VM& vm = globalObject->vm(); … … 2817 2817 JITOperationPrologueCallFrameTracer tracer(vm, callFrame); 2818 2818 2819 ArithProfile* arithProfile = mulIC->arithProfile();2819 BinaryArithProfile* arithProfile = mulIC->arithProfile(); 2820 2820 ASSERT(arithProfile); 2821 2821 arithProfile->observeLHSAndRHS(JSValue::decode(encodedOp1), JSValue::decode(encodedOp2)); … … 2836 2836 JITOperationPrologueCallFrameTracer tracer(vm, callFrame); 2837 2837 2838 ArithProfile* arithProfile = mulIC->arithProfile();2838 BinaryArithProfile* arithProfile = mulIC->arithProfile(); 2839 2839 ASSERT(arithProfile); 2840 2840 return profiledMul(globalObject, encodedOp1, encodedOp2, *arithProfile); … … 2862 2862 } 2863 2863 2864 EncodedJSValue JIT_OPERATION operationArithNegateProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOperand, ArithProfile* arithProfile)2864 EncodedJSValue JIT_OPERATION operationArithNegateProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOperand, UnaryArithProfile* arithProfile) 2865 2865 { 2866 2866 ASSERT(arithProfile); … … 2871 2871 2872 2872 JSValue operand = JSValue::decode(encodedOperand); 2873 arithProfile->observe LHS(operand);2873 arithProfile->observeArg(operand); 2874 2874 2875 2875 JSValue primValue = operand.toPrimitive(globalObject); … … 2899 2899 JSValue operand = JSValue::decode(encodedOperand); 2900 2900 2901 ArithProfile* arithProfile = negIC->arithProfile();2901 UnaryArithProfile* arithProfile = negIC->arithProfile(); 2902 2902 ASSERT(arithProfile); 2903 arithProfile->observe LHS(operand);2903 arithProfile->observeArg(operand); 2904 2904 negIC->generateOutOfLine(callFrame->codeBlock(), operationArithNegateProfiled); 2905 2905 … … 2933 2933 JSValue operand = JSValue::decode(encodedOperand); 2934 2934 2935 if ( ArithProfile* arithProfile = negIC->arithProfile())2936 arithProfile->observe LHS(operand);2935 if (UnaryArithProfile* arithProfile = negIC->arithProfile()) 2936 arithProfile->observeArg(operand); 2937 2937 negIC->generateOutOfLine(callFrame->codeBlock(), operationArithNegate); 2938 2938 … … 2960 2960 } 2961 2961 2962 ALWAYS_INLINE static EncodedJSValue profiledSub(VM& vm, JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, ArithProfile& arithProfile, bool shouldObserveLHSAndRHSTypes = true)2962 ALWAYS_INLINE static EncodedJSValue profiledSub(VM& vm, JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile& arithProfile, bool shouldObserveLHSAndRHSTypes = true) 2963 2963 { 2964 2964 auto scope = DECLARE_THROW_SCOPE(vm); … … 2984 2984 } 2985 2985 2986 EncodedJSValue JIT_OPERATION operationValueSubProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, ArithProfile* arithProfile)2986 EncodedJSValue JIT_OPERATION operationValueSubProfiled(JSGlobalObject* globalObject, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2, BinaryArithProfile* arithProfile) 2987 2987 { 2988 2988 ASSERT(arithProfile); … … 3002 3002 3003 3003 auto nonOptimizeVariant = operationValueSubNoOptimize; 3004 if ( ArithProfile* arithProfile = subIC->arithProfile())3004 if (BinaryArithProfile* arithProfile = subIC->arithProfile()) 3005 3005 arithProfile->observeLHSAndRHS(JSValue::decode(encodedOp1), JSValue::decode(encodedOp2)); 3006 3006 subIC->generateOutOfLine(callFrame->codeBlock(), nonOptimizeVariant); … … 3028 3028 JITOperationPrologueCallFrameTracer tracer(vm, callFrame); 3029 3029 3030 ArithProfile* arithProfile = subIC->arithProfile();3030 BinaryArithProfile* arithProfile = subIC->arithProfile(); 3031 3031 ASSERT(arithProfile); 3032 3032 arithProfile->observeLHSAndRHS(JSValue::decode(encodedOp1), JSValue::decode(encodedOp2)); … … 3047 3047 JITOperationPrologueCallFrameTracer tracer(vm, callFrame); 3048 3048 3049 ArithProfile* arithProfile = subIC->arithProfile();3049 BinaryArithProfile* arithProfile = subIC->arithProfile(); 3050 3050 ASSERT(arithProfile); 3051 3051 return profiledSub(vm, globalObject, encodedOp1, encodedOp2, *arithProfile);
Note:
See TracChangeset
for help on using the changeset viewer.