diff options
Diffstat (limited to 'cpp/032array')
-rw-r--r-- | cpp/032array | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/032array b/cpp/032array index 84ee4d38..284ca592 100644 --- a/cpp/032array +++ b/cpp/032array @@ -98,21 +98,23 @@ case INDEX: { //? if (Trace_stream) Trace_stream->dump_layer = "run"; //? 1 trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].to_string(); reagent base = canonize(instructions[pc].ingredients[0]); -//? trace("run") << "ingredient 0 after canonize: " << instructions[pc].ingredients[0].to_string(); //? 1 +//? trace("run") << "ingredient 0 after canonize: " << base.to_string(); //? 1 int base_address = base.value; assert(base.types[0] == ARRAY); trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].to_string(); reagent offset = canonize(instructions[pc].ingredients[1]); +//? trace("run") << "ingredient 1 after canonize: " << offset.to_string(); //? 1 vector<int> offset_val(read_memory(offset)); vector<type_number> element_type = array_element(base.types); +//? trace("run") << "offset: " << offset_val[0]; //? 1 +//? trace("run") << "size of elements: " << size_of(element_type); //? 1 int src = base_address + 1 + offset_val[0]*size_of(element_type); trace("run") << "address to copy is " << src; trace("run") << "its type is " << element_type[0]; reagent tmp; tmp.set_value(src); copy(element_type.begin(), element_type.end(), inserter(tmp.types, tmp.types.begin())); - tmp.properties.push_back(pair<string, vector<string> >("raw", vector<string>())); -//? cout << "AAA: " << tmp.to_string() << '\n'; //? 2 +//? trace("run") << "AAA: " << tmp.to_string() << '\n'; //? 3 vector<int> result(read_memory(tmp)); trace("run") << "product 0 is " << result[0]; write_memory(instructions[pc].products[0], result); |