1
0
forked from aniani/vim

745 Commits

Author SHA1 Message Date
Bram Moolenaar
4afa77419f patch 8.2.2516: test failure on s390
Problem:    Test failure on s390. (analyses by James McCoy)
Solution:   Only set the try_finally label when not skipping.
2021-02-14 16:34:59 +01:00
Bram Moolenaar
c150c09ec4 patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Problem:    Vim9: :continue does not work correctly in a :try block
Solution:   Add the TRYCLEANUP instruction. (closes #7827)
2021-02-13 15:02:46 +01:00
Bram Moolenaar
44ec21c467 patch 8.2.2504: Vim9: crash when using an argument from a closure
Problem:    Vim9: crash when using an argument from a closure.
Solution:   Check if gen_load_outer is NULL. (closes #7821)
2021-02-12 21:50:57 +01:00
Bram Moolenaar
f785aa1354 patch 8.2.2501: not always clear where an error is reported
Problem:    Not always clear where an error is reported.
Solution:   Add the where_T structure and pass it around. (closes #7796)
2021-02-11 21:19:34 +01:00
Bram Moolenaar
ba98fb54ae patch 8.2.2486: Vim9: some errors for white space do not show context
Problem:    Vim9: some errors for white space do not show context.
Solution:   Include the text at the error.
2021-02-07 18:06:29 +01:00
Bram Moolenaar
6628b7ebff patch 8.2.2483: Vim9: type error for misformed expression
Problem:    Vim9: type error for misformed expression.
Solution:   Check for end of command before checking type. (closes #7795)
2021-02-07 16:33:35 +01:00
Bram Moolenaar
c3fc75db02 patch 8.2.2480: Vim9: some errors for white space do not show context
Problem:    Vim9: some errors for white space do not show context.
Solution:   Include the text at the error.
2021-02-07 15:28:09 +01:00
Bram Moolenaar
fc1dafa91c patch 8.2.2460: Coverity warns for unused value
Problem:    Coverity warns for unused value.
Solution:   Do not reset the return value to OK.
2021-02-03 19:57:00 +01:00
Bram Moolenaar
2e5910bfbb patch 8.2.2455: Vim9: key type for literal dict and indexing is inconsistent
Problem:    Vim9: key type that can be used for literal dict and indexing is
            inconsistent.
Solution:   Allow using number and bool as key for a literal dict. (#7771)
2021-02-03 17:41:24 +01:00
Bram Moolenaar
3b69006973 patch 8.2.2449: Vim9: flatten() always changes the list type
Problem:    Vim9: flatten() always changes the list type.
Solution:   Disallow using flatten() and add flattennew().
2021-02-01 20:14:51 +01:00
Bram Moolenaar
e507ff15d5 patch 8.2.2444: Vim9: compile error with combination of operator and list
Problem:    Vim9: compile error with combination of operator and list.
Solution:   Generate constants before parsing a list or dict. (closes #7757)
2021-01-31 21:47:42 +01:00
Bram Moolenaar
e5ea346a07 patch 8.2.2409: Vim9: profiling only works for one function
Problem:    Vim9: profiling only works for one function.
Solution:   Select the right instructions when calling and returning.
            (closes #7743)
2021-01-25 21:01:48 +01:00
Bram Moolenaar
c05fe07529 patch 8.2.2406: Vim9: profiled :def function leaks memory
Problem:    Vim9: profiled :def function leaks memory.
Solution:   Delete the profiled instructions.
2021-01-24 21:30:48 +01:00
Bram Moolenaar
107e9cecf7 patch 8.2.2404: Vim9: profiling try/catch not correct
Problem:    Vim9: profiling try/catch not correct.
Solution:   Add profile instructions.  Fix that "entry" did not rethrow an
            excpetion.
2021-01-24 20:52:00 +01:00
Bram Moolenaar
ced68a0070 patch 8.2.2403: Vim9: profiling if/elseif/endif not correct
Problem:    Vim9: profiling if/elseif/endif not correct.
Solution:   Add profile instructions.  Fix that "elseif" was wrong.
2021-01-24 17:53:47 +01:00
Bram Moolenaar
f002a41d12 patch 8.2.2401: build fails without +profiling feature
Problem:    Build fails without +profiling feature.
Solution:   Add #ifdefs.
2021-01-24 13:34:18 +01:00
Bram Moolenaar
b204990346 patch 8.2.2400: Vim9: compiled functions are not profiled
Problem:    Vim9: compiled functions are not profiled.
Solution:   Add initial changes to profile compiled functions.  Fix that a
            script-local function was hard to debug.
2021-01-24 12:53:53 +01:00
Bram Moolenaar
b3005ce191 patch 8.2.2390: Vim9: using positive offset is unexpected
Problem:    Vim9: using positive offset is unexpected.
Solution:   Use int8_T instead of char. (James McCoy)
2021-01-22 17:51:06 +01:00
Bram Moolenaar
9b6344613e patch 8.2.2389: test failure on a few systems
Problem:    Test failure on a few systems.
Solution:   Avoid that "char" value is negative.
2021-01-21 22:53:38 +01:00
Bram Moolenaar
e32e516dfa patch 8.2.2387: runtime type check does not mention argument index
Problem:    Runtime type check does not mention argument index.
Solution:   Add ct_arg_idx. (closes #7720)
2021-01-21 20:21:29 +01:00
Bram Moolenaar
c5f59fab23 patch 8.2.2381: Vim9: divide by zero does not abort expression execution
Problem:    Vim9: divide by zero does not abort expression execution.
Solution:   Use a "failed" flag. (issue #7704)
2021-01-21 12:34:14 +01:00
Bram Moolenaar
e64f83cc6a patch 8.2.2376: Vim9: crash when dividing by zero in compiled code
Problem:    Vim9: crash when dividing by zero in compiled code using
            constants.
Solution:   Call num_divide() and num_modulus(). (closes #7704)
2021-01-19 22:16:41 +01:00
Bram Moolenaar
f30a14db3b patch 8.2.2373: Vim9: list assignment only accepts a number index
Problem:    Vim9: list assignment only accepts a number index.
Solution:   Accept "any" and do a runtime type check. (closes #7694)
2021-01-17 21:51:24 +01:00
Bram Moolenaar
036d07144e patch 8.2.2371: Vim9: crash when using types in :for with unpack
Problem:    Vim9: crash when using types in :for with unpack.
Solution:   Check for skip_var_list() failing. Pass include_type to
            skip_var_one(). Skip type when compiling. (closes #7694)
2021-01-17 20:23:38 +01:00
Bram Moolenaar
351ead09dd patch 8.2.2362: Vim9: check of builtin function argument type is incomplete
Problem:    Vim9: check of builtin function argument type is incomplete.
Solution:   Use need_type() instead of check_arg_type().
2021-01-16 16:07:01 +01:00
Bram Moolenaar
2415669348 patch 8.2.2349: Vim9: cannot handle line break after parenthesis at line end
Problem:    Vim9: cannot handle line break after parenthesis at line end.
Solution:   Skip over line break. (closes #7677)
2021-01-14 20:35:49 +01:00
Bram Moolenaar
7cd24227c0 patch 8.2.2335: Vim9: "silent return" does not restore command modifiers
Problem:    Vim9: "silent return" does not restore command modifiers.
Solution:   Resture command modifiers before returning. (closes #7649)
2021-01-12 18:58:39 +01:00
Bram Moolenaar
082517570d patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
Problem:    Vim9: wrong error when modifying dict declared with :final.
Solution:   Do not check for writable variable when an index follows.
            (closes #7657)
2021-01-11 21:20:18 +01:00
Bram Moolenaar
9e1d9e3473 patch 8.2.2330: Vim9: crash when using :trow in a not executed block
Problem:    Vim9: crash when using :trow in a not executed block.
Solution:   Don't generate the instruction when skipping. (closes #7659)
2021-01-11 20:17:34 +01:00
Bram Moolenaar
75ab91ff34 patch 8.2.2325: Vim9: crash if map() changes the item type
Problem:    Vim9: crash if map() changes the item type.
Solution:   Check that the item type is still OK. (closes #7652)
            Fix problem with mapnew() on range list.
2021-01-10 22:42:50 +01:00
Bram Moolenaar
31a11b942a patch 8.2.2323: Vim9: error when inferring type from empty dict/list
Problem:    Vim9: error when inferring type from empty dict/list.
Solution:   When the member is t_unknown use t_any. (closes #7009)
2021-01-10 19:23:27 +01:00
Bram Moolenaar
ab360526ef patch 8.2.2321: Vim9: cannot nest closures
Problem:    Vim9: cannot nest closures.
Solution:   Add the nesting level to ISN_LOADOUTER and ISN_STOREOUTER.
            (closes #7150, closes #7635)
2021-01-10 14:02:28 +01:00
Bram Moolenaar
657137ca48 patch 8.2.2319: "exptype_T" can be read as "expected type"
Problem:    "exptype_T" can be read as "expected type".
Solution:   Rename to "exprtype_T", expression type.
2021-01-09 15:45:23 +01:00
Bram Moolenaar
299f3036ec patch 8.2.2314: Vim9: returning zero takes two instructions
Problem:    Vim9: returning zero takes two instructions.
Solution:   Add ISN_RETURN_ZERO.
2021-01-08 20:53:09 +01:00
Bram Moolenaar
17126b1396 patch 8.2.2311: Vim9: cannot assign to variable that shadows command modifier
Problem:    Vim9: cannot assign to a variable that shadows a command modifier.
Solution:   Check for assignment after possible command modifier.
            (closes #7632)
2021-01-07 22:03:02 +01:00
Bram Moolenaar
328eac2b5d patch 8.2.2308: Vim9: no error when assigning lambda to funcref
Problem:    Vim9: no error when assigning lambda to funcref without return
            value.
Solution:   Default return value to "any". (closes #7629)
2021-01-07 19:23:08 +01:00
Bram Moolenaar
32b3f82010 patch 8.2.2306: Vim9: when using function reference type is not checked
Problem:    Vim9: when using function reference type is not checked.
Solution:   When using a function reference lookup the type and check the
            argument types. (issue #7629)
2021-01-06 21:59:39 +01:00
Bram Moolenaar
b23279d7a2 patch 8.2.2305: Vim9: "++var" and "--var" are silently accepted
Problem:    Vim9: "++var" and "--var" are silently accepted.
Solution:   Give an error message.
2021-01-05 22:08:20 +01:00
Bram Moolenaar
ecac591cce patch 8.2.2303: Vim9: backtick expansion doesn't work for :foldopen
Problem:    Vim9: backtick expansion doesn't work for :foldopen.
Solution:   Do recognize backtick expansion. (closes #7621)
2021-01-05 19:23:28 +01:00
Bram Moolenaar
752fc692ac patch 8.2.2301: Vim9: cannot unlet a dict or list item
Problem:    Vim9: cannot unlet a dict or list item.
Solution:   Add ISN_UNLETINDEX.  Refactor assignment code to use for unlet.
2021-01-04 21:57:11 +01:00
Bram Moolenaar
d62d87d8f3 patch 8.2.2300: Vim9: wrong order on type stack when using dict
Problem:    Vim9: wrong order on type stack when using dict.
Solution:   Generate constants before a dict. (closes #7619)
2021-01-04 17:40:12 +01:00
Bram Moolenaar
d1510ee946 patch 8.2.2299: Vim9: invalid memory access making error message flaky
Problem:    Vim9: invalid memory access making error message flaky.
Solution:   Do not check cmd_argt for CMD_USER. (issue #7467)
2021-01-04 16:15:58 +01:00
Bram Moolenaar
d93a7fc1a9 patch 8.2.2295: incsearch does not detect empty pattern properly
Problem:    Incsearch does not detect empty pattern properly.
Solution:   Return magic state when skipping over a pattern. (Christian
            Brabandt, closes #7612, closes #6420)
2021-01-04 12:42:13 +01:00
Bram Moolenaar
6797782127 patch 8.2.2291: Vim9: cannot use "null" for v:null
Problem:    Vim9: cannot use "null" for v:null.
Solution:   Support "null" like "true" and "false". (closes #7495)
2021-01-03 21:53:53 +01:00
Bram Moolenaar
2ef951dd31 patch 8.2.2290: Vim9: unlet of global variable cannot be compiled
Problem:    Vim9: unlet of global variable cannot be compiled.
Solution:   Skip over variables that might be defined later. Give an error if
            a subscript is found. (closes #7585)
2021-01-03 20:55:26 +01:00
Bram Moolenaar
5afd081cd3 patch 8.2.2288: Vim9: line break and comment not always skipped
Problem:    Vim9: line break and comment not always skipped.
Solution:   Skip over white space and then line break more consistently.
            (closes #7610)
2021-01-03 18:33:13 +01:00
Bram Moolenaar
a11919fa44 patch 8.2.2281: Vim9: compiled "wincmd" cannot be followed by bar
Problem:    Vim9: compiled "wincmd" cannot be followed by bar.
Solution:   Check for bar after "wincmd". (closes #7599)
2021-01-02 19:44:56 +01:00
Bram Moolenaar
508b5618ec patch 8.2.2279: Vim9: memory leak with catch in skipped block
Problem:    Vim9: memory leak with catch in skipped block.
Solution:   Free the pattern if not used.
2021-01-02 18:17:26 +01:00
Bram Moolenaar
aa210a3aec patch 8.2.2272: Vim9: extend() can violate the type of a variable
Problem:    Vim9: extend() can violate the type of a variable.
Solution:   Add the type to the dictionary or list and check items against it.
            (closes #7593)
2021-01-02 15:41:03 +01:00
Bram Moolenaar
3862ea3f62 patch 8.2.2268: Vim9: list unpack seen as declaration
Problem:    Vim9: list unpack seen as declaration.
Solution:   Check for "var". (closes #7594)
2021-01-01 21:05:55 +01:00