about summary refs log tree commit diff stats
path: root/028call_return.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-18 20:08:05 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-18 20:08:05 -0700
commit636837e7d9733206cba3a1947ec46d4f003b93ce (patch)
treefcb906988cf3fa872253bfad1e7daa23e9567c23 /028call_return.cc
parent292ccba1bbdc8c2ec6cfacefa15f19c8d215b58c (diff)
downloadmu-636837e7d9733206cba3a1947ec46d4f003b93ce.tar.gz
4086 - back to cleaning up delimited continuations
Diffstat (limited to '028call_return.cc')
-rw-r--r--028call_return.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/028call_return.cc b/028call_return.cc
index 3e547f06..0227acee 100644
--- a/028call_return.cc
+++ b/028call_return.cc
@@ -67,7 +67,7 @@ void check_types_of_return_instructions(const recipe_ordinal r) {
     const instruction& caller_instruction = caller.steps.at(i);
     if (caller_instruction.is_label) continue;
     if (caller_instruction.products.empty()) continue;
-    if (caller_instruction.operation < MAX_PRIMITIVE_RECIPES) continue;
+    if (is_primitive(caller_instruction.operation)) continue;
     const recipe& callee = get(Recipe, caller_instruction.operation);
     for (int i = 0;  i < SIZE(callee.steps);  ++i) {
       const instruction& return_inst = callee.steps.at(i);
@@ -111,6 +111,10 @@ void check_types_of_return_instructions(const recipe_ordinal r) {
   }
 }
 
+bool is_primitive(recipe_ordinal r) {
+  return r < MAX_PRIMITIVE_RECIPES;
+}
+
 :(scenario return_type_mismatch)
 % Hide_errors = true;
 def main [