diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-01 12:24:46 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-01 12:28:57 +0200 |
commit | 44221756ab7515617450400bf23d0e8df486c2b7 (patch) | |
tree | 0cca2e683a1d1efd822bdfa7e90995e2aa81d8d9 /Userland/Libraries/LibJS/Runtime/Environment.cpp | |
parent | 56d25d721001f72bced2aa723d08a19eac9431fb (diff) | |
download | serenity-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.cpp | 29 |
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); +} + +} |