Bug 26238 - Move DateMath into WTF namespace
: Move DateMath into WTF namespace
Status: RESOLVED FIXED
: WebKit
Web Template Framework
: 528+ (Nightly build)
: All All
: P2 Major
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-06-06 22:20 PST by
Modified: 2009-06-08 15:38 PST (History)


Attachments
Introduce DateExtras, v1. (99.62 KB, patch)
2009-06-06 22:29 PST, Dimitri Glazkov (Google)
no flags Review Patch | Details | Formatted Diff | Diff
Move DateMath to WTF namespace, v2. (167.59 KB, patch)
2009-06-08 13:20 PST, Dimitri Glazkov (Google)
eric: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-06-06 22:20:09 PST
In order to eliminate the leakage of JSC into WebCore, introduced inhttp://trac.webkit.org/changeset/44452, move most of DateMath funcs into wtf/DateExtras. The remaining conversion funcs stay in DateConversion.
------- Comment #1 From 2009-06-06 22:29:18 PST -------
Created an attachment (id=31031) [details]
Introduce DateExtras, v1.

 JavaScriptCore/AllInOneFile.cpp                    |    2 +-
 JavaScriptCore/ChangeLog                           |   32 +
 JavaScriptCore/GNUmakefile.am                      |    6 +-
 JavaScriptCore/JavaScriptCore.exp                  |    2 +-
 JavaScriptCore/JavaScriptCore.pri                  |    3 +-
 .../JavaScriptCore/JavaScriptCore.vcproj           |    4 +-
 .../JavaScriptCore.vcproj/WTF/WTF.vcproj           |    8 +
 .../JavaScriptCore.xcodeproj/project.pbxproj       |   20 +-
 JavaScriptCore/JavaScriptCoreSources.bkl           |    3 +-
 JavaScriptCore/pcre/pcre_exec.cpp                  |    2 +-
 JavaScriptCore/profiler/ProfileNode.cpp            |    4 +-
 JavaScriptCore/runtime/DateConstructor.cpp         |    5 +-
 JavaScriptCore/runtime/DateConversion.cpp          |   98 ++
 JavaScriptCore/runtime/DateConversion.h            |   63 ++
 JavaScriptCore/runtime/DateInstance.cpp            |    6 +-
 JavaScriptCore/runtime/DateInstance.h              |   12 +-
 JavaScriptCore/runtime/DateMath.cpp                |  935 --------------------
 JavaScriptCore/runtime/DateMath.h                  |  191 ----
 JavaScriptCore/runtime/DatePrototype.cpp           |    3 +-
 JavaScriptCore/runtime/InitializeThreading.cpp     |    4 +-
 JavaScriptCore/wtf/DateExtras.cpp                  |  891 +++++++++++++++++++
 JavaScriptCore/wtf/DateExtras.h                    |  188 ++++
 WebCore/ChangeLog                                  |   17 +
 WebCore/ForwardingHeaders/runtime/DateMath.h       |    4 -
 WebCore/ForwardingHeaders/wtf/DateExtras.h         |    4 +
 WebCore/platform/network/HTTPParsers.cpp           |    9 +
 WebCore/platform/network/HTTPParsers.h             |    1 +
 WebCore/platform/network/ResourceResponseBase.cpp  |    4 +-
 28 files changed, 1360 insertions(+), 1161 deletions(-)
------- Comment #2 From 2009-06-06 22:37:21 PST -------
You should probably use svn copy to preserve history for these moves.
------- Comment #3 From 2009-06-06 23:24:06 PST -------
(In reply to comment #0)
> In order to eliminate the leakage of JSC into WebCore, introduced
> in <http://trac.webkit.org/changeset/44452>, move most of DateMath funcs into
> wtf/DateExtras. The remaining conversion funcs stay in DateConversion.
------- Comment #4 From 2009-06-07 11:05:19 PST -------
(In reply to comment #2)
> You should probably use svn copy to preserve history for these moves.
> 

I am not 100% sure, but I think git does this right when it commits. I'll research. 
------- Comment #5 From 2009-06-07 14:25:51 PST -------
(In reply to comment #4)
> (In reply to comment #2)
> > You should probably use svn copy to preserve history for these moves.
> 
> I am not 100% sure, but I think git does this right when it commits. I'll
> research. 

git tries to get it right, but it uses a fuzzy algorithm rather than an absolute connection (as in svn).  Most of the time it gets it wrong if it's a small file, e.g., where the license header is as-long-as or longer than the actual source.  Then it thinks the new file is copied from a nonsensical original.

You're *probably* okay with using git in this case, but I'd strongly suggest using svn to make sure that the history is preserved.
------- Comment #6 From 2009-06-07 17:59:42 PST -------
(From update of attachment 31031 [details])
The other Extras.h headers are mostly to fill in holes in standard library implementations to smooth over platform differences. This seems a bit different in that it implements original functions that don't exist on any platform, so perhaps it should have a different name.

So I'm not sure I like the new name.
------- Comment #7 From 2009-06-07 19:24:42 PST -------
I can make it wtf/DateMath, if that's preferred, I have no opinion here. Let me know, and I'll make it happen. Would really like to land this soon -- we have fixes after this patch that we really would like to have without branching out.
------- Comment #8 From 2009-06-08 13:03:29 PST -------
I reworked the patch to:

* use svn cp (darn it! I don't like to admit when git is inferior)
* change DateExtras.h to wtf/DateMath.h

r* pls?
------- Comment #9 From 2009-06-08 13:20:14 PST -------
Created an attachment (id=31058) [details]
Move DateMath to WTF namespace, v2.
------- Comment #10 From 2009-06-08 15:31:21 PST -------
(From update of attachment 31058 [details])
rs=me if you're just moving code and you promise to watch the bots! :)
------- Comment #11 From 2009-06-08 15:38:17 PST -------
http://trac.webkit.org/changeset/44508