From 4f333377efe4b0959c72c090cc8eacc27f669c91 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 30 Sep 2015 01:34:23 -0700 Subject: 2219 --- 031address.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/031address.cc b/031address.cc index 7c4f1e34..46c38fd6 100644 --- a/031address.cc +++ b/031address.cc @@ -81,22 +81,14 @@ reagent lookup_memory(reagent x) { } :(after "bool types_match(reagent lhs, reagent rhs)") -if (!canonize_type(lhs)) return false; -if (!canonize_type(rhs)) return false; + if (!canonize_type(lhs)) return false; + if (!canonize_type(rhs)) return false; -:(replace{} "bool is_mu_array(reagent r)") -bool is_mu_array(reagent r) { - if (is_literal(r)) return false; +:(after "bool is_mu_array(reagent r)") if (!canonize_type(r)) return false; - return !r.types.empty() && r.types.at(0) == Type_ordinal["array"]; -} -:(replace{} "bool is_mu_address(reagent r)") -bool is_mu_address(reagent r) { - if (is_literal(r)) return false; +:(after "bool is_mu_address(reagent r)") if (!canonize_type(r)) return false; - return !r.types.empty() && r.types.at(0) == Type_ordinal["address"]; -} :(code) bool canonize_type(reagent& r) { -- cgit 1.4.1-2-gfad0