⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 leftbehind.j

📁 gcc的组建
💻 J
字号:
;; LeftBehind.j - contrived test to see how japhar reacts to;                stuff left on the stack after a method returns..class public LeftBehind.super java/lang/Object.method public static test()I   .limit stack 10   ; up to 10 items can be pushed   ; push some ints.   bipush 1   bipush 2   bipush 3   bipush 4   bipush 5   ; then push some strings.   ldc "6th item"   ldc "7th item"   bipush 5   ; now push our return value   bipush 9   ireturn.end method.method public static main([Ljava/lang/String;)V   .limit stack 3	; up to three items can be pushed   ; we push a value onto the stack, and   ; then check to see that only one item (the return   ; value from the test() method) is on the stack on top   ; of it.   bipush 8   invokestatic LeftBehind/test()I   pop      ; get rid of the return value   bipush 8   isub   ifeq passfail:   ; push System.out onto the stack   getstatic java/lang/System/out Ljava/io/PrintStream;   ldc "FAILED:"   invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V   bipush 0   invokestatic java/lang/System/exit(I)Vpass:      ; push System.out onto the stack   getstatic java/lang/System/out Ljava/io/PrintStream;   ldc "PASSED:"   invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V   bipush 0   invokestatic java/lang/System/exit(I)V.end method

⌨️ 快捷键说明

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