Skip to content

Commit 8219ad5

Browse files
JeffBezansonKristofferC
authored andcommitted
allow more statements in generate_precompile.jl (#49200)
(cherry picked from commit 9001ea0)
1 parent 4e7a55e commit 8219ad5

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

contrib/generate_precompile.jl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -377,30 +377,11 @@ function generate_precompile_statements()
377377
n_succeeded = 0
378378
include_time = @elapsed for statement in statements
379379
# println(statement)
380-
# XXX: skip some that are broken. these are caused by issue #39902
381-
occursin("Tuple{Artifacts.var\"#@artifact_str\", LineNumberNode, Module, Any, Any}", statement) && continue
382-
occursin("Tuple{Base.Cartesian.var\"#@ncall\", LineNumberNode, Module, Int64, Any, Vararg{Any}}", statement) && continue
383-
occursin("Tuple{Base.Cartesian.var\"#@ncall\", LineNumberNode, Module, Int32, Any, Vararg{Any}}", statement) && continue
384-
occursin("Tuple{Base.Cartesian.var\"#@nloops\", LineNumberNode, Module, Any, Any, Any, Vararg{Any}}", statement) && continue
385-
occursin("Tuple{Core.var\"#@doc\", LineNumberNode, Module, Vararg{Any}}", statement) && continue
386-
# XXX: this is strange, as this isn't the correct representation of this
387-
occursin("typeof(Core.IntrinsicFunction)", statement) && continue
388-
# XXX: this is strange, as this method should not be getting compiled
389-
occursin(", Core.Compiler.AbstractInterpreter, ", statement) && continue
390380
try
391381
ps = Meta.parse(statement)
392382
isexpr(ps, :call) || continue
393383
popfirst!(ps.args) # precompile(...)
394384
ps.head = :tuple
395-
l = ps.args[end]
396-
if (isexpr(l, :tuple) || isexpr(l, :curly)) && length(l.args) > 0 # Tuple{...} or (...)
397-
# XXX: precompile doesn't currently handle overloaded Vararg arguments very well.
398-
# Replacing N with a large number works around it.
399-
l = l.args[end]
400-
if isexpr(l, :curly) && length(l.args) == 2 && l.args[1] === :Vararg # Vararg{T}
401-
push!(l.args, 100) # form Vararg{T, 100} instead
402-
end
403-
end
404385
# println(ps)
405386
ps = Core.eval(PrecompileStagingArea, ps)
406387
precompile(ps...)

0 commit comments

Comments
 (0)