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)
Tamarin Graveyard
Virtual Machine
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.
Reporter | ||
Updated•15 years ago
|
Whiteboard: PACMAN
Comment 1•15 years ago
|
||
Memory savings are not really interesting to PACMAN - better elucidation of benefits desired.
Comment 2•15 years ago
|
||
As long as ScriptObject is a GCFinalizedObject, won't it still need a C++ vtable for the virtual destructor?
Comment 3•15 years ago
|
||
(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.
Reporter | ||
Comment 4•15 years ago
|
||
(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.)
Updated•15 years ago
|
Target Milestone: --- → Future
Comment 5•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 6•6 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in
before you can comment on or make changes to this bug.
Description
•