Skip to content

Commit 12de970

Browse files
XX Wrap all the symbols from global scope into a function
1 parent 6694acd commit 12de970

29 files changed

+77
-36
lines changed

src/libasr/asr_scopes.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,26 @@ std::string SymbolTable::get_unique_name(const std::string &name) {
134134
return unique_name;
135135
}
136136

137+
void SymbolTable::move_symbols_from_global_scope(SymbolTable *fn_scope,
138+
std::vector<std::string> &syms) {
139+
for (auto &a : scope) {
140+
switch (a.second->type) {
141+
case (ASR::symbolType::Variable) : {
142+
ASR::Variable_t *v = ASR::down_cast<ASR::Variable_t>(a.second);
143+
v->m_parent_symtab = fn_scope;
144+
fn_scope->add_symbol(a.first, (ASR::symbol_t *)v);
145+
syms.push_back(a.first);
146+
break;
147+
}
148+
case (ASR::symbolType::Function) : {
149+
// Pass
150+
break;
151+
}
152+
default : {
153+
LCompilersException("Not implemented!");
154+
};
155+
}
156+
}
157+
}
158+
137159
} // namespace LCompilers

src/libasr/asr_scopes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ struct SymbolTable {
8080
size_t n_scope_names, char **m_scope_names);
8181

8282
std::string get_unique_name(const std::string &name);
83+
84+
void move_symbols_from_global_scope(SymbolTable *fn_scope,
85+
std::vector<std::string> &syms);
8386
};
8487

8588
} // namespace LCompilers

src/libasr/pass/global_stmts.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,14 @@ void pass_wrap_global_stmts_into_function(Allocator &al,
162162
}
163163
}
164164

165+
void pass_wrap_global_vars_into_function(ASR::TranslationUnit_t &unit) {
166+
std::vector<std::string> symbols;
167+
ASR::symbol_t *fn = unit.m_global_scope->get_symbol("_lpython_main_program");
168+
unit.m_global_scope->move_symbols_from_global_scope(
169+
ASR::down_cast<ASR::Function_t>(fn)->m_symtab, symbols);
170+
for (auto &a: symbols) {
171+
unit.m_global_scope->erase_symbol(a);
172+
}
173+
}
174+
165175
} // namespace LCompilers

src/libasr/pass/global_stmts.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace LCompilers {
88

99
void pass_wrap_global_stmts_into_function(Allocator &al, ASR::TranslationUnit_t &unit,
1010
const LCompilers::PassOptions& pass_options);
11+
void pass_wrap_global_vars_into_function(ASR::TranslationUnit_t &unit);
1112

1213
} // namespace LCompilers
1314

src/libasr/pass/global_stmts_program.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ void pass_wrap_global_stmts_into_program(Allocator &al,
2626
prog_body.reserve(al, 1);
2727
if (unit.n_items > 0) {
2828
pass_wrap_global_stmts_into_function(al, unit, pass_options);
29+
pass_wrap_global_vars_into_function(unit);
2930
ASR::symbol_t *fn = unit.m_global_scope->get_symbol(program_fn_name);
3031
if (ASR::is_a<ASR::Function_t>(*fn)
3132
&& ASR::down_cast<ASR::Function_t>(fn)->m_return_var == nullptr) {

tests/reference/asr-bindc_01-6d521a9.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-bindc_01-6d521a9.stdout",
9-
"stdout_hash": "35f2201203f83b79c5c537d35037267fd0eea6065948d2cc08631f17",
9+
"stdout_hash": "1040f4d6e093e49f3eaf317428bb60e911fa9a50deae0f22684715fa",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Function (SymbolTable 3 {}) _lpython_main_program [] [] [(CPtrToPointer (Var 1 queries) (Var 1 x) ()) (Print () [(Var 1 queries) (Var 1 x)] () ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), main_program: (Program (SymbolTable 2 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), queries: (Variable 1 queries [] Local () () Default (CPtr) Source Public Required .false.), x: (Variable 1 x [] Local () () Default (Pointer (Integer 2 [])) Source Public Required .false.)}) [])
1+
(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Function (SymbolTable 3 {queries: (Variable 3 queries [] Local () () Default (CPtr) Source Public Required .false.), x: (Variable 3 x [] Local () () Default (Pointer (Integer 2 [])) Source Public Required .false.)}) _lpython_main_program [] [] [(CPtrToPointer (Var 3 queries) (Var 3 x) ()) (Print () [(Var 3 queries) (Var 3 x)] () ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), main_program: (Program (SymbolTable 2 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())])}) [])

tests/reference/asr-bindc_02-bc1a7ea.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-bindc_02-bc1a7ea.stdout",
9-
"stdout_hash": "340427cb095972a4cbc1f394d08a22161da70f1c14d2652ff69b0658",
9+
"stdout_hash": "725ebaf473e00bdbf1bf80e13c83ba50f60192f22d54b4b880942e17",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-bindc_02-bc1a7ea.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/asr-expr_07-7742668.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-expr_07-7742668.stdout",
9-
"stdout_hash": "387ae27c01005ee7bffb009fe98deacd5d4bdac8bf0710beff8ed697",
9+
"stdout_hash": "42e89818ed3238a32ee4b3910239dad4b8e5232617d0a6cf3b3dd7bc",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Function (SymbolTable 6 {}) _lpython_main_program [f bool_to_str] [] [(SubroutineCall 1 f () [] ()) (SubroutineCall 1 bool_to_str () [] ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), bool_to_str: (Function (SymbolTable 4 {var: (Variable 4 var [] Local () () Default (Logical 4 []) Source Public Required .false.)}) bool_to_str [] [] [(= (Var 4 var) (LogicalConstant .true. (Logical 4 [])) ()) (Print () [(Cast (LogicalConstant .true. (Logical 4 [])) LogicalToCharacter (Character 1 -2 () []) (StringConstant "True" (Character 1 4 () [])))] () ()) (Assert (StringCompare (Cast (Var 4 var) LogicalToCharacter (Character 1 -2 () []) ()) Eq (StringConstant "True" (Character 1 4 () [])) (Logical 4 []) ()) ()) (= (Var 4 var) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (StringCompare (Cast (Var 4 var) LogicalToCharacter (Character 1 -2 () []) ()) Eq (StringConstant "False" (Character 1 5 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToCharacter (Character 1 -2 () []) (StringConstant "True" (Character 1 4 () []))) Eq (StringConstant "True" (Character 1 4 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), f: (Function (SymbolTable 3 {a: (Variable 3 a [] Local (IntegerConstant 5 (Integer 4 [])) () Default (Integer 4 []) Source Public Required .false.), b: (Variable 3 b [x] Local (IntegerBinOp (Var 3 x) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) () Default (Integer 4 []) Source Public Required .false.), x: (Variable 3 x [] Local (IntegerConstant 3 (Integer 4 [])) () Default (Integer 4 []) Source Public Required .false.)}) f [g] [] [(= (Var 3 a) (IntegerConstant 5 (Integer 4 [])) ()) (= (Var 3 x) (IntegerConstant 3 (Integer 4 [])) ()) (= (Var 3 x) (IntegerConstant 5 (Integer 4 [])) ()) (= (Var 3 b) (IntegerBinOp (Var 3 x) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) ()) (Print () [(Var 3 a) (Var 3 b)] () ()) (Assert (IntegerCompare (Var 3 b) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) ()) ()) (SubroutineCall 1 g () [((IntegerBinOp (IntegerBinOp (Var 3 a) Mul (Var 3 b) (Integer 4 []) ()) Add (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) ()))] ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), g: (Function (SymbolTable 2 {x: (Variable 2 x [] In () () Default (Integer 4 []) Source Public Required .false.)}) g [] [(Var 2 x)] [(Print () [(Var 2 x)] () ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), main_program: (Program (SymbolTable 5 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), x: (Variable 1 x [] Local (IntegerConstant 7 (Integer 4 [])) () Default (Integer 4 []) Source Public Required .false.)}) [])
1+
(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Function (SymbolTable 6 {x: (Variable 6 x [] Local (IntegerConstant 7 (Integer 4 [])) () Default (Integer 4 []) Source Public Required .false.)}) _lpython_main_program [f bool_to_str] [] [(SubroutineCall 1 f () [] ()) (SubroutineCall 1 bool_to_str () [] ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), bool_to_str: (Function (SymbolTable 4 {var: (Variable 4 var [] Local () () Default (Logical 4 []) Source Public Required .false.)}) bool_to_str [] [] [(= (Var 4 var) (LogicalConstant .true. (Logical 4 [])) ()) (Print () [(Cast (LogicalConstant .true. (Logical 4 [])) LogicalToCharacter (Character 1 -2 () []) (StringConstant "True" (Character 1 4 () [])))] () ()) (Assert (StringCompare (Cast (Var 4 var) LogicalToCharacter (Character 1 -2 () []) ()) Eq (StringConstant "True" (Character 1 4 () [])) (Logical 4 []) ()) ()) (= (Var 4 var) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (StringCompare (Cast (Var 4 var) LogicalToCharacter (Character 1 -2 () []) ()) Eq (StringConstant "False" (Character 1 5 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToCharacter (Character 1 -2 () []) (StringConstant "True" (Character 1 4 () []))) Eq (StringConstant "True" (Character 1 4 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), f: (Function (SymbolTable 3 {a: (Variable 3 a [] Local (IntegerConstant 5 (Integer 4 [])) () Default (Integer 4 []) Source Public Required .false.), b: (Variable 3 b [x] Local (IntegerBinOp (Var 3 x) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) () Default (Integer 4 []) Source Public Required .false.), x: (Variable 3 x [] Local (IntegerConstant 3 (Integer 4 [])) () Default (Integer 4 []) Source Public Required .false.)}) f [g] [] [(= (Var 3 a) (IntegerConstant 5 (Integer 4 [])) ()) (= (Var 3 x) (IntegerConstant 3 (Integer 4 [])) ()) (= (Var 3 x) (IntegerConstant 5 (Integer 4 [])) ()) (= (Var 3 b) (IntegerBinOp (Var 3 x) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) ()) (Print () [(Var 3 a) (Var 3 b)] () ()) (Assert (IntegerCompare (Var 3 b) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) ()) ()) (SubroutineCall 1 g () [((IntegerBinOp (IntegerBinOp (Var 3 a) Mul (Var 3 b) (Integer 4 []) ()) Add (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) ()))] ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), g: (Function (SymbolTable 2 {x: (Variable 2 x [] In () () Default (Integer 4 []) Source Public Required .false.)}) g [] [(Var 2 x)] [(Print () [(Var 2 x)] () ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), main_program: (Program (SymbolTable 5 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())])}) [])

tests/reference/asr-generics_01-d616074.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-generics_01-d616074.stdout",
9-
"stdout_hash": "466a5bda0d1f80ebd835944e06cf306d6289e016c7f94ab264b1a540",
9+
"stdout_hash": "b85afe2601d006bea1a58d757bb64e0975bc0490d2759dc171c0f8e9",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(TranslationUnit (SymbolTable 1 {T: (Variable 1 T [] Local () () Default (TypeParameter T []) Source Public Required .false.), __lpython_generic_f_0: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable [] ReturnVar () () Default (Integer 4 []) Source Public Required .false.), x: (Variable 5 x [] In () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 5 y [] In () () Default (Integer 4 []) Source Public Required .false.)}) __lpython_generic_f_0 [] [(Var 5 x) (Var 5 y)] [(= (Var 5 _lpython_return_variable) (IntegerBinOp (Var 5 x) Add (Var 5 y) (Integer 4 []) ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), __lpython_generic_f_1: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable [] ReturnVar () () Default (Character 1 1 () []) Source Public Required .false.), x: (Variable 6 x [] In () () Default (Character 1 1 () []) Source Public Required .false.), y: (Variable 6 y [] In () () Default (Character 1 1 () []) Source Public Required .false.)}) __lpython_generic_f_1 [add_string] [(Var 6 x) (Var 6 y)] [(= (Var 6 _lpython_return_variable) (FunctionCall 1 add_string () [((Var 6 x)) ((Var 6 y))] (Character 1 1 () []) () ()) ()) (Return)] (Var 6 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), _lpython_main_program: (Function (SymbolTable 8 {}) _lpython_main_program [__lpython_generic_f_0 __lpython_generic_f_1 __lpython_generic_f_1] [] [(Print () [(FunctionCall 1 __lpython_generic_f_0 () [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) () ())] () ()) (Print () [(FunctionCall 1 __lpython_generic_f_1 () [((StringConstant "a" (Character 1 1 () []))) ((StringConstant "b" (Character 1 1 () [])))] (Character 1 1 () []) () ())] () ()) (Print () [(FunctionCall 1 __lpython_generic_f_1 () [((StringConstant "c" (Character 1 1 () []))) ((StringConstant "d" (Character 1 1 () [])))] (Character 1 1 () []) () ())] () ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), add: (Function (SymbolTable 2 {_lpython_return_variable: (Variable 2 _lpython_return_variable [] ReturnVar () () Default (TypeParameter T []) Source Public Required .false.), x: (Variable 2 x [] In () () Default (TypeParameter T []) Source Public Required .false.), y: (Variable 2 y [] In () () Default (TypeParameter T []) Source Public Required .false.)}) add [] [(Var 2 x) (Var 2 y)] [] (Var 2 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [(TypeParameter T [])] [] .true.), add_string: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable [] ReturnVar () () Default (Character 1 -2 () []) Source Public Required .false.), x: (Variable 3 x [] In () () Default (Character 1 -2 () []) Source Public Required .false.), y: (Variable 3 y [] In () () Default (Character 1 -2 () []) Source Public Required .false.)}) add_string [] [(Var 3 x) (Var 3 y)] [(= (Var 3 _lpython_return_variable) (StringConcat (Var 3 x) (Var 3 y) (Character 1 -4 () []) ()) ()) (Return)] (Var 3 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), f: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable [] ReturnVar () () Default (TypeParameter T []) Source Public Required .false.), x: (Variable 4 x [] In () () Default (TypeParameter T []) Source Public Required .false.), y: (Variable 4 y [] In () () Default (TypeParameter T []) Source Public Required .false.)}) f [add] [(Var 4 x) (Var 4 y)] [(= (Var 4 _lpython_return_variable) (FunctionCall 1 add () [((Var 4 x)) ((Var 4 y))] (TypeParameter T []) () ()) ()) (Return)] (Var 4 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [(TypeParameter T [])] [1 add] .false.), main_program: (Program (SymbolTable 7 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())])}) [])
1+
(TranslationUnit (SymbolTable 1 {__lpython_generic_f_0: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable [] ReturnVar () () Default (Integer 4 []) Source Public Required .false.), x: (Variable 5 x [] In () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 5 y [] In () () Default (Integer 4 []) Source Public Required .false.)}) __lpython_generic_f_0 [] [(Var 5 x) (Var 5 y)] [(= (Var 5 _lpython_return_variable) (IntegerBinOp (Var 5 x) Add (Var 5 y) (Integer 4 []) ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), __lpython_generic_f_1: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable [] ReturnVar () () Default (Character 1 1 () []) Source Public Required .false.), x: (Variable 6 x [] In () () Default (Character 1 1 () []) Source Public Required .false.), y: (Variable 6 y [] In () () Default (Character 1 1 () []) Source Public Required .false.)}) __lpython_generic_f_1 [add_string] [(Var 6 x) (Var 6 y)] [(= (Var 6 _lpython_return_variable) (FunctionCall 1 add_string () [((Var 6 x)) ((Var 6 y))] (Character 1 1 () []) () ()) ()) (Return)] (Var 6 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), _lpython_main_program: (Function (SymbolTable 8 {T: (Variable 8 T [] Local () () Default (TypeParameter T []) Source Public Required .false.)}) _lpython_main_program [__lpython_generic_f_0 __lpython_generic_f_1 __lpython_generic_f_1] [] [(Print () [(FunctionCall 1 __lpython_generic_f_0 () [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) () ())] () ()) (Print () [(FunctionCall 1 __lpython_generic_f_1 () [((StringConstant "a" (Character 1 1 () []))) ((StringConstant "b" (Character 1 1 () [])))] (Character 1 1 () []) () ())] () ()) (Print () [(FunctionCall 1 __lpython_generic_f_1 () [((StringConstant "c" (Character 1 1 () []))) ((StringConstant "d" (Character 1 1 () [])))] (Character 1 1 () []) () ())] () ())] () Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), add: (Function (SymbolTable 2 {_lpython_return_variable: (Variable 2 _lpython_return_variable [] ReturnVar () () Default (TypeParameter T []) Source Public Required .false.), x: (Variable 2 x [] In () () Default (TypeParameter T []) Source Public Required .false.), y: (Variable 2 y [] In () () Default (TypeParameter T []) Source Public Required .false.)}) add [] [(Var 2 x) (Var 2 y)] [] (Var 2 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [(TypeParameter T [])] [] .true.), add_string: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable [] ReturnVar () () Default (Character 1 -2 () []) Source Public Required .false.), x: (Variable 3 x [] In () () Default (Character 1 -2 () []) Source Public Required .false.), y: (Variable 3 y [] In () () Default (Character 1 -2 () []) Source Public Required .false.)}) add_string [] [(Var 3 x) (Var 3 y)] [(= (Var 3 _lpython_return_variable) (StringConcat (Var 3 x) (Var 3 y) (Character 1 -4 () []) ()) ()) (Return)] (Var 3 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [] [] .false.), f: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable [] ReturnVar () () Default (TypeParameter T []) Source Public Required .false.), x: (Variable 4 x [] In () () Default (TypeParameter T []) Source Public Required .false.), y: (Variable 4 y [] In () () Default (TypeParameter T []) Source Public Required .false.)}) f [add] [(Var 4 x) (Var 4 y)] [(= (Var 4 _lpython_return_variable) (FunctionCall 1 add () [((Var 4 x)) ((Var 4 y))] (TypeParameter T []) () ()) ()) (Return)] (Var 4 _lpython_return_variable) Source Public Implementation () .false. .false. .false. .false. .false. [(TypeParameter T [])] [1 add] .false.), main_program: (Program (SymbolTable 7 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())])}) [])

tests/reference/asr-generics_02-e2ea5c9.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-generics_02-e2ea5c9.stdout",
9-
"stdout_hash": "b2330ca2b425fe409fa533236870dd171c10d226b9afa99dac633c50",
9+
"stdout_hash": "acd4c02d715224e206548e3652fbef1364d674eacd1453f0104d00bb",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

0 commit comments

Comments
 (0)