Re: Continuations, stacks, and whatnots

2004-03-29 Thread Piers Cawley
Dan Sugalski [EMAIL PROTECTED] writes: At 8:46 AM +0100 3/23/04, Leopold Toetsch wrote: Piers Cawley [EMAIL PROTECTED] wrote: Dan Sugalski [EMAIL PROTECTED] writes: And what control stack? The continuation chain is the control stack, surely? Nope. There's the exception handlers, at the

Re: Continuations, stacks, and whatnots

2004-03-24 Thread Matt Fowles
Leopold Toetsch wrote: Matt Fowles [EMAIL PROTECTED] wrote: ... Why not just make exception handlers a second continuation passed to all functions. ... because it is answered in a f'up to a similar proposal by our summarizer: ,--[ leo ]--- |

Re: Continuations, stacks, and whatnots

2004-03-23 Thread Dan Sugalski
At 8:46 AM +0100 3/23/04, Leopold Toetsch wrote: Piers Cawley [EMAIL PROTECTED] wrote: Dan Sugalski [EMAIL PROTECTED] writes: And what control stack? The continuation chain is the control stack, surely? Nope. There's the exception handlers, at the very least. Just add a field to the

Re: Continuations, stacks, and whatnots

2004-03-23 Thread Matt Fowles
All~ This got warnocked when last I sent it, so I will try again as I think it is a reasonable idea. I am not sure that I understand why we deal with exception handlers in the current manner. Why not just make exception handlers a second continuation passed to all functions. Then you call

Re: Continuations, stacks, and whatnots

2004-03-23 Thread Leopold Toetsch
Matt Fowles [EMAIL PROTECTED] wrote: All~ This got warnocked Only indirectly ... ... Why not just make exception handlers a second continuation passed to all functions. ... because it is answered in a f'up to a similar proposal by our summarizer: ,--[ leo

Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
Since this has gotten to be an issue... We've definitely got performance issues with continuations. This is Not Good, since we're using them for control flow. Leo's hacked in a performance fix, but it's got its own issues. I think it's time for some thought, and a more unified solution.

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: Since this has gotten to be an issue... Making a continuation conceptually has three steps. One must: 1) Copy the current environment contents to the continuation 2) Note the bytecode address at which the continuation should run 3) Mark the stacks as

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Since this has gotten to be an issue... Making a continuation conceptually has three steps. One must: 1) Copy the current environment contents to the continuation 2) Note the bytecode address at which the

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What about Pad, User, and Control? leo

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: D'oh! (I should edit this all out but, well...) If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. Which makes the differentiation between a return

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 8:33 PM +0100 3/22/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: D'oh! (I should edit this all out but, well...) If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack.

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What about Pad, User, and Control? I hope he means

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 12:59 AM + 3/23/04, Piers Cawley wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Matt Fowles
All~ I am not sure that I understand why we deal with exception handlers at all. Why not just make exception handlers a second continuation passed to all functions. Then you call continuation 1 for successful returns and continuation 2 for exceptions. This will not introduce overhead to

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Piers Cawley
Dan Sugalski [EMAIL PROTECTED] writes: At 12:59 AM + 3/23/04, Piers Cawley wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Dan Sugalski [EMAIL PROTECTED] wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: