On Nov 13, 2008, at 4:52 PM, Zhongxing Xu wrote:
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.
Consider:
char* p = alloca(BLOCK);
new (p) Object1();
...
new (p) Object2();
Untyped memory can be recycled. While this won't occur that often,
I think with the right design we can handle such things naturally.
I agree that another indirection is necessary, since:
- We have no type information when creating AllocaRegion.
- We have to attach type information to AllocaRegion.
- Regions are immutable once created.
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.
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._______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits