Bug 101174 - Reduce the verbosity of referring to QNaN in JavaScriptCore
Summary: Reduce the verbosity of referring to QNaN in JavaScriptCore
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: 101231 98606
  Show dependency treegraph
 
Reported: 2012-11-04 19:44 PST by Filip Pizlo
Modified: 2012-11-05 10:16 PST (History)
8 users (show)

See Also:


Attachments
the patch (14.93 KB, patch)
2012-11-04 20:01 PST, Filip Pizlo
ggaren: 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 2012-11-04 19:44:34 PST
We use quiet NaNs (QNaNs) a lot, and currently the way we refer to them in the code is std::numeric_limits<double>::quiet_NaN().  This is kind of verbose.  Instead, we should be able to just say QNaN for short.

This will become even more beneficial for https://bugs.webkit.org/show_bug.cgi?id=98606, which has to use NaNs a lot more.
Comment 1 Filip Pizlo 2012-11-04 20:01:00 PST
Created attachment 172257 [details]
the patch
Comment 2 Geoffrey Garen 2012-11-05 09:02:17 PST
Comment on attachment 172257 [details]
the patch

WTF's DateMath.cpp could really use this. Should the #define go in WTF?
Comment 3 Filip Pizlo 2012-11-05 10:11:38 PST
(In reply to comment #2)
> (From update of attachment 172257 [details])
> WTF's DateMath.cpp could really use this. Should the #define go in WTF?

I will make that move in a separate patch.  I want to make sure that this doesn't break anyone's builds first, due to the risk of namespace pollution (some dependent library on some platforms might already be defining it).
Comment 4 Filip Pizlo 2012-11-05 10:16:02 PST
Landed in http://trac.webkit.org/changeset/133493