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

Don't look up invoke args twice #442

Merged
merged 1 commit into from
Nov 21, 2020
Merged

Don't look up invoke args twice #442

merged 1 commit into from
Nov 21, 2020

Conversation

timholy
Copy link
Member

@timholy timholy commented Nov 21, 2020

evaluate_call_recurse! calls maybe_evaluate_builtin, and if
that doesn't return a Some{Any}, it uses the output as the
new call_expr. The next thing it does is look up the args.
Consequently, to avoid double-lookup, our expansion of invoke should
return the non-looked-up arguments.

Fixes #441
Closes #440

`evaluate_call_recurse!` calls `maybe_evaluate_builtin`, and if
that doesn't return a `Some{Any}`, it uses the output as the
new `call_expr`. The next thing it does is look up the args.
Consequently, to avoid double-lookup, our expansion of `invoke` should
return the non-looked-up arguments.

Fixes #441
Closes #440
@timholy timholy merged commit 15a0c6f into master Nov 21, 2020
@timholy timholy deleted the teh/invoke_once branch November 21, 2020 21:14
timholy added a commit that referenced this pull request Jul 24, 2022
This was added in #442 and inadvertently removed in #532.
However, the test in #442 was not stringent enough; the test added here
comes from #535.

Fixes #535
Fixes timholy/Revise.jl#695
timholy added a commit that referenced this pull request Jul 25, 2022
* Re-impose "no double lookup" for invoke

This was added in #442 and inadvertently removed in #532.
However, the test in #442 was not stringent enough; the test added here
comes from #535.

Fixes #535
Fixes timholy/Revise.jl#695
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.

Logging macros break the interpreter
4 participants