<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 13, 2008, at 4:52 PM, Zhongxing Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: 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: 0; "><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; ">We'll need to iterate on this one. We may end up applying your patch back, so please don't take my reverting it personally.<br><br>Consider:<br><br>char* p = alloca(BLOCK);<br>new (p) Object1();<br>...<br>new (p) Object2();<br><br>Untyped memory can be recycled. While this won't occur that often, I think with the right design we can handle such things naturally.<br><font color="#888888"></font></blockquote><div><br>I agree that another indirection is necessary, since:<br> - We have no type information when creating AllocaRegion.<br> - We have to attach type information to AllocaRegion.<br> - Regions are immutable once created.<span class="Apple-converted-space"> </span><br></div></div><br>The question remains is that when shall we create this indirect layer. A plausible time is when we have the type information, we create the indirect layer.</span></blockquote></div><br><div>A reasonable insertion point for such information is during VisitCast when the "interpretation" of a pointer changes. We have a fair amount of flexibility in how we add such information because VisitCast can generate new GRStates.</div></body></html>