On Sun, Jun 7, 2015 at 9:00 AM, Keean Schupke <[email protected]> wrote:

> On 7 June 2015 at 16:32, Jonathan S. Shapiro <[email protected]> wrote:
>
>>

> Backtracking seems to be one of those things that's harder to do without
>> GC.
>>
>
> The way to implement backtracking is with a vector of unique pointers, so
> that popping the vector de-constructs the heap objects.
>

Umm. Actually, that sounds pretty expensive. The problem isn't popping the
vector. The problem is the unnecessary constructions you're going to do
every time you *grow* the vector. You want a vector of pointers, not a
vector of objects. Though even that's a problem, because the parse stack
elements don't have homogeneous type.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to