diff options
| -rw-r--r-- | lcode.c | 2 | ||||
| -rw-r--r-- | lcode.h | 1 | ||||
| -rw-r--r-- | llimits.h | 7 | ||||
| -rw-r--r-- | lstring.c | 2 | ||||
| -rw-r--r-- | lstring.h | 1 |
5 files changed, 2 insertions, 11 deletions
| @@ -1181,7 +1181,7 @@ void luaK_goiftrue (FuncState *fs, expdesc *e) { | |||
| 1181 | /* | 1181 | /* |
| 1182 | ** Emit code to go through if 'e' is false, jump otherwise. | 1182 | ** Emit code to go through if 'e' is false, jump otherwise. |
| 1183 | */ | 1183 | */ |
| 1184 | void luaK_goiffalse (FuncState *fs, expdesc *e) { | 1184 | static void luaK_goiffalse (FuncState *fs, expdesc *e) { |
| 1185 | int pc; /* pc of new jump */ | 1185 | int pc; /* pc of new jump */ |
| 1186 | luaK_dischargevars(fs, e); | 1186 | luaK_dischargevars(fs, e); |
| 1187 | switch (e->k) { | 1187 | switch (e->k) { |
| @@ -80,7 +80,6 @@ LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); | |||
| 80 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); | 80 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); |
| 81 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); | 81 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); |
| 82 | LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); | 82 | LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); |
| 83 | LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e); | ||
| 84 | LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); | 83 | LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); |
| 85 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); | 84 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); |
| 86 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); | 85 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); |
| @@ -60,13 +60,6 @@ typedef lu_byte TStatus; | |||
| 60 | : cast_sizet(LUA_MAXINTEGER)) | 60 | : cast_sizet(LUA_MAXINTEGER)) |
| 61 | 61 | ||
| 62 | /* | 62 | /* |
| 63 | ** floor of the log2 of the maximum signed value for integral type 't'. | ||
| 64 | ** (That is, maximum 'n' such that '2^n' fits in the given signed type.) | ||
| 65 | */ | ||
| 66 | #define log2maxs(t) (l_numbits(t) - 2) | ||
| 67 | |||
| 68 | |||
| 69 | /* | ||
| 70 | ** test whether an unsigned value is a power of 2 (or zero) | 63 | ** test whether an unsigned value is a power of 2 (or zero) |
| 71 | */ | 64 | */ |
| 72 | #define ispow2(x) (((x) & ((x) - 1)) == 0) | 65 | #define ispow2(x) (((x) & ((x) - 1)) == 0) |
| @@ -50,7 +50,7 @@ int luaS_eqstr (TString *a, TString *b) { | |||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | unsigned luaS_hash (const char *str, size_t l, unsigned seed) { | 53 | static unsigned luaS_hash (const char *str, size_t l, unsigned seed) { |
| 54 | unsigned int h = seed ^ cast_uint(l); | 54 | unsigned int h = seed ^ cast_uint(l); |
| 55 | for (; l > 0; l--) | 55 | for (; l > 0; l--) |
| 56 | h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1])); | 56 | h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1])); |
| @@ -54,7 +54,6 @@ | |||
| 54 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_VSHRSTR, (a) == (b)) | 54 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_VSHRSTR, (a) == (b)) |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed); | ||
| 58 | LUAI_FUNC unsigned luaS_hashlongstr (TString *ts); | 57 | LUAI_FUNC unsigned luaS_hashlongstr (TString *ts); |
| 59 | LUAI_FUNC int luaS_eqstr (TString *a, TString *b); | 58 | LUAI_FUNC int luaS_eqstr (TString *a, TString *b); |
| 60 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); | 59 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); |
