comparison src/structs.h @ 6565:38add5a3d617 v7.4.609

updated for version 7.4.609 Problem: For complicated list and dict use the garbage collector can run out of stack space. Solution: Use a stack of dicts and lists to be marked, thus making it iterative instead of recursive. (Ben Fritz)
author Bram Moolenaar <bram@vim.org>
date Tue, 03 Feb 2015 12:55:18 +0100
parents ccb6962585f1
children 27d9a4d8c168
comparison
equal deleted inserted replaced
6564:84171683fd66 6565:38add5a3d617
1220 hashtab_T dv_hashtab; /* hashtab that refers to the items */ 1220 hashtab_T dv_hashtab; /* hashtab that refers to the items */
1221 dict_T *dv_copydict; /* copied dict used by deepcopy() */ 1221 dict_T *dv_copydict; /* copied dict used by deepcopy() */
1222 dict_T *dv_used_next; /* next dict in used dicts list */ 1222 dict_T *dv_used_next; /* next dict in used dicts list */
1223 dict_T *dv_used_prev; /* previous dict in used dicts list */ 1223 dict_T *dv_used_prev; /* previous dict in used dicts list */
1224 }; 1224 };
1225
1226 /* structure used for explicit stack while garbage collecting hash tables */
1227 typedef struct ht_stack_S
1228 {
1229 hashtab_T *ht;
1230 struct ht_stack_S *prev;
1231 } ht_stack_T;
1232
1233 /* structure used for explicit stack while garbage collecting lists */
1234 typedef struct list_stack_S
1235 {
1236 list_T *list;
1237 struct list_stack_S *prev;
1238 } list_stack_T;
1225 1239
1226 /* values for b_syn_spell: what to do with toplevel text */ 1240 /* values for b_syn_spell: what to do with toplevel text */
1227 #define SYNSPL_DEFAULT 0 /* spell check if @Spell not defined */ 1241 #define SYNSPL_DEFAULT 0 /* spell check if @Spell not defined */
1228 #define SYNSPL_TOP 1 /* spell check toplevel text */ 1242 #define SYNSPL_TOP 1 /* spell check toplevel text */
1229 #define SYNSPL_NOTOP 2 /* don't spell check toplevel text */ 1243 #define SYNSPL_NOTOP 2 /* don't spell check toplevel text */