Re: How to build your own stack frames? (interpreter questions)

Lassi.Tuura@hut.fi (Lassi A. Tuura)
Mon, 21 Aug 1995 07:54:42 GMT

          From comp.compilers

Related articles
How to build your own stack frames? (interpreter questions) seguin@engin.umich.edu (1995-08-20)
Re: How to build your own stack frames? (interpreter questions) tonyk@cybercom.net (1995-08-21)
Re: How to build your own stack frames? (interpreter questions) Lassi.Tuura@hut.fi (1995-08-21)
Re: How to build your own stack frames? (interpreter questions) rick@metronet.com (1995-08-22)
Re: How to build your own stack frames? (interpreter questions) tonyk@cybercom.net (1995-08-22)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Lassi.Tuura@hut.fi (Lassi A. Tuura)
In-Reply-To: seguin@engin.umich.edu's message of Sun, 20 Aug 1995 05:06:57 GMT
Keywords: interpreter, architecture
Organization: Helsinki University of Technology, Finland
References: 95-08-132
Date: Mon, 21 Aug 1995 07:54:42 GMT

If your code is strictly C++, you could use a bunch of templates. For
each exported function and method, you create either template function
or a template class based object. The template function itself can
then do any conversion required (through compiler's type unification).
All the required conversion get compiled into the program -- no
run-time cost and if you design it well, not too much code bloat.


This scheme cannot handle varargs, of course. You would have to write
special coverters or your own varargs stubs.


//LaT
--
Lassi A. Tuura
Lassi.Tuura@hut.fi
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.