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
Ben Wiederhake
32e98d0924
Libraries: Use AK::Variant default initialization where appropriate
2021-09-21 04:22:52 +04:30
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
76bafe5542
LibJS: Always inline two hot (and trivial) functions in JS::Lexer
...
This improves parsing time on a large chunk of JS by ~5%.
2021-09-18 19:54:24 +02:00
Andreas Kling
33f038ba7a
LibJS: Add fast failure path to try_parse_labelled_statement()
...
If the next token isn't a TokenType::Colon (:), this can't possibly be a
labelled statement, so we can fail before having to save_state().
This improves parsing time on a large chunk of JS by ~12.5%.
2021-09-18 19:54:24 +02:00
Andreas Kling
8bde4e94d8
LibJS: Make Lexer::s_keywords store keywords as FlyString
...
This allows O(1) comparison against lexed keywords, since we lex to
FlyString.
2021-09-18 19:54:24 +02:00
Andreas Kling
bf46845819
LibJS: Avoid a temporary AK::String when lexing already-seen identifiers
...
By using the FlyString(StringView) constructor instead of the
FlyString(String) one, we can dodge a temporary String construction.
This improves parsing time on a large chunk of JS by ~1.6%.
2021-09-18 19:54:24 +02: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
Andreas Kling
f58b2a0358
LibJS: Increase time between garbage collections
...
This patch ups the max number of heap allocations between each GC
from 10'000 to 100'000. This is still relatively aggressive but already
does a good job of cutting down on time spent in GC.
2021-09-17 15:23:18 +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
Linus Groh
dd483d84f8
LibJS: Convert to_seconds_string_precision() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f8f074f8a9
LibJS: Convert to_temporal_rounding_increment() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
65d26dd25e
LibJS: Convert to_show_calendar_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
509d13cf67
LibJS: Convert to_temporal_rounding_mode() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
9f03647f1f
LibJS: Convert to_temporal_overflow() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
b1e7e62657
LibJS: Convert get_string_or_number_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8d6ac267dc
LibJS: Convert Temporal::get_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
08dd1c3e2d
LibJS: Convert get_options_object() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f2b5ddd167
LibJS: Convert iterable_to_list_of_type() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00