hotspot/src/share/vm/ci/ciEnv.hpp
changeset 4571 80b553bddc26
parent 4567 7fc02fbe5c7a
child 4761 bdb7375a1fee
--- a/hotspot/src/share/vm/ci/ciEnv.hpp	Tue Jan 05 11:16:09 2010 -0800
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp	Wed Jan 06 14:22:39 2010 -0800
@@ -74,18 +74,9 @@
   static ciTypeArrayKlassKlass* _type_array_klass_klass_instance;
   static ciObjArrayKlassKlass*  _obj_array_klass_klass_instance;
 
-  static ciInstanceKlass* _ArrayStoreException;
-  static ciInstanceKlass* _Class;
-  static ciInstanceKlass* _ClassCastException;
-  static ciInstanceKlass* _InvokeDynamic;
-  static ciInstanceKlass* _Object;
-  static ciInstanceKlass* _Throwable;
-  static ciInstanceKlass* _Thread;
-  static ciInstanceKlass* _OutOfMemoryError;
-  static ciInstanceKlass* _String;
-  static ciInstanceKlass* _StringBuffer;
-  static ciInstanceKlass* _StringBuilder;
-  static ciInstanceKlass* _Integer;
+#define WK_KLASS_DECL(name, ignore_s, ignore_o) static ciInstanceKlass* _##name;
+  WK_KLASSES_DO(WK_KLASS_DECL)
+#undef WK_KLASS_DECL
 
   static ciSymbol*        _unloaded_cisymbol;
   static ciInstanceKlass* _unloaded_ciinstance_klass;
@@ -301,42 +292,13 @@
 
 
   // Access to certain well known ciObjects.
-  ciInstanceKlass* ArrayStoreException_klass() {
-    return _ArrayStoreException;
-  }
-  ciInstanceKlass* Class_klass() {
-    return _Class;
-  }
-  ciInstanceKlass* ClassCastException_klass() {
-    return _ClassCastException;
-  }
-  ciInstanceKlass* InvokeDynamic_klass() {
-    return _InvokeDynamic;
-  }
-  ciInstanceKlass* Object_klass() {
-    return _Object;
-  }
-  ciInstanceKlass* Throwable_klass() {
-    return _Throwable;
+#define WK_KLASS_FUNC(name, ignore_s, ignore_o) \
+  ciInstanceKlass* name() { \
+    return _##name;\
   }
-  ciInstanceKlass* Thread_klass() {
-    return _Thread;
-  }
-  ciInstanceKlass* OutOfMemoryError_klass() {
-    return _OutOfMemoryError;
-  }
-  ciInstanceKlass* String_klass() {
-    return _String;
-  }
-  ciInstanceKlass* StringBuilder_klass() {
-    return _StringBuilder;
-  }
-  ciInstanceKlass* StringBuffer_klass() {
-    return _StringBuffer;
-  }
-  ciInstanceKlass* Integer_klass() {
-    return _Integer;
-  }
+  WK_KLASSES_DO(WK_KLASS_FUNC)
+#undef WK_KLASS_FUNC
+
   ciInstance* NullPointerException_instance() {
     assert(_NullPointerException_instance != NULL, "initialization problem");
     return _NullPointerException_instance;