davidot
51e23cd043
LibJS: Disallow shorthand properties with reserved names
2021-11-30 17:05:32 +00:00
davidot
e491fc0e81
LibJS: Allow defining class fields with "keyword" names
2021-11-30 17:05:32 +00:00
davidot
cbbfcd35e7
LibJS: Disallow await keywords in static init blocks
...
In static init blocks 'await' cannot be used. Note that this does not
cover all the cases since the parser currently cannot distinguish
between expressions within parenthesis and direct expressions.
2021-11-30 17:05:32 +00:00
davidot
7624c3de0e
LibJS: Disallow '\8' and '\9' in strict mode due to being octal escapes
2021-11-30 17:05:32 +00:00
davidot
c57721cf83
LibJS: Allow escaped 'async' as identifier
...
Since 'async' is only special if it occurs before a function it can be
used as escaped identifier in all cases.
2021-11-30 17:05:32 +00:00
davidot
e751dcea43
LibJS: Treat private identifier as divisible token
...
And also make sure private identifiers are correctly checked when
synthesizing a binding pattern.
2021-11-30 17:05:32 +00:00
davidot
afde1821b5
LibJS: Disallow numerical separators in octal numbers and after '.'
2021-11-30 17:05:32 +00:00
davidot
32016d3924
LibJS: Allow object properties called 'async'
2021-11-30 17:05:32 +00:00
davidot
450dedabd1
LibJS: Add messages to the toEval and toEvalTo tests
...
This makes it a lot easier to understand what is going wrong when an
eval test fails. As an example instead of just getting:
`ExpectationError`
You would now get:
`ExpectationError: Expected _1_2E+0_1_ to eval to _12_ but got _120_`.
2021-11-30 17:05:32 +00:00
Luke Wilde
2cea4ad508
LibJS: Implement Temporal.Duration.prototype.subtract
2021-11-29 22:56:35 +00:00
Luke Wilde
ac8c3919cb
LibJS: Implement Temporal.Duration.prototype.add
2021-11-29 22:56:35 +00:00
Luke Wilde
acf8729a81
LibJS: Implement Temporal.Duration.prototype.round
2021-11-29 22:56:35 +00:00
Timothy Flynn
4a08fd2be2
LibJS: Implement Intl.DateTimeFormat.prototype.resolvedOptions
2021-11-29 22:48:46 +00:00
Timothy Flynn
d0e1997e07
LibJS: Implement Intl.DateTimeFormat.supportedLocalesOf
2021-11-29 22:48:46 +00:00
Timothy Flynn
16151aa7d5
LibJS+LibUnicode: Implement the Intl.DateTimeFormat constructor
2021-11-29 22:48:46 +00:00
Timothy Flynn
75b2a09a2f
LibJS: Implement a nearly empty Intl.DateTimeFormat object
...
This adds plumbing for the Intl.DateTimeFormat object, constructor, and
prototype.
Note that unlike other Intl objects, the Intl.DateTimeFormat object has
a LibUnicode structure as a base. This is to prevent wild amounts of
code duplication between LibUnicode, Intl.DateTimeFormat, and other
not-yet-defined Intl structures, because there's 12 fields shared
between them.
2021-11-29 22:48:46 +00:00
davidot
e69276e704
LibJS: Implement parsing and executing for-await-of loops
2021-11-29 15:20:07 +00:00
Linus Groh
f7ba81ac52
LibJS: Implement parsing of TemporalDurationString
2021-11-28 10:32:28 +00:00
Linus Groh
8f99c05f97
LibJS: Implement Temporal.PlainYearMonth.prototype.since()
2021-11-27 19:11:31 +00:00
Linus Groh
bdd2c357fd
LibJS: Implement Temporal.PlainYearMonth.prototype.until()
2021-11-27 19:11:31 +00:00
Linus Groh
6f2e0b3355
LibJS: Implement Temporal.PlainYearMonth.prototype.subtract()
2021-11-27 17:48:04 +00:00
Linus Groh
acbcd64cdc
LibJS: Implement Temporal.PlainYearMonth.prototype.add()
2021-11-27 17:48:04 +00:00
Idan Horowitz
957f54d96f
LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceeded
...
These seem more appropriate.
2021-11-27 01:58:05 +02:00
Linus Groh
de69f5dbf4
LibJS: Implement Temporal.ZonedDateTime.prototype.since()
2021-11-24 17:53:00 +00:00
Linus Groh
7a2eeae8c6
LibJS: Implement Temporal.ZonedDateTime.prototype.until()
2021-11-24 17:53:00 +00:00
Linus Groh
78724fdd33
LibJS: Don't accept UTC designators in strings for plain Temporal types
...
This is a normative change in the Temporal spec.
See: cd2dc7d
2021-11-24 08:56:03 +00:00
Linus Groh
836ce8ee5d
LibJS: Fix parse ErrorType used in parse_temporal_date_string()
...
TemporalInvalidDateString, not TemporalInvalidDateTimeString.
2021-11-24 08:38:50 +00:00
davidot
0982a73d1d
LibJS: Parse async generator functions
2021-11-21 21:46:39 +00:00
davidot
de46a2cff1
LibJS: Parse async arrow functions
2021-11-21 21:46:39 +00:00
Linus Groh
0619c34703
LibJS: Implement Temporal.PlainDateTime.prototype.since()
2021-11-21 20:04:19 +00:00
Linus Groh
803eddbb62
LibJS: Implement Temporal.PlainDateTime.prototype.until()
2021-11-21 20:04:19 +00:00
Linus Groh
aed444253c
LibJS: Implement Temporal.PlainTime.prototype.since()
2021-11-21 20:04:19 +00:00
Linus Groh
2ac1774fd3
LibJS: Implement Temporal.PlainTime.prototype.until()
2021-11-21 20:04:19 +00:00
Linus Groh
783222f87a
LibJS: Implement parsing of TemporalInstantString
2021-11-20 23:10:09 +00:00
Linus Groh
79a18b058f
LibJS: Implement parsing of TemporalCalendarString
2021-11-20 23:10:09 +00:00
Linus Groh
1583c7257c
LibJS: Implement parsing of TemporalRelativeToString
2021-11-20 23:10:09 +00:00
Linus Groh
98b876ad3f
LibJS: Implement parsing of TemporalZonedDateTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
3b1de431cc
LibJS: Implement parsing of TemporalYearMonthString
2021-11-20 23:10:09 +00:00
Linus Groh
3ddab2f4fe
LibJS: Implement parsing of TemporalMonthDayString
2021-11-20 23:10:09 +00:00
Linus Groh
453c78215c
LibJS: Implement parsing of TemporalTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
b42b7d5f16
LibJS: Implement parsing of TemporalDateTimeString
2021-11-20 23:10:09 +00:00
Linus Groh
02e7de2cba
LibJS: Implement parsing of TemporalDateString
2021-11-20 23:10:09 +00:00
Linus Groh
d0c29c9735
LibJS: Allow string as parameter in Temporal's round() / total()
...
This is a normative change in the Temporal spec.
See: 1f0c586
2021-11-19 11:06:53 +00:00
Linus Groh
ec1e1f4f12
LibJS: Disallow Temporal.Duration input values to be non-integers
...
This is a normative change in the Temporal spec.
See: 8c85450
2021-11-17 22:20:59 +00:00
Luke Wilde
3666d2132b
LibJS: Remove fallback value for get_offset_nanoseconds_for
...
This is a normative change in the Temporal spec.
See: 664f02d
Note that the tests are not comprehensive.
2021-11-17 11:30:13 +00:00
Linus Groh
f1784c9c87
LibJS/Tests: Fix failing Array.prototype.toLocaleString() test
2021-11-17 10:00:20 +00:00
Timothy Flynn
39ab1a8999
LibJS: Implement ECMA-402 Array.prototype.toLocaleString
...
Turns out the only difference between our existing implementation and
the ECMA-402 implementation is we weren't passing the locales and
options list to each element.toLocaleString invocation.
This also adds spec comments to the definition.
2021-11-17 09:01:32 +00:00
Timothy Flynn
c19c3205ff
LibJS: Implement ECMA-402 Number.prototype.toLocaleString
2021-11-17 09:01:32 +00:00
Timothy Flynn
a1d5849e67
LibJS: Implement unit number formatting
2021-11-16 23:14:09 +00:00
Linus Groh
58c6a156bf
LibCrypto: Fix subtracting two negative SignedBigInteger
s
...
Currently, we get the following results
-1 - -2 = -1
-2 - -1 = 1
Correct would be:
-1 - -2 = 1
-2 - -1 = -1
This was already attempted to be fixed in 7ed8970
, but that change was
incorrect. This directly translates to LibJS BigInts having the same
incorrect behavior - it even was tested.
2021-11-16 10:06:53 +00:00