DateMath.cpp should not depend on JavaScriptCore
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2011 00:04:53 +0000 (00:04 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2011 00:04:53 +0000 (00:04 +0000)
commit2e4652ac3b964c17a72227c220620b8550e7ab5c
tree1a9826234b9891acda4c89ff01b43aea79d00624
parent406422508bba1c1a42db2e27de08dc502b653c8c
DateMath.cpp should not depend on JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=71747

Reviewed by Darin Adler.

This patch moves the JSC-specific parts of DateMath into JSDateMath in
JavaScriptCore.  There shouldn't be any behavior change.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* runtime/DateConstructor.cpp:
* runtime/DateConversion.cpp:
* runtime/DateInstance.cpp:
* runtime/DateInstanceCache.h:
* runtime/DatePrototype.cpp:
* runtime/InitializeThreading.cpp:
* runtime/JSDateMath.cpp: Copied from Source/JavaScriptCore/wtf/DateMath.cpp.
(JSC::timeToMS):
(JSC::msToSeconds):
* runtime/JSDateMath.h: Copied from Source/JavaScriptCore/wtf/DateMath.h.
* wtf/DateMath.cpp:
(WTF::isLeapYear):
(WTF::msToDays):
(WTF::msToMinutes):
(WTF::msToHours):
(WTF::parseDateFromNullTerminatedCharacters):
(WTF::makeRFC2822DateString):
* wtf/DateMath.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Target.pri
Source/JavaScriptCore/runtime/DateConstructor.cpp
Source/JavaScriptCore/runtime/DateConversion.cpp
Source/JavaScriptCore/runtime/DateInstance.cpp
Source/JavaScriptCore/runtime/DateInstanceCache.h
Source/JavaScriptCore/runtime/DatePrototype.cpp
Source/JavaScriptCore/runtime/InitializeThreading.cpp
Source/JavaScriptCore/runtime/JSDateMath.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSDateMath.h [new file with mode: 0644]
Source/JavaScriptCore/wtf/DateMath.cpp
Source/JavaScriptCore/wtf/DateMath.h