6814659: separable cleanups and subroutines for 6655638

Preparatory but separable changes for method handles

Reviewed-by: kvn, never
This commit is contained in:
John R Rose 2009-03-20 23:19:36 -07:00
parent 41463d1d3a
commit cfb08c72ba
30 changed files with 598 additions and 259 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -87,12 +87,18 @@ class Reflection: public AllStatic {
bool classloader_only,
bool protected_restriction = false);
static bool is_same_class_package(klassOop class1, klassOop class2);
static bool is_same_package_member(klassOop class1, klassOop class2, TRAPS);
static bool can_relax_access_check_for(
klassOop accessor, klassOop accesee, bool classloader_only);
// inner class reflection
static void check_for_inner_class(instanceKlassHandle outer, instanceKlassHandle inner, TRAPS);
// raise an ICCE unless the required relationship can be proven to hold
// If inner_is_member, require the inner to be a member of the outer.
// If !inner_is_member, require the inner to be anonymous (a non-member).
// Caller is responsible for figuring out in advance which case must be true.
static void check_for_inner_class(instanceKlassHandle outer, instanceKlassHandle inner,
bool inner_is_member, TRAPS);
//
// Support for reflection based on dynamic bytecode generation (JDK 1.4)