avm2

How are methods found in AVM2 bytecode?

允我心安 提交于 2019-12-06 03:36:09
问题 I've been playing around with ABC bytecode and was hoping someone could clear up a point of confusion for me. I have a simple flash file that places a clip on the stage and has a tiny script to update its position on each frame. The code looks something like: package { import flash.display.MovieClip; import flash.events.Event; public class RedCircle extends MovieClip { public function RedCircle() { this.addEventListener(Event.ENTER_FRAME, moveit); } function moveit(e:Event) { this.x -=1; } }

How are methods found in AVM2 bytecode?

天涯浪子 提交于 2019-12-04 09:19:25
I've been playing around with ABC bytecode and was hoping someone could clear up a point of confusion for me. I have a simple flash file that places a clip on the stage and has a tiny script to update its position on each frame. The code looks something like: package { import flash.display.MovieClip; import flash.events.Event; public class RedCircle extends MovieClip { public function RedCircle() { this.addEventListener(Event.ENTER_FRAME, moveit); } function moveit(e:Event) { this.x -=1; } } } Which compiles to something like: protected package protected RedCircle { class RedCircle extends

How do generics (Vector) work inside the AVM?

倾然丶 夕夏残阳落幕 提交于 2019-11-30 06:56:57
问题 Support for generics (currently only Vector.<*>, and called 'postfix type parameters' by Adobe) was added in Flash Player 10, but the only AVM2 documentation does not describe how these objects are accessed. Specifically, I noticed a new opcode (0x53) and a new multiname kind (0x1D) that seem relevant, but their usage is not documented. NB: This question was created with the answer already known as it is more easily found here than on my blog or the Adobe Bug DB. 回答1: The reverse engineering

How do generics (Vector) work inside the AVM?

笑着哭i 提交于 2019-11-28 23:26:00
Support for generics (currently only Vector.<*> , and called 'postfix type parameters' by Adobe) was added in Flash Player 10, but the only AVM2 documentation does not describe how these objects are accessed. Specifically, I noticed a new opcode (0x53) and a new multiname kind (0x1D) that seem relevant, but their usage is not documented. NB: This question was created with the answer already known as it is more easily found here than on my blog or the Adobe Bug DB. The reverse engineering work I did on this did not include declaring your own generic types, though it's very likely possible.