summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-08-27 00:54:55 +0100
committerLinus Groh <mail@linusgroh.de>2022-08-27 11:29:10 +0100
commit50428ea8d21045bbc3c5584a16496cff4a38fdc5 (patch)
treef56dee290ed47d0d796d51cdcb41e02c22ae40a6 /Userland/Libraries/LibWeb/WebAssembly
parent84c4b66721c893775938e40808486e1ce506732e (diff)
downloadserenity-50428ea8d21045bbc3c5584a16496cff4a38fdc5.zip
LibJS: Move intrinsics to the realm
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 :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly')
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModulePrototype.h2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h2
9 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp
index ca6a07d917..bcb42d8a04 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceConstructor.cpp
@@ -15,7 +15,7 @@
namespace Web::Bindings {
WebAssemblyInstanceConstructor::WebAssemblyInstanceConstructor(JS::Realm& realm)
- : NativeFunction(*realm.global_object().function_prototype())
+ : NativeFunction(*realm.intrinsics().function_prototype())
{
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h
index 8f409538a3..36ba30e1d1 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyInstanceObjectPrototype.h
@@ -18,7 +18,7 @@ class WebAssemblyInstancePrototype final : public JS::Object {
public:
explicit WebAssemblyInstancePrototype(JS::Realm& realm)
- : JS::Object(*realm.global_object().object_prototype())
+ : JS::Object(*realm.intrinsics().object_prototype())
{
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
index ea23f37cbe..35f38465ea 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
@@ -13,7 +13,7 @@
namespace Web::Bindings {
WebAssemblyMemoryConstructor::WebAssemblyMemoryConstructor(JS::Realm& realm)
- : NativeFunction(*realm.global_object().function_prototype())
+ : NativeFunction(*realm.intrinsics().function_prototype())
{
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h
index ac68af75fd..c9b8aa03e3 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.h
@@ -20,7 +20,7 @@ class WebAssemblyMemoryPrototype final : public JS::Object {
public:
explicit WebAssemblyMemoryPrototype(JS::Realm& realm)
- : JS::Object(*realm.global_object().object_prototype())
+ : JS::Object(*realm.intrinsics().object_prototype())
{
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleConstructor.cpp
index 06969b48a6..71a24e7694 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModuleConstructor.cpp
@@ -15,7 +15,7 @@
namespace Web::Bindings {
WebAssemblyModuleConstructor::WebAssemblyModuleConstructor(JS::Realm& realm)
- : NativeFunction(*realm.global_object().function_prototype())
+ : NativeFunction(*realm.intrinsics().function_prototype())
{
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModulePrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModulePrototype.h
index b2177e2e98..33890534c7 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModulePrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyModulePrototype.h
@@ -20,7 +20,7 @@ class WebAssemblyModulePrototype final : public JS::Object {
public:
explicit WebAssemblyModulePrototype(JS::Realm& realm)
- : JS::Object(*realm.global_object().object_prototype())
+ : JS::Object(*realm.intrinsics().object_prototype())
{
}
};
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
index a5d2ad63b8..5be142435f 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
@@ -26,7 +26,7 @@
namespace Web::Bindings {
WebAssemblyObject::WebAssemblyObject(JS::Realm& realm)
- : Object(*realm.global_object().object_prototype())
+ : Object(*realm.intrinsics().object_prototype())
{
s_abstract_machine.enable_instruction_count_limit();
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp
index a9a7bef0fe..0698f06be5 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTableConstructor.cpp
@@ -15,7 +15,7 @@
namespace Web::Bindings {
WebAssemblyTableConstructor::WebAssemblyTableConstructor(JS::Realm& realm)
- : NativeFunction(*realm.global_object().function_prototype())
+ : NativeFunction(*realm.intrinsics().function_prototype())
{
}
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h
index c3d576f0a9..d5616de191 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyTablePrototype.h
@@ -20,7 +20,7 @@ class WebAssemblyTablePrototype final : public JS::Object {
public:
explicit WebAssemblyTablePrototype(JS::Realm& realm)
- : JS::Object(*realm.global_object().object_prototype())
+ : JS::Object(*realm.intrinsics().object_prototype())
{
}