Skip to content

Conversation

aviatesk
Copy link
Member

  • clean up abstract_call_method interface
  • tidy up abstract_call_opaque_closure interface
  • miscellaneous improvements for reflections.jl

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - no performance regressions were detected. A full report can be found here.

Comment on lines +1767 to +1774
if check # analyze implicit type asserts on argument and return type
ftt = closure.typ
(aty, rty) = (unwrap_unionall(ftt)::DataType).parameters
rty = rewrap_unionall(rty isa TypeVar ? rty.lb : rty, ftt)
if !(rt rty && tuple_tfunc(arginfo.argtypes[2:end]) rewrap_unionall(aty, ftt))
effects = Effects(effects; nothrow=TRISTATE_UNKNOWN)
end
end
Copy link
Member Author

Choose a reason for hiding this comment

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

@Keno could you please confirm this implementation is correct?
The previous implementation is equivalent to

Suggested change
if check # analyze implicit type asserts on argument and return type
ftt = closure.typ
(aty, rty) = (unwrap_unionall(ftt)::DataType).parameters
rty = rewrap_unionall(rty isa TypeVar ? rty.lb : rty, ftt)
if !(rt rty && tuple_tfunc(arginfo.argtypes[2:end]) rewrap_unionall(aty, ftt))
effects = Effects(effects; nothrow=TRISTATE_UNKNOWN)
end
end
if check # analyze implicit type asserts on argument and return type
ftt = closure.typ
(aty, rty) = (unwrap_unionall(ftt)::DataType).parameters
rty = rewrap_unionall(rty isa TypeVar ? rty.lb : rty, ftt)
if rt rty && tuple_tfunc(arginfo.argtypes[2:end]) rewrap_unionall(aty, ftt)
effects = Effects(effects; nothrow=TRISTATE_UNKNOWN)
end
end

whose nothrow check is flipped I think.

@aviatesk
Copy link
Member Author

Going to merge. @Keno I'd appreciate your comment on this if you have time.

@aviatesk aviatesk merged commit 37fd41e into master Jun 20, 2022
@aviatesk aviatesk deleted the avi/ccrefac branch June 20, 2022 03:23
pcjentsch pushed a commit to pcjentsch/julia that referenced this pull request Aug 18, 2022
* clean up `abstract_call_method` interface
* tidy up `abstract_call_opaque_closure` interface
* miscellaneous improvements
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.

3 participants