Guest User

skyboy

a guest
Nov 1st, 2010
208
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. var: 298
  3. const: 208
  4. var: 276
  5. const: 206
  6. var: 315
  7. const: 202
  8. var: 276
  9. const: 206
  10. var: 274
  11. const: 204
  12. var: 240
  13. const: 214
  14. var: 273
  15. const: 209
  16. var: 215
  17. const: 212
  18. var: 242
  19. const: 278
  20. var: 203
  21. const: 270
  22. var: 205
  23. const: 271
  24. var: 274
  25. const: 208
  26. var: 206
  27. const: 280
  28. var: 201
  29. const: 279
  30. var: 279
  31. const: 204
  32. var: 257
  33. const: 265
  34. var: 278
  35. const: 206
  36. */
  37. package {
  38.     import flash.display.*;
  39.     import flash.events.*;
  40.     import flash.utils.*;
  41.     import flash.text.*;
  42.  
  43.     public class ConstTest extends Sprite {
  44.         private var __logger:TextField = new TextField();
  45.         private function log(msg:*): void { __logger.appendText(msg + "\n"); }
  46.  
  47.         public function ConstTest() {
  48.             __logger.autoSize = TextFieldAutoSize.LEFT;
  49.             addChild(__logger);
  50.             stage.addEventListener(MouseEvent.CLICK, onClick);
  51.         }
  52.         public function onClick(e:MouseEvent):void {
  53. //d0
  54. //_as3_getlocal <0>
  55. //30
  56. //_as3_pushscope
  57.             var i:int;
  58. //24 00
  59. //_as3_pushbyte 0
  60. //d6
  61. //_as3_setlocal <2>
  62.             var beforeTime:int;
  63. //24 00
  64. //_as3_pushbyte 0
  65. //d7
  66. //_as3_setlocal <3>
  67.             var afterTime:int;
  68. //24 00
  69. //_as3_pushbyte 0
  70. //63 04
  71. //_as3_setlocal <4>
  72.             const REPS_CONST:int = 100000000;
  73. //2d 01
  74. //_as3_pushint 100000000
  75. //2a
  76. //_as3_dup
  77. //63 05
  78. //_as3_setlocal <5>
  79.             var REPS:int = REPS_CONST;
  80. //73
  81. //_as3_convert_i
  82. //63 06
  83. //_as3_setlocal <6>
  84.             beforeTime = getTimer();
  85. //5d 11
  86. //_as3_findpropstrict flash.utils::getTimer
  87. //46 11 00
  88. //_as3_callproperty flash.utils::getTimer(param count:0)
  89. //73
  90. //_as3_convert_i
  91. //d7
  92. //_as3_setlocal <3>
  93.             for (i = 0; i < REPS; ++i)
  94.             {
  95. //24 00
  96. //_as3_pushbyte 0
  97. //d6
  98. //_as3_setlocal <2>
  99. //10 03 00 00
  100. //_as3_jump offset: 3
  101. //09
  102. //_as3_label
  103. //c2 02
  104. //_as3_inclocal_i <2>
  105. //d2
  106. //_as3_getlocal <2>
  107. //62 06
  108. //_as3_getlocal <6>
  109. //15 f6 ff ff
  110. //_as3_iflt offset: -10
  111.             }
  112.             afterTime = getTimer();
  113. //5d 11
  114. //_as3_findpropstrict flash.utils::getTimer
  115. //46 11 00
  116. //_as3_callproperty flash.utils::getTimer(param count:0)
  117. //73
  118. //_as3_convert_i
  119. //63 04
  120. //_as3_setlocal <4>
  121.             log("var: " + (afterTime-beforeTime));
  122. //d0
  123. //_as3_getlocal <0>
  124. //2c 18
  125. //_as3_pushstring "var: "
  126. //62 04
  127. //_as3_getlocal <4>
  128. //d3
  129. //_as3_getlocal <3>
  130. //a1
  131. //_as3_subtract
  132. //a0
  133. //_as3_add
  134. //4f 07 01
  135. //_as3_callpropvoid log(param count:1)
  136.             REPS = REPS_CONST;
  137. //62 05
  138. //_as3_getlocal <5>
  139. //73
  140. //_as3_convert_i
  141. //63 06
  142. //_as3_setlocal <6>
  143.             beforeTime = getTimer();
  144. //5d 11
  145. //_as3_findpropstrict flash.utils::getTimer
  146. //46 11 00
  147. //_as3_callproperty flash.utils::getTimer(param count:0)
  148. //73
  149. //_as3_convert_i
  150. //d7
  151. //_as3_setlocal <3>
  152.             for (i = 0; i < REPS_CONST; ++i)
  153.             {
  154. //24 00
  155. //_as3_pushbyte 0
  156. //d6
  157. //_as3_setlocal <2>
  158. //10 03 00 00
  159. //_as3_jump offset: 3
  160. //09
  161. //_as3_label
  162. //c2 02
  163. //_as3_inclocal_i <2>
  164. //d2
  165. //_as3_getlocal <2>
  166. //62 05
  167. //_as3_getlocal <5>
  168. //15 f6 ff ff
  169. //_as3_iflt offset: -10
  170.             }
  171.             afterTime = getTimer();
  172. //5d 11
  173. //_as3_findpropstrict flash.utils::getTimer
  174. //46 11 00
  175. //_as3_callproperty flash.utils::getTimer(param count:0)
  176. //73
  177. //_as3_convert_i
  178. //63 04
  179. //_as3_setlocal <4>
  180.             log("const: " + (afterTime-beforeTime));
  181. //d0
  182. //_as3_getlocal <0>
  183. //2c 19
  184. //_as3_pushstring "const: "
  185. //62 04
  186. //_as3_getlocal <4>
  187. //d3
  188. //_as3_getlocal <3>
  189. //a1
  190. //_as3_subtract
  191. //a0
  192. //_as3_add
  193. //4f 07 01
  194. //_as3_callpropvoid log(param count:1)
  195. //47
  196. //_as3_returnvoid
  197.         }
  198.     }
  199. }
RAW Paste Data