Commit eafb6b7
[dart2wasm] Fix dispatch table class ID loop bounds.
The loop iterates over the class IDs up to (but not including) maxConcreteClassId. But maxConcreteClassId is the actual ID of the last concrete class so the loop is ending 1 early.
From some testing, WasmTable seems to always be the last class. This class doesn't have any subclasses so all the calls to it are likely devirtualized anyway skipping the dispatch table. In fact the way the class IDs are assigned, the last class should always be a leaf concrete class. I believe that's why this hasn't caused a detectable bug.
Change-Id: I7003dfd015c2ad13a4a042ae86af5e4f54242452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391862
Commit-Queue: Nate Biggs <[email protected]>
Reviewed-by: Ömer Ağacan <[email protected]>1 parent d4fdb84 commit eafb6b7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
0 commit comments