about summary refs log tree commit diff stats
path: root/cpp/013run
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-20 20:27:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-20 20:27:01 -0700
commitfc55fea025bdb1c6945e6812d49a6d41e8f3c062 (patch)
tree26c1c5e55c5bb3233e77aa77a28b9d216a9f94be /cpp/013run
parentad07fc7faf440b025f7d883664aebf281ea85852 (diff)
downloadmu-fc55fea025bdb1c6945e6812d49a6d41e8f3c062.tar.gz
959
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