From bca60fb7e45c241bdf29182cbf295c74366336a0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 13 Sep 2017 20:32:51 -0700 Subject: 3994 --- 076continuation.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/076continuation.cc b/076continuation.cc index a52e6465..3e57f226 100644 --- a/076continuation.cc +++ b/076continuation.cc @@ -55,11 +55,11 @@ recipe g [ 23:number <- add 22:number, 1 return 23:number ] -# first call of 'g' executes the part before reply-delimited-continuation +# first call of 'g' executes the part before return-continuation-until-mark +mem: storing 77 in location 21 +run: {2: "number"} <- copy {5: "literal"} +mem: storing 5 in location 2 -# calls of the continuation execute the part after reply-delimited-continuation +# calls of the continuation execute the part after return-continuation-until-mark +run: {2: "number"} <- call {1: "continuation"}, {2: "number"} +mem: storing 5 in location 22 +mem: storing 6 in location 2 @@ -69,9 +69,9 @@ recipe g [ +run: {2: "number"} <- call {1: "continuation"}, {2: "number"} +mem: storing 7 in location 22 +mem: storing 8 in location 2 -# first call of 'g' does not execute the part after reply-delimited-continuation +# first call of 'g' does not execute the part after return-continuation-until-mark -mem: storing 77 in location 22 -# calls of the continuation don't execute the part before reply-delimited-continuation +# calls of the continuation don't execute the part before return-continuation-until-mark -mem: storing 5 in location 21 -mem: storing 6 in location 21 -mem: storing 7 in location 21 @@ -181,7 +181,7 @@ if (current_instruction().ingredients.at(0).type->atom trace("trace") << "calling delimited continuation; growing callstack depth to " << Trace_stream->callstack_depth << end(); assert(Trace_stream->callstack_depth < 9000); // 9998-101 plus cushion } - ++current_step_index(); // skip past the reply-delimited-continuation + ++current_step_index(); // skip past the return-continuation-until-mark ingredients.erase(ingredients.begin()); // drop the callee finish_call_housekeeping(to_instruction(caller), ingredients); continue; -- cgit 1.4.1-2-gfad0 ect name='qt'>
path: root/subx/examples/ex4.subx
blob: 3060ae3f5779903cb3f723e884b49e7e523a815f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40