diff options
Diffstat (limited to '020run.cc')
-rw-r--r-- | 020run.cc | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/020run.cc b/020run.cc index ff23200e..3e220f28 100644 --- a/020run.cc +++ b/020run.cc @@ -78,11 +78,7 @@ void run_current_routine() switch (current_instruction().operation) { // Primitive Recipe Implementations case COPY: { - products.resize(ingredients.size()); - for (index_t i = 0; i < ingredients.size(); ++i) { - copy(ingredients.at(i).begin(), ingredients.at(i).end(), inserter(products.at(i), products.at(i).begin())); - } -//? copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); + copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); break; } // End Primitive Recipe Implementations @@ -188,14 +184,10 @@ vector<long long int> read_memory(reagent x) { return result; } index_t base = x.value; -//? cerr << "AAA " << base << '\n'; //? 1 - assert(!is_negative(base)); - base = value(base); size_t size = size_of(x); for (index_t offset = 0; offset < size; ++offset) { long long int val = Memory[base+offset]; -//? cerr << "AAA2 " << val << '\n'; //? 1 - trace("mem") << "location " << base+offset << " is " << value(val); + trace("mem") << "location " << base+offset << " is " << val; result.push_back(val); } return result; @@ -203,20 +195,11 @@ vector<long long int> read_memory(reagent x) { void write_memory(reagent x, vector<long long int> data) { if (is_dummy(x)) return; - // Preprocess x. - // End Preprocess x. index_t base = x.value; - assert(!is_negative(base)); - base = value(base); if (size_of(x) != data.size()) raise << "size mismatch in storing to " << x.to_string() << '\n'; -//? cerr << "BBB " << base << '\n'; //? 1 for (index_t offset = 0; offset < data.size(); ++offset) { - trace("mem") << "storing " << value(data.at(offset)) << " in location " << base+offset; -//? if (base+offset > 99999) { //? 1 -//? raise << "AAAAAAAAAAAAAAAAAAAAA\n"; //? 1 -//? Trace_stream->newline(), exit(0); //? 1 -//? } //? 1 + trace("mem") << "storing " << data.at(offset) << " in location " << base+offset; Memory[base+offset] = data.at(offset); } } |