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 $
*/
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);
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 $
*/
OPT_VERBOSETC,
#endif
#endif /* defined(ENABLE_VERIFIER) */
- OPT_EAGER,
/* optimization options */
{ "log", true, OPT_LOG },
{ "c", true, OPT_CHECK },
{ "l", false, OPT_LOAD },
- { "eager", false, OPT_EAGER },
#if !defined(NDEBUG)
{ "all", false, OPT_ALL },
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");
makeinitializations = false;
break;
- case OPT_EAGER:
- opt_eager = true;
- break;
-
#if !defined(NDEBUG)
case OPT_ALL:
compileall = true;
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 */
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 $
*/
/* global variables ***********************************************************/
-extern list_t unlinkedclasses; /* this is only used for eager class loading */
-
-
/* frequently used classes ****************************************************/
/* important system classes */
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 $
*/
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;
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!
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;
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;
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;
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 $
*/
#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;
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 $
*/
#if defined(ENABLE_VERIFIER)
extern bool opt_verify;
#endif
-extern bool opt_eager;
#if defined(ENABLE_PROFILING)
extern bool opt_prof;