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/codegen/TypeMap.java
/* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.nashorn.internal.codegen; import java.lang.invoke.MethodType; import java.util.Arrays; import java.util.NoSuchElementException; import jdk.nashorn.internal.codegen.types.Type; import jdk.nashorn.internal.ir.FunctionNode; import jdk.nashorn.internal.runtime.ScriptFunction; /** * A tuple containing function id, parameter types, return type and needsCallee flag. */ public final class TypeMap { private final int functionNodeId; private final Type[] paramTypes; private final Type returnType; private final boolean needsCallee; /** * Constructor * @param functionNodeId function node id * @param type method type found at runtime corresponding to parameter guess * @param needsCallee does the function using this type map need a callee */ public TypeMap(final int functionNodeId, final MethodType type, final boolean needsCallee) { final Type[] types = new Type[type.parameterCount()]; int pos = 0; for (final Class<?> p : type.parameterArray()) { types[pos++] = Type.typeFor(p); } this.functionNodeId = functionNodeId; this.paramTypes = types; this.returnType = Type.typeFor(type.returnType()); this.needsCallee = needsCallee; } /** * Returns the array of parameter types for a particular function node * @param functionNodeId the ID of the function node * @return an array of parameter types * @throws NoSuchElementException if the type map has no mapping for the requested function */ public Type[] getParameterTypes(final int functionNodeId) { assert this.functionNodeId == functionNodeId; return paramTypes.clone(); } MethodType getCallSiteType(final FunctionNode functionNode) { assert this.functionNodeId == functionNode.getId(); final Type[] types = paramTypes; MethodType mt = MethodType.methodType(returnType.getTypeClass()); if (needsCallee) { mt = mt.appendParameterTypes(ScriptFunction.class); } mt = mt.appendParameterTypes(Object.class); //this for (final Type type : types) { if (type == null) { return null; // not all parameter information is supplied } mt = mt.appendParameterTypes(type.getTypeClass()); } return mt; } /** * Does the function using this TypeMap need a callee argument. This is used * to compute correct param index offsets in {@link jdk.nashorn.internal.codegen.ApplySpecialization} * @return true if a callee is needed, false otherwise */ public boolean needsCallee() { return needsCallee; } /** * Get the parameter type for this parameter position, or * null if now known * @param functionNode functionNode * @param pos position * @return parameter type for this callsite if known */ Type get(final FunctionNode functionNode, final int pos) { assert this.functionNodeId == functionNode.getId(); final Type[] types = paramTypes; assert types == null || pos < types.length : "fn = " + functionNode.getId() + " " + "types=" + Arrays.toString(types) + " || pos=" + pos + " >= length=" + types.length + " in " + this; if (types != null && pos < types.length) { return types[pos]; } return null; } /** * Get the return type required for the call site we're compiling for. This only determines * whether object return type is required or not. * @return Type.OBJECT for call sites with object return types, Type.UNKNOWN for everything else */ Type getReturnType() { return returnType.isObject() ? Type.OBJECT : Type.UNKNOWN; } @Override public String toString() { return toString(""); } String toString(final String prefix) { final StringBuilder sb = new StringBuilder(); final int id = functionNodeId; sb.append(prefix).append('\t'); sb.append("function ").append(id).append('\n'); sb.append(prefix).append("\t\tparamTypes="); sb.append(Arrays.toString(paramTypes)); sb.append('\n'); sb.append(prefix).append("\t\treturnType="); final Type ret = returnType; sb.append(ret == null ? "N/A" : ret); sb.append('\n'); return sb.toString(); } }
⏎ jdk/nashorn/internal/codegen/TypeMap.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, 107845👍, 0💬
Popular Posts:
xml-commons External Source Code Files are provided in the source package file, xml-commons-external...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
How to read XML document from socket connections with the socket\DelayedInput.java provided in the A...
JDK 11 jdk.localedata.jmod is the JMOD file for JDK 11 Localedata module. JDK 11 Locale Data module ...
commons-io-2.6-sources.j aris the source JAR file for Apache Commons IO 2.6, which is a library of u...