IL系列文章之三:Array in IL[4]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 windfast_2000 的 blog

                   newarr     [mscorlib]system.int32//number = new int[6],

//length of the array must be loaded onto the stack before

                   stloc.0//number

                   ldc.i4.0//load first local(v_0) onto the stack

                   stloc.1//int i = 0

                   br.s       loopfor      //goto “loopfor”, “loopfor” is only a lable

         //startfor is a lable too

    startfor:  ldloc.0//number

                   ldloc.1//load v_1 onto the stack

                   ldloc.1

                   ldloc.1

                   mul//multiply

                   stelem.i4//i = i * i

                   ldloc.1

                   ldc.i4.1

                   add

本文关键:il,cil,msil,array
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top