|[13 earlier articles]|
|Re: Caller allocates space for callee-save registers email@example.com (1992-06-04)|
|Re: Caller allocates space for callee-save registers firstname.lastname@example.org (1992-06-04)|
|Re: Caller allocates space for callee-save registers email@example.com (1992-06-05)|
|Re: Caller allocates space for callee-save registers firstname.lastname@example.org (1992-06-05)|
|Re: Caller allocates space for callee-save registers email@example.com (1992-06-09)|
|Re: Caller allocates space for callee-save registers firstname.lastname@example.org (1992-06-11)|
|Re: Caller allocates space for callee-save registers email@example.com (1992-06-15)|
|From:||firstname.lastname@example.org (David Keppel)|
|Keywords:||optimize, linker, interpreter|
|Organization:||Computer Science & Engineering, U. of Washington, Seattle|
|Date:||Mon, 15 Jun 1992 23:59:17 GMT|
email@example.com (Andrew Mullhaupt) writes:
>[It looks useless for code loaded dynamically into an interpreter.]
>[It's hard to find what code gets called in the interpreted language.]
Both the Deutsch-Shiffman Smalltalk-80 Virtual machine and Self allow you
to dynamically introduce V-code (virtual code) and Self does extensive
inlining optimization. As I recall, the Self group turned off dynamic
inlining and the system ran about 100X slower.
>[The interpreter grows endlessly.]
As you add code, the interpreter *has* to grow, by definition. When you
delete code, you can delete all of the inlined instances of that code.
>[It could inflate loops so they don't fit in the cache, etc.]
There are two kinds of code explosion: (a) a single code fragment such as
a loop grows so it will no longer fit in the cache and (b) a routine is
replicated in to so many places that the total code size grows
These are also problems with static inlining (and static loop unrolling).
I believe many of the issues are the same for dynamic and static versions.
I also believe there are simple and only moderately conservative
Indeed, if the thing being inlined is small, dynamic inlining can reduce
the code size by eliminating the call, allowing CSE, and by eliminating
spills and restores of caller-save registers. That's the case with small
methods in Self.
If the thing is large, it's rarely got a short execution time, so the call
overhead is a small percantage of the total cost.
%A Craig Chambers
%A David Ungar
%A Elgin Lee
%T An Efficient Implementation of SELF, a Dynamically-Typed
Object-Oriented Language Based on Prototypes
%J OOPSLA '89 Proceedings
%D October 1-6 1989
%A Peter Deutsch
%A Alan M. Schiffman
%T Efficient Implementation of the Smalltalk-80 System
%J 11th Annual Symposium on Principles of Programming Languages
%D January 1984
;-D on ( Dynamic Tension ) Pardo
Return to the
Search the comp.compilers archives again.