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/codegen/types/ArrayType.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.codegen.types;

import static jdk.internal.org.objectweb.asm.Opcodes.AALOAD;
import static jdk.internal.org.objectweb.asm.Opcodes.AASTORE;
import static jdk.internal.org.objectweb.asm.Opcodes.ALOAD;
import static jdk.internal.org.objectweb.asm.Opcodes.ANEWARRAY;
import static jdk.internal.org.objectweb.asm.Opcodes.ARRAYLENGTH;

import jdk.internal.org.objectweb.asm.MethodVisitor;

/**
 * This is an array type, i.e. OBJECT_ARRAY, NUMBER_ARRAY.
 */
public class ArrayType extends ObjectType implements BytecodeArrayOps {
    private static final long serialVersionUID = 1L;

    /**
     * Constructor
     *
     * @param clazz the Java class representation of the array
     */
    protected ArrayType(final Class<?> clazz) {
        super(clazz);
    }

    /**
     * Get the element type of the array elements e.g. for OBJECT_ARRAY, this is OBJECT
     *
     * @return the element type
     */
    public Type getElementType() {
        return Type.typeFor(getTypeClass().getComponentType());
    }

    @Override
    public void astore(final MethodVisitor method) {
        method.visitInsn(AASTORE);
    }

    @Override
    public Type aload(final MethodVisitor method) {
        method.visitInsn(AALOAD);
        return getElementType();
    }

    @Override
    public Type arraylength(final MethodVisitor method) {
        method.visitInsn(ARRAYLENGTH);
        return INT;
    }

    @Override
    public Type newarray(final MethodVisitor method) {
        method.visitTypeInsn(ANEWARRAY, getElementType().getInternalName());
        return this;
    }

    @Override
    public Type newarray(final MethodVisitor method, final int dims) {
        method.visitMultiANewArrayInsn(getInternalName(), dims);
        return this;
    }

    @Override
    public Type load(final MethodVisitor method, final int slot) {
        assert slot != -1;
        method.visitVarInsn(ALOAD, slot);
        return this;
    }

    @Override
    public String toString() {
        return "array<elementType=" + getElementType().getTypeClass().getSimpleName() + '>';
    }

    @Override
    public Type convert(final MethodVisitor method, final Type to) {
        assert to.isObject();
        assert !to.isArray() || ((ArrayType)to).getElementType() == getElementType();
        return to;
    }

}

jdk/nashorn/internal/codegen/types/ArrayType.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

JDK 11 jdk.rmic.jmod - RMI Compiler Tool

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-04-25, 108130👍, 0💬