summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Environment.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-01 12:24:46 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-01 12:28:57 +0200
commit44221756ab7515617450400bf23d0e8df486c2b7 (patch)
tree0cca2e683a1d1efd822bdfa7e90995e2aa81d8d9 /Userland/Libraries/LibJS/Runtime/Environment.cpp
parent56d25d721001f72bced2aa723d08a19eac9431fb (diff)
downloadserenity-44221756ab7515617450400bf23d0e8df486c2b7.zip
LibJS: Drop "Record" suffix from all the *Environment record classes
"Records" in the spec are basically C++ classes, so let's drop this mouthful of a suffix.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Environment.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Environment.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Environment.cpp b/Userland/Libraries/LibJS/Runtime/Environment.cpp
new file mode 100644
index 0000000000..37722c06a3
--- /dev/null
+++ b/Userland/Libraries/LibJS/Runtime/Environment.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <LibJS/Runtime/Environment.h>
+#include <LibJS/Runtime/VM.h>
+
+namespace JS {
+
+Environment::Environment(Environment* outer_environment)
+ : m_outer_environment(outer_environment)
+{
+}
+
+void Environment::initialize(GlobalObject& global_object)
+{
+ m_global_object = &global_object;
+ Cell::initialize(global_object);
+}
+
+void Environment::visit_edges(Visitor& visitor)
+{
+ Cell::visit_edges(visitor);
+ visitor.visit(m_outer_environment);
+}
+
+}