1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00
serenity/Userland/Libraries/LibJS/Runtime
Linus Groh 33679a8445 LibJS: Add a JS::Completion class and JS::ThrowCompletionOr<T> template
We decided that we want to move away from throwing exceptions in AOs
and regular functions implicitly and then returning some
default-constructed value (usually an empty JS::Value) - this requires
remembering to check for an exception at the call site, which is
error-prone. It's also awkward for return values that cannot be
default-constructed, e.g. MarkedValueList.
Instead, the thrown value should be part of the function return value.

The solution to this is moving closer to the spec and using something
they call "completion records":
https://tc39.es/ecma262/#sec-completion-record-specification-type

This has various advantages:

- It becomes crystal clear whether some AO can fail or not, and errors
  need to be handled and values unwrapped explicitly (for that reason
  compatibility with the TRY() macro is already built-in, and a similar
  TRY_OR_DISCARD() macro has been added specifically for use in LibJS,
  while the majority of functions doesn't return ThrowCompletionOr yet)
- We no longer need to mix "valid" and "invalid" values of various types
  for the success and exception outcomes (e.g. null/non-null AK::String,
  empty/non-empty JS::Value)
- Subsequently it's no longer possible to accidentally use an exception
  outcome return value as a success outcome return value (e.g. any AO
  that returns a numeric type would return 0 even after throwing an
  exception, at least before we started making use of Optional for that)
- Eventually the VM will no longer need to store an exception, and
  temporarily clearing an exception (e.g. to call a function) becomes
  obsolete - instead, completions will simply propagate up to the caller
  outside of LibJS, which then can deal with it in any way
- Similar to throw we'll be able to implement the functionality of
  break, continue, and return using completions, which will lead to
  easier to understand code and fewer workarounds - the current
  unwinding mechanism is not even remotely similar to the spec's
  approach

The spec's NormalCompletion and ThrowCompletion AOs have been
implemented as simple wrappers around the JS::Completion constructor.
UpdateEmpty has been implemented as a JS::Completion method.

There's also a new VM::throw_completion<T>() helper, which basically
works like VM::throw_exception<T>() - it creates a T object (usually a
JS::Error), and returns it wrapped in a JS::Completion of Type::Throw.

Two temporary usage patterns have emerged:

1. Callee already returns ThrowCompletionOr, but caller doesn't:

    auto foo = TRY_OR_DISCARD(bar());

2. Caller already returns ThrowCompletionOr, but callee doesn't:

    auto foo = bar();
    if (auto* exception = vm.exception())
        return throw_completion(exception->value());

Eventually all error handling and unwrapping can be done with just TRY()
or possibly even operator? in the future :^)

Co-authored-by: Andreas Kling <kling@serenityos.org>
2021-09-15 23:46:53 +01:00
..
Intl LibJS: Convert Intl.NumberFormat.prototype to be a PrototypeObject 2021-09-13 19:07:26 +01:00
Temporal LibJS: Fix [[TimeZoneOffsetString]] value in ParseTemporalInstantString 2021-09-15 00:23:11 +01:00
AbstractOperations.cpp LibJS: Return default-constructed values instead of the INVALID constant 2021-09-15 18:41:33 +01:00
AbstractOperations.h LibJS: Make get_function_realm() actually return a Realm 2021-09-12 11:10:20 +01:00
Accessor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
AggregateError.cpp LibJS: Make AggregateError inherit from Error 2021-06-23 13:59:17 +01:00
AggregateError.h LibJS: Make AggregateError inherit from Error 2021-06-23 13:59:17 +01:00
AggregateErrorConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
AggregateErrorConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
AggregateErrorPrototype.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
AggregateErrorPrototype.h LibJS: Implement AggregateError 2021-06-11 18:49:50 +01:00
ArgumentsObject.cpp LibJS: Replace the boolean argument of Object::set with an enum class 2021-07-16 17:50:01 +01:00
ArgumentsObject.h LibJS: Finish implementing mapped arguments exotic objects :^) 2021-07-05 02:38:31 +02:00
Array.cpp Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
Array.h LibJS: Add Array::create_from() for generic Vector<T> 2021-09-04 19:08:18 +01:00
ArrayBuffer.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
ArrayBuffer.h LibJS: Handle possible allocation failure in ArrayBuffer(size_t) 2021-09-06 01:53:26 +02:00
ArrayBufferConstructor.cpp LibJS: Handle possible allocation failure in ArrayBuffer(size_t) 2021-09-06 01:53:26 +02:00
ArrayBufferConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
ArrayBufferPrototype.cpp LibJS: Convert ArrayBuffer.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
ArrayBufferPrototype.h LibJS: Convert ArrayBuffer.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
ArrayConstructor.cpp LibJS: Replace the boolean argument of Object::set with an enum class 2021-07-16 17:50:01 +01:00
ArrayConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
ArrayIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
ArrayIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
ArrayIteratorPrototype.cpp LibJS: Convert ArrayIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
ArrayIteratorPrototype.h LibJS: Convert ArrayIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
ArrayPrototype.cpp LibJS: Make get_function_realm() actually return a Realm 2021-09-12 11:10:20 +01:00
ArrayPrototype.h LibJS: Implement proposed Array.prototype.findLast{,Index} 2021-08-06 16:17:25 +01:00
AtomicsObject.cpp LibJS: Implement Atomics.isLockFree 2021-07-14 22:13:15 +01:00
AtomicsObject.h LibJS: Implement Atomics.isLockFree 2021-07-14 22:13:15 +01:00
BigInt.cpp LibJS: Add a js_bigint(VM&, ...) overload and use it 2021-08-03 00:14:48 +01:00
BigInt.h LibJS: Add a js_bigint(VM&, ...) overload and use it 2021-08-03 00:14:48 +01:00
BigIntConstructor.cpp LibJS: Reorder and add missing name & length properties to Built-ins 2021-07-08 01:45:15 +01:00
BigIntConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
BigIntObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
BigIntObject.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BigIntPrototype.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
BigIntPrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BooleanConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
BooleanConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
BooleanObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanPrototype.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
BooleanPrototype.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoundFunction.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
BoundFunction.h LibJS: Drop "Record" suffix from all the *Environment record classes 2021-07-01 12:28:57 +02:00
CommonPropertyNames.h LibJS: Implement the Intl.NumberFormat constructor 2021-09-11 11:05:50 +01:00
Completion.h LibJS: Add a JS::Completion class and JS::ThrowCompletionOr<T> template 2021-09-15 23:46:53 +01:00
ConsoleObject.cpp LibJS: Remove the default length & attributes from define_native_* 2021-07-06 14:20:30 +01:00
ConsoleObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DataView.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
DataView.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
DataViewConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
DataViewConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
DataViewPrototype.cpp LibJS: Convert DataView.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
DataViewPrototype.h LibJS: Convert DataView.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
Date.cpp LibJS: Add type range checks to the Date make_day AO 2021-08-19 19:15:00 +01:00
Date.h LibJS: Implement a bunch of time value related Date AOs 2021-07-27 19:51:44 +01:00
DateConstructor.cpp LibJS: Make parse_simplified_iso8601() use Optional<int> instead of -1 2021-07-10 19:51:07 +01:00
DateConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
DatePrototype.cpp LibJS: Convert Date.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
DatePrototype.h LibJS: Convert Date.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
DeclarativeEnvironment.cpp LibJS: Make Environment::put_into_environment() return a success bool 2021-07-02 00:26:31 +02:00
DeclarativeEnvironment.h LibJS: Make Environment::put_into_environment() return a success bool 2021-07-02 00:26:31 +02:00
Environment.cpp LibJS: Mark the global object in Environment::visit_edges() 2021-09-11 14:10:11 +02:00
Environment.h LibJS: Make Environment::put_into_environment() return a success bool 2021-07-02 00:26:31 +02:00
Error.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
Error.h LibJS: Move install_error_cause() from Object to Error 2021-06-26 19:06:55 +01:00
ErrorConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
ErrorConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
ErrorPrototype.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
ErrorPrototype.h LibJS: Rename JS_ENUMERATE_{ERROR_SUBCLASSES => NATIVE_ERRORS} 2021-06-11 18:49:50 +01:00
ErrorTypes.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ErrorTypes.h LibJS: Remove ErrorType::NotA and ErrorType::NotAn 2021-09-12 00:16:39 +02:00
Exception.cpp LibJS: Rename CallFrame => ExecutionContext 2021-06-24 19:28:00 +02:00
Exception.h LibJS: Avoid allocations in the Exception constructor 2021-06-03 14:47:15 +01:00
ExecutionContext.h LibJS: Reorganize ExecutionContext a little bit 2021-09-14 21:41:51 +02:00
FinalizationRegistry.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
FinalizationRegistry.h LibJS+js+test-js: Add GC debug mode that keeps cells "alive" as zombies 2021-09-11 16:52:03 +02:00
FinalizationRegistryConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
FinalizationRegistryConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
FinalizationRegistryPrototype.cpp LibJS: Convert FinalizationRegistry.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
FinalizationRegistryPrototype.h LibJS: Convert FinalizationRegistry.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
FunctionConstructor.cpp LibJS: Change Interpreter::create_with_existing_{global_object => realm} 2021-09-12 15:18:25 +02:00
FunctionConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
FunctionEnvironment.cpp LibJS: Make FunctionObject's m_home_object an Object*, not Value 2021-07-05 13:53:30 +01:00
FunctionEnvironment.h LibJS: Drop "Record" suffix from all the *Environment record classes 2021-07-01 12:28:57 +02:00
FunctionObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
FunctionObject.h LibJS: Set the callee context's realm in prepare_for_ordinary_call() 2021-09-12 11:10:20 +01:00
FunctionPrototype.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
FunctionPrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
GeneratorFunctionConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
GeneratorFunctionConstructor.h LibJS: Add missing has_constructor override to Generator Functions 2021-07-13 20:40:57 +02:00
GeneratorFunctionPrototype.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
GeneratorFunctionPrototype.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
GeneratorObject.cpp LibJS: Visit GeneratorObject's previous value if it's any kind of Cell 2021-09-11 18:27:56 +02:00
GeneratorObject.h LibJS: Convert GeneratorObject.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
GeneratorObjectPrototype.cpp LibJS: Convert GeneratorObject.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
GeneratorObjectPrototype.h LibJS: Convert GeneratorObject.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
GlobalEnvironment.cpp LibJS: Add [[GlobalThisValue]] internal slot to GlobalEnvironment 2021-09-12 11:10:20 +01:00
GlobalEnvironment.h LibJS: Add [[GlobalThisValue]] internal slot to GlobalEnvironment 2021-09-12 11:10:20 +01:00
GlobalObject.cpp LibJS: Move the GlobalEnvironment from GlobalObject to Realm 2021-09-12 11:10:20 +01:00
GlobalObject.h LibJS: Move the GlobalEnvironment from GlobalObject to Realm 2021-09-12 11:10:20 +01:00
IndexedProperties.cpp LibJS: Stop using a native property for Array lengths 2021-07-07 10:14:44 +01:00
IndexedProperties.h LibJS: Stop using a native property for Array lengths 2021-07-07 10:14:44 +01:00
IteratorOperations.cpp Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
IteratorOperations.h LibJS: Add the IteratorStep abstract iterator operation 2021-07-04 00:51:43 +01:00
IteratorPrototype.cpp LibJS: Change PropertyName(Symbol*) => PropertyName(Symbol&) 2021-06-25 22:01:23 +01:00
IteratorPrototype.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
JobCallback.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
JSONObject.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
JSONObject.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Map.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
Map.h LibJS: Use OrderedHashMap instead of HashMap in the Map built-in 2021-06-15 23:51:20 +01:00
MapConstructor.cpp LibJS: Reorder and add missing name & length properties to Built-ins 2021-07-08 01:45:15 +01:00
MapConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
MapIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
MapIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
MapIteratorPrototype.cpp LibJS: Convert MapIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
MapIteratorPrototype.h LibJS: Convert MapIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
MapPrototype.cpp LibJS: Convert Map.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
MapPrototype.h LibJS: Remove leftover typed_this() declarations 2021-09-13 19:07:26 +01:00
MarkedValueList.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MarkedValueList.h AK+Everywhere: Reduce the number of template parameters of IntrusiveList 2021-09-10 18:05:46 +03:00
MathObject.cpp LibJS: Always use AK::get_random() in Math.random() 2021-08-30 18:35:36 +02:00
MathObject.h LibJS: Add Math.imul() 2021-06-05 14:56:58 +01:00
NativeFunction.cpp LibJS: Leave NativeFunction's Realm unset if VM has no Interpreter 2021-09-12 15:18:25 +02:00
NativeFunction.h LibJS: Set the callee context's realm in prepare_for_ordinary_call() 2021-09-12 11:10:20 +01:00
NumberConstructor.cpp LibJS: Fix UB in Number.IsSafeInteger 2021-08-08 10:55:36 +02:00
NumberConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
NumberObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberPrototype.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
NumberPrototype.h LibJS: Add the Number.prototype.toFixed method 2021-06-19 16:13:59 +01:00
Object.cpp LibJS: Avoid transitions for name/length of native functions/accessors 2021-08-28 23:17:01 +01:00
Object.h LibJS: Add define_direct_{property,accessor}_without_transition() 2021-08-28 23:17:01 +01:00
ObjectConstructor.cpp LibJS: Replace the boolean argument of Object::set with an enum class 2021-07-16 17:50:01 +01:00
ObjectConstructor.h LibJS: Implement Object.getOwnPropertyDescriptors() 2021-07-06 18:41:15 +01:00
ObjectEnvironment.cpp LibJS: Make References see into Environment's bindings as well 2021-09-15 11:56:00 +02:00
ObjectEnvironment.h LibJS: Make Environment::put_into_environment() return a success bool 2021-07-02 00:26:31 +02:00
ObjectPrototype.cpp LibJS: Move Object::invoke to Value::invoke and fix it for primitives 2021-08-09 17:33:14 +01:00
ObjectPrototype.h LibJS: Make ObjectPrototype an immutable prototype exotic object 2021-07-05 00:53:57 +01:00
OrdinaryFunctionObject.cpp LibJS: Set OrdinaryFunctionObject's realm from the Tnterpreter 2021-09-12 23:12:51 +01:00
OrdinaryFunctionObject.h LibJS: Set the callee context's realm in prepare_for_ordinary_call() 2021-09-12 11:10:20 +01:00
PrimitiveString.cpp LibJS: Replace Vector<u16> usage in PrimitiveString wth Utf16String 2021-08-10 23:07:50 +02:00
PrimitiveString.h LibJS: Reduce UTF-8 to UTF-16 transcoding when only UTF-16 is wanted 2021-08-10 23:07:50 +02:00
Promise.cpp LibJS: Set the function names for the resolve, reject, and executor 2021-08-23 00:01:46 +01:00
Promise.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
PromiseConstructor.cpp LibJS: Don't use MarkedValueList in PromiseValueList 2021-09-11 22:16:30 +02:00
PromiseConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
PromiseJobs.cpp LibJS: Add ECMA-262 section/title/URL comments almost everywhere 2021-06-13 00:33:28 +01:00
PromiseJobs.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromisePrototype.cpp LibJS: Convert Promise.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
PromisePrototype.h LibJS: Convert Promise.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
PromiseReaction.cpp LibJS: Set the function names for the resolve, reject, and executor 2021-08-23 00:01:46 +01:00
PromiseReaction.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
PromiseResolvingElementFunctions.cpp LibJS: Don't use MarkedValueList in PromiseValueList 2021-09-11 22:16:30 +02:00
PromiseResolvingElementFunctions.h LibJS: Specify right base for PromiseResolvingElementFunction subclasses 2021-09-11 22:26:53 +02:00
PromiseResolvingFunction.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
PromiseResolvingFunction.h LibJS: Stop qualifying AK::Function 2021-06-27 22:40:49 +02:00
PropertyAttributes.h LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
PropertyDescriptor.cpp LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
PropertyDescriptor.h LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
PropertyName.h LibJS: Use move semantics more when creating Reference objects 2021-09-11 20:38:45 +02:00
PrototypeObject.h LibJS: Create a class to provide common methods for object prototypes 2021-09-12 01:40:56 +02:00
ProxyConstructor.cpp LibJS: Reorder and add missing name & length properties to Built-ins 2021-07-08 01:45:15 +01:00
ProxyConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
ProxyObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
ProxyObject.h LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
Realm.cpp LibJS: Allocate a Realm next to GlobalObject in Interpreter::create() 2021-09-12 11:10:20 +01:00
Realm.h LibJS: Allocate a Realm next to GlobalObject in Interpreter::create() 2021-09-12 11:10:20 +01:00
Reference.cpp LibJS: Make References see into Environment's bindings as well 2021-09-15 11:56:00 +02:00
Reference.h LibJS: Implement parsing and execution of optional chains 2021-09-14 20:03:27 +01:00
ReflectObject.cpp LibJS+Spreadsheet: Use js_string(VM&, ...) overload more 2021-08-08 21:32:58 +01:00
ReflectObject.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
RegExpConstructor.cpp LibJS: Implement RegExp constructor according to the spec 2021-07-09 19:45:55 +01:00
RegExpConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
RegExpObject.cpp LibJS: Separate RegExpCreate into RegExpAlloc and RegExpInitialize 2021-08-20 19:16:33 +02:00
RegExpObject.h LibJS: Separate RegExpCreate into RegExpAlloc and RegExpInitialize 2021-08-20 19:16:33 +02:00
RegExpPrototype.cpp LibJS: Convert RegExp.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
RegExpPrototype.h LibJS: Convert RegExp.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
RegExpStringIterator.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
RegExpStringIterator.h LibJS: Reduce copying of string data in RegExp.prototype 2021-08-10 23:07:50 +02:00
RegExpStringIteratorPrototype.cpp LibJS: Convert RegExpStringIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
RegExpStringIteratorPrototype.h LibJS: Convert RegExpStringIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
Set.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
Set.h LibJS: Use OrderedHashTable instead of HashTable in the Set built-in 2021-06-15 23:51:20 +01:00
SetConstructor.cpp LibJS: Reorder and add missing name & length properties to Built-ins 2021-07-08 01:45:15 +01:00
SetConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
SetIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
SetIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
SetIteratorPrototype.cpp LibJS: Convert SetIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
SetIteratorPrototype.h LibJS: Convert SetIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
SetPrototype.cpp LibJS: Convert Set.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
SetPrototype.h LibJS: Remove leftover typed_this() declarations 2021-09-13 19:07:26 +01:00
Shape.cpp LibJS: Revoke any outstanding WeakPtr<Shape> when zombifying shapes 2021-09-11 17:01:45 +02:00
Shape.h LibJS: Revoke any outstanding WeakPtr<Shape> when zombifying shapes 2021-09-11 17:01:45 +02:00
StringConstructor.cpp LibJS: Replace Vector<u16> usage in PrimitiveString wth Utf16String 2021-08-10 23:07:50 +02:00
StringConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
StringIterator.cpp LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
StringIterator.h LibJS: Consistently make prototype the last argument in Object ctors 2021-06-20 12:12:39 +02:00
StringIteratorPrototype.cpp LibJS: Convert StringIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
StringIteratorPrototype.h LibJS: Convert StringIterator.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
StringObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
StringObject.h LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
StringOrSymbol.h LibJS: Make StringOrSymbol always be FlyString in the string case 2021-06-13 19:11:29 +02:00
StringPrototype.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
StringPrototype.h LibJS: Implement non-ECMA-402 String.prototype.toLocale{Lower,Upper}Case 2021-07-27 22:35:24 +01:00
Symbol.cpp LibJS: Store and return undefined Symbol description 2021-06-15 18:31:52 +01:00
Symbol.h LibJS: Store and return undefined Symbol description 2021-06-15 18:31:52 +01:00
SymbolConstructor.cpp LibJS: Reorder and add missing name & length properties to Built-ins 2021-07-08 01:45:15 +01:00
SymbolConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
SymbolObject.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
SymbolObject.h LibJS: Store and return undefined Symbol description 2021-06-15 18:31:52 +01:00
SymbolPrototype.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
SymbolPrototype.h LibJS: Implement String.prototype[@@toPrimitive]() 2021-06-06 19:34:43 +02:00
TemporaryClearException.h LibJS: Use linusg@serenityos.org for my new copyright headers, too 2021-04-24 20:16:31 +02:00
TypedArray.cpp LibJS: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
TypedArray.h LibJS: Make ValidateTypeArray abstraction public 2021-07-14 20:44:42 +01:00
TypedArrayConstructor.cpp LibJS: Replace the boolean argument of Object::set with an enum class 2021-07-16 17:50:01 +01:00
TypedArrayConstructor.h LibJS: Add the TypedArray.from() method 2021-07-05 00:27:03 +01:00
TypedArrayPrototype.cpp LibJS: Move Object::invoke to Value::invoke and fix it for primitives 2021-08-09 17:33:14 +01:00
TypedArrayPrototype.h LibJS: Implement proposed TypedArray.prototype.findLast{,Index} 2021-08-06 16:17:25 +01:00
Utf16String.cpp LibJS: Add a simple reference-counted UTF-16 string 2021-08-10 23:07:50 +02:00
Utf16String.h LibJS: Add a simple reference-counted UTF-16 string 2021-08-10 23:07:50 +02:00
Value.cpp LibJS: Return default-constructed values instead of the INVALID constant 2021-09-15 18:41:33 +01:00
Value.h LibJS: Replace Vector<u16> usage in PrimitiveString wth Utf16String 2021-08-10 23:07:50 +02:00
VM.cpp LibJS: Make References see into Environment's bindings as well 2021-09-15 11:56:00 +02:00
VM.h LibJS: Add a JS::Completion class and JS::ThrowCompletionOr<T> template 2021-09-15 23:46:53 +01:00
WeakContainer.cpp LibJS: Use IntrusiveList for keeping track of WeakContainers 2021-07-21 20:17:55 +02:00
WeakContainer.h LibJS: Tweak the WeakContainer::remove_swept_cells() API a little bit 2021-09-11 12:09:55 +02:00
WeakMap.cpp LibJS: Visit WeakMap's values as long as their keys were not collected 2021-09-11 18:27:56 +02:00
WeakMap.h LibJS: Visit WeakMap's values as long as their keys were not collected 2021-09-11 18:27:56 +02:00
WeakMapConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
WeakMapConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
WeakMapPrototype.cpp LibJS: Convert WeakMap.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
WeakMapPrototype.h LibJS: Remove leftover typed_this() declarations 2021-09-13 19:07:26 +01:00
WeakRef.cpp LibJS+LibWeb+Spreadsheet: Upcall visit_edges() via Base typedef 2021-09-11 14:10:11 +02:00
WeakRef.h LibJS+js+test-js: Add GC debug mode that keeps cells "alive" as zombies 2021-09-11 16:52:03 +02:00
WeakRefConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
WeakRefConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
WeakRefPrototype.cpp LibJS: Convert WeakRef.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
WeakRefPrototype.h LibJS: Convert WeakRef.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
WeakSet.cpp LibJS: Tweak the WeakContainer::remove_swept_cells() API a little bit 2021-09-11 12:09:55 +02:00
WeakSet.h LibJS+js+test-js: Add GC debug mode that keeps cells "alive" as zombies 2021-09-11 16:52:03 +02:00
WeakSetConstructor.cpp LibJS: Add define_direct_property and remove the define_property helper 2021-07-06 14:20:30 +01:00
WeakSetConstructor.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
WeakSetPrototype.cpp LibJS: Convert WeakSet.prototype to be a PrototypeObject 2021-09-12 01:40:56 +02:00
WeakSetPrototype.h LibJS: Remove leftover typed_this() declarations 2021-09-13 19:07:26 +01:00