< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java

Print this page

        

*** 239,249 **** return getAllModifiers() & jvmMethodModifiers(); } @Override public boolean canBeStaticallyBound() { ! return (isFinal() || isPrivate() || isStatic() || holder.isLeaf() || isConstructor()) && isConcrete(); } @Override public byte[] getCode() { if (getCodeSize() == 0) { --- 239,249 ---- return getAllModifiers() & jvmMethodModifiers(); } @Override public boolean canBeStaticallyBound() { ! return (isFinal() || isPrivate() || isStatic() || holder.isLeaf()) && isConcrete(); } @Override public byte[] getCode() { if (getCodeSize() == 0) {
*** 404,415 **** return compilerToVM().getStackTraceElement(this, bci); } @Override public ResolvedJavaMethod uniqueConcreteMethod(HotSpotResolvedObjectType receiver) { - assert !canBeStaticallyBound() : this; - if (receiver.isInterface()) { // Cannot trust interfaces. Because of: // interface I { void foo(); } // class A { public void foo() {} } // class B extends A implements I { } --- 404,413 ----
*** 417,427 **** // class D extends B { } // Would lead to identify C.foo() as the unique concrete method for I.foo() without // seeing A.foo(). return null; } - assert !receiver.isLinked() || isInVirtualMethodTable(receiver); if (this.isDefault()) { // CHA for default methods doesn't work and may crash the VM return null; } return compilerToVM().findUniqueConcreteMethod(((HotSpotResolvedObjectTypeImpl) receiver), this); --- 415,424 ----
*** 508,542 **** return runtime().reflection.getParameters(this); } @Override public Annotation[][] getParameterAnnotations() { ! if ((getConstMethodFlags() & config().constMethodHasParameterAnnotations) == 0 || isClassInitializer()) { return new Annotation[signature.getParameterCount(false)][0]; } return runtime().reflection.getParameterAnnotations(this); } @Override public Annotation[] getAnnotations() { ! if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0 || isClassInitializer()) { return new Annotation[0]; } return runtime().reflection.getMethodAnnotations(this); } @Override public Annotation[] getDeclaredAnnotations() { ! if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0 || isClassInitializer()) { return new Annotation[0]; } return runtime().reflection.getMethodDeclaredAnnotations(this); } @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { ! if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0 || isClassInitializer()) { return null; } return runtime().reflection.getMethodAnnotation(this, annotationClass); } --- 505,539 ---- return runtime().reflection.getParameters(this); } @Override public Annotation[][] getParameterAnnotations() { ! if ((getConstMethodFlags() & config().constMethodHasParameterAnnotations) == 0) { return new Annotation[signature.getParameterCount(false)][0]; } return runtime().reflection.getParameterAnnotations(this); } @Override public Annotation[] getAnnotations() { ! if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0) { return new Annotation[0]; } return runtime().reflection.getMethodAnnotations(this); } @Override public Annotation[] getDeclaredAnnotations() { ! if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0) { return new Annotation[0]; } return runtime().reflection.getMethodDeclaredAnnotations(this); } @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { ! if ((getConstMethodFlags() & config().constMethodHasMethodAnnotations) == 0) { return null; } return runtime().reflection.getMethodAnnotation(this, annotationClass); }
< prev index next >