Skip to content

Commit 00c82ff

Browse files
authored
Move backedge analysis here from Revise, add docs, and release 1.0 (#30)
* Move Revise's BackEdges here as CodeEdges This package seems like a more natural home. It might be useful in contexts outside of Revise. In Revise they are a means to an end, and that's resulted in limited direct testing. Moving them here also encourages fleshing out the API. This adds many new utitilies and `show` methods. Testing is done by checking the selectivity of execution, an easier but thorough way of examining whether its making the correct decisions. * Add Documenter docs and bump to version 1.0 * Add some precompiles * Fix an apparent bug in bodymethod
1 parent a3c0a0b commit 00c82ff

17 files changed

+2523
-1035
lines changed

.travis.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,20 @@ branches:
2020
notifications:
2121
email: false
2222

23-
script:
24-
- export JULIA_PROJECT=""
25-
- julia --project -e 'using Pkg; Pkg.build(); Pkg.test();'
23+
codecov: true
2624

27-
after_success:
28-
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
25+
jobs:
26+
include:
27+
- stage: "Documentation"
28+
julia: 1.4
29+
os: linux
30+
arch: x64
31+
script:
32+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
33+
Pkg.instantiate()'
34+
- julia --project=docs/ docs/make.jl
35+
name: "HTML"
36+
after_success: skip
37+
exclude:
38+
- os: osx
39+
arch: x86

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name = "LoweredCodeUtils"
22
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
33
authors = ["Tim Holy <[email protected]>"]
4-
version = "0.4.5"
4+
version = "1.0.0"
55

66
[deps]
77
JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
88

99
[compat]
10-
JuliaInterpreter = "0.3, 0.4, 0.5, 0.6, 0.7"
10+
JuliaInterpreter = "0.7"
1111
julia = "1"
1212

1313
[extras]

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# LoweredCodeUtils
22

3-
This package performs operations on Julia's [lowered AST](https://docs.julialang.org/en/latest/devdocs/ast/).
4-
Current utilities include:
5-
- `signature`: compute the signature of a single method from its lowered definition
6-
- `methoddef!`: find signatures and optionally evaluate methods from lowered code
7-
- `rename_framemethods!`, resolve gensymmed names (https://github.com/JuliaLang/julia/issues/30908)
8-
- `bodymethod`: find the method that executes the body of a keyword-argument function
3+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaDebug.github.io/LoweredCodeUtils.jl/stable)
94

10-
You can learn more about these with, e.g., `?methoddef!`
5+
This package performs operations on Julia's [lowered AST](https://docs.julialang.org/en/latest/devdocs/ast/). See the documentation for details.

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
site/

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "0.24"

docs/make.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Documenter
2+
using LoweredCodeUtils
3+
4+
makedocs(
5+
sitename = "LoweredCodeUtils",
6+
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
7+
modules = [LoweredCodeUtils],
8+
pages = ["Home" => "index.md", "signatures.md", "edges.md", "api.md"]
9+
)
10+
11+
deploydocs(
12+
repo = "github.com/JuliaDebug/LoweredCodeUtils.jl.git",
13+
push_preview = true
14+
)

docs/src/api.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# API
2+
3+
## Signatures
4+
5+
```@docs
6+
signature
7+
methoddef!
8+
rename_framemethods!
9+
bodymethod
10+
```
11+
12+
## Edges
13+
14+
```@docs
15+
CodeEdges
16+
lines_required
17+
lines_required!
18+
selective_eval!
19+
selective_eval_fromstart!
20+
```
21+
22+
## Internal utilities
23+
24+
```@docs
25+
LoweredCodeUtils.print_with_code
26+
LoweredCodeUtils.next_or_nothing
27+
LoweredCodeUtils.skip_until
28+
LoweredCodeUtils.MethodInfo
29+
LoweredCodeUtils.identify_framemethod_calls
30+
LoweredCodeUtils.iscallto
31+
LoweredCodeUtils.getcallee
32+
LoweredCodeUtils.find_corrected_name
33+
LoweredCodeUtils.replacename!
34+
LoweredCodeUtils.Variable
35+
```

0 commit comments

Comments
 (0)