Make some refactors for name mangling and encapsulation.
This commit is contained in:
@@ -57,9 +57,8 @@ void ast_lid::translate(global_scope& scope) {
|
||||
void ast_lid::compile(const env_ptr& env, std::vector<instruction_ptr>& into) const {
|
||||
into.push_back(instruction_ptr(
|
||||
(this->env->is_global(id)) ?
|
||||
(instruction*) new instruction_pushglobal(id) :
|
||||
(instruction*) new instruction_push(
|
||||
env->get_offset(this->env->get_mangled_name(id)))));
|
||||
(instruction*) new instruction_pushglobal(this->env->get_mangled_name(id)) :
|
||||
(instruction*) new instruction_push(env->get_offset(id))));
|
||||
}
|
||||
|
||||
void ast_uid::print(int indent, std::ostream& to) const {
|
||||
|
||||
Reference in New Issue
Block a user