changeset 23398:3e8ce13f4e12

minimize diff to jvmci-9
author Doug Simon <doug.simon@oracle.com>
date Tue, 17 May 2016 21:10:34 +0200
parents a7b12c1ab514
children acfe624d83f5
files jvmci/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java jvmci/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java jvmci/jdk.vm.ci.code/overview.html jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java jvmci/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java
diffstat 12 files changed, 45 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java	Tue May 17 21:10:34 2016 +0200
@@ -187,7 +187,6 @@
         super("aarch64", AArch64Kind.QWORD, ByteOrder.LITTLE_ENDIAN, true, allRegisters, 0, 0, 0);
         this.features = features;
         this.flags = flags;
-        assert features.contains(CPUFeature.FP) : "minimum config for aarch64";
     }
 
     public EnumSet<CPUFeature> getFeatures() {
--- a/jvmci/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java	Tue May 17 21:10:34 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
--- a/jvmci/jdk.vm.ci.code/overview.html	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.code/overview.html	Tue May 17 21:10:34 2016 +0200
@@ -3,7 +3,7 @@
 <head>
 <!--
 
-Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2012, 2015, 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
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java	Tue May 17 21:10:34 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java	Tue May 17 21:10:34 2016 +0200
@@ -1,21 +1,24 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. DO NOT ALTER OR
- * REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2010, 2016, 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.
+ * 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.
  *
- * This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details (a copy is included in the LICENSE file that
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
  * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2 along with this work;
- * if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com
- * if you need additional information or have any questions.
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 /**
  * Package that defines the interface between a Java application that wants to install code and the
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java	Tue May 17 21:10:34 2016 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
--- a/jvmci/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java	Tue May 17 21:10:34 2016 +0200
@@ -65,7 +65,8 @@
     }
 
     /**
-     * Specifies if initialization timing is enabled.
+     * Specifies if initialization timing is enabled. Note: This property cannot use
+     * {@code HotSpotJVMCIRuntime.Option} since that class is not visible from this package.
      */
     private static final boolean ENABLED = Boolean.getBoolean("jvmci.InitTimer");
 
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java	Tue May 17 21:10:34 2016 +0200
@@ -75,7 +75,7 @@
     protected final Comment[] comments;
 
     /**
-     * The data section containing constants for the emitted machine code.
+     * The data section containing serialized constants for the emitted machine code.
      */
     protected final byte[] dataSection;
 
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java	Tue May 17 21:10:34 2016 +0200
@@ -23,6 +23,7 @@
 package jdk.vm.ci.hotspot;
 
 import java.lang.reflect.Array;
+import java.util.Objects;
 
 import jdk.vm.ci.common.JVMCIError;
 import jdk.vm.ci.meta.Constant;
@@ -65,13 +66,13 @@
         } else if (x instanceof HotSpotObjectConstantImpl) {
             return y instanceof HotSpotObjectConstantImpl && ((HotSpotObjectConstantImpl) x).object() == ((HotSpotObjectConstantImpl) y).object();
         } else {
-            return x.equals(y);
+            return Objects.equals(x, y);
         }
     }
 
     @Override
     public Integer readArrayLength(JavaConstant array) {
-        if (array.getJavaKind() != JavaKind.Object || array.isNull()) {
+        if (array == null || array.getJavaKind() != JavaKind.Object || array.isNull()) {
             return null;
         }
 
@@ -84,12 +85,12 @@
 
     @Override
     public JavaConstant readArrayElement(JavaConstant array, int index) {
-        if (array.getJavaKind() != JavaKind.Object || array.isNull()) {
+        if (array == null || array.getJavaKind() != JavaKind.Object || array.isNull()) {
             return null;
         }
         Object a = ((HotSpotObjectConstantImpl) array).object();
 
-        if (index < 0 || index >= Array.getLength(a)) {
+        if (!a.getClass().isArray() || index < 0 || index >= Array.getLength(a)) {
             return null;
         }
 
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java	Tue May 17 21:10:34 2016 +0200
@@ -152,7 +152,7 @@
     @Override
     public JavaConstant readUnsafeConstant(JavaKind kind, JavaConstant baseConstant, long displacement) {
         if (kind == null) {
-            throw new IllegalArgumentException();
+            throw new IllegalArgumentException("null JavaKind");
         }
         if (kind == JavaKind.Object) {
             Object o = readRawObject(baseConstant, displacement, runtime.getConfig().useCompressedOops);
@@ -198,9 +198,7 @@
             Object o = readRawObject(base, displacement, runtime.getConfig().useCompressedOops);
             return HotSpotObjectConstantImpl.forObject(o);
         }
-        if (!isValidObjectFieldDisplacement(base, displacement)) {
-            return null;
-        }
+        assert isValidObjectFieldDisplacement(base, displacement);
         return HotSpotObjectConstantImpl.forObject(readRawObject(base, displacement, false));
     }
 
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java	Tue May 17 21:10:34 2016 +0200
@@ -60,7 +60,7 @@
      * Resolves the invocation target for an invocation of {@link IntrinsicMethod#INVOKE_BASIC
      * MethodHandle.invokeBasic} with the given constant receiver {@link MethodHandle}. Returns
      * {@code null} if the invocation target is not available at this time.
-     * <p>
+     *
      * The first invocations of a method handle can use an interpreter to lookup the actual invoked
      * method; frequently executed method handles can use Java bytecode generation to avoid the
      * interpreter overhead. If the parameter forceBytecodeGeneration is set to true, the VM should
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java	Fri May 13 16:38:50 2016 +0200
+++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java	Tue May 17 21:10:34 2016 +0200
@@ -1,21 +1,24 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. DO NOT ALTER OR
- * REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * Copyright (c) 2009, 2011, 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.
+ * 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.
  *
- * This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details (a copy is included in the LICENSE file that
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
  * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2 along with this work;
- * if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com
- * if you need additional information or have any questions.
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /**