Skip to content

Commit

Permalink
To be fixed in future
Browse files Browse the repository at this point in the history
  • Loading branch information
LatvianModder committed Aug 15, 2023
1 parent 326486d commit 32e8f8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/src/main/java/dev/latvian/mods/rhino/JavaAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ private static void generateCtor(ClassFileWriter cfw, String adapterName, String
cfw.add(ByteCode.ALOAD_1); // the Scriptable delegee
cfw.add(ByteCode.ALOAD_0); // this
cfw.addInvoke(ByteCode.INVOKESTATIC, "dev/latvian/mods/rhino/JavaAdapter", "createAdapterWrapper", "(Ldev/latvian/mods/rhino/Scriptable;" + "Ljava/lang/Object;" + ")Ldev/latvian/mods/rhino/Scriptable;");
// cfw.addInvoke(ByteCode.INVOKESTATIC, "dev/latvian/mods/rhino/JavaAdapter", "createAdapterWrapper", "(Ldev/latvian/mods/rhino/Scriptable;" + "Ljava/lang/Object;" + "Ldev/latvian/mods/rhino/Context;" + ")Ldev/latvian/mods/rhino/Scriptable;");
cfw.add(ByteCode.PUTFIELD, adapterName, "self", "Ldev/latvian/mods/rhino/Scriptable;");

cfw.add(ByteCode.RETURN);
Expand Down Expand Up @@ -514,6 +515,7 @@ private static void generateEmptyCtor(ClassFileWriter cfw, String adapterName, S
cfw.add(ByteCode.ALOAD_1); // the Scriptable
cfw.add(ByteCode.ALOAD_0); // this
cfw.addInvoke(ByteCode.INVOKESTATIC, "dev/latvian/mods/rhino/JavaAdapter", "createAdapterWrapper", "(Ldev/latvian/mods/rhino/Scriptable;" + "Ljava/lang/Object;" + ")Ldev/latvian/mods/rhino/Scriptable;");
// cfw.addInvoke(ByteCode.INVOKESTATIC, "dev/latvian/mods/rhino/JavaAdapter", "createAdapterWrapper", "(Ldev/latvian/mods/rhino/Scriptable;" + "Ljava/lang/Object;" + "Ldev/latvian/mods/rhino/Context;" + ")Ldev/latvian/mods/rhino/Scriptable;");
cfw.add(ByteCode.PUTFIELD, adapterName, "self", "Ldev/latvian/mods/rhino/Scriptable;");

cfw.add(ByteCode.RETURN);
Expand Down

0 comments on commit 32e8f8a

Please sign in to comment.