comparison src/share/vm/runtime/handles.hpp @ 665:c89f86385056

6814659: separable cleanups and subroutines for 6655638 Summary: preparatory but separable changes for method handles Reviewed-by: kvn, never
author jrose
date Fri, 20 Mar 2009 23:19:36 -0700
parents a61af66fc99e
children c18cbe5936b8
comparison
equal deleted inserted replaced
647:bd441136a5ce 665:c89f86385056
1 /* 1 /*
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
133 assert(SharedSkipVerify || is_null() || obj->is_klass(), "not a klassOop"); 133 assert(SharedSkipVerify || is_null() || obj->is_klass(), "not a klassOop");
134 } 134 }
135 KlassHandle (Thread *thread, Klass* kl) 135 KlassHandle (Thread *thread, Klass* kl)
136 : Handle(thread, kl ? kl->as_klassOop() : (klassOop)NULL) { 136 : Handle(thread, kl ? kl->as_klassOop() : (klassOop)NULL) {
137 assert(is_null() || obj()->is_klass(), "not a klassOop"); 137 assert(is_null() || obj()->is_klass(), "not a klassOop");
138 }
139
140 // Direct interface, use very sparingly.
141 // Used by SystemDictionaryHandles to create handles on existing WKKs.
142 // The obj of such a klass handle may be null, because the handle is formed
143 // during system bootstrapping.
144 KlassHandle(klassOop *handle, bool dummy) : Handle((oop*)handle, dummy) {
145 assert(SharedSkipVerify || is_null() || obj() == NULL || obj()->is_klass(), "not a klassOop");
138 } 146 }
139 147
140 // General access 148 // General access
141 klassOop operator () () const { return obj(); } 149 klassOop operator () () const { return obj(); }
142 Klass* operator -> () const { return as_klass(); } 150 Klass* operator -> () const { return as_klass(); }