diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-12 16:13:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-12 16:13:50 -0300 |
commit | 1fb4d539254b67e7e35ed698250c66d1edff0e08 (patch) | |
tree | 8f48b7ca736a7fb02834bcfac1415cd43307f529 /ltests.c | |
parent | f6aab3ec1f111cd8d968bdcb7ca800e93b819d24 (diff) | |
download | lua-1fb4d539254b67e7e35ed698250c66d1edff0e08.tar.gz lua-1fb4d539254b67e7e35ed698250c66d1edff0e08.tar.bz2 lua-1fb4d539254b67e7e35ed698250c66d1edff0e08.zip |
OP_NEWTABLE keeps exact size of arrays
OP_NEWTABLE is followed by an OP_EXTRAARG, so that it can keep
the exact size of the array part of the table to be created.
(Functions 'luaO_int2fb'/'luaO_fb2int' were removed.)
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -1103,14 +1103,6 @@ static int doremote (lua_State *L) { | |||
1103 | } | 1103 | } |
1104 | 1104 | ||
1105 | 1105 | ||
1106 | static int int2fb_aux (lua_State *L) { | ||
1107 | int b = luaO_int2fb((unsigned int)luaL_checkinteger(L, 1)); | ||
1108 | lua_pushinteger(L, b); | ||
1109 | lua_pushinteger(L, (unsigned int)luaO_fb2int(b)); | ||
1110 | return 2; | ||
1111 | } | ||
1112 | |||
1113 | |||
1114 | static int log2_aux (lua_State *L) { | 1106 | static int log2_aux (lua_State *L) { |
1115 | unsigned int x = (unsigned int)luaL_checkinteger(L, 1); | 1107 | unsigned int x = (unsigned int)luaL_checkinteger(L, 1); |
1116 | lua_pushinteger(L, luaO_ceillog2(x)); | 1108 | lua_pushinteger(L, luaO_ceillog2(x)); |
@@ -1780,7 +1772,6 @@ static const struct luaL_Reg tests_funcs[] = { | |||
1780 | {"pobj", gc_printobj}, | 1772 | {"pobj", gc_printobj}, |
1781 | {"getref", getref}, | 1773 | {"getref", getref}, |
1782 | {"hash", hash_query}, | 1774 | {"hash", hash_query}, |
1783 | {"int2fb", int2fb_aux}, | ||
1784 | {"log2", log2_aux}, | 1775 | {"log2", log2_aux}, |
1785 | {"limits", get_limits}, | 1776 | {"limits", get_limits}, |
1786 | {"listcode", listcode}, | 1777 | {"listcode", listcode}, |