@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:openjdk-jdk10
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:openjdk-jdk10
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:openjdk9
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:openjdk9
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:kaziranga
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:kaziranga
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:lookaside_java-1.8.0-openjdk
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:lookaside_java-1.8.0-openjdk
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:jdk8u_nashorn
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:jdk8u_nashorn
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:infobip-open-jdk-8
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:infobip-open-jdk-8
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id(((ScriptObject)arg).getMap()) +
')';
}
return arg.toString();
}
项目:OLD-OpenJDK8
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:OLD-OpenJDK8
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id((((ScriptObject)arg).getMap())) +
")";
}
return arg.toString();
}
项目:nashorn-backport
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:nashorn-backport
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id((((ScriptObject)arg).getMap())) +
")";
}
return arg.toString();
}
项目:nashorn
文件:LexicalContext.java
@Override
public String toString() {
final StringBuffer sb = new StringBuffer();
sb.append("[ ");
for (int i = 0; i < sp; i++) {
final Object node = stack[i];
sb.append(node.getClass().getSimpleName());
sb.append('@');
sb.append(Debug.id(node));
sb.append(':');
if (node instanceof FunctionNode) {
final FunctionNode fn = (FunctionNode)node;
final Source source = fn.getSource();
String src = source.toString();
if (src.contains(File.pathSeparator)) {
src = src.substring(src.lastIndexOf(File.pathSeparator));
}
src += ' ';
src += fn.getLineNumber();
sb.append(src);
}
sb.append(' ');
}
sb.append(" ==> ]");
return sb.toString();
}
项目:nashorn
文件:MethodHandleFactory.java
private static String argString(final Object arg) {
if (arg == null) {
return "null";
}
if (arg.getClass().isArray()) {
final List<Object> list = new ArrayList<>();
for (final Object elem : (Object[])arg) {
list.add('\'' + argString(elem) + '\'');
}
return list.toString();
}
if (arg instanceof ScriptObject) {
return arg.toString() +
" (map=" + Debug.id((((ScriptObject)arg).getMap())) +
")";
}
return arg.toString();
}
private void tracePrint(final PrintWriter out,final String tag,final Object[] args,final Object result) {
//boolean isVoid = type().returnType() == void.class;
out.print(Debug.id(this) + " TAG " + tag);
out.print(getDescriptor().getName() + "(");
if (args.length > 0) {
printObject(out,args[0]);
for (int i = 1; i < args.length; i++) {
final Object arg = args[i];
out.print(",");
if (!(arg instanceof ScriptObject && ((ScriptObject)arg).isScope())) {
printObject(out,arg);
} else {
out.print("ScopE");
}
}
}
out.print(")");
if (tag.equals("EXIT ")) {
out.print(" --> ");
printObject(out,result);
}
out.println();
}
项目:openjdk-jdk10
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,final Object result) {
//boolean isVoid = type().returnType() == void.class;
out.print(Debug.id(this) + " TAG " + tag);
out.print(getDescriptor().getoperation() + "(");
if (args.length > 0) {
printObject(out,result);
}
out.println();
}
项目:openjdk9
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:kaziranga
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:lookaside_java-1.8.0-openjdk
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:jdk8u_nashorn
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:infobip-open-jdk-8
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:OLD-OpenJDK8
文件:LinkerCallSite.java
项目:OLD-OpenJDK8
文件:Symbol.java
private void trace(final String desc) {
if (TRACE_SYMBOLS != null && (TRACE_SYMBOLS.isEmpty() || TRACE_SYMBOLS.contains(name))) {
Context.err(Debug.id(this) + " SYMBOL: '" + name + "' " + desc);
if (TRACE_SYMBOLS_STACKTRACE != null && (TRACE_SYMBOLS_STACKTRACE.isEmpty() || TRACE_SYMBOLS_STACKTRACE.contains(name))) {
new Throwable().printstacktrace(Context.getCurrentErr());
}
}
}
项目:nashorn-backport
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:nashorn-backport
文件:Symbol.java
private void trace(final String desc) {
if (TRACE_SYMBOLS != null && (TRACE_SYMBOLS.isEmpty() || TRACE_SYMBOLS.contains(name))) {
Context.err(Debug.id(this) + " SYMBOL: '" + name + "' " + desc);
if (TRACE_SYMBOLS_STACKTRACE != null && (TRACE_SYMBOLS_STACKTRACE.isEmpty() || TRACE_SYMBOLS_STACKTRACE.contains(name))) {
new Throwable().printstacktrace(Context.getCurrentErr());
}
}
}
项目:nashorn-backport
文件:FinalizeTypes.java
/**
* A symbol (and {@link jdk.nashorn.internal.runtime.Property}) can be tagged as "may be primitive".
* This is used a hint for dual fields that it is even worth it to try representing this
* field as something other than java.lang.Object.
*
* @param node node in which to tag symbols as primitive
* @param to which primitive type to use for tagging
*/
private static void setCanBePrimitive(final Node node,final Type to) {
final HashSet<Node> exclude = new HashSet<>();
node.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
private void setCanBePrimitive(final Symbol symbol) {
LOG.info("*** can be primitive symbol ",symbol," ",Debug.id(symbol));
symbol.setCanBePrimitive(to);
}
@Override
public boolean enterIdentNode(final IdentNode identNode) {
if (!exclude.contains(identNode)) {
setCanBePrimitive(identNode.getSymbol());
}
return false;
}
@Override
public boolean enteraccessNode(final AccessNode accessNode) {
setCanBePrimitive(accessNode.getproperty().getSymbol());
return false;
}
@Override
public boolean enterIndexNode(final IndexNode indexNode) {
exclude.add(indexNode.getBase()); //prevent array base node to be flagged as primitive,but k in a[k++] is fine
return true;
}
});
}
项目:nashorn
文件:LinkerCallSite.java
private void tracePrint(final PrintWriter out,result);
}
out.println();
}
项目:nashorn
文件:Symbol.java
private void trace(final String desc) {
if (TRACE_SYMBOLS != null && (TRACE_SYMBOLS.isEmpty() || TRACE_SYMBOLS.contains(name))) {
Context.err(Debug.id(this) + " SYMBOL: '" + name + "' " + desc);
if (TRACE_SYMBOLS_STACKTRACE != null && (TRACE_SYMBOLS_STACKTRACE.isEmpty() || TRACE_SYMBOLS_STACKTRACE.contains(name))) {
new Throwable().printstacktrace(Context.getCurrentErr());
}
}
}
项目:nashorn
文件:FinalizeTypes.java
/**
* A symbol (and {@link jdk.nashorn.internal.runtime.Property}) can be tagged as "may be primitive".
* This is used a hint for dual fields that it is even worth it to try representing this
* field as something other than java.lang.Object.
*
* @param node node in which to tag symbols as primitive
* @param to which primitive type to use for tagging
*/
private static void setCanBePrimitive(final Node node,but k in a[k++] is fine
return true;
}
});
}
private void trace(final String desc) {
Context.err(Debug.id(this) + " SYMBOL: '" + name + "' " + desc);
if (TRACE_SYMBOLS_STACKTRACE != null && (TRACE_SYMBOLS_STACKTRACE.isEmpty() || TRACE_SYMBOLS_STACKTRACE.contains(name))) {
new Throwable().printstacktrace(Context.getCurrentErr());
}
}
@Override
public String toString() {
return "methodEmitter: " + (functionNode == null ? method : functionNode.getName()).toString() + ' ' + Debug.id(this);
}
项目:openjdk-jdk10
文件:Symbol.java
private void trace(final String desc) {
Context.err(Debug.id(this) + " SYMBOL: '" + name + "' " + desc);
if (TRACE_SYMBOLS_STACKTRACE != null && (TRACE_SYMBOLS_STACKTRACE.isEmpty() || TRACE_SYMBOLS_STACKTRACE.contains(name))) {
new Throwable().printstacktrace(Context.getCurrentErr());
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。