Linus Groh
b7e5f08e56
LibJS: Convert Object::get() to ThrowCompletionOr
...
To no one's surprise, this patch is pretty big - this is possibly the
most used AO of all of them. Definitely worth it though.
2021-10-03 20:14:03 +01:00
Idan Horowitz
ab594e5f2f
LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Idan Horowitz
5a4c90fcb1
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Idan Horowitz
a6b8291a9b
LibJS: Add define_direct_property and remove the define_property helper
...
This removes all usages of the non-standard define_property helper
method and replaces all it's usages with the specification required
alternative or with define_direct_property where appropriate.
2021-07-06 14:20:30 +01:00
Linus Groh
9555ca99a0
LibJS: Remove unnecessary value_or() from get()
...
Object::get() never returns an empty value anymore, as per the spec, so
having a value_or() fallback is no longer needed.
2021-07-05 00:03:25 +02:00
Idan Horowitz
581f20e6f2
LibJS: Accept FlyStrings in the NativeFunction constructors
...
This makes the implicit run-time assertion in PropertyName::to_string()
into an explicit compile-time requirement, removes a wasteful FlyString
-> PropertyName -> FlyString construction from NativeFunction::create()
and allows setting the function name to a null string for anonymous
native functions.
2021-06-28 08:55:14 +01:00
Andreas Kling
ba9d5c4d54
LibJS: Rename Function => FunctionObject
2021-06-27 22:36:04 +02:00
Linus Groh
8f6ac0db1c
LibJS: Use OrdinaryCreateFromConstructor() in a bunch of constructors
...
Resolves various FIXMEs :^)
2021-06-20 12:12:39 +02:00
Linus Groh
7f8245439b
LibJS: Add a bunch more missing ECMA-262 section/title/URL comments
2021-06-19 00:38:41 +01:00
Idan Horowitz
3c83298a26
LibJS: Use undefined as the fallback value for iterable entry key/value
...
As defined in OdinaryGet in the specification.
2021-06-12 22:34:28 +01:00
Idan Horowitz
39554f3787
LibJS: Add the WeakMap built-in object
2021-06-12 10:44:28 +01:00