Skip to content

Commit

Permalink
created Reduce.Preload() variant of Reduce.Load() for precompilation …
Browse files Browse the repository at this point in the history
…of dependents for #32
  • Loading branch information
chakravala committed Nov 7, 2019
1 parent dd63767 commit 0c8d719
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Reduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ function Load()
return nothing
end

Preload() = (global rs=PSL(); global s; eval(s); atexit(()->kill(rs)))

global preload = false
try
global preload
Expand Down
2 changes: 1 addition & 1 deletion src/precomp.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global rs = nothing
@info "Precompiling extra Reduce methods (set `ENV[\"REDPRE\"]=\"0\"` to disable)"
Reduce.Load(); atexit(() -> kill(rs))
Reduce.Preload(); atexit(() -> kill(rs))

rcall(:((1+pi)^2)) == convert(Expr,RExpr(rcall("(1+pi)**2")))
try; "1/0" |> rcall; false; catch; true; end
Expand Down

0 comments on commit 0c8d719

Please sign in to comment.