Closed Bug 566043 Opened 15 years ago Closed 6 years ago

Can we get rid of virtual methods on ScriptObject?

Categories

(Tamarin Graveyard :: Virtual Machine, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: stejohns, Unassigned)

Details

We could move all of the internal-only-override behavior from the existing C++ virtual methods, into a table of C functions on our own VTable method. This would allow us to entirely get rid of the C++ vtable, saving a pointer-sized field per ScriptObject. Pros: -- Memory savings. -- Possibly cleaner glue code as a result, with less tightly-coupled-via-inheritance issues between VM and client Cons: -- Lots of work; much of existing glue code would need to be touched -- Unclear if memory savings would be worthwhile -- This would require all glue classes to be *prohibited* from having any virtual methods, to avoid a C++ vtable creeping back in and mucking up our memory layout Throwing it out there for PACMAN consideration; there are probably other pros or cons I haven't thought of.
Whiteboard: PACMAN
Memory savings are not really interesting to PACMAN - better elucidation of benefits desired.
As long as ScriptObject is a GCFinalizedObject, won't it still need a C++ vtable for the virtual destructor?
(In reply to comment #2) > As long as ScriptObject is a GCFinalizedObject, won't it still need a C++ > vtable for the virtual destructor? It will, and more virtual GC methods are probably coming.
(In reply to comment #1) > Memory savings are not really interesting to PACMAN - better elucidation of > benefits desired. Agreed, this was more of a "save this idea for future consideration" bug. (In reply to comment #2) > As long as ScriptObject is a GCFinalizedObject, won't it still need a C++ > vtable for the virtual destructor? Ah, yes, this is true. (Unless we find a way to hook up a finalizer via our VTable... which would be doable but probably fiddly.)
Target Milestone: --- → Future
Flags: flashplayer-qrb+
Whiteboard: PACMAN
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.