From b38e581993c4e7ae001572cbdb1855bc8d8db5b3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 17 Apr 2015 21:51:13 -0700 Subject: 1090 --- cpp/032array | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpp/032array') 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 offset_val(read_memory(offset)); vector 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 >("raw", vector())); -//? cout << "AAA: " << tmp.to_string() << '\n'; //? 2 +//? trace("run") << "AAA: " << tmp.to_string() << '\n'; //? 3 vector result(read_memory(tmp)); trace("run") << "product 0 is " << result[0]; write_memory(instructions[pc].products[0], result); -- cgit 1.4.1-2-gfad0