summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java
diff options
context:
space:
mode:
authorGravatar jeff2015-03-19 02:20:32 -0400
committerGravatar jeff2015-03-19 02:20:32 -0400
commit96ba0ab422d7f9747e93461524991cf5ceeb48c4 (patch)
treecd9504acae257575e0a354e79386da67acd796c6 /src/cuchaz/enigma/bytecode/MethodParametersAttribute.java
parentAdded tag v0.10 beta for changeset 68f12fd9afb0 (diff)
downloadenigma-fork-96ba0ab422d7f9747e93461524991cf5ceeb48c4.tar.gz
enigma-fork-96ba0ab422d7f9747e93461524991cf5ceeb48c4.tar.xz
enigma-fork-96ba0ab422d7f9747e93461524991cf5ceeb48c4.zip
fix issue with naming method arguments and the local variable tables
Diffstat (limited to 'src/cuchaz/enigma/bytecode/MethodParametersAttribute.java')
-rw-r--r--src/cuchaz/enigma/bytecode/MethodParametersAttribute.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java b/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java
index bf95956..27f5b9b 100644
--- a/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java
+++ b/src/cuchaz/enigma/bytecode/MethodParametersAttribute.java
@@ -27,6 +27,7 @@ public class MethodParametersAttribute extends AttributeInfo {
27 } 27 }
28 28
29 public static void updateClass(MethodInfo info, List<String> names) { 29 public static void updateClass(MethodInfo info, List<String> names) {
30
30 // add the names to the class const pool 31 // add the names to the class const pool
31 ConstPool constPool = info.getConstPool(); 32 ConstPool constPool = info.getConstPool();
32 List<Integer> parameterNameIndices = new ArrayList<Integer>(); 33 List<Integer> parameterNameIndices = new ArrayList<Integer>();
@@ -44,7 +45,7 @@ public class MethodParametersAttribute extends AttributeInfo {
44 45
45 private static byte[] writeStruct(List<Integer> parameterNameIndices) { 46 private static byte[] writeStruct(List<Integer> parameterNameIndices) {
46 // JVM 8 Spec says the struct looks like this: 47 // JVM 8 Spec says the struct looks like this:
47 // http://cr.openjdk.java.net/~mr/se/8/java-se-8-fr-spec-01/java-se-8-jvms-fr-diffs.pdf 48 // http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24
48 // uint8 num_params 49 // uint8 num_params
49 // for each param: 50 // for each param:
50 // uint16 name_index -> points to UTF8 entry in constant pool, or 0 for no entry 51 // uint16 name_index -> points to UTF8 entry in constant pool, or 0 for no entry