Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync libasr from LPython #3713

Merged
merged 3 commits into from
Mar 26, 2024
Merged

Sync libasr from LPython #3713

merged 3 commits into from
Mar 26, 2024

Conversation

czgdp1807
Copy link
Member

No description provided.

Comment on lines +550 to +565
static inline ASR::asr_t* create_ObjectType(Allocator& al, const Location& loc,
Vec<ASR::expr_t*>& args, diag::Diagnostics& diag) {
if (args.size() != 1) {
append_error(diag, "type() takes exactly 1 argument `object` for now", loc);
}
ASR::expr_t *m_value = nullptr;
Vec<ASR::expr_t *> arg_values;


m_value = eval_ObjectType(al, loc, expr_type(args[0]), arg_values, diag);


return ASR::make_IntrinsicElementalFunction_t(al, loc,
static_cast<int64_t>(IntrinsicElementalFunctions::ObjectType),
args.p, args.n, 0, ASRUtils::expr_type(m_value), m_value);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: this can be shifted to python script. Can be done after sync, this is fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opened issue #3714

Comment on lines -84 to 94
(ArrayConstant
(ArrayConstructor
[]
(Array
(Integer 4)
[((IntegerConstant 1 (Integer 4))
(IntegerConstant 0 (Integer 4)))]
FixedSizeArray
)
()
ColMajor
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this an ArrayConstructor? It should be ArrayConstant

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix it after the sync. I am not worried too much about it. The sync is already very heavy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened at #3715

@@ -168,14 +168,15 @@
)]
[(Assignment
(Var 3 strings)
(ArrayConstant
(ArrayConstructor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment here

__libasr__created__var__0__array_constant_:
__libasr__created__var__0__array_constructor_:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be __libasr__created__var__0__array_constant_

Copy link
Contributor

@Pranavchiku Pranavchiku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments above, I suspect something is off for ArrayConstant / ArrayConstructor handling in this PR, rest all is good.

@czgdp1807 czgdp1807 marked this pull request as ready for review March 26, 2024 21:36
@czgdp1807 czgdp1807 merged commit 3b64555 into lfortran:main Mar 26, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants