AS3: TypeNames fix (* type)

This commit is contained in:
Jindra Petk
2013-01-02 11:55:25 +01:00
parent fcc81fc49f
commit d78c91d9a8
3 changed files with 10 additions and 4 deletions

View File

@@ -49,9 +49,8 @@ public class ApplyTypeIns extends InstructionDefinition {
int argCount = ins.operands[0];
List<TreeItem> params = new ArrayList<TreeItem>();
for (int i = 0; i < argCount; i++) {
params.add(stack.pop());
params.add(0,stack.pop());
}
Collections.reverse(params);
stack.push(new ApplyTypeTreeItem(ins, stack.pop(), params));
}

View File

@@ -41,7 +41,12 @@ public class ApplyTypeTreeItem extends TreeItem {
if (i > 0) {
ret += hilight(",");
}
ret += params.get(i).toString(constants, localRegNames, fullyQualifiedNames);
TreeItem p = params.get(i);
if (p instanceof NullTreeItem) {
ret += "*";
} else {
ret += p.toString(constants, localRegNames, fullyQualifiedNames);
}
}
ret += hilight(">");
}

View File

@@ -181,7 +181,9 @@ public class Multiname {
if (i > 0) {
typeNameStr += ",";
}
if (params.get(i) != 0) { //What does value 0 mean?
if (params.get(i) == 0) {
typeNameStr += "*";
}else{
typeNameStr += constants.constant_multiname[params.get(i)].getName(constants, fullyQualifiedNames);
}
}