Integrated: 8260467: Move well-known classes from systemDictionary.hpp to vmClasses.hpp

Ioi Lam iklam at openjdk.java.net
Thu Jan 28 04:26:44 UTC 2021


On Tue, 26 Jan 2021 23:13:33 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> The "well-known classes" API in [systemDictionary.hpp](https://github.com/openjdk/jdk/blob/19b6f61bd2f49f06ef6b8e9b6ecd2fd910070035/src/hotspot/share/classfile/systemDictionary.hpp#L103) is for accessing a fixed set of classes defined by the bootstrap loader. The rest of systemDictionary.hpp is for finding/defining arbitrary classes in arbitrary class loaders. For modularity, we should separate these two sets of APIs, and make them independent of each other.
> 
> The proposed API follows the existing pattern of accessing known symbols/intrinsics in [vmSymbols.hpp](https://github.com/openjdk/jdk/blob/19b6f61bd2f49f06ef6b8e9b6ecd2fd910070035/src/hotspot/share/classfile/vmSymbols.hpp#L53) and [vmIntrinsics.hpp](https://github.com/openjdk/jdk/blob/19b6f61bd2f49f06ef6b8e9b6ecd2fd910070035/src/hotspot/share/classfile/vmIntrinsics.hpp#L108):
> 
> #include "classfile/vmClasses.hpp"
> #include "classfile/vmIntrinsics.hpp"
> #include "classfile/vmSymbols.hpp" // NEW
> 
> Symbol* s = vmSymbols::java_lang_Object();
> vmIntrinsics::ID id = vmIntrinsics::_linkToSpecial;
> Klass* k = vmClasses::Object_klass(); // NEW
> 
> Note: to help the review process and limit the amount of boiler-place changes, within this RFE, we do not change existing calls like `SystemDictionary::Object_klass()` to `vmClasses::Object_klass()`. That will be done in a subtask ([JDK-8260471](https://bugs.openjdk.java.net/browse/JDK-8260471) -- [preliminary webrev](http://cr.openjdk.java.net/~iklam/jdk17/8260471-decouple-vmClasses-and-SystemDictionary/)).
> 
> Within this RFE, we temporarily subclass `SystemDictionary` from `vmClasses`, so `SystemDictionary::Object_klass()` will continue to work.
> 
> Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.

This pull request has now been integrated.

Changeset: 396a496f
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/396a496f
Stats:     1206 lines in 35 files changed: 634 ins; 455 del; 117 mod

8260467: Move well-known classes from systemDictionary.hpp to vmClasses.hpp

Reviewed-by: dholmes, coleenp

-------------

PR: https://git.openjdk.java.net/jdk/pull/2246


More information about the hotspot-dev mailing list