From 5c3e3e39c3bdf28ac99a585793eaf151ebc9521c Mon Sep 17 00:00:00 2001 From: Aleksey Demakov Date: Fri, 30 Sep 2011 16:08:21 +0700 Subject: [PATCH] remove CountMethods(), FillMethodList() functions --- jit/jit-cache.c | 60 ------------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/jit/jit-cache.c b/jit/jit-cache.c index 7351445..bf2ceef 100644 --- a/jit/jit-cache.c +++ b/jit/jit-cache.c @@ -1172,66 +1172,6 @@ failed: return 0; } -/* - * Count the number of methods in a sub-tree. - */ -static unsigned long CountMethods(jit_cache_method_t node, - jit_cache_method_t nil, - void **prev) -{ - unsigned long num; - - /* Bail out if we've reached a leaf */ - if(node == nil) - { - return 0; - } - - /* Count the number of methods in the left sub-tree */ - num = CountMethods(GetLeft(node), nil, prev); - - /* Process the current node */ - if(node->method != 0 && node->method != *prev) - { - ++num; - *prev = node->method; - } - - /* Count the number of methods in the right sub-tree */ - return num + CountMethods(GetRight(node), nil, prev); -} - -/* - * Fill a list with methods. - */ -static unsigned long FillMethodList(void **list, - jit_cache_method_t node, - jit_cache_method_t nil, - void **prev) -{ - unsigned long num; - - /* Bail out if we've reached a leaf */ - if(node == nil) - { - return 0; - } - - /* Process the methods in the left sub-tree */ - num = FillMethodList(list, GetLeft(node), nil, prev); - - /* Process the current node */ - if(node->method != 0 && node->method != *prev) - { - list[num] = node->method; - ++num; - *prev = node->method; - } - - /* Process the methods in the right sub-tree */ - return num + FillMethodList(list + num, GetRight(node), nil, prev); -} - /* * Temporary structure for iterating over a method's debug list. */ -- 2.47.3