aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-02-24 11:14:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-02-24 11:14:44 -0300
commit59c88f846d1dcd901a4420651aedf27816618923 (patch)
tree0e76a066c383cbc99cc2f60b8b4f97c5df45e479 /llimits.h
parentc03c527fd207b4ad8f5a8e0f4f2c176bd227c979 (diff)
downloadlua-59c88f846d1dcd901a4420651aedf27816618923.tar.gz
lua-59c88f846d1dcd901a4420651aedf27816618923.tar.bz2
lua-59c88f846d1dcd901a4420651aedf27816618923.zip
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).
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/llimits.h b/llimits.h
index d0394831..025f1c82 100644
--- a/llimits.h
+++ b/llimits.h
@@ -150,22 +150,6 @@ typedef LUAI_UACINT l_uacInt;
150 150
151 151
152/* 152/*
153** macros to improve jump prediction (used mainly for error handling)
154*/
155#if !defined(likely)
156
157#if defined(__GNUC__)
158#define likely(x) (__builtin_expect(((x) != 0), 1))
159#define unlikely(x) (__builtin_expect(((x) != 0), 0))
160#else
161#define likely(x) (x)
162#define unlikely(x) (x)
163#endif
164
165#endif
166
167
168/*
169** non-return type 153** non-return type
170*/ 154*/
171#if !defined(l_noret) 155#if !defined(l_noret)