changeset 1268:71a4e37769f8

8080042: can't build nashorn.jar from jdk9-dev/nashorn using jdk8 installation as JAVA_HOME Reviewed-by: lagergren, jlaskey
author sundar
date Mon, 11 May 2015 22:57:24 +0530
parents 00df6e4fc75a
children a0896a45b877
files src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeArrayBuffer.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeFloat32Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeFloat64Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt16Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt32Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt8Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint16Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint32Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint8Array.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java
diffstat 10 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeArrayBuffer.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeArrayBuffer.java	Mon May 11 22:57:24 2015 +0530
@@ -28,6 +28,7 @@
 import static jdk.nashorn.internal.runtime.ECMAErrors.typeError;
 
 import java.nio.ByteBuffer;
+
 import jdk.nashorn.internal.objects.annotations.Attribute;
 import jdk.nashorn.internal.objects.annotations.Constructor;
 import jdk.nashorn.internal.objects.annotations.Function;
@@ -226,10 +227,10 @@
     }
 
     ByteBuffer getBuffer(final int offset) {
-        return nb.duplicate().position(offset);
+        return (ByteBuffer)nb.duplicate().position(offset);
     }
 
     ByteBuffer getBuffer(final int offset, final int length) {
-        return getBuffer(offset).limit(length);
+        return (ByteBuffer)getBuffer(offset).limit(length);
     }
 }
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeFloat32Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeFloat32Array.java	Mon May 11 22:57:24 2015 +0530
@@ -81,7 +81,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Float32ArrayData.class, "setElem", void.class, int.class, double.class).methodHandle();
 
         private Float32ArrayData(final FloatBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((FloatBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeFloat64Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeFloat64Array.java	Mon May 11 22:57:24 2015 +0530
@@ -81,7 +81,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Float64ArrayData.class, "setElem", void.class, int.class, double.class).methodHandle();
 
         private Float64ArrayData(final DoubleBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((DoubleBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt16Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt16Array.java	Mon May 11 22:57:24 2015 +0530
@@ -82,7 +82,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Int16ArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
 
         private Int16ArrayData(final ShortBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((ShortBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt32Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt32Array.java	Mon May 11 22:57:24 2015 +0530
@@ -81,7 +81,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Int32ArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
 
         private Int32ArrayData(final IntBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((IntBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt8Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeInt8Array.java	Mon May 11 22:57:24 2015 +0530
@@ -80,7 +80,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Int8ArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
 
         private Int8ArrayData(final ByteBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((ByteBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint16Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint16Array.java	Mon May 11 22:57:24 2015 +0530
@@ -81,7 +81,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Uint16ArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
 
         private Uint16ArrayData(final CharBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((CharBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint32Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint32Array.java	Mon May 11 22:57:24 2015 +0530
@@ -82,7 +82,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Uint32ArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
 
         private Uint32ArrayData(final IntBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((IntBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint8Array.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint8Array.java	Mon May 11 22:57:24 2015 +0530
@@ -81,7 +81,7 @@
         private static final MethodHandle SET_ELEM = specialCall(MethodHandles.lookup(), Uint8ArrayData.class, "setElem", void.class, int.class, int.class).methodHandle();
 
         private Uint8ArrayData(final ByteBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((ByteBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java	Thu May 07 20:49:48 2015 -0700
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java	Mon May 11 22:57:24 2015 +0530
@@ -85,7 +85,7 @@
         private static final MethodHandle CLAMP_LONG = staticCall(MethodHandles.lookup(), Uint8ClampedArrayData.class, "clampLong", long.class, long.class).methodHandle();
 
         private Uint8ClampedArrayData(final ByteBuffer nb, final int start, final int end) {
-            super(nb.position(start).limit(end).slice(), end - start);
+            super(((ByteBuffer)nb.position(start).limit(end)).slice(), end - start);
         }
 
         @Override