* src/vm/string.c,
authortwisti <none@none>
Wed, 25 Jul 2007 08:23:10 +0000 (08:23 +0000)
committertwisti <none@none>
Wed, 25 Jul 2007 08:23:10 +0000 (08:23 +0000)
src/vm/vm.c,
src/vmcore/class.c,
src/vmcore/class.h,
src/vmcore/loader.c,
src/vmcore/options.c,
src/vmcore/options.h: Removed eager-loading stuff (as it was broken
anyways).

src/vm/string.c
src/vm/vm.c
src/vmcore/class.c
src/vmcore/class.h
src/vmcore/loader.c
src/vmcore/options.c
src/vmcore/options.h

index 6cea9bafb6cea52fd2d52945b67ef678e4ea7cee..899a9176099b4901343523719b15e9ffd44e59ed 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: string.c 8123 2007-06-20 23:50:55Z michi $
+   $Id: string.c 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
@@ -566,11 +566,6 @@ java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset,
        assert(class_java_lang_String);
        assert(class_java_lang_String->state & CLASS_LOADED);
 
-       /* if we use eager loading, we have to check loaded String class */
-
-       if (opt_eager)
-               list_add_first(&unlinkedclasses, class_java_lang_String);
-
        /* create new javastring */
 
        js = NEW(java_lang_String);
index 70132fdd78be06afe61a7395d8ee096d2dc64361..34fcc86c0f34c97d724a93ed7a6d4426ea1ca58a 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: vm.c 8213 2007-07-18 20:08:26Z michi $
+   $Id: vm.c 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
@@ -231,7 +231,6 @@ enum {
        OPT_VERBOSETC,
 #endif
 #endif /* defined(ENABLE_VERIFIER) */
-       OPT_EAGER,
 
        /* optimization options */
 
@@ -346,7 +345,6 @@ opt_struct opts[] = {
        { "log",               true,  OPT_LOG },
        { "c",                 true,  OPT_CHECK },
        { "l",                 false, OPT_LOAD },
-       { "eager",             false, OPT_EAGER },
 
 #if !defined(NDEBUG)
        { "all",               false, OPT_ALL },
@@ -561,7 +559,6 @@ static void XXusage(void)
        puts("    -oloop                   optimize array accesses in loops");
 #endif
        puts("    -l                       don't start the class after loading");
-       puts("    -eager                   perform eager class loading and linking");
 #if !defined(NDEBUG)
        puts("    -all                     compile all methods, no execution");
        puts("    -m                       compile only a specific method");
@@ -1240,10 +1237,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        makeinitializations = false;
                        break;
 
-               case OPT_EAGER:
-                       opt_eager = true;
-                       break;
-
 #if !defined(NDEBUG)
                case OPT_ALL:
                        compileall = true;
index 4008c3cf889e10a73fbba09d03100418341a9208..8a487f97db17319eeaf56023cdef856ed1e33c5c 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: class.c 8223 2007-07-22 20:43:05Z twisti $
+   $Id: class.c 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
 
 /* global variables ***********************************************************/
 
-list_t unlinkedclasses;                 /* this is only used for eager class  */
-                                        /* loading                            */
-
-
 /* frequently used classes ****************************************************/
 
 /* important system classes */
index 91d1cda182f7de306dc0e5fb948159c009a53d0b..bac8f2accba11d820b8147d82fa614f11126790e 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: class.h 8224 2007-07-23 19:07:48Z twisti $
+   $Id: class.h 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
@@ -187,9 +187,6 @@ struct castinfo {
 
 /* global variables ***********************************************************/
 
-extern list_t unlinkedclasses; /* this is only used for eager class loading   */
-
-
 /* frequently used classes ****************************************************/
 
 /* important system classes */
index 9b0a0f76e69fdc8cee290f89ba48feec5746d643..9962c2c7d6ff6a40b654c9a702ca7b1cc8c6acec 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: loader.c 8228 2007-07-24 12:37:25Z twisti $
+   $Id: loader.c 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
@@ -649,17 +649,6 @@ static bool load_constantpool(classbuffer *cb, descriptor_pool *descpool)
 
                cptags[forward_classes->thisindex] = CONSTANT_Class;
 
-               if (opt_eager) {
-                       classinfo *tc;
-
-                       if (!(tc = load_class_bootstrap(name)))
-                               return false;
-
-                       /* link the class later, because we cannot link the class currently
-                          loading */
-                       list_add_first(&unlinkedclasses, tc);
-               }
-
                /* the classref is created later */
                cpinfos[forward_classes->thisindex] = name;
 
@@ -1207,9 +1196,6 @@ classinfo *load_class_bootstrap(utf *name)
    The super class and the interfaces implemented by this class need
    not be loaded. The link is set later by the function 'class_link'.
 
-   The loaded class is removed from the list 'unloadedclasses' and
-   added to the list 'unlinkedclasses'.
-       
    SYNCHRONIZATION:
        This function is NOT synchronized!
    
@@ -1809,10 +1795,6 @@ classinfo *load_newly_created_array(classinfo *c, java_objectheader *loader)
 
                assert(comp->state & CLASS_LOADED);
 
-               if (opt_eager)
-                       if (!link_class(c))
-                               return NULL;
-
                /* the array's flags are that of the component class */
                c->flags = (comp->flags & ~ACC_INTERFACE) | ACC_FINAL | ACC_ABSTRACT;
                c->classloader = comp->classloader;
@@ -1834,10 +1816,6 @@ classinfo *load_newly_created_array(classinfo *c, java_objectheader *loader)
 
                assert(comp->state & CLASS_LOADED);
 
-               if (opt_eager)
-                       if (!link_class(c))
-                               return NULL;
-
                /* the array's flags are that of the component class */
                c->flags = (comp->flags & ~ACC_INTERFACE) | ACC_FINAL | ACC_ABSTRACT;
                c->classloader = comp->classloader;
@@ -1870,31 +1848,19 @@ classinfo *load_newly_created_array(classinfo *c, java_objectheader *loader)
        c->super.cls = class_java_lang_Object;
 
 #if defined(ENABLE_JAVASE)
-       c->interfacescount = 2;
-    c->interfaces      = MNEW(classref_or_classinfo, 2);
-
-       if (opt_eager) {
-               classinfo *tc;
 
-               tc = class_java_lang_Cloneable;
-               assert(tc->state & CLASS_LOADED);
-               list_add_first(&unlinkedclasses, tc);
-               c->interfaces[0].cls = tc;
+       c->interfacescount   = 2;
+    c->interfaces        = MNEW(classref_or_classinfo, 2);
+       c->interfaces[0].cls = class_java_lang_Cloneable;
+       c->interfaces[1].cls = class_java_io_Serializable;
 
-               tc = class_java_io_Serializable;
-               assert(tc->state & CLASS_LOADED);
-               list_add_first(&unlinkedclasses, tc);
-               c->interfaces[1].cls = tc;
-       }
-       else {
-               c->interfaces[0].cls = class_java_lang_Cloneable;
-               c->interfaces[1].cls = class_java_io_Serializable;
-       }
 #elif defined(ENABLE_JAVAME_CLDC1_1)
-       c->interfacescount = 0;
-       c->interfaces      = NULL;
+
+       c->interfacescount   = 0;
+       c->interfaces        = NULL;
+
 #else
-#error unknow Java configuration
+# error unknow Java configuration
 #endif
 
        c->methodscount = 1;
index fcb3897f58e1af166d51d830ba4f38daa02fbd40..d140630b9cf85b83d2c15b5e42796d9f609ee5cd 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: options.c 8220 2007-07-22 15:37:52Z twisti $
+   $Id: options.c 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
@@ -120,7 +120,6 @@ bool opt_getcompilingtime = false; /* compute compile time                   */
 #if defined(ENABLE_VERIFIER)
 bool opt_verify  = true;       /* true if classfiles should be verified      */
 #endif
-bool opt_eager   = false;
 
 #if defined(ENABLE_PROFILING)
 bool opt_prof    = false;
index 438a0f20689ce648aa837cd0f1f58196caa01e4a..110460a527c2cc3079bbfc2bf6e3ba93d3e4bc01 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: options.h 8220 2007-07-22 15:37:52Z twisti $
+   $Id: options.h 8230 2007-07-25 08:23:10Z twisti $
 
 */
 
@@ -135,7 +135,6 @@ extern bool opt_getcompilingtime;
 #if defined(ENABLE_VERIFIER)
 extern bool opt_verify;
 #endif
-extern bool opt_eager;
 
 #if defined(ENABLE_PROFILING)
 extern bool opt_prof;