Skip to content

Commit 5903e8d

Browse files
committed
Made some minor changes
1 parent a27044c commit 5903e8d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/libasr/pass/replace_symbolic.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
100100
ASR::expr_t* value3 = ASRUtils::EXPR(ASR::make_PointerToCPtr_t(al, xx.base.base.loc, get_pointer_node, type3, nullptr));
101101

102102
// statement 4
103-
ASR::symbol_t* basic_new_stack_sym = current_scope->parent->get_symbol("basic_new_stack");
104-
Vec<ASR::call_arg_t> call_args;
105-
call_args.reserve(al, 1);
106-
ASR::call_arg_t call_arg;
107-
call_arg.loc = xx.base.base.loc;
108-
call_arg.m_value = target2;
109-
call_args.push_back(al, call_arg);
103+
// ASR::symbol_t* basic_new_stack_sym = current_scope->parent->get_symbol("basic_new_stack");
104+
// Vec<ASR::call_arg_t> call_args;
105+
// call_args.reserve(al, 1);
106+
// ASR::call_arg_t call_arg;
107+
// call_arg.loc = xx.base.base.loc;
108+
// call_arg.m_value = target2;
109+
// call_args.push_back(al, call_arg);
110110

111111
// defining the assignment statement
112112
ASR::stmt_t* stmt1 = ASRUtils::STMT(ASR::make_Assignment_t(al, xx.base.base.loc, target1, value1, nullptr));
@@ -132,8 +132,6 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
132132
}
133133

134134
void visit_Variable(const ASR::Variable_t& x) {
135-
SymbolTable* current_scope_copy = current_scope;
136-
current_scope = x.m_parent_symtab;
137135
if (x.m_type->type == ASR::ttypeType::SymbolicExpression) {
138136
symbolic_replaces_with_CPtr_Module = true;
139137
symbolic_replaces_with_CPtr_Function = true;
@@ -165,7 +163,6 @@ class ReplaceSymbolicVisitor : public PassUtils::PassVisitor<ReplaceSymbolicVisi
165163
current_scope->add_symbol(s2c(al, var_name), sym1);
166164
current_scope->add_symbol(s2c(al, placeholder), sym2);
167165
}
168-
current_scope = current_scope_copy;
169166
}
170167
};
171168

0 commit comments

Comments
 (0)