diff --git a/spec.html b/spec.html
index 23857ed25ef..7d2690c6f3e 100644
--- a/spec.html
+++ b/spec.html
@@ -10929,6 +10929,7 @@
Syntax
DecimalBigIntegerLiteral
NonDecimalIntegerLiteral[+Sep]
NonDecimalIntegerLiteral[+Sep] BigIntLiteralSuffix
+ LegacyOctalIntegerLiteral
DecimalBigIntegerLiteral ::
`0` BigIntLiteralSuffix
@@ -10952,6 +10953,7 @@ Syntax
`0`
NonZeroDigit
NonZeroDigit NumericLiteralSeparator? DecimalDigits[+Sep]
+ NonOctalDecimalIntegerLiteral
DecimalDigits[Sep] ::
DecimalDigit
@@ -10996,9 +10998,25 @@ Syntax
OctalDigits[?Sep] OctalDigit
[+Sep] OctalDigits[+Sep] NumericLiteralSeparator OctalDigit
+ LegacyOctalIntegerLiteral ::
+ `0` OctalDigit
+ LegacyOctalIntegerLiteral OctalDigit
+
+ NonOctalDecimalIntegerLiteral ::
+ `0` NonOctalDigit
+ LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit
+ NonOctalDecimalIntegerLiteral DecimalDigit
+
+ LegacyOctalLikeDecimalIntegerLiteral ::
+ `0` OctalDigit
+ LegacyOctalLikeDecimalIntegerLiteral OctalDigit
+
OctalDigit :: one of
`0` `1` `2` `3` `4` `5` `6` `7`
+ NonOctalDigit :: one of
+ `8` `9`
+
HexIntegerLiteral[Sep] ::
`0x` HexDigits[?Sep]
`0X` HexDigits[?Sep]
@@ -11015,9 +11033,21 @@ Syntax
For example: `3in` is an error and not the two input elements `3` and `in`.
- A conforming implementation, when processing strict mode code, must not extend, as described in , the syntax of |NumericLiteral| to include , nor extend the syntax of |DecimalIntegerLiteral| to include .
-
+
+ Static Semantics: Early Errors
+
+ NumericLiteral :: LegacyOctalIntegerLiteral
+
+ DecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral
+
+
+ - It is a Syntax Error if the source code matching this production is strict mode code.
+
+ In non-strict code, this syntax is allowed, but deprecated.
+
+
+
Static Semantics: MV
A numeric literal stands for a value of the Number type or the BigInt type.
@@ -11112,10 +11142,10 @@ Static Semantics: MV
The MV of DecimalDigit :: `7` or of NonZeroDigit :: `7` or of HexDigit :: `7` or of OctalDigit :: `7` is 7.
-
- The MV of DecimalDigit :: `8` or of NonZeroDigit :: `8` or of HexDigit :: `8` is 8.
+ The MV of DecimalDigit :: `8` or of NonZeroDigit :: `8` or of NonOctalDigit :: `8` or of HexDigit :: `8` is 8.
-
- The MV of DecimalDigit :: `9` or of NonZeroDigit :: `9` or of HexDigit :: `9` is 9.
+ The MV of DecimalDigit :: `9` or of NonZeroDigit :: `9` or of NonOctalDigit :: `9` or of HexDigit :: `9` is 9.
-
The MV of HexDigit :: `a` or of HexDigit :: `A` is 10.
@@ -11165,6 +11195,27 @@
Static Semantics: MV
-
The MV of OctalDigits :: OctalDigits NumericLiteralSeparator OctalDigit is (the MV of |OctalDigits| × 8) plus the MV of |OctalDigit|.
+ -
+ The MV of LegacyOctalIntegerLiteral :: `0` OctalDigit is the MV of |OctalDigit|.
+
+ -
+ The MV of LegacyOctalIntegerLiteral :: LegacyOctalIntegerLiteral OctalDigit is (the MV of |LegacyOctalIntegerLiteral| times 8) plus the MV of |OctalDigit|.
+
+ -
+ The MV of NonOctalDecimalIntegerLiteral :: `0` NonOctalDigit is the MV of |NonOctalDigit|.
+
+ -
+ The MV of NonOctalDecimalIntegerLiteral :: LegacyOctalLikeDecimalIntegerLiteral NonOctalDigit is (the MV of |LegacyOctalLikeDecimalIntegerLiteral| times 10) plus the MV of |NonOctalDigit|.
+
+ -
+ The MV of NonOctalDecimalIntegerLiteral :: NonOctalDecimalIntegerLiteral DecimalDigit is (the MV of |NonOctalDecimalIntegerLiteral| times 10) plus the MV of |DecimalDigit|.
+
+ -
+ The MV of LegacyOctalLikeDecimalIntegerLiteral :: `0` OctalDigit is the MV of |OctalDigit|.
+
+ -
+ The MV of LegacyOctalLikeDecimalIntegerLiteral :: LegacyOctalLikeDecimalIntegerLiteral OctalDigit is (the MV of |LegacyOctalLikeDecimalIntegerLiteral| times 10) plus the MV of |OctalDigit|.
+
-
The MV of HexIntegerLiteral :: `0x` HexDigits is the MV of |HexDigits|.
@@ -11196,6 +11247,10 @@ Static Semantics: NumericValue
1. Return the Number value that results from rounding the MV of |NonDecimalIntegerLiteral| as described below.
+ NumericLiteral :: LegacyOctalIntegerLiteral
+
+ 1. Return the Number value that results from rounding the MV of |LegacyOctalIntegerLiteral| as described below.
+
Once the exact MV for a numeric literal has been determined, it is then rounded to a value of the Number type. If the MV is 0, then the rounded value is *+0*𝔽; otherwise, the rounded value must be the Number value for the MV (as specified in ), unless the literal is a |DecimalLiteral| and the literal has more than 20 significant digits, in which case the Number value may be either the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a `0` digit or the Number value for the MV of a literal produced by replacing each significant digit after the 20th with a `0` digit and then incrementing the literal at the 20th significant digit position. A digit is significant if it is not part of an |ExponentPart| and