< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java

Print this page

449      * @see #getCodeSize()
450      * @return {@code getCodeSize() > 0}
451      */
452     default boolean hasBytecodes() {
453         return getCodeSize() > 0;
454     }
455 
456     /**
457      * Checks whether the method has a receiver parameter - i.e., whether it is not static.
458      *
459      * @return whether the method has a receiver parameter
460      */
461     default boolean hasReceiver() {
462         return !isStatic();
463     }
464 
465     /**
466      * Determines if this method is {@link java.lang.Object#Object()}.
467      */
468     default boolean isJavaLangObjectInit() {
469         return getDeclaringClass().isJavaLangObject() && getName().equals("<init>");
470     }
471 
472     /**
473      * Returns true if this method has a
474      * {@code jdk.internal.misc.ScopedMemoryAccess.Scoped} annotation.
475      *
476      * @return true if Scoped annotation present, false otherwise.
477      */
478     default boolean isScoped() {
479         throw new UnsupportedOperationException();
480     }
481 
482     /**
483      * Gets a speculation log that can be used when compiling this method to make new speculations
484      * and query previously failed speculations. The implementation may return a new
485      * {@link SpeculationLog} object each time this method is called so its the caller's
486      * responsibility to ensure the same speculation log is used throughout a compilation.
487      */
488     SpeculationLog getSpeculationLog();
489 }

449      * @see #getCodeSize()
450      * @return {@code getCodeSize() > 0}
451      */
452     default boolean hasBytecodes() {
453         return getCodeSize() > 0;
454     }
455 
456     /**
457      * Checks whether the method has a receiver parameter - i.e., whether it is not static.
458      *
459      * @return whether the method has a receiver parameter
460      */
461     default boolean hasReceiver() {
462         return !isStatic();
463     }
464 
465     /**
466      * Determines if this method is {@link java.lang.Object#Object()}.
467      */
468     default boolean isJavaLangObjectInit() {
469         return getDeclaringClass().isJavaLangObject() && (getName().equals("<init>") || getName().equals("<vnew>"));
470     }
471 
472     /**
473      * Returns true if this method has a
474      * {@code jdk.internal.misc.ScopedMemoryAccess.Scoped} annotation.
475      *
476      * @return true if Scoped annotation present, false otherwise.
477      */
478     default boolean isScoped() {
479         throw new UnsupportedOperationException();
480     }
481 
482     /**
483      * Gets a speculation log that can be used when compiling this method to make new speculations
484      * and query previously failed speculations. The implementation may return a new
485      * {@link SpeculationLog} object each time this method is called so its the caller's
486      * responsibility to ensure the same speculation log is used throughout a compilation.
487      */
488     SpeculationLog getSpeculationLog();
489 }
< prev index next >