Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
JDK 11 jdk.rmic.jmod - RMI Compiler Tool
JDK 11 jdk.rmic.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) Compiler Tool tool,
which can be invoked by the "rmic" command.
JDK 11 RMI Compiler Tool tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.rmic.jmod.
JDK 11 RMI Compiler Tool tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 RMI Compiler Tool tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.rmic.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/tools/tree/ConditionalExpression.java
/*
* Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.tools.tree;
import sun.tools.java.*;
import sun.tools.asm.Assembler;
import sun.tools.asm.Label;
import java.io.PrintStream;
import java.util.Hashtable;
/**
* WARNING: The contents of this source file are not part of any
* supported API. Code that depends on them does so at its own risk:
* they are subject to change or removal without notice.
*/
public
class ConditionalExpression extends BinaryExpression {
Expression cond;
/**
* Constructor
*/
public ConditionalExpression(long where, Expression cond, Expression left, Expression right) {
super(COND, where, Type.tError, left, right);
this.cond = cond;
}
/**
* Order the expression based on precedence
*/
public Expression order() {
if (precedence() > cond.precedence()) {
UnaryExpression e = (UnaryExpression)cond;
cond = e.right;
e.right = order();
return e;
}
return this;
}
/**
* Check the expression
*/
public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
ConditionVars cvars = cond.checkCondition(env, ctx, vset, exp);
vset = left.checkValue(env, ctx, cvars.vsTrue, exp).join(
right.checkValue(env, ctx, cvars.vsFalse, exp) );
cond = convert(env, ctx, Type.tBoolean, cond);
int tm = left.type.getTypeMask() | right.type.getTypeMask();
if ((tm & TM_ERROR) != 0) {
type = Type.tError;
return vset;
}
if (left.type.equals(right.type)) {
type = left.type;
} else if ((tm & TM_DOUBLE) != 0) {
type = Type.tDouble;
} else if ((tm & TM_FLOAT) != 0) {
type = Type.tFloat;
} else if ((tm & TM_LONG) != 0) {
type = Type.tLong;
} else if ((tm & TM_REFERENCE) != 0) {
try {
// This is wrong. We should be using their most common
// ancestor, instead.
type = env.implicitCast(right.type, left.type)
? left.type : right.type;
} catch (ClassNotFound e) {
type = Type.tError;
}
} else if (((tm & TM_CHAR) != 0) && left.fitsType(env, ctx, Type.tChar) && right.fitsType(env, ctx, Type.tChar)) {
type = Type.tChar;
} else if (((tm & TM_SHORT) != 0) && left.fitsType(env, ctx, Type.tShort) && right.fitsType(env, ctx, Type.tShort)) {
type = Type.tShort;
} else if (((tm & TM_BYTE) != 0) && left.fitsType(env, ctx, Type.tByte) && right.fitsType(env, ctx, Type.tByte)) {
type = Type.tByte;
} else {
type = Type.tInt;
}
left = convert(env, ctx, type, left);
right = convert(env, ctx, type, right);
return vset;
}
public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
vset = cond.checkValue(env, ctx, vset, exp);
cond = convert(env, ctx, Type.tBoolean, cond);
return left.check(env, ctx, vset.copy(), exp).join(right.check(env, ctx, vset, exp));
}
/**
* Check if constant
*/
public boolean isConstant() {
return cond.isConstant() && left.isConstant() && right.isConstant();
}
/**
* Simplify
*/
Expression simplify() {
if (cond.equals(true)) {
return left;
}
if (cond.equals(false)) {
return right;
}
return this;
}
/**
* Inline
*/
public Expression inline(Environment env, Context ctx) {
left = left.inline(env, ctx);
right = right.inline(env, ctx);
if ((left == null) && (right == null)) {
return cond.inline(env, ctx);
}
if (left == null) {
left = right;
right = null;
cond = new NotExpression(where, cond);
}
cond = cond.inlineValue(env, ctx);
return simplify();
}
public Expression inlineValue(Environment env, Context ctx) {
cond = cond.inlineValue(env, ctx);
left = left.inlineValue(env, ctx);
right = right.inlineValue(env, ctx);
return simplify();
}
/**
* The cost of inlining this expression
*/
public int costInline(int thresh, Environment env, Context ctx) {
// We need to check if right is null in case costInline()
// is called after this expression has been inlined.
// This call can happen, for example, in MemberDefinition#cleanup().
// (Fix for 4069861).
return 1 +
cond.costInline(thresh, env, ctx) +
left.costInline(thresh, env, ctx) +
((right == null) ? 0 : right.costInline(thresh, env, ctx));
}
/**
* Create a copy of the expression for method inlining
*/
public Expression copyInline(Context ctx) {
ConditionalExpression e = (ConditionalExpression)clone();
e.cond = cond.copyInline(ctx);
e.left = left.copyInline(ctx);
// If copyInline() is called after inlining is complete,
// right could be null.
e.right = (right == null) ? null : right.copyInline(ctx);
return e;
}
/**
* Code
*/
public void codeValue(Environment env, Context ctx, Assembler asm) {
Label l1 = new Label();
Label l2 = new Label();
cond.codeBranch(env, ctx, asm, l1, false);
left.codeValue(env, ctx, asm);
asm.add(where, opc_goto, l2);
asm.add(l1);
right.codeValue(env, ctx, asm);
asm.add(l2);
}
public void code(Environment env, Context ctx, Assembler asm) {
Label l1 = new Label();
cond.codeBranch(env, ctx, asm, l1, false);
left.code(env, ctx, asm);
if (right != null) {
Label l2 = new Label();
asm.add(where, opc_goto, l2);
asm.add(l1);
right.code(env, ctx, asm);
asm.add(l2);
} else {
asm.add(l1);
}
}
/**
* Print
*/
public void print(PrintStream out) {
out.print("(" + opNames[op] + " ");
cond.print(out);
out.print(" ");
left.print(out);
out.print(" ");
if (right != null) {
right.print(out);
} else {
out.print("<null>");
}
out.print(")");
}
}
⏎ sun/tools/tree/ConditionalExpression.java
Or download all of them as a single archive file:
File name: jdk.rmic-11.0.1-src.zip File size: 418901 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.scripting.nashorn.jmod - Scripting Nashorn Module
2020-04-25, ≈87🔥, 0💬
Popular Posts:
JSP(tm) Standard Tag Library 1.1 implementation - Jakarta Taglibs hosts the Standard Taglib 1.1, an ...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.0.2? The if y...
JDK 7 tools.jar is the JAR file for JDK 7 tools. It contains Java classes to support different JDK t...