Mercurial > vim
annotate src/vim9.h @ 24689:2e6cc2bf37d8 v8.2.2883
patch 8.2.2883: MS-Windows manifest file name is misleading
Commit: https://github.com/vim/vim/commit/e97c7c962ca0fd7cad0d157f1762eb5cc5887fca
Author: matveyt <matthewtarasov@gmail.com>
Date: Mon May 24 18:48:27 2021 +0200
patch 8.2.2883: MS-Windows manifest file name is misleading
Problem: MS-Windows manifest file name is misleading.
Solution: Rename the file. (closes https://github.com/vim/vim/issues/8241)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 24 May 2021 19:00:04 +0200 |
parents | 668df21d8bc6 |
children | 7c1375eb1636 |
rev | line source |
---|---|
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 * |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 * VIM - Vi IMproved by Bram Moolenaar |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 * |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 * Do ":help uganda" in Vim to read copying and usage conditions. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 * Do ":help credits" in Vim to see a list of people who contributed. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 * See README.txt for an overview of the Vim source code. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 */ |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 /* |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
11 * vim9.h: types and globals used for Vim9 script. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 */ |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 typedef enum { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 ISN_EXEC, // execute Ex command line isn_arg.string |
20170
0612c64a2b87
patch 8.2.0640: Vim9: expanding does not work
Bram Moolenaar <Bram@vim.org>
parents:
20142
diff
changeset
|
16 ISN_EXECCONCAT, // execute Ex command from isn_arg.number items on stack |
24645
668df21d8bc6
patch 8.2.2861: Vim9: "legacy return" is not recognized as a return statement
Bram Moolenaar <Bram@vim.org>
parents:
24606
diff
changeset
|
17 ISN_LEGACY_EVAL, // evaluate expression isn_arg.string with legacy syntax. |
19528
3b026343f398
patch 8.2.0321: Vim9: ":execute" does not work yet
Bram Moolenaar <Bram@vim.org>
parents:
19334
diff
changeset
|
18 ISN_ECHO, // echo isn_arg.echo.echo_count items on top of stack |
3b026343f398
patch 8.2.0321: Vim9: ":execute" does not work yet
Bram Moolenaar <Bram@vim.org>
parents:
19334
diff
changeset
|
19 ISN_EXECUTE, // execute Ex commands isn_arg.number items on top of stack |
20142
fe8d0a4344df
patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script
Bram Moolenaar <Bram@vim.org>
parents:
20099
diff
changeset
|
20 ISN_ECHOMSG, // echo Ex commands isn_arg.number items on top of stack |
fe8d0a4344df
patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script
Bram Moolenaar <Bram@vim.org>
parents:
20099
diff
changeset
|
21 ISN_ECHOERR, // echo Ex commands isn_arg.number items on top of stack |
23156
6aa8ddf7a3fa
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Bram Moolenaar <Bram@vim.org>
parents:
22975
diff
changeset
|
22 ISN_RANGE, // compute range from isn_arg.string, push to stack |
24488
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
23 ISN_SUBSTITUTE, // :s command with expression |
24606
a4fda40e0bb9
patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
24590
diff
changeset
|
24 ISN_INSTR, // instructions compiled from expression |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 // get and set variables |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 ISN_LOAD, // push local variable isn_arg.number |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 ISN_LOADV, // push v: variable isn_arg.number |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
29 ISN_LOADG, // push g: variable isn_arg.string |
23233
657216220293
patch 8.2.2162: Vim9: Cannot load or store autoload variables
Bram Moolenaar <Bram@vim.org>
parents:
23229
diff
changeset
|
30 ISN_LOADAUTO, // push g: autoload variable isn_arg.string |
20089
7fc5d62fe2a5
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Bram Moolenaar <Bram@vim.org>
parents:
19964
diff
changeset
|
31 ISN_LOADB, // push b: variable isn_arg.string |
7fc5d62fe2a5
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Bram Moolenaar <Bram@vim.org>
parents:
19964
diff
changeset
|
32 ISN_LOADW, // push w: variable isn_arg.string |
7fc5d62fe2a5
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Bram Moolenaar <Bram@vim.org>
parents:
19964
diff
changeset
|
33 ISN_LOADT, // push t: variable isn_arg.string |
21399
5cb6e676defd
patch 8.2.1250: Vim9: cannot use the g:, b:, t: and w: namespaces
Bram Moolenaar <Bram@vim.org>
parents:
21393
diff
changeset
|
34 ISN_LOADGDICT, // push g: dict |
5cb6e676defd
patch 8.2.1250: Vim9: cannot use the g:, b:, t: and w: namespaces
Bram Moolenaar <Bram@vim.org>
parents:
21393
diff
changeset
|
35 ISN_LOADBDICT, // push b: dict |
5cb6e676defd
patch 8.2.1250: Vim9: cannot use the g:, b:, t: and w: namespaces
Bram Moolenaar <Bram@vim.org>
parents:
21393
diff
changeset
|
36 ISN_LOADWDICT, // push w: dict |
5cb6e676defd
patch 8.2.1250: Vim9: cannot use the g:, b:, t: and w: namespaces
Bram Moolenaar <Bram@vim.org>
parents:
21393
diff
changeset
|
37 ISN_LOADTDICT, // push t: dict |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
38 ISN_LOADS, // push s: variable isn_arg.loadstore |
23557
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
39 ISN_LOADOUTER, // push variable from outer scope isn_arg.outer |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 ISN_LOADSCRIPT, // push script-local variable isn_arg.script. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 ISN_LOADOPT, // push option isn_arg.string |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 ISN_LOADENV, // push environment variable isn_arg.string |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 ISN_LOADREG, // push register isn_arg.number |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 ISN_STORE, // pop into local variable isn_arg.number |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
46 ISN_STOREV, // pop into v: variable isn_arg.number |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
47 ISN_STOREG, // pop into global variable isn_arg.string |
23233
657216220293
patch 8.2.2162: Vim9: Cannot load or store autoload variables
Bram Moolenaar <Bram@vim.org>
parents:
23229
diff
changeset
|
48 ISN_STOREAUTO, // pop into global autoload variable isn_arg.string |
20089
7fc5d62fe2a5
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Bram Moolenaar <Bram@vim.org>
parents:
19964
diff
changeset
|
49 ISN_STOREB, // pop into buffer-local variable isn_arg.string |
7fc5d62fe2a5
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Bram Moolenaar <Bram@vim.org>
parents:
19964
diff
changeset
|
50 ISN_STOREW, // pop into window-local variable isn_arg.string |
7fc5d62fe2a5
patch 8.2.0600: Vim9: cannot read or write w:, t: and b: variables
Bram Moolenaar <Bram@vim.org>
parents:
19964
diff
changeset
|
51 ISN_STORET, // pop into tab-local variable isn_arg.string |
19912
d4fa9db88d16
patch 8.2.0512: Vim9: no optional arguments in func type
Bram Moolenaar <Bram@vim.org>
parents:
19864
diff
changeset
|
52 ISN_STORES, // pop into script variable isn_arg.loadstore |
23557
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
53 ISN_STOREOUTER, // pop variable into outer scope isn_arg.outer |
19912
d4fa9db88d16
patch 8.2.0512: Vim9: no optional arguments in func type
Bram Moolenaar <Bram@vim.org>
parents:
19864
diff
changeset
|
54 ISN_STORESCRIPT, // pop into script variable isn_arg.script |
20295
bc2c9ea94ec1
patch 8.2.0703: Vim9: closure cannot store value in outer context
Bram Moolenaar <Bram@vim.org>
parents:
20257
diff
changeset
|
55 ISN_STOREOPT, // pop into option isn_arg.string |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
56 ISN_STOREENV, // pop into environment variable isn_arg.string |
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
57 ISN_STOREREG, // pop into register isn_arg.number |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 // ISN_STOREOTHER, // pop into other script variable isn_arg.other. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 |
19597
1098989a90ee
patch 8.2.0355: Vim9: str_val is confusing, it's a number
Bram Moolenaar <Bram@vim.org>
parents:
19566
diff
changeset
|
60 ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx |
23266
00f7cd9b6033
patch 8.2.2179: Vim9: crash when indexing a dict with a number
Bram Moolenaar <Bram@vim.org>
parents:
23233
diff
changeset
|
61 ISN_STOREINDEX, // store into list or dictionary, type isn_arg.vartype, |
00f7cd9b6033
patch 8.2.2179: Vim9: crash when indexing a dict with a number
Bram Moolenaar <Bram@vim.org>
parents:
23233
diff
changeset
|
62 // value/index/variable on stack |
24434
602e528a8e43
patch 8.2.2757: Vim9: blob tests for legacy and Vim9 script are separate
Bram Moolenaar <Bram@vim.org>
parents:
24432
diff
changeset
|
63 ISN_STORERANGE, // store into blob, |
602e528a8e43
patch 8.2.2757: Vim9: blob tests for legacy and Vim9 script are separate
Bram Moolenaar <Bram@vim.org>
parents:
24432
diff
changeset
|
64 // value/index 1/index 2/variable on stack |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
65 |
20091
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
66 ISN_UNLET, // unlet variable isn_arg.unlet.ul_name |
20099
058b41f85bcb
patch 8.2.0605: Vim9: cannot unlet an environment variable
Bram Moolenaar <Bram@vim.org>
parents:
20091
diff
changeset
|
67 ISN_UNLETENV, // unlet environment variable isn_arg.unlet.ul_name |
23517
36bf9a6fbd4c
patch 8.2.2301: Vim9: cannot unlet a dict or list item
Bram Moolenaar <Bram@vim.org>
parents:
23460
diff
changeset
|
68 ISN_UNLETINDEX, // unlet item of list or dict |
23982
9fcd71d0db89
patch 8.2.2533: Vim9: cannot use a range with :unlet
Bram Moolenaar <Bram@vim.org>
parents:
23970
diff
changeset
|
69 ISN_UNLETRANGE, // unlet items of list |
20091
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
70 |
22272
eb1f5f618c75
patch 8.2.1685: Vim9: cannot declare a constant value
Bram Moolenaar <Bram@vim.org>
parents:
22176
diff
changeset
|
71 ISN_LOCKCONST, // lock constant value |
eb1f5f618c75
patch 8.2.1685: Vim9: cannot declare a constant value
Bram Moolenaar <Bram@vim.org>
parents:
22176
diff
changeset
|
72 |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
73 // constants |
19558
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
74 ISN_PUSHNR, // push number isn_arg.number |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
75 ISN_PUSHBOOL, // push bool value isn_arg.number |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
76 ISN_PUSHSPEC, // push special value isn_arg.number |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
77 ISN_PUSHF, // push float isn_arg.fnumber |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
78 ISN_PUSHS, // push string isn_arg.string |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
79 ISN_PUSHBLOB, // push blob isn_arg.blob |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
80 ISN_PUSHFUNC, // push func isn_arg.string |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
81 ISN_PUSHCHANNEL, // push channel isn_arg.channel |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
82 ISN_PUSHJOB, // push channel isn_arg.job |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
83 ISN_NEWLIST, // push list from stack items, size is isn_arg.number |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
84 ISN_NEWDICT, // push dict from stack items, size is isn_arg.number |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
85 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
86 // function call |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
87 ISN_BCALL, // call builtin function isn_arg.bfunc |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
88 ISN_DCALL, // call def function isn_arg.dfunc |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
89 ISN_UCALL, // call user function or funcref/partial isn_arg.ufunc |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
90 ISN_PCALL, // call partial, use isn_arg.pfunc |
19862
846fbbacce3a
patch 8.2.0487: Vim9: compiling not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19726
diff
changeset
|
91 ISN_PCALL_END, // cleanup after ISN_PCALL with cpf_top set |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
92 ISN_RETURN, // return, result is on top of stack |
23543
f90e429453fd
patch 8.2.2314: Vim9: returning zero takes two instructions
Bram Moolenaar <Bram@vim.org>
parents:
23517
diff
changeset
|
93 ISN_RETURN_ZERO, // Push zero, then return |
20247
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
94 ISN_FUNCREF, // push a function ref to dfunc isn_arg.funcref |
21558
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
95 ISN_NEWFUNC, // create a global function from a lambda function |
22973
4c97c0747017
patch 8.2.2033: Vim9: :def without argument gives compilation error
Bram Moolenaar <Bram@vim.org>
parents:
22703
diff
changeset
|
96 ISN_DEF, // list functions |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
97 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
98 // expression operations |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
99 ISN_JUMP, // jump if condition is matched isn_arg.jump |
24488
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
100 ISN_JUMP_IF_ARG_SET, // jump if argument is already set, uses |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
101 // isn_arg.jumparg |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
102 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
103 // loop |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
104 ISN_FOR, // get next item from a list, uses isn_arg.forloop |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
105 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
106 ISN_TRY, // add entry to ec_trystack, uses isn_arg.try |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
107 ISN_THROW, // pop value of stack, store in v:exception |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
108 ISN_PUSHEXC, // push v:exception |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
109 ISN_CATCH, // drop v:exception |
23994
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
110 ISN_FINALLY, // start of :finally block |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
111 ISN_ENDTRY, // take entry off from ec_trystack |
23927
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
112 ISN_TRYCONT, // handle :continue inside a :try statement |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
113 |
21771
fcf978444298
patch 8.2.1435: Vim9: always converting to string for ".." leads to mistakes
Bram Moolenaar <Bram@vim.org>
parents:
21558
diff
changeset
|
114 // more expression operations |
22633
6589dae9696c
patch 8.2.1865: Vim9: add() does not check type of argument
Bram Moolenaar <Bram@vim.org>
parents:
22494
diff
changeset
|
115 ISN_ADDLIST, // add two lists |
6589dae9696c
patch 8.2.1865: Vim9: add() does not check type of argument
Bram Moolenaar <Bram@vim.org>
parents:
22494
diff
changeset
|
116 ISN_ADDBLOB, // add two blobs |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
117 |
23553
5c094273c015
patch 8.2.2319: "exptype_T" can be read as "expected type"
Bram Moolenaar <Bram@vim.org>
parents:
23543
diff
changeset
|
118 // operation with two arguments; isn_arg.op.op_type is exprtype_T |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
119 ISN_OPNR, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
120 ISN_OPFLOAT, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
121 ISN_OPANY, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
122 |
23553
5c094273c015
patch 8.2.2319: "exptype_T" can be read as "expected type"
Bram Moolenaar <Bram@vim.org>
parents:
23543
diff
changeset
|
123 // comparative operations; isn_arg.op.op_type is exprtype_T, op_ic used |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
124 ISN_COMPAREBOOL, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
125 ISN_COMPARESPECIAL, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
126 ISN_COMPARENR, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
127 ISN_COMPAREFLOAT, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
128 ISN_COMPARESTRING, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
129 ISN_COMPAREBLOB, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
130 ISN_COMPARELIST, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
131 ISN_COMPAREDICT, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
132 ISN_COMPAREFUNC, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
133 ISN_COMPAREANY, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
134 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
135 // expression operations |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
136 ISN_CONCAT, |
21393
320581a133d9
patch 8.2.1247: Vim9: cannot index a character in a string
Bram Moolenaar <Bram@vim.org>
parents:
21232
diff
changeset
|
137 ISN_STRINDEX, // [expr] string index |
21826
ccad66ac6c3e
patch 8.2.1462: Vim9: string slice not supported yet
Bram Moolenaar <Bram@vim.org>
parents:
21771
diff
changeset
|
138 ISN_STRSLICE, // [expr:expr] string slice |
22633
6589dae9696c
patch 8.2.1865: Vim9: add() does not check type of argument
Bram Moolenaar <Bram@vim.org>
parents:
22494
diff
changeset
|
139 ISN_LISTAPPEND, // append to a list, like add() |
21393
320581a133d9
patch 8.2.1247: Vim9: cannot index a character in a string
Bram Moolenaar <Bram@vim.org>
parents:
21232
diff
changeset
|
140 ISN_LISTINDEX, // [expr] list index |
21828
af5db9b6d210
patch 8.2.1463: Vim9: list slice not supported yet
Bram Moolenaar <Bram@vim.org>
parents:
21826
diff
changeset
|
141 ISN_LISTSLICE, // [expr:expr] list slice |
24432
aa150abca273
patch 8.2.2756: Vim9: blob index and slice not implemented yet
Bram Moolenaar <Bram@vim.org>
parents:
24272
diff
changeset
|
142 ISN_BLOBINDEX, // [expr] blob index |
aa150abca273
patch 8.2.2756: Vim9: blob index and slice not implemented yet
Bram Moolenaar <Bram@vim.org>
parents:
24272
diff
changeset
|
143 ISN_BLOBSLICE, // [expr:expr] blob slice |
21833
e3f9528bddda
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
Bram Moolenaar <Bram@vim.org>
parents:
21828
diff
changeset
|
144 ISN_ANYINDEX, // [expr] runtime index |
e3f9528bddda
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
Bram Moolenaar <Bram@vim.org>
parents:
21828
diff
changeset
|
145 ISN_ANYSLICE, // [expr:expr] runtime slice |
20871
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
146 ISN_SLICE, // drop isn_arg.number items from start of list |
22637
4d4042683371
patch 8.2.1867: Vim9: argument to add() not checked for blob
Bram Moolenaar <Bram@vim.org>
parents:
22633
diff
changeset
|
147 ISN_BLOBAPPEND, // append to a blob, like add() |
20859
876e16c48bd1
patch 8.2.0981: Vim9: cannot compile "[var, var] = list"
Bram Moolenaar <Bram@vim.org>
parents:
20349
diff
changeset
|
148 ISN_GETITEM, // push list item, isn_arg.number is the index |
20349
e29b2ec8d4d2
patch 8.2.0730: Vim9: Assignment to dict member does not work
Bram Moolenaar <Bram@vim.org>
parents:
20295
diff
changeset
|
149 ISN_MEMBER, // dict[member] |
e29b2ec8d4d2
patch 8.2.0730: Vim9: Assignment to dict member does not work
Bram Moolenaar <Bram@vim.org>
parents:
20295
diff
changeset
|
150 ISN_STRINGMEMBER, // dict.member using isn_arg.string |
22494
4c21f7f6f9e3
patch 8.2.1795: Vim9: operators && and || have a confusing result
Bram Moolenaar <Bram@vim.org>
parents:
22460
diff
changeset
|
151 ISN_2BOOL, // falsy/truthy to bool, invert if isn_arg.number != 0 |
4c21f7f6f9e3
patch 8.2.1795: Vim9: operators && and || have a confusing result
Bram Moolenaar <Bram@vim.org>
parents:
22460
diff
changeset
|
152 ISN_COND2BOOL, // convert value to bool |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
153 ISN_2STRING, // convert value to string at isn_arg.number on stack |
21771
fcf978444298
patch 8.2.1435: Vim9: always converting to string for ".." leads to mistakes
Bram Moolenaar <Bram@vim.org>
parents:
21558
diff
changeset
|
154 ISN_2STRING_ANY, // like ISN_2STRING but check type |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
155 ISN_NEGATENR, // apply "-" to number |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
156 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
157 ISN_CHECKNR, // check value can be used as a number |
23460
09868c86a97f
patch 8.2.2273: build failure
Bram Moolenaar <Bram@vim.org>
parents:
23362
diff
changeset
|
158 ISN_CHECKTYPE, // check value type is isn_arg.type.ct_type |
20871
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
159 ISN_CHECKLEN, // check list length is isn_arg.checklen.cl_min_len |
23460
09868c86a97f
patch 8.2.2273: build failure
Bram Moolenaar <Bram@vim.org>
parents:
23362
diff
changeset
|
160 ISN_SETTYPE, // set dict type to isn_arg.type.ct_type |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
161 |
22176
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
162 ISN_PUT, // ":put", uses isn_arg.put |
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
163 |
22703
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
164 ISN_CMDMOD, // set cmdmod |
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
165 ISN_CMDMOD_REV, // undo ISN_CMDMOD |
22691
dda110a14be4
patch 8.2.1894: Vim9: command modifiers are not supported
Bram Moolenaar <Bram@vim.org>
parents:
22637
diff
changeset
|
166 |
23717
e3720756acdc
patch 8.2.2400: Vim9: compiled functions are not profiled
Bram Moolenaar <Bram@vim.org>
parents:
23697
diff
changeset
|
167 ISN_PROF_START, // start a line for profiling |
e3720756acdc
patch 8.2.2400: Vim9: compiled functions are not profiled
Bram Moolenaar <Bram@vim.org>
parents:
23697
diff
changeset
|
168 ISN_PROF_END, // end a line for profiling |
e3720756acdc
patch 8.2.2400: Vim9: compiled functions are not profiled
Bram Moolenaar <Bram@vim.org>
parents:
23697
diff
changeset
|
169 |
22975
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
170 ISN_UNPACK, // unpack list into items, uses isn_arg.unpack |
21232
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
171 ISN_SHUFFLE, // move item on stack up or down |
24488
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
172 ISN_DROP, // pop stack and discard value |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
173 |
24490
08050e45bd06
patch 8.2.2785: Vim9: cannot redirect to local variable
Bram Moolenaar <Bram@vim.org>
parents:
24488
diff
changeset
|
174 ISN_REDIRSTART, // :redir => |
08050e45bd06
patch 8.2.2785: Vim9: cannot redirect to local variable
Bram Moolenaar <Bram@vim.org>
parents:
24488
diff
changeset
|
175 ISN_REDIREND, // :redir END, isn_arg.number == 1 for append |
08050e45bd06
patch 8.2.2785: Vim9: cannot redirect to local variable
Bram Moolenaar <Bram@vim.org>
parents:
24488
diff
changeset
|
176 |
24590
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
177 ISN_CEXPR_AUCMD, // first part of :cexpr isn_arg.number is cmdidx |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
178 ISN_CEXPR_CORE, // second part of :cexpr, uses isn_arg.cexpr |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
179 |
24488
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
180 ISN_FINISH // end marker in list of instructions |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
181 } isntype_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
182 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
183 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
184 // arguments to ISN_BCALL |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
185 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
186 int cbf_idx; // index in "global_functions" |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
187 int cbf_argcount; // number of arguments on top of stack |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
188 } cbfunc_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
189 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
190 // arguments to ISN_DCALL |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
191 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
192 int cdf_idx; // index in "def_functions" for ISN_DCALL |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
193 int cdf_argcount; // number of arguments on top of stack |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
194 } cdfunc_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
195 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
196 // arguments to ISN_PCALL |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
197 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
198 int cpf_top; // when TRUE partial is above the arguments |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
199 int cpf_argcount; // number of arguments on top of stack |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
200 } cpfunc_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
201 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
202 // arguments to ISN_UCALL and ISN_XCALL |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
203 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
204 char_u *cuf_name; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
205 int cuf_argcount; // number of arguments on top of stack |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
206 } cufunc_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
207 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
208 typedef enum { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
209 JUMP_ALWAYS, |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
210 JUMP_IF_FALSE, // pop and jump if false |
22494
4c21f7f6f9e3
patch 8.2.1795: Vim9: operators && and || have a confusing result
Bram Moolenaar <Bram@vim.org>
parents:
22460
diff
changeset
|
211 JUMP_AND_KEEP_IF_TRUE, // jump if top of stack is truthy, drop if not |
4c21f7f6f9e3
patch 8.2.1795: Vim9: operators && and || have a confusing result
Bram Moolenaar <Bram@vim.org>
parents:
22460
diff
changeset
|
212 JUMP_AND_KEEP_IF_FALSE, // jump if top of stack is falsy, drop if not |
4c21f7f6f9e3
patch 8.2.1795: Vim9: operators && and || have a confusing result
Bram Moolenaar <Bram@vim.org>
parents:
22460
diff
changeset
|
213 JUMP_IF_COND_TRUE, // jump if top of stack is true, drop if not |
4c21f7f6f9e3
patch 8.2.1795: Vim9: operators && and || have a confusing result
Bram Moolenaar <Bram@vim.org>
parents:
22460
diff
changeset
|
214 JUMP_IF_COND_FALSE, // jump if top of stack is false, drop if not |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
215 } jumpwhen_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
216 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
217 // arguments to ISN_JUMP |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
218 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
219 jumpwhen_T jump_when; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
220 int jump_where; // position to jump to |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
221 } jump_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
222 |
24272
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
223 // arguments to ISN_JUMP_IF_ARG_SET |
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
224 typedef struct { |
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
225 int jump_arg_off; // argument index, negative |
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
226 int jump_where; // position to jump to |
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
227 } jumparg_T; |
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
228 |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
229 // arguments to ISN_FOR |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
230 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
231 int for_idx; // loop variable index |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
232 int for_end; // position to jump to after done |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
233 } forloop_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
234 |
23994
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
235 // indirect arguments to ISN_TRY |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
236 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
237 int try_catch; // position to jump to on throw |
23927
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
238 int try_finally; // :finally or :endtry position to jump to |
23994
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
239 int try_endtry; // :endtry position to jump to |
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
240 } tryref_T; |
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
241 |
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
242 // arguments to ISN_TRY |
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
243 typedef struct { |
3daeb2060f25
patch 8.2.2539: Vim9: return from finally block causes a hang
Bram Moolenaar <Bram@vim.org>
parents:
23982
diff
changeset
|
244 tryref_T *try_ref; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
245 } try_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
246 |
23927
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
247 // arguments to ISN_TRYCONT |
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
248 typedef struct { |
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
249 int tct_levels; // number of nested try statements |
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
250 int tct_where; // position to jump to, WHILE or FOR |
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
251 } trycont_T; |
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
252 |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
253 // arguments to ISN_ECHO |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
254 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
255 int echo_with_white; // :echo instead of :echon |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
256 int echo_count; // number of expressions |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
257 } echo_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
258 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
259 // arguments to ISN_OPNR, ISN_OPFLOAT, etc. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
260 typedef struct { |
23553
5c094273c015
patch 8.2.2319: "exptype_T" can be read as "expected type"
Bram Moolenaar <Bram@vim.org>
parents:
23543
diff
changeset
|
261 exprtype_T op_type; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
262 int op_ic; // TRUE with '#', FALSE with '?', else MAYBE |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
263 } opexpr_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
264 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
265 // arguments to ISN_CHECKTYPE |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
266 typedef struct { |
22284
6b385c2b9ff5
patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expected
Bram Moolenaar <Bram@vim.org>
parents:
22272
diff
changeset
|
267 type_T *ct_type; |
23697
19073a768852
patch 8.2.2390: Vim9: using positive offset is unexpected
Bram Moolenaar <Bram@vim.org>
parents:
23695
diff
changeset
|
268 int8_T ct_off; // offset in stack, -1 is bottom |
19073a768852
patch 8.2.2390: Vim9: using positive offset is unexpected
Bram Moolenaar <Bram@vim.org>
parents:
23695
diff
changeset
|
269 int8_T ct_arg_idx; // argument index or zero |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
270 } checktype_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
271 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
272 // arguments to ISN_STORENR |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
273 typedef struct { |
19597
1098989a90ee
patch 8.2.0355: Vim9: str_val is confusing, it's a number
Bram Moolenaar <Bram@vim.org>
parents:
19566
diff
changeset
|
274 int stnr_idx; |
1098989a90ee
patch 8.2.0355: Vim9: str_val is confusing, it's a number
Bram Moolenaar <Bram@vim.org>
parents:
19566
diff
changeset
|
275 varnumber_T stnr_val; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
276 } storenr_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
277 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
278 // arguments to ISN_STOREOPT |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
279 typedef struct { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
280 char_u *so_name; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
281 int so_flags; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
282 } storeopt_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
283 |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
284 // arguments to ISN_LOADS and ISN_STORES |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
285 typedef struct { |
19912
d4fa9db88d16
patch 8.2.0512: Vim9: no optional arguments in func type
Bram Moolenaar <Bram@vim.org>
parents:
19864
diff
changeset
|
286 char_u *ls_name; // variable name (with s: for ISN_STORES) |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
287 int ls_sid; // script ID |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
288 } loadstore_T; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
289 |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
290 // arguments to ISN_LOADSCRIPT and ISN_STORESCRIPT |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
291 typedef struct { |
23330
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
292 int sref_sid; // script ID |
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
293 int sref_idx; // index in sn_var_vals |
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
294 int sref_seq; // sn_script_seq when compiled |
23362
f181fe2150ab
patch 8.2.2224: Vim9: crash if script reloaded with different variable type
Bram Moolenaar <Bram@vim.org>
parents:
23330
diff
changeset
|
295 type_T *sref_type; // type of the variable when compiled |
23330
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
296 } scriptref_T; |
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
297 |
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
298 typedef struct { |
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
299 scriptref_T *scriptref; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
300 } script_T; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
301 |
20091
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
302 // arguments to ISN_UNLET |
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
303 typedef struct { |
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
304 char_u *ul_name; // variable name with g:, w:, etc. |
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
305 int ul_forceit; // forceit flag |
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
306 } unlet_T; |
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
307 |
20247
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
308 // arguments to ISN_FUNCREF |
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
309 typedef struct { |
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
310 int fr_func; // function index |
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
311 } funcref_T; |
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
312 |
21558
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
313 // arguments to ISN_NEWFUNC |
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
314 typedef struct { |
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
315 char_u *nf_lambda; // name of the lambda already defined |
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
316 char_u *nf_global; // name of the global function to be created |
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
317 } newfunc_T; |
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
318 |
20871
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
319 // arguments to ISN_CHECKLEN |
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
320 typedef struct { |
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
321 int cl_min_len; // minimum length |
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
322 int cl_more_OK; // longer is allowed |
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
323 } checklen_T; |
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
324 |
21232
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
325 // arguments to ISN_SHUFFLE |
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
326 typedef struct { |
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
327 int shfl_item; // item to move (relative to top of stack) |
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
328 int shfl_up; // places to move upwards |
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
329 } shuffle_T; |
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
330 |
22176
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
331 // arguments to ISN_PUT |
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
332 typedef struct { |
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
333 int put_regname; // register, can be NUL |
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
334 linenr_T put_lnum; // line number to put below |
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
335 } put_T; |
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
336 |
22703
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
337 // arguments to ISN_CMDMOD |
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
338 typedef struct { |
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
339 cmdmod_T *cf_cmdmod; // allocated |
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
340 } cmod_T; |
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
341 |
22975
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
342 // arguments to ISN_UNPACK |
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
343 typedef struct { |
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
344 int unp_count; // number of items to produce |
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
345 int unp_semicolon; // last item gets list of remainder |
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
346 } unpack_T; |
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
347 |
23557
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
348 // arguments to ISN_LOADOUTER and ISN_STOREOUTER |
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
349 typedef struct { |
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
350 int outer_idx; // index |
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
351 int outer_depth; // nesting level, stack frames to go up |
23559
64dfb69e7d46
patch 8.2.2322: Vim9: closure nested limiting to one level
Bram Moolenaar <Bram@vim.org>
parents:
23557
diff
changeset
|
352 } isn_outer_T; |
23557
f50ee1ae4d9b
patch 8.2.2321: Vim9: cannot nest closures
Bram Moolenaar <Bram@vim.org>
parents:
23553
diff
changeset
|
353 |
24488
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
354 // arguments to ISN_SUBSTITUTE |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
355 typedef struct { |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
356 char_u *subs_cmd; // :s command |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
357 isn_T *subs_instr; // sequence of instructions |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
358 } subs_T; |
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
359 |
24590
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
360 // indirect arguments to ISN_TRY |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
361 typedef struct { |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
362 int cer_cmdidx; |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
363 char_u *cer_cmdline; |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
364 int cer_forceit; |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
365 } cexprref_T; |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
366 |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
367 // arguments to ISN_CEXPR_CORE |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
368 typedef struct { |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
369 cexprref_T *cexpr_ref; |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
370 } cexpr_T; |
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
371 |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
372 /* |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
373 * Instruction |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
374 */ |
19726
ad37a198a708
patch 8.2.0419: various memory leaks in Vim9 script code
Bram Moolenaar <Bram@vim.org>
parents:
19597
diff
changeset
|
375 struct isn_S { |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
376 isntype_T isn_type; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
377 int isn_lnum; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
378 union { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
379 char_u *string; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
380 varnumber_T number; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
381 blob_T *blob; |
23266
00f7cd9b6033
patch 8.2.2179: Vim9: crash when indexing a dict with a number
Bram Moolenaar <Bram@vim.org>
parents:
23233
diff
changeset
|
382 vartype_T vartype; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
383 #ifdef FEAT_FLOAT |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
384 float_T fnumber; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
385 #endif |
19558
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
386 channel_T *channel; |
8eeec8886c02
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Bram Moolenaar <Bram@vim.org>
parents:
19528
diff
changeset
|
387 job_T *job; |
19566
ec1eeb1b69e2
patch 8.2.0340: Vim9: function and partial types not tested
Bram Moolenaar <Bram@vim.org>
parents:
19558
diff
changeset
|
388 partial_T *partial; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
389 jump_T jump; |
24272
cabed216cc2f
patch 8.2.2677: Vim9: cannot use only some of the default arguments
Bram Moolenaar <Bram@vim.org>
parents:
24218
diff
changeset
|
390 jumparg_T jumparg; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
391 forloop_T forloop; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
392 try_T try; |
23927
5e5780e3f75d
patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Bram Moolenaar <Bram@vim.org>
parents:
23738
diff
changeset
|
393 trycont_T trycont; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
394 cbfunc_T bfunc; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
395 cdfunc_T dfunc; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
396 cpfunc_T pfunc; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
397 cufunc_T ufunc; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
398 echo_T echo; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
399 opexpr_T op; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
400 checktype_T type; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
401 storenr_T storenr; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
402 storeopt_T storeopt; |
19283
9dc843109c97
patch 8.2.0200: Vim9 script commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
19181
diff
changeset
|
403 loadstore_T loadstore; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
404 script_T script; |
20091
a64c16ff98b8
patch 8.2.0601: Vim9: :unlet is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
20089
diff
changeset
|
405 unlet_T unlet; |
20247
e46e72aaff74
patch 8.2.0679: Vim9: incomplete support for closures
Bram Moolenaar <Bram@vim.org>
parents:
20244
diff
changeset
|
406 funcref_T funcref; |
21558
1c4d4aa22b37
patch 8.2.1329: Vim9: cannot define global function inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21399
diff
changeset
|
407 newfunc_T newfunc; |
20871
65d9189d4dca
patch 8.2.0987: Vim9: cannot assign to [var; var]
Bram Moolenaar <Bram@vim.org>
parents:
20859
diff
changeset
|
408 checklen_T checklen; |
21232
3f14e0d4a4dd
patch 8.2.1167: Vim9: builtin function method call only supports first arg
Bram Moolenaar <Bram@vim.org>
parents:
20871
diff
changeset
|
409 shuffle_T shuffle; |
22176
6941d3205be9
patch 8.2.1637: Vim9: :put ={expr} does not work inside :def function
Bram Moolenaar <Bram@vim.org>
parents:
21833
diff
changeset
|
410 put_T put; |
22703
f2bfee4ac356
patch 8.2.1900: Vim9: command modifiers do not work
Bram Moolenaar <Bram@vim.org>
parents:
22691
diff
changeset
|
411 cmod_T cmdmod; |
22975
a943b175586a
patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Bram Moolenaar <Bram@vim.org>
parents:
22973
diff
changeset
|
412 unpack_T unpack; |
23559
64dfb69e7d46
patch 8.2.2322: Vim9: closure nested limiting to one level
Bram Moolenaar <Bram@vim.org>
parents:
23557
diff
changeset
|
413 isn_outer_T outer; |
24488
f293bb501b30
patch 8.2.2784: Vim9: cannot use =expr in :substitute
Bram Moolenaar <Bram@vim.org>
parents:
24434
diff
changeset
|
414 subs_T subs; |
24590
2818f846f099
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Bram Moolenaar <Bram@vim.org>
parents:
24545
diff
changeset
|
415 cexpr_T cexpr; |
24606
a4fda40e0bb9
patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled
Bram Moolenaar <Bram@vim.org>
parents:
24590
diff
changeset
|
416 isn_T *instr; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
417 } isn_arg; |
19726
ad37a198a708
patch 8.2.0419: various memory leaks in Vim9 script code
Bram Moolenaar <Bram@vim.org>
parents:
19597
diff
changeset
|
418 }; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
419 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
420 /* |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
421 * Info about a function defined with :def. Used in "def_functions". |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
422 */ |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
423 struct dfunc_S { |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
424 ufunc_T *df_ufunc; // struct containing most stuff |
23285
112fa621b127
patch 8.2.2188: Vim9: crash when calling global function from :def function
Bram Moolenaar <Bram@vim.org>
parents:
23266
diff
changeset
|
425 int df_refcount; // how many ufunc_T point to this dfunc_T |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
426 int df_idx; // index in def_functions |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
427 int df_deleted; // if TRUE function was deleted |
23285
112fa621b127
patch 8.2.2188: Vim9: crash when calling global function from :def function
Bram Moolenaar <Bram@vim.org>
parents:
23266
diff
changeset
|
428 char_u *df_name; // name used for error messages |
23330
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
429 int df_script_seq; // Value of sctx_T sc_seq when the function |
e8eb4fd44902
patch 8.2.2208: Vim9: after reloading a script variable index may be invalid
Bram Moolenaar <Bram@vim.org>
parents:
23285
diff
changeset
|
430 // was compiled. |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
431 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
432 garray_T df_def_args_isn; // default argument instructions |
23717
e3720756acdc
patch 8.2.2400: Vim9: compiled functions are not profiled
Bram Moolenaar <Bram@vim.org>
parents:
23697
diff
changeset
|
433 |
e3720756acdc
patch 8.2.2400: Vim9: compiled functions are not profiled
Bram Moolenaar <Bram@vim.org>
parents:
23697
diff
changeset
|
434 // After compiling "df_instr" and/or "df_instr_prof" is not NULL. |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
435 isn_T *df_instr; // function body to be executed |
23717
e3720756acdc
patch 8.2.2400: Vim9: compiled functions are not profiled
Bram Moolenaar <Bram@vim.org>
parents:
23697
diff
changeset
|
436 int df_instr_count; // size of "df_instr" |
23719
1a7c2685d780
patch 8.2.2401: build fails without +profiling feature
Bram Moolenaar <Bram@vim.org>
parents:
23717
diff
changeset
|
437 #ifdef FEAT_PROFILE |
1a7c2685d780
patch 8.2.2401: build fails without +profiling feature
Bram Moolenaar <Bram@vim.org>
parents:
23717
diff
changeset
|
438 isn_T *df_instr_prof; // like "df_instr" with profiling |
1a7c2685d780
patch 8.2.2401: build fails without +profiling feature
Bram Moolenaar <Bram@vim.org>
parents:
23717
diff
changeset
|
439 int df_instr_prof_count; // size of "df_instr_prof" |
1a7c2685d780
patch 8.2.2401: build fails without +profiling feature
Bram Moolenaar <Bram@vim.org>
parents:
23717
diff
changeset
|
440 #endif |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
441 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
442 int df_varcount; // number of local variables |
22371
15003353a464
patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
Bram Moolenaar <Bram@vim.org>
parents:
22284
diff
changeset
|
443 int df_has_closure; // one if a closure was created |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
444 }; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
445 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
446 // Number of entries used by stack frame for a function call. |
22460
4097509ecc1e
patch 8.2.1778: Vim9: returning from a partial call clears outer context
Bram Moolenaar <Bram@vim.org>
parents:
22371
diff
changeset
|
447 // - ec_dfunc_idx: function index |
4097509ecc1e
patch 8.2.1778: Vim9: returning from a partial call clears outer context
Bram Moolenaar <Bram@vim.org>
parents:
22371
diff
changeset
|
448 // - ec_iidx: instruction index |
24545
fe29b220eece
patch 8.2.2812: Vim9: still crash when using substitute expression
Bram Moolenaar <Bram@vim.org>
parents:
24490
diff
changeset
|
449 // - ec_instr: instruction list pointer |
23559
64dfb69e7d46
patch 8.2.2322: Vim9: closure nested limiting to one level
Bram Moolenaar <Bram@vim.org>
parents:
23557
diff
changeset
|
450 // - ec_outer: stack used for closures |
24218
40e27d96e395
patch 8.2.2650: Vim9: command modifiers not handled in nested function
Bram Moolenaar <Bram@vim.org>
parents:
23994
diff
changeset
|
451 // - funclocal: function-local data |
22460
4097509ecc1e
patch 8.2.1778: Vim9: returning from a partial call clears outer context
Bram Moolenaar <Bram@vim.org>
parents:
22371
diff
changeset
|
452 // - ec_frame_idx: previous frame index |
23559
64dfb69e7d46
patch 8.2.2322: Vim9: closure nested limiting to one level
Bram Moolenaar <Bram@vim.org>
parents:
23557
diff
changeset
|
453 #define STACK_FRAME_FUNC_OFF 0 |
64dfb69e7d46
patch 8.2.2322: Vim9: closure nested limiting to one level
Bram Moolenaar <Bram@vim.org>
parents:
23557
diff
changeset
|
454 #define STACK_FRAME_IIDX_OFF 1 |
24545
fe29b220eece
patch 8.2.2812: Vim9: still crash when using substitute expression
Bram Moolenaar <Bram@vim.org>
parents:
24490
diff
changeset
|
455 #define STACK_FRAME_INSTR_OFF 2 |
fe29b220eece
patch 8.2.2812: Vim9: still crash when using substitute expression
Bram Moolenaar <Bram@vim.org>
parents:
24490
diff
changeset
|
456 #define STACK_FRAME_OUTER_OFF 3 |
fe29b220eece
patch 8.2.2812: Vim9: still crash when using substitute expression
Bram Moolenaar <Bram@vim.org>
parents:
24490
diff
changeset
|
457 #define STACK_FRAME_FUNCLOCAL_OFF 4 |
fe29b220eece
patch 8.2.2812: Vim9: still crash when using substitute expression
Bram Moolenaar <Bram@vim.org>
parents:
24490
diff
changeset
|
458 #define STACK_FRAME_IDX_OFF 5 |
fe29b220eece
patch 8.2.2812: Vim9: still crash when using substitute expression
Bram Moolenaar <Bram@vim.org>
parents:
24490
diff
changeset
|
459 #define STACK_FRAME_SIZE 6 |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
460 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
461 |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
462 #ifdef DEFINE_VIM9_GLOBALS |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
463 // Functions defined with :def are stored in this growarray. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
464 // They are never removed, so that they can be found by index. |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
465 // Deleted functions have the df_deleted flag set. |
19864
8288884fdfe1
patch 8.2.0488: Vim9: compiling can break when using a lambda inside :def
Bram Moolenaar <Bram@vim.org>
parents:
19862
diff
changeset
|
466 garray_T def_functions = {0, 0, sizeof(dfunc_T), 50, NULL}; |
19181
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
467 #else |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
468 extern garray_T def_functions; |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
469 #endif |
94eda51ba9ba
patch 8.2.0149: maintaining a Vim9 branch separately is more work
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
470 |
23156
6aa8ddf7a3fa
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Bram Moolenaar <Bram@vim.org>
parents:
22975
diff
changeset
|
471 // Used for "lnum" when a range is to be taken from the stack. |
6aa8ddf7a3fa
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Bram Moolenaar <Bram@vim.org>
parents:
22975
diff
changeset
|
472 #define LNUM_VARIABLE_RANGE -999 |
6aa8ddf7a3fa
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Bram Moolenaar <Bram@vim.org>
parents:
22975
diff
changeset
|
473 |
6aa8ddf7a3fa
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Bram Moolenaar <Bram@vim.org>
parents:
22975
diff
changeset
|
474 // Used for "lnum" when a range is to be taken from the stack and "!" is used. |
6aa8ddf7a3fa
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Bram Moolenaar <Bram@vim.org>
parents:
22975
diff
changeset
|
475 #define LNUM_VARIABLE_RANGE_ABOVE -888 |
23735
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
476 |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
477 #ifdef FEAT_PROFILE |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
478 # define INSTRUCTIONS(dfunc) \ |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
479 ((do_profiling == PROF_YES && (dfunc->df_ufunc)->uf_profiling) \ |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
480 ? (dfunc)->df_instr_prof : (dfunc)->df_instr) |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
481 #else |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
482 # define INSTRUCTIONS(dfunc) ((dfunc)->df_instr) |
7caffd835aa1
patch 8.2.2409: Vim9: profiling only works for one function
Bram Moolenaar <Bram@vim.org>
parents:
23719
diff
changeset
|
483 #endif |