summaryrefslogtreecommitdiff
path: root/testes/code.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-12 16:13:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-12 16:13:50 -0300
commit1fb4d539254b67e7e35ed698250c66d1edff0e08 (patch)
tree8f48b7ca736a7fb02834bcfac1415cd43307f529 /testes/code.lua
parentf6aab3ec1f111cd8d968bdcb7ca800e93b819d24 (diff)
downloadlua-github-1fb4d539254b67e7e35ed698250c66d1edff0e08.tar.gz
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 'testes/code.lua')
-rw-r--r--testes/code.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/code.lua b/testes/code.lua
index 49d682f8..b2702c61 100644
--- a/testes/code.lua
+++ b/testes/code.lua
@@ -93,11 +93,13 @@ end
-- some basic instructions
check(function () -- function does not create upvalues
(function () end){f()}
-end, 'CLOSURE', 'NEWTABLE', 'GETTABUP', 'CALL', 'SETLIST', 'CALL', 'RETURN0')
+end, 'CLOSURE', 'NEWTABLE', 'EXTRAARG', 'GETTABUP', 'CALL',
+ 'SETLIST', 'CALL', 'RETURN0')
check(function (x) -- function creates upvalues
(function () return x end){f()}
-end, 'CLOSURE', 'NEWTABLE', 'GETTABUP', 'CALL', 'SETLIST', 'CALL', 'RETURN')
+end, 'CLOSURE', 'NEWTABLE', 'EXTRAARG', 'GETTABUP', 'CALL',
+ 'SETLIST', 'CALL', 'RETURN')
-- sequence of LOADNILs