Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 jdk.scripting.nashorn.jmod - Scripting Nashorn Module
JDK 11 jdk.scripting.nashorn.jmod is the JMOD file for JDK 11 Scripting Nashorn module.
JDK 11 Scripting Nashorn module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.scripting.nashorn.jmod.
JDK 11 Scripting Nashorn module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Scripting Nashorn module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.scripting.nashorn.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/nashorn/internal/objects/NativeFloat64Array.java
/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.nashorn.internal.objects; import static jdk.nashorn.internal.codegen.CompilerConstants.specialCall; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.nio.ByteBuffer; import java.nio.DoubleBuffer; import jdk.nashorn.internal.objects.annotations.Attribute; import jdk.nashorn.internal.objects.annotations.Constructor; import jdk.nashorn.internal.objects.annotations.Function; import jdk.nashorn.internal.objects.annotations.Property; import jdk.nashorn.internal.objects.annotations.ScriptClass; import jdk.nashorn.internal.objects.annotations.Where; import jdk.nashorn.internal.runtime.JSType; import jdk.nashorn.internal.runtime.PropertyMap; import jdk.nashorn.internal.runtime.ScriptObject; import jdk.nashorn.internal.runtime.arrays.ArrayData; import jdk.nashorn.internal.runtime.arrays.TypedArrayData; /** * Float64 array for the TypedArray extension */ @ScriptClass("Float64Array") public final class NativeFloat64Array extends ArrayBufferView { /** * The size in bytes of each element in the array. */ @Property(attributes = Attribute.NOT_ENUMERABLE | Attribute.NOT_WRITABLE | Attribute.NOT_CONFIGURABLE, where = Where.CONSTRUCTOR) public static final int BYTES_PER_ELEMENT = 8; // initialized by nasgen @SuppressWarnings("unused") private static PropertyMap $nasgenmap$; private static final Factory FACTORY = new Factory(BYTES_PER_ELEMENT) { @Override public ArrayBufferView construct(final NativeArrayBuffer buffer, final int byteOffset, final int length) { return new NativeFloat64Array(buffer, byteOffset, length); } @Override public Float64ArrayData createArrayData(final ByteBuffer nb, final int start, final int length) { return new Float64ArrayData(nb.asDoubleBuffer(), start, length); } @Override public String getClassName() { return "Float64Array"; } }; private static final class Float64ArrayData extends TypedArrayData<DoubleBuffer> { private static final MethodHandle GET_ELEM = specialCall(MethodHandles.lookup(), Float64ArrayData.class, "getElem", double.class, int.class).methodHandle(); 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); } @Override protected MethodHandle getGetElem() { return GET_ELEM; } @Override protected MethodHandle getSetElem() { return SET_ELEM; } @Override public Class<?> getElementType() { return double.class; } @Override public Class<?> getBoxedElementType() { return Double.class; } private double getElem(final int index) { try { return nb.get(index); } catch (final IndexOutOfBoundsException e) { throw new ClassCastException(); //force relink - this works for unoptimistic too } } private void setElem(final int index, final double elem) { try { if (index < nb.limit()) { nb.put(index, elem); } } catch (final IndexOutOfBoundsException e) { throw new ClassCastException(); } } @Override public MethodHandle getElementGetter(final Class<?> returnType, final int programPoint) { if (returnType == int.class) { return null; } return getContinuousElementGetter(getClass(), GET_ELEM, returnType, programPoint); } @Override public int getInt(final int index) { return (int)getDouble(index); } @Override public double getDouble(final int index) { return getElem(index); } @Override public double getDoubleOptimistic(final int index, final int programPoint) { return getElem(index); } @Override public Object getObject(final int index) { return getDouble(index); } @Override public ArrayData set(final int index, final Object value, final boolean strict) { return set(index, JSType.toNumber(value), strict); } @Override public ArrayData set(final int index, final int value, final boolean strict) { return set(index, (double)value, strict); } @Override public ArrayData set(final int index, final double value, final boolean strict) { setElem(index, value); return this; } } /** * Constructor * * @param newObj is this typed array instantiated with the new operator * @param self self reference * @param args args * * @return new typed array */ @Constructor(arity = 1) public static NativeFloat64Array constructor(final boolean newObj, final Object self, final Object... args) { return (NativeFloat64Array)constructorImpl(newObj, args, FACTORY); } NativeFloat64Array(final NativeArrayBuffer buffer, final int byteOffset, final int length) { super(buffer, byteOffset, length); } @Override protected Factory factory() { return FACTORY; } @Override protected boolean isFloatArray() { return true; } /** * Set values * @param self self reference * @param array multiple values of array's type to set * @param offset optional start index, interpreted 0 if undefined * @return undefined */ @Function(attributes = Attribute.NOT_ENUMERABLE) protected static Object set(final Object self, final Object array, final Object offset) { return ArrayBufferView.setImpl(self, array, offset); } /** * Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, * referencing the elements at begin, inclusive, up to end, exclusive. If either * begin or end is negative, it refers to an index from the end of the array, * as opposed to from the beginning. * <p> * If end is unspecified, the subarray contains all elements from begin to the end * of the TypedArray. The range specified by the begin and end values is clamped to * the valid index range for the current array. If the computed length of the new * TypedArray would be negative, it is clamped to zero. * <p> * The returned TypedArray will be of the same type as the array on which this * method is invoked. * * @param self self reference * @param begin begin position * @param end end position * * @return sub array */ @Function(attributes = Attribute.NOT_ENUMERABLE) protected static NativeFloat64Array subarray(final Object self, final Object begin, final Object end) { return (NativeFloat64Array)ArrayBufferView.subarrayImpl(self, begin, end); } /** * ECMA 6 22.2.3.30 %TypedArray%.prototype [ @@iterator ] ( ) * * @param self the self reference * @return an iterator over the array's values */ @Function(attributes = Attribute.NOT_ENUMERABLE, name = "@@iterator") public static Object getIterator(final Object self) { return ArrayIterator.newArrayValueIterator(self); } @Override protected ScriptObject getPrototype(final Global global) { return global.getFloat64ArrayPrototype(); } }
⏎ jdk/nashorn/internal/objects/NativeFloat64Array.java
Or download all of them as a single archive file:
File name: jdk.scripting.nashorn-11.0.1-src.zip File size: 1390965 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.scripting.nashorn.shell.jmod - Scripting Nashorn Shell Module
2020-04-25, 83063👍, 0💬
Popular Posts:
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...
commons-fileupload-1.3.3 -sources.jaris the source JAR file for Apache Commons FileUpload 1.3., whic...
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
How to read XML document from socket connections with the socket\DelayedInput.java provided in the A...
JDK 11 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 11 Internal Jvmstat module. JDK 11 Intern...