Bug 234836 - [JSC] Implement Temporal.Now.instant()
Summary: [JSC] Implement Temporal.Now.instant()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-04 01:11 PST by Yusuke Suzuki
Modified: 2022-01-19 22:02 PST (History)
12 users (show)

See Also:


Attachments
Patch (9.24 KB, patch)
2022-01-04 01:13 PST, Yusuke Suzuki
ross.kirsling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2022-01-04 01:11:22 PST
[JSC] Implement Temporal.Now.instant()
Comment 1 Yusuke Suzuki 2022-01-04 01:13:13 PST
Created attachment 448273 [details]
Patch
Comment 2 Ross Kirsling 2022-01-04 10:33:03 PST
Comment on attachment 448273 [details]
Patch

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

Seems good to me.

> Source/WTF/wtf/PlatformUse.h:-92
> -/* On Windows, use QueryPerformanceCounter by default */
> -#if OS(WINDOWS)
> -#define USE_QUERY_PERFORMANCE_COUNTER  1
> -#endif

So the assumption is that nobody on Windows has a reason to turn this off? I suppose we should mention that in the ChangeLog.
Comment 3 Philip Chimento 2022-01-06 15:54:32 PST
Comment on attachment 448273 [details]
Patch

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

Looks good!

> Source/WTF/wtf/CurrentTime.cpp:201
> +    return static_cast<Int128>(currentTime() * 1000000000);

No idea if the WebKit coding style encourages or discourages this, but I usually prefer to include numeric separators, like 1'000'000'000, it makes it easier to see at a glance if there is a typo in the number of digits!
Comment 4 Radar WebKit Bug Importer 2022-01-11 01:12:16 PST
<rdar://problem/87385546>
Comment 5 Yusuke Suzuki 2022-01-19 21:55:55 PST
Comment on attachment 448273 [details]
Patch

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

>> Source/WTF/wtf/CurrentTime.cpp:201
>> +    return static_cast<Int128>(currentTime() * 1000000000);
> 
> No idea if the WebKit coding style encourages or discourages this, but I usually prefer to include numeric separators, like 1'000'000'000, it makes it easier to see at a glance if there is a typo in the number of digits!

Changed.
Comment 6 Yusuke Suzuki 2022-01-19 21:56:13 PST
Comment on attachment 448273 [details]
Patch

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

>> Source/WTF/wtf/PlatformUse.h:-92
>> -#endif
> 
> So the assumption is that nobody on Windows has a reason to turn this off? I suppose we should mention that in the ChangeLog.

Yes. Added.
Comment 7 Yusuke Suzuki 2022-01-19 22:02:03 PST
Committed r288272 (246212@trunk): <https://commits.webkit.org/246212@trunk>