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

AbstractInterpreter: refactor abstract_call_method -> abstract_call_method_with_const_args chain #41020

Merged
merged 1 commit into from
May 31, 2021

Conversation

aviatesk
Copy link
Member

This PR refactors the abstract_call_method -> abstract_call_method_with_const_args
chain, and simplifies the signature of abstract_call_method_with_const_args:
the newly defined MethodCallResult struct wraps a result and context
information of abstract_method_call, and is passed and consumed
by the succeeding abstract_call_method_with_const_args.

Although our constant-propagation heuristic will be likely to change in
the future (as in #40561) and so the signature of abstract_call_method_with_const_args
is very unstable, hopefully this PR makes it a bit more stable.
As an additional benefit, now an external AbstractInterpreter can use
the context information of abstract_method_call (especially edge::MethodInstance)
within maybe_get_const_prop_profitable.

…_call_method_with_const_args` chain

This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args`
chain, and simplifies the signature of `abstract_call_method_with_const_args`:
the newly defined `MethodCallResult` struct wraps a result and context
information of `abstract_method_call`, and is passed and consumed
by the succeeding `abstract_call_method_with_const_args`.

Although our constant-propagation heuristic will be likely to change in
the future (as in #40561) and so the signature of `abstract_call_method_with_const_args`
is very unstable, hopefully this PR makes it a bit more stable.
As an additional benefit, now an external `AbstractInterpreter` can use
the context information of `abstract_method_call` (especially `edge::MethodInstance`)
within `maybe_get_const_prop_profitable`.
@aviatesk aviatesk requested review from vtjnash and Keno May 31, 2021 04:45
aviatesk added a commit to aviatesk/JET.jl that referenced this pull request May 31, 2021
@aviatesk aviatesk changed the title AbstractInterpreter: refactor for abstract_call_method -> abstract_call_method_with_const_args chain AbstractInterpreter: refactor abstract_call_method -> abstract_call_method_with_const_args chain May 31, 2021
@vtjnash vtjnash merged commit 046f11e into master May 31, 2021
@vtjnash vtjnash deleted the avi/refactorconst branch May 31, 2021 21:28
aviatesk added a commit to aviatesk/JET.jl that referenced this pull request Jun 1, 2021
Will be followed up by #207
shirodkara pushed a commit to shirodkara/julia that referenced this pull request Jun 9, 2021
…_call_method_with_const_args` chain (JuliaLang#41020)

This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args`
chain, and simplifies the signature of `abstract_call_method_with_const_args`:
the newly defined `MethodCallResult` struct wraps a result and context
information of `abstract_method_call`, and is passed and consumed
by the succeeding `abstract_call_method_with_const_args`.

Although our constant-propagation heuristic will be likely to change in
the future (as in JuliaLang#40561) and so the signature of `abstract_call_method_with_const_args`
is very unstable, hopefully this PR makes it a bit more stable.
As an additional benefit, now an external `AbstractInterpreter` can use
the context information of `abstract_method_call` (especially `edge::MethodInstance`)
within `maybe_get_const_prop_profitable`.
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
…_call_method_with_const_args` chain (JuliaLang#41020)

This PR refactors the `abstract_call_method` -> `abstract_call_method_with_const_args`
chain, and simplifies the signature of `abstract_call_method_with_const_args`:
the newly defined `MethodCallResult` struct wraps a result and context
information of `abstract_method_call`, and is passed and consumed
by the succeeding `abstract_call_method_with_const_args`.

Although our constant-propagation heuristic will be likely to change in
the future (as in JuliaLang#40561) and so the signature of `abstract_call_method_with_const_args`
is very unstable, hopefully this PR makes it a bit more stable.
As an additional benefit, now an external `AbstractInterpreter` can use
the context information of `abstract_method_call` (especially `edge::MethodInstance`)
within `maybe_get_const_prop_profitable`.
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