summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-02-03 12:55:18 +0100
committerBram Moolenaar <Bram@vim.org>2015-02-03 12:55:18 +0100
commit2459a5ecaa43c8549ea53e9364253ff891676da5 (patch)
treeb503323856e11d0e1e47e6c81875d32b1541ee04 /src/structs.h
parent4ac163ae5f137af236931e778660cf7878d70c25 (diff)
downloadvim-git-2459a5ecaa43c8549ea53e9364253ff891676da5.tar.gz
updated for version 7.4.609v7.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)
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index 7e60a387a..60bc870eb 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1223,6 +1223,20 @@ struct dictvar_S
dict_T *dv_used_prev; /* previous dict in used dicts list */
};
+/* structure used for explicit stack while garbage collecting hash tables */
+typedef struct ht_stack_S
+{
+ hashtab_T *ht;
+ struct ht_stack_S *prev;
+} ht_stack_T;
+
+/* structure used for explicit stack while garbage collecting lists */
+typedef struct list_stack_S
+{
+ list_T *list;
+ struct list_stack_S *prev;
+} list_stack_T;
+
/* values for b_syn_spell: what to do with toplevel text */
#define SYNSPL_DEFAULT 0 /* spell check if @Spell not defined */
#define SYNSPL_TOP 1 /* spell check toplevel text */