Objective-C API NSDate conversion is off by 1000x (ms vs s)
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 23:32:25 +0000 (23:32 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 23:32:25 +0000 (23:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128386

Reviewed by Michael Saboff.

* API/JSValue.mm:
(valueToObjectWithoutCopy):
(valueToDate):
(objectToValueWithoutCopy):
* API/tests/DateTests.h: Added.
* API/tests/DateTests.mm: Added.
(+[DateTests NSDateToJSDateTest]):
(+[DateTests JSDateToNSDateTest]):
(+[DateTests roundTripThroughJSDateTest]):
(+[DateTests roundTripThroughObjCDateTest]):
* API/tests/testapi.mm:
(checkResult):
* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163756 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/API/JSValue.mm
Source/JavaScriptCore/API/tests/DateTests.h [new file with mode: 0644]
Source/JavaScriptCore/API/tests/DateTests.mm [new file with mode: 0644]
Source/JavaScriptCore/API/tests/testapi.mm
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

index 95c129e..8f4372a 100644 (file)
@@ -656,7 +656,7 @@ static JSContainerConvertor::Task valueToObjectWithoutCopy(JSGlobalContextRef co
         return (JSContainerConvertor::Task){ object, wrapped, ContainerNone };
 
     if (isDate(object, context))
-        return (JSContainerConvertor::Task){ object, [NSDate dateWithTimeIntervalSince1970:JSValueToNumber(context, object, 0)], ContainerNone };
+        return (JSContainerConvertor::Task){ object, [NSDate dateWithTimeIntervalSince1970:JSValueToNumber(context, object, 0) / 1000.0], ContainerNone };
 
     if (isArray(object, context))
         return (JSContainerConvertor::Task){ object, [NSMutableArray array], ContainerArray };
@@ -759,7 +759,7 @@ id valueToDate(JSGlobalContextRef context, JSValueRef value, JSValueRef* excepti
             return wrapped;
     }
 
-    double result = JSValueToNumber(context, value, exception);
+    double result = JSValueToNumber(context, value, exception) / 1000.0;
     return *exception ? nil : [NSDate dateWithTimeIntervalSince1970:result];
 }
 
@@ -889,7 +889,7 @@ static ObjcContainerConvertor::Task objectToValueWithoutCopy(JSContext *context,
         }
 
         if ([object isKindOfClass:[NSDate class]]) {
-            JSValueRef argument = JSValueMakeNumber(contextRef, [object timeIntervalSince1970]);
+            JSValueRef argument = JSValueMakeNumber(contextRef, [object timeIntervalSince1970] * 1000.0);
             JSObjectRef result = JSObjectMakeDate(contextRef, 1, &argument, 0);
             return (ObjcContainerConvertor::Task){ object, result, ContainerNone };
         }
diff --git a/Source/JavaScriptCore/API/tests/DateTests.h b/Source/JavaScriptCore/API/tests/DateTests.h
new file mode 100644 (file)
index 0000000..eeb47a1
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <JavaScriptCore/JavaScriptCore.h>
+
+#if JSC_OBJC_API_ENABLED
+
+void runDateTests();
+
+#endif // JSC_OBJC_API_ENABLED
diff --git a/Source/JavaScriptCore/API/tests/DateTests.mm b/Source/JavaScriptCore/API/tests/DateTests.mm
new file mode 100644 (file)
index 0000000..ab80e95
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DateTests.h"
+#import <Foundation/Foundation.h>
+
+#if JSC_OBJC_API_ENABLED
+
+extern "C" void checkResult(NSString *description, bool passed);
+
+@interface DateTests : NSObject
++ (void) NSDateToJSDateTest;
++ (void) JSDateToNSDateTest;
++ (void) roundTripThroughJSDateTest;
++ (void) roundTripThroughObjCDateTest;
+@end
+
+#if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000) || (TARGET_OS_MAC && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
+static unsigned unitFlags = NSCalendarUnitSecond | NSCalendarUnitMinute | NSCalendarUnitHour | NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear;
+#else
+static unsigned unitFlags = NSSecondCalendarUnit | NSMinuteCalendarUnit | NSHourCalendarUnit | NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit;
+#endif
+
+@implementation DateTests
++ (void) NSDateToJSDateTest
+{
+    JSContext *context = [[JSContext alloc] init];
+    NSDate *now = [NSDate dateWithTimeIntervalSinceNow:0];
+    NSDateComponents *components = [[NSCalendar currentCalendar] components:unitFlags fromDate:now];
+    JSValue *jsNow = [JSValue valueWithObject:now inContext:context];
+    int year = [[jsNow invokeMethod:@"getFullYear" withArguments:@[]] toInt32];
+    // Months are 0-indexed for JavaScript Dates.
+    int month = [[jsNow invokeMethod:@"getMonth" withArguments:@[]] toInt32] + 1;
+    int day = [[jsNow invokeMethod:@"getDate" withArguments:@[]] toInt32];
+    int hour = [[jsNow invokeMethod:@"getHours" withArguments:@[]] toInt32];
+    int minute = [[jsNow invokeMethod:@"getMinutes" withArguments:@[]] toInt32];
+    int second = [[jsNow invokeMethod:@"getSeconds" withArguments:@[]] toInt32];
+
+    checkResult(@"NSDate to JS Date", year == [components year]
+        && month == [components month]
+        && day == [components day]
+        && hour == [components hour]
+        && minute == [components minute]
+        && second == [components second]);
+}
+
++ (void) JSDateToNSDateTest
+{
+    JSContext *context = [[JSContext alloc] init];
+    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+    [formatter setDateFormat:@"MMMM dd',' yyyy hh:mm:ss"];
+    NSDate *februaryFourth2014 = [formatter dateFromString:@"February 4, 2014 11:40:03"];
+    NSDateComponents *components = [[NSCalendar currentCalendar] components:unitFlags fromDate:februaryFourth2014];
+    // Months are 0-indexed for JavaScript Dates.
+    JSValue *jsDate = [context[@"Date"] constructWithArguments:@[@2014, @1, @4, @11, @40, @3]];
+    
+    int year = [[jsDate invokeMethod:@"getFullYear" withArguments:@[]] toInt32];
+    int month = [[jsDate invokeMethod:@"getMonth" withArguments:@[]] toInt32] + 1;
+    int day = [[jsDate invokeMethod:@"getDate" withArguments:@[]] toInt32];
+    int hour = [[jsDate invokeMethod:@"getHours" withArguments:@[]] toInt32];
+    int minute = [[jsDate invokeMethod:@"getMinutes" withArguments:@[]] toInt32];
+    int second = [[jsDate invokeMethod:@"getSeconds" withArguments:@[]] toInt32];
+
+    checkResult(@"JS Date to NSDate", year == [components year]
+        && month == [components month]
+        && day == [components day]
+        && hour == [components hour]
+        && minute == [components minute]
+        && second == [components second]);
+}
+
++ (void) roundTripThroughJSDateTest
+{
+    JSContext *context = [[JSContext alloc] init];
+    [context evaluateScript:@"function jsReturnDate(date) { return date; }"];
+    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+    [formatter setDateFormat:@"MMMM dd',' yyyy hh:mm:ss"];
+    NSDate *februaryFourth2014 = [formatter dateFromString:@"February 4, 2014 11:40:03"];
+    NSDateComponents *components = [[NSCalendar currentCalendar] components:unitFlags fromDate:februaryFourth2014];
+    
+    JSValue *roundTripThroughJS = [context[@"jsReturnDate"] callWithArguments:@[februaryFourth2014]];
+    int year = [[roundTripThroughJS invokeMethod:@"getFullYear" withArguments:@[]] toInt32];
+    // Months are 0-indexed for JavaScript Dates.
+    int month = [[roundTripThroughJS invokeMethod:@"getMonth" withArguments:@[]] toInt32] + 1;
+    int day = [[roundTripThroughJS invokeMethod:@"getDate" withArguments:@[]] toInt32];
+    int hour = [[roundTripThroughJS invokeMethod:@"getHours" withArguments:@[]] toInt32];
+    int minute = [[roundTripThroughJS invokeMethod:@"getMinutes" withArguments:@[]] toInt32];
+    int second = [[roundTripThroughJS invokeMethod:@"getSeconds" withArguments:@[]] toInt32];
+
+    checkResult(@"JS date round trip", year == [components year]
+        && month == [components month]
+        && day == [components day]
+        && hour == [components hour]
+        && minute == [components minute]
+        && second == [components second]);
+}
+
++ (void) roundTripThroughObjCDateTest
+{
+    JSContext *context = [[JSContext alloc] init];
+    context[@"objcReturnDate"] = ^(NSDate *date) {
+        return date;
+    };
+    [context evaluateScript:@"function test() {\
+        var date = new Date(2014, 1, 4, 11, 40, 3); \
+        var result = objcReturnDate(date); \
+        return date.getYear() === result.getYear() \
+            && date.getMonth() === result.getMonth() \
+            && date.getDate() === result.getDate() \
+            && date.getHours() === result.getHours() \
+            && date.getMinutes() === result.getMinutes() \
+            && date.getSeconds() === result.getSeconds() \
+            && date.getMilliseconds() === result.getMilliseconds();\
+    }"];
+    
+    checkResult(@"ObjC date round trip", [[context[@"test"] callWithArguments:@[]] toBool]);
+}
+
+@end
+
+void runDateTests()
+{
+    [DateTests NSDateToJSDateTest];
+    [DateTests JSDateToNSDateTest];
+    [DateTests roundTripThroughJSDateTest];
+    [DateTests roundTripThroughObjCDateTest];
+}
+
+#endif // JSC_OBJC_API_ENABLED
index 2ea3b71..6aed9b8 100644 (file)
@@ -26,6 +26,7 @@
 #import <JavaScriptCore/JavaScriptCore.h>
 
 #import "CurrentThisInsideBlockGetterTest.h"
+#import "DateTests.h"
 
 extern "C" void JSSynchronousGarbageCollectForDebugging(JSContextRef);
 
@@ -34,6 +35,7 @@ extern "C" const char * _Block_signature(id);
 
 extern int failed;
 extern "C" void testObjectiveCAPI(void);
+extern "C" void checkResult(NSString *, bool);
 
 #if JSC_OBJC_API_ENABLED
 
@@ -450,7 +452,7 @@ static bool evilAllocationObjectWasDealloced = false;
 }
 @end
 
-static void checkResult(NSString *description, bool passed)
+extern "C" void checkResult(NSString *description, bool passed)
 {
     NSLog(@"TEST: \"%@\": %@", description, passed ? @"PASSED" : @"FAILED");
     if (!passed)
@@ -1256,6 +1258,7 @@ void testObjectiveCAPI()
     }
 
     currentThisInsideBlockGetterTest();
+    runDateTests();
 }
 
 #else
index e876a4b..2b1a7c2 100644 (file)
@@ -1,3 +1,24 @@
+2014-02-09  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Objective-C API NSDate conversion is off by 1000x (ms vs s)
+        https://bugs.webkit.org/show_bug.cgi?id=128386
+
+        Reviewed by Michael Saboff.
+
+        * API/JSValue.mm:
+        (valueToObjectWithoutCopy):
+        (valueToDate):
+        (objectToValueWithoutCopy):
+        * API/tests/DateTests.h: Added.
+        * API/tests/DateTests.mm: Added.
+        (+[DateTests NSDateToJSDateTest]):
+        (+[DateTests JSDateToNSDateTest]):
+        (+[DateTests roundTripThroughJSDateTest]):
+        (+[DateTests roundTripThroughObjCDateTest]):
+        * API/tests/testapi.mm:
+        (checkResult):
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
 2014-02-09  Andreas Kling  <akling@apple.com>
 
         Pass VM instead of ExecState to JSCell::fastGetOwnProperty().
index 260eb14..6794f71 100644 (file)
                C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */ = {isa = PBXBuildFile; fileRef = C25F8BCC157544A900245B71 /* IncrementalSweeper.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C283190016FE4B7D00157BFD /* HandleBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C28318FF16FE4B7D00157BFD /* HandleBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C283190216FE533E00157BFD /* HandleBlockInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C283190116FE533E00157BFD /* HandleBlockInlines.h */; };
+               C288B2DE18A54D3E007BE40B /* DateTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = C288B2DD18A54D3E007BE40B /* DateTests.mm */; };
                C2981FD817BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2981FD617BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp */; };
                C2981FD917BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h in Headers */ = {isa = PBXBuildFile; fileRef = C2981FD717BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C2981FDC17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2981FDA17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp */; };
                C2981FDD17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h in Headers */ = {isa = PBXBuildFile; fileRef = C2981FDB17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C29ECB031804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = C29ECB011804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm */; };
                C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */ = {isa = PBXBuildFile; fileRef = C2A7F687160432D400F76B98 /* JSDestructibleObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
-       C2B6D75318A33793004A9301 /* WriteBarrierInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               C2B6D75318A33793004A9301 /* WriteBarrierInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */; };
                C2C0F7CD17BBFC5B00464FE4 /* DFGDesiredTransitions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2C0F7CB17BBFC5B00464FE4 /* DFGDesiredTransitions.cpp */; };
                C25F8BCC157544A900245B71 /* IncrementalSweeper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncrementalSweeper.h; sourceTree = "<group>"; };
                C28318FF16FE4B7D00157BFD /* HandleBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandleBlock.h; sourceTree = "<group>"; };
                C283190116FE533E00157BFD /* HandleBlockInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandleBlockInlines.h; sourceTree = "<group>"; };
+               C288B2DC18A54D3E007BE40B /* DateTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DateTests.h; path = API/tests/DateTests.h; sourceTree = "<group>"; };
+               C288B2DD18A54D3E007BE40B /* DateTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DateTests.mm; path = API/tests/DateTests.mm; sourceTree = "<group>"; };
                C2981FD617BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDesiredWeakReferences.cpp; path = dfg/DFGDesiredWeakReferences.cpp; sourceTree = "<group>"; };
                C2981FD717BAEE4B00A3BC98 /* DFGDesiredWeakReferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDesiredWeakReferences.h; path = dfg/DFGDesiredWeakReferences.h; sourceTree = "<group>"; };
                C2981FDA17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDesiredWriteBarriers.cpp; path = dfg/DFGDesiredWriteBarriers.cpp; sourceTree = "<group>"; };
                C29ECB011804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CurrentThisInsideBlockGetterTest.mm; path = API/tests/CurrentThisInsideBlockGetterTest.mm; sourceTree = "<group>"; };
                C29ECB021804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CurrentThisInsideBlockGetterTest.h; path = API/tests/CurrentThisInsideBlockGetterTest.h; sourceTree = "<group>"; };
                C2A7F687160432D400F76B98 /* JSDestructibleObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDestructibleObject.h; sourceTree = "<group>"; };
-       C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteBarrierInlines.h; sourceTree = "<group>"; };
+               C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteBarrierInlines.h; sourceTree = "<group>"; };
                C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkedAllocator.h; sourceTree = "<group>"; };
                C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedAllocator.cpp; sourceTree = "<group>"; };
                C2C0F7CB17BBFC5B00464FE4 /* DFGDesiredTransitions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDesiredTransitions.cpp; path = dfg/DFGDesiredTransitions.cpp; sourceTree = "<group>"; };
                                14D857740A4696C80032146C /* testapi.js */,
                                86D22219167EF9440024C804 /* testapi.mm */,
                                651122E5140469BA002B101D /* testRegExp.cpp */,
+                               C288B2DC18A54D3E007BE40B /* DateTests.h */,
+                               C288B2DD18A54D3E007BE40B /* DateTests.mm */,
                        );
                        name = tests;
                        sourceTree = "<group>";
                7EF6E0BB0EB7A1EC0079AFAF /* runtime */ = {
                        isa = PBXGroup;
                        children = (
-               C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */,
+                               C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */,
                                BCF605110E203EF800B9A64D /* ArgList.cpp */,
                                BCF605120E203EF800B9A64D /* ArgList.h */,
                                BC257DE50E1F51C50016B6C9 /* Arguments.cpp */,
                                65C0285D1717966800351E35 /* ARMv7DOpcode.h in Headers */,
                                2A68295B1875F80500B6C3E2 /* CopyWriteBarrier.h in Headers */,
                                2A4EC90C1860D6C20094F782 /* WriteBarrierBuffer.h in Headers */,
-               C2B6D75318A33793004A9301 /* WriteBarrierInlines.h in Headers */,
+                               C2B6D75318A33793004A9301 /* WriteBarrierInlines.h in Headers */,
                                FE5932A8183C5A2600A1ECCC /* VMEntryScope.h in Headers */,
                                A532439318569709002ED692 /* CodeGeneratorInspectorStrings.py in Headers */,
                                A532439218569709002ED692 /* CodeGeneratorInspector.py in Headers */,
                                C29ECB031804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm in Sources */,
                                1440F6100A4F85670005F061 /* testapi.c in Sources */,
                                86D2221A167EF9440024C804 /* testapi.mm in Sources */,
+                               C288B2DE18A54D3E007BE40B /* DateTests.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };