Mercurial > vim
comparison src/vim9execute.c @ 19558:8eeec8886c02 v8.2.0336
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Commit: https://github.com/vim/vim/commit/42a480bf7243ea8bce498264911e187931d083e5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 29 23:23:47 2020 +0100
patch 8.2.0336: Vim9: insufficient test coverage for compiling
Problem: Vim9: insufficient test coverage for compiling.
Solution: Add more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Feb 2020 23:30:04 +0100 |
parents | 7df9c8df26f1 |
children | ec1eeb1b69e2 |
comparison
equal
deleted
inserted
replaced
19557:59821eacb2dd | 19558:8eeec8886c02 |
---|---|
838 case ISN_PUSHBOOL: | 838 case ISN_PUSHBOOL: |
839 case ISN_PUSHSPEC: | 839 case ISN_PUSHSPEC: |
840 case ISN_PUSHF: | 840 case ISN_PUSHF: |
841 case ISN_PUSHS: | 841 case ISN_PUSHS: |
842 case ISN_PUSHBLOB: | 842 case ISN_PUSHBLOB: |
843 case ISN_PUSHFUNC: | |
844 case ISN_PUSHPARTIAL: | |
845 case ISN_PUSHCHANNEL: | |
846 case ISN_PUSHJOB: | |
843 if (ga_grow(&ectx.ec_stack, 1) == FAIL) | 847 if (ga_grow(&ectx.ec_stack, 1) == FAIL) |
844 goto failed; | 848 goto failed; |
845 tv = STACK_TV_BOT(0); | 849 tv = STACK_TV_BOT(0); |
846 ++ectx.ec_stack.ga_len; | 850 ++ectx.ec_stack.ga_len; |
847 switch (iptr->isn_type) | 851 switch (iptr->isn_type) |
865 break; | 869 break; |
866 #endif | 870 #endif |
867 case ISN_PUSHBLOB: | 871 case ISN_PUSHBLOB: |
868 blob_copy(iptr->isn_arg.blob, tv); | 872 blob_copy(iptr->isn_arg.blob, tv); |
869 break; | 873 break; |
874 case ISN_PUSHFUNC: | |
875 tv->v_type = VAR_FUNC; | |
876 tv->vval.v_string = vim_strsave(iptr->isn_arg.string); | |
877 break; | |
878 case ISN_PUSHPARTIAL: | |
879 tv->v_type = VAR_UNKNOWN; | |
880 break; | |
881 case ISN_PUSHCHANNEL: | |
882 #ifdef FEAT_JOB_CHANNEL | |
883 tv->v_type = VAR_CHANNEL; | |
884 tv->vval.v_channel = iptr->isn_arg.channel; | |
885 if (tv->vval.v_channel != NULL) | |
886 ++tv->vval.v_channel->ch_refcount; | |
887 #endif | |
888 break; | |
889 case ISN_PUSHJOB: | |
890 #ifdef FEAT_JOB_CHANNEL | |
891 tv->v_type = VAR_JOB; | |
892 tv->vval.v_job = iptr->isn_arg.job; | |
893 if (tv->vval.v_job != NULL) | |
894 ++tv->vval.v_job->jv_refcount; | |
895 #endif | |
896 break; | |
870 default: | 897 default: |
871 tv->v_type = VAR_STRING; | 898 tv->v_type = VAR_STRING; |
872 tv->vval.v_string = vim_strsave(iptr->isn_arg.string); | 899 tv->vval.v_string = vim_strsave(iptr->isn_arg.string); |
873 } | 900 } |
874 break; | 901 break; |
1843 | 1870 |
1844 r = blob2string(iptr->isn_arg.blob, &tofree, numbuf); | 1871 r = blob2string(iptr->isn_arg.blob, &tofree, numbuf); |
1845 smsg("%4d PUSHBLOB %s", current, r); | 1872 smsg("%4d PUSHBLOB %s", current, r); |
1846 vim_free(tofree); | 1873 vim_free(tofree); |
1847 } | 1874 } |
1875 break; | |
1876 case ISN_PUSHFUNC: | |
1877 smsg("%4d PUSHFUNC \"%s\"", current, iptr->isn_arg.string); | |
1878 break; | |
1879 case ISN_PUSHPARTIAL: | |
1880 // TODO | |
1881 smsg("%4d PUSHPARTIAL", current); | |
1882 break; | |
1883 case ISN_PUSHCHANNEL: | |
1884 #ifdef FEAT_JOB_CHANNEL | |
1885 { | |
1886 channel_T *channel = iptr->isn_arg.channel; | |
1887 | |
1888 smsg("%4d PUSHCHANNEL %d", current, | |
1889 channel == NULL ? 0 : channel->ch_id); | |
1890 } | |
1891 #endif | |
1892 break; | |
1893 case ISN_PUSHJOB: | |
1894 #ifdef FEAT_JOB_CHANNEL | |
1895 { | |
1896 typval_T tv; | |
1897 char_u *name; | |
1898 | |
1899 tv.v_type = VAR_JOB; | |
1900 tv.vval.v_job = iptr->isn_arg.job; | |
1901 name = tv_get_string(&tv); | |
1902 smsg("%4d PUSHJOB %s", current, name); | |
1903 } | |
1904 #endif | |
1848 break; | 1905 break; |
1849 case ISN_PUSHEXC: | 1906 case ISN_PUSHEXC: |
1850 smsg("%4d PUSH v:exception", current); | 1907 smsg("%4d PUSH v:exception", current); |
1851 break; | 1908 break; |
1852 case ISN_NEWLIST: | 1909 case ISN_NEWLIST: |