Idan Horowitz
294f244745
LibJS: Convert SymbolConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
87ff51fa67
LibJS: Convert BigIntPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
4128f95903
LibJS: Convert BigIntConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Linus Groh
09d1db5afd
LibJS: Clarify mathematical types in Temporal AOs and functions
...
This is an editorial change in the Temporal spec.
See: e480d40
2021-10-26 23:10:11 +02:00
Andreas Kling
72cd31d033
LibJS: Tweak Value::to_property_key() fast path for Int32
...
Move the check for Int32 *before* we call to_primitive().
2021-10-25 15:37:28 +02:00
Andreas Kling
b63d17e2f8
LibJS: Add fast paths for <, >, <=, and >= with Int32 on both sides
...
This gives us a ~5% speed-up on Kraken's ai-astar.js
2021-10-25 14:35:23 +02:00
Andreas Kling
a97d75bb63
LibJS: Add default constructor for PrivateName
...
This avoids a round-trip through FlyString("") for every Reference.
2021-10-25 13:29:44 +02:00
Andreas Kling
5a099b98cd
LibJS: Make eval() code run in the bytecode VM
...
If we have an active bytecode interpreter, let's make eval() use it.
2021-10-25 12:57:21 +02:00
Andreas Kling
b138b4c83f
LibJS: Optimize Value::to_property_key() for numeric property names
...
If the Value is a non-negative Int32, create a numeric PropertyKey
instead of making a string key.
This makes "ai-astar" test from the Kraken benchmark run in 30 seconds,
down from 42 seconds. :^)
2021-10-24 17:18:09 +02:00
Andreas Kling
65a7296b8f
LibJS: Make Value::to_property_key() return a JS::PropertyKey
...
Instead of returning JS::StringOrSymbol, which is a space-optimized type
used in Shape property tables, this now returns JS::PropertyKey which is
*not* space-optimized, but has other niceties like optimized storage of
numeric ("indexed") properties.
2021-10-24 17:18:09 +02:00
Andreas Kling
7ccb8c8609
LibJS: Provide default hash traits for JS::PropertyKey
...
Let's not require people to use PropertyNameTraits everywhere when we
can just specialize AK::Traits<JS::PropertyKey> instead. :^)
2021-10-24 17:18:09 +02:00
Andreas Kling
75f2510de9
LibJS: Make make_super_property_reference() take a PropertyKey
...
Let's get rid of StringOrSymbol usage outside of Shape.
2021-10-24 17:18:08 +02:00
Andreas Kling
398c181c79
LibJS: Rename PropertyName to PropertyKey
...
Let's use the same name as the spec. :^)
2021-10-24 17:18:07 +02:00
Andreas Kling
f75d78f56a
LibJS: Include executable name in bytecode dumps
2021-10-24 17:18:06 +02:00
davidot
9c9aaf4d4f
LibJS: Don't VERIFY that a function is Regular when executing in AST
...
By replacing this VERIFY with a thrown Error we no longer crash when
calling a generator function in the AST interpreter. This allows us to
more gracefully handle situation which have not been implemented yet.
In particular this helps the libjs-test262-runner since it can now
continue on to the next tests instead of having the entire process end.
2021-10-24 08:38:02 +01:00
Timothy Flynn
e503b60bdc
LibJS: Convert a few TRYs to MUST in RegExp.prototype
...
These are marked with ! in the spec. This also adds assertions above
a couple of these operations to be extra sure (the spec also indicates
we should make these assertions).
2021-10-23 19:22:34 +01:00
Timothy Flynn
20f73d2abc
LibJS: Convert Atomics functions to ThrowCompletionOr
2021-10-23 19:16:03 +01:00
Timothy Flynn
3edf86462b
LibJS: Convert typed_array_from to ThrowCompletionOr
2021-10-23 19:16:03 +01:00
Idan Horowitz
2ab089fa21
LibJS: Convert RegExpStringIteratorPrototype to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
063ce946b7
LibJS: Convert RegExpPrototype functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
9b3c91aa65
LibJS: Convert the RegExpExec AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
a89d9d2c6f
LibJS: Convert the RegExpBuiltinExec AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
a2fbf6a3d5
LibJS: Convert the MakeIndicesArray AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
e3181a7ded
LibJS: Convert RegExpConstructor functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
844be7a0a5
LibJS: Convert the RegExpCreate AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
d9f5e2d461
LibJS: Convert the RegExpInitialize AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
35faf50941
LibJS: Convert PromisePrototype functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
5af8f72d54
LibJS: Convert PromiseConstructor functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
81bdb20c61
LibJS: Convert the PromiseResolve AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
0d602c5ec5
LibJS: Convert the NewPromiseCapability AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
2b87f77578
LibJS: Convert DatePrototype functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
ba39a54bb8
LibJS: Convert DateConstructor functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
306c25f3c2
LibJS: Convert the NumberToBigInt AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
f7bafea661
LibJS: Convert TypedArrayConstructor functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
92b25cacd1
LibJS: Convert TypedArrayPrototype functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
94be1f772a
LibJS: Convert typed_array_merge_sort to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
86aa8a14ea
LibJS: Convert the TypedArraySpeciesCreate AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
18c2d537c7
LibJS: Convert StringPrototype functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
38c4693c70
LibJS: Convert the CreateHTML AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
0948bd8c1e
LibJS: Convert the PadString AO to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
70a35f9600
LibJS: Convert resolve_best_locale to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Idan Horowitz
28e1e03234
LibJS: Convert StringConstructor functions to ThrowCompletionOr
2021-10-23 18:01:51 +02:00
Linus Groh
dd2655c1fb
LibJS: Update Annex B String.prototype extension spec section numbers
2021-10-23 11:38:13 +02:00
Linus Groh
d655a0a42e
LibJS: Add "at" to Array.prototype[@@unscopables]
2021-10-23 11:38:13 +02:00
Linus Groh
534fd41fa3
LibJS: Use ECMA-262 spec URLs for .at() (relative indexing, now stage 4)
2021-10-23 11:38:13 +02:00
Linus Groh
5ff7d7945d
LibJS: Use ECMA-262 spec URL for Object.hasOwn() (now stage 4)
2021-10-23 11:38:13 +02:00
Linus Groh
60ee542612
LibJS: Mark GetEpochFromISOParts as infallible
...
This is an editorial change in the Temporal spec.
See: 66ea81b
2021-10-23 01:05:50 +01:00
Idan Horowitz
0f5cfe975f
LibJS: Convert ArrayPrototype functions to ThrowCompletionsOr
2021-10-23 02:49:41 +03:00
Idan Horowitz
36446c0bd5
LibJS: Convert the FlattenIntoArray AO to ThrowCompletionOr
2021-10-23 02:49:41 +03:00
Idan Horowitz
953265805e
LibJS: Convert array_merge_sort to ThrowCompletionOr
2021-10-23 02:49:41 +03:00