Skip to content

Commit

Permalink
Revert "Fix docs for Experimental.@force_compile (#42760)" (#42784)
Browse files Browse the repository at this point in the history
This reverts commit 030a0f9.
  • Loading branch information
DilumAluthge authored Oct 24, 2021
1 parent 74424d0 commit dad4071
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
23 changes: 11 additions & 12 deletions base/experimental.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,17 @@ Force compilation of the block or function (Julia's built-in interpreter is bloc
# Examples
```
julia> occursin("interpreter", string(stacktrace(begin
# with forced compilation
Base.Experimental.@force_compile
backtrace()
end, true)))
false
julia> occursin("interpreter", string(stacktrace(begin
# without forced compilation
backtrace()
end, true)))
true
module WithPrecompiles
#=
code definitions
=#
if Sys.iswindows()
Experimental.@compile
compile_me() # `compile_me` will be compiled before execution
end
end
```
"""
macro force_compile() Expr(:meta, :force_compile) end
Expand Down
11 changes: 0 additions & 11 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7589,14 +7589,3 @@ end

# avoid impossible normalization (don't try to form Tuple{Complex{String}} here)
@test Tuple{Complex{T} where String<:T<:String} == Tuple{Complex{T} where String<:T<:String}

# control over compilation/interpreter
@test !occursin("interpreter", string(stacktrace(
begin
Base.Experimental.@force_compile
backtrace()
end, true)))
@test occursin("interpreter", string(stacktrace(
begin
backtrace()
end, true)))

0 comments on commit dad4071

Please sign in to comment.