1
0
forked from aniani/vim

492 Commits

Author SHA1 Message Date
Bram Moolenaar
397a87ac1c patch 8.2.4602: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.  Fix uncovered problem.  Remove dead code.
2022-03-20 21:14:15 +00:00
Bram Moolenaar
6b8c7ba062 patch 8.2.4600: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.  Fix inconsistencies.
2022-03-20 17:46:06 +00:00
Bram Moolenaar
2995e5cf4e patch 8.2.4590: Vim9: range type check has wrong offset
Problem:    Vim9: range type check has wrong offset.
Solution:   Adjust offset for CHECKTYPE.  Remove other type check.
2022-03-18 21:41:47 +00:00
Bram Moolenaar
61efa16932 patch 8.2.4587: Vim9: double free after unpacking a list
Problem:    Vim9: double free after unpacking a list.
Solution:   Make a copy of the value instead of moving it. (closes #9968)
2022-03-18 13:10:48 +00:00
Bram Moolenaar
139575de66 patch 8.2.4575: Vim9: test for profiling still fails
Problem:    Vim9: test for profiling still fails.
Solution:   Update flags for profiling and breakpoints when obtaining the
            compile type.  Do not set the FC_CLOSURE flag for a toplevel
            function.
2022-03-15 19:29:30 +00:00
Bram Moolenaar
96923b7a14 patch 8.2.4573: a nested function is compiled for debugging without context
Problem:    A nested function (closure) is compiled for debugging without
            context.
Solution:   Check if a nested function is marked for debugging before
            compiling it.  Give an error when trying to compile a closure
            without its context. (closes #9951)
2022-03-15 15:57:04 +00:00
Bram Moolenaar
e406ff87c8 patch 8.2.4541: Crash in debugger when a variable is not available
Problem:    Crash in debugger when a variable is not available in the current
            block.
Solution:   Check for a NULL name. (closes #9926)
2022-03-10 20:47:43 +00:00
Bram Moolenaar
f8691004b0 patch 8.2.4534: Vim9: "is" operator with empty string and null returns true
Problem:    Vim9: "is" operator with empty string and null returns true.
Solution:   Consider empty string and null to be different for "is".
2022-03-10 12:20:53 +00:00
Bram Moolenaar
8acb9cc620 patch 8.2.4526: Vim9: cannot set variables to a null value
Problem:    Vim9: cannot set variables to a null value.
Solution:   Add null_list, null_job, etc.
2022-03-08 13:18:55 +00:00
Bram Moolenaar
7a22224875 patch 8.2.4487: Vim9: cannot compare with v:null
Problem:    Vim9: cannot compare with v:null.
Solution:   Allow comparing anything with v:null. (closes #9866)
2022-03-01 19:23:24 +00:00
Bram Moolenaar
1983f1aa31 patch 8.2.4484: Vim9: some error messages are not tested
Problem:    Vim9: some error messages are not tested.
Solution:   Add a few more test cases.  Delete dead code.
2022-02-28 20:55:02 +00:00
Bram Moolenaar
fe73255c92 patch 8.2.4446: Vim9: cannot refer to a global function like a local one
Problem:    Vim9: cannot refer to a global function like a local one.
Solution:   When g:name is not a variable but a function, use a function
            reference. (closes #9826)
2022-02-22 19:39:13 +00:00
Bram Moolenaar
56acd1f8ed patch 8.2.4413: Vim9: Coverity warns for using NULL pointer
Problem:    Vim9: Coverity warns for using NULL pointer.
Solution:   Give an internal error when funcref function can't be found.
2022-02-18 13:24:52 +00:00
Bram Moolenaar
0c7f2610de patch 8.2.4410: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests. Remove dead code.
2022-02-17 19:44:07 +00:00
Bram Moolenaar
6296d1e60e patch 8.2.4409: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Fix reported line number.
2022-02-17 16:30:11 +00:00
Bram Moolenaar
ea5c898b5f patch 8.2.4408: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Correct error message.  Allow unlet on dict
            with a number key.
2022-02-17 14:42:02 +00:00
Bram Moolenaar
e08be09a08 patch 8.2.4407: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add more tests.  Avoid giving two errors.  Remove dead code.
2022-02-17 13:08:26 +00:00
Bram Moolenaar
cd1cda2f87 patch 8.2.4404: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few specific test cases.
2022-02-16 21:48:25 +00:00
Bram Moolenaar
90a57168a4 patch 8.2.4358: Vim9: line number of exception is not set
Problem:    Vim9: line number of exception is not set.
Solution:   Set the line number before throwing an exception. (closes #9755)
2022-02-12 14:23:17 +00:00
Bram Moolenaar
7aca5ca676 patch 8.2.4322: Vim9: crash when using funcref with closure
Problem:    Vim9: crash when using funcref with closure.
Solution:   Keep a reference to the funcref that has the outer context.
            (closes #9716)
2022-02-07 19:56:43 +00:00
Bram Moolenaar
4e713bafc0 patch 8.2.4319: :put does not work properly in compiled function
Problem:    :put does not work properly in compiled function. (John Beckett)
Solution:   Adjust the direction when using line zero.
2022-02-07 15:31:37 +00:00
Bram Moolenaar
fe1bfc9b26 patch 8.2.4309: Vim9: crash when using a partial in the wrong context
Problem:    Vim9: crash when using a partial in the wrong context.
Solution:   Don't use an NULL outer pointer. (closes #9706)
2022-02-06 13:55:03 +00:00
Bram Moolenaar
381692b6f1 patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()
Problem:    Vim9: strict type checking after copy() and deepcopy().
Solution:   Allow type to change after making a copy. (closes #9644)
2022-02-02 20:01:27 +00:00
Bram Moolenaar
70c43d84be patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def function
Problem:    Vim9: depth argument of :lockvar not parsed in :def function.
Solution:   Parse the optional depth argument. (closes #9629)
            Fix that locking doesn't work for a non-materialize list.
2022-01-26 21:01:15 +00:00
Bram Moolenaar
06b77229ca patch 8.2.4216: Vim9: cannot use a function from an autoload import directly
Problem:    Vim9: cannot use a function from an autoload import directly.
Solution:   Add the AUTOLOAD instruction to figure out at runtime.
            (closes #9620)
2022-01-25 15:51:56 +00:00
Bram Moolenaar
058ee7c569 patch 8.2.4198: Vim9: the switch for executing instructions is too long
Problem:    Vim9: the switch for executing instructions is too long.
Solution:   Move some code to separate functions.
2022-01-23 20:00:42 +00:00
Bram Moolenaar
d02dce2bb5 patch 8.2.4137: Vim9: calling import with and without method is inconsistent
Problem:    Vim9: calling import with and without method is inconsistent.
Solution:   Set a flag that a parenthsis follows to compile_load_scriptvar().
            Add some more tests.  Improve error message.
2022-01-18 17:43:04 +00:00
Bram Moolenaar
cbbc48f64b patch 8.2.4131: Vim9: calling function in autoload import does not work
Problem:    Vim9: calling function in autoload import does not work in a :def
            function.
Solution:   When a variable is not found and a PCALL follows use a funcref.
            (closes #9550)
2022-01-18 12:58:28 +00:00
Bram Moolenaar
d9d2fd0aa3 patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
Problem:    "cctx" argument of find_func_even_dead() is unused.
Solution:   Remove the argument.
2022-01-13 21:15:21 +00:00
Bram Moolenaar
d041f4208b patch 8.2.4072: Vim9: compiling function fails when autoload is not loaded
Problem:    Vim9: compiling function fails when autoload script is not loaded
            yet.
Solution:   Depend on runtime loading.
2022-01-12 19:54:00 +00:00
Bram Moolenaar
04935fb17e patch 8.2.4043: using int for second argument of ga_init2()
Problem:    Using int for second argument of ga_init2().
Solution:   Remove unnessary type cast (int) when using sizeof().
2022-01-08 16:19:22 +00:00
Bram Moolenaar
1433672568 patch 8.2.4042: Vim9: build error
Problem:    Vim9: build error.
Solution:   Use grow array instead of character pointer.
2022-01-08 16:02:59 +00:00
Bram Moolenaar
d5f400c607 patch 8.2.4019: Vim9: import mechanism is too complicated
Problem:    Vim9: import mechanism is too complicated.
Solution:   Do not use the Javascript mechanism but a much simpler one.
2022-01-06 21:10:28 +00:00
Bram Moolenaar
1f4a3457a3 patch 8.2.3974: Vim9: LISTAPPEND instruction does not check for a locked list
Problem:    Vim9: LISTAPPEND instruction does not check for a locked list.
Solution:   Check whether the list is locked. (closes #9452)
2022-01-01 18:29:21 +00:00
Bram Moolenaar
74409f6279 patch 8.2.3970: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2022-01-01 15:58:22 +00:00
Bram Moolenaar
460ae5dfca patch 8.2.3967: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2022-01-01 14:19:49 +00:00
Bram Moolenaar
436b5adc97 patch 8.2.3961: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2021-12-31 22:49:24 +00:00
Dominique Pelle
af4a61a85d patch 8.2.3914: various spelling mistakes in comments
Problem:    Various spelling mistakes in comments.
Solution:   Fix the mistakes. (Dominique Pellé, closes #9416)
2021-12-27 17:21:41 +00:00
Bram Moolenaar
9c23f9bb5f patch 8.2.3902: Vim9: double free with nested :def function
Problem:    Vim9: double free with nested :def function.
Solution:   Pass "line_to_free" from compile_def_function() and make sure
            cmdlinep is valid.
2021-12-26 14:23:22 +00:00
Bram Moolenaar
5cd647935d patch 8.2.3893: Vim9: many local variables are initialized with an instruction
Problem:    Vim9: many local variables are initialized with an instruction.
Solution:   Initialize local variables to zero to avoid the instructions.
2021-12-25 18:23:24 +00:00
Bram Moolenaar
310091d20f patch 8.2.3878: Vim9: debugger tries to read more lines than there are
Problem:    Vim9: debugger tries to read more lines than there are.
Solution:   Check the number of lines. (closes #9394)
2021-12-23 21:14:37 +00:00
Bram Moolenaar
0d807107b6 patch 8.2.3865: Vim9: compiler complains about using "try" as a struct member
Problem:    Vim9: compiler complains about using "try" as a struct member.
Solution:   Rename "try" to "tryref".
2021-12-21 09:42:09 +00:00
Bram Moolenaar
dc7c366f3a patch 8.2.3860: Vim9: codecov struggles with the file size
Problem:    Vim9: codecov struggles with the file size.
Solution:   Split vim9compile.c into four files.
2021-12-20 15:04:29 +00:00
Bram Moolenaar
265f811f5a patch 8.2.3851: Vim9: overhead when comparing string, dict or function
Problem:    Vim9: overhead when comparing string, dict or function.
Solution:   Call the intented compare function directly.  Refactor to avoid
            duplicated code.
2021-12-19 12:33:05 +00:00
Bram Moolenaar
422085f1c8 patch 8.2.3842: Vim9: can change locked list and list items
Problem:    Vim9: can change locked list and list items.
Solution:   Check that a list and list item isn't locked.
2021-12-17 20:36:15 +00:00
Bram Moolenaar
71b7685092 patch 8.2.3841: Vim9: outdated TODO items, disabled tests that work
Problem:    Vim9: outdated TODO items, disabled tests that work.
Solution:   Remove TODO items, run tests that work now.  Check that a dict
            item isn't locked.
2021-12-17 20:15:38 +00:00
Bram Moolenaar
e124204c4f patch 8.2.3830: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2021-12-16 20:56:57 +00:00
Bram Moolenaar
7509ad8b0f patch 8.2.3809: Vim9: crash when garbage collecting a nested partial
Problem:    Vim9: crash when garbage collecting a nested partial. (Virginia
            Senioria)
Solution:   Set references in all the funcstacks. (closes #9348)
2021-12-14 18:14:37 +00:00
Bram Moolenaar
919c12c19a patch 8.2.3808: Vim9: obsolete TODO items
Problem:    Vim9: obsolete TODO items
Solution:   Remove the comments.
2021-12-14 14:29:16 +00:00
Bram Moolenaar
851f86b951 patch 8.2.3796: the funcexe_T struct members are not named consistently
Problem:    The funcexe_T struct members are not named consistently.
Solution:   Prefix "fe_" to all the members.
2021-12-13 14:26:44 +00:00