Skip to content

Commit

Permalink
Fix specialize_method for 1.8 (#1124)
Browse files Browse the repository at this point in the history
* change Core.Compiler.specialize_method for 1.8

* bump version
  • Loading branch information
mcabbott authored Nov 25, 2021
1 parent 4ed3a86 commit bc6fd2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Zygote"
uuid = "e88e6eb3-aa80-5325-afca-941959d7151f"
version = "0.6.30"
version = "0.6.31"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
6 changes: 5 additions & 1 deletion src/lib/literal_getproperty.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ function reflect(@nospecialize(sigtypes::Tuple), world::UInt = typemax(UInt))
end
method_index === 0 && return nothing
type_signature, raw_static_params, method = _methods[method_index]
method_instance = Core.Compiler.specialize_method(method, type_signature, raw_static_params, false)
if VERSION < v"1.8-"
method_instance = Core.Compiler.specialize_method(method, type_signature, raw_static_params, false)
else
method_instance = Core.Compiler.specialize_method(method, type_signature, raw_static_params; preexisting=false)
end
method_signature = method.sig
static_params = Any[raw_static_params...]
return method_instance, method_signature, static_params
Expand Down

2 comments on commit bc6fd2f

@mcabbott
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/49362

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.31 -m "<description of version>" bc6fd2f20bc7c91c1d1258b582bb32a232ff73f6
git push origin v0.6.31

Please sign in to comment.