Question: In Figure C 10.11, consider calls to virtual methods declared in A, but called through a B, C, or D object view. We could avoid

In Figure C 10.11, consider calls to virtual methods declared in A, but called through a B, C, or D object view. We could avoid one level of indirection by appending a copy of the A part of the vtable to the D/B and C parts of the vtable (with suitably adjusted this corrections). Give calling sequences for this alternative implementation. In the worst case, howmuch larger may the vtable be for a class with n ancestors?

Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

In this alternative implementation the vtable for a class with n ancestors may be up to n times larg... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Language Pragmatics Questions!