Commit aa1a719
authored
Analyze Subprogram Instantiation Declarations (#209)
* Parse subprogram instantiation to declaration
* Fix logic for identifier
* Make item and token public
* Check kind mismatch and resolve declaration
* revert accidentally deleted test
* Error on ambiguously instantiated subprograms
* Resolve overloaded uninstantiated subprograms
* return Err when the signature of the instantiated subprogram does not match
* Add comments
* Disallow instantiating an instantiable subprogram
* Disallow instantiating a non-instantiable subprogram
* Disallow calling an uninstantiated subprogram
* Disambiguate based on uninstantiated subprogram
* Fix: no longer always complain when instantiating a function
* Merge master aftermath
* Revert: Signature no longer contains optional generic map
* Refactor boolean to two-state enum
* Refactor: Region to GpkgRegion
* Refactor: subprogram instantiation to own function
* Revert: Use region instead of GpkgRegion
* Instantiate subprograms
* Remove debug print
* Refactor into more generic code
* Inline check_ent_is_uninstantiated_subprogram
* Fill in todos and false unreachable calls
* Add documentation
* Add more checks to subprogram instance testcase
* Set reference to the uninstantiated subprogram
* Fix: Analyze the return of a function type in the correct scope
* Add subprogram instance tests for future improvements
* Enable subprogram declarations as reference to the overloaded entity
* Add comment explaining the limitations of the current uninstantiated subprogram resolution
* Rename is_uninst* for less ambiguity
* Revert making fields public
* Revert accidental change
* Improve test case and add other ognored one
* Add copyright header
* Refactor SignatureKey to SubprogramKey
* Add uninstantiated subprograms to checked declarations1 parent f9d0ee9 commit aa1a719
File tree
13 files changed
+1097
-86
lines changed- vhdl_lang/src
- analysis
- tests
- named_entity
- vhdl_ls/src
13 files changed
+1097
-86
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
289 | 304 | | |
290 | 305 | | |
291 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
26 | 58 | | |
27 | 59 | | |
28 | 60 | | |
| |||
124 | 156 | | |
125 | 157 | | |
126 | 158 | | |
127 | | - | |
| 159 | + | |
128 | 160 | | |
129 | 161 | | |
130 | 162 | | |
| |||
139 | 171 | | |
140 | 172 | | |
141 | 173 | | |
142 | | - | |
| 174 | + | |
143 | 175 | | |
144 | 176 | | |
145 | 177 | | |
| |||
188 | 220 | | |
189 | 221 | | |
190 | 222 | | |
191 | | - | |
| 223 | + | |
192 | 224 | | |
| 225 | + | |
193 | 226 | | |
194 | | - | |
195 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
196 | 230 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
203 | 245 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
234 | 257 | | |
| 258 | + | |
235 | 259 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 260 | | |
243 | 261 | | |
| 262 | + | |
| 263 | + | |
244 | 264 | | |
245 | 265 | | |
246 | | - | |
| 266 | + | |
247 | 267 | | |
248 | 268 | | |
249 | 269 | | |
| |||
358 | 378 | | |
359 | 379 | | |
360 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
361 | 391 | | |
362 | 392 | | |
363 | 393 | | |
| |||
379 | 409 | | |
380 | 410 | | |
381 | 411 | | |
382 | | - | |
| 412 | + | |
383 | 413 | | |
384 | 414 | | |
385 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments