Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/oops/Method.java @ 6940:18fb7da42534
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
Summary: Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files.
Reviewed-by: dholmes, coleenp, zgu
Contributed-by: harold.seigel@oracle.com
author | coleenp |
---|---|
date | Tue, 06 Nov 2012 15:09:37 -0500 |
parents | da91efe96a93 |
children | bd7a7ce2e264 |
comparison
equal
deleted
inserted
replaced
6939:c284cf4781f0 | 6940:18fb7da42534 |
---|---|
175 | 175 |
176 /** Fetch the original non-breakpoint bytecode at the specified | 176 /** Fetch the original non-breakpoint bytecode at the specified |
177 bci. It is required that there is currently a bytecode at this | 177 bci. It is required that there is currently a bytecode at this |
178 bci. */ | 178 bci. */ |
179 public int getOrigBytecodeAt(int bci) { | 179 public int getOrigBytecodeAt(int bci) { |
180 BreakpointInfo bp = ((InstanceKlass) getMethodHolder()).getBreakpoints(); | 180 BreakpointInfo bp = getMethodHolder().getBreakpoints(); |
181 for (; bp != null; bp = bp.getNext()) { | 181 for (; bp != null; bp = bp.getNext()) { |
182 if (bp.match(this, bci)) { | 182 if (bp.match(this, bci)) { |
183 return bp.getOrigBytecode(); | 183 return bp.getOrigBytecode(); |
184 } | 184 } |
185 } | 185 } |
236 long index = getGenericSignatureIndex(); | 236 long index = getGenericSignatureIndex(); |
237 return (index != 0L) ? getConstants().getSymbolAt(index) : null; | 237 return (index != 0L) ? getConstants().getSymbolAt(index) : null; |
238 } | 238 } |
239 | 239 |
240 // Method holder (the Klass holding this method) | 240 // Method holder (the Klass holding this method) |
241 public Klass getMethodHolder() { return getConstants().getPoolHolder(); } | 241 public InstanceKlass getMethodHolder() { return getConstants().getPoolHolder(); } |
242 | 242 |
243 // Access flags | 243 // Access flags |
244 public boolean isPublic() { return getAccessFlagsObj().isPublic(); } | 244 public boolean isPublic() { return getAccessFlagsObj().isPublic(); } |
245 public boolean isPrivate() { return getAccessFlagsObj().isPrivate(); } | 245 public boolean isPrivate() { return getAccessFlagsObj().isPrivate(); } |
246 public boolean isProtected() { return getAccessFlagsObj().isProtected(); } | 246 public boolean isProtected() { return getAccessFlagsObj().isProtected(); } |