Linus Groh
d5f90cf187
LibJS: Rename ECMAScriptFunctionObject members to match spec names
...
Also add the internal slot names as comments, and separate them into
groups of spec and non-spec members.
This will make it easier to compare the implementation code with the
spec, as well as identify internal slots currently missing or only
present on FunctionObject.
2021-09-25 17:51:30 +02:00
Linus Groh
e37cf73300
LibJS: Rename OrdinaryFunctionObject to ECMAScriptFunctionObject
...
The old name is the result of the perhaps somewhat confusingly named
abstract operation OrdinaryFunctionCreate(), which creates an "ordinary
object" (https://tc39.es/ecma262/#ordinary-object ) in contrast to an
"exotic object" (https://tc39.es/ecma262/#exotic-object ).
However, the term "Ordinary Function" is not used anywhere in the spec,
instead the created object is referred to as an "ECMAScript Function
Object" (https://tc39.es/ecma262/#sec-ecmascript-function-objects ), so
let's call it that.
The "ordinary" vs. "exotic" distinction is important because there are
also "Built-in Function Objects", which can be either implemented as
ordinary ECMAScript function objects, or as exotic objects (our
NativeFunction).
More work needs to be done to move a lot of infrastructure to
ECMAScriptFunctionObject in order to make FunctionObject nothing more
than an interface for objects that implement [[Call]] and optionally
[[Construct]].
2021-09-25 17:51:30 +02:00
Linus Groh
facbe32fcd
LibJS: Rename abstract_relation() to is_less_than()
...
This got turned into a proper AO with a new name recently.
See: 587adc0
2021-09-24 09:13:57 +02:00
Linus Groh
580a7e0f7c
LibJS: Rename abstract_eq() to is_loosely_equal()
...
This got turned into a proper AO with a new name recently.
See: c7d6d1c
2021-09-24 09:13:57 +02:00
Linus Groh
c7ff89891c
LibJS: Rename strict_eq() to is_strictly_equal()
...
This got turned into a proper AO with a new name recently.
See: 19d7ca4
2021-09-24 09:13:57 +02:00
Idan Horowitz
5f80d8245d
LibJS: Close iterator on throw completion in Array.from
...
This regressed in #10190
2021-09-24 02:28:17 +03:00
Idan Horowitz
99bc429f3f
LibJS: Add missing exception checks to {Array, TypedArray}.from()
2021-09-24 02:28:17 +03:00
Idan Horowitz
ee825d6d9e
LibJS: Convert get_method to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Idan Horowitz
ab594e5f2f
LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Idan Horowitz
a90107b02a
LibJS: Convert is_regexp to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Idan Horowitz
1db7e096e2
LibJS: Switch is_array to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Idan Horowitz
1da8faebf5
LibJS: Convert perform_eval to ThrowCompletionOr
2021-09-21 23:28:38 +03:00
Idan Horowitz
e24d4c346d
LibJS: Add VM::throw_completion helper for throwing custom Strings
2021-09-21 23:28:38 +03:00
Idan Horowitz
f302b114f3
LibJS: Convert get_substitution to ThrowCompletionOr
2021-09-21 23:28:38 +03:00
Idan Horowitz
69430855e0
LibJS: Remove non-specification compliant exception check
2021-09-21 23:28:38 +03:00
Idan Horowitz
e90e4ac1e2
LibJS: Convert length_of_array_like to ThrowCompletionOr
2021-09-21 23:28:38 +03:00
Idan Horowitz
02a88c5063
LibJS: Convert make_super_property_reference to ThrowCompletionOr
2021-09-21 23:28:38 +03:00
Linus Groh
d792869799
LibJS: Update spec comment to convert mathematical to number value
...
This is an editorial change in the Temporal spec.
See: d2ae357
2021-09-21 19:13:22 +02:00
Idan Horowitz
e00ca10283
LibJS: Convert ListFormat AOs to ThrowCompletionOr
2021-09-18 22:59:15 +03:00
Idan Horowitz
e65aeee67d
LibJS: Convert DisplayNames AOs to ThrowCompletionOr
2021-09-18 22:59:15 +03:00
Idan Horowitz
768009e005
LibJS: Convert NumberFormat AOs to ThrowCompletionOr
2021-09-18 22:59:15 +03:00
Idan Horowitz
407cf04884
LibJS: Convert get_number_option() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
6d3de03549
LibJS: Convert default_number_option() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
b9c7a629f8
LibJS: Convert coerce_options_to_object() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
d0e5fc4576
LibJS: Convert supported_locales() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
de9785b71b
LibJS: Convert Intl::get_option() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Idan Horowitz
3758e65293
LibJS: Convert canonicalize_locale_list() to ThrowCompletionOr
2021-09-18 22:21:15 +03:00
Andreas Kling
1be4cbd639
AK: Make Utf8View constructors inline and remove C string constructor
...
Using StringView instead of C strings is basically always preferable.
The only reason to use a C string is because you are calling a C API.
2021-09-18 19:54:24 +02:00
Linus Groh
f90d98aef0
LibJS: Update step order in the InterpretTemporalDateTimeFields AO
...
This is a normative change in the Temporal spec.
See: be88667
2021-09-18 13:38:48 +02:00
Linus Groh
6bdd62b51b
LibJS: Convert Now AOs to ThrowCompletionOr
2021-09-17 23:43:01 +02:00
Linus Groh
d764f1c699
LibJS: Convert PlainDateTime AOs to ThrowCompletionOr
2021-09-17 23:43:01 +02:00
Linus Groh
35bba1c98d
LibJS: Convert PlainDate AOs to ThrowCompletionOr
2021-09-17 23:43:01 +02:00
Linus Groh
20337a34a2
LibJS: Convert Instant AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
ea7cc70118
LibJS: Convert Duration AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
f8d92232c8
LibJS: Convert Calendar AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
6b4777c558
LibJS: Convert prepare_temporal_fields() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
9ac426c906
LibJS: Convert to_positive_integer() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
2f56fd48ca
LibJS: Convert parse_temporal_year_month_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
14f16d9ed4
LibJS: Convert parse_temporal_time_zone_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
0ccd11ba5f
LibJS: Convert parse_temporal_time_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f86fa12deb
LibJS: Convert parse_temporal_duration_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
3c530dec5a
LibJS: Convert parse_temporal_date_time_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
4cb6eaf588
LibJS: Convert parse_temporal_date_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
2e28f0b371
LibJS: Convert parse_temporal_calendar_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
4f487266b4
LibJS: Convert parse_temporal_instant_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
3112de6f35
LibJS: Convert parse_iso_date_time() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8792fdfdf6
LibJS: Convert reject_temporal_calendar_type() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8dd45a1ba2
LibJS: Convert validate_temporal_unit_range() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
448a364210
LibJS: Convert to_smallest_temporal_unit() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
92187591dd
LibJS: Convert to_largest_temporal_unit() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00