Mercurial > vim
diff src/proto/eval.pro @ 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 | e13f8073c9f9 |
children | 676906c33768 |
line wrap: on
line diff
--- a/src/proto/eval.pro +++ b/src/proto/eval.pro @@ -62,9 +62,9 @@ int list_insert_tv __ARGS((list_T *l, ty void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item)); void vimlist_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2)); int garbage_collect __ARGS((void)); -void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID)); -void set_ref_in_list __ARGS((list_T *l, int copyID)); -void set_ref_in_item __ARGS((typval_T *tv, int copyID)); +int set_ref_in_ht __ARGS((hashtab_T *ht, int copyID, list_stack_T **list_stack)); +int set_ref_in_list __ARGS((list_T *l, int copyID, ht_stack_T **ht_stack)); +int set_ref_in_item __ARGS((typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack)); dict_T *dict_alloc __ARGS((void)); void dict_unref __ARGS((dict_T *d)); void dict_free __ARGS((dict_T *d, int recurse));