1 /* nat/SecurityManager.c - java/lang/SecurityManager
3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
5 M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
6 P. Tomsich, J. Wenninger
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Roman Obermaiser
29 Changes: Joseph Wenninger
31 $Id: VMSecurityManager.c 931 2004-03-05 17:04:35Z jowenn $
40 #include "toolbox/loging.h"
41 #include "java_lang_ClassLoader.h"
45 * Class: java/lang/SecurityManager
46 * Method: currentClassLoader
47 * Signature: ()Ljava/lang/ClassLoader;
49 JNIEXPORT java_lang_ClassLoader* JNICALL Java_java_lang_VMSecurityManager_currentClassLoader(JNIEnv *env, jclass clazz)
51 log_text("Java_java_lang_VMSecurityManager_currentClassLoader");
52 init_systemclassloader();
54 return SystemClassLoader;
59 /*THIS IS IN ASMPART NOW*/
61 * Class: java/lang/SecurityManager
62 * Method: getClassContext
63 * Signature: ()[Ljava/lang/Class;
65 JNIEXPORT java_objectarray* JNICALL Java_java_lang_VMSecurityManager_getClassContext(JNIEnv *env, jclass clazz)
67 log_text("Java_java_lang_VMSecurityManager_getClassContext called");
69 /* XXX should use vftbl directly */
70 return (java_objectarray *) builtin_newarray(0, class_array_of(class_java_lang_Class)->vftbl);
74 java_objectarray* temporaryGetClassContextHelper(methodinfo *m) {
75 if (!(m->name)) log_text("method or block has no name");
79 if (!(m->class)) log_text("method or block has no class");
81 utf_display(m->class->name);
84 log_text("temporaryGetClassContextHelper called");
85 if (adr==0) log_text("NO REAL METHOD");
88 struct methodinfo *m=(struct methodinfo*)(*(adr-1));
89 if (!(m->name)) log_text("method or block has no name");
92 if (!(m->class)) log_text("method or block has no class");
94 utf_display(m->class->name);
95 printf("\nFrame size:%ld\n",(long)(*(adr-2)));
97 printf("saveint:%ld\n",(long)(*adr));
98 printf("saveflt:%ld\n",(long)(*(adr-1)));
100 log_text("temporaryGetClassContextHelper leaving");
101 return (java_objectarray *) builtin_newarray(0, class_array_of(class_java_lang_Class)->vftbl);
105 java_objectarray* temporaryGetClassContextHelper2() {
106 log_text("temporaryGetClassContextHelper2 called");
107 return (java_objectarray *) builtin_newarray(0, class_array_of(class_java_lang_Class)->vftbl);
111 * These are local overrides for various environment variables in Emacs.
112 * Please do not remove this and leave it at the end of the file, where
113 * Emacs will automagically detect them.
114 * ---------------------------------------------------------------------
117 * indent-tabs-mode: t