diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-25 21:42:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-25 21:42:18 -0700 |
commit | c6034af30882b6a0a38bcf1fe546ed3dfd3bed04 (patch) | |
tree | d63634d44163ad21ddbbabf9a9386adf697a7aa2 /047global.cc | |
parent | f5dfb7f7374c7e78575d0c205db391814be1b434 (diff) | |
download | mu-c6034af30882b6a0a38bcf1fe546ed3dfd3bed04.tar.gz |
2277 - reagents now have a tree of types
Diffstat (limited to '047global.cc')
-rw-r--r-- | 047global.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/047global.cc b/047global.cc index d0a3d47e..496a6f3e 100644 --- a/047global.cc +++ b/047global.cc @@ -32,10 +32,13 @@ global_space = 0; :(after "void write_memory(reagent x, vector<double> data)") if (x.name == "global-space") { if (!scalar(data) - || SIZE(x.types) != 3 - || x.types.at(0) != Type_ordinal["address"] - || x.types.at(1) != Type_ordinal["array"] - || x.types.at(2) != Type_ordinal["location"]) { + || !x.type + || x.type->value != Type_ordinal["address"] + || !x.type->right + || x.type->right->value != Type_ordinal["array"] + || !x.type->right->right + || x.type->right->right->value != Type_ordinal["location"] + || x.type->right->right->right) { raise_error << maybe(current_recipe_name()) << "'global-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end(); } if (Current_routine->global_space) |