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-2008 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
@ -308,6 +308,22 @@ class instanceKlass: public Klass {
bool is_same_class_package(oop classloader2, symbolOop classname2);
static bool is_same_class_package(oop class_loader1, symbolOop class_name1, oop class_loader2, symbolOop class_name2);
// find an enclosing class (defined where original code was, in jvm.cpp!)
klassOop compute_enclosing_class(symbolOop& simple_name_result, TRAPS) {
instanceKlassHandle self(THREAD, this->as_klassOop());
return compute_enclosing_class_impl(self, simple_name_result, THREAD);
}
static klassOop compute_enclosing_class_impl(instanceKlassHandle self,
symbolOop& simple_name_result, TRAPS);
// tell if two classes have the same enclosing class (at package level)
bool is_same_package_member(klassOop class2, TRAPS) {
instanceKlassHandle self(THREAD, this->as_klassOop());
return is_same_package_member_impl(self, class2, THREAD);
}
static bool is_same_package_member_impl(instanceKlassHandle self,
klassOop class2, TRAPS);
// initialization state
bool is_loaded() const { return _init_state >= loaded; }
bool is_linked() const { return _init_state >= linked; }