summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/SyntheticModule.cpp
AgeCommit message (Collapse)Author
2022-12-14LibJS: Convert Promise::create() to NonnullGCPtrLinus Groh
2022-12-07LibJS: Replace standalone js_string() with PrimitiveString::create()Linus Groh
Note that js_rope_string() has been folded into this, the old name was misleading - it would not always create a rope string, only if both sides are not empty strings. Use a three-argument create() overload instead.
2022-09-06LibJS: Make Script and Module GC-allocatedAndreas Kling
This ensures that code currently in any active or saved execution stack always stays alive.
2022-08-27LibJS: Move intrinsics to the realmLinus Groh
Intrinsics, i.e. mostly constructor and prototype objects, but also things like empty and new object shape now live on a new heap-allocated JS::Intrinsics object, thus completing the long journey of taking all the magic away from the global object. This represents the Realm's [[Intrinsics]] slot in the spec and matches its existing [[GlobalObject]] / [[GlobalEnv]] slots in terms of architecture. In the majority of cases it should now be possibly to fully allocate a regular object without the global object existing, and in fact that's what we do now - the realm is allocated before the global object, and the intrinsics between both :^)
2022-08-23LibJS: Replace GlobalObject with VM in remaining AOs [Part 19/19]Linus Groh
2022-08-23LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]Linus Groh
2022-08-23LibJS: Replace GlobalObject with VM in Environment AOs [Part 5/19]Linus Groh
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in Heap::allocate<T>()Linus Groh
This is a continuation of the previous three commits. Now that create() receives the allocating realm, we can simply forward that to allocate(), which accounts for the majority of these changes. Additionally, we can get rid of the realm_from_global_object() in one place, with one more remaining in VM::throw_completion().
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-05-25LibJS: Mark concrete method calls of Environment Records with ?/!Linus Groh
This is an editorial change in the ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/7ae3ecf
2022-05-03LibJS: Remove implicit wrapping/unwrapping of completion recordsLinus Groh
This is an editorial change in the ECMA-262 spec, with similar changes in some proposals. See: - https://github.com/tc39/ecma262/commit/7575f74 - https://github.com/tc39/proposal-array-grouping/commit/df899eb - https://github.com/tc39/proposal-shadowrealm/commit/9eb5a12 - https://github.com/tc39/proposal-shadowrealm/commit/c81f527
2022-04-11LibJS: Fix two bogus spec linksLinus Groh
2022-04-03LibJS: Remove a bunch of gratuitous JS namespace qualifiersLinus Groh
2022-03-18LibJS: Use TRY(push_execution_context()) in places where we can recoverLinus Groh
2022-02-07LibJS: Reduce header dependency graph in Realm.hAndreas Kling
2022-02-07LibJS: Make ScriptOrModule use WeakPtr instead of raw pointersAndreas Kling
2022-01-31LibJS: Remove unnecessary GlobalObject pointer from EnvironmentAndreas Kling
As it turns out, we didn't actually need this pointer. :^)
2022-01-30LibJS: Add support for JSON modulesdavidot
We now have one supported assertion: 'type' if that is 'json' we attempt to parse the module as JSON.