@@ -67,27 +67,27 @@ struct RuntimeGeneratedFunction{argnames, cache_tag, context_tag, id, B} <: Func
6767
6868 # For internal use in deserialize() - doesen't check whether the body is in the cache!
6969 function RuntimeGeneratedFunction{
70- argnames,
71- cache_tag,
72- context_tag,
73- id,
70+ argnames,
71+ cache_tag,
72+ context_tag,
73+ id
7474 }(body) where {
75- argnames,
76- cache_tag,
77- context_tag,
78- id,
75+ argnames,
76+ cache_tag,
77+ context_tag,
78+ id
7979 }
8080 new {argnames, cache_tag, context_tag, id, typeof(body)} (body)
8181 end
8282end
8383
8484function drop_expr (:: RuntimeGeneratedFunction {
85- a,
86- cache_tag,
87- c,
88- id,
85+ a,
86+ cache_tag,
87+ c,
88+ id
8989}) where {a, cache_tag, c,
90- id}
90+ id}
9191 # When dropping the reference to the body from an RGF, we need to upgrade
9292 # from a weak to a strong reference in the cache to prevent the body being
9393 # GC'd.
@@ -111,7 +111,7 @@ function _check_rgf_initialized(mods...)
111111end
112112
113113function RuntimeGeneratedFunction (cache_module:: Module , context_module:: Module , code;
114- opaque_closures = true )
114+ opaque_closures = true )
115115 _check_rgf_initialized (cache_module, context_module)
116116 RuntimeGeneratedFunction (getfield (cache_module, _tagname),
117117 getfield (context_module, _tagname),
@@ -133,11 +133,11 @@ macro RuntimeGeneratedFunction(context_module, code, opaque_closures = true)
133133end
134134
135135function Base. show (io:: IO , :: MIME"text/plain" ,
136- f:: RuntimeGeneratedFunction{argnames, cache_tag, context_tag, id} ) where {
137- argnames,
138- cache_tag,
139- context_tag,
140- id,
136+ f:: RuntimeGeneratedFunction{argnames, cache_tag, context_tag, id} ) where {
137+ argnames,
138+ cache_tag,
139+ context_tag,
140+ id
141141}
142142 cache_mod = parentmodule (cache_tag)
143143 context_mod = parentmodule (context_tag)
@@ -250,16 +250,17 @@ function init(mod)
250250 # or so. See:
251251 # https://github.com/JuliaLang/julia/pull/32902
252252 # https://github.com/NHDaly/StagedFunctions.jl/blob/master/src/StagedFunctions.jl#L30
253- @inline @generated function $RuntimeGeneratedFunctions. generated_callfunc (f:: $RuntimeGeneratedFunctions.RuntimeGeneratedFunction {
253+ @inline @generated function $RuntimeGeneratedFunctions. generated_callfunc (
254+ f:: $RuntimeGeneratedFunctions.RuntimeGeneratedFunction {
255+ argnames,
256+ cache_tag,
257+ $ _tagname,
258+ id
259+ },
260+ __args... ) where {
254261 argnames,
255262 cache_tag,
256- $ _tagname,
257- id,
258- },
259- __args... ) where {
260- argnames,
261- cache_tag,
262- id,
263+ id
263264 }
264265 $ RuntimeGeneratedFunctions. generated_callfunc_body (argnames,
265266 cache_tag,
@@ -334,13 +335,13 @@ end
334335# the body on a remote node when using Serialization.jl (in Distributed.jl
335336# and elsewhere)
336337function Serialization. serialize (s:: AbstractSerializer ,
337- rgf:: RuntimeGeneratedFunction {argnames, cache_tag,
338- context_tag, id, B}) where {
339- argnames,
340- cache_tag,
341- context_tag,
342- id,
343- B,
338+ rgf:: RuntimeGeneratedFunction {argnames, cache_tag,
339+ context_tag, id, B}) where {
340+ argnames,
341+ cache_tag,
342+ context_tag,
343+ id,
344+ B
344345}
345346 body = _lookup_body (cache_tag, id)
346347 Serialization. serialize_type (s,
@@ -350,14 +351,14 @@ function Serialization.serialize(s::AbstractSerializer,
350351end
351352
352353function Serialization. deserialize (s:: AbstractSerializer ,
353- :: Type {
354- <: RuntimeGeneratedFunction {argnames, cache_tag,
354+ :: Type {
355+ <: RuntimeGeneratedFunction {argnames, cache_tag,
355356 context_tag, id, B}}) where {
356- argnames,
357- cache_tag,
358- context_tag,
359- id,
360- B,
357+ argnames,
358+ cache_tag,
359+ context_tag,
360+ id,
361+ B
361362}
362363 body = deserialize (s)
363364 cached_body = _cache_body (cache_tag, id, body)
0 commit comments