Alexey Andreev 2015-05-01 15:19:35 +03:00
parent fee4fbc24e
commit 26379afc50
3 changed files with 15 additions and 2 deletions

View File

@ -93,7 +93,7 @@ public final class TMath extends TObject {
public static native double atan2(double y, double x);
public static int round(float a) {
return (int)(a + 1.5f);
return (int)(a + 0.5f);
}
public static long round(double a) {

View File

@ -485,7 +485,12 @@ public class ProgramParser implements VariableDebugInformation {
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc) {
public void visitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs) {
throw new IllegalStateException("InvokeDynamic is not supported in TeaVM");
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
switch (opcode) {
case Opcodes.INVOKEINTERFACE:
case Opcodes.INVOKEVIRTUAL:

View File

@ -250,6 +250,14 @@ function $rt_createByteMultiArray(dimensions) {
}
return $rt_createMultiArrayImpl($rt_bytecls(), arrays, dimensions);
}
function $rt_createCharMultiArray(dimensions) {
var arrays = new Array($rt_primitiveArrayCount(dimensions));
var firstDim = dimensions[0] | 0;
for (var i = 0 | 0; i < arrays.length; i = (i + 1) | 0) {
arrays[i] = $rt_createCharArray(firstDim);
}
return $rt_createMultiArrayImpl($rt_charcls(), arrays, dimensions);
}
function $rt_createBooleanMultiArray(dimensions) {
var arrays = new Array($rt_primitiveArrayCount(dimensions));
var firstDim = dimensions[0] | 0;