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

Implement abs intrinsic function #61

Merged
merged 4 commits into from
Jan 23, 2022
Merged

Implement abs intrinsic function #61

merged 4 commits into from
Jan 23, 2022

Conversation

namannimmo10
Copy link
Collaborator

No description provided.

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

This is fine for now. Just remember this is only the compile time optimization. We will keep this even after we implement an actual abs function in the runtime library, and the compile time value will be provided in the value member.

Also, the current implementation is replacing abs with the compile time value. Ok for now, but the correct solution is to represent it using the abs runtime function, and then provide compile time evaluation (if available) in the value member of the FunctionCall node.

@certik certik merged commit 2f461bf into main Jan 23, 2022
@certik certik deleted the abs branch January 23, 2022 20:01
@certik
Copy link
Contributor

certik commented Jan 23, 2022

Also, would you please mind sending it from a branch in your fork, not in the lcompilers/lpython repository? That way we only have the main branch in the main repository.

@namannimmo10
Copy link
Collaborator Author

Sure, I will make sure that will not happen again.

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.

2 participants