You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaMethodBytecodeCompiler.java
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -412,7 +412,7 @@ public Void builtinStaticMethod(BuiltinMethodSymbol method, TypeID returnType, C
412
412
arguments[0].accept(expressionVisitor);
413
413
javaWriter.invokeStatic(SHORT_TO_STRING);
414
414
arguments[1].accept(expressionVisitor);
415
-
javaWriter.invokeStatic(STRING_CONCAT);
415
+
javaWriter.invokeVirtual(STRING_CONCAT);
416
416
returnnull;
417
417
caseUSHORT_ADD_STRING:
418
418
caseUSHORT_CAT_STRING:
@@ -740,28 +740,29 @@ public Void builtinStaticMethod(BuiltinMethodSymbol method, TypeID returnType, C
740
740
break;
741
741
caseUSHORT_TO_LONG:
742
742
caseUSHORT_TO_ULONG:
743
-
javaWriter.constant(0xFFFFL);
743
+
javaWriter.constant(0xFFFF);
744
744
javaWriter.iAnd();
745
+
javaWriter.i2l();
745
746
break;
746
747
caseUSHORT_TO_FLOAT:
747
-
javaWriter.constant(0xFFFFL);
748
+
javaWriter.constant(0xFFFF);
748
749
javaWriter.iAnd();
749
750
javaWriter.i2f();
750
751
break;
751
752
caseUSHORT_TO_DOUBLE:
752
-
javaWriter.constant(0xFFFFL);
753
+
javaWriter.constant(0xFFFF);
753
754
javaWriter.iAnd();
754
755
javaWriter.i2d();
755
756
break;
756
757
caseUSHORT_TO_CHAR:
757
-
javaWriter.constant(0xFFFFL);
758
+
javaWriter.constant(0xFFFF);
758
759
javaWriter.iAnd();
759
760
break;
760
761
caseUSHORT_TO_STRING:
761
762
if (arguments[0].type.isOptional()) {
762
763
javaWriter.invokeStatic(OBJECTS_TOSTRING);
763
764
} else {
764
-
javaWriter.constant(0xFFFFL);
765
+
javaWriter.constant(0xFFFF);
765
766
javaWriter.iAnd();
766
767
javaWriter.invokeStatic(INTEGER_TO_STRING);
767
768
}
@@ -1177,6 +1178,9 @@ public Void builtinStaticMethod(BuiltinMethodSymbol method, TypeID returnType, C
0 commit comments