about summary refs log tree commit diff stats
path: root/cpp/013run
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/013run')
-rw-r--r--cpp/013run10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/013run b/cpp/013run
index 102a7dfb..b26ce56f 100644
--- a/cpp/013run
+++ b/cpp/013run
@@ -111,6 +111,7 @@ for (size_t i = 0; i < recipes_added_by_test.size(); ++i) {
 recipes_added_by_test.clear();
 
 :(code)
+//: beware: overridden in later layers
 vector<int> read_memory(reagent x) {
 //?   cout << "read_memory: " << x.to_string() << '\n'; //? 1
   vector<int> result;
@@ -127,7 +128,9 @@ vector<int> read_memory(reagent x) {
   return result;
 }
 
+//: beware: overridden in later layers
 void write_memory(reagent x, vector<int> data) {
+  if (x.name == "_") return;  // dummy results are never stored
   int base = x.value;
   size_t size = size_of(x);
   if (size != data.size()) raise << "size mismatch in storing to " << x.to_string();
@@ -153,3 +156,10 @@ recipe main [
 ]
 +run: instruction main/1
 +run: instruction main/2
+-run: instruction main/0
+
+:(scenario run_dummy)
+recipe main [
+  _ <- copy 0:literal
+]
++run: instruction main/0