@@ -41,10 +41,10 @@ elseif VERSION < v"0.7.0-DEV.484"
41
41
# to the `current_module` approach if we're on a Julia version where that's
42
42
# still possible.
43
43
function run_result (b:: Benchmark , p:: Parameters = b. params; kwargs... )
44
- return eval (current_module () , :(BenchmarkTools. _run ($ (b), $ (p); $ (kwargs... ))))
44
+ return Core . eval (@__MODULE__ , :(BenchmarkTools. _run ($ (b), $ (p); $ (kwargs... ))))
45
45
end
46
46
function lineartrial (b:: Benchmark , p:: Parameters = b. params; kwargs... )
47
- return eval (@__MODULE__ , :(BenchmarkTools. _lineartrial ($ (b), $ (p); $ (kwargs... ))))
47
+ return Core . eval (@__MODULE__ , :(BenchmarkTools. _lineartrial ($ (b), $ (p); $ (kwargs... ))))
48
48
end
49
49
else
50
50
# There's a commit gap between `current_module` deprecation and `invokelatest` keyword
@@ -135,7 +135,7 @@ logistic(u, l, k, t, t0) = round(Int, ((u - l) / (1 + exp(-k * (t - t0)))) + l)
135
135
const EVALS = Vector {Int} (undef, 9000 ) # any `t > length(EVALS)` should get an `evals` of 1
136
136
for t in 1 : 400 (EVALS[t] = logistic (1006 , 195 , - 0.025 , t, 200 )) end # EVALS[1] == 1000, EVALS[400] == 200
137
137
for t in 401 : 1000 (EVALS[t] = logistic (204 , - 16 , - 0.01 , t, 800 )) end # EVALS[401] == 200, EVALS[1000] == 10
138
- for i in 1 : 8 (EVALS[((i* 1000 )+ 1 ): ((i+ 1 )* 1000 )] = 11 - i) end # linearly decrease from EVALS[1000]
138
+ for i in 1 : 8 (EVALS[((i* 1000 )+ 1 ): ((i+ 1 )* 1000 )] . = 11 - i) end # linearly decrease from EVALS[1000]
139
139
140
140
guessevals (t) = t <= length (EVALS) ? EVALS[t] : 1
141
141
@@ -312,7 +312,7 @@ function generate_benchmark_definition(eval_module, out_vars, setup_vars, core,
312
312
invocation = :($ (Expr (:tuple , out_vars... )) = $ (signature))
313
313
core_body = :($ (core); $ (returns))
314
314
end
315
- return eval (eval_module, quote
315
+ return Core . eval (eval_module, quote
316
316
@noinline $ (signature) = begin $ (core_body) end
317
317
@noinline function $ (samplefunc)(__params:: $BenchmarkTools.Parameters )
318
318
$ (setup)
0 commit comments