Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #16369

Re: EuroForth 2012 proceedings

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: EuroForth 2012 proceedings
Date 2012-10-17 01:29 +0200
Organization 1&1 Internet AG
Message-ID <2589967.XU4GPribo4@sunwukong.fritz.box> (permalink)
References <2012Oct15.184019@mips.complang.tuwien.ac.at> <507d495f$0$289$14726298@news.sunsite.dk> <2012Oct16.182021@mips.complang.tuwien.ac.at> <2268724.XZ4vdR9vIK@sunwukong.fritz.box> <507dd029$0$290$14726298@news.sunsite.dk>

Show all headers | View raw


Doug Hoffman wrote:

> On 10/16/12 2:13 PM, Bernd Paysan wrote:
> 
>> For MI, you AFAIK need two things: The actual xt of the method, and
>> the offset to adjust the object pointer when you call the method.
> 
> Yes.  The tricky part can be when you are multiply inheriting from
> classes that themselves are multiply inherited.  It's an interesting
> problem to solve.

The solution, as I tried to explain, is to convert each inheritance into 
wrapper methods that work as if the class was created through single 
inheritance.  That way you only pay the cost of adjusting the offset 
pointer when it's not the primary inheritance, and everything looks like 
SI from the outside.

Then inheriting that as a MI is again a piece of cake, though you might 
want to optimize, i.e. combine all the pointer adjustments into one 
single add.  But that's not that difficult.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-15 16:40 +0000
  Re: EuroForth 2012 proceedings Mark Wills <forthfreak@gmail.com> - 2012-10-16 01:38 -0700
  Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 07:47 -0400
    Re: EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-16 16:20 +0000
      Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-16 20:13 +0200
        Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 17:22 -0400
          Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 01:29 +0200
            Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 01:49 +0200
              Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-17 06:29 -0400
              Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-19 10:16 -0400
            Re: EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-17 14:15 +0000
              Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 17:14 +0200
              Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-19 09:57 -0400
                Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-24 08:50 -0400
        Re: EuroForth 2012 proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-10-17 13:29 +0000
          Re: EuroForth 2012 proceedings Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-17 17:31 +0200
      Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 17:20 -0400
        Re: EuroForth 2012 proceedings Doug Hoffman <glidedog@gmail.com> - 2012-10-16 17:25 -0400

csiph-web