Repository navigation
Commit f2a4444
committed
T2-C7a: Devirtualize InlineBase — all 7/7 dynamic_cast eliminated
Remove virtual from InlineBase::~InlineBase() and InlineBase::inlineDepth().
Neither is called through InlineBase* — all call sites use concrete types
(BeginInlinedFunction* or EndInlinedFunction*).
This eliminates the InlineBase vtable pointer from Begin/EndInlinedFunction,
enabling conversion python#7 (gen_asm.cpp BeginInlinedFunction dynamic_cast →
static_cast). With InlineBase non-polymorphic, static_cast from Instr*
to BeginInlinedFunction* no longer involves secondary base adjustment.
C struct updates:
- Remove void *_vtable_inline from HirEndInlinedFunction
- Remove void *_vtable_inline from HirBeginInlinedFunction
All 7/7 dynamic_cast sites now converted to opcode predicates + static_cast.1 parent 4956f22 commit f2a4444
3 files changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3653 | 3653 | | |
3654 | 3654 | | |
3655 | 3655 | | |
3656 | | - | |
| 3656 | + | |
3657 | 3657 | | |
3658 | 3658 | | |
3659 | 3659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
1575 | | - | |
1576 | | - | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1577 | 1578 | | |
1578 | 1579 | | |
1579 | 1580 | | |
| |||
1624 | 1625 | | |
1625 | 1626 | | |
1626 | 1627 | | |
1627 | | - | |
| 1628 | + | |
1628 | 1629 | | |
1629 | 1630 | | |
1630 | 1631 | | |
| |||
1649 | 1650 | | |
1650 | 1651 | | |
1651 | 1652 | | |
1652 | | - | |
| 1653 | + | |
1653 | 1654 | | |
1654 | 1655 | | |
1655 | 1656 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
0 commit comments