home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!root44!hrc63!mrcu!paj
- From: paj@uk.co.gec-mrc (Paul Johnson)
- Newsgroups: comp.lang.eiffel
- Subject: Re: Eiffel internals
- Message-ID: <2231@snap>
- Date: 19 Nov 92 09:51:11 GMT
- References: <Nov.17.18.57.56.1992.26484@paul.rutgers.edu> <1992Nov18.140905.23486@jyu.fi>
- Reply-To: paj@uk.co.gec-mrc (Paul Johnson)
- Organization: GEC-Marconi Research Centre, Great Baddow, UK
- Lines: 32
-
- In article <1992Nov18.140905.23486@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen) writes:
-
- >In article <Nov.17.18.57.56.1992.26484@paul.rutgers.edu> partha@paul.rutgers.edu (nowhere_man) writes:
-
- >>I might need this for my work.Suppose class C declares x of class type
- >>D, creates it and invokes x.m, where m is a method properly defined in
- >>class D. Now is there any way to find out at the callee (ie in class
- >>D) the (pointer to the) object of type C that calls the method m?
- >> ...
-
- Whenever I need to do something like this, I make the client an
- argument to `m', so the call looks something like
-
- x.m (Current, foo, bar);
-
- As to how to do it without the extra argument, I think the only way
- would be to take a look at the machine stack. This will involve some
- assembly code. A change to either your Eiffel compiler, your C
- compiler or your hardware would break it.
-
- >This is not such a bad idea in principle.
-
- I rather disagree. If you want an object to know something then you
- should tell it explicitly.
-
-
- Paul.
- --
- Paul Johnson (paj@gec-mrc.co.uk). | Tel: +44 245 73331 ext 3245
- --------------------------------------------+----------------------------------
- These ideas and others like them can be had | GEC-Marconi Research is not
- for $0.02 each from any reputable idealist. | responsible for my opinions
-