Use defined evaluation order in profiler

See https://github.com/LuaJIT/LuaJIT/issues/238
master
Jude Melton-Houghton 2021-12-19 08:41:08 -05:00 committed by sfan5
parent 49f7d2494c
commit 1b664dd870
1 changed files with 3 additions and 2 deletions

View File

@ -102,8 +102,9 @@ local function instrument(def)
-- also called https://en.wikipedia.org/wiki/Continuation_passing_style -- also called https://en.wikipedia.org/wiki/Continuation_passing_style
-- Compared to table creation and unpacking it won't lose `nil` returns -- Compared to table creation and unpacking it won't lose `nil` returns
-- and is expected to be faster -- and is expected to be faster
-- `measure` will be executed after time() and func(...) -- `measure` will be executed after func(...)
return measure(modname, instrument_name, time(), func(...)) local start = time()
return measure(modname, instrument_name, start, func(...))
end end
end end