Bug 112845 - "" + x where x is not a string should be optimized by the DFG to some manner of ToString conversion
Summary: "" + x where x is not a string should be optimized by the DFG to some manner ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-20 14:38 PDT by Filip Pizlo
Modified: 2013-03-20 15:41 PDT (History)
8 users (show)

See Also:


Attachments
the patch (14.41 KB, patch)
2013-03-20 14:58 PDT, Filip Pizlo
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2013-03-20 14:38:39 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2013-03-20 14:58:55 PDT
Created attachment 194127 [details]
the patch
Comment 2 WebKit Review Bot 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.
Comment 3 Mark Hahnenberg 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.
Comment 4 Filip Pizlo 2013-03-20 15:39:46 PDT
Landed in http://trac.webkit.org/changeset/146400
Comment 5 Filip Pizlo 2013-03-20 15:41:50 PDT
Test landed in http://trac.webkit.org/changeset/146400