mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 03:20:45 +00:00
small improvements, little bit faster decompilation by caching the number values of the strings
This commit is contained in:
@@ -230,6 +230,10 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Double getResultAsNumber() {
|
||||
return EcmaScript.toNumber(getResult());
|
||||
}
|
||||
|
||||
public String toStringNoQuotes(LocalData localData) {
|
||||
// todo: honfika: this method should not be called, maybe we should throw an exception
|
||||
return toString();
|
||||
|
||||
@@ -42,6 +42,11 @@ public class DuplicateItem extends GraphTargetItem implements SimpleValue {
|
||||
return value.getResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double getResultAsNumber() {
|
||||
return value.getResultAsNumber();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if ((value instanceof SimpleValue) && (((SimpleValue) value).isSimpleValue())) {
|
||||
|
||||
Reference in New Issue
Block a user