Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: access.c 8237 2007-07-27 16:15:29Z twisti $
-
*/
#include "mm/memory.h"
+#include "native/llni.h"
+
#include "vm/access.h"
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "vmcore/method.h"
-/****************************************************************************/
-/* ACCESS CHECKS */
-/****************************************************************************/
-
/* access_is_accessible_class **************************************************
Check if a class is accessible from another class
/* NOTE: This check must be before checks that could return
false. */
- if (class_issubclass(cls, class_sun_reflect_MagicAccessorImpl))
+ if (class_issubclass(referer, class_sun_reflect_MagicAccessorImpl))
return true;
#endif
/* NOTE: This check must be before checks that could return
false. */
- if (class_issubclass(declarer, class_sun_reflect_MagicAccessorImpl))
+ if (class_issubclass(referer, class_sun_reflect_MagicAccessorImpl))
return true;
#endif
bool access_check_field(fieldinfo *f, s4 calldepth)
{
- java_objectarray *oa;
- classinfo *callerclass;
- char *msg;
- s4 msglen;
- utf *u;
+ java_handle_objectarray_t *oa;
+ classinfo *callerclass;
+ char *msg;
+ s4 msglen;
+ utf *u;
/* if everything is public, there is nothing to check */
if (oa == NULL)
return false;
- assert(calldepth >= 0 && calldepth < oa->header.size);
+ assert(calldepth >= 0 && calldepth < LLNI_array_size(oa));
callerclass = (classinfo *) oa->data[calldepth];
bool access_check_method(methodinfo *m, s4 calldepth)
{
- java_objectarray *oa;
- classinfo *callerclass;
- char *msg;
- s4 msglen;
- utf *u;
+ java_handle_objectarray_t *oa;
+ classinfo *callerclass;
+ char *msg;
+ s4 msglen;
+ utf *u;
/* if everything is public, there is nothing to check */
if (oa == NULL)
return false;
- assert(calldepth >= 0 && calldepth < oa->header.size);
+ assert(calldepth >= 0 && calldepth < LLNI_array_size(oa));
callerclass = (classinfo *) oa->data[calldepth];