Skip to content

Commit 0f8e923

Browse files
committed
Sync to latest
1 parent a342b4f commit 0f8e923

File tree

130 files changed

+332
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+332
-97
lines changed

integration_tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,8 @@ RUN(NAME structs_35 LABELS cpython llvm llvm_jit)
761761
# RUN(NAME enum_02 LABELS cpython llvm llvm_jit NOFAST)
762762
RUN(NAME enum_03 LABELS cpython llvm llvm_jit c NOFAST)
763763
# RUN(NAME enum_04 LABELS cpython llvm llvm_jit c NOFAST)
764-
RUN(NAME enum_05 LABELS llvm c
765-
EXTRAFILES enum_05b.c NOFAST)
764+
# RUN(NAME enum_05 LABELS llvm c
765+
# EXTRAFILES enum_05b.c NOFAST)
766766
# RUN(NAME enum_06 LABELS cpython llvm llvm_jit c)
767767
RUN(NAME enum_07 IMPORT_PATH ..
768768
LABELS cpython llvm llvm_jit c NOFAST)

libasr

Submodule libasr updated 1097 files

src/bin/lpython.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ int emit_llvm(const std::string &infile,
791791
// ASR -> LLVM
792792
LCompilers::PythonCompiler fe(compiler_options);
793793
LCompilers::Result<std::unique_ptr<LCompilers::LLVMModule>>
794-
res = fe.get_llvm3(*asr, pass_manager, diagnostics, infile);
794+
res = fe.get_llvm3(*asr, pass_manager, diagnostics, lm, infile);
795795
std::cerr << diagnostics.render(lm, compiler_options);
796796
if (!res.ok) {
797797
LCOMPILERS_ASSERT(diagnostics.has_error())
@@ -1118,7 +1118,7 @@ int compile_python_using_llvm(
11181118
LCompilers::LLVMEvaluator e(compiler_options.target);
11191119
auto asr_to_llvm_start = std::chrono::high_resolution_clock::now();
11201120
LCompilers::Result<std::unique_ptr<LCompilers::LLVMModule>>
1121-
res = fe.get_llvm3(*asr, pass_manager, diagnostics, infile);
1121+
res = fe.get_llvm3(*asr, pass_manager, diagnostics, lm, infile);
11221122
auto asr_to_llvm_end = std::chrono::high_resolution_clock::now();
11231123
times.push_back(std::make_pair("ASR to LLVM", std::chrono::duration<double, std::milli>(asr_to_llvm_end - asr_to_llvm_start).count()));
11241124

src/lpython/python_evaluator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Result<PythonCompiler::EvalResult> PythonCompiler::evaluate(
111111
run_fn = module_name + "global_stmts_" + std::to_string(eval_count) + "__";
112112

113113
Result<std::unique_ptr<LLVMModule>> res3 = get_llvm3(*asr,
114-
pass_manager, diagnostics, lm.files.back().in_filename);
114+
pass_manager, diagnostics, lm, lm.files.back().in_filename);
115115
std::unique_ptr<LCompilers::LLVMModule> m;
116116
if (res3.ok) {
117117
m = std::move(res3.result);
@@ -419,7 +419,7 @@ Result<std::unique_ptr<LLVMModule>> PythonCompiler::get_llvm2(
419419
return asr.error;
420420
}
421421
Result<std::unique_ptr<LLVMModule>> res = get_llvm3(*asr.result, pass_manager,
422-
diagnostics, lm.files.back().in_filename);
422+
diagnostics, lm, lm.files.back().in_filename);
423423
if (res.ok) {
424424
#ifdef HAVE_LFORTRAN_LLVM
425425
std::unique_ptr<LLVMModule> m = std::move(res.result);
@@ -437,10 +437,10 @@ Result<std::unique_ptr<LLVMModule>> PythonCompiler::get_llvm2(
437437
Result<std::unique_ptr<LLVMModule>> PythonCompiler::get_llvm3(
438438
#ifdef HAVE_LFORTRAN_LLVM
439439
ASR::TranslationUnit_t &asr, LCompilers::PassManager& lpm,
440-
diag::Diagnostics &diagnostics, const std::string &infile
440+
diag::Diagnostics &diagnostics, LCompilers::LocationManager &lm, const std::string &infile
441441
#else
442442
ASR::TranslationUnit_t &/*asr*/, LCompilers::PassManager&/*lpm*/,
443-
diag::Diagnostics &/*diagnostics*/,const std::string &/*infile*/
443+
diag::Diagnostics &/*diagnostics*/, LCompilers::LocationManager & /*lm*/, const std::string &/*infile*/
444444
#endif
445445
)
446446
{
@@ -463,7 +463,7 @@ Result<std::unique_ptr<LLVMModule>> PythonCompiler::get_llvm3(
463463
Result<std::unique_ptr<LCompilers::LLVMModule>> res
464464
= asr_to_llvm(asr, diagnostics,
465465
e->get_context(), al, lpm, compiler_options,
466-
run_fn, global_underscore_name, infile);
466+
run_fn, global_underscore_name, infile, lm);
467467
if (res.ok) {
468468
m = std::move(res.result);
469469
} else {

src/lpython/python_evaluator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class PythonCompiler
116116
diag::Diagnostics &diagnostics);
117117

118118
Result<std::unique_ptr<LLVMModule>> get_llvm3(ASR::TranslationUnit_t &asr,
119-
LCompilers::PassManager& lpm, diag::Diagnostics &diagnostics,
119+
LCompilers::PassManager& lpm, diag::Diagnostics &diagnostics, LCompilers::LocationManager& lm,
120120
const std::string &infile);
121121

122122
Result<std::string> get_asm(const std::string &code,

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5324,7 +5324,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
53245324
ASR::symbol_t* call_sym = get_struct_member(parent_sym,call_name,loc);
53255325
super_call_stmt = ASRUtils::STMT(
53265326
ASR::make_SubroutineCall_t(al, loc, call_sym, call_sym, args_w_first.p,
5327-
args_w_first.size(), nullptr));
5327+
args_w_first.size(), nullptr, true));
53285328
}
53295329
} else {
53305330
body.push_back(al, x.m_body[i]);

tests/reference/asr-array_01_decl-39cf894.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-array_01_decl-39cf894.stdout",
9-
"stdout_hash": "f54b7c055fdbd2c0cf1b0a7a9ab3d0a8483a6a89525474f88a4fdd80",
9+
"stdout_hash": "5bc6bef74c19e3ab954672c7b77c461beab78c936732fed4116ab0f3",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_01_decl-39cf894.stdout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
()
9595
[]
9696
()
97+
.false.
9798
)]
9899
()
99100
Public
@@ -1323,6 +1324,7 @@
13231324
2 __main__global_stmts
13241325
[]
13251326
()
1327+
.false.
13261328
)]
13271329
),
13281330
numpy:

tests/reference/asr-array_02_decl-e8f6874.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-array_02_decl-e8f6874.stdout",
9-
"stdout_hash": "4c1ccfa9e114dce8411d0d22a776ae686fe1f0248d0e9505117ed8dc",
9+
"stdout_hash": "af076615a53478a4058f7a52268766f8c1080676887706d5d4f25bb8",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_02_decl-e8f6874.stdout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
()
3737
[]
3838
()
39+
.false.
3940
)]
4041
()
4142
Public
@@ -1077,6 +1078,7 @@
10771078
2 __main__global_stmts
10781079
[]
10791080
()
1081+
.false.
10801082
)]
10811083
),
10821084
numpy:

0 commit comments

Comments
 (0)