RESOLVED FIXED 112845
"" + x where x is not a string should be optimized by the DFG to some manner of ToString conversion
https://bugs.webkit.org/show_bug.cgi?id=112845
Summary "" + x where x is not a string should be optimized by the DFG to some manner ...
Filip Pizlo
Reported 2013-03-20 14:38:39 PDT
Patch forthcoming.
Attachments
the patch (14.41 KB, patch)
2013-03-20 14:58 PDT, Filip Pizlo
mhahnenberg: review+
Filip Pizlo
Comment 1 2013-03-20 14:58:55 PDT
Created attachment 194127 [details] the patch
WebKit Review Bot
Comment 2 2013-03-20 15:02:44 PDT
Attachment 194127 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/js/regress/empty-string-plus-int-expected.txt', u'LayoutTests/fast/js/regress/empty-string-plus-int.html', u'LayoutTests/fast/js/regress/script-tests/empty-string-plus-int.js', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/dfg/DFGFixupPhase.cpp', u'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.h']" exit_code: 1 Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.h:51: The parameter name "type" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Hahnenberg
Comment 3 2013-03-20 15:10:27 PDT
Comment on attachment 194127 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=194127&action=review r=me > Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp:46 > + if (isObjectSpeculation(type)) { > + // I'd love to fold this case into the case below, but I can't, because > + // removing SpecObject from something that only has an object > + // prediction and nothing else means we have an ill-formed SpeculatedType > + // (strong predict-none). This should be killed once we remove all traces > + // of static (aka weak) predictions. > + return type; > + } According to this comment, we can now delete this branch.
Filip Pizlo
Comment 4 2013-03-20 15:39:46 PDT
Filip Pizlo
Comment 5 2013-03-20 15:41:50 PDT
Note You need to log in before you can comment on or make changes to this bug.