Changeset 214219 in webkit for trunk/Source/JavaScriptCore/ftl
- Timestamp:
- Mar 21, 2017, 4:31:43 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore/ftl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
r214069 r214219 280 280 case DefineAccessorProperty: 281 281 case ToLowerCase: 282 case NumberToStringWithRadix: 282 283 case CheckDOM: 283 284 case CallDOM: -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r214071 r214219 1079 1079 compileToLowerCase(); 1080 1080 break; 1081 case NumberToStringWithRadix: 1082 compileNumberToStringWithRadix(); 1083 break; 1081 1084 case CheckDOM: 1082 1085 compileCheckDOM(); … … 4982 4985 return; 4983 4986 } 4987 4988 case Int32Use: 4989 setJSValue(vmCall(Int64, m_out.operation(operationInt32ToStringWithValidRadix), m_callFrame, lowInt32(m_node->child1()), m_out.constInt32(10))); 4990 return; 4991 4992 case Int52RepUse: 4993 setJSValue(vmCall(Int64, m_out.operation(operationInt52ToStringWithValidRadix), m_callFrame, lowStrictInt52(m_node->child1()), m_out.constInt32(10))); 4994 return; 4995 4996 case DoubleRepUse: 4997 setJSValue(vmCall(Int64, m_out.operation(operationDoubleToStringWithValidRadix), m_callFrame, lowDouble(m_node->child1()), m_out.constInt32(10))); 4998 return; 4984 4999 4985 5000 default: … … 9983 9998 m_out.appendTo(continuation, lastNext); 9984 9999 setJSValue(m_out.phi(pointerType(), fastResult, slowResult)); 10000 } 10001 10002 void compileNumberToStringWithRadix() 10003 { 10004 bool validRadixIsGuaranteed = false; 10005 if (m_node->child2()->isInt32Constant()) { 10006 int32_t radix = m_node->child2()->asInt32(); 10007 if (radix >= 2 && radix <= 36) 10008 validRadixIsGuaranteed = true; 10009 } 10010 10011 switch (m_node->child1().useKind()) { 10012 case Int32Use: 10013 setJSValue(vmCall(pointerType(), m_out.operation(validRadixIsGuaranteed ? operationInt32ToStringWithValidRadix : operationInt32ToString), m_callFrame, lowInt32(m_node->child1()), lowInt32(m_node->child2()))); 10014 break; 10015 case Int52RepUse: 10016 setJSValue(vmCall(pointerType(), m_out.operation(validRadixIsGuaranteed ? operationInt52ToStringWithValidRadix : operationInt52ToString), m_callFrame, lowStrictInt52(m_node->child1()), lowInt32(m_node->child2()))); 10017 break; 10018 case DoubleRepUse: 10019 setJSValue(vmCall(pointerType(), m_out.operation(validRadixIsGuaranteed ? operationDoubleToStringWithValidRadix : operationDoubleToString), m_callFrame, lowDouble(m_node->child1()), lowInt32(m_node->child2()))); 10020 break; 10021 default: 10022 RELEASE_ASSERT_NOT_REACHED(); 10023 } 9985 10024 } 9986 10025
Note:
See TracChangeset
for help on using the changeset viewer.