Skip to content
Snippets Groups Projects
Commit 358b0015 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

Merge branch 'stsypanov/asm-opt-array'

parents d9dbce41 4116752d
No related branches found
No related tags found
No related merge requests found
...@@ -72,9 +72,8 @@ final class Subroutine { ...@@ -72,9 +72,8 @@ final class Subroutine {
*/ */
Subroutine(final Subroutine subroutine) { Subroutine(final Subroutine subroutine) {
this.start = subroutine.start; this.start = subroutine.start;
this.localsUsed = new boolean[subroutine.localsUsed.length]; this.localsUsed = subroutine.localsUsed.clone();
this.callers = new ArrayList<>(subroutine.callers); this.callers = new ArrayList<>(subroutine.callers);
System.arraycopy(subroutine.localsUsed, 0, this.localsUsed, 0, subroutine.localsUsed.length);
} }
/** /**
......
...@@ -110,8 +110,7 @@ public abstract class Remapper { ...@@ -110,8 +110,7 @@ public abstract class Remapper {
String remappedInternalName = mapType(internalName); String remappedInternalName = mapType(internalName);
if (remappedInternalName != null) { if (remappedInternalName != null) {
if (remappedInternalNames == null) { if (remappedInternalNames == null) {
remappedInternalNames = new String[internalNames.length]; remappedInternalNames = internalNames.clone();
System.arraycopy(internalNames, 0, remappedInternalNames, 0, internalNames.length);
} }
remappedInternalNames[i] = remappedInternalName; remappedInternalNames[i] = remappedInternalName;
} }
......
...@@ -186,11 +186,10 @@ public class SerialVersionUIDAdder extends ClassVisitor { ...@@ -186,11 +186,10 @@ public class SerialVersionUIDAdder extends ClassVisitor {
if (computeSvuid) { if (computeSvuid) {
this.name = name; this.name = name;
this.access = access; this.access = access;
this.interfaces = new String[interfaces.length]; this.interfaces = interfaces.clone();
this.svuidFields = new ArrayList<>(); this.svuidFields = new ArrayList<>();
this.svuidConstructors = new ArrayList<>(); this.svuidConstructors = new ArrayList<>();
this.svuidMethods = new ArrayList<>(); this.svuidMethods = new ArrayList<>();
System.arraycopy(interfaces, 0, this.interfaces, 0, interfaces.length);
} }
super.visit(version, access, name, signature, superName, interfaces); super.visit(version, access, name, signature, superName, interfaces);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment