Bug 231331 - [JSC] Temporal tweaks to pass more test262 tests
Summary: [JSC] Temporal tweaks to pass more test262 tests
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: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-06 14:24 PDT by Philip Chimento
Modified: 2021-10-07 04:28 PDT (History)
10 users (show)

See Also:


Attachments
Patch (20.94 KB, patch)
2021-10-06 14:33 PDT, Philip Chimento
no flags Details | Formatted Diff | Diff
Patch (28.60 KB, patch)
2021-10-06 15:22 PDT, Philip Chimento
no flags Details | Formatted Diff | Diff
Patch (28.66 KB, patch)
2021-10-06 15:55 PDT, Philip Chimento
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Chimento 2021-10-06 14:24:05 PDT
[JSC] Temporal tweaks to pass more test262 tests
Comment 1 Philip Chimento 2021-10-06 14:33:22 PDT
Created attachment 440438 [details]
Patch
Comment 2 Philip Chimento 2021-10-06 15:22:52 PDT
Created attachment 440443 [details]
Patch
Comment 3 Yusuke Suzuki 2021-10-06 15:47:24 PDT
Comment on attachment 440443 [details]
Patch

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

Quick comment

> Source/JavaScriptCore/runtime/TemporalObject.h:67
> +// https://tc39.es/proposal-temporal/#table-temporal-temporaldurationlike-properties
> +static constexpr TemporalUnit temporalUnitsInTableOrder[numberOfTemporalUnits] = {
> +    TemporalUnit::Day,
> +    TemporalUnit::Hour,
> +    TemporalUnit::Microsecond,
> +    TemporalUnit::Millisecond,
> +    TemporalUnit::Minute,
> +    TemporalUnit::Month,
> +    TemporalUnit::Nanosecond,
> +    TemporalUnit::Second,
> +    TemporalUnit::Week,
> +    TemporalUnit::Year,
> +};

Let's put the array content to cpp file to avoid materializing the same constant array multiple times. This will enlarge binary size.
Comment 4 Philip Chimento 2021-10-06 15:55:37 PDT
Created attachment 440451 [details]
Patch
Comment 5 Yusuke Suzuki 2021-10-06 17:22:34 PDT
Comment on attachment 440451 [details]
Patch

r=me
Comment 6 EWS 2021-10-07 04:27:51 PDT
Committed r283705 (242631@main): <https://commits.webkit.org/242631@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440451 [details].
Comment 7 Radar WebKit Bug Importer 2021-10-07 04:28:19 PDT
<rdar://problem/83975733>