Skip to content

Commit

Permalink
Fix number-related warnings.
Browse files Browse the repository at this point in the history
See tc39/ecma262#2007. More work will be needed, but
this already fixes the warnings.
  • Loading branch information
Ms2ger committed Oct 14, 2020
1 parent 7b36278 commit 9b029c1
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ <h1>Sign ( _n_ )</h1>
This operation is the same as Math.sign and should be used there as well when merged into ECMA-262.
</emu-note>
<emu-alg>
1. If _n_ is *NaN*, n is *+0*, or n is *−0*, return _n_.
1. If _n_ < 0, return *−1*.
1. Return *+1*.
1. If _n_ is *NaN*, n is *+0*<sub>𝔽</sub>, or n is *−0*<sub>𝔽</sub>, return _n_.
1. If _n_ &lt; *+0*<sub>𝔽</sub>, return *−1*<sub>𝔽</sub>.
1. Return *1*<sub>𝔽</sub>.
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -878,8 +878,8 @@ <h1>ParseTemporalTimeZoneString ( _isoString_ )</h1>
1. If _z_ is not *undefined*, then
1. Return the new Record: {
[[OffsetSign]]: 1,
[[OffsetHour]]: +0,
[[OffsetMinute]]: +0,
[[OffsetHour]]: 0,
[[OffsetMinute]]: 0,
[[Name]]: `"UTC"`
}.
1. If _hour_ is not *undefined*, then
Expand Down
4 changes: 2 additions & 2 deletions spec/date.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1>Temporal.Date.compare ( _one_, _two_ )</h1>
<emu-alg>
1. Perform ? RequireInternalSlot(_one_, [[InitializedTemporalDate]]).
1. Perform ? RequireInternalSlot(_two_, [[InitializedTemporalDate]]).
1. Return ! CompareTemporalDate(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]]).
1. Return 𝔽(! CompareTemporalDate(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]])).
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -952,7 +952,7 @@ <h1>CompareTemporalDate ( _y1_, _m1_, _d1_, _y2_, _m2_, _d2_ )</h1>
1. If _m1_ &lt; _m2_, return -1.
1. If _d1_ &gt; _d2_, return 1.
1. If _d1_ &lt; _d2_, return -1.
1. Return +0.
1. Return 0.
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down
4 changes: 2 additions & 2 deletions spec/datetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1>Temporal.DateTime.compare ( _one_, _two_ )</h1>
<emu-alg>
1. Perform ? RequireInternalSlot(_one_, [[InitializedTemporalDateTime]]).
1. Perform ? RequireInternalSlot(_two_, [[InitializedTemporalDateTime]]).
1. Return ! CompareTemporalDateTime(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _one_.[[Hour]], _one_.[[Minute]], _one_.[[Second]], _one_.[[Millisecond]], _one_.[[Microsecond]], _one_.[[Nanosecond]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]], _two_.[[Hour]], _two_.[[Minute]], _two_.[[Second]], _two_.[[Millisecond]], _two_.[[Microsecond]], _two_.[[Nanosecond]]).
1. Return 𝔽(! CompareTemporalDateTime(_one_.[[ISOYear]], _one_.[[ISOMonth]], _one_.[[ISODay]], _one_.[[Hour]], _one_.[[Minute]], _one_.[[Second]], _one_.[[Millisecond]], _one_.[[Microsecond]], _one_.[[Nanosecond]], _two_.[[ISOYear]], _two_.[[ISOMonth]], _two_.[[ISODay]], _two_.[[Hour]], _two_.[[Minute]], _two_.[[Second]], _two_.[[Millisecond]], _two_.[[Microsecond]], _two_.[[Nanosecond]])).
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -1150,7 +1150,7 @@ <h1>CompareTemporalDateTime ( _y1_, _mon1_, _d1_, _h1_, _min1_, _s1_, _ms1_, _mu
1. If _mus1_ &lt; _mus2_, return -1.
1. If _ns1_ &gt; _ns2_, return 1.
1. If _ns1_ &lt; _ns2_, return -1.
1. Return +0.
1. Return 0.
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down
4 changes: 2 additions & 2 deletions spec/instant.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h1>Temporal.Instant.compare ( _one_, _two_ )</h1>
<emu-alg>
1. Perform ? RequireInternalSlot(_one_, [[InitializedTemporalInstant]]).
1. Perform ? RequireInternalSlot(_two_, [[InitializedTemporalInstant]]).
1. Return ! CompareTemporalInstant(_one_, _two_).
1. Return 𝔽(! CompareTemporalInstant(_one_, _two_)).
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -568,7 +568,7 @@ <h1>CompareTemporalInstant ( _one_, _two_ )</h1>
1. Assert: _two_ has an [[InitializedTemporalInstant]] internal slot.
1. If _one_.[[Nanoseconds]] &gt; _two_.[[Nanoseconds]], return 1.
1. If _one_.[[Nanoseconds]] &lt; _two_.[[Nanoseconds]], return -1.
1. Return +0.
1. Return 0.
</emu-alg>
</emu-clause>

Expand Down
4 changes: 2 additions & 2 deletions spec/isocalendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ <h1>Temporal.ISO8601Calendar.prototype.daysInWeek ( _dateOrDateTime_ )</h1>
</p>
<emu-alg>
1. Perform ? RequireOneOfInternalSlots(_dateOrDateTime_, « [[InitializedTemporalDate]], [[InitializedTemporalDateTime]] »).
1. Return *7*.
1. Return *7*<sub>𝔽</sub>.
</emu-alg>
</emu-clause>

Expand Down Expand Up @@ -278,7 +278,7 @@ <h1>Temporal.ISO8601Calendar.prototype.monthsInYear ( _dateOrDateTime_ )</h1>
</p>
<emu-alg>
1. Perform ? RequireOneOfInternalSlots(_dateOrDateTime_, « [[InitializedTemporalDate]], [[InitializedTemporalDateTime]] »).
1. Return *12*.
1. Return *12*<sub>𝔽</sub>.
</emu-alg>
</emu-clause>

Expand Down
4 changes: 2 additions & 2 deletions spec/time.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h1>Temporal.Time.compare ( _one_, _two_ )</h1>
<emu-alg>
1. Perform ? RequireInternalSlot(_one_, [[InitializedTemporalTime]]).
1. Perform ? RequireInternalSlot(_two_, [[InitializedTemporalTime]]).
1. Return ! CompareTemporalTime(_one_.[[Hour]], _one_.[[Minute]], _one_.[[Second]], _one_.[[Millisecond]], _one_.[[Microsecond]], _one_.[[Nanosecond]], _two_.[[Hour]], _two_.[[Minute]], _two_.[[Second]], _two_.[[Millisecond]], _two_.[[Microsecond]], _two_.[[Nanosecond]]).
1. Return 𝔽(! CompareTemporalTime(_one_.[[Hour]], _one_.[[Minute]], _one_.[[Second]], _one_.[[Millisecond]], _one_.[[Microsecond]], _one_.[[Nanosecond]], _two_.[[Hour]], _two_.[[Minute]], _two_.[[Second]], _two_.[[Millisecond]], _two_.[[Microsecond]], _two_.[[Nanosecond]])).
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -798,7 +798,7 @@ <h1>CompareTemporalTime ( _h1_, _min1_, _s1_, _ms1_, _mus1_, _ns1_, _h2_, _min2_
1. If _mus1_ &lt; _mus2_, return -1.
1. If _ns1_ &gt; _ns2_, return 1.
1. If _ns1_ &lt; _ns2_, return -1.
1. Return +0.
1. Return 0.
</emu-alg>
</emu-clause>

Expand Down
2 changes: 1 addition & 1 deletion spec/yearmonth.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h1>get Temporal.YearMonth.prototype.monthsInYear</h1>
<emu-alg>
1. Let _yearMonth_ be the *this* value.
1. Perform ? RequireInternalSlot(_yearMonth_, [[InitializedTemporalYearMonth]]).
1. Return *12*.
1. Return *12*<sub>𝔽</sub>.
1. <mark>TODO: Make calendar-aware along with all the other properties.</mark>
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 9b029c1

Please sign in to comment.