Removed fields from classinfo and related functions from descriptor pool.
authorStefan Ring <stefan@complang.tuwien.ac.at>
Wed, 30 Nov 2011 17:30:44 +0000 (18:30 +0100)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Wed, 30 Nov 2011 17:30:44 +0000 (18:30 +0100)
They were not used anywhere.
* src/vm/class.hpp: Removed parseddescsize, parseddescs.
* src/vm/descriptor.cpp: Removed descriptor_pool_get_parsed_descriptors.
* src/vm/descriptor.hpp: Likewise.
* src/vm/loader.cpp: Removed use of removed fields/methods.

src/vm/class.hpp
src/vm/descriptor.cpp
src/vm/descriptor.hpp
src/vm/loader.cpp

index 5b0c41c2e94846a23d54be3b8729523ef19f2205..e1675a0844243d01c7fb446c797de2bbc7209825 100644 (file)
@@ -105,8 +105,6 @@ struct classinfo {                /* class structure                          */
        s4          classrefcount;    /* number of symbolic class references      */
        constant_classref *classrefs; /* table of symbolic class references       */
        extra_classref *extclassrefs; /* additional classrefs                     */
        s4          classrefcount;    /* number of symbolic class references      */
        constant_classref *classrefs; /* table of symbolic class references       */
        extra_classref *extclassrefs; /* additional classrefs                     */
-       s4          parseddescsize;   /* size of the parsed descriptors block     */
-       u1         *parseddescs;      /* parsed descriptors                       */
 
        classinfo  *super;            /* super class                              */
        classinfo  *sub;              /* sub class pointer                        */
 
        classinfo  *super;            /* super class                              */
        classinfo  *sub;              /* sub class pointer                        */
@@ -462,6 +460,6 @@ void class_showconstantpool(classinfo *c);
  * indent-tabs-mode: t
  * c-basic-offset: 4
  * tab-width: 4
  * indent-tabs-mode: t
  * c-basic-offset: 4
  * tab-width: 4
- * vim:noexpandtab:sw=4:ts=4:
  * End:
  * End:
+ * vim:noexpandtab:sw=4:ts=4:
  */
  */
index d8e0e3443ddc4ba3fba393dba016bf5b16b52b1d..ec71b8095a016024947f6fb49640db1cb2e80264 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/descriptor.c - checking and parsing of field / method descriptors
 
 /* src/vm/descriptor.c - checking and parsing of field / method descriptors
 
-   Copyright (C) 1996-2005, 2006, 2007, 2008
+   Copyright (C) 1996-2011
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
@@ -1117,39 +1117,6 @@ bool descriptor_params_from_paramtypes(methoddesc *md, s4 mflags)
 }
 
 
 }
 
 
-/* descriptor_pool_get_parsed_descriptors **************************************
-   Return a pointer to the block of parsed descriptors
-
-   IN:
-       pool.............the descriptor_pool
-
-   OUT:
-          *size............if size is non-NULL, this is set to the size of the
-                           parsed descriptor block (in u1)
-
-   RETURN VALUE:
-       a pointer to the block of parsed descriptors
-
-   NOTE:
-       descriptor_pool_alloc_parsed_descriptors must be called (once)
-       before this function is used.
-
-*******************************************************************************/
-
-void * 
-descriptor_pool_get_parsed_descriptors(descriptor_pool *pool, s4 *size)
-{
-       assert(pool);
-       assert((!pool->fieldcount && !pool->methodcount) || pool->descriptors);
-       
-       if (size)
-               *size = pool->descriptorsize;
-
-       return pool->descriptors;
-}
-
-
 /* descriptor_pool_get_sizes ***************************************************
  
    Get the sizes of the class reference table and the parsed descriptors
 /* descriptor_pool_get_sizes ***************************************************
  
    Get the sizes of the class reference table and the parsed descriptors
index bf6c69efb458d7d3360f72bf23170af3b75a18a7..911ef297d96f1bada2a4ea837087ae0755ad3a6b 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/descriptor.h - checking and parsing of field / method descriptors
 
 /* src/vm/descriptor.h - checking and parsing of field / method descriptors
 
-   Copyright (C) 1996-2005, 2006, 2007, 2008
+   Copyright (C) 1996-2011
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
@@ -72,7 +72,6 @@ typedef struct methoddesc      methoddesc;
 /* 5. call descriptor_pool_alloc_parsed_descriptors                           */
 /* 6. for each field descriptor call descriptor_pool_parse_field_descriptor   */
 /*    for each method descriptor call descriptor_pool_parse_method_descriptor */
 /* 5. call descriptor_pool_alloc_parsed_descriptors                           */
 /* 6. for each field descriptor call descriptor_pool_parse_field_descriptor   */
 /*    for each method descriptor call descriptor_pool_parse_method_descriptor */
-/* 7. call descriptor_pool_get_parsed_descriptors                             */
 /*                                                                            */
 /* IMPORTANT: The descriptor_pool functions use DNEW and DMNEW for allocating */
 /*            memory which can be thrown away when the steps above have been  */
 /*                                                                            */
 /* IMPORTANT: The descriptor_pool functions use DNEW and DMNEW for allocating */
 /*            memory which can be thrown away when the steps above have been  */
@@ -175,7 +174,6 @@ methoddesc *descriptor_pool_parse_method_descriptor(descriptor_pool *pool, utf *
 
 bool descriptor_params_from_paramtypes(methoddesc *md, s4 mflags);
 
 
 bool descriptor_params_from_paramtypes(methoddesc *md, s4 mflags);
 
-void *descriptor_pool_get_parsed_descriptors(descriptor_pool *pool, s4 *size);
 void descriptor_pool_get_sizes(descriptor_pool *pool, u4 *classrefsize,
                                                           u4 *descsize);
 
 void descriptor_pool_get_sizes(descriptor_pool *pool, u4 *classrefsize,
                                                           u4 *descsize);
 
index de0cae192a481d3e572d6a17a01a454f6af30ff9..d8f01e816fd432456e49481c05b77ee027615496 100644 (file)
@@ -1593,7 +1593,6 @@ static bool load_class_from_classbuffer_intern(classbuffer *cb)
        /* allocate space for the parsed descriptors */
 
        descriptor_pool_alloc_parsed_descriptors(descpool);
        /* allocate space for the parsed descriptors */
 
        descriptor_pool_alloc_parsed_descriptors(descpool);
-       c->parseddescs = (u1*) descriptor_pool_get_parsed_descriptors(descpool, &(c->parseddescsize));
 
 #if defined(ENABLE_STATISTICS)
        if (opt_stat) {
 
 #if defined(ENABLE_STATISTICS)
        if (opt_stat) {
@@ -2148,8 +2147,6 @@ classinfo *load_newly_created_array(classinfo *c, classloader_t *loader)
        /* array classes are not loaded from class files */
 
        c->state          |= CLASS_LOADED;
        /* array classes are not loaded from class files */
 
        c->state          |= CLASS_LOADED;
-       c->parseddescs    = (u1 *) clonedesc;
-       c->parseddescsize = sizeof(methodinfo);
        c->classrefs      = classrefs;
        c->classrefcount  = 1;
 
        c->classrefs      = classrefs;
        c->classrefcount  = 1;