Skip to content

Commit f154425

Browse files
mhaurupenelopeysm
andauthored
Fix predecessor blocks on 1.11 (#195)
* Fix predecessor blocks on 1.11 * Fix stable docs * Make version bound in code more explicit. Co-authored-by: Penelope Yong <[email protected]> --------- Co-authored-by: Penelope Yong <[email protected]>
1 parent 4fcb076 commit f154425

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/TagBot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ jobs:
1212
- uses: JuliaRegistries/TagBot@v1
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
33
license = "MIT"
44
desc = "Tape based task copying in Turing"
55
repo = "https://github.com/TuringLang/Libtask.jl.git"
6-
version = "0.9.3"
6+
version = "0.9.4"
77

88
[deps]
99
MistyClosures = "dbe65cb8-6be2-42dd-bbc5-4196aaced4f4"
@@ -14,7 +14,7 @@ Aqua = "0.8.11"
1414
JuliaFormatter = "1.0.62"
1515
MistyClosures = "2.0.0"
1616
Test = "1"
17-
julia = "1.10.8"
17+
julia = "~1.10.8, 1.11.6"
1818

1919
[extras]
2020
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

src/bbcode.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ function _control_flow_graph(blks::Vector{BBlock})::Core.Compiler.CFG
233233
preds = map(id -> sort(map(p -> id_to_num[p], preds_ids[id])), block_ids)
234234
succs = map(id -> sort(map(s -> id_to_num[s], succs_ids[id])), block_ids)
235235

236+
# Predecessor of entry block is `0`. This needs to be added in manually.
237+
@static if VERSION >= v"1.11.6"
238+
push!(preds[1], 0)
239+
end
240+
241+
# Compute the statement numbers associated to each basic block.
236242
index = vcat(0, cumsum(map(length, blks))) .+ 1
237243
basic_blocks = map(eachindex(blks)) do n
238244
stmt_range = Core.Compiler.StmtRange(index[n], index[n + 1] - 1)

0 commit comments

Comments
 (0)