Closed c42f closed 4 years ago
Merging #9 into master will increase coverage by
0.34%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #9 +/- ##
==========================================
+ Coverage 89.65% 90.00% +0.34%
==========================================
Files 1 1
Lines 29 30 +1
==========================================
+ Hits 26 27 +1
Misses 3 3
Impacted Files | Coverage Δ | |
---|---|---|
src/RuntimeGeneratedFunctions.jl | 90.00% <100.00%> (+0.34%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update e51174f...e186934. Read the comment docs.
This moves the function body AST into the RuntimeGeneratedFunction itself, and caches the function object itself, but only holds it in the cache via a WeakRef, thus ensuring that it can be GC'd as normal. (A slight wart with this approach is that the id is still present in the cache after GC has run.)
As a side effect, this makes accessing the body in normal non-generated functions a lot neater.