diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-20 23:46:04 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-20 23:55:34 -0800 |
commit | f02842a919823199a1fa41c0a244c3ce3409299d (patch) | |
tree | 2677781aa4d6873230014fbd1ed952c8577f8fe2 /cpp/017record | |
parent | 6eec184e408fdc70497edabd59415cf14e394bcf (diff) | |
download | mu-f02842a919823199a1fa41c0a244c3ce3409299d.tar.gz |
804 - reagent can have multiple types
Diffstat (limited to 'cpp/017record')
-rw-r--r-- | cpp/017record | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/017record b/cpp/017record index 359fd2bc..0626b7ad 100644 --- a/cpp/017record +++ b/cpp/017record @@ -52,7 +52,7 @@ case GET: { ostringstream s; s << src; reagent tmp(s.str()); - tmp.types[0] = src_type; + tmp.types.push_back(src_type); vector<int> result(read_memory(tmp)); trace("run") << "product 0 is " << result[0]; write_memory(instructions[pc].products[0], result); @@ -70,7 +70,7 @@ recipe main [ +run: base address 12 +run: ingredient 1 is 1 +run: address to copy is 13 -+run: its type is 2 ++run: its type is 3 +mem: location 13 is 0 +run: product 0 is 0 +mem: storing in location 15 @@ -105,7 +105,7 @@ case GET_ADDRESS: { recipe main [ 12:integer <- copy 34:literal 13:boolean <- copy 0:literal - 15:integer <- get-address 12:integer-boolean, 1:offset # todo: product is an address + 15:address:integer <- get-address 12:integer-boolean, 1:offset ] +run: instruction 2 +run: ingredient 0 is 12 |