From 44c1aeef226542d692f0002b5cca5a3c30935d18 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 10 Sep 2016 10:43:19 -0700 Subject: 3315 --- html/034address.cc.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'html/034address.cc.html') diff --git a/html/034address.cc.html b/html/034address.cc.html index d4ef5474..f809d2fb 100644 --- a/html/034address.cc.html +++ b/html/034address.cc.html @@ -209,12 +209,13 @@ put(Recipe_ordinal,bool product_of_new_is_valid(const instruction& inst) { reagent/*copy*/ product = inst.products.at(0); // Update NEW product in Check - if (!product.type || product.type->value != get(Type_ordinal, "address")) + if (!product.type || product.type->atom || product.type->left->value != get(Type_ordinal, "address")) return false; drop_from_type(product, "address"); if (SIZE(inst.ingredients) > 1) { // array allocation - if (!product.type || product.type->value != get(Type_ordinal, "array")) return false; + if (!product.type || product.type->atom || product.type->left->value != get(Type_ordinal, "array")) + return false; drop_from_type(product, "array"); } reagent/*copy*/ expected_product("x:"+inst.ingredients.at(0).name); @@ -228,7 +229,8 @@ put(Recipe_ordinal,} void drop_from_type(reagent& r, string expected_type) { - if (r.type->name != expected_type) { + assert(!r.type->atom); + if (r.type->left->name != expected_type) { raise << "can't drop2 " << expected_type << " from '" << to_string(r) << "'\n" << end(); return; } @@ -280,7 +282,7 @@ Transform.push_back(//: implement 'allocate' based on size :(before "End Globals") -const int Reserved_for_tests = 1000; +extern const int Reserved_for_tests = 1000; int Memory_allocated_until = Reserved_for_tests; int Initial_memory_per_routine = 100000; :(before "End Setup") -- cgit 1.4.1-2-gfad0