Commit a7125ee
committed
[[ Bug 20931 ]] Bridge values in LCB assign-array and assign-list ops
This patch fixes a bug where the behavior of code built using the
[ ... ] and { ... } syntax in LCB is different from that when using
explicit code.
A new method 'Bridge' has been added to the VM's execute context.
This method performs a 'convert to optional any' on the input value
resulting in bridgeable foreign values being imported, and all other
values being retained.
This method is now called on the input values in the assign-list
and assign-array opcodes meaning that foreign values being built
into lists will bridge.
Additionally, an extra compiler check has been added to variadic
arguments (i.e. arguments to the variadic portion of a C variadic
handler). This check restricts such arguments to being variable
identifiers where the variable has an explicit type declaration.
This is necessary to ensure that code explicitly states the type
which is being passed in variadic positions as there is no other
means for the compiler or the VM to know what the type should be.1 parent 66d18be commit a7125ee
File tree
6 files changed
+103
-14
lines changed- libscript/src
- toolchain
- lc-compile/src
- libcompile/src
6 files changed
+103
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
| 756 | + | |
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
766 | | - | |
767 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
768 | 780 | | |
769 | 781 | | |
770 | 782 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
| 783 | + | |
| 784 | + | |
775 | 785 | | |
776 | 786 | | |
777 | 787 | | |
| |||
828 | 838 | | |
829 | 839 | | |
830 | 840 | | |
| 841 | + | |
831 | 842 | | |
832 | 843 | | |
833 | 844 | | |
| |||
842 | 853 | | |
843 | 854 | | |
844 | 855 | | |
845 | | - | |
846 | | - | |
847 | | - | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
848 | 859 | | |
849 | 860 | | |
850 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
851 | 873 | | |
852 | 874 | | |
853 | 875 | | |
854 | 876 | | |
855 | | - | |
| 877 | + | |
856 | 878 | | |
857 | 879 | | |
858 | 880 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
891 | 932 | | |
892 | 933 | | |
893 | 934 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1463 | 1463 | | |
1464 | 1464 | | |
1465 | 1465 | | |
1466 | | - | |
| 1466 | + | |
1467 | 1467 | | |
1468 | 1468 | | |
1469 | 1469 | | |
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1510 | 1524 | | |
1511 | 1525 | | |
1512 | 1526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| |||
788 | 789 | | |
789 | 790 | | |
790 | 791 | | |
| 792 | + | |
791 | 793 | | |
792 | 794 | | |
793 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
| |||
0 commit comments