Fixed #2052 Detection of switches based on notequal operator

update license in header
This commit is contained in:
Jindra Petřík
2023-10-01 18:21:38 +02:00
parent 4402c0b5b7
commit 05d5fee409
19 changed files with 246 additions and 40 deletions
@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.ecma.EcmaScript;
import com.jpexs.decompiler.graph.CompilationException;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.NotEqualsTypeItem;
import com.jpexs.decompiler.graph.SourceGenerator;
import com.jpexs.decompiler.graph.TypeItem;
import com.jpexs.decompiler.graph.model.BinaryOpItem;
@@ -34,7 +35,7 @@ import java.util.List;
*
* @author JPEXS
*/
public class NeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition {
public class NeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition, NotEqualsTypeItem {
public NeqAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "!=", "", "");
@@ -23,6 +23,7 @@ import com.jpexs.decompiler.flash.ecma.EcmaScript;
import com.jpexs.decompiler.graph.CompilationException;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.NotEqualsTypeItem;
import com.jpexs.decompiler.graph.SourceGenerator;
import com.jpexs.decompiler.graph.TypeItem;
import com.jpexs.decompiler.graph.model.BinaryOpItem;
@@ -34,7 +35,7 @@ import java.util.List;
*
* @author JPEXS
*/
public class StrictNeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition {
public class StrictNeqAVM2Item extends BinaryOpItem implements LogicalOpItem, IfCondition, NotEqualsTypeItem {
public StrictNeqAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) {
super(instruction, lineStartIns, PRECEDENCE_EQUALITY, leftSide, rightSide, "!==", "", "");
@@ -1,7 +1,5 @@
/* The following code was generated by JFlex 1.6.0 */
/*
* Copyright (C) 2010-2021 JPEXS, All rights reserved.
* Copyright (C) 2010-2023 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -16,7 +14,6 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
/* Flash assembler language lexer specification */
package com.jpexs.decompiler.flash.abc.avm2.parser.pcode;
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
@@ -1,7 +1,5 @@
/* The following code was generated by JFlex 1.6.0 */
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2023 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -16,7 +14,6 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
/* Method info lexer specification */
package com.jpexs.decompiler.flash.abc.methodinfo_parser;