1.1 --- a/src/share/vm/ci/ciKlass.hpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/ci/ciKlass.hpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -26,15 +26,14 @@ 1.11 #define SHARE_VM_CI_CIKLASS_HPP 1.12 1.13 #include "ci/ciType.hpp" 1.14 -#include "oops/klassOop.hpp" 1.15 1.16 // ciKlass 1.17 // 1.18 -// This class and its subclasses represent klassOops in the 1.19 -// HotSpot virtual machine. In the vm, each klassOop contains an 1.20 +// This class and its subclasses represent Klass*s in the 1.21 +// HotSpot virtual machine. In the vm, each Klass* contains an 1.22 // embedded Klass object. ciKlass is subclassed to explicitly 1.23 -// represent the kind of Klass embedded in the klassOop. For 1.24 -// example, a klassOop with an embedded objArrayKlass object is 1.25 +// represent the kind of Klass embedded in the Klass*. For 1.26 +// example, a Klass* with an embedded objArrayKlass object is 1.27 // represented in the ciObject hierarchy by the class 1.28 // ciObjArrayKlass. 1.29 class ciKlass : public ciType { 1.30 @@ -50,16 +49,14 @@ 1.31 1.32 protected: 1.33 ciKlass(KlassHandle k_h, ciSymbol* name); 1.34 - ciKlass(ciSymbol* name, ciKlass* klass); 1.35 + ciKlass(ciSymbol* name, BasicType bt); 1.36 1.37 - klassOop get_klassOop() const { 1.38 - klassOop k = (klassOop)get_oop(); 1.39 + Klass* get_Klass() const { 1.40 + Klass* k = (Klass*)_metadata; 1.41 assert(k != NULL, "illegal use of unloaded klass"); 1.42 return k; 1.43 } 1.44 1.45 - Klass* get_Klass() const { return get_klassOop()->klass_part(); } 1.46 - 1.47 // Certain subklasses have an associated class loader. 1.48 virtual oop loader() { return NULL; } 1.49 virtual jobject loader_handle() { return NULL; } 1.50 @@ -88,6 +85,9 @@ 1.51 bool can_be_primary_super(); 1.52 static juint primary_super_limit() { return Klass::primary_super_limit(); } 1.53 1.54 + // Is this ciObject the ciInstanceKlass representing java.lang.Object()? 1.55 + virtual bool is_java_lang_Object() const { return false; } 1.56 + 1.57 // Get the shared parent of two klasses. 1.58 ciKlass* least_common_ancestor(ciKlass* k); 1.59 1.60 @@ -119,7 +119,7 @@ 1.61 jint access_flags(); 1.62 1.63 // What kind of ciObject is this? 1.64 - bool is_klass() { return true; } 1.65 + bool is_klass() const { return true; } 1.66 1.67 void print_name_on(outputStream* st); 1.68 };