mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Broadening the use of branch hints
More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth).
This commit is contained in:
parent
c03c527fd2
commit
59c88f846d
24 changed files with 162 additions and 141 deletions
2
ldo.h
2
ldo.h
|
|
@ -23,7 +23,7 @@
|
|||
** at every check.
|
||||
*/
|
||||
#define luaD_checkstackaux(L,n,pre,pos) \
|
||||
if (L->stack_last - L->top <= (n)) \
|
||||
if (l_unlikely(L->stack_last - L->top <= (n))) \
|
||||
{ pre; luaD_growstack(L, n, 1); pos; } \
|
||||
else { condmovestack(L,pre,pos); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue