Bytecode features not available in the Java language

后端 未结 9 1457
北恋
北恋 2020-12-04 04:28

Are there currently (Java 6) things you can do in Java bytecode that you can\'t do from within the Java language?

I know both are Turing complete, so read \"can do\"

9条回答
  •  一整个雨季
    2020-12-04 04:53

    • GOTO can be used with labels to create your own control structures (other than for while etc)
    • You can override the this local variable inside a method
    • Combining both of these you can create create tail call optimised bytecode (I do this in JCompilo)

    As a related point you can get parameter name for methods if compiled with debug (Paranamer does this by reading the bytecode

提交回复
热议问题