< prev index next >

test/compiler/jvmci/errors/CodeInstallerTest.java

Print this page




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package compiler.jvmci.errors;
  25 
  26 import java.lang.reflect.Method;
  27 
  28 import jdk.vm.ci.code.Architecture;
  29 import jdk.vm.ci.code.CodeCacheProvider;
  30 import jdk.vm.ci.code.Register;
  31 import jdk.vm.ci.code.RegisterArray;
  32 import jdk.vm.ci.code.StackSlot;
  33 import jdk.vm.ci.code.site.DataPatch;
  34 import jdk.vm.ci.code.site.Site;
  35 import jdk.vm.ci.hotspot.HotSpotCompiledCode;
  36 import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
  37 import jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider;
  38 import jdk.vm.ci.meta.Assumptions.Assumption;
  39 import jdk.vm.ci.meta.MetaAccessProvider;
  40 import jdk.vm.ci.meta.PlatformKind;
  41 import jdk.vm.ci.meta.ResolvedJavaMethod;
  42 import jdk.vm.ci.runtime.JVMCI;
  43 import jdk.vm.ci.runtime.JVMCIBackend;
  44 
  45 import org.junit.Assert;


  46 
  47 public class CodeInstallerTest {
  48 
  49     protected final Architecture arch;
  50     protected final CodeCacheProvider codeCache;
  51     protected final MetaAccessProvider metaAccess;
  52     protected final HotSpotConstantReflectionProvider constantReflection;
  53 
  54     protected final ResolvedJavaMethod dummyMethod;
  55 
  56     public static void dummyMethod() {
  57     }
  58 
  59     protected CodeInstallerTest() {
  60         JVMCIBackend backend = JVMCI.getRuntime().getHostJVMCIBackend();
  61         metaAccess = backend.getMetaAccess();
  62         codeCache = backend.getCodeCache();
  63         constantReflection = (HotSpotConstantReflectionProvider) backend.getConstantReflection();
  64         arch = codeCache.getTarget().arch;
  65 




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package compiler.jvmci.errors;
  25 


  26 import jdk.vm.ci.code.Architecture;
  27 import jdk.vm.ci.code.CodeCacheProvider;
  28 import jdk.vm.ci.code.Register;
  29 import jdk.vm.ci.code.RegisterArray;
  30 import jdk.vm.ci.code.StackSlot;
  31 import jdk.vm.ci.code.site.DataPatch;
  32 import jdk.vm.ci.code.site.Site;
  33 import jdk.vm.ci.hotspot.HotSpotCompiledCode;
  34 import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
  35 import jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider;
  36 import jdk.vm.ci.meta.Assumptions.Assumption;
  37 import jdk.vm.ci.meta.MetaAccessProvider;
  38 import jdk.vm.ci.meta.PlatformKind;
  39 import jdk.vm.ci.meta.ResolvedJavaMethod;
  40 import jdk.vm.ci.runtime.JVMCI;
  41 import jdk.vm.ci.runtime.JVMCIBackend;

  42 import org.junit.Assert;
  43 
  44 import java.lang.reflect.Method;
  45 
  46 public class CodeInstallerTest {
  47 
  48     protected final Architecture arch;
  49     protected final CodeCacheProvider codeCache;
  50     protected final MetaAccessProvider metaAccess;
  51     protected final HotSpotConstantReflectionProvider constantReflection;
  52 
  53     protected final ResolvedJavaMethod dummyMethod;
  54 
  55     public static void dummyMethod() {
  56     }
  57 
  58     protected CodeInstallerTest() {
  59         JVMCIBackend backend = JVMCI.getRuntime().getHostJVMCIBackend();
  60         metaAccess = backend.getMetaAccess();
  61         codeCache = backend.getCodeCache();
  62         constantReflection = (HotSpotConstantReflectionProvider) backend.getConstantReflection();
  63         arch = codeCache.getTarget().arch;
  64 


< prev index next >