|
Karsten Hopp |
d12698 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
d12698 |
Subject: Patch 7.2.005
|
|
Karsten Hopp |
d12698 |
Fcc: outbox
|
|
Karsten Hopp |
d12698 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
d12698 |
Mime-Version: 1.0
|
|
Karsten Hopp |
d12698 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
d12698 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
d12698 |
------------
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
Patch 7.2.005
|
|
Karsten Hopp |
d12698 |
Problem: A few problems when profiling. Using flag pointer instead of flag
|
|
Karsten Hopp |
d12698 |
value. Allocating zero bytes. Not freeing used memory.
|
|
Karsten Hopp |
d12698 |
Solution: Remove wrong '&' characters. Skip dumping when there is nothing
|
|
Karsten Hopp |
d12698 |
to dump. Free used memory. (Dominique Pelle)
|
|
Karsten Hopp |
d12698 |
Files: src/eval.c
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
*** ../vim-7.2.004/src/eval.c Fri Aug 8 12:36:31 2008
|
|
Karsten Hopp |
d12698 |
--- src/eval.c Mon Aug 25 04:40:11 2008
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 3657,3664 ****
|
|
Karsten Hopp |
d12698 |
}
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
/*
|
|
Karsten Hopp |
d12698 |
! * Return TRUE if typeval "tv" is locked: Either tha value is locked itself or
|
|
Karsten Hopp |
d12698 |
! * it refers to a List or Dictionary that is locked.
|
|
Karsten Hopp |
d12698 |
*/
|
|
Karsten Hopp |
d12698 |
static int
|
|
Karsten Hopp |
d12698 |
tv_islocked(tv)
|
|
Karsten Hopp |
d12698 |
--- 3657,3664 ----
|
|
Karsten Hopp |
d12698 |
}
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
/*
|
|
Karsten Hopp |
d12698 |
! * Return TRUE if typeval "tv" is locked: Either that value is locked itself
|
|
Karsten Hopp |
d12698 |
! * or it refers to a List or Dictionary that is locked.
|
|
Karsten Hopp |
d12698 |
*/
|
|
Karsten Hopp |
d12698 |
static int
|
|
Karsten Hopp |
d12698 |
tv_islocked(tv)
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 15838,15847 ****
|
|
Karsten Hopp |
d12698 |
if (res == FAIL)
|
|
Karsten Hopp |
d12698 |
res = ITEM_COMPARE_FAIL;
|
|
Karsten Hopp |
d12698 |
else
|
|
Karsten Hopp |
d12698 |
- /* return value has wrong type */
|
|
Karsten Hopp |
d12698 |
res = get_tv_number_chk(&rettv, &item_compare_func_err);
|
|
Karsten Hopp |
d12698 |
if (item_compare_func_err)
|
|
Karsten Hopp |
d12698 |
! res = ITEM_COMPARE_FAIL;
|
|
Karsten Hopp |
d12698 |
clear_tv(&rettv);
|
|
Karsten Hopp |
d12698 |
return res;
|
|
Karsten Hopp |
d12698 |
}
|
|
Karsten Hopp |
d12698 |
--- 15838,15846 ----
|
|
Karsten Hopp |
d12698 |
if (res == FAIL)
|
|
Karsten Hopp |
d12698 |
res = ITEM_COMPARE_FAIL;
|
|
Karsten Hopp |
d12698 |
else
|
|
Karsten Hopp |
d12698 |
res = get_tv_number_chk(&rettv, &item_compare_func_err);
|
|
Karsten Hopp |
d12698 |
if (item_compare_func_err)
|
|
Karsten Hopp |
d12698 |
! res = ITEM_COMPARE_FAIL; /* return value has wrong type */
|
|
Karsten Hopp |
d12698 |
clear_tv(&rettv);
|
|
Karsten Hopp |
d12698 |
return res;
|
|
Karsten Hopp |
d12698 |
}
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 20590,20595 ****
|
|
Karsten Hopp |
d12698 |
--- 20589,20597 ----
|
|
Karsten Hopp |
d12698 |
int st_len = 0;
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
todo = (int)func_hashtab.ht_used;
|
|
Karsten Hopp |
d12698 |
+ if (todo == 0)
|
|
Karsten Hopp |
d12698 |
+ return; /* nothing to dump */
|
|
Karsten Hopp |
d12698 |
+
|
|
Karsten Hopp |
d12698 |
sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T) * todo));
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
for (hi = func_hashtab.ht_array; todo > 0; ++hi)
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 20638,20643 ****
|
|
Karsten Hopp |
d12698 |
--- 20640,20647 ----
|
|
Karsten Hopp |
d12698 |
prof_self_cmp);
|
|
Karsten Hopp |
d12698 |
prof_sort_list(fd, sorttab, st_len, "SELF", TRUE);
|
|
Karsten Hopp |
d12698 |
}
|
|
Karsten Hopp |
d12698 |
+
|
|
Karsten Hopp |
d12698 |
+ vim_free(sorttab);
|
|
Karsten Hopp |
d12698 |
}
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
static void
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 21204,21210 ****
|
|
Karsten Hopp |
d12698 |
if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL))
|
|
Karsten Hopp |
d12698 |
func_do_profile(fp);
|
|
Karsten Hopp |
d12698 |
if (fp->uf_profiling
|
|
Karsten Hopp |
d12698 |
! || (fc.caller != NULL && &fc.caller->func->uf_profiling))
|
|
Karsten Hopp |
d12698 |
{
|
|
Karsten Hopp |
d12698 |
++fp->uf_tm_count;
|
|
Karsten Hopp |
d12698 |
profile_start(&call_start);
|
|
Karsten Hopp |
d12698 |
--- 21208,21214 ----
|
|
Karsten Hopp |
d12698 |
if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL))
|
|
Karsten Hopp |
d12698 |
func_do_profile(fp);
|
|
Karsten Hopp |
d12698 |
if (fp->uf_profiling
|
|
Karsten Hopp |
d12698 |
! || (fc.caller != NULL && fc.caller->func->uf_profiling))
|
|
Karsten Hopp |
d12698 |
{
|
|
Karsten Hopp |
d12698 |
++fp->uf_tm_count;
|
|
Karsten Hopp |
d12698 |
profile_start(&call_start);
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 21235,21247 ****
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
#ifdef FEAT_PROFILE
|
|
Karsten Hopp |
d12698 |
if (do_profiling == PROF_YES && (fp->uf_profiling
|
|
Karsten Hopp |
d12698 |
! || (fc.caller != NULL && &fc.caller->func->uf_profiling)))
|
|
Karsten Hopp |
d12698 |
{
|
|
Karsten Hopp |
d12698 |
profile_end(&call_start);
|
|
Karsten Hopp |
d12698 |
profile_sub_wait(&wait_start, &call_start);
|
|
Karsten Hopp |
d12698 |
profile_add(&fp->uf_tm_total, &call_start);
|
|
Karsten Hopp |
d12698 |
profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children);
|
|
Karsten Hopp |
d12698 |
! if (fc.caller != NULL && &fc.caller->func->uf_profiling)
|
|
Karsten Hopp |
d12698 |
{
|
|
Karsten Hopp |
d12698 |
profile_add(&fc.caller->func->uf_tm_children, &call_start);
|
|
Karsten Hopp |
d12698 |
profile_add(&fc.caller->func->uf_tml_children, &call_start);
|
|
Karsten Hopp |
d12698 |
--- 21239,21251 ----
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
#ifdef FEAT_PROFILE
|
|
Karsten Hopp |
d12698 |
if (do_profiling == PROF_YES && (fp->uf_profiling
|
|
Karsten Hopp |
d12698 |
! || (fc.caller != NULL && fc.caller->func->uf_profiling)))
|
|
Karsten Hopp |
d12698 |
{
|
|
Karsten Hopp |
d12698 |
profile_end(&call_start);
|
|
Karsten Hopp |
d12698 |
profile_sub_wait(&wait_start, &call_start);
|
|
Karsten Hopp |
d12698 |
profile_add(&fp->uf_tm_total, &call_start);
|
|
Karsten Hopp |
d12698 |
profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children);
|
|
Karsten Hopp |
d12698 |
! if (fc.caller != NULL && fc.caller->func->uf_profiling)
|
|
Karsten Hopp |
d12698 |
{
|
|
Karsten Hopp |
d12698 |
profile_add(&fc.caller->func->uf_tm_children, &call_start);
|
|
Karsten Hopp |
d12698 |
profile_add(&fc.caller->func->uf_tml_children, &call_start);
|
|
Karsten Hopp |
d12698 |
*** ../vim-7.2.004/src/version.c Mon Aug 25 04:35:13 2008
|
|
Karsten Hopp |
d12698 |
--- src/version.c Mon Aug 25 04:46:44 2008
|
|
Karsten Hopp |
d12698 |
***************
|
|
Karsten Hopp |
d12698 |
*** 678,679 ****
|
|
Karsten Hopp |
d12698 |
--- 678,681 ----
|
|
Karsten Hopp |
d12698 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
d12698 |
+ /**/
|
|
Karsten Hopp |
d12698 |
+ 5,
|
|
Karsten Hopp |
d12698 |
/**/
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
--
|
|
Karsten Hopp |
d12698 |
The process for understanding customers primarily involves sitting around with
|
|
Karsten Hopp |
d12698 |
other marketing people and talking about what you would to if you were dumb
|
|
Karsten Hopp |
d12698 |
enough to be a customer.
|
|
Karsten Hopp |
d12698 |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
d12698 |
|
|
Karsten Hopp |
d12698 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
d12698 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
d12698 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
d12698 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|