Add note about invariants
commit18e632b75a8d2852b2e65a958a5a8f0d2f0f3362
authorNeil Mitchell <ndmitchell@gmail.com>
dateThu 4 Jan 2018, 12:29 (9 years ago)
parent0f72a82
gen/test.c+1
@@ -39,6 +39,7 @@ typedef struct
3939 // when you commit, you copy over from end to front
4040
4141 // nodes
42+ // Invariant: Always at least one free spot (to do copying from front to back)
4243 int size;
4344 int used_front; // front entries, stored for good
4445 int used_back; // back entries, stack based, copied into front on </close>