eo: redo vtable mro creation
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Fri, 20 Mar 2020 11:32:44 +0000 (11:32 +0000)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 22 Mar 2020 21:34:57 +0000 (06:34 +0900)
commitad2ad2182b76a0e3868200376901b23084efd10c
tree2588722988740e5c7f3e20a1332aeebe4dad921c
parentd9764b31988efe668699721e832d981334a2286a
eo: redo vtable mro creation

Summary:
up to now we have created the vtable of a class by walking the mro from
the most upper element to the klass itself. To give a broader view, the
mro of a klass X that extends the class Y and implements A,B,C,D

The mro of X is then equal to [A,B,C,D] + the mro of Y. Which means, we
can simply copy over the vtables of Y, and start walking at D, which
will result in the same vtable.

The sideeffect of doing that is, that we do not allocate that much
memory anymore. Reason for this is quite simple:
For every mixin that is part of the mro, we are copying the vtable node,
to insert new API implemented by the mixin. However, the resulting new
vtable is every time the same. Which means, we could actaully copy them.

The same messurements as in the previous commits are taken:
malloc tracking:
  new: 452128
  old: 556656
  Safeup: ~102 KB

pmap:
  new: 542884K
  old: 542168K
  Safeup: ~716 KB
Depends on D11538

Reviewers: zmike, stefan_schmidt, tasn, raster, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11539
src/lib/eo/eo.c