Skip to content

Commit d8830a2

Browse files
committed
Use an internal slot that makes clear we're using significant digits
1 parent a3d739f commit d8830a2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec.emu

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ location: https://github.com/tc39/proposal-decimal/
419419
<li>is <dfn>%Decimal128Amount%</dfn>.</li>
420420
<li>is the initial value of the the *"Amount"* property of the Decimal128 object.</li>
421421
<li>creates and initializes a new Decimal128.Amount object when called as a constructor</li>
422-
<li>may be used as the value of an *extends* clause of a class definition. Subclass constructors that intend to inherit the specified Decimal128.Amount behaviour must include a *super* call to the Decimal128.Amount constructor to create and initialize the subclass instance with the [[Decimal128AmountData]] and [[Decimal128AmountPrecision]] internal slots.</li>
422+
<li>may be used as the value of an *extends* clause of a class definition. Subclass constructors that intend to inherit the specified Decimal128.Amount behaviour must include a *super* call to the Decimal128.Amount constructor to create and initialize the subclass instance with the [[Decimal128AmountData]] and [[Decimal128AmountSignificantDigits]] internal slots.</li>
423423
</ul>
424424
<emu-clause id="sec-the-decimal128-amount-constructor-value">
425425
<h1>Decimal128.Amount ( _s_, _precision_ )</h1>
@@ -432,9 +432,9 @@ location: https://github.com/tc39/proposal-decimal/
432432
1. If ℝ(_precision_) is not an integer, throw a *RangeError* exception.
433433
1. If ℝ(_precision_) > 34, throw a *RangeError* exception.
434434
1. Let _decimal_ be ? Construct(%Decimal128%, _s_).
435-
1. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Decimal128Amount.prototype%"*, « [[Decimal128AmountData]], [[Decimal128AmountPrecision]] »).
435+
1. Let _O_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%Decimal128Amount.prototype%"*, « [[Decimal128AmountData]], [[Decimal128AmountSignificantDigits]] »).
436436
1. Set _O_.[[Decimal128AmountData]] to _decimal_.[[Decimal128Data]].
437-
1. Set _O_.[[Decimal128AmountPrecision]] to _precision_.
437+
1. Set _O_.[[Decimal128AmountSignificantDigits]] to _precision_.
438438
1. Return _O_.
439439
</emu-alg>
440440
</emu-clause>
@@ -1160,18 +1160,18 @@ location: https://github.com/tc39/proposal-decimal/
11601160
<emu-alg>
11611161
1. Let _O_ be the *this* value.
11621162
1. Perform ? RequireInternalSlot(_O_, [[Decimal128AmountData]]).
1163-
1. Perform ? RequireInternalSlot(_O_, [[Decimal128AmountPrecision]]).
1163+
1. Perform ? RequireInternalSlot(_O_, [[Decimal128AmountSignificantDigits]]).
11641164
1. Perform ? RequireInternalSlot(_x_, [[Decimal128AmountData]]).
1165-
1. Perform ? RequireInternalSlot(_x_, [[Decimal128AmountPrecision]]).
1165+
1. Perform ? RequireInternalSlot(_x_, [[Decimal128AmountSignificantDigits]]).
11661166
1. Let _d1_ be _O_.[[Decimal128AmountData]].
11671167
1. Let _d2_ be _x_.[[Decimal128AmountData]].
11681168
1. Assert: _d1_ is a finite Decimal128 value.
11691169
1. Assert: _d2_ is a finite Decimal128 value.
11701170
1. If _d1_ is either *+0*<sub>𝔻</sub> or *-0*<sub>𝔻</sub>, set _d1_ to 0.
11711171
1. If _d2_ is either *+0*<sub>𝔻</sub> or *-0*<sub>𝔻</sub>, set _d2_ to 0.
11721172
1. If _d1_ ≠ _d2_, return *false*.
1173-
1. Let _precision1_ be _O_.[[Decimal128AmountPrecision]].
1174-
1. Let _precision2_ be _x_.[[Decimal128AmountPrecision]].
1173+
1. Let _precision1_ be _O_.[[Decimal128AmountSignificantDigits]].
1174+
1. Let _precision2_ be _x_.[[Decimal128AmountSignificantDigits]].
11751175
1. Assert: _precision1_ is a non-negative integer.
11761176
1. Assert: _precision2_ is a non-negative integer.
11771177
1. If _precision1_ = _precision2_, return *true*.

0 commit comments

Comments
 (0)