Ali Mohammad Pur
72ddaa31e3
LibJS: Implement parsing and execution of optional chains
2021-09-14 20:03:27 +01:00
Linus Groh
99f9609e45
LibJS: Evaluate function arguments before checking callee type
...
In the spec, this happens in the EvaluateCall abstract operation
(https://tc39.es/ecma262/#sec-evaluatecall ), and the order is defined
as:
3. Let argList be ? ArgumentListEvaluation of arguments.
4. If Type(func) is not Object, throw a TypeError exception.
5. If IsCallable(func) is false, throw a TypeError exception.
In LibJS this is handled by CallExpression::execute(), which had the
callee function check first and would therefore never evaluate the
arguments for a non-function callee.
2021-09-13 17:44:08 +01:00
Timothy Flynn
76589d6728
LibJS: Change wording of ErrorType::NotA to be independent of context
...
Currently, we have NotA and NotAn, to be used dependent on whether the
following word begins with a vowel or not. To avoid this, change the
wording on NotA to be independent of this context.
2021-09-12 00:16:39 +02:00
Timothy Flynn
9b5696fee7
LibJS: Implement Intl.NumberFormat.prototype.resolvedOptions
2021-09-11 11:05:50 +01:00
Timothy Flynn
071e193d92
LibJS: Implement Intl.NumberFormat.supportedLocalesOf
2021-09-11 11:05:50 +01:00
Timothy Flynn
e42ba7f748
LibJS: Implement the Intl.NumberFormat constructor
2021-09-11 11:05:50 +01:00
Timothy Flynn
07f12b108b
LibJS: Implement a nearly empty Intl.NumberFormat object
...
This adds plumbing for the Intl.NumberFormat object, constructor, and
prototype.
2021-09-11 11:05:50 +01:00
Luke Wilde
3548b08de2
LibJS: Implement Temporal.PlainMonthDay.prototype.equals
2021-09-10 23:10:18 +01:00
Luke Wilde
2d5b15295a
LibJS: Implement Temporal.PlainMonthDay.from
2021-09-10 23:10:18 +01:00
Luke Wilde
90ada407db
LibJS: Implement Temporal.PlainYearMonth.compare
2021-09-09 09:06:23 +01:00
Luke Wilde
092ec0cecf
LibJS: Implement Temporal.PlainYearMonth.from
2021-09-09 09:06:23 +01:00
Luke Wilde
58e2597dc2
LibJS: Implement Temporal.PlainYearMonth.prototype.equals
2021-09-09 09:06:23 +01:00
Linus Groh
d3fcf5a570
LibJS: Implement Temporal.Instant.prototype.toZonedDateTimeISO()
2021-09-09 08:52:48 +01:00
Linus Groh
6607d1dfb1
LibJS: Implement Temporal.Instant.prototype.toZonedDateTime()
2021-09-09 08:52:48 +01:00
Linus Groh
9661d15fe2
LibJS: Implement Temporal.PlainTime.prototype.toJSON()
2021-09-08 23:42:26 +01:00
Linus Groh
6987e326d8
LibJS: Implement Temporal.PlainTime.prototype.toLocaleString()
2021-09-08 23:42:26 +01:00
Linus Groh
9f78a957d5
LibJS: Implement Temporal.PlainTime.prototype.toString()
2021-09-08 23:42:26 +01:00
davidot
db0a48d34c
LibJS: Restore the environment if an exception is thrown in 'with' block
2021-09-08 20:37:39 +01:00
Luke Wilde
d943b8f100
LibJS: Implement Temporal.PlainTime.prototype.with
...
Ticks off one box in #8982 and fixes one test262 case.
2021-09-08 19:57:29 +01:00
davidot
43b17f27a3
test-js: Add a mark_as_garbage method to force GC to collect that object
...
This should fix the flaky tests of test-js.
It also fixes the tests when running with the -g flag since the values
will not be garbage collected too soon.
2021-09-08 08:53:02 +01:00
Luke Wilde
7788a7e744
LibJS: Fix Temporal.PlainTime.prototype.equals test
...
The two plain times weren't being compared to each other.
2021-09-08 08:48:13 +01:00
Linus Groh
33f76f88bb
LibJS: Add and use the CreateNegatedTemporalDuration AO
...
This is a normative change in the Temporal spec.
See: 6178ed3
2021-09-08 00:07:18 +01:00
Linus Groh
97cc8f4613
LibJS: Validate Calendar.prototype.fields() values more strictly
...
This is a normative change in the Temporal spec.
See:
- 75b66d8
- 9c2262b
2021-09-08 00:07:18 +01:00
Andreas Kling
6ad427993a
Everywhere: Behaviour => Behavior
2021-09-07 13:53:14 +02:00
Timothy Flynn
ef94c73a01
LibJS: Implement Intl.ListFormat.prototype.resolvedOptions
2021-09-06 23:49:56 +01:00
Timothy Flynn
5c06a91dfa
LibJS: Implement Intl.ListFormat.prototype.formatToParts
2021-09-06 23:49:56 +01:00
Timothy Flynn
cdba40f7ea
LibJS: Implement Intl.ListFormat.prototype.format
2021-09-06 23:49:56 +01:00
Timothy Flynn
3b410742ab
LibJS: Implement Intl.ListFormat.supportedLocalesOf
2021-09-06 23:49:56 +01:00
Timothy Flynn
eacc8bef47
LibJS: Implement the Intl.ListFormat constructor
2021-09-06 23:49:56 +01:00
Timothy Flynn
8e75e5fabb
LibJS: Implement a nearly empty Intl.ListFormat object
...
This adds plumbing for the Intl.ListFormat object, constructor, and
prototype.
2021-09-06 23:49:56 +01:00
Idan Horowitz
4b5aa2102c
LibJS: Implement Temporal.Instant.prototype.since
2021-09-06 22:15:39 +01:00
Idan Horowitz
470499b2a8
LibJS: Implement Temporal.Instant.prototype.until
2021-09-06 22:15:39 +01:00
Timothy Flynn
207319ecf1
LibJS: Implement ECMA-402 String.prototype.toLocale{Lower,Upper}Case
2021-09-06 15:24:27 +01:00
davidot
3fee7b0d0b
LibJS: Fix that windows style line endings were not ignored or converted
...
These are tested by test262 but the current test262-runner reads the
files in python which automatically converts \r\n to \n.
This meant that we passed the tests while we should not have.
2021-09-06 08:43:38 +01:00
Linus Groh
941ff0cf60
LibJS: Prevent stack overflow if Proxy handler's __proto__ is the Proxy
...
Fixes #9322 .
2021-09-05 22:17:09 +01:00
Linus Groh
0094259d72
LibJS: Implement Intl.DisplayNames.supportedLocalesOf()
2021-09-04 19:08:18 +01:00
Timothy Flynn
90971673c7
LibJS: Implement Intl.Locale.prototype.minimize
2021-09-04 13:51:40 +01:00
Timothy Flynn
0b1f5118d5
LibJS: Implement Intl.Locale.prototype.maximize
2021-09-04 13:51:40 +01:00
Linus Groh
0e6d503317
LibJS: Throw RangeError for non-integral values in ToPartialDuration
...
This is a normative change in the Temporal spec.
See: 895c8e5
2021-09-02 20:16:44 +01:00
Luke Wilde
c20669328d
LibJS: Handle +Infinity, -Infinity, +0 and -0 in modulo operator
...
Fixes 11 test262 cases.
2021-09-02 18:26:42 +01:00
Timothy Flynn
32825107de
LibJS: Implement Intl.Locale.prototype.region
2021-09-02 17:56:42 +01:00
Timothy Flynn
349fd06b86
LibJS: Implement Intl.Locale.prototype.script
2021-09-02 17:56:42 +01:00
Timothy Flynn
c3b6f43641
LibJS: Implement Intl.Locale.prototype.language
2021-09-02 17:56:42 +01:00
Timothy Flynn
bdf36575c8
LibJS: Implement Intl.Locale.prototype.numeric
2021-09-02 17:56:42 +01:00
Timothy Flynn
d7825f3680
LibJS: Implement most Intl.Locale.Prototype.<<keyword>> properties
...
The keyword accessors all have the same function body in the spec,
except for the Intl.Locale method they invoke. This generates those
properties in the same manner as RegExp.prototype.
Intl.Locale.prototype.calendar
Intl.Locale.prototype.caseFirst
Intl.Locale.prototype.collation
Intl.Locale.prototype.hourCycle
Intl.Locale.prototype.numberingSystem
The exception is Intl.Locale.prototype.numeric, which will be defined
separately because it is a boolean value.
2021-09-02 17:56:42 +01:00
Timothy Flynn
21b3c5edba
LibJS: Implement Intl.Locale.prototype.baseName
2021-09-02 17:56:42 +01:00
Timothy Flynn
27fc3cfe75
LibJS: Handle existing Intl.Locale objects in CanonicalizeLocaleList
2021-09-02 17:56:42 +01:00
Timothy Flynn
4de05faa8a
LibJS: Add test cases for Intl.Locale.prototype.toString
...
Intl.Locale.prototype.toString wasn't testable before the constructor
was implemented.
2021-09-02 17:56:42 +01:00
Timothy Flynn
17639a42ae
LibJS: Implement the Intl.Locale constructor
2021-09-02 17:56:42 +01:00
Timothy Flynn
990dd037d2
LibJS: Implement Intl.Locale.prototype.toString()
...
This isn't particularly testable yet without the Intl.Locale constructor
but having this defined will make testing the constructor possible. So
more specific tests for this prototype will come later.
2021-09-02 17:56:42 +01:00