do not copy big byte arrays, store only references (ByteArrayRange) e.g in image tags

This commit is contained in:
2014-11-09 22:40:36 +01:00
parent 270cc40856
commit 3456d04d38
151 changed files with 2787 additions and 2512 deletions
@@ -59,7 +59,7 @@ public abstract class GraphTargetItem implements Serializable {
public List<GraphSourceItemPos> moreSrc = new ArrayList<>();
public GraphPart firstPart;
public GraphTargetItem value;
protected Map<String,String> srcData = new HashMap<>();
protected Map<String, String> srcData = new HashMap<>();
public GraphPart getFirstPart() {
if (value == null) {
@@ -18,16 +18,11 @@ package com.jpexs.decompiler.graph;
import com.jpexs.decompiler.flash.IdentifiersDeobfuscation;
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.InstanceInfo;
import com.jpexs.decompiler.flash.abc.types.Multiname;
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.graph.model.LocalData;
import com.jpexs.decompiler.graph.model.UnboundedTypeItem;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
@@ -74,17 +69,16 @@ public class TypeItem extends GraphTargetItem {
return true;
}
@Override
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
if (localData.fullyQualifiedNames.contains(fullTypeName)) {
writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2!=null, fullTypeName),"typename",fullTypeName);
writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2 != null, fullTypeName), "typename", fullTypeName);
} else {
String simpleName = fullTypeName;
if (simpleName.contains(".")) {
simpleName = simpleName.substring(simpleName.lastIndexOf('.') + 1);
}
writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2!=null, simpleName),"typename",fullTypeName);
writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2 != null, simpleName), "typename", fullTypeName);
}
return writer;
@@ -42,7 +42,7 @@ public class CommentItem extends GraphTargetItem {
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
writer.append("/* ");
for (int i = 0; i < commentLines.length; i++) {
if(commentLines[i]==null){
if (commentLines[i] == null) {
continue;
}
writer.append(commentLines[i]);