mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-22 16:36:07 +00:00
Fixed: #2354 Simplify expressions problems in some cases
This commit is contained in:
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
|
||||
- FLA export - DefineEditText default text color alpha
|
||||
- Text display - Alpha channel should not be supported for texts using device fonts
|
||||
- [#2192] Long script lines are now wrapped (1000 chars limit by default) to avoid problems on Linux
|
||||
- [#2354] Simplify expressions problems in some cases
|
||||
|
||||
## [21.1.1] - 2024-10-13
|
||||
### Added
|
||||
@@ -3625,6 +3626,7 @@ Major version of SWF to XML export changed to 2.
|
||||
[#2341]: https://www.free-decompiler.com/flash/issues/2341
|
||||
[#2345]: https://www.free-decompiler.com/flash/issues/2345
|
||||
[#2192]: https://www.free-decompiler.com/flash/issues/2192
|
||||
[#2354]: https://www.free-decompiler.com/flash/issues/2354
|
||||
[#2321]: https://www.free-decompiler.com/flash/issues/2321
|
||||
[#2305]: https://www.free-decompiler.com/flash/issues/2305
|
||||
[#2328]: https://www.free-decompiler.com/flash/issues/2328
|
||||
|
||||
@@ -709,10 +709,10 @@ public abstract class InstructionDefinition implements Serializable {
|
||||
}
|
||||
if (getProperty.object instanceof SetLocalAVM2Item) {
|
||||
SetLocalAVM2Item objSetLocalReg = (SetLocalAVM2Item) getProperty.object;
|
||||
|
||||
|
||||
if ((valueLocalReg.regIndex == valueSetLocalReg.regIndex)
|
||||
&& (propertyName.multinameIndex == multinameIndex)
|
||||
&& ((nameLocalReg == null && nameSetLocalReg == null) || (nameLocalReg.regIndex == nameSetLocalReg.regIndex))
|
||||
&& ((nameLocalReg == null && nameSetLocalReg == null) || (nameLocalReg != null && nameSetLocalReg != null && nameLocalReg.regIndex == nameSetLocalReg.regIndex))
|
||||
&& (objLocalReg.regIndex == objSetLocalReg.regIndex)) {
|
||||
if (nameSetLocalReg != null) {
|
||||
propertyName.name = nameSetLocalReg.value;
|
||||
|
||||
@@ -92,8 +92,14 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp {
|
||||
@Override
|
||||
public GraphTargetItem simplify(String implicitCoerce) {
|
||||
BinaryOpItem r = (BinaryOpItem) clone();
|
||||
r.leftSide = r.leftSide.simplify(coerceLeft);
|
||||
r.leftSide = r.leftSide.simplify(coerceLeft);
|
||||
r.rightSide = r.rightSide.simplify(coerceRight);
|
||||
|
||||
if (r.leftSide == this.leftSide
|
||||
&& r.rightSide == this.rightSide) {
|
||||
r = this;
|
||||
}
|
||||
|
||||
return simplifySomething(r, implicitCoerce);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp {
|
||||
public GraphTargetItem simplify(String implicitCoerce) {
|
||||
GraphTargetItem r = clone();
|
||||
r.value = r.value.simplify(coerce);
|
||||
if (r.value == this.value) {
|
||||
r = this;
|
||||
}
|
||||
return simplifySomething(r, implicitCoerce);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user