Skip to content

Commit 390ac44

Browse files
authored
Merge pull request #166 from topolarity/ct/precompile-invalidations
Use `@recompile_invalidations` to heal Base/Core.Compiler invalidations
2 parents 24f047c + 53daa57 commit 390ac44

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

Manifest.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
1010
Cthulhu = "f68482b8-f384-11e8-15f7-abe071a5a75f"
1111
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
1212
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
13+
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1314
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1415
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1516
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"

src/Diffractor.jl

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
module Diffractor
22

33
using StructArrays
4+
using PrecompileTools
45

56
export ∂⃖, gradient
67

78
const CC = Core.Compiler
89

910
const GENERATORS = Expr[]
1011

11-
include("runtime.jl")
12-
include("interface.jl")
13-
include("utils.jl")
14-
include("tangent.jl")
15-
include("jet.jl")
12+
@recompile_invalidations begin
13+
include("runtime.jl")
14+
include("interface.jl")
15+
include("utils.jl")
16+
include("tangent.jl")
17+
include("jet.jl")
1618

17-
include("stage1/generated.jl")
18-
include("stage1/forward.jl")
19-
include("stage1/recurse_fwd.jl")
20-
include("stage1/mixed.jl")
21-
include("stage1/broadcast.jl")
19+
include("stage1/generated.jl")
20+
include("stage1/forward.jl")
21+
include("stage1/recurse_fwd.jl")
22+
include("stage1/mixed.jl")
23+
include("stage1/broadcast.jl")
2224

23-
include("stage2/interpreter.jl")
24-
include("stage2/lattice.jl")
25-
include("stage2/abstractinterpret.jl")
26-
include("stage2/tfuncs.jl")
27-
include("stage2/forward.jl")
25+
include("stage2/interpreter.jl")
26+
include("stage2/lattice.jl")
27+
include("stage2/abstractinterpret.jl")
28+
include("stage2/tfuncs.jl")
29+
include("stage2/forward.jl")
2830

29-
include("codegen/forward.jl")
30-
include("analysis/forward.jl")
31-
include("codegen/forward_demand.jl")
32-
include("codegen/reverse.jl")
31+
include("codegen/forward.jl")
32+
include("analysis/forward.jl")
33+
include("codegen/forward_demand.jl")
34+
include("codegen/reverse.jl")
3335

34-
include("extra_rules.jl")
36+
include("extra_rules.jl")
3537

36-
include("higher_fwd_rules.jl")
38+
include("higher_fwd_rules.jl")
3739

38-
include("debugutils.jl")
40+
include("debugutils.jl")
3941

40-
include("stage1/termination.jl")
42+
include("stage1/termination.jl")
43+
end
4144

4245
end

0 commit comments

Comments
 (0)