sysdepcallmethod.java

来自「kaffe Java 解释器语言,源码,Java的子集系统,开放源代码」· Java 代码 · 共 31 行

JAVA
31
字号
/* Although this appears to be testing CharToByteDefault, it is   actually a test for sysdepCallMethod.  Since   CharToByteDefault.convert takes 6 arguments, plus the implicit   `this' and the JNIEnv, and several architectures can pass at most 6   arguments on registers, this will end up testing whether the last   two arguments are passed correctly */import kaffe.io.CharToByteDefault;public class sysdepCallMethod {    public static void main(String[] argv) {	char[] ca = { 'a', 'b', 'c' };	byte[] ba = new byte[ca.length*2];	CharToByteDefault cb = new kaffe.io.CharToByteDefault();	cb.convert(ca, 0, ca.length, ba, 0, ba.length);	for (int i = 0; i < ba.length; ++i)	    System.out.println(ba[i]);    }}// unsafe/* Expected output:979899000*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?