Commit f29b0c0
committed
Fix for FFI casting a struct to/from its pointer field.
FFI casting for pointer-containing structs is a pattern
I'm using in my LLVM library that's currently in progress.
This pattern is useful for treating different opaque pointers
as specific types in Savi, and converting between them when appropriate.1 parent f8f1944 commit f29b0c0
File tree
2 files changed
+55
-8
lines changed- spec/language/semantics
- src/savi/compiler
2 files changed
+55
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
4 | 23 | | |
5 | 24 | | |
6 | 25 | | |
7 | 26 | | |
8 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
921 | | - | |
| 921 | + | |
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
| 928 | + | |
929 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
930 | 939 | | |
931 | 940 | | |
932 | 941 | | |
933 | 942 | | |
934 | 943 | | |
935 | | - | |
| 944 | + | |
936 | 945 | | |
937 | | - | |
| 946 | + | |
938 | 947 | | |
939 | 948 | | |
940 | | - | |
| 949 | + | |
| 950 | + | |
941 | 951 | | |
942 | 952 | | |
943 | 953 | | |
944 | 954 | | |
945 | | - | |
| 955 | + | |
946 | 956 | | |
947 | | - | |
| 957 | + | |
948 | 958 | | |
949 | 959 | | |
950 | 960 | | |
| |||
2197 | 2207 | | |
2198 | 2208 | | |
2199 | 2209 | | |
2200 | | - | |
| 2210 | + | |
2201 | 2211 | | |
2202 | 2212 | | |
2203 | 2213 | | |
| |||
4053 | 4063 | | |
4054 | 4064 | | |
4055 | 4065 | | |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
4056 | 4077 | | |
4057 | 4078 | | |
4058 | 4079 | | |
| |||
0 commit comments