<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 11, 2011, at 9:12 AM, Anna Zaks wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; 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-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><br>On Aug 11, 2011, at 3:11 AM, Olaf Krzikalla wrote:<br><br><blockquote type="cite">Hi @clang,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I just stumbled over an annoying quirk in MemRegion's hierarchy. A<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">CodeTextRegion is derived from TypedRegion but conditionlessly asserts<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">on calls to getValueType. That doesn't seems right. The easiest way to<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">fix it is to introduce a TypedValueRegion derived from TypedRegion and<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">move the abstract getValueType to that new class. Then CodeTextRegion<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">derives from TypedRegion and all other classes from TypedValueRegion.<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">Alternatively we can rename TypedRegion to TypedLocationRegion and<span class="Apple-converted-space"> </span><br></blockquote><blockquote type="cite">derive TypedRegion from that class.<br></blockquote><br>Another option is to introduce LocationRegion to be a common predecessor to TypedRegion and CodeTextRegion. (I think this is the same as your second suggestion but with a shorter name.)</span></blockquote></div><br><div>I think adding a new region is a good direction.  I'm not a fan of LocationRegion or TypedLocationRegion because all regions represent locations, so the name seems content free to me.</div><div><br></div><div>Added a new TypedValueRegion, and having the current subclasses of TypedRegion other than CodeTextRegion subclass that sounds good to me.</div></body></html>