Closed GoogleCodeExporter closed 9 years ago
Hm, that's weird, I thought I had gotten rid of those... I'll have to
investigate... Sorry :)
cheers,
Roland
Original comment by ihatelivelyids
on 11 Aug 2011 at 4:30
strange, I just added a unit test that does this:
var type:ByteCodeType = ByteCodeType.forClass(Application);
for each (var method:ByteCodeMethod in type.methods) {
var i:int = 0;
}
And it passes, so there must be something different going on...
Original comment by ihatelivelyids
on 11 Aug 2011 at 4:52
Here is a simple test I had, see attached.
Original comment by jeff.ard...@gmail.com
on 11 Aug 2011 at 4:59
Attachments:
Hey there,
there was indeed a bit of legacy code left in ByteCodeType, I've removed it and
all should be fine now.
However, if you want ByteCodeType to parse the framework libraries, you will
need to tell the lib to do so, like this:
ByteCodeType.fromLoader(loaderInfo);
for (var info:* in systemManager.preloadedRSLs) {
ByteCodeType.fromLoader(info);
}
for each (var m:ByteCodeMethod in ByteCodeType.forInstance(this).methods) {
trace(m);
}
Otherwise you'll miss a couple of classes...
I'll close this ticket now. Did you try issue the fixes for
https://code.google.com/p/as3-commons/issues/detail?id=69 as well?
cheers,
Roland
Original comment by ihatelivelyids
on 11 Aug 2011 at 6:08
That worked for that error, I still have another error further down the line in
my actual use case which I believe maybe related to your note about the RSL's.
I'm using ClassIntroducer to introduce one class into another and during build,
its dying on BaseTypeBuilder.createInitializer as determinePushOpcode(slot) is
returning null. I guess if the class I am trying to introduce extends in its
chain classes which are defined in the RSL's (even though the root class is
not), then I need to also parse the RSL's? Is that the case?
Original comment by jeff.ard...@gmail.com
on 11 Aug 2011 at 6:48
Hi again,
be very careful with using introductions, they aren't quite stable yet. And as
the documentation states:
http://www.as3commons.org/as3-commons-bytecode/proxy.html#Introductions
"Introduced class can only inherit from the Object class"
The introductions seem to work ok in a debug build, but cause some weird
parsing errors in release builds. Especially in method bodies that use switch
statements, I'm still suffering from some very subtle bugs in the parsing logic
for the opcodes.
cheers,
Roland
Original comment by ihatelivelyids
on 11 Aug 2011 at 7:14
Original issue reported on code.google.com by
jeff.ard...@gmail.com
on 11 Aug 2011 at 3:19Attachments: