diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-09-21 10:31:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-12 12:29:09 -0300 |
commit | 5d8ce05b3f6fad79e37ed21c1076e47a322472c6 (patch) | |
tree | 7629a59887da63d44267e872bc8e33be6db36582 /testes/errors.lua | |
parent | f83de8e34e24e30acf277f60de62a33bd51d1ddd (diff) | |
download | lua-5d8ce05b3f6fad79e37ed21c1076e47a322472c6.tar.gz lua-5d8ce05b3f6fad79e37ed21c1076e47a322472c6.tar.bz2 lua-5d8ce05b3f6fad79e37ed21c1076e47a322472c6.zip |
Back to a stackless implementation
A "with stack" implementation gains too little in performance to be
worth all the noise from C-stack overflows.
This commit is almost a sketch, to test performance. There are several
pending stuff:
- review control of C-stack overflow and error messages;
- what to do with setcstacklimit;
- review comments;
- review unroll of Lua calls.
Diffstat (limited to 'testes/errors.lua')
-rw-r--r-- | testes/errors.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index f9623b1d..88918df7 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
@@ -530,10 +530,9 @@ local function testrep (init, rep, close, repc, finalresult) | |||
530 | if (finalresult) then | 530 | if (finalresult) then |
531 | assert(res() == finalresult) | 531 | assert(res() == finalresult) |
532 | end | 532 | end |
533 | s = init .. string.rep(rep, 10000) | 533 | s = init .. string.rep(rep, 500) |
534 | local res, msg = load(s) -- 10000 levels not ok | 534 | local res, msg = load(s) -- 500 levels not ok |
535 | assert(not res and (string.find(msg, "too many registers") or | 535 | assert(not res and string.find(msg, "too many")) |
536 | string.find(msg, "stack overflow"))) | ||
537 | end | 536 | end |
538 | 537 | ||
539 | testrep("local a; a", ",a", "= 1", ",1") -- multiple assignment | 538 | testrep("local a; a", ",a", "= 1", ",1") -- multiple assignment |