src/java.base/share/classes/java/lang/invoke/LambdaForm.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File jdk Cdiff src/java.base/share/classes/java/lang/invoke/LambdaForm.java

src/java.base/share/classes/java/lang/invoke/LambdaForm.java

Print this page
rev 11254 : 8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
Reviewed-by: ?
rev 11255 : [mq]: gwt.profile.1
rev 11256 : [mq]: gwt.profile.2
rev 11257 : [mq]: gwt.profile.3

*** 242,252 **** } } LambdaForm(String debugName, int arity, Name[] names, int result) { ! this(debugName, arity, names, result, true); } LambdaForm(String debugName, int arity, Name[] names, int result, boolean forceInline) { assert(namesOK(arity, names)); this.arity = arity; --- 242,252 ---- } } LambdaForm(String debugName, int arity, Name[] names, int result) { ! this(debugName, arity, names, result, /*forceInline=*/true); } LambdaForm(String debugName, int arity, Name[] names, int result, boolean forceInline) { assert(namesOK(arity, names)); this.arity = arity;
*** 261,280 **** compileToBytecode(); } } LambdaForm(String debugName, int arity, Name[] names) { ! this(debugName, arity, names, LAST_RESULT, true); } LambdaForm(String debugName, int arity, Name[] names, boolean forceInline) { this(debugName, arity, names, LAST_RESULT, forceInline); } LambdaForm(String debugName, Name[] formals, Name[] temps, Name result) { this(debugName, ! formals.length, buildNames(formals, temps, result), LAST_RESULT, true); } LambdaForm(String debugName, Name[] formals, Name[] temps, Name result, boolean forceInline) { this(debugName, formals.length, buildNames(formals, temps, result), LAST_RESULT, forceInline); --- 261,280 ---- compileToBytecode(); } } LambdaForm(String debugName, int arity, Name[] names) { ! this(debugName, arity, names, LAST_RESULT, /*forceInline=*/true); } LambdaForm(String debugName, int arity, Name[] names, boolean forceInline) { this(debugName, arity, names, LAST_RESULT, forceInline); } LambdaForm(String debugName, Name[] formals, Name[] temps, Name result) { this(debugName, ! formals.length, buildNames(formals, temps, result), LAST_RESULT, /*forceInline=*/true); } LambdaForm(String debugName, Name[] formals, Name[] temps, Name result, boolean forceInline) { this(debugName, formals.length, buildNames(formals, temps, result), LAST_RESULT, forceInline);
*** 289,311 **** names[length - 1] = result; return names; } private LambdaForm(String sig) { - this(sig, true); - } - - private LambdaForm(String sig, boolean forceInline) { // Make a blank lambda form, which returns a constant zero or null. // It is used as a template for managing the invocation of similar forms that are non-empty. // Called only from getPreparedForm. assert(isValidSignature(sig)); this.arity = signatureArity(sig); this.result = (signatureReturn(sig) == V_TYPE ? -1 : arity); this.names = buildEmptyNames(arity, sig); this.debugName = "LF.zero"; ! this.forceInline = forceInline; assert(nameRefsAreLegal()); assert(isEmpty()); assert(sig.equals(basicTypeSignature())) : sig + " != " + basicTypeSignature(); } --- 289,307 ---- names[length - 1] = result; return names; } private LambdaForm(String sig) { // Make a blank lambda form, which returns a constant zero or null. // It is used as a template for managing the invocation of similar forms that are non-empty. // Called only from getPreparedForm. assert(isValidSignature(sig)); this.arity = signatureArity(sig); this.result = (signatureReturn(sig) == V_TYPE ? -1 : arity); this.names = buildEmptyNames(arity, sig); this.debugName = "LF.zero"; ! this.forceInline = true; assert(nameRefsAreLegal()); assert(isEmpty()); assert(sig.equals(basicTypeSignature())) : sig + " != " + basicTypeSignature(); }
src/java.base/share/classes/java/lang/invoke/LambdaForm.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File