Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 235380 Details for
Bug 416885
[compiler][1.8] IncompatibleClassChange error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for the Metafactory change
clipboard.txt (text/plain), 6.98 KB, created by
Jesper Moller
on 2013-09-11 07:09:58 EDT
(
hide
)
Description:
Patch for the Metafactory change
Filename:
MIME Type:
Creator:
Jesper Moller
Created:
2013-09-11 07:09:58 EDT
Size:
6.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >diff --git compiler/org/eclipse/jdt/internal/compiler/ClassFile.java compiler/org/eclipse/jdt/internal/compiler/ClassFile.java >index 53b8284..9047b47 100644 >--- compiler/org/eclipse/jdt/internal/compiler/ClassFile.java >+++ compiler/org/eclipse/jdt/internal/compiler/ClassFile.java >@@ -14,6 +14,7 @@ > * Jesper S Moller - Contributions for > * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335 > * Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile >+ * Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit) > * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for > * Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work) > * Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator >@@ -2869,7 +2870,7 @@ > this.contents[localContentsOffset++] = 0; > this.contents[localContentsOffset++] = (byte) 3; > >- int functionalDescriptorIndex = this.constantPool.literalIndexForMethodHandle(functional.descriptor.original()); >+ int functionalDescriptorIndex = this.constantPool.literalIndexForMethodType(functional.descriptor.original().signature()); > this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8); > this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex; > >diff --git compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java >index 3c988ae..31aef2e 100644 >--- compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java >+++ compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java >@@ -14,6 +14,7 @@ > * Jesper S Moller - Contributions for > * bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression > * bug 382721 - [1.8][compiler] Effectively final variables needs special treatment >+ * Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit) > * Stephan Herrmann - Contribution for > * bug 401030 - [1.8][null] Null analysis support for lambda methods. > * Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis >@@ -116,7 +117,10 @@ > signature.append(')'); > signature.append(this.expectedType.signature()); > int invokeDynamicNumber = codeStream.classFile.recordBootstrapMethod(this); >- codeStream.invokeDynamic(invokeDynamicNumber, (this.shouldCaptureInstance ? 1 : 0) + this.outerLocalVariablesSlotSize, 1, TypeConstants.ANONYMOUS_METHOD, signature.toString().toCharArray()); >+ >+ final MethodBinding sam = this.expectedType.getSingleAbstractMethod(this.enclosingScope); >+ >+ codeStream.invokeDynamic(invokeDynamicNumber, (this.shouldCaptureInstance ? 1 : 0) + this.outerLocalVariablesSlotSize, 1, sam.selector, signature.toString().toCharArray()); > codeStream.recordPositionsFrom(pc, this.sourceStart); > } > >diff --git compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java >index dc2309d..422d36e 100644 >--- compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java >@@ -14,6 +14,7 @@ > * Jesper S Moller - Contributions for > * bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression > * Bug 384687 - [1.8] Wildcard type arguments should be rejected for lambda and reference expressions >+ * Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit) > * Stephan Herrmann - Contribution for > * bug 402028 - [1.8][compiler] null analysis for reference expressions > * bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super via I.super.m() syntax >@@ -58,7 +59,6 @@ > > public class ReferenceExpression extends FunctionalExpression implements InvocationSite { > >- private static char [] LAMBDA = { 'l', 'a', 'm', 'b', 'd', 'a' }; > public Expression lhs; > public TypeReference [] typeArguments; > public char [] selector; >@@ -154,7 +154,9 @@ > buffer.append(this.resolvedType.constantPoolName()); > buffer.append(';'); > int invokeDynamicNumber = codeStream.classFile.recordBootstrapMethod(this); >- codeStream.invokeDynamic(invokeDynamicNumber, argumentsSize, 1, LAMBDA, buffer.toString().toCharArray(), >+ final MethodBinding sam = this.expectedType.getSingleAbstractMethod(this.enclosingScope); >+ >+ codeStream.invokeDynamic(invokeDynamicNumber, argumentsSize, 1, sam.selector, buffer.toString().toCharArray(), > this.isConstructorReference(), (this.lhs instanceof TypeReference? (TypeReference) this.lhs : null), this.typeArguments); > codeStream.recordPositionsFrom(pc, this.sourceStart); > } >diff --git compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java >index 59491e8..85246d2 100644 >--- compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java >@@ -14,6 +14,7 @@ > * Jesper S Moller - Contributions for > * Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335 > * Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile >+ * Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit) > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.codegen; > >@@ -260,8 +261,8 @@ > // java 7 java.lang.invoke.MethodHandle.invokeExact(..)/invokeGeneric(..) > public static final char[] JAVA_LANG_INVOKE_METHODHANDLE_POLYMORPHICSIGNATURE = "Ljava/lang/invoke/MethodHandle$PolymorphicSignature;".toCharArray(); //$NON-NLS-1$ > // Java 8 lambda support >- public static final char[] METAFACTORY = "metaFactory".toCharArray(); //$NON-NLS-1$ >- public static final char[] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_METAFACTORY_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$ >+ public static final char[] METAFACTORY = "metafactory".toCharArray(); //$NON-NLS-1$ >+ public static final char[] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_METAFACTORY_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$ > > public static final char[] HashCode = "hashCode".toCharArray(); //$NON-NLS-1$ > public static final char[] HashCodeSignature = "()I".toCharArray(); //$NON-NLS-1$;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 416885
:
235330
|
235380