Commit af2f3b3
authored
Specially handle short strings in the parser (#475)
* Specially handle short strings in the parser
These short strings are read using the appropriate
constructor, rather than the general buffer
constructor. So the empty and singleton
constructors are now public.
Other changes include optimising foreign lpvm cast
instructions applied to constant chars, integers
and floats, as they get generated in this case.
This avoids several instructions in calling
unboxed constructors with constant arguments.
Also use the -n wybemk flag in final-dump-test.sh,
to turn off colourising, making diffs easier to
read.
There are numerous code improvements in final dump
tests, including allowing specialisation to kick
in in many places, since unboxed values cannot be
aliased.
There's one unfortunate change in output for
constant_type_constraint_error.wybe: the error
message for ?a = "s":int now complains about a
type error in the call to wybe.string.singleton,
which doesn't appear on the line. I think this is
tolerable for now, as it would be difficult to
fix.
Closes #473
* Address all review comments1 parent 17687d8 commit af2f3b3
File tree
123 files changed
+1823
-1852
lines changed- src
- test-cases
- complex/exp
- final-dump
- wybelibs/wybe
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
123 files changed
+1823
-1852
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2245 | 2245 | | |
2246 | 2246 | | |
2247 | 2247 | | |
2248 | | - | |
2249 | | - | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2250 | 2258 | | |
2251 | 2259 | | |
2252 | | - | |
2253 | | - | |
2254 | | - | |
2255 | | - | |
2256 | | - | |
2257 | | - | |
2258 | 2260 | | |
2259 | | - | |
| 2261 | + | |
2260 | 2262 | | |
2261 | | - | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
2262 | 2270 | | |
2263 | | - | |
| 2271 | + | |
2264 | 2272 | | |
2265 | 2273 | | |
2266 | | - | |
2267 | | - | |
2268 | | - | |
2269 | | - | |
2270 | | - | |
2271 | | - | |
2272 | 2274 | | |
2273 | 2275 | | |
2274 | 2276 | | |
2275 | 2277 | | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
2276 | 2286 | | |
2277 | 2287 | | |
2278 | | - | |
2279 | | - | |
2280 | 2288 | | |
2281 | 2289 | | |
2282 | 2290 | | |
| |||
2309 | 2317 | | |
2310 | 2318 | | |
2311 | 2319 | | |
2312 | | - | |
| 2320 | + | |
2313 | 2321 | | |
2314 | 2322 | | |
2315 | 2323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 238 | | |
243 | 239 | | |
244 | 240 | | |
| |||
954 | 950 | | |
955 | 951 | | |
956 | 952 | | |
| 953 | + | |
957 | 954 | | |
958 | 955 | | |
959 | 956 | | |
| |||
1130 | 1127 | | |
1131 | 1128 | | |
1132 | 1129 | | |
| 1130 | + | |
| 1131 | + | |
1133 | 1132 | | |
1134 | 1133 | | |
1135 | | - | |
1136 | | - | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | 1141 | | |
1141 | | - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1142 | 1149 | | |
1143 | | - | |
| 1150 | + | |
1144 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1145 | 1162 | | |
1146 | 1163 | | |
1147 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1148 | 1177 | | |
1149 | 1178 | | |
1150 | 1179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
172 | 183 | | |
173 | 184 | | |
174 | 185 | | |
| |||
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
180 | | - | |
181 | | - | |
| 191 | + | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
| |||
332 | 342 | | |
333 | 343 | | |
334 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
335 | 373 | | |
336 | 374 | | |
337 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
1174 | | - | |
| 1174 | + | |
1175 | 1175 | | |
1176 | | - | |
| 1176 | + | |
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1219 | 1219 | | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1226 | 1225 | | |
1227 | 1226 | | |
1228 | 1227 | | |
| |||
0 commit comments