Skip to content

Commit

Permalink
make EAUtils.jl loadable even if Main.EscapeAnalysis isn't defined (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Nov 24, 2024
1 parent 0bedaae commit fa18951
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Compiler/test/EAUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ export code_escapes, @code_escapes, __clear_cache!

include("setup_Compiler.jl")

using ..EscapeAnalysis
const EA = EscapeAnalysis
using .Compiler: EscapeAnalysis as EA

# AbstractInterpreter
# -------------------
Expand Down
3 changes: 2 additions & 1 deletion doc/src/devdocs/EscapeAnalysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ This escape analysis aims to:
You can give a try to the escape analysis by loading the `EAUtils.jl` utility script that
defines the convenience entries `code_escapes` and `@code_escapes` for testing and debugging purposes:
```@repl EAUtils
using Base.Compiler: EscapeAnalysis # or `using Compiler: EscapeAnalysis` to use the stdlib version
# InteractiveUtils.@activate Compiler # to use the stdlib version of the Compiler
let JULIA_DIR = normpath(Sys.BINDIR, "..", "share", "julia")
include(normpath(JULIA_DIR, "Compiler", "test", "EAUtils.jl"))
using .EAUtils
Expand Down

0 comments on commit fa18951

Please sign in to comment.