]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
remove CountMethods(), FillMethodList() functions
authorAleksey Demakov <ademakov@gmail.com>
Fri, 30 Sep 2011 09:08:21 +0000 (16:08 +0700)
committerAleksey Demakov <ademakov@gmail.com>
Fri, 30 Sep 2011 09:08:21 +0000 (16:08 +0700)
jit/jit-cache.c

index 7351445914e21ac147d46d7119252115adc6f4d7..bf2ceefea91155357a31759024973e8f4086b9b1 100644 (file)
@@ -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.
  */