diff --git a/code/compiler/13/compiler.cpp b/code/compiler/13/compiler.cpp index b1c978b..7250ab5 100644 --- a/code/compiler/13/compiler.cpp +++ b/code/compiler/13/compiler.cpp @@ -54,7 +54,7 @@ void compiler::translate() { } for(auto& defn : global_defs.defs_defn) { auto& function = defn.second->into_global(global_scp); - function.body->env->get_parent()->set_mangled_name(defn.first, function.name); + global_env->set_mangled_name(defn.first, function.name); } } diff --git a/code/compiler/13/type_env.cpp b/code/compiler/13/type_env.cpp index a00058d..6f4fe6a 100644 --- a/code/compiler/13/type_env.cpp +++ b/code/compiler/13/type_env.cpp @@ -2,10 +2,6 @@ #include "type.hpp" #include "error.hpp" -type_env_ptr type_env::get_parent() { - return parent; -} - void type_env::find_free(const type_mgr& mgr, std::set& into) const { if(parent != nullptr) parent->find_free(mgr, into); for(auto& binding : names) { diff --git a/code/compiler/13/type_env.hpp b/code/compiler/13/type_env.hpp index 334ef73..f5d98ed 100644 --- a/code/compiler/13/type_env.hpp +++ b/code/compiler/13/type_env.hpp @@ -31,7 +31,6 @@ class type_env { type_env(type_env_ptr p) : parent(std::move(p)) {} type_env() : type_env(nullptr) {} - type_env_ptr get_parent(); void find_free(const type_mgr& mgr, std::set& into) const; void find_free_except(const type_mgr& mgr, const group& avoid, std::set& into) const;