Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove conditional lookups #2726

Merged
merged 4 commits into from
Nov 14, 2023
Merged

Remove conditional lookups #2726

merged 4 commits into from
Nov 14, 2023

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Nov 10, 2023

This addresses Richard's comments on #2519.

Tests are in tc39/test262#3959

Closes: #2724

@ptomato ptomato mentioned this pull request Nov 10, 2023
91 tasks
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c040562) 96.38% compared to head (a19b982) 96.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2726      +/-   ##
==========================================
+ Coverage   96.38%   96.39%   +0.01%     
==========================================
  Files          21       21              
  Lines       12615    12497     -118     
  Branches     2356     2262      -94     
==========================================
- Hits        12159    12047     -112     
+ Misses        401      395       -6     
  Partials       55       55              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@justingrant justingrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

spec/duration.html Outdated Show resolved Hide resolved
@ptomato
Copy link
Collaborator Author

ptomato commented Nov 13, 2023

@gibson042 Would you be able to check if you agree with tc39/test262#3959 as well, so we can get this merged promptly?

Copy link
Collaborator

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gibson042 Would you be able to check if you agree with tc39/test262#3959 as well, so we can get this merged promptly?

Done.

spec/calendar.html Outdated Show resolved Hide resolved
spec/calendar.html Outdated Show resolved Hide resolved
This is to address a belated review comment from Richard on #2519. For
each operation in which we need to observably look up time zone methods,
make those lookups unconditional for every method that might be called.

See: #2724
This is to address a belated review comment from Richard on #2519. For
each operation in which we need to observably look up calendar methods,
make those lookups unconditional for every method that might be called.

See: #2724
In several Temporal.Duration operations we create a Calendar Methods
Record from zonedRelativeTo.[[Calendar]] if relativeTo is a ZonedDateTime,
otherwise from plainRelativeTo.[[Calendar]] if relativeTo is a PlainDate,
and otherwise we don't use a Calendar Methods Record.

This abstracts that process into a new AO.
@ptomato ptomato force-pushed the 2724-remove-conditional-lookups branch from 966a673 to a19b982 Compare November 14, 2023 19:44
@ptomato
Copy link
Collaborator Author

ptomato commented Nov 14, 2023

Thanks for the reviews.

@ptomato ptomato merged commit 30122f4 into main Nov 14, 2023
9 checks passed
@ptomato ptomato deleted the 2724-remove-conditional-lookups branch November 14, 2023 19:49
ptomato added a commit that referenced this pull request Dec 13, 2023
Ms2ger pushed a commit that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data-driven exceptions in calendar method lookups
3 participants