Skip to content

Commit 7de3e22

Browse files
committed
wip
1 parent 13cf6bd commit 7de3e22

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/legacy_loading.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ function parse_pkg_files(id::PkgId)
156156
# To reduce compiler latency, use runtime dispatch for `queue_includes!`.
157157
# `queue_includes!` requires compilation of the whole parsing/expression-splitting infrastructure,
158158
# and it's better to wait to compile it until we actually need it.
159-
invoke_revisefunc(worldage[], queue_includes!, pkgdata, id)
159+
worldage[] = Base.get_world_counter()
160+
invoke_revisefunc(queue_includes!, pkgdata, id)
160161
return pkgdata
161162
end
162163

src/loading.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ function parse_pkg_files(id::PkgId)
4848
# To reduce compiler latency, use runtime dispatch for `queue_includes!`.
4949
# `queue_includes!` requires compilation of the whole parsing/expression-splitting infrastructure,
5050
# and it's better to wait to compile it until we actually need it.
51-
invoke_revisefunc(worldage[], queue_includes!, pkgdata, id)
51+
worldage[] = Base.get_world_counter()
52+
invoke_revisefunc(queue_includes!, pkgdata, id)
5253
return pkgdata
5354
end
5455

src/packagedef.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function delete_missing!(exs_sigs_old::ExprsSigs, exs_sigs_new)
273273
#try # guard against serialization errors if the type isn't defined on the worker
274274
future = remotecall(Core.eval, p, Main, :(delete_method_by_sig($sig)))
275275
finalizer(future) do f
276-
Base.invoke_revisefunc(worldage[], Distributed.finalize_ref, f)
276+
invoke_revisefunc(Distributed.finalize_ref, f)
277277
end
278278
#catch
279279
#end
@@ -1204,7 +1204,7 @@ end
12041204
# This uses invokelatest not for reasons of world age but to ensure that the call is made at runtime.
12051205
# This allows `revise_first` to be compiled without compiling `revise` itself, and greatly
12061206
# reduces the overhead of using Revise.
1207-
revise_first(ex) = Expr(:toplevel, :(isempty($revision_queue) || Base.invoke_revisefunc($revise)), ex)
1207+
revise_first(ex) = Expr(:toplevel, :(isempty($revision_queue) || (worldage[] = Base.get_world_counter(); invoke_revisefunc($revise))), ex)
12081208

12091209
@noinline function run_backend(backend)
12101210
while true
@@ -1355,8 +1355,8 @@ function __init__()
13551355
id = PkgId(nothing, "@REPL")
13561356
pkgdatas[id] = pkgdata = PkgData(id, nothing)
13571357
# Set the lookup callbacks
1358-
CodeTracking.method_lookup_callback[] = get_def
1359-
CodeTracking.expressions_callback[] = get_expressions
1358+
CodeTracking.method_lookup_callback[] = x -> (worldage[] = Base.get_world_counter(); invoke_revisefunc(get_def, x))
1359+
CodeTracking.expressions_callback[] = x -> (worldage[] = Base.get_world_counter(); invoke_revisefunc(get_expressions, x))
13601360

13611361
# Watch the manifest file for changes
13621362
mfile = manifest_file()

0 commit comments

Comments
 (0)