method2.bc

来自「PracticalJAVACode 的源码」· BC 代码 · 共 33 行

BC
33
字号
Method void method2(int)
   0 iload_1          //Push the value stored at index 1 of the
                      //local variable table(size) on the stack.
   1 newarray int     //Pop the size parameter and create a new
                      //int array with size elements. Push the
                      //newly created array reference(ia).
   3 astore_2         //Pop the array reference(ia) and store it
                      //at index 2 of the local variable table.
   4 iconst_0         //Push 0 for the initial value of the loop
                      //counter(i).
   5 istore_3         //Pop 0(i) and store it at index 3 of the
                      //local variable table.
   6 goto 23          //Jump to location 23.
   9 aload_2          //Beginning of try block. Push the object
                      //reference(ia) at index 2.
  10 iload_3          //Push the value at index 3(i).
  11 iload_3          //Push the value at index 3(i).
  12 iastore          //Pop the top three values. Store the value
                      //of i at index i in the array(ia).
  13 goto 20          //End of try block. Jump to location 20.
  16 pop              //Beginning of catch block.
  17 goto 20          //Jump to location 20.
  20 iinc 3 1         //Increment the loop counter(i) stored at
                      //index 3 of the local variable table by 1.
  23 iload_3          //Push the value at index 3(i).
  24 iload_1          //Push the value at index 1(size).
  25 if_icmplt 9      //Pop both the loop counter(i) and size.
                      //Jump to location 9 if i is less than size.
  28 return           //Return from method.
Exception table:      //If a java.lang.Exception occurs between
from  to  target type //location 9(inclusive) and location  9   13    16   <Class java.lang.Exception>
                      //13(exclusive) jump to location 16.

⌨️ 快捷键说明

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