Permalink
Browse files

Update stub generator to use static getters/setters.

  • Loading branch information...
1 parent b309eb1 commit 84e63209615689333f1ebe99a430b6c1d217e9cd @mbebenita mbebenita committed Apr 12, 2012
Showing with 14 additions and 9 deletions.
  1. +14 −9 src/avm2/disassembler.js
View
@@ -367,13 +367,14 @@ function traceSource(writer, abc) {
if (method.isNative()) {
var str = "";
if (isStatic) {
- str += "statics";
- } else if (trait.isGetter()) {
- str += "getters";
+ str += "s";
+ }
+ if (trait.isGetter()) {
+ str += "g";
} else if (trait.isSetter()) {
- str += "setters";
+ str += "s";
} else if (trait.isMethod()) {
- str += "methods";
+ str += "m";
}
if (trait.method.parameters.length) {
writer.writeLn("// Signature: " + getSignature(trait.method) + " -> " + trait.method.returnType.getName());
@@ -386,10 +387,14 @@ function traceSource(writer, abc) {
});
}
- writer.writeLn("var statics = c.statics = {};");
- writer.writeLn("var getters = c.getters = {};");
- writer.writeLn("var setters = c.setters = {};");
- writer.writeLn("var methods = instance.prototype;");
+ writer.writeLn("var m = instance.prototype;");
+ writer.writeLn("var g = c.getters = {};");
+ writer.writeLn("var s = c.setters = {};");
+
+ writer.writeLn("var sm = c.statics = {};");
+ writer.writeLn("var sg = c.staticGetters = {};");
+ writer.writeLn("var ss = c.staticSetters = {};");
+
traceTraits(cls.traits, true);
traceTraits(cls.instance.traits);

0 comments on commit 84e6320

Please sign in to comment.