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

Add pure as a function property #3224

Closed
fuzyll opened this issue Jun 28, 2022 · 2 comments
Closed

Add pure as a function property #3224

fuzyll opened this issue Jun 28, 2022 · 2 comments
Labels
Component: Core Issue needs changes to the core Effort: Low Issue should take < 1 week Impact: Medium Issue is impactful with a bad, or no, workaround State: Duplicate Issue is a duplicate of another issue Type: Enhancement Issue is a small enhancement to existing functionality

Comments

@fuzyll
Copy link
Contributor

fuzyll commented Jun 28, 2022

What is the feature you'd like to have?
I want to be able to use Edit Function Properties to mark a function as pure. The purpose here would be to allow the call to be optimized out entirely if the return value isn't used.

Is your feature request related to a problem?
This could really clean up analysis of things like malware using API hammering. This might also be useful in cases like #2923 (and may even effectively be a duplicate, not entirely sure).

Additional Information:
We should probably never set this attribute automatically, except possibly in the case where the user has supplied a header that has the function marked as such.

@fuzyll fuzyll added the Type: Enhancement Issue is a small enhancement to existing functionality label Jun 28, 2022
@psifertex
Copy link
Member

psifertex commented Jun 28, 2022

Note that pure probably isn't the right word after more discussion. The actual attribute is something like "side-effect-free" but we want a more concise name and nobody liked pureish. 😉

@plafosse plafosse added Effort: Low Issue should take < 1 week Impact: Medium Issue is impactful with a bad, or no, workaround labels Jul 18, 2022
@xusheng6 xusheng6 added the Component: Core Issue needs changes to the core label Jun 27, 2023
@CouleeApps
Copy link
Member

Duplicate of #1712

@CouleeApps CouleeApps marked this as a duplicate of #1712 Jul 6, 2023
@plafosse plafosse added this to the Coruscant milestone Aug 30, 2023
@psifertex psifertex added the State: Duplicate Issue is a duplicate of another issue label Sep 1, 2023
@psifertex psifertex removed this from the Coruscant milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Issue needs changes to the core Effort: Low Issue should take < 1 week Impact: Medium Issue is impactful with a bad, or no, workaround State: Duplicate Issue is a duplicate of another issue Type: Enhancement Issue is a small enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants