<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Dec 7, 2012, at 10:27 , Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 7, 2012, at 9:36 AM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:</div></div><div><blockquote type="cite"><blockquote type="cite" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> // invalidate that region. This is because a block may capture<br> // a pointer value, but the thing pointed by that pointer may<br> // get invalidated.<br>- Store store = B.getRootWithoutRetain();<br>+ Store store = B.asImmutableMap().getRootWithoutRetain();<br> SVal V = RM.getBinding(store, loc::MemRegionVal(VR));<br></blockquote><br style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">This is an unfortunate impedance mismatch.</span><br style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"></blockquote><div><br></div><div>Impedance mismatch? Please elucidate.</div><br><blockquote type="cite"><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><blockquote type="cite" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">StoreRef RegionStoreManager::BindArray(Store store, const TypedValueRegion* R,<br>@@ -1724,9 +1813,9 @@<br><br> // There may be fewer values in the initialize list than the fields of struct.<br> if (FI != FE) {<br>- RegionBindings B = GetRegionBindings(newStore.getStore());<br>- B = addBinding(B, R, BindingKey::Default, svalBuilder.makeIntVal(0, false));<br>- newStore = StoreRef(B.getRootWithoutRetain(), *this);<br>+ RegionBindingsRef B = getRegionBindings(newStore.getStore());<br>+ B = B.addBinding(R, BindingKey::Default, svalBuilder.makeIntVal(0, false));<br>+ newStore = StoreRef(B.asImmutableMap().getRootWithoutRetain(), *this);<br> }<span class="Apple-converted-space"> </span><br></blockquote><br style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Same impedance mismatch in BindStruct, BindVector, and BindArray. For that matter, it's worse: we know that all the bindings will happen in a single cluster.</span></blockquote></div><br><div>Not sure what you mean by impedance mismatch. I do agree that asImmutableMap().getRootWithoutRetain() chain is gross, and can be sugared up. Is that what you mean?</div></div></blockquote></div><br><div>In both cases, we're converting back and forth between Store(Ref) and RegionBindingsRef. Before that was annoying but not a huge performance hit, but now it means we're canonicalizing earlier than we otherwise would.</div><div><br></div><div>Jordan</div></body></html>