mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 01:05:48 +01:00 
			
		
		
		
	Use defined evaluation order in profiler
See https://github.com/LuaJIT/LuaJIT/issues/238
This commit is contained in:
		
				
					committed by
					
						
						sfan5
					
				
			
			
				
	
			
			
			
						parent
						
							49f7d2494c
						
					
				
				
					commit
					1b664dd870
				
			@@ -102,8 +102,9 @@ local function instrument(def)
 | 
			
		||||
		-- also called https://en.wikipedia.org/wiki/Continuation_passing_style
 | 
			
		||||
		-- Compared to table creation and unpacking it won't lose `nil` returns
 | 
			
		||||
		-- and is expected to be faster
 | 
			
		||||
		-- `measure` will be executed after time() and func(...)
 | 
			
		||||
		return measure(modname, instrument_name, time(), func(...))
 | 
			
		||||
		-- `measure` will be executed after func(...)
 | 
			
		||||
		local start = time()
 | 
			
		||||
		return measure(modname, instrument_name, start, func(...))
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user