Skip to content

Fix symbolic pass for handling IntrinsicElementalFunction in print() - #2665

Merged
ubaidsk merged 8 commits into
lcompilers:mainfrom
kmr-srbh:fix-symblic-pass-for-printing-intrinsic-elemental-function
Apr 27, 2024
Merged

Fix symbolic pass for handling IntrinsicElementalFunction in print()#2665
ubaidsk merged 8 commits into
lcompilers:mainfrom
kmr-srbh:fix-symblic-pass-for-printing-intrinsic-elemental-function

Conversation

@kmr-srbh

@kmr-srbhkmr-srbh commented Apr 25, 2024

Copy link
Copy Markdown
Contributor

fixes#2457

fromlpythonimporti32deff():
a :list[i32]= [1, 2, 3, 4,]
print(a.pop(),a)
f()
(lp) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py4 [1, 2, 3]

@kmr-srbh

Copy link
Copy Markdown
ContributorAuthor

@Shaikh-Ubaid could you please suggest some more testcases?

Comment threadsrc/libasr/pass/replace_symbolic.cpp Outdated
@ubaidsk

Copy link
Copy Markdown
Collaborator
fromlpythonimporti32deff():
a :list[i32]= [1, 2, 3, 4,]
print(a.pop(),a)
f()

Can you add this exact test case?

@ubaidsk
ubaidsk marked this pull request as draft April 25, 2024 20:05
Comment threadsrc/libasr/pass/replace_symbolic.cpp Outdated
Comment threadintegration_tests/test_intrinsic_function_mixed_print.py
@ubaidsk

Copy link
Copy Markdown
Collaborator

Please mark as "Ready for review" when ready.

@kmr-srbh
kmr-srbh marked this pull request as ready for review April 26, 2024 14:01
@kmr-srbh

Copy link
Copy Markdown
ContributorAuthor

@Shaikh-Ubaid could you please look into the reason for the failing checks? They seem unrelated to the PR.

@kmr-srbh
kmr-srbhforce-pushed the fix-symblic-pass-for-printing-intrinsic-elemental-function branch from 658e561 to e38ee36CompareApril 27, 2024 05:07
@ubaidsk
ubaidsk marked this pull request as draft April 27, 2024 07:01
@kmr-srbh
kmr-srbh marked this pull request as ready for review April 27, 2024 08:30

@ubaidskubaidsk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perfect! Thanks. It looks great!

@ubaidsk
ubaidskforce-pushed the fix-symblic-pass-for-printing-intrinsic-elemental-function branch from d322154 to 1e15742CompareApril 27, 2024 09:00
@ubaidsk
ubaidsk enabled auto-merge (squash) April 27, 2024 09:00
@ubaidsk
ubaidsk merged commit 206035e into lcompilers:mainApr 27, 2024
assem2002 pushed a commit to assem2002/lpython that referenced this pull request Apr 28, 2024
…()` (lcompilers#2665)
* Fix symbolic pass for handling `IntrinsicElementalFunction` in `print()`
* Tests: Add tests and update references
* Fix mistakenly commented out lines
* Tests: Add testcase and update references
* Tests: Update references
* Style changes
* Remove C backend
* Tests: Add asserts and update test reference
assem2002 pushed a commit to assem2002/lpython that referenced this pull request Apr 28, 2024
…()` (lcompilers#2665)
* Fix symbolic pass for handling `IntrinsicElementalFunction` in `print()`
* Tests: Add tests and update references
* Fix mistakenly commented out lines
* Tests: Add testcase and update references
* Tests: Update references
* Style changes
* Remove C backend
* Tests: Add asserts and update test reference
@kmr-srbh
kmr-srbh deleted the fix-symblic-pass-for-printing-intrinsic-elemental-function branch May 2, 2024 13:59
Sign up for freeto 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.

print() messes up with integer returned by list.pop()

2 participants

@kmr-srbh@ubaidsk