summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS
AgeCommit message (Collapse)Author
2021-10-20LibJS: Add missing header in EnvironmentCoordinate.hBen Wiederhake
2021-10-18LibJS: Convert Value operator AOs to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert is_loosely_equal() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert is_less_than() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert Value::get() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert PrototypeObject::typed_this_value() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert PrototypeObject::typed_this_object() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert PrototypeObject::this_object() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert this_symbol_value() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert this_string_value() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert this_number_value() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert this_bigint_value() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Convert to_integer_or_infinity() to ThrowCompletionOrLinus Groh
2021-10-18LibJS: Remove a bunch of forgotten exception checks after TRY_OR_DISCARDLinus Groh
Not quite sure how that happened :^)
2021-10-18LibJS: Convert to_index() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_length() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_u8_clamp() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_u8() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_i8() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_u16() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_i16() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_u32() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_i32() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_number() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_property_key() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_double() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_bigint_uint64() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_bigint_int64() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_bigint() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_numeric() to ThrowCompletionOrIdan Horowitz
2021-10-15LibJS: Add comment clarifying the order of function propertiesdavidot
2021-10-15LibJS: Fix that proxy always said that it had a [[Construct]] slotdavidot
2021-10-15LibJS: Define length and name in function in correct orderdavidot
2021-10-15LibJS: Do not save state for peeking at the next token from the lexerdavidot
This saves having to save and load the parser state. This could give an incorrect token in some cases where the parser communicates to the lexer. However this is not applicable in any of the current usages and this would require one to parse the current token as normal which is exactly what you don't want to do in that scenario.
2021-10-15LibJS: Remove ErrorType::FixmeAddAnErrorStringWithMessagedavidot
2021-10-15LibJS: Fix null deref in ObjectProperty::dump()davidot
2021-10-15LibJS: Enable now working tests for duplicated variable declarationsdavidot
2021-10-15LibJS: Implement ShadowRealm.prototype.importValue()Linus Groh
Well... sort of. This adds the function itself and all the scaffolding from the ShadowRealm API (and basically completes its implementation). However, we do not nearly have enough support for modules and imports, so we currently pretend whatever was attempted to be imported failed - once we have HostImportModuleDynamically it should be relatively easy to complete the implementation.
2021-10-15LibJS: Don't return empty value from PromiseReactionJob::call(), for nowLinus Groh
2021-10-15LibJS/Tests: Test ShadowRealm.prototype.evaluate() this value type checkLinus Groh
2021-10-15LibJS: Fix typo in LHS Object and RHS BigInt loosely equals checkLuke Wilde
Step 12 was using `lhs.is_bigint()` instead of `rhs.is_bigint()`, meaning you got: ```js 1n == Object(1n); // true Object(1n) == 1n; // false ``` This also adds spec comments to is_loosely_equal.
2021-10-14LibJS: Use GlobalObject::associated_realm() for function object realmsLinus Groh
As outlined in the previous commit, this should be more reliable than Interpreter::realm(), as we don't always have access to an Interpreter.
2021-10-14LibJS: Add a way to get from a GlobalObject to its associated RealmLinus Groh
This is just another workaround, but it should be much more reliable than Interpreter::realm(), especially when allocating NativeFunctions and ECMAScriptFunctionObjects: we're guaranteed to have a GlobalObject at that point, and it likely was set as the GlobalObject of a Realm and can lead us back to it. We're however not guaranteed that the VM can give us an Interpreter, which is why functions in LibWeb can be a bit crashy at the moment. We use a WeakPtr<Realm> to properly handle the unlikely case where the Realm goes away after associating a GlobalObject to it. We'll always need _something_ of this sort if we want to support OrdinaryFunctionCreate and CreateBuiltinFunction without the explicit realm argument while no JS is running, because they want to use the current Realm Record (always in the first and as fallback in the second case).
2021-10-14LibJS: Change normal_completion() parameter to Optional<Value>Linus Groh
The Completion constructor `VERIFY()`s that the passed argument is not an empty Value, so normal_completion({}) would crash (although it's currently not being used anywhere). We want to pass an empty Optional<Value> instead.
2021-10-14LibJS: Implement ShadowRealm.prototype.evaluate()Linus Groh
2021-10-14LibJS: Implement ShadowRealm.prototype[@@toStringTag]Linus Groh
2021-10-14LibJS: Start implementing ShadowRealmLinus Groh
This commit adds the ShadowRealm object itself, its constructor, and prototype (currently empty).
2021-10-14LibJS: Implement Wrapped Function Exotic ObjectsLinus Groh
This is a new concept from the ShadowRealm API stage 3 proposal: https://tc39.es/proposal-shadowrealm/#sec-wrapped-function-exotic-objects
2021-10-13LibJS: Convert to_object() to ThrowCompletionOrLinus Groh
2021-10-13LibJS: Convert to_primitive() to ThrowCompletionOrLinus Groh