Skip to content

Commit

Permalink
remove TypedSlot
Browse files Browse the repository at this point in the history
  • Loading branch information
KDr2 committed Oct 22, 2024
1 parent 95e32aa commit 9d6716a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
version:
- '1.7'
- '1'
- '1.11.1'
- 'nightly'
os:
- ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion src/Libtask.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export TArray, tzeros, tfill, TRef # legacy types back compat
const TypedSlot = @static if isdefined(Core, :TypedSlot) # Julia v1.10 removed Core.TypedSlot
Core.TypedSlot
else
Core.Compiler.TypedSlot
if isdefined(Core.Compiler, :TypedSlot) # Julia 1.11 removed Core.Compiler.TypedSlot
Core.Compiler.TypedSlot
else
Any
end
end

include("tapedfunction.jl")
Expand Down
8 changes: 5 additions & 3 deletions src/tapedfunction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,11 @@ function bind_var!(var::QuoteNode, bindings::Bindings, ir::Core.CodeInfo)
LOGGING[] && @info "evaluating QuoteNode $var at compile time"
bind_var!(eval(var), bindings, ir)
end
function bind_var!(var::TypedSlot, bindings::Bindings, ir::Core.CodeInfo)
# turn TypedSlot to SlotNumber
bind_var!(Core.SlotNumber(var.id), bindings, ir)
@static if TypedSlot !== Any
function bind_var!(var::TypedSlot, bindings::Bindings, ir::Core.CodeInfo)
# turn TypedSlot to SlotNumber
bind_var!(Core.SlotNumber(var.id), bindings, ir)
end
end
function bind_var!(var::Core.SlotNumber, bindings::Bindings, ir::Core.CodeInfo)
get!(bindings[1], var, allocate_binding!(var, bindings, ir.slottypes[var.id]))
Expand Down

0 comments on commit 9d6716a

Please sign in to comment.