Bug 152433 - Replace SpecialFastCase profiles with ResultProfiles.
Summary: Replace SpecialFastCase profiles with ResultProfiles.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 151793
  Show dependency treegraph
 
Reported: 2015-12-18 10:37 PST by Mark Lam
Modified: 2016-03-21 15:29 PDT (History)
2 users (show)

See Also:


Attachments
proposed patch. (30.96 KB, patch)
2015-12-18 10:58 PST, Mark Lam
saam: review+
Details | Formatted Diff | Diff
x86_64 benchmark result. (66.72 KB, text/plain)
2015-12-18 10:59 PST, Mark Lam
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2015-12-18 10:37:09 PST
This is in preparation for upcoming work to enhance the DFG predictions to deal with untyped operands.  Would like to land this patch separately first to confirm that it is perf neutral.
Comment 1 Mark Lam 2015-12-18 10:58:25 PST
Created attachment 267642 [details]
proposed patch.
Comment 2 WebKit Commit Bot 2015-12-18 10:59:51 PST
Attachment 267642 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:120:  returnValue__ is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/jit/JITMulGenerator.h:51:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/JavaScriptCore/jit/JITDivGenerator.h:51:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 3 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Lam 2015-12-18 10:59:54 PST
Created attachment 267643 [details]
x86_64 benchmark result.

Perf is neutral as expected.  All the "definitely"s are not reproducible on re-runs.
Comment 4 Saam Barati 2015-12-18 13:51:19 PST
Comment on attachment 267642 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=267642&action=review

r=me

> Source/JavaScriptCore/bytecode/CodeBlock.cpp:4202
> +            if (!value.d && value.i64 < 0)

maybe you can add a comment about why this works for people who are less familiar with the IEEE754 spec.
Or better yet, you can add a function that does this calculation for us.
Comment 5 Mark Lam 2015-12-18 13:58:19 PST
(In reply to comment #4)
> Comment on attachment 267642 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=267642&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/bytecode/CodeBlock.cpp:4202
> > +            if (!value.d && value.i64 < 0)
> 
> maybe you can add a comment about why this works for people who are less
> familiar with the IEEE754 spec.
> Or better yet, you can add a function that does this calculation for us.

I just learned about std::signbit().  I'll re-implement this instead as:

            if (!doubleVal && std::signbit(doubleVal))
Comment 6 Mark Lam 2015-12-18 14:04:36 PST
Thanks for the review.  Landed in r194294: <http://trac.webkit.org/r194294>.
Comment 7 Ryosuke Niwa 2016-03-21 15:29:47 PDT
This patch appears to have regressed SunSpider's string-base64 by 12%.