Age | Commit message (Collapse) | Author |
|
Problem: proto files need update
Solution: re-generate them
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Vim9: object method funcref not cleaned up after use
Solution: Clean up type stack after using object method funcref,
remove now longer used ISN_DEFEROBJ instrunction
closes: #13360
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: Vim9: no support for funcrefs
Solution: Add support for object/class funcref members
closes: #11981 #12417 #12960 #12324 #13333
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: Vim9: lockvar issues with objects/classes
Solution: fix `get_lhs()` object/class access and avoid `SEGV`,
make error messages more accurate.
- `get_lval()` detects/returns object/class access
- `compile_lock_unlock()` generate code for bare static and obj_arg access
- `do_lock_var()` check lval for `ll_object`/`ll_class` and fail if so.
Details:
- Add `ll_object`/`ll_class`/`ll_oi` to `lval_T`.
- Add `lockunlock_T` to `isn_T` for `is_arg` to specify handling of `lval_root` in `get_lval()`.
- In `get_lval()`, fill in `ll_object`/`ll_class`/`ll_oi` as needed; when no `[idx] or .key`, check lval_root on the way out.
- In `do_lock_var()` check for `ll_object`/`ll_class`; also bullet proof ll_dict case
and give `Dictionay required` if problem. (not needed to avoid lockvar crash anymore)
- In `compile_lock_unlock()` compile for the class variable and func arg cases.
closes: #13174
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
Problem: Vim9: unused static field
Solution: remove it and simplify code
closes: #13220
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: Vim9: function instruction pointer invalidated
Solution: Use the funcref index instead of the instruction pointer
closes: #13178
closes: #13196
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: Vim9: constructor type checking bug
Solution: Fix class constructor regression
closes: #13102
closes: #13113
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
|
|
Problem: Vim9: access to interface statics possible
Solution: Prevent direct access to interface statics
closes: #13007
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
Problem: Vim9 problems with null_objects
Solution: Vim9 improve null_object usage
Fix "xvar == null", where xvar might have been assigned null_object.
Fix compilation failure: "var o2: C = null_object".
closes: #12890
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
|
|
Problem: vim9class constructor argument type checking bug
Solution: fix it
closes: #12816
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
|
|
Problem: :defer may call the wrong method for an object. (Ernie Rael)
Solution: When en object is from a class that extends or implements, figure
out the method to call at runtime. (closes #11910)
|
|
Problem: Calling a method on an interface does not work.
Solution: At runtime figure out what method to call. (closes #11901)
|
|
Problem: Cannot use an object method with :defer. (Ernie Rael)
Solution: Find the object method and generate code to call it.
(closes #11886)
|
|
Problem: Getting interface member does not always work.
Solution: Convert the index on the interface to the index on the object.
(closes #11825)
|
|
Problem: Type error when using "any" type and adding a number to a float.
Solution: Accept both a number and a float. (closes #11753)
|
|
Problem: Class members are not supported yet.
Solution: Add initial support for class members.
|
|
Problem: Default constructor arguments are not optional.
Solution: Use "= v:none" to make constructor arguments optional.
|
|
Problem: In a class object members cannot be initialized.
Solution: Support initializing object members. Make "dissassemble" work on
an object method.
|
|
Problem: Cannot define a method in a class.
Solution: Implement defining an object method. Make calling an object
method work.
|
|
Problem: Vim9 class is not implemented yet.
Solution: Add very basic class support.
|
|
Problem: Cannot specify a time for :echowindow.
Solution: A count can be used to specify the display time. Add
popup_findecho().
|
|
Problem: A closure in a nested loop in a :def function does not work.
Solution: Use an array of loopvars, one per loop level.
|
|
Problem: In a :def function all closures in a loop get the same variables.
Solution: Use a separate list of variables for LOADOUTER and STOREOUTER.
Not copied at end of loop yet.
|
|
Problem: In a :def function all closures in a loop get the same variables.
Solution: When in a loop and a closure refers to a variable declared in the
loop, prepare for making a copy of variables for each closure.
|
|
Problem: The :defer command does not check the function argument count and
types.
Solution: Check the function arguments when adding a deferred function.
|
|
Problem: Cleaning up afterwards can make a function messy.
Solution: Add the :defer command.
|
|
Problem: Vim9: some code is not covered by tests.
Solution: Delete dead code.
|
|
Problem: Vim9: type error for list unpack mentions argument.
Solution: Mention variable. (close #10435)
|
|
Problem: Concatenating more than 2 strings in a :def function is
inefficient.
Solution: Add a count to the CONCAT instruction. (closes #10276)
|
|
Problem: "import autoload" only works with using 'runtimepath'.
Solution: Also support a relative and absolute file name.
|
|
Problem: Vim9: cannot initialize a variable to null_list.
Solution: Give negative count to NEWLIST. (closes #10027)
Also fix inconsistencies in comparing with null values.
|
|
Problem: Vim9: cannot use a recursive call in a nested function. (Sergey
Vlasov)
Solution: Define the funcref before compiling the function. (closes #9989)
|
|
Problem: Vim9: not enough test coverage for executing :def function.
Solution: Add a few more tests. Fix uncovered problem. Remove dead code.
|
|
Problem: Vim9: cannot use a function from an autoload import directly.
Solution: Add the AUTOLOAD instruction to figure out at runtime.
(closes #9620)
|
|
Problem: Vim9: variable declared in for loop not initialzed.
Solution: Always initialze the variable. (closes #9535)
|
|
Problem: Some global functions are only used in one file.
Solution: Make the functions static. (Yegappan Lakshmanan, closes #9492)
|
|
Problem: Vim9: type checking for list and dict lacks information about
declared type.
Solution: Add dv_decl_type and lv_decl_type. Refactor the type stack to
store two types in each entry.
|
|
Problem: Vim9: many local variables are initialized with an instruction.
Solution: Initialize local variables to zero to avoid the instructions.
|
|
Problem: Vim9: codecov struggles with the file size.
Solution: Split vim9compile.c into four files.
|