Skip to content

Editorial: Remove iffy usage of undefined rounding mode - #1092

Merged
gibson042 merged 1 commit into
tc39:mainfrom
ptomato:apply-unsigned-rounding-mode-undefined
Jul 29, 2026
Merged

Editorial: Remove iffy usage of undefined rounding mode#1092
gibson042 merged 1 commit into
tc39:mainfrom
ptomato:apply-unsigned-rounding-mode-undefined

Conversation

@ptomato

@ptomato ptomato commented Jul 28, 2026

Copy link
Copy Markdown
Member

ToRawFixed, ToRawPrecision, and ApplyUnsignedRoundingMode all accepted undefined as their rounding mode parameter, only to hit an assertion if undefined was passed while any rounding actually needed to happen.

It turns out this was to support one usage of ToRawFixed with hardcoded rounding parameters.

Remove this usage of ToRawFixed; with the given hardcoded parameters, its implementation collapses to one line.

Ref: tc39/ecma262#3759 (comment)

ToRawFixed, ToRawPrecision, and ApplyUnsignedRoundingMode all accepted
undefined as their rounding mode parameter, only to hit an assertion if
undefined was passed while any rounding actually needed to happen.

It turns out this was to support one usage of ToRawFixed with hardcoded
rounding parameters.

Remove this usage of ToRawFixed; with the given hardcoded parameters,
its implementation collapses to one line.

Ref: tc39/ecma262#3759 (comment)
@gibson042
gibson042 merged commit 9f31dd5 into tc39:main Jul 29, 2026
2 checks passed
@ptomato
ptomato deleted the apply-unsigned-rounding-mode-undefined branch July 29, 2026 16:15
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.

2 participants