Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2015-10-31 00:06:27 +0000
committerStephan Herrmann2015-10-31 00:06:27 +0000
commit15bdba22ade94d96f8fe1f1e3fac7fd599f57fdf (patch)
treefae693c828839db19d675e4e5dd0e3a8c55fcde3
parentae707957859bb007a16502cb1027256185d15836 (diff)
downloadorg.eclipse.objectteams-sherrmann/otdre.tar.gz
org.eclipse.objectteams-sherrmann/otdre.tar.xz
org.eclipse.objectteams-sherrmann/otdre.zip
Bug 481060 - [otdre] Example wizard does nothing on "Next"sherrmann/otdre
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java6
-rw-r--r--plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/Binding.java8
-rw-r--r--plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor.java8
3 files changed, 13 insertions, 9 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java
index 51ad9a461..10d41baf7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/OTDynCallinBindingsAttribute.java
@@ -252,8 +252,12 @@ public class OTDynCallinBindingsAttribute extends ListValueAttribute {
baseFlags |= BaseMethod.CALLIN;
if (baseSpec.isStatic())
baseFlags |= BaseMethod.STATIC;
+ MethodBinding baseMethod = baseSpec.resolvedMethod;
+ char[] weavableBaseClass = (baseMethod.isFinal() || baseMethod.isStatic())
+ ? baseMethod.declaringClass.constantPoolName()
+ : baseClassName;
mapping.addBaseMethod(i, baseSpec.codegenSeletor(), baseSpec.signature(WeavingScheme.OTDRE),
- baseSpec.resolvedMethod.declaringClass.constantPoolName(),
+ weavableBaseClass,
baseSpec.getCallinId(this.theTeam), baseFlags, baseSpec.getTranslationFlags());
}
mapping.setSMAPinfo(callinDecl);
diff --git a/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/Binding.java b/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/Binding.java
index 15071b65c..07ad03671 100644
--- a/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/Binding.java
+++ b/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/Binding.java
@@ -36,7 +36,7 @@ public class Binding implements Comparable<Binding>, IBinding {
private String boundClass;
private String memberName;
private String memberSignature;
- private String declaringBaseClassName;
+ private String weavableBaseClassName;
private int callinModifier;
/**
* Locally unique id for (an element in) this binding:
@@ -57,7 +57,7 @@ public class Binding implements Comparable<Binding>, IBinding {
*/
public Binding(AbstractBoundClass teamClass,
String roleClassName, String callinLabel, String boundClassName,
- String memberName, String memberSignature, String declaringBaseClassName,
+ String memberName, String memberSignature, String weavableBaseClassName,
int callinModifier, int callinId, int baseFlags, boolean handleCovariantReturn)
{
this.teamClass = teamClass;
@@ -65,7 +65,7 @@ public class Binding implements Comparable<Binding>, IBinding {
this.boundClass = boundClassName;
this.memberName = memberName;
this.memberSignature = memberSignature;
- this.declaringBaseClassName = declaringBaseClassName;
+ this.weavableBaseClassName = weavableBaseClassName;
this.callinModifier = callinModifier;
this.perTeamId = callinId;
this.baseFlags = baseFlags;
@@ -120,7 +120,7 @@ public class Binding implements Comparable<Binding>, IBinding {
}
public String getDeclaringBaseClassName() {
- return this.declaringBaseClassName;
+ return this.weavableBaseClassName;
}
@Override
diff --git a/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor.java b/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor.java
index 3dbd8f94b..2d06acf50 100644
--- a/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor.java
+++ b/plugins/org.eclipse.objectteams.otredyn/src/org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor.java
@@ -115,18 +115,18 @@ class AsmClassVisitor extends ClassVisitor {
clazz.boundBaseClasses.add(baseClassName.replace('/', '.'));
String[] baseMethodNames = multiBindings[i].getBaseMethodNames();
String[] baseMethodSignatures = multiBindings[i].getBaseMethodSignatures();
- String[] declaringBaseClassNames = multiBindings[i].getDeclaringBaseClassName();
+ String[] weavableBaseClassNames = multiBindings[i].getDeclaringBaseClassName();
int callinModifier = multiBindings[i].getCallinModifier();
int[] callinIds = multiBindings[i].getCallinIds();
int[] baseFlags = multiBindings[i].getBaseFlags();
boolean handleCovariantReturn = multiBindings[i].isHandleCovariantReturn();
for (int j = 0; j < baseMethodNames.length; j++) {
- String declaringBaseClassName = declaringBaseClassNames[j];
+ String weavableBaseClassName = weavableBaseClassNames[j];
Binding binding = new Binding(clazz, roleClassName, callinLabel, baseClassName,
- baseMethodNames[j], baseMethodSignatures[j], declaringBaseClassName,
+ baseMethodNames[j], baseMethodSignatures[j], weavableBaseClassName,
callinModifier, callinIds[j], baseFlags[j], handleCovariantReturn);
clazz.addBinding(binding);
- clazz.boundBaseClasses.add(declaringBaseClassName.replace('/', '.'));
+ clazz.boundBaseClasses.add(weavableBaseClassName.replace('/', '.'));
}
}
} else if (attribute.type.equals(Attributes.ATTRIBUTE_CALLIN_PRECEDENCE)) {

Back to the top