Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java9
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java9
2 files changed, 10 insertions, 8 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
index 64386b77a..288012698 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
@@ -545,7 +545,7 @@ private synchronized void readModifierRelatedAttributes() {
//{ObjectTeams: read method attributes
break;
default:
- readOTAttribute(attributeName, this, readOffset+6, this.structOffset, this.constantPoolOffsets);
+ readOTAttribute(attributeName, this, readOffset+6, this.structOffset, this.constantPoolOffsets, flags);
// SH}
}
}
@@ -568,7 +568,8 @@ private synchronized void readModifierRelatedAttributes() {
MethodInfo info,
int readOffset,
int aStructOffset,
- int[] someConstantPoolOffsets)
+ int[] someConstantPoolOffsets,
+ int flagsSoFar)
{
if (CharOperation.equals(attributeName, AttributeNamesConstants.CodeName))
return; // optimization only.
@@ -579,7 +580,7 @@ private synchronized void readModifierRelatedAttributes() {
}
else if (CharOperation.equals(attributeName, ROLECLASS_METHOD_MODIFIERS_NAME))
{
- WordValueAttribute.readRoleClassMethodModifiersAttribute(info, readOffset);
+ WordValueAttribute.readRoleClassMethodModifiersAttribute(info, readOffset, flagsSoFar);
// not added to _readAttributes because evaluated immediately.
}
else if (CharOperation.equals(attributeName, CALLS_BASE_CTOR))
@@ -589,7 +590,7 @@ private synchronized void readModifierRelatedAttributes() {
}
else if (CharOperation.equals(attributeName, CALLIN_FLAGS))
{
- this.methodAttributes.add(WordValueAttribute.readCallinFlags(info, readOffset));
+ this.methodAttributes.add(WordValueAttribute.readCallinFlags(info, readOffset, flagsSoFar));
}
else if (CharOperation.equals(attributeName, TYPE_ANCHOR_LIST))
{
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java
index 81e70db7a..a8dfa1dd4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/WordValueAttribute.java
@@ -209,8 +209,8 @@ public class WordValueAttribute
return new WordValueAttribute(ROLECLASS_METHOD_MODIFIERS_NAME, modifiers);
}
- public static void readRoleClassMethodModifiersAttribute(MethodInfo info, int readOffset) {
- int binaryFlags = info.getModifiers() & ~ExtraCompilerModifiers.AccVisibilityMASK; // reset these bits first
+ public static void readRoleClassMethodModifiersAttribute(MethodInfo info, int readOffset, int flagsSoFar) {
+ int binaryFlags = flagsSoFar & ~ExtraCompilerModifiers.AccVisibilityMASK; // reset these bits first
int newFlags = info.u2At(readOffset);
info.setAccessFlags(binaryFlags | newFlags);
}
@@ -222,10 +222,11 @@ public class WordValueAttribute
*/
public static WordValueAttribute readCallinFlags(
MethodInfo method,
- int readOffset)
+ int readOffset,
+ int flagsSoFar)
{
int value = method.u2At(readOffset);
- method.setAccessFlags(method.getModifiers()|ExtraCompilerModifiers.AccCallin);
+ method.setAccessFlags(flagsSoFar|ExtraCompilerModifiers.AccCallin);
// create and store an attribute anyway, in order to store the actual bits.
WordValueAttribute result = callinFlagsAttribute(value);
result._methodInfo = method;

Back to the top