1
0
forked from aniani/vim

492 Commits

Author SHA1 Message Date
Bram Moolenaar
a90afb9a59 patch 8.2.1224: Vim9: arguments from partial are not used
Problem:    Vim9: arguments from partial are not used.
Solution:   Put the partial arguments on the stack. (closes #6460)
2020-07-15 22:38:56 +02:00
Bram Moolenaar
08f7a41b0a patch 8.2.1202: Vim9: crash when calling a closure from a builtin function
Problem:    Vim9: crash when calling a closure from a builtin function.
Solution:   Use the current execution context. (closes #6441)
2020-07-13 20:41:08 +02:00
Bram Moolenaar
bfd65589d9 patch 8.2.1200: Vim9: cannot disassemble a lambda function
Problem:    Vim9: cannot disassemble a lambda function.
Solution:   Recognize "<lambda>123" as a function name.
2020-07-13 18:18:00 +02:00
Bram Moolenaar
389df259c4 patch 8.2.1167: Vim9: builtin function method call only supports first arg
Problem:    Vim9: builtin function method call only supports first argument.
Solution:   Shift arguments when needed. (closes #6305, closes #6419)
2020-07-09 21:20:47 +02:00
Bram Moolenaar
c620c055ce patch 8.2.1154: Vim9: crash when using imported function
Problem:    Vim9: crash when using imported function.
Solution:   Check for a function type.  Set the script context when calling a
            function. (closes #6412)
2020-07-08 15:16:19 +02:00
Bram Moolenaar
50788ef349 patch 8.2.1135: Vim9: getting a dict member may not work
Problem:    Vim9: getting a dict member may not work.
Solution:   Clear the dict only after copying the item.
2020-07-05 16:51:26 +02:00
Bram Moolenaar
435d89789e patch 8.2.1134: Vim9: getting a list member may not work
Problem:    Vim9: getting a list member may not work.
Solution:   Clear the list only after copying the item. (closes #6393)
2020-07-05 16:42:13 +02:00
Bram Moolenaar
fb9d5c51c8 patch 8.2.1127: Vim9: getting a dict member may not work
Problem:    Vim9: getting a dict member may not work.
Solution:   Clear the dict only after copying the item. (closes #6390)
2020-07-04 19:19:43 +02:00
Bram Moolenaar
9a78e6df17 patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()
Problem:    Inconsistent naming of get_list_tv() and eval_dict().
Solution:   Rename get_list_tv() to eval_list().  Similarly for eval_number(),
            eval_string(), eval_lit_string() and a few others.
2020-07-01 18:29:55 +02:00
Bram Moolenaar
0cb5bcf583 patch 8.2.1023: Vim9: redefining a function uses a new index every time
Problem:    Vim9: redefining a function uses a new index every time.
Solution:   When redefining a function clear the contents and re-use the
            index.
2020-06-20 18:19:09 +02:00
Bram Moolenaar
c785b9a7f4 patch 8.2.1011: Vim9: some code not tested
Problem:    Vim9: some code not tested.
Solution:   Add a few more test cases.  Reorder checks for clearer error.
            Remove unreachable code.
2020-06-19 18:34:15 +02:00
Bram Moolenaar
c5b1c20b6b patch 8.2.1009: Vim9: some failures not checked for
Problem:    Vim9: some failures not checked for.
Solution:   Add test cases.  Remove unused code.
2020-06-18 22:43:27 +02:00
Bram Moolenaar
9af78769ee patch 8.2.0987: Vim9: cannot assign to [var; var]
Problem:    Vim9: cannot assign to [var; var].
Solution:   Assign rest of items to a list.
2020-06-16 11:34:42 +02:00
Bram Moolenaar
47a519a933 patch 8.2.0981: Vim9: cannot compile "[var, var] = list"
Problem:    Vim9: cannot compile "[var, var] = list".
Solution:   Implement list assignment.
2020-06-14 23:05:10 +02:00
Bram Moolenaar
25e0f5863e patch 8.2.0823: Vim9: script reload test is disabled
Problem:    Vim9: script reload test is disabled.
Solution:   Compile a function in the context of the script where it was
            defined.  Set execution stack for compiled function.  Add a test
            that an error is reported for the right file/function.
2020-05-25 22:36:50 +02:00
Bram Moolenaar
822ba24743 patch 8.2.0818: Vim9: using a discovery phase doesn't work well
Problem:    Vim9: using a discovery phase doesn't work well.
Solution:   Remove the discovery phase, instead compile a function only when
            it is used.  Add :defcompile to compile def functions earlier.
2020-05-24 23:00:18 +02:00
Bram Moolenaar
6f5b6dfb16 patch 8.2.0771: Vim9: cannot call a compiled closure from not compiled code
Problem:    Vim9: cannot call a compiled closure from not compiled code.
Solution:   Pass funcexe to call_user_func().
2020-05-16 21:20:12 +02:00
Bram Moolenaar
e75ba268b3 patch 8.2.0768: Vim9: memory leak in script test
Problem:    Vim9: memory leak in script test.
Solution:   Clear typval before giving an error message.
2020-05-16 15:43:31 +02:00
Bram Moolenaar
a6e67e4f41 patch 8.2.0764: Vim9: assigning to option not fully tested
Problem:    Vim9: assigning to option not fully tested.
Solution:   Add more test cases. Allow using any type for assignment.
2020-05-15 23:36:40 +02:00
Bram Moolenaar
4dac32caf3 patch 8.2.0760: Vim9: dict member errors not tested
Problem:    Vim9: dict member errors not tested.
Solution:   Delete unreachable error.  Add tests.
2020-05-15 21:44:19 +02:00
Bram Moolenaar
270d0388d2 patch 8.2.0759: Vim9: missing changes for performance improvements
Problem:    Vim9: missing changes for performance improvements
Solution:   Use GA_GROW().  Don't call breakcheck so often.
2020-05-15 21:42:53 +02:00
Bram Moolenaar
f163bd5e41 patch 8.2.0732: Vim9: storing value in dict messes up stack
Problem:    Vim9: storing value in dict messes up stack.
Solution:   Correct item count of stack.
2020-05-10 21:47:43 +02:00
Bram Moolenaar
1cc2a94f80 patch 8.2.0730: Vim9: Assignment to dict member does not work
Problem:    Vim9: Assignment to dict member does not work.
Solution:   Parse dict assignment. Implement getting dict member.
2020-05-10 19:10:31 +02:00
Bram Moolenaar
3b6a6eb7b4 patch 8.2.0726: Vim9: leaking memory when calling not compiled :def function
Problem:    Vim9: leaking memory when calling not compiled :def function.
Solution:   Check if function is compiled earlier.
2020-05-09 23:20:20 +02:00
Bram Moolenaar
09689a0284 patch 8.2.0725: Vim9: cannot call a function declared later in Vim9 script
Problem:    Vim9: cannot call a function declared later in Vim9 script.
Solution:   Make two passes through the script file.
2020-05-09 22:50:08 +02:00
Bram Moolenaar
8a1c101315 patch 8.2.0706: Vim9: using assert_fails() causes function to finish
Problem:    Vim9: using assert_fails() causes function to finish.
Solution:   Check did_emsg instead of called_emsg.
2020-05-07 14:07:25 +02:00
Bram Moolenaar
f821ddaa0c patch 8.2.0704: Vim9: memory leak in disassemble test
Problem:    Vim9: memory leak in disassemble test.
Solution:   Decrement refcount when creating funccal.
2020-05-06 22:18:17 +02:00
Bram Moolenaar
b68b346e6d patch 8.2.0703: Vim9: closure cannot store value in outer context
Problem:    Vim9: closure cannot store value in outer context.
Solution:   Make storing value in outer context work.  Make :disassemble
            accept a function reference.
2020-05-06 21:06:30 +02:00
Bram Moolenaar
40ee466c36 patch 8.2.0700: Vim9: converting error message to exception not tested
Problem:    Vim9: converting error message to exception not tested.
Solution:   Test exception from error.  Do not continue after :echoerr.
2020-05-05 22:08:26 +02:00
Bram Moolenaar
015f4267f4 patch 8.2.0699: Vim9: not all errors tested
Problem:    Vim9: not all errors tested.
Solution:   Add test for deleted function.  Bail out on first error.
2020-05-05 21:25:22 +02:00
Bram Moolenaar
221fcc741a patch 8.2.0697: Vim9: memory leak when using nested function
Problem:    Vim9: memory leak when using nested function.
Solution:   Unreference function when deleting instructions. Adjust reference
            count for local variables.
2020-05-05 19:46:20 +02:00
Bram Moolenaar
0e65d3de0a patch 8.2.0696: Vim9: nested function does not work properly
Problem:    Vim9: nested function does not work properly
Solution:   Create a function reference.  Check argument count.
2020-05-05 17:53:16 +02:00
Bram Moolenaar
04b1269783 patch 8.2.0695: Vim9: cannot define a function inside a function
Problem:    Vim9: cannot define a function inside a function.
Solution:   Initial support for :def inside :def.
2020-05-04 23:24:44 +02:00
Bram Moolenaar
f7779c63d4 patch 8.2.0684: Vim9: memory leak when using lambda
Problem:    Vim9: memory leak when using lambda.
Solution:   Move the funccal context to the partial. Free the function when
            exiting.
2020-05-03 15:38:16 +02:00
Bram Moolenaar
5adc55cb74 patch 8.2.0683: Vim9: parsing type does not always work
Problem:    Vim9: parsing type does not always work.
Solution:   Handle func type without return value.  Test more closures.
            Fix type check offset.  Fix garbage collection.
2020-05-02 23:12:58 +02:00
Bram Moolenaar
bf67ea1af0 patch 8.2.0679: Vim9: incomplete support for closures
Problem:    Vim9: incomplete support for closures.
Solution:   At the end of a function copy arguments and local variables if
            they are still used by a referenced closure.
2020-05-02 17:52:42 +02:00
Bram Moolenaar
c8cd2b34d1 patch 8.2.0677: Vim9: no support for closures
Problem:    Vim9: no support for closures.
Solution:   Find variables in the outer function scope, so long as the scope
            exists.
2020-05-01 19:29:08 +02:00
Bram Moolenaar
7f6f56f43c patch 8.2.0668: compiler warning for int/size_t usage
Problem:    Compiler warning for int/size_t usage.
Solution:   Change "int" to "size_t". (Mike Williams)
2020-04-30 20:21:43 +02:00
Bram Moolenaar
4c17ad94ec patch 8.2.0650: Vim9: script function can be deleted
Problem:    Vim9: script function can be deleted.
Solution:   Disallow deleting script function.  Delete functions when sourcing
            a script again.
2020-04-27 22:47:51 +02:00
Bram Moolenaar
6378c4fef3 patch 8.2.0641: Vim9: not expanded in :hardcopy and syn-include
Problem:    Vim9:  not expanded in :hardcopy and "syntax include".
Solution:   Add the EX_EXPAND flag.  Expend "syntax include".
2020-04-26 13:50:41 +02:00
Bram Moolenaar
cfe435d7fe patch 8.2.0640: Vim9: expanding does not work
Problem:    Vim9: expanding  does not work.
Solution:   Find wildcards in not compiled commands.  Reorganize test files.
2020-04-25 20:02:55 +02:00
Bram Moolenaar
f93c7fea08 patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script
Problem:    Vim9: wrong syntax of function in Vim9 script.
Solution:   Give error for missing space. Implement :echomsg and :echoerr.
            (closes #5670)
2020-04-23 22:16:53 +02:00
Bram Moolenaar
1df8b3fb04 patch 8.2.0625: Vim9: confusing error when calling unknown function
Problem:    Vim9: confusing error when calling unknown function.
Solution:   Give error while compiling.
2020-04-23 18:13:23 +02:00
Bram Moolenaar
7bdaea6e0d patch 8.2.0605: Vim9: cannot unlet an environment variable
Problem:    Vim9: cannot unlet an environment variable.
Solution:   Implement unlet for $VAR.
2020-04-19 18:27:26 +02:00
Bram Moolenaar
d72c1bf0a6 patch 8.2.0601: Vim9: :unlet is not compiled
Problem:    Vim9: :unlet is not compiled.
Solution:   Implement :unlet instruction and check for errors.
2020-04-19 16:28:59 +02:00
Bram Moolenaar
d3aac2917d patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Problem:    Vim9: cannot read or write w:, t: and b: variables.
Solution:   Implement load and store for w:, t: and b: variables.
            (closes #5950)
2020-04-19 14:32:17 +02:00
Bram Moolenaar
a26b9700d7 patch 8.2.0595: Vim9: not all commands using ends_excmd() tested
Problem:    Vim9: not all commands using ends_excmd() tested.
Solution:   Find # comment after regular commands. Add more tests.  Report
            error for where it was caused.
2020-04-18 19:53:28 +02:00
Bram Moolenaar
1a2f4bf6c8 patch 8.2.0566: Vim9: variable can be used uninitialized
Problem:    Vim9: variable can be used uninitialized.
Solution:   Jump to after where variable is used.
2020-04-12 23:09:25 +02:00
Bram Moolenaar
23e032523e patch 8.2.0564: Vim9: calling a def function from non-vim9 may fail
Problem:    Vim9: calling a def function from non-vim9 may fail.
Solution:   Convert varargs to a list.
2020-04-12 22:22:31 +02:00
Bram Moolenaar
a80faa8930 patch 8.2.0559: clearing a struct is verbose
Problem:    Clearing a struct is verbose.
Solution:   Define and use CLEAR_FIELD() and CLEAR_POINTER().
2020-04-12 19:37:17 +02:00