mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 05:55:10 +00:00
Merge origin/master
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<property name="MAINCLASS" value="com.jpexs.decompiler.flash.gui.Main"/>
|
||||
<property name="NSISPATH" value="c:\program files (x86)\NSIS"/>
|
||||
<property name="MAXHEAPSIZEPERCENT" value="100"/>
|
||||
<property name="MAXHEAPSIZERUN" value="4096"/> <!-- for run task (MB)-->
|
||||
<property name="MAXHEAPSIZERUN" value="8094"/> <!-- for run task (MB)-->
|
||||
|
||||
|
||||
<property name="SOURCEDIR" value="${basedir}/src"/>
|
||||
|
||||
@@ -454,8 +454,6 @@
|
||||
<target name="run" depends="build">
|
||||
<java jar="${DISTRIBUTIONDIR}/${JARFILENAME}.jar" fork="true">
|
||||
<jvmarg value="-Xmx${MAXHEAPSIZERUN}m"/>
|
||||
<jvmarg value="-XX:MinHeapFreeRatio=0"/>
|
||||
<jvmarg value="-XX:MaxHeapFreeRatio=0"/>
|
||||
<arg line="${RUNPARAMS}" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
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;
|
||||
@@ -77,13 +78,13 @@ public class TypeItem extends GraphTargetItem {
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (localData.fullyQualifiedNames.contains(fullTypeName)) {
|
||||
writer.hilightSpecial(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(simpleName,"typename",fullTypeName);
|
||||
writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2!=null, simpleName),"typename",fullTypeName);
|
||||
}
|
||||
|
||||
return writer;
|
||||
|
||||
@@ -90,7 +90,7 @@ public class Cache<K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean contains(K key) {
|
||||
public synchronized boolean contains(K key) {
|
||||
if (storageType == STORAGE_FILES) {
|
||||
return cacheFiles.containsKey(key);
|
||||
} else if (storageType == STORAGE_MEMORY) {
|
||||
@@ -99,7 +99,7 @@ public class Cache<K, V> {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
public synchronized void clear() {
|
||||
cacheMemory.clear();
|
||||
for (File f : cacheFiles.values()) {
|
||||
f.delete();
|
||||
@@ -107,7 +107,7 @@ public class Cache<K, V> {
|
||||
cacheFiles.clear();
|
||||
}
|
||||
|
||||
public void remove(K key) {
|
||||
public synchronized void remove(K key) {
|
||||
if (storageType == STORAGE_FILES) {
|
||||
if (cacheFiles.containsKey(key)) {
|
||||
File f = cacheFiles.get(key);
|
||||
@@ -122,7 +122,7 @@ public class Cache<K, V> {
|
||||
|
||||
}
|
||||
|
||||
public V get(K key) {
|
||||
public synchronized V get(K key) {
|
||||
if (storageType == STORAGE_FILES) {
|
||||
if (!cacheFiles.containsKey(key)) {
|
||||
return null;
|
||||
@@ -146,7 +146,7 @@ public class Cache<K, V> {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void put(K key, V value) {
|
||||
public synchronized void put(K key, V value) {
|
||||
if (storageType == STORAGE_FILES) {
|
||||
File temp = null;
|
||||
try {
|
||||
|
||||
@@ -293,7 +293,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean getPropertyTypeAtPos(int pos, Reference<Integer> abcIndex,Reference<Integer> classIndex, Reference<Integer> traitIndex, Reference<Boolean> classTrait, Reference<Integer> multinameIndex){
|
||||
public boolean getPropertyTypeAtPos(int pos, Reference<Integer> abcIndex,Reference<Integer> classIndex, Reference<Integer> traitIndex, Reference<Boolean> classTrait, Reference<Integer> multinameIndex){
|
||||
|
||||
int m = getMultinameAtPos(pos,true);
|
||||
if (m <= 0) {
|
||||
@@ -303,7 +303,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
Token t = sd.getTokenAt(pos+1);
|
||||
Token lastToken = t;
|
||||
Token prev = null;
|
||||
while(t.type == TokenType.IDENTIFIER || t.type == TokenType.KEYWORD){
|
||||
while(t.type == TokenType.IDENTIFIER || t.type == TokenType.KEYWORD || t.type == TokenType.REGEX){
|
||||
prev = sd.getPrevToken(t);
|
||||
if(prev!=null){
|
||||
if(!".".equals(prev.getString(sd))){
|
||||
@@ -314,7 +314,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(t.type != TokenType.IDENTIFIER && t.type != TokenType.KEYWORD){
|
||||
if(t.type != TokenType.IDENTIFIER && t.type != TokenType.KEYWORD || t.type == TokenType.REGEX){
|
||||
return false;
|
||||
}
|
||||
Reference<String> locTypeRef = new Reference<>("");
|
||||
@@ -336,7 +336,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
InstanceInfo ii = a.instance_info.get(cindex);
|
||||
for(int j=0;j<ii.instance_traits.traits.size();j++){
|
||||
Trait tr = ii.instance_traits.traits.get(j);
|
||||
if(ident.equals(tr.getName(a).getName(a.constants, new ArrayList<String>(), true))){
|
||||
if(ident.equals(tr.getName(a).getName(a.constants, new ArrayList<String>(), false /*NOT RAW!*/))){
|
||||
classIndex.setVal(cindex);
|
||||
abcIndex.setVal(i);
|
||||
traitIndex.setVal(j);
|
||||
@@ -351,7 +351,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
ClassInfo ci = a.class_info.get(cindex);
|
||||
for(int j=0;j<ci.static_traits.traits.size();j++){
|
||||
Trait tr = ci.static_traits.traits.get(j);
|
||||
if(ident.equals(tr.getName(a).getName(a.constants, new ArrayList<String>(), true))){
|
||||
if(ident.equals(tr.getName(a).getName(a.constants, new ArrayList<String>(), false /*NOT RAW!*/))){
|
||||
classIndex.setVal(cindex);
|
||||
abcIndex.setVal(i);
|
||||
traitIndex.setVal(j);
|
||||
@@ -464,7 +464,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
break;
|
||||
case "traitname":
|
||||
if (currentTrait != null) {
|
||||
return currentTrait.name_index;
|
||||
//return currentTrait.name_index;
|
||||
}
|
||||
break;
|
||||
case "returns":
|
||||
|
||||
Reference in New Issue
Block a user