mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 02:45:35 +00:00
faster AVM2 constant pool when adding a lot of items to it.
This commit is contained in:
67
libsrc/ffdec_lib/testdata/run_as3/Run.as
vendored
67
libsrc/ffdec_lib/testdata/run_as3/Run.as
vendored
@@ -1,10 +1,57 @@
|
||||
package {
|
||||
|
||||
public class Run {
|
||||
|
||||
public static function run():*
|
||||
{
|
||||
return "Test";
|
||||
}
|
||||
}
|
||||
}
|
||||
package
|
||||
{
|
||||
|
||||
public class Run
|
||||
{
|
||||
|
||||
public static function run():*
|
||||
{
|
||||
return new Run().runInstance();
|
||||
}
|
||||
|
||||
public function runInstance():*
|
||||
{
|
||||
return "Test" + executeMethod("testInstance") + executeStaticMethod("testStatic");
|
||||
}
|
||||
|
||||
public function executeMethod(methodName:String):String
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = this[methodName]();
|
||||
return methodName + "_Result:" + result + " Type:" + typeof(result) + "\n";
|
||||
}
|
||||
catch (ex)
|
||||
{
|
||||
return methodName + "_Error:" + ex + "\n";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function executeStaticMethod(methodName:String):String
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = Run[methodName]();
|
||||
return "Result:" + result + " Type:" + typeof(result) + "\n";
|
||||
}
|
||||
catch (ex)
|
||||
{
|
||||
return "Error:" + ex + "\n";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function testInstance()
|
||||
{
|
||||
return "testInstance";
|
||||
}
|
||||
|
||||
public static function testStatic()
|
||||
{
|
||||
return "testStatic";
|
||||
}
|
||||
}
|
||||
}
|
||||
5
libsrc/ffdec_lib/testdata/run_as3/RunMain.as
vendored
5
libsrc/ffdec_lib/testdata/run_as3/RunMain.as
vendored
@@ -14,6 +14,7 @@
|
||||
myTextBox = new TextField();
|
||||
myTextBox.text = "";
|
||||
myTextBox.width = 400;
|
||||
myTextBox.multiline = true;
|
||||
addChild(myTextBox);
|
||||
|
||||
var rectangleShape:Shape = new Shape();
|
||||
@@ -21,8 +22,8 @@
|
||||
rectangleShape.graphics.drawRect(0, 0, 100, 25);
|
||||
rectangleShape.graphics.endFill();
|
||||
|
||||
var btnTextBox:TextField = new TextField();
|
||||
btnTextBox.text = "EXECUTE";
|
||||
var btnTextBox:TextField = new TextField();
|
||||
btnTextBox.text = "EXECUTE";
|
||||
|
||||
var simpleButtonSprite:Sprite = new Sprite();
|
||||
simpleButtonSprite.name = "simpleButtonSprite";
|
||||
|
||||
Reference in New Issue
Block a user