From 23d3a02226973f80188e84fa5dcedb14413c5b7f Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 24 Jun 2018 09:16:17 -0700 Subject: 4266 - space for alloc-id in heap allocations This has taken me almost 6 weeks :( --- 033exclusive_container.cc | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to '033exclusive_container.cc') diff --git a/033exclusive_container.cc b/033exclusive_container.cc index c81aa1b9..c2d69f60 100644 --- a/033exclusive_container.cc +++ b/033exclusive_container.cc @@ -457,39 +457,3 @@ def main [ +mem: storing 1 in location 6 +mem: storing 34 in location 7 +mem: storing 35 in location 8 - -//: a little helper: convert address to number - -:(before "End Primitive Recipe Declarations") -DEADDRESS, -:(before "End Primitive Recipe Numbers") -put(Recipe_ordinal, "deaddress", DEADDRESS); -:(before "End Primitive Recipe Checks") -case DEADDRESS: { - // primary goal of these checks is to forbid address arithmetic - for (int i = 0; i < SIZE(inst.ingredients); ++i) { - if (!is_mu_address(inst.ingredients.at(i))) { - raise << maybe(get(Recipe, r).name) << "'deaddress' requires address ingredients, but got '" << inst.ingredients.at(i).original_string << "'\n" << end(); - goto finish_checking_instruction; - } - } - if (SIZE(inst.products) > SIZE(inst.ingredients)) { - raise << maybe(get(Recipe, r).name) << "too many products in '" << to_original_string(inst) << "'\n" << end(); - break; - } - for (int i = 0; i < SIZE(inst.products); ++i) { - if (!is_real_mu_number(inst.products.at(i))) { - raise << maybe(get(Recipe, r).name) << "'deaddress' requires number products, but got '" << inst.products.at(i).original_string << "'\n" << end(); - goto finish_checking_instruction; - } - } - break; -} -:(before "End Primitive Recipe Implementations") -case DEADDRESS: { - products.resize(SIZE(ingredients)); - for (int i = 0; i < SIZE(ingredients); ++i) { - products.at(i).push_back(ingredients.at(i).at(0)); - } - break; -} -- cgit 1.4.1-2-gfad0