Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/instanceRefKlass.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | aed758eda82a |
children | db9981fd3124 |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceRefKlass.hpp Mon Nov 12 18:11:17 2012 +0100 +++ b/src/share/vm/oops/instanceRefKlass.hpp Mon Nov 12 23:14:12 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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 @@ -27,7 +27,7 @@ #include "oops/instanceKlass.hpp" -// An instanceRefKlass is a specialized instanceKlass for Java +// An InstanceRefKlass is a specialized InstanceKlass for Java // classes that are subclasses of java/lang/ref/Reference. // // These classes are used to implement soft/weak/final/phantom @@ -44,20 +44,24 @@ // and the pending list lock object in the same class is notified. -class instanceRefKlass: public instanceKlass { +class InstanceRefKlass: public InstanceKlass { + friend class InstanceKlass; + + // Constructor + InstanceRefKlass(int vtable_len, int itable_len, int static_field_size, int nonstatic_oop_map_size, ReferenceType rt, AccessFlags access_flags, bool is_anonymous) + : InstanceKlass(vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous) {} + public: + InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); } // Type testing bool oop_is_instanceRef() const { return true; } - // Casting from klassOop - static instanceRefKlass* cast(klassOop k) { - assert(k->klass_part()->oop_is_instanceRef(), "cast to instanceRefKlass"); - return (instanceRefKlass*) k->klass_part(); + // Casting from Klass* + static InstanceRefKlass* cast(Klass* k) { + assert(k->oop_is_instanceRef(), "cast to InstanceRefKlass"); + return (InstanceRefKlass*) k; } - // allocation - DEFINE_ALLOCATE_PERMANENT(instanceRefKlass); - // Garbage collection int oop_adjust_pointers(oop obj); void oop_follow_contents(oop obj); @@ -65,10 +69,10 @@ // Parallel Scavenge and Parallel Old PARALLEL_GC_DECLS - int oop_oop_iterate(oop obj, OopClosure* blk) { + int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) { return oop_oop_iterate_v(obj, blk); } - int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) { + int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) { return oop_oop_iterate_v_m(obj, blk, mr); } @@ -93,7 +97,7 @@ // Update non-static oop maps so 'referent', 'nextPending' and // 'discovered' will look like non-oops - static void update_nonstatic_oop_maps(klassOop k); + static void update_nonstatic_oop_maps(Klass* k); public: // Verification