AC_CHECK_ENABLE_STATICVM
AC_CHECK_ENABLE_ANNOTATIONS
+AC_CHECK_ENABLE_ASSERTION
dnl where is CACAO's vm.zip
--- /dev/null
+dnl m4/assertion.m4
+dnl
+dnl Copyright (C) 2007
+dnl CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
+dnl
+dnl This file is part of CACAO.
+dnl
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check if java assertion support should be enabled
+
+AC_DEFUN([AC_CHECK_ENABLE_ASSERTION],[
+AC_MSG_CHECKING(wether to enable java assertion support)
+AC_ARG_ENABLE([assertion],
+ [AS_HELP_STRING(--enable-assertion,enable java assertion support [[default=yes]])],
+ [case "${enableval}" in
+ yes)
+ ENABLE_ASSERTION=yes
+ ;;
+ *)
+ ENABLE_ASSERTION=no
+ ;;
+ esac],
+ [ENABLE_ASSERTION=yes])
+AC_MSG_RESULT(${ENABLE_ASSERTION})
+AM_CONDITIONAL([ENABLE_ASSERTION], test x"${ENABLE_ASSERTION}" = "xyes")
+
+if test x"${ENABLE_ASSERTION}" = "xyes"; then
+ AC_DEFINE([ENABLE_ASSERTION], 1, [enable assertion])
+fi
+])
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.zip.ZipFile;
+import java.util.Collections;
+import java.lang.Boolean;
/**
* java.lang.VMClassLoader is a package-private helper for VMs to implement
* classes (those with a null ClassLoader), as well as the initial value for
* every ClassLoader's default assertion status.
*
- * XXX - Not implemented yet; this requires native help.
- *
* @return the system-wide default assertion status
*/
-// static final boolean defaultAssertionStatus()
-// {
-// return true;
-// }
static native final boolean defaultAssertionStatus();
+ static native final boolean defaultUserAssertionStatus();
+
+
+ static final Map packageAssertionMap =
+ Collections.unmodifiableMap(packageAssertionStatus0(Boolean.TRUE, Boolean.FALSE));
+
+ static native final Map packageAssertionStatus0(Boolean jtrue, Boolean jfalse);
/**
* The system default for package assertion status. This is used for all
* ClassLoader's packageAssertionStatus defaults. It must be a map of
* package names to Boolean.TRUE or Boolean.FALSE, with the unnamed package
* represented as a null key.
*
- * XXX - Not implemented yet; this requires native help.
- *
* @return a (read-only) map for the default packageAssertionStatus
*/
- static final Map packageAssertionStatus()
- {
- return new HashMap();
+
+ static final Map packageAssertionStatus() {
+ return packageAssertionMap;
}
+ static final Map classAssertionMap =
+ Collections.unmodifiableMap(classAssertionStatus0(Boolean.TRUE, Boolean.FALSE));
+
+ static native final Map classAssertionStatus0(Boolean jtrue, Boolean jfalse);
+
/**
* The system default for class assertion status. This is used for all
* ClassLoader's classAssertionStatus defaults. It must be a map of
* class names to Boolean.TRUE or Boolean.FALSE
*
- * XXX - Not implemented yet; this requires native help.
- *
* @return a (read-only) map for the default classAssertionStatus
*/
- static final Map classAssertionStatus()
- {
- return new HashMap();
+ static final Map classAssertionStatus() {
+ return classAssertionMap;
}
-
+
static ClassLoader getSystemClassLoader()
{
return ClassLoader.defaultGetSystemClassLoader();
java_lang_Integer.h \
java_lang_Long.h \
java_lang_Short.h \
- java_util_Vector.h
+ java_util_Vector.h \
+ java_util_HashMap.h \
+ java_util_Map.h
JAVASE_HEADER_FILES = \
java_lang_ClassLoader.h \
s4 java_lang_management_ThreadMXBean_PeakThreadCount;
s4 java_lang_management_ThreadMXBean_ThreadCount;
s8 java_lang_management_ThreadMXBean_TotalStartedThreadCount;
- s4 Java_java_lang_VMClassLoader_defaultAssertionStatus;
};
#include "native/include/java_security_ProtectionDomain.h" /* required by... */
#include "native/include/java_lang_ClassLoader.h"
#include "native/include/java_util_Vector.h"
+#include "native/include/java_util_HashMap.h"
+#include "native/include/java_util_Map.h"
+#include "native/include/java_lang_Boolean.h"
#include "native/include/java_lang_VMClassLoader.h"
#include "native/vm/java_lang_ClassLoader.h"
#include "toolbox/logging.h"
+#include "toolbox/list.h"
+
+#if defined(ENABLE_ASSERTION)
+#include "vm/assertion.h"
+#endif
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "native/jvmti/cacaodbg.h"
#endif
-
/* native methods implemented by this file ************************************/
static JNINativeMethod methods[] = {
- { "defineClass", "(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_defineClass },
- { "getPrimitiveClass", "(C)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_getPrimitiveClass },
- { "resolveClass", "(Ljava/lang/Class;)V", (void *) (ptrint) &Java_java_lang_VMClassLoader_resolveClass },
- { "loadClass", "(Ljava/lang/String;Z)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_loadClass },
- { "nativeGetResources", "(Ljava/lang/String;)Ljava/util/Vector;", (void *) (ptrint) &Java_java_lang_VMClassLoader_nativeGetResources },
- { "defaultAssertionStatus", "()Z", (void *) (ptrint) &Java_java_lang_VMClassLoader_defaultAssertionStatus },
- { "findLoadedClass", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_findLoadedClass },
+ { "defineClass", "(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_defineClass },
+ { "getPrimitiveClass", "(C)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_getPrimitiveClass },
+ { "resolveClass", "(Ljava/lang/Class;)V", (void *) (ptrint) &Java_java_lang_VMClassLoader_resolveClass },
+ { "loadClass", "(Ljava/lang/String;Z)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_loadClass },
+ { "nativeGetResources", "(Ljava/lang/String;)Ljava/util/Vector;", (void *) (ptrint) &Java_java_lang_VMClassLoader_nativeGetResources },
+ { "defaultAssertionStatus", "()Z", (void *) (ptrint) &Java_java_lang_VMClassLoader_defaultAssertionStatus },
+ { "defaultUserAssertionStatus", "()Z", (void *) (ptrint) &Java_java_lang_VMClassLoader_defaultUserAssertionStatus },
+ { "packageAssertionStatus0", "(Ljava/lang/Boolean;Ljava/lang/Boolean;)Ljava/util/Map;", (void *) (ptrint) &Java_java_lang_VMClassLoader_packageAssertionStatus0 },
+ { "classAssertionStatus0", "(Ljava/lang/Boolean;Ljava/lang/Boolean;)Ljava/util/Map;", (void *) (ptrint) &Java_java_lang_VMClassLoader_classAssertionStatus0 },
+ { "findLoadedClass", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Ljava/lang/Class;", (void *) (ptrint) &Java_java_lang_VMClassLoader_findLoadedClass },
};
*/
JNIEXPORT s4 JNICALL Java_java_lang_VMClassLoader_defaultAssertionStatus(JNIEnv *env, jclass clazz)
{
- return _Jv_jvm->Java_java_lang_VMClassLoader_defaultAssertionStatus;
+#if defined(ENABLE_ASSERTION)
+ return assertion_system_enabled;
+#else
+ return false;
+#endif
+}
+
+/*
+ * Class: java/lang/VMClassLoader
+ * Method: userAssertionStatus
+ * Signature: ()Z
+ */
+JNIEXPORT s4 JNICALL Java_java_lang_VMClassLoader_defaultUserAssertionStatus(JNIEnv *env, jclass clazz)
+{
+#if defined(ENABLE_ASSERTION)
+ return assertion_user_enabled;
+#else
+ return false;
+#endif
+}
+
+/*
+ * Class: java/lang/VMClassLoader
+ * Method: packageAssertionStatus
+ * Signature: ()Ljava_util_Map;
+ */
+JNIEXPORT java_util_Map* JNICALL Java_java_lang_VMClassLoader_packageAssertionStatus0(JNIEnv *env, jclass clazz, java_lang_Boolean *jtrue, java_lang_Boolean *jfalse)
+{
+ java_handle_t *hm;
+#if defined(ENABLE_ASSERTION)
+ java_handle_t *js;
+ methodinfo *m;
+ assertion_name_t *item;
+#endif
+
+ /* new HashMap() */
+
+ hm = native_new_and_init(class_java_util_HashMap);
+ if (hm == NULL) {
+ return NULL;
+ }
+
+#if defined(ENABLE_ASSERTION)
+ /* if nothing todo, return now */
+
+ if (assertion_package_count == 0) {
+ return (java_util_Map *) hm;
+ }
+
+ /* get HashMap.put method */
+
+ m = class_resolveclassmethod(class_java_util_HashMap,
+ utf_put,
+ utf_new_char("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"),
+ NULL,
+ true);
+
+ if (m == NULL) {
+ return NULL;
+ }
+
+ item = (assertion_name_t *)list_first(list_assertion_names);
+
+ while (item != NULL) {
+ if (item->package == false) {
+ item = (assertion_name_t *)list_next(list_assertion_names, item);
+ continue;
+ }
+
+ if (strcmp(item->name, "") == 0) {
+ /* unnamed package wanted */
+ js = NULL;
+ }
+ else {
+ js = javastring_new_from_ascii(item->name);
+ if (js == NULL) {
+ return NULL;
+ }
+ }
+
+ if (item->enabled == true) {
+ vm_call_method(m, hm, js, jtrue);
+ }
+ else {
+ vm_call_method(m, hm, js, jfalse);
+ }
+
+ item = (assertion_name_t *)list_next(list_assertion_names, item);
+ }
+#endif
+
+ return (java_util_Map *) hm;
+}
+
+/*
+ * Class: java/lang/VMClassLoader
+ * Method: classAssertionStatus
+ * Signature: ()Ljava_util_Map;
+ */
+JNIEXPORT java_util_Map* JNICALL Java_java_lang_VMClassLoader_classAssertionStatus0(JNIEnv *env, jclass clazz, java_lang_Boolean *jtrue, java_lang_Boolean *jfalse)
+{
+ java_handle_t *hm;
+#if defined(ENABLE_ASSERTION)
+ java_handle_t *js;
+ methodinfo *m;
+ assertion_name_t *item;
+#endif
+
+ /* new HashMap() */
+
+ hm = native_new_and_init(class_java_util_HashMap);
+ if (hm == NULL) {
+ return NULL;
+ }
+
+#if defined(ENABLE_ASSERTION)
+ /* if nothing todo, return now */
+
+ if (assertion_class_count == 0) {
+ return (java_util_Map *) hm;
+ }
+
+ /* get HashMap.put method */
+
+ m = class_resolveclassmethod(class_java_util_HashMap,
+ utf_put,
+ utf_new_char("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"),
+ NULL,
+ true);
+
+ if (m == NULL) {
+ return NULL;
+ }
+
+ item = (assertion_name_t *)list_first(list_assertion_names);
+
+ while (item != NULL) {
+ if (item->package == true) {
+ item = (assertion_name_t *)list_next(list_assertion_names, item);
+ continue;
+ }
+
+ js = javastring_new_from_ascii(item->name);
+ if (js == NULL) {
+ return NULL;
+ }
+
+ if (item->enabled == true) {
+ vm_call_method(m, hm, js, jtrue);
+ }
+ else {
+ vm_call_method(m, hm, js, jfalse);
+ }
+
+ item = (assertion_name_t *)list_next(list_assertion_names, item);
+ }
+#endif
+
+ return (java_util_Map *) hm;
}
#include "threads/threads-common.h"
#include "toolbox/logging.h"
+#include "toolbox/list.h"
#include "vm/array.h"
+
+#if defined(ENABLE_ASSERTION)
+#include "vm/assertion.h"
+#endif
+
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "vm/global.h"
jboolean JVM_DesiredAssertionStatus(JNIEnv *env, jclass unused, jclass cls)
{
+#if defined(ENABLE_ASSERTION)
+ assertion_name_t *item;
+ classinfo *c;
+ jboolean status;
+ utf *name;
+
TRACEJVMCALLS("JVM_DesiredAssertionStatus(env=%p, unused=%p, cls=%p)", env, unused, cls);
- /* TODO: Implement this one, but false should be OK. */
+ c = LLNI_classinfo_unwrap(cls);
- return false;
+ if (c->classloader == NULL) {
+ status = (jboolean)assertion_system_enabled;
+ }
+ else {
+ status = (jboolean)assertion_user_enabled;
+ }
+
+ if (list_assertion_names != NULL) {
+ item = (assertion_name_t *)list_first(list_assertion_names);
+ while (item != NULL) {
+ name = utf_new_char(item->name);
+ if (name == c->packagename) {
+ status = (jboolean)item->enabled;
+ }
+ else if (name == c->name) {
+ status = (jboolean)item->enabled;
+ }
+
+ item = (assertion_name_t *)list_next(list_assertion_names, item);
+ }
+ }
+
+ return status;
+#else
+ return (jboolean)false;
+#endif
}
jobject JVM_AssertionStatusDirectives(JNIEnv *env, jclass unused)
{
- classinfo *c;
- java_lang_AssertionStatusDirectives *o;
- java_handle_objectarray_t *classes;
- java_handle_objectarray_t *packages;
-
- TRACEJVMCALLS("JVM_AssertionStatusDirectives(env=%p, unused=%p): COMPLETE ME!", env, unused);
+ classinfo *c;
+ java_lang_AssertionStatusDirectives *o;
+ java_handle_objectarray_t *classes;
+ java_handle_objectarray_t *packages;
+ java_booleanarray_t *classEnabled;
+ java_booleanarray_t *packageEnabled;
+#if defined(ENABLE_ASSERTION)
+ assertion_name_t *item;
+ java_handle_t *js;
+ s4 i, j;
+#endif
- /* XXX this is not completely implemented */
+ TRACEJVMCALLS("JVM_AssertionStatusDirectives(env=%p, unused=%p)", env, unused);
c = load_class_bootstrap(utf_new_char("java/lang/AssertionStatusDirectives"));
if (o == NULL)
return NULL;
+#if defined(ENABLE_ASSERTION)
+ classes = builtin_anewarray(assertion_class_count, class_java_lang_Object);
+#else
classes = builtin_anewarray(0, class_java_lang_Object);
-
+#endif
if (classes == NULL)
return NULL;
+#if defined(ENABLE_ASSERTION)
+ packages = builtin_anewarray(assertion_package_count, class_java_lang_Object);
+#else
packages = builtin_anewarray(0, class_java_lang_Object);
-
+#endif
if (packages == NULL)
return NULL;
+
+#if defined(ENABLE_ASSERTION)
+ classEnabled = builtin_newarray_boolean(assertion_class_count);
+#else
+ classEnabled = builtin_newarray_boolean(0);
+#endif
+ if (classEnabled == NULL)
+ return NULL;
+
+#if defined(ENABLE_ASSERTION)
+ packageEnabled = builtin_newarray_boolean(assertion_package_count);
+#else
+ packageEnabled = builtin_newarray_boolean(0);
+#endif
+ if (packageEnabled == NULL)
+ return NULL;
+
+#if defined(ENABLE_ASSERTION)
+ /* initialize arrays */
+
+ if (list_assertion_names != NULL) {
+ i = 0;
+ j = 0;
+
+ item = (assertion_name_t *)list_first(list_assertion_names);
+ while (item != NULL) {
+ js = javastring_new_from_ascii(item->name);
+ if (js == NULL) {
+ return NULL;
+ }
+
+ if (item->package == false) {
+ classes->data[i] = js;
+ classEnabled->data[i] = (jboolean) item->enabled;
+ i += 1;
+ }
+ else {
+ packages->data[j] = js;
+ packageEnabled->data[j] = (jboolean) item->enabled;
+ j += 1;
+ }
+
+ item = (assertion_name_t *)list_next(list_assertion_names, item);
+ }
+ }
+#endif
/* set instance fields */
o->classes = classes;
o->packages = packages;
+ o->classEnabled = classEnabled;
+ o->packageEnabled = packageEnabled;
return (jobject) o;
}
SUBDIRS = jit
+if ENABLE_ASSERTION
+ASSERTION_SOURCES = \
+ assertion.c \
+ assertion.h
+endif
+
if ENABLE_CYCLES_STATS
CYCLES_STATS_SOURCES = \
cycles-stats.c \
libvm.la
libvm_la_SOURCES = \
+ $(ASSERTION_SOURCES) \
access.c \
access.h \
array.c \
--- /dev/null
+/* src/vm/assertion.c - assertion options
+
+ Copyright (C) 2007
+ CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+*/
+
+#include "config.h"
+#include <stdint.h>
+#include <errno.h>
+
+#if defined(HAVE_STRING_H)
+# include <string.h>
+#endif
+
+#include "mm/memory.h"
+
+#include "vm/global.h"
+#include "vm/vm.h"
+
+#include "toolbox/list.h"
+
+#include "vm/assertion.h"
+
+/* -ea/-da options ************************************************************/
+
+list_t *list_assertion_names = (list_t *)NULL;
+int32_t assertion_class_count = 0;
+int32_t assertion_package_count = 0;
+bool assertion_user_enabled = false;
+bool assertion_system_enabled = false;
+
+/* assertion_ea_da *************************************************************
+
+ Handle -ea:/-enableassertions: and -da:/-disableassertions: options.
+
+*******************************************************************************/
+
+void assertion_ea_da(const char *name, bool enabled) {
+ bool package;
+ size_t len;
+ char *buf;
+ assertion_name_t *item;
+ int32_t i;
+
+ if (name == NULL) {
+ assertion_user_enabled = enabled;
+ return;
+ }
+
+ package = false;
+ len = strlen(name);
+
+ if (name[len - 1] == '/') {
+ return;
+ }
+
+ buf = strdup(name);
+ if (buf == NULL) {
+ vm_abort("assertion_ea_da: strdup failed: %s", strerror(errno));
+ }
+
+ if ((len > 2) && (strcmp(name + (len - 3), "...") == 0)) {
+ package = true;
+ assertion_package_count += 1;
+#if defined(WITH_CLASSPATH_SUN)
+ buf[len - 2] = '\0';
+ buf[len - 3] = '/';
+#else
+ buf[len - 3] = '\0';
+#endif
+ }
+ else {
+ assertion_class_count += 1;
+ }
+
+ len = strlen(buf);
+ for (i = 0; i < len; i++) {
+#if defined(WITH_CLASSPATH_SUN)
+ if (buf[i] == '.') {
+ buf[i] = '/';
+ }
+#else
+ if (buf[i] == '/') {
+ buf[i] = '.';
+ }
+#endif
+ }
+
+ item = NEW(assertion_name_t);
+ item->name = buf;
+ item->enabled = enabled;
+ item->package = package;
+
+ if (list_assertion_names == NULL) {
+ list_assertion_names = list_create(OFFSET(assertion_name_t, linkage));
+ }
+ list_add_last(list_assertion_names, item);
+}
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
--- /dev/null
+/* src/vm/assertion.h - assertion options
+
+ Copyright (C) 2007
+ CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+*/
+
+
+#ifndef _ASSERTION_H
+#define _ASSERTION_H
+
+#include "config.h"
+#include "vm/global.h"
+#include "toolbox/list.h"
+
+#include <stdint.h>
+
+typedef struct assertion_name_t assertion_name_t;
+
+struct assertion_name_t {
+ char *name;
+ bool enabled;
+ bool package;
+ listnode_t linkage;
+};
+
+/* -ea/-esa/-da/-dsa options **************************************************/
+
+extern list_t *list_assertion_names;
+extern int32_t assertion_class_count;
+extern int32_t assertion_package_count;
+extern bool assertion_user_enabled;
+extern bool assertion_system_enabled;
+
+/* function prototypes ********************************************************/
+
+void assertion_ea_da(const char *name, bool enabled);
+
+#endif /* _ASSERTION_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
#include "toolbox/logging.h"
#include "vm/array.h"
+
+#if defined(ENABLE_ASSERTION)
+#include "vm/assertion.h"
+#endif
+
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "vm/finalizer.h"
break;
case OPT_EA:
- /* currently ignored */
+#if defined(ENABLE_ASSERTION)
+ assertion_ea_da(opt_arg, true);
+#endif
break;
case OPT_DA:
- /* currently ignored */
+#if defined(ENABLE_ASSERTION)
+ assertion_ea_da(opt_arg, false);
+#endif
break;
case OPT_ESA:
- _Jv_jvm->Java_java_lang_VMClassLoader_defaultAssertionStatus = true;
+#if defined(ENABLE_ASSERTION)
+ assertion_system_enabled = true;
+#endif
break;
case OPT_DSA:
- _Jv_jvm->Java_java_lang_VMClassLoader_defaultAssertionStatus = false;
+#if defined(ENABLE_ASSERTION)
+ assertion_system_enabled = false;
+#endif
break;
#if defined(ENABLE_PROFILING)
classinfo *class_java_lang_reflect_Method;
classinfo *class_java_security_PrivilegedAction;
classinfo *class_java_util_Vector;
+classinfo *class_java_util_HashMap;
classinfo *arrayclass_java_lang_Object;
extern classinfo *class_java_lang_reflect_Method;
extern classinfo *class_java_security_PrivilegedAction;
extern classinfo *class_java_util_Vector;
+extern classinfo *class_java_util_HashMap;
extern classinfo *arrayclass_java_lang_Object;
if (!link_class(class_java_util_Vector))
vm_abort("linker_init: linking failed");
+ if (!link_class(class_java_util_HashMap))
+ vm_abort("linker_init: linking failed");
+
# if defined(WITH_CLASSPATH_SUN)
if (!link_class(class_sun_reflect_MagicAccessorImpl))
vm_abort("linker_init: linking failed");
class_java_security_PrivilegedAction =
load_class_bootstrap(utf_new_char("java/security/PrivilegedAction"));
+ class_java_util_HashMap =
+ load_class_bootstrap(utf_new_char("java/util/HashMap"));
+
class_java_util_Vector = load_class_bootstrap(utf_java_util_Vector);
# if defined(WITH_CLASSPATH_SUN)