about summary refs log tree commit diff stats
path: root/053continuation.cc
diff options
context:
space:
mode:
Diffstat (limited to '053continuation.cc')
-rw-r--r--053continuation.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/053continuation.cc b/053continuation.cc
index 42f32f6d..18174cc1 100644
--- a/053continuation.cc
+++ b/053continuation.cc
@@ -21,6 +21,10 @@ Type[continuation].name = "continuation";
 CURRENT_CONTINUATION,
 :(before "End Primitive Recipe Numbers")
 Recipe_ordinal["current-continuation"] = CURRENT_CONTINUATION;
+:(before "End Primitive Recipe Checks")
+case CURRENT_CONTINUATION: {
+  break;
+}
 :(before "End Primitive Recipe Implementations")
 case CURRENT_CONTINUATION: {
   // copy the current call stack
@@ -38,12 +42,16 @@ case CURRENT_CONTINUATION: {
 CONTINUE_FROM,
 :(before "End Primitive Recipe Numbers")
 Recipe_ordinal["continue-from"] = CONTINUE_FROM;
-:(before "End Primitive Recipe Implementations")
+:(before "End Primitive Recipe Checks")
 case CONTINUE_FROM: {
-  if (!scalar(ingredients.at(0))) {
-    raise << maybe(current_recipe_name()) << "first ingredient of 'continue-from' should be a continuation id generated by 'current-continuation', but got " << current_instruction().ingredients.at(0).original_string << '\n' << end();
+  if (!is_mu_scalar(inst.ingredients.at(0))) {
+    raise << maybe(Recipe[r].name) << "first ingredient of 'continue-from' should be a continuation id generated by 'current-continuation', but got " << inst.ingredients.at(0).original_string << '\n' << end();
     break;
   }
+  break;
+}
+:(before "End Primitive Recipe Implementations")
+case CONTINUE_FROM: {
   long long int c = ingredients.at(0).at(0);
   Current_routine->calls = Continuation[c];  // deep copy; calls have no pointers
   continue;  // skip rest of this instruction
@@ -166,6 +174,10 @@ is_reset = false;
 CREATE_DELIMITED_CONTINUATION,
 :(before "End Primitive Recipe Numbers")
 Recipe_ordinal["create-delimited-continuation"] = CREATE_DELIMITED_CONTINUATION;
+:(before "End Primitive Recipe Checks")
+case CREATE_DELIMITED_CONTINUATION: {
+  break;
+}
 :(before "End Primitive Recipe Implementations")
 case CREATE_DELIMITED_CONTINUATION: {
   Current_routine->calls.front().is_reset = true;
@@ -188,6 +200,10 @@ Next_delimited_continuation_id = 0;
 REPLY_DELIMITED_CONTINUATION,
 :(before "End Primitive Recipe Numbers")
 Recipe_ordinal["reply-delimited-continuation"] = REPLY_DELIMITED_CONTINUATION;
+:(before "End Primitive Recipe Checks")
+case REPLY_DELIMITED_CONTINUATION: {
+  break;
+}
 :(before "End Primitive Recipe Implementations")
 case REPLY_DELIMITED_CONTINUATION: {
   // first clear any existing ingredients, to isolate the creation of the