RESOLVED FIXED Bug 202187
[JSC] Date functions should have intrinsic
https://bugs.webkit.org/show_bug.cgi?id=202187
Summary [JSC] Date functions should have intrinsic
Yusuke Suzuki
Reported 2019-09-25 00:30:36 PDT
It is super easy. Affects on JetStream2/date-format-xparb-SP.
Attachments
Patch (108.12 KB, patch)
2019-10-28 00:17 PDT, Yusuke Suzuki
no flags
Patch (108.09 KB, patch)
2019-10-28 00:21 PDT, Yusuke Suzuki
no flags
Patch (121.84 KB, patch)
2019-10-28 00:55 PDT, Yusuke Suzuki
no flags
Patch (122.37 KB, patch)
2019-10-28 20:36 PDT, Yusuke Suzuki
no flags
Patch (122.74 KB, patch)
2019-10-28 22:28 PDT, Yusuke Suzuki
no flags
Patch (123.75 KB, patch)
2019-10-29 20:38 PDT, Yusuke Suzuki
no flags
Patch (123.95 KB, patch)
2019-10-29 20:49 PDT, Yusuke Suzuki
keith_miller: review+
Yusuke Suzuki
Comment 1 2019-10-28 00:17:52 PDT
Yusuke Suzuki
Comment 2 2019-10-28 00:21:41 PDT
Yusuke Suzuki
Comment 3 2019-10-28 00:55:52 PDT
Mark Lam
Comment 4 2019-10-28 13:22:15 PDT
Comment on attachment 382048 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382048&action=review > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:4079 > + case DateGetInt: { > + setNonCellTypeForNode(node, SpecBytecodeNumber); > + break; > + } > + > + case DateGetFloat: { > + setNonCellTypeForNode(node, SpecFullDouble); > + break; > + } It's weird to call these DateGetInt and DateGetFloat which suggests that the distinction is between Int and Float, when the real distinction is between JSNumber (int or double) and MachineDouble. What do you think of renaming these as: DateGetInt => DateGetJSNumber or DateGetJSEncodeableNumber DateGetFloat = DateGetMachineDouble
Yusuke Suzuki
Comment 5 2019-10-28 20:31:49 PDT
Comment on attachment 382048 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382048&action=review >> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:4079 >> + } > > It's weird to call these DateGetInt and DateGetFloat which suggests that the distinction is between Int and Float, when the real distinction is between JSNumber (int or double) and MachineDouble. What do you think of renaming these as: > DateGetInt => DateGetJSNumber or DateGetJSEncodeableNumber > DateGetFloat = DateGetMachineDouble Sounds fine to me. Changed :)
Yusuke Suzuki
Comment 6 2019-10-28 20:36:10 PDT
Yusuke Suzuki
Comment 7 2019-10-28 22:28:07 PDT
Radar WebKit Bug Importer
Comment 8 2019-10-29 16:48:17 PDT
Yusuke Suzuki
Comment 9 2019-10-29 20:38:25 PDT
Yusuke Suzuki
Comment 10 2019-10-29 20:49:40 PDT
Keith Miller
Comment 11 2019-10-30 16:34:39 PDT
Comment on attachment 382275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382275&action=review r=me with comments. > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:4072 > + setNonCellTypeForNode(node, SpecBytecodeNumber); Can say this is SpecInt32Only | SpecDoublePureNaN instead of SpecBytecodeNumber? > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3203 > + setResult(addToGraph(DateGetMachineDouble, OpInfo(intrinsic), OpInfo(), base)); Can we rename this to date get time? > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3229 > + setResult(addToGraph(DateGetJSNumber, OpInfo(intrinsic), OpInfo(prediction), base)); Hmm, can we rename this to DateGetInt32OrNaN? This implies that it can return any JSNumber but it can only vend an int32 or NaN. > Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:14029 > + Please remove.
Yusuke Suzuki
Comment 12 2019-10-30 17:09:55 PDT
Comment on attachment 382275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382275&action=review Thanks! >> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:4072 >> + setNonCellTypeForNode(node, SpecBytecodeNumber); > > Can say this is SpecInt32Only | SpecDoublePureNaN instead of SpecBytecodeNumber? Sounds nice. Fixed. >> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3203 >> + setResult(addToGraph(DateGetMachineDouble, OpInfo(intrinsic), OpInfo(), base)); > > Can we rename this to date get time? Changed. >> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3229 >> + setResult(addToGraph(DateGetJSNumber, OpInfo(intrinsic), OpInfo(prediction), base)); > > Hmm, can we rename this to DateGetInt32OrNaN? This implies that it can return any JSNumber but it can only vend an int32 or NaN. Sounds better. Fixed. >> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:14029 >> + > > Please remove. Done.
Yusuke Suzuki
Comment 13 2019-10-30 17:37:11 PDT
Note You need to log in before you can comment on or make changes to this bug.