From 65c905fe84c0e8b7acd6839469d7bb9727f0632b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 20 Feb 2016 20:05:52 -0800 Subject: 2678 Start using type names from the type tree rather than the property tree in most places. Hopefully the only occurrences of 'properties.at(0).second' left are ones where we're managing it. Next we can stop writing to it. --- 037new.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '037new.cc') diff --git a/037new.cc b/037new.cc index fdda83fb..c7453ae5 100644 --- a/037new.cc +++ b/037new.cc @@ -34,13 +34,13 @@ type_ordinal shared = put(Type_ordinal, "shared", Next_type_ordinal++); get_or_insert(Type, shared).name = "shared"; :(before "End Drop Address In lookup_memory(x)") -if (x.properties.at(0).second->value == "shared") { +if (x.type->name == "shared") { trace(9999, "mem") << "skipping refcount at " << x.value << end(); x.set_value(x.value+1); // skip refcount drop_from_type(x, "shared"); } :(before "End Drop Address In canonize_type(r)") -if (r.properties.at(0).second->value == "shared") { +if (r.type->name == "shared") { drop_from_type(r, "shared"); } @@ -655,5 +655,5 @@ string read_mu_string(long long int address) { bool is_mu_type_literal(reagent r) { //? if (!r.properties.empty()) //? dump_property(r.properties.at(0).second, cerr); - return is_literal(r) && !r.properties.empty() && r.properties.at(0).second && r.properties.at(0).second->value == "type"; + return is_literal(r) && !r.properties.empty() && r.properties.at(0).second && r.type->name == "type"; } -- cgit 1.4.1-2-gfad0