src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File
open Cdiff src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2009, 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2009, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 23,33 ****
package jdk.vm.ci.meta;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Array;
- import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
/**
--- 23,32 ----
*** 37,47 ****
public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersProvider, AnnotatedElement {
/**
* Returns the bytecode of this method, if the method has code. The returned byte array does not
* contain breakpoints or non-Java bytecodes. This may return null if the
! * {@link #getDeclaringClass() holder} is not {@link ResolvedJavaType#isLinked() linked}.
*
* The contained constant pool indices may not be the ones found in the original class file but
* they can be used with the JVMCI API (e.g. methods in {@link ConstantPool}).
*
* @return the bytecode of the method, or {@code null} if {@code getCodeSize() == 0} or if the
--- 36,47 ----
public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersProvider, AnnotatedElement {
/**
* Returns the bytecode of this method, if the method has code. The returned byte array does not
* contain breakpoints or non-Java bytecodes. This may return null if the
! * {@linkplain #getDeclaringClass() declaring class} is not
! * {@linkplain ResolvedJavaType#isLinked() linked}.
*
* The contained constant pool indices may not be the ones found in the original class file but
* they can be used with the JVMCI API (e.g. methods in {@link ConstantPool}).
*
* @return the bytecode of the method, or {@code null} if {@code getCodeSize() == 0} or if the
*** 437,453 ****
}
return result;
}
/**
! * Checks whether the method has bytecodes associated with it. Methods without bytecodes are
! * either abstract or native methods.
*
! * @return whether the definition of this method is Java bytecodes
*/
default boolean hasBytecodes() {
! return isConcrete() && !isNative();
}
/**
* Checks whether the method has a receiver parameter - i.e., whether it is not static.
*
--- 437,455 ----
}
return result;
}
/**
! * Checks whether the method has bytecodes associated with it. Note that even if this method
! * returns {@code true}, {@link #getCode} can return {@code null} if
! * {@linkplain #getDeclaringClass() declaring class} is not
! * {@linkplain ResolvedJavaType#isLinked() linked}.
*
! * @return {@code this.getCodeSize() != 0}
*/
default boolean hasBytecodes() {
! return getCodeSize() != 0;
}
/**
* Checks whether the method has a receiver parameter - i.e., whether it is not static.
*
*** 462,479 ****
*/
default boolean isJavaLangObjectInit() {
return getDeclaringClass().isJavaLangObject() && getName().equals("<init>");
}
- SpeculationLog getSpeculationLog();
-
/**
! *
! * @param object
! * @param args
! * @throws InvocationTargetException
! * @throws IllegalAccessException
*/
! default JavaConstant invoke(JavaConstant object, JavaConstant... args) throws InvocationTargetException, IllegalAccessException {
! throw new InternalError("unimplemented");
! }
}
--- 464,476 ----
*/
default boolean isJavaLangObjectInit() {
return getDeclaringClass().isJavaLangObject() && getName().equals("<init>");
}
/**
! * Gets a speculation log that can be used when compiling this method to make new speculations
! * and query previously failed speculations. The implementation may return a new
! * {@link SpeculationLog} object each time this method is called so its the caller's
! * responsibility to ensure the same speculation log is used throughout a compilation.
*/
! SpeculationLog getSpeculationLog();
}
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File