mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 06:55:54 +00:00
better try..catch..finally detection
This commit is contained in:
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.air.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.air.swf
vendored
Normal file
Binary file not shown.
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.flex.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.flex.swf
vendored
Normal file
Binary file not shown.
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.flex_apache.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.flex_apache.swf
vendored
Normal file
Binary file not shown.
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.swftools.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/Main.swftools.swf
vendored
Normal file
Binary file not shown.
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/expressInstall.swf
vendored
Normal file
BIN
libsrc/ffdec_lib/testdata/cross_compile/bin/expressInstall.swf
vendored
Normal file
Binary file not shown.
40
libsrc/ffdec_lib/testdata/cross_compile/bin/index.html
vendored
Normal file
40
libsrc/ffdec_lib/testdata/cross_compile/bin/index.html
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>asc2</title>
|
||||
<meta name="description" content="" />
|
||||
|
||||
<script src="js/swfobject.js"></script>
|
||||
<script>
|
||||
var flashvars = {
|
||||
};
|
||||
var params = {
|
||||
menu: "false",
|
||||
scale: "noScale",
|
||||
allowFullscreen: "true",
|
||||
allowScriptAccess: "always",
|
||||
bgcolor: "",
|
||||
wmode: "direct" // can cause issues with FP settings & webcam
|
||||
};
|
||||
var attributes = {
|
||||
id:"asc2"
|
||||
};
|
||||
swfobject.embedSWF(
|
||||
"asc2.swf",
|
||||
"altContent", "100%", "100%", "10.0.0",
|
||||
"expressInstall.swf",
|
||||
flashvars, params, attributes);
|
||||
</script>
|
||||
<style>
|
||||
html, body { height:100%; overflow:hidden; }
|
||||
body { margin:0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="altContent">
|
||||
<h1>asc2</h1>
|
||||
<p><a href="http://www.adobe.com/go/getflashplayer">Get Adobe Flash player</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
libsrc/ffdec_lib/testdata/cross_compile/bin/js/swfobject.js
vendored
Normal file
4
libsrc/ffdec_lib/testdata/cross_compile/bin/js/swfobject.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
libsrc/ffdec_lib/testdata/cross_compile/build_air_debug.bat
vendored
Normal file
3
libsrc/ffdec_lib/testdata/cross_compile/build_air_debug.bat
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
set COMPILERKIND=air
|
||||
call c:\air\bin\mxmlc.bat -warnings=false -debug=true -output bin/Main.%COMPILERKIND%.swf src/Main.as 1> buildlog.%COMPILERKIND%.txt 2>&1
|
||||
6
libsrc/ffdec_lib/testdata/cross_compile/build_debug.bat
vendored
Normal file
6
libsrc/ffdec_lib/testdata/cross_compile/build_debug.bat
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
call build_air_debug.bat
|
||||
call build_flex_debug.bat
|
||||
call build_flex_apache_debug.bat
|
||||
call build_swftools_debug.bat
|
||||
pause
|
||||
3
libsrc/ffdec_lib/testdata/cross_compile/build_flex_apache_debug.bat
vendored
Normal file
3
libsrc/ffdec_lib/testdata/cross_compile/build_flex_apache_debug.bat
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
set COMPILERKIND=flex_apache
|
||||
call c:\flex_apache\bin\mxmlc.bat -warnings=false -debug=true -output bin/Main.%COMPILERKIND%.swf src/Main.as 1> buildlog.%COMPILERKIND%.txt 2>&1
|
||||
3
libsrc/ffdec_lib/testdata/cross_compile/build_flex_debug.bat
vendored
Normal file
3
libsrc/ffdec_lib/testdata/cross_compile/build_flex_debug.bat
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
set COMPILERKIND=flex
|
||||
c:\flex\bin\mxmlc.exe -warnings=false -debug=true -output bin/Main.%COMPILERKIND%.swf src/Main.as 1> buildlog.%COMPILERKIND%.txt 2>&1
|
||||
19
libsrc/ffdec_lib/testdata/cross_compile/build_stub.bat
vendored
Normal file
19
libsrc/ffdec_lib/testdata/cross_compile/build_stub.bat
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
set ISDEBUG=false
|
||||
if "%1" == "debug" goto blockset
|
||||
goto block2
|
||||
:blockset
|
||||
set ISDEBUG=true
|
||||
:block2
|
||||
set COMPILERPATH=%2
|
||||
set COMPILERKIND=%3
|
||||
rem if not exist %COMPILERPATH% goto notex
|
||||
%COMPILERPATH% -warnings=false -debug=%ISDEBUG% -output bin/Main.%COMPILERKIND%.swf src/Main.as > buildlog.%COMPILERKIND%.txt
|
||||
if errorlevel==1 goto failed
|
||||
goto end
|
||||
:notex
|
||||
echo Flex/AIR SDK not found. Download and unpack Flex/AIR SDK into some directory and add it to PATH variable
|
||||
goto end
|
||||
:failed
|
||||
pause
|
||||
:end
|
||||
4
libsrc/ffdec_lib/testdata/cross_compile/build_swftools_debug.bat
vendored
Normal file
4
libsrc/ffdec_lib/testdata/cross_compile/build_swftools_debug.bat
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
set COMPILERKIND=swftools
|
||||
cd src
|
||||
c:\swftools\as3compile.exe Main.as -o ..\bin\Main.%COMPILERKIND%.swf 1> ../buildlog.%COMPILERKIND%.txt 2>&1
|
||||
3
libsrc/ffdec_lib/testdata/cross_compile/buildlog.air.txt
vendored
Normal file
3
libsrc/ffdec_lib/testdata/cross_compile/buildlog.air.txt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Loading configuration: c:\air\frameworks\flex-config.xml
|
||||
|
||||
2753 bytes written to C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\cross_compile\bin\Main.air.swf in 0,459 seconds
|
||||
2
libsrc/ffdec_lib/testdata/cross_compile/buildlog.flex.txt
vendored
Normal file
2
libsrc/ffdec_lib/testdata/cross_compile/buildlog.flex.txt
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Loading configuration file C:\flex\frameworks\flex-config.xml
|
||||
C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\asc2\bin\Main.flex.swf (1083 bytes)
|
||||
2
libsrc/ffdec_lib/testdata/cross_compile/buildlog.flex_apache.txt
vendored
Normal file
2
libsrc/ffdec_lib/testdata/cross_compile/buildlog.flex_apache.txt
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Loading configuration file C:\flex_apache\frameworks\flex-config.xml
|
||||
C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\cross_compile\bin\Main.flex_apache.swf (3617 bytes)
|
||||
4
libsrc/ffdec_lib/testdata/cross_compile/buildlog.swftools.txt
vendored
Normal file
4
libsrc/ffdec_lib/testdata/cross_compile/buildlog.swftools.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
Stack mismatch at pos 61
|
||||
Should be: 1:1, is: 0:1
|
||||
Stack mismatch at pos 61
|
||||
Should be: 1:1, is: 0:1
|
||||
95
libsrc/ffdec_lib/testdata/cross_compile/cross_compile.as3proj
vendored
Normal file
95
libsrc/ffdec_lib/testdata/cross_compile/cross_compile.as3proj
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project version="2">
|
||||
<!-- Output SWF options -->
|
||||
<output>
|
||||
<movie outputType="Application" />
|
||||
<movie input="" />
|
||||
<movie path="bin\Main.flex.swf" />
|
||||
<movie fps="30" />
|
||||
<movie width="800" />
|
||||
<movie height="600" />
|
||||
<movie version="25" />
|
||||
<movie minorVersion="0" />
|
||||
<movie platform="Flash Player" />
|
||||
<movie background="#FFFFFF" />
|
||||
</output>
|
||||
<!-- Other classes to be compiled into your SWF -->
|
||||
<classpaths>
|
||||
<class path="src" />
|
||||
</classpaths>
|
||||
<!-- Build options -->
|
||||
<build>
|
||||
<option accessible="False" />
|
||||
<option advancedTelemetry="False" />
|
||||
<option allowSourcePathOverlap="False" />
|
||||
<option benchmark="False" />
|
||||
<option es="False" />
|
||||
<option inline="False" />
|
||||
<option locale="" />
|
||||
<option loadConfig="" />
|
||||
<option optimize="True" />
|
||||
<option omitTraces="True" />
|
||||
<option showActionScriptWarnings="True" />
|
||||
<option showBindingWarnings="True" />
|
||||
<option showInvalidCSS="True" />
|
||||
<option showDeprecationWarnings="True" />
|
||||
<option showUnusedTypeSelectorWarnings="True" />
|
||||
<option strict="True" />
|
||||
<option useNetwork="True" />
|
||||
<option useResourceBundleMetadata="True" />
|
||||
<option warnings="True" />
|
||||
<option verboseStackTraces="False" />
|
||||
<option linkReport="" />
|
||||
<option loadExterns="" />
|
||||
<option staticLinkRSL="True" />
|
||||
<option additional="" />
|
||||
<option compilerConstants="" />
|
||||
<option minorVersion="" />
|
||||
</build>
|
||||
<!-- SWC Include Libraries -->
|
||||
<includeLibraries>
|
||||
<!-- example: <element path="..." /> -->
|
||||
</includeLibraries>
|
||||
<!-- SWC Libraries -->
|
||||
<libraryPaths>
|
||||
<!-- example: <element path="..." /> -->
|
||||
</libraryPaths>
|
||||
<!-- External Libraries -->
|
||||
<externalLibraryPaths>
|
||||
<!-- example: <element path="..." /> -->
|
||||
</externalLibraryPaths>
|
||||
<!-- Runtime Shared Libraries -->
|
||||
<rslPaths>
|
||||
<!-- example: <element path="..." /> -->
|
||||
</rslPaths>
|
||||
<!-- Intrinsic Libraries -->
|
||||
<intrinsics>
|
||||
<!-- example: <element path="..." /> -->
|
||||
</intrinsics>
|
||||
<!-- Assets to embed into the output SWF -->
|
||||
<library>
|
||||
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
|
||||
</library>
|
||||
<!-- Class files to compile (other referenced classes will automatically be included) -->
|
||||
<compileTargets>
|
||||
<compile path="src\Main.as" />
|
||||
</compileTargets>
|
||||
<!-- Paths to exclude from the Project Explorer tree -->
|
||||
<hiddenPaths>
|
||||
<hidden path="obj" />
|
||||
</hiddenPaths>
|
||||
<!-- Executed before build -->
|
||||
<preBuildCommand />
|
||||
<!-- Executed after build -->
|
||||
<postBuildCommand alwaysRun="False">build_air_debug.bat
|
||||
build_flex_apache_debug.bat
|
||||
build_swftools_debug.bat</postBuildCommand>
|
||||
<!-- Other project options -->
|
||||
<options>
|
||||
<option showHiddenPaths="False" />
|
||||
<option testMovie="Default" />
|
||||
<option testMovieCommand="" />
|
||||
</options>
|
||||
<!-- Plugin storage -->
|
||||
<storage />
|
||||
</project>
|
||||
48
libsrc/ffdec_lib/testdata/cross_compile/obj/cross_compileConfig.old
vendored
Normal file
48
libsrc/ffdec_lib/testdata/cross_compile/obj/cross_compileConfig.old
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
|
||||
<!--Any modifications you make may be lost.-->
|
||||
<flex-config>
|
||||
<target-player>25.0</target-player>
|
||||
<benchmark>false</benchmark>
|
||||
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
|
||||
<compiler>
|
||||
<define append="true">
|
||||
<name>CONFIG::debug</name>
|
||||
<value>true</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::release</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'31.01.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::mobile</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::desktop</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<verbose-stacktraces>true</verbose-stacktraces>
|
||||
<source-path append="true">
|
||||
<path-element>C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\cross_compile\src</path-element>
|
||||
<path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
|
||||
</source-path>
|
||||
</compiler>
|
||||
<file-specs>
|
||||
<path-element>C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\cross_compile\src\Main.as</path-element>
|
||||
</file-specs>
|
||||
<default-background-color>#FFFFFF</default-background-color>
|
||||
<default-frame-rate>30</default-frame-rate>
|
||||
<default-size>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</default-size>
|
||||
</flex-config>
|
||||
48
libsrc/ffdec_lib/testdata/cross_compile/obj/cross_compileConfig.xml
vendored
Normal file
48
libsrc/ffdec_lib/testdata/cross_compile/obj/cross_compileConfig.xml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
|
||||
<!--Any modifications you make may be lost.-->
|
||||
<flex-config>
|
||||
<target-player>25.0</target-player>
|
||||
<benchmark>false</benchmark>
|
||||
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
|
||||
<compiler>
|
||||
<define append="true">
|
||||
<name>CONFIG::debug</name>
|
||||
<value>true</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::release</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'31.01.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::mobile</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::desktop</name>
|
||||
<value>false</value>
|
||||
</define>
|
||||
<verbose-stacktraces>true</verbose-stacktraces>
|
||||
<source-path append="true">
|
||||
<path-element>C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\cross_compile\src</path-element>
|
||||
<path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
|
||||
</source-path>
|
||||
</compiler>
|
||||
<file-specs>
|
||||
<path-element>C:\Dropbox\Programovani\JavaSE\FFDec\libsrc\ffdec_lib\testdata\cross_compile\src\Main.as</path-element>
|
||||
</file-specs>
|
||||
<default-background-color>#FFFFFF</default-background-color>
|
||||
<default-frame-rate>30</default-frame-rate>
|
||||
<default-size>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</default-size>
|
||||
</flex-config>
|
||||
34
libsrc/ffdec_lib/testdata/cross_compile/src/Main.as
vendored
Normal file
34
libsrc/ffdec_lib/testdata/cross_compile/src/Main.as
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package
|
||||
{
|
||||
import flash.display.MovieClip;
|
||||
import flash.events.Event;
|
||||
import tests.*;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class Main extends MovieClip
|
||||
{
|
||||
TestTryCatch;
|
||||
TestTryCatchIfInTry;
|
||||
TestTryCatchLoop;
|
||||
TestTryCatchExceptionUsage
|
||||
TestTryFinally;
|
||||
TestTryFinallyDirectReturnInFinally;
|
||||
TestTryFinallyLoop;
|
||||
TestTryFinallyLoopInFinally;
|
||||
TestTryFinallyMultipleCatch;
|
||||
TestTryFinallyReturn;
|
||||
TestTryFinallyReturnInFinally;
|
||||
TestTryFinallyReturnNested;
|
||||
TestTryFinallyReturnVoid;
|
||||
|
||||
public function Main()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
26
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatch.as
vendored
Normal file
26
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatch.as
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatch
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
26
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchExceptionUsage.as
vendored
Normal file
26
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchExceptionUsage.as
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatchExceptionUsage
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("catched exception: "+e.message);
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
32
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchIfInTry.as
vendored
Normal file
32
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchIfInTry.as
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatchIfInTry
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
var a:Boolean = true;
|
||||
trace("before");
|
||||
try
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
trace("ret");
|
||||
return;
|
||||
}
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
39
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchLoop.as
vendored
Normal file
39
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryCatchLoop.as
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
package tests
|
||||
{
|
||||
import flash.errors.EOFError;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryCatchLoop
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
var j:* = undefined;
|
||||
for (var i:* = 0; i < 100; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (j = 0; j < 20; j++)
|
||||
{
|
||||
trace("a");
|
||||
}
|
||||
}
|
||||
catch (e:EOFError)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
trace("after_try");
|
||||
}
|
||||
trace("end");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
30
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinally.as
vendored
Normal file
30
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinally.as
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinally
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
34
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyDirectReturnInFinally.as
vendored
Normal file
34
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyDirectReturnInFinally.as
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyDirectReturnInFinally
|
||||
{
|
||||
|
||||
public function run() : String
|
||||
{
|
||||
|
||||
var str:String = "xxx";
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("error");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("hi ");
|
||||
if (5 == 4)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
return "hu" + str;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
38
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyLoop.as
vendored
Normal file
38
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyLoop.as
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyLoop
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
for (var i:int = 0; i < 10; i++)
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
if (i == 5)
|
||||
{
|
||||
trace("continue for");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
38
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyLoopInFinally.as
vendored
Normal file
38
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyLoopInFinally.as
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyLoopInFinally
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
for (var i:int = 0; i < 10; i++)
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (i == 5)
|
||||
{
|
||||
trace("continue for");
|
||||
continue;
|
||||
}
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
35
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyMultipleCatch.as
vendored
Normal file
35
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyMultipleCatch.as
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package tests
|
||||
{
|
||||
import flash.errors.EOFError;
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyMultipleCatch
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch Error");
|
||||
}
|
||||
catch (e:EOFError)
|
||||
{
|
||||
trace("in catch EOFError");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
42
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturn.as
vendored
Normal file
42
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturn.as
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyReturn
|
||||
{
|
||||
|
||||
public function run() : String
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
var a:int = 5;
|
||||
if (a > 4)
|
||||
{
|
||||
return "RET";
|
||||
}
|
||||
trace("between");
|
||||
if (a < 3)
|
||||
{
|
||||
return "RE2";
|
||||
}
|
||||
trace("in try2");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
return "RETFINAL";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
44
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturnInFinally.as
vendored
Normal file
44
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturnInFinally.as
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyReturnInFinally
|
||||
{
|
||||
|
||||
public function run() : String
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
var a:int = 5;
|
||||
if (a > 4)
|
||||
{
|
||||
return "RET";
|
||||
}
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
if (a > 6){
|
||||
return "FINRET1";
|
||||
}
|
||||
trace("xx");
|
||||
if (a > 5){
|
||||
return "FINRET2";
|
||||
}
|
||||
trace("nofinret");
|
||||
}
|
||||
trace("after");
|
||||
return "RETEXIT";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
43
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturnNested.as
vendored
Normal file
43
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturnNested.as
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyReturnNested
|
||||
{
|
||||
|
||||
public function run() : String
|
||||
{
|
||||
try
|
||||
{
|
||||
trace("before try2");
|
||||
try
|
||||
{
|
||||
trace("in try2");
|
||||
var a:int = 5;
|
||||
if (a > 4)
|
||||
{
|
||||
return "RET";
|
||||
}
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally2");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally1");
|
||||
}
|
||||
return "RETFINAL";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
36
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturnVoid.as
vendored
Normal file
36
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyReturnVoid.as
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyReturnVoid
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
var a:int = 5;
|
||||
if (a > 4)
|
||||
{
|
||||
return;
|
||||
}
|
||||
trace("in try2");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user