Related articles |
---|
Tail recursion in object systems fhd@Panix.Com (Frank Deutschmann) (1993-02-26) |
Re: Tail recursion in object systems mac@coos.dartmouth.edu (1993-02-27) |
Re: Tail recursion in object systems max@nic.gac.edu (1993-03-01) |
Re: Tail recursion in object systems pardo@cs.washington.edu (1993-03-03) |
Newsgroups: | comp.compilers |
From: | pardo@cs.washington.edu (David Keppel) |
Keywords: | OOP, bibliography |
Organization: | Computer Science & Engineering, U. of Washington, Seattle |
References: | 93-02-150 93-03-006 |
Date: | Wed, 3 Mar 1993 18:10:23 GMT |
>fhd@Panix.Com (Frank Deutschmann) writes:
>[Is it possible to handle tail recursion in constant resources in
> a message passing environment.]
Some OS constructs are implemented as an *extremely limited* form of
continuation passing. When a thread blocks, it saves a <function pointer,
argument> continuation in to the thread control block. Constructs such as
f (x)
{
while (1) {
m = rcv_message (...)
doodle (m, x);
send_and_block (m, x);
}
}
Are impleemented with
f (x)
{
m = rcv_message (...);
doodle (m, x)
send_die_and_continuation (m, x, f);
}
See
%A Richard P. Draves
%A Brian N. Bershad
%A Richard F. Rashid
%A Randall W. Dean
%T Using Continuations to Implement Thread Management and Communication
in Operating Systems
%J Proceedings of the Thirteenth ACM Symposium on Operating System
Principles
%D 1991
%P 122
There is an upcoming paper, but I don't have the full citation:
%A Randall W. Dean
%T Using Continuations to build a User-Level Threads Library
%J To appear (Machnix coference)
%W rwd@cs.cmu.edu
In each case, the semantics of ``continuation'' are limited to ``pick a
stack and run `f' with argument `x'.'' This is enough for them to
implement constructs that discard (give away) the stack between messages
and perform tail recursion as iteration.
;-D on ( Programming linkages ) Pardo
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.