therubyracer 0.8.1.pre2 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of therubyracer might be problematic. Click here for more details.

Files changed (877) hide show
  1. data/Changelog.md +2 -1
  2. data/README.md +6 -3
  3. data/ext/v8/upstream/3.1.8/.gitignore +31 -0
  4. data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
  5. data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
  6. data/ext/v8/upstream/3.1.8/LICENSE +52 -0
  7. data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
  8. data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
  9. data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
  10. data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
  11. data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
  12. data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
  13. data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
  14. data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
  15. data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
  16. data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
  17. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
  19. data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
  20. data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
  21. data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
  22. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
  23. data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
  24. data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
  25. data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
  26. data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
  27. data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
  28. data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
  29. data/ext/v8/upstream/3.1.8/src/api.h +508 -0
  30. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
  31. data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
  32. data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
  33. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
  34. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
  35. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
  36. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
  37. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
  38. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
  39. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
  40. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
  41. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
  42. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
  43. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
  44. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
  45. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
  46. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
  47. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
  48. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
  49. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
  50. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
  51. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
  52. data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
  53. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
  54. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
  55. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
  56. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
  57. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
  58. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
  59. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
  60. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
  61. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
  62. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
  63. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
  64. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
  65. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
  66. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
  67. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
  68. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
  69. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
  70. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
  71. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
  72. data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
  73. data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
  74. data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
  75. data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
  76. data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
  77. data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
  78. data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
  79. data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
  80. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
  81. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
  82. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
  83. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
  84. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
  85. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
  86. data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
  87. data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
  88. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
  89. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
  90. data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
  91. data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
  92. data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
  93. data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
  94. data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
  95. data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
  96. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
  97. data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
  98. data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
  99. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
  100. data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
  101. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
  102. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
  103. data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
  104. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
  105. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
  106. data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
  107. data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
  108. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
  109. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
  110. data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
  111. data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
  112. data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
  113. data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
  114. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
  115. data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
  116. data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
  117. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
  118. data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
  119. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
  120. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
  121. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
  122. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
  123. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
  124. data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
  125. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
  126. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
  127. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
  128. data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
  129. data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
  130. data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
  131. data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
  132. data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
  133. data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
  134. data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
  135. data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
  136. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
  137. data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
  138. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
  139. data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
  140. data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
  141. data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
  142. data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
  143. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
  144. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
  145. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
  146. data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
  147. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
  148. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
  149. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
  150. data/ext/v8/upstream/3.1.8/src/double.h +238 -0
  151. data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
  152. data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
  153. data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
  154. data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
  155. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
  156. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
  157. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
  158. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
  159. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
  160. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
  161. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
  162. data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
  163. data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
  164. data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
  165. data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
  166. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
  167. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
  168. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
  169. data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
  170. data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
  171. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
  172. data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
  173. data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
  174. data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
  175. data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
  176. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
  177. data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
  178. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
  179. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
  180. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
  181. data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
  182. data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
  183. data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
  184. data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
  185. data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
  186. data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
  187. data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
  188. data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
  189. data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
  190. data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
  191. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
  192. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
  193. data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
  194. data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
  195. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
  196. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
  197. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
  198. data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
  199. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
  200. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
  201. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
  202. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
  203. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
  204. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
  205. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
  206. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
  207. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
  208. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
  209. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
  210. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
  211. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
  212. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
  213. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
  214. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
  215. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
  216. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
  217. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
  218. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
  219. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
  220. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  221. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
  222. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
  223. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
  224. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
  225. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
  226. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
  227. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  228. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
  229. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
  230. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
  231. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
  232. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
  233. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
  234. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
  235. data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
  236. data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
  237. data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
  238. data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
  239. data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
  240. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
  241. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
  242. data/ext/v8/upstream/3.1.8/src/json.js +342 -0
  243. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
  244. data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
  245. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
  246. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
  247. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
  248. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
  249. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
  250. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
  251. data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
  252. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
  253. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
  254. data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
  255. data/ext/v8/upstream/3.1.8/src/list.h +164 -0
  256. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
  257. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
  258. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
  259. data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
  260. data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
  261. data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
  262. data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
  263. data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
  264. data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
  265. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
  266. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
  267. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
  268. data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
  269. data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
  270. data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
  271. data/ext/v8/upstream/3.1.8/src/log.h +379 -0
  272. data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
  273. data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
  274. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
  275. data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
  276. data/ext/v8/upstream/3.1.8/src/math.js +264 -0
  277. data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
  278. data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
  279. data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
  280. data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
  281. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
  282. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
  283. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
  284. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
  285. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
  286. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
  287. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
  288. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
  289. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
  290. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
  291. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
  292. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
  293. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
  294. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
  295. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
  296. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
  297. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
  298. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
  299. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
  300. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
  301. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
  302. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
  303. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
  304. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
  305. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
  306. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
  307. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
  308. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
  309. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
  310. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
  311. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
  312. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
  313. data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
  314. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
  315. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
  316. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
  317. data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
  318. data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
  319. data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
  320. data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
  321. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
  322. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
  323. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
  324. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
  325. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
  326. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
  327. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
  328. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
  329. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
  330. data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
  331. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
  332. data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
  333. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
  334. data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
  335. data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
  336. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
  337. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
  338. data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
  339. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
  340. data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
  341. data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
  342. data/ext/v8/upstream/3.1.8/src/property.h +337 -0
  343. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  344. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
  345. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
  346. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
  347. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
  348. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
  349. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
  350. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
  351. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
  352. data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
  353. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
  354. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
  355. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
  356. data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
  357. data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
  358. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
  359. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
  360. data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
  361. data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
  362. data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
  363. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
  364. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
  365. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
  366. data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
  367. data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
  368. data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
  369. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
  370. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
  371. data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
  372. data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
  373. data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
  374. data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
  375. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
  376. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
  377. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
  378. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
  379. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
  380. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
  381. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
  382. data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
  383. data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
  384. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
  385. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
  386. data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
  387. data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
  388. data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
  389. data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
  390. data/ext/v8/upstream/3.1.8/src/string.js +915 -0
  391. data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
  392. data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
  393. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
  394. data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
  395. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
  396. data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
  397. data/ext/v8/upstream/3.1.8/src/token.h +288 -0
  398. data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
  399. data/ext/v8/upstream/3.1.8/src/top.h +608 -0
  400. data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
  401. data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
  402. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
  403. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
  404. data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
  405. data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
  406. data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
  407. data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
  408. data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
  409. data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
  410. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
  411. data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
  412. data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
  413. data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
  414. data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
  415. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
  416. data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
  417. data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
  418. data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
  419. data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
  420. data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
  421. data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
  422. data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
  423. data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
  424. data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
  425. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
  426. data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
  427. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
  428. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
  429. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
  430. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
  431. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
  432. data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
  433. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
  434. data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
  435. data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
  436. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
  437. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
  438. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
  439. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
  440. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
  441. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
  442. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
  443. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
  444. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
  445. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
  446. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
  447. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
  448. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
  449. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
  450. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
  451. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
  452. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
  453. data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
  454. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
  455. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
  456. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  457. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
  458. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
  459. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
  460. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
  461. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
  462. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
  463. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
  464. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
  465. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
  466. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
  467. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
  468. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
  469. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
  470. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
  471. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
  472. data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
  473. data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
  474. data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
  475. data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
  476. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
  477. data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
  478. data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
  479. data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
  480. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
  481. data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
  482. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
  483. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
  484. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
  485. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
  486. data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
  487. data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
  488. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
  489. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
  490. data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
  491. data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
  492. data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
  493. data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
  494. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
  495. data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
  496. data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
  497. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
  498. data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
  499. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
  500. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
  501. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
  502. data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
  503. data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
  504. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
  505. data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
  506. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
  507. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
  508. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
  509. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
  510. data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
  511. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
  512. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
  513. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
  514. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
  515. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
  516. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
  517. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
  518. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
  519. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
  520. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
  521. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  522. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  523. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  524. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  525. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  526. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  527. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  528. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  529. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
  530. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
  531. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
  532. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  533. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  534. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  535. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  536. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
  537. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
  538. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
  539. data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
  540. data/ext/v8/upstream/Makefile +2 -1
  541. data/ext/v8/v8_template.cpp +2 -2
  542. data/lib/v8/version.rb +1 -1
  543. data/spec/redjs/jsapi_spec.rb +2 -2
  544. metadata +552 -490
  545. data/ext/v8/upstream/2.3.3/.gitignore +0 -26
  546. data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
  547. data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
  548. data/ext/v8/upstream/2.3.3/LICENSE +0 -55
  549. data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
  550. data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
  551. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
  552. data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
  553. data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
  554. data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
  555. data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
  556. data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
  557. data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
  558. data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
  559. data/ext/v8/upstream/2.3.3/src/api.h +0 -485
  560. data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
  561. data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
  562. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
  563. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
  564. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
  565. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
  566. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
  567. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
  568. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
  569. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
  570. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
  571. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
  572. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
  573. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
  574. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
  575. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
  576. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
  577. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
  578. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
  579. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
  580. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
  581. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
  582. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
  583. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
  584. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
  585. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
  586. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
  587. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
  588. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
  589. data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
  590. data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
  591. data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
  592. data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
  593. data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
  594. data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
  595. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
  596. data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
  597. data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
  598. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
  599. data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
  600. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
  601. data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
  602. data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
  603. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
  604. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
  605. data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
  606. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
  607. data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
  608. data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
  609. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
  610. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
  611. data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
  612. data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
  613. data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
  614. data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
  615. data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
  616. data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
  617. data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
  618. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
  619. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
  620. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
  621. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
  622. data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
  623. data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
  624. data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
  625. data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
  626. data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
  627. data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
  628. data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
  629. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
  630. data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
  631. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
  632. data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
  633. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
  634. data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
  635. data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
  636. data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
  637. data/ext/v8/upstream/2.3.3/src/double.h +0 -169
  638. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
  639. data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
  640. data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
  641. data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
  642. data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
  643. data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
  644. data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
  645. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
  646. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
  647. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
  648. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
  649. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
  650. data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
  651. data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
  652. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
  653. data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
  654. data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
  655. data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
  656. data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
  657. data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
  658. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
  659. data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
  660. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
  661. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
  662. data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
  663. data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
  664. data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
  665. data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
  666. data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
  667. data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
  668. data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
  669. data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
  670. data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
  671. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
  672. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
  673. data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
  674. data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
  675. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
  676. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
  677. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
  678. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
  679. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
  680. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
  681. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
  682. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
  683. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
  684. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
  685. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
  686. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
  687. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
  688. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
  689. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
  690. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
  691. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
  692. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
  693. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
  694. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
  695. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
  696. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
  697. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
  698. data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
  699. data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
  700. data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
  701. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
  702. data/ext/v8/upstream/2.3.3/src/json.js +0 -268
  703. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
  704. data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
  705. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
  706. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
  707. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
  708. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
  709. data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
  710. data/ext/v8/upstream/2.3.3/src/list.h +0 -159
  711. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
  712. data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
  713. data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
  714. data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
  715. data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
  716. data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
  717. data/ext/v8/upstream/2.3.3/src/log.h +0 -384
  718. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
  719. data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
  720. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
  721. data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
  722. data/ext/v8/upstream/2.3.3/src/math.js +0 -264
  723. data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
  724. data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
  725. data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
  726. data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
  727. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
  728. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
  729. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
  730. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
  731. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
  732. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
  733. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
  734. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
  735. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
  736. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
  737. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
  738. data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
  739. data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
  740. data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
  741. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
  742. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
  743. data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
  744. data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
  745. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
  746. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
  747. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
  748. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
  749. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
  750. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
  751. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
  752. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
  753. data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
  754. data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
  755. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
  756. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
  757. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
  758. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
  759. data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
  760. data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
  761. data/ext/v8/upstream/2.3.3/src/property.h +0 -315
  762. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
  763. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
  764. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
  765. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
  766. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
  767. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
  768. data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
  769. data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
  770. data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
  771. data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
  772. data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
  773. data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
  774. data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
  775. data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
  776. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
  777. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
  778. data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
  779. data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
  780. data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
  781. data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
  782. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
  783. data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
  784. data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
  785. data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
  786. data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
  787. data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
  788. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
  789. data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
  790. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
  791. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
  792. data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
  793. data/ext/v8/upstream/2.3.3/src/token.h +0 -270
  794. data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
  795. data/ext/v8/upstream/2.3.3/src/top.h +0 -463
  796. data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
  797. data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
  798. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
  799. data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
  800. data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
  801. data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
  802. data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
  803. data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
  804. data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
  805. data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
  806. data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
  807. data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
  808. data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
  809. data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
  810. data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
  811. data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
  812. data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
  813. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
  814. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
  815. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
  816. data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
  817. data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
  818. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
  819. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
  820. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
  821. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
  822. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
  823. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
  824. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
  825. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
  826. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
  827. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
  828. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
  829. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
  830. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
  831. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
  832. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
  833. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
  834. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
  835. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
  836. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
  837. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
  838. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
  839. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
  840. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
  841. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
  842. data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
  843. data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
  844. data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
  845. data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
  846. data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
  847. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
  848. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
  849. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
  850. data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
  851. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
  852. data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
  853. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
  854. data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
  855. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
  856. data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
  857. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
  858. data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
  859. data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
  860. data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
  861. data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
  862. data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
  863. data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
  864. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
  865. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
  866. data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
  867. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
  868. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
  869. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
  870. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
  871. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
  872. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
  873. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
  874. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
  875. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
  876. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
  877. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,289 +0,0 @@
1
- // Copyright 2006-2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifndef V8_LOG_UTILS_H_
29
- #define V8_LOG_UTILS_H_
30
-
31
- namespace v8 {
32
- namespace internal {
33
-
34
- #ifdef ENABLE_LOGGING_AND_PROFILING
35
-
36
- // A memory buffer that increments its size as you write in it. Size
37
- // is incremented with 'block_size' steps, never exceeding 'max_size'.
38
- // During growth, memory contents are never copied. At the end of the
39
- // buffer an amount of memory specified in 'seal_size' is reserved.
40
- // When writing position reaches max_size - seal_size, buffer auto-seals
41
- // itself with 'seal' and allows no further writes. Data pointed by
42
- // 'seal' must be available during entire LogDynamicBuffer lifetime.
43
- //
44
- // An instance of this class is created dynamically by Log.
45
- class LogDynamicBuffer {
46
- public:
47
- LogDynamicBuffer(
48
- int block_size, int max_size, const char* seal, int seal_size);
49
-
50
- ~LogDynamicBuffer();
51
-
52
- // Reads contents of the buffer starting from 'from_pos'. Upon
53
- // return, 'dest_buf' is filled with the data. Actual amount of data
54
- // filled is returned, it is <= 'buf_size'.
55
- int Read(int from_pos, char* dest_buf, int buf_size);
56
-
57
- // Writes 'data' to the buffer, making it larger if necessary. If
58
- // data is too big to fit in the buffer, it doesn't get written at
59
- // all. In that case, buffer auto-seals itself and stops to accept
60
- // any incoming writes. Returns amount of data written (it is either
61
- // 'data_size', or 0, if 'data' is too big).
62
- int Write(const char* data, int data_size);
63
-
64
- private:
65
- void AllocateBlock(int index) {
66
- blocks_[index] = NewArray<char>(block_size_);
67
- }
68
-
69
- int BlockIndex(int pos) const { return pos / block_size_; }
70
-
71
- int BlocksCount() const { return BlockIndex(max_size_) + 1; }
72
-
73
- int PosInBlock(int pos) const { return pos % block_size_; }
74
-
75
- int Seal();
76
-
77
- int WriteInternal(const char* data, int data_size);
78
-
79
- const int block_size_;
80
- const int max_size_;
81
- const char* seal_;
82
- const int seal_size_;
83
- ScopedVector<char*> blocks_;
84
- int write_pos_;
85
- int block_index_;
86
- int block_write_pos_;
87
- bool is_sealed_;
88
- };
89
-
90
-
91
- // Functions and data for performing output of log messages.
92
- class Log : public AllStatic {
93
- public:
94
- // Opens stdout for logging.
95
- static void OpenStdout();
96
-
97
- // Opens file for logging.
98
- static void OpenFile(const char* name);
99
-
100
- // Opens memory buffer for logging.
101
- static void OpenMemoryBuffer();
102
-
103
- // Disables logging, but preserves acquired resources.
104
- static void stop() { is_stopped_ = true; }
105
-
106
- // Frees all resources acquired in Open... functions.
107
- static void Close();
108
-
109
- // See description in include/v8.h.
110
- static int GetLogLines(int from_pos, char* dest_buf, int max_size);
111
-
112
- // Returns whether logging is enabled.
113
- static bool IsEnabled() {
114
- return !is_stopped_ && (output_handle_ != NULL || output_buffer_ != NULL);
115
- }
116
-
117
- // Size of buffer used for formatting log messages.
118
- static const int kMessageBufferSize = v8::V8::kMinimumSizeForLogLinesBuffer;
119
-
120
- private:
121
- typedef int (*WritePtr)(const char* msg, int length);
122
-
123
- // Initialization function called from Open... functions.
124
- static void Init();
125
-
126
- // Write functions assume that mutex_ is acquired by the caller.
127
- static WritePtr Write;
128
-
129
- // Implementation of writing to a log file.
130
- static int WriteToFile(const char* msg, int length) {
131
- ASSERT(output_handle_ != NULL);
132
- size_t rv = fwrite(msg, 1, length, output_handle_);
133
- ASSERT(static_cast<size_t>(length) == rv);
134
- USE(rv);
135
- return length;
136
- }
137
-
138
- // Implementation of writing to a memory buffer.
139
- static int WriteToMemory(const char* msg, int length) {
140
- ASSERT(output_buffer_ != NULL);
141
- return output_buffer_->Write(msg, length);
142
- }
143
-
144
- // Whether logging is stopped (e.g. due to insufficient resources).
145
- static bool is_stopped_;
146
-
147
- // When logging is active, either output_handle_ or output_buffer_ is used
148
- // to store a pointer to log destination. If logging was opened via OpenStdout
149
- // or OpenFile, then output_handle_ is used. If logging was opened
150
- // via OpenMemoryBuffer, then output_buffer_ is used.
151
- // mutex_ should be acquired before using output_handle_ or output_buffer_.
152
- static FILE* output_handle_;
153
-
154
- static LogDynamicBuffer* output_buffer_;
155
-
156
- // Size of dynamic buffer block (and dynamic buffer initial size).
157
- static const int kDynamicBufferBlockSize = 65536;
158
-
159
- // Maximum size of dynamic buffer.
160
- static const int kMaxDynamicBufferSize = 50 * 1024 * 1024;
161
-
162
- // Message to "seal" dynamic buffer with.
163
- static const char* kDynamicBufferSeal;
164
-
165
- // mutex_ is a Mutex used for enforcing exclusive
166
- // access to the formatting buffer and the log file or log memory buffer.
167
- static Mutex* mutex_;
168
-
169
- // Buffer used for formatting log messages. This is a singleton buffer and
170
- // mutex_ should be acquired before using it.
171
- static char* message_buffer_;
172
-
173
- friend class LogMessageBuilder;
174
- friend class LogRecordCompressor;
175
- };
176
-
177
-
178
- // An utility class for performing backward reference compression
179
- // of string ends. It operates using a window of previous strings.
180
- class LogRecordCompressor {
181
- public:
182
- // 'window_size' is the size of backward lookup window.
183
- explicit LogRecordCompressor(int window_size)
184
- : buffer_(window_size + kNoCompressionWindowSize),
185
- kMaxBackwardReferenceSize(
186
- GetBackwardReferenceSize(window_size, Log::kMessageBufferSize)),
187
- curr_(-1), prev_(-1) {
188
- }
189
-
190
- ~LogRecordCompressor();
191
-
192
- // Fills vector with a compressed version of the previous record.
193
- // Returns false if there is no previous record.
194
- bool RetrievePreviousCompressed(Vector<char>* prev_record);
195
-
196
- // Stores a record if it differs from a previous one (or there's no previous).
197
- // Returns true, if the record has been stored.
198
- bool Store(const Vector<const char>& record);
199
-
200
- private:
201
- // The minimum size of a buffer: a place needed for the current and
202
- // the previous record. Since there is no place for precedessors of a previous
203
- // record, it can't be compressed at all.
204
- static const int kNoCompressionWindowSize = 2;
205
-
206
- // Formatting strings for back references.
207
- static const char* kLineBackwardReferenceFormat;
208
- static const char* kBackwardReferenceFormat;
209
-
210
- static int GetBackwardReferenceSize(int distance, int pos);
211
-
212
- static void PrintBackwardReference(Vector<char> dest, int distance, int pos);
213
-
214
- ScopedVector< Vector<const char> > buffer_;
215
- const int kMaxBackwardReferenceSize;
216
- int curr_;
217
- int prev_;
218
- };
219
-
220
-
221
- // Utility class for formatting log messages. It fills the message into the
222
- // static buffer in Log.
223
- class LogMessageBuilder BASE_EMBEDDED {
224
- public:
225
- // Create a message builder starting from position 0. This acquires the mutex
226
- // in the log as well.
227
- explicit LogMessageBuilder();
228
- ~LogMessageBuilder() { }
229
-
230
- // Append string data to the log message.
231
- void Append(const char* format, ...);
232
-
233
- // Append string data to the log message.
234
- void AppendVA(const char* format, va_list args);
235
-
236
- // Append a character to the log message.
237
- void Append(const char c);
238
-
239
- // Append a heap string.
240
- void Append(String* str);
241
-
242
- // Appends an address, compressing it if needed by offsetting
243
- // from Logger::last_address_.
244
- void AppendAddress(Address addr);
245
-
246
- // Appends an address, compressing it if needed.
247
- void AppendAddress(Address addr, Address bias);
248
-
249
- void AppendDetailed(String* str, bool show_impl_info);
250
-
251
- // Append a portion of a string.
252
- void AppendStringPart(const char* str, int len);
253
-
254
- // Stores log message into compressor, returns true if the message
255
- // was stored (i.e. doesn't repeat the previous one).
256
- bool StoreInCompressor(LogRecordCompressor* compressor);
257
-
258
- // Sets log message to a previous version of compressed message.
259
- // Returns false, if there is no previous message.
260
- bool RetrieveCompressedPrevious(LogRecordCompressor* compressor) {
261
- return RetrieveCompressedPrevious(compressor, "");
262
- }
263
-
264
- // Does the same at the version without arguments, and sets a prefix.
265
- bool RetrieveCompressedPrevious(LogRecordCompressor* compressor,
266
- const char* prefix);
267
-
268
- // Write the log message to the log file currently opened.
269
- void WriteToLogFile();
270
-
271
- // A handler that is called when Log::Write fails.
272
- typedef void (*WriteFailureHandler)();
273
-
274
- static void set_write_failure_handler(WriteFailureHandler handler) {
275
- write_failure_handler = handler;
276
- }
277
-
278
- private:
279
- static WriteFailureHandler write_failure_handler;
280
-
281
- ScopedLock sl;
282
- int pos_;
283
- };
284
-
285
- #endif // ENABLE_LOGGING_AND_PROFILING
286
-
287
- } } // namespace v8::internal
288
-
289
- #endif // V8_LOG_UTILS_H_
@@ -1,1561 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #include <stdarg.h>
29
-
30
- #include "v8.h"
31
-
32
- #include "bootstrapper.h"
33
- #include "global-handles.h"
34
- #include "log.h"
35
- #include "macro-assembler.h"
36
- #include "serialize.h"
37
- #include "string-stream.h"
38
-
39
- namespace v8 {
40
- namespace internal {
41
-
42
- #ifdef ENABLE_LOGGING_AND_PROFILING
43
-
44
- //
45
- // Sliding state window. Updates counters to keep track of the last
46
- // window of kBufferSize states. This is useful to track where we
47
- // spent our time.
48
- //
49
- class SlidingStateWindow {
50
- public:
51
- SlidingStateWindow();
52
- ~SlidingStateWindow();
53
- void AddState(StateTag state);
54
-
55
- private:
56
- static const int kBufferSize = 256;
57
- int current_index_;
58
- bool is_full_;
59
- byte buffer_[kBufferSize];
60
-
61
-
62
- void IncrementStateCounter(StateTag state) {
63
- Counters::state_counters[state].Increment();
64
- }
65
-
66
-
67
- void DecrementStateCounter(StateTag state) {
68
- Counters::state_counters[state].Decrement();
69
- }
70
- };
71
-
72
-
73
- //
74
- // The Profiler samples pc and sp values for the main thread.
75
- // Each sample is appended to a circular buffer.
76
- // An independent thread removes data and writes it to the log.
77
- // This design minimizes the time spent in the sampler.
78
- //
79
- class Profiler: public Thread {
80
- public:
81
- Profiler();
82
- void Engage();
83
- void Disengage();
84
-
85
- // Inserts collected profiling data into buffer.
86
- void Insert(TickSample* sample) {
87
- if (paused_)
88
- return;
89
-
90
- if (Succ(head_) == tail_) {
91
- overflow_ = true;
92
- } else {
93
- buffer_[head_] = *sample;
94
- head_ = Succ(head_);
95
- buffer_semaphore_->Signal(); // Tell we have an element.
96
- }
97
- }
98
-
99
- // Waits for a signal and removes profiling data.
100
- bool Remove(TickSample* sample) {
101
- buffer_semaphore_->Wait(); // Wait for an element.
102
- *sample = buffer_[tail_];
103
- bool result = overflow_;
104
- tail_ = Succ(tail_);
105
- overflow_ = false;
106
- return result;
107
- }
108
-
109
- void Run();
110
-
111
- // Pause and Resume TickSample data collection.
112
- static bool paused() { return paused_; }
113
- static void pause() { paused_ = true; }
114
- static void resume() { paused_ = false; }
115
-
116
- private:
117
- // Returns the next index in the cyclic buffer.
118
- int Succ(int index) { return (index + 1) % kBufferSize; }
119
-
120
- // Cyclic buffer for communicating profiling samples
121
- // between the signal handler and the worker thread.
122
- static const int kBufferSize = 128;
123
- TickSample buffer_[kBufferSize]; // Buffer storage.
124
- int head_; // Index to the buffer head.
125
- int tail_; // Index to the buffer tail.
126
- bool overflow_; // Tell whether a buffer overflow has occurred.
127
- Semaphore* buffer_semaphore_; // Sempahore used for buffer synchronization.
128
-
129
- // Tells whether profiler is engaged, that is, processing thread is stated.
130
- bool engaged_;
131
-
132
- // Tells whether worker thread should continue running.
133
- bool running_;
134
-
135
- // Tells whether we are currently recording tick samples.
136
- static bool paused_;
137
- };
138
-
139
- bool Profiler::paused_ = false;
140
-
141
-
142
- //
143
- // StackTracer implementation
144
- //
145
- void StackTracer::Trace(TickSample* sample) {
146
- sample->function = NULL;
147
- sample->frames_count = 0;
148
-
149
- if (sample->state == GC) return;
150
-
151
- const Address js_entry_sp = Top::js_entry_sp(Top::GetCurrentThread());
152
- if (js_entry_sp == 0) {
153
- // Not executing JS now.
154
- return;
155
- }
156
-
157
- const Address functionAddr =
158
- sample->fp + JavaScriptFrameConstants::kFunctionOffset;
159
- if (SafeStackFrameIterator::IsWithinBounds(sample->sp, js_entry_sp,
160
- functionAddr)) {
161
- sample->function = Memory::Address_at(functionAddr) - kHeapObjectTag;
162
- }
163
-
164
- int i = 0;
165
- const Address callback = VMState::external_callback();
166
- if (callback != NULL) {
167
- sample->stack[i++] = callback;
168
- }
169
-
170
- SafeStackTraceFrameIterator it(sample->fp, sample->sp,
171
- sample->sp, js_entry_sp);
172
- while (!it.done() && i < TickSample::kMaxFramesCount) {
173
- sample->stack[i++] = reinterpret_cast<Address>(it.frame()->function());
174
- it.Advance();
175
- }
176
- sample->frames_count = i;
177
- }
178
-
179
-
180
- //
181
- // Ticker used to provide ticks to the profiler and the sliding state
182
- // window.
183
- //
184
- class Ticker: public Sampler {
185
- public:
186
- explicit Ticker(int interval):
187
- Sampler(interval, FLAG_prof), window_(NULL), profiler_(NULL) {}
188
-
189
- ~Ticker() { if (IsActive()) Stop(); }
190
-
191
- void SampleStack(TickSample* sample) {
192
- StackTracer::Trace(sample);
193
- }
194
-
195
- void Tick(TickSample* sample) {
196
- if (profiler_) profiler_->Insert(sample);
197
- if (window_) window_->AddState(sample->state);
198
- }
199
-
200
- void SetWindow(SlidingStateWindow* window) {
201
- window_ = window;
202
- if (!IsActive()) Start();
203
- }
204
-
205
- void ClearWindow() {
206
- window_ = NULL;
207
- if (!profiler_ && IsActive()) Stop();
208
- }
209
-
210
- void SetProfiler(Profiler* profiler) {
211
- profiler_ = profiler;
212
- if (!FLAG_prof_lazy && !IsActive()) Start();
213
- }
214
-
215
- void ClearProfiler() {
216
- profiler_ = NULL;
217
- if (!window_ && IsActive()) Stop();
218
- }
219
-
220
- private:
221
- SlidingStateWindow* window_;
222
- Profiler* profiler_;
223
- };
224
-
225
-
226
- //
227
- // SlidingStateWindow implementation.
228
- //
229
- SlidingStateWindow::SlidingStateWindow(): current_index_(0), is_full_(false) {
230
- for (int i = 0; i < kBufferSize; i++) {
231
- buffer_[i] = static_cast<byte>(OTHER);
232
- }
233
- Logger::ticker_->SetWindow(this);
234
- }
235
-
236
-
237
- SlidingStateWindow::~SlidingStateWindow() {
238
- Logger::ticker_->ClearWindow();
239
- }
240
-
241
-
242
- void SlidingStateWindow::AddState(StateTag state) {
243
- if (is_full_) {
244
- DecrementStateCounter(static_cast<StateTag>(buffer_[current_index_]));
245
- } else if (current_index_ == kBufferSize - 1) {
246
- is_full_ = true;
247
- }
248
- buffer_[current_index_] = static_cast<byte>(state);
249
- IncrementStateCounter(state);
250
- ASSERT(IsPowerOf2(kBufferSize));
251
- current_index_ = (current_index_ + 1) & (kBufferSize - 1);
252
- }
253
-
254
-
255
- //
256
- // Profiler implementation.
257
- //
258
- Profiler::Profiler()
259
- : head_(0),
260
- tail_(0),
261
- overflow_(false),
262
- buffer_semaphore_(OS::CreateSemaphore(0)),
263
- engaged_(false),
264
- running_(false) {
265
- }
266
-
267
-
268
- void Profiler::Engage() {
269
- if (engaged_) return;
270
- engaged_ = true;
271
-
272
- // TODO(mnaganov): This is actually "Chromium" mode. Flags need to be revised.
273
- // http://code.google.com/p/v8/issues/detail?id=487
274
- if (!FLAG_prof_lazy) {
275
- OS::LogSharedLibraryAddresses();
276
- }
277
-
278
- // Start thread processing the profiler buffer.
279
- running_ = true;
280
- Start();
281
-
282
- // Register to get ticks.
283
- Logger::ticker_->SetProfiler(this);
284
-
285
- Logger::ProfilerBeginEvent();
286
- Logger::LogAliases();
287
- }
288
-
289
-
290
- void Profiler::Disengage() {
291
- if (!engaged_) return;
292
-
293
- // Stop receiving ticks.
294
- Logger::ticker_->ClearProfiler();
295
-
296
- // Terminate the worker thread by setting running_ to false,
297
- // inserting a fake element in the queue and then wait for
298
- // the thread to terminate.
299
- running_ = false;
300
- TickSample sample;
301
- // Reset 'paused_' flag, otherwise semaphore may not be signalled.
302
- resume();
303
- Insert(&sample);
304
- Join();
305
-
306
- LOG(UncheckedStringEvent("profiler", "end"));
307
- }
308
-
309
-
310
- void Profiler::Run() {
311
- TickSample sample;
312
- bool overflow = Remove(&sample);
313
- while (running_) {
314
- LOG(TickEvent(&sample, overflow));
315
- overflow = Remove(&sample);
316
- }
317
- }
318
-
319
-
320
- //
321
- // Logger class implementation.
322
- //
323
- Ticker* Logger::ticker_ = NULL;
324
- Profiler* Logger::profiler_ = NULL;
325
- SlidingStateWindow* Logger::sliding_state_window_ = NULL;
326
- const char** Logger::log_events_ = NULL;
327
- CompressionHelper* Logger::compression_helper_ = NULL;
328
- int Logger::logging_nesting_ = 0;
329
- int Logger::cpu_profiler_nesting_ = 0;
330
- int Logger::heap_profiler_nesting_ = 0;
331
-
332
- #define DECLARE_LONG_EVENT(ignore1, long_name, ignore2) long_name,
333
- const char* kLongLogEventsNames[Logger::NUMBER_OF_LOG_EVENTS] = {
334
- LOG_EVENTS_AND_TAGS_LIST(DECLARE_LONG_EVENT)
335
- };
336
- #undef DECLARE_LONG_EVENT
337
-
338
- #define DECLARE_SHORT_EVENT(ignore1, ignore2, short_name) short_name,
339
- const char* kCompressedLogEventsNames[Logger::NUMBER_OF_LOG_EVENTS] = {
340
- LOG_EVENTS_AND_TAGS_LIST(DECLARE_SHORT_EVENT)
341
- };
342
- #undef DECLARE_SHORT_EVENT
343
-
344
-
345
- void Logger::ProfilerBeginEvent() {
346
- if (!Log::IsEnabled()) return;
347
- LogMessageBuilder msg;
348
- msg.Append("profiler,\"begin\",%d\n", kSamplingIntervalMs);
349
- if (FLAG_compress_log) {
350
- msg.Append("profiler,\"compression\",%d\n", kCompressionWindowSize);
351
- }
352
- msg.WriteToLogFile();
353
- }
354
-
355
-
356
- void Logger::LogAliases() {
357
- if (!Log::IsEnabled() || !FLAG_compress_log) return;
358
- LogMessageBuilder msg;
359
- for (int i = 0; i < NUMBER_OF_LOG_EVENTS; ++i) {
360
- msg.Append("alias,%s,%s\n",
361
- kCompressedLogEventsNames[i], kLongLogEventsNames[i]);
362
- }
363
- msg.WriteToLogFile();
364
- }
365
-
366
- #endif // ENABLE_LOGGING_AND_PROFILING
367
-
368
-
369
- void Logger::StringEvent(const char* name, const char* value) {
370
- #ifdef ENABLE_LOGGING_AND_PROFILING
371
- if (FLAG_log) UncheckedStringEvent(name, value);
372
- #endif
373
- }
374
-
375
-
376
- #ifdef ENABLE_LOGGING_AND_PROFILING
377
- void Logger::UncheckedStringEvent(const char* name, const char* value) {
378
- if (!Log::IsEnabled()) return;
379
- LogMessageBuilder msg;
380
- msg.Append("%s,\"%s\"\n", name, value);
381
- msg.WriteToLogFile();
382
- }
383
- #endif
384
-
385
-
386
- void Logger::IntEvent(const char* name, int value) {
387
- #ifdef ENABLE_LOGGING_AND_PROFILING
388
- if (FLAG_log) UncheckedIntEvent(name, value);
389
- #endif
390
- }
391
-
392
-
393
- #ifdef ENABLE_LOGGING_AND_PROFILING
394
- void Logger::UncheckedIntEvent(const char* name, int value) {
395
- if (!Log::IsEnabled()) return;
396
- LogMessageBuilder msg;
397
- msg.Append("%s,%d\n", name, value);
398
- msg.WriteToLogFile();
399
- }
400
- #endif
401
-
402
-
403
- void Logger::HandleEvent(const char* name, Object** location) {
404
- #ifdef ENABLE_LOGGING_AND_PROFILING
405
- if (!Log::IsEnabled() || !FLAG_log_handles) return;
406
- LogMessageBuilder msg;
407
- msg.Append("%s,0x%" V8PRIxPTR "\n", name, location);
408
- msg.WriteToLogFile();
409
- #endif
410
- }
411
-
412
-
413
- #ifdef ENABLE_LOGGING_AND_PROFILING
414
- // ApiEvent is private so all the calls come from the Logger class. It is the
415
- // caller's responsibility to ensure that log is enabled and that
416
- // FLAG_log_api is true.
417
- void Logger::ApiEvent(const char* format, ...) {
418
- ASSERT(Log::IsEnabled() && FLAG_log_api);
419
- LogMessageBuilder msg;
420
- va_list ap;
421
- va_start(ap, format);
422
- msg.AppendVA(format, ap);
423
- va_end(ap);
424
- msg.WriteToLogFile();
425
- }
426
- #endif
427
-
428
-
429
- void Logger::ApiNamedSecurityCheck(Object* key) {
430
- #ifdef ENABLE_LOGGING_AND_PROFILING
431
- if (!Log::IsEnabled() || !FLAG_log_api) return;
432
- if (key->IsString()) {
433
- SmartPointer<char> str =
434
- String::cast(key)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
435
- ApiEvent("api,check-security,\"%s\"\n", *str);
436
- } else if (key->IsUndefined()) {
437
- ApiEvent("api,check-security,undefined\n");
438
- } else {
439
- ApiEvent("api,check-security,['no-name']\n");
440
- }
441
- #endif
442
- }
443
-
444
-
445
- void Logger::SharedLibraryEvent(const char* library_path,
446
- uintptr_t start,
447
- uintptr_t end) {
448
- #ifdef ENABLE_LOGGING_AND_PROFILING
449
- if (!Log::IsEnabled() || !FLAG_prof) return;
450
- LogMessageBuilder msg;
451
- msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n",
452
- library_path,
453
- start,
454
- end);
455
- msg.WriteToLogFile();
456
- #endif
457
- }
458
-
459
-
460
- void Logger::SharedLibraryEvent(const wchar_t* library_path,
461
- uintptr_t start,
462
- uintptr_t end) {
463
- #ifdef ENABLE_LOGGING_AND_PROFILING
464
- if (!Log::IsEnabled() || !FLAG_prof) return;
465
- LogMessageBuilder msg;
466
- msg.Append("shared-library,\"%ls\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR "\n",
467
- library_path,
468
- start,
469
- end);
470
- msg.WriteToLogFile();
471
- #endif
472
- }
473
-
474
-
475
- #ifdef ENABLE_LOGGING_AND_PROFILING
476
- void Logger::LogRegExpSource(Handle<JSRegExp> regexp) {
477
- // Prints "/" + re.source + "/" +
478
- // (re.global?"g":"") + (re.ignorecase?"i":"") + (re.multiline?"m":"")
479
- LogMessageBuilder msg;
480
-
481
- Handle<Object> source = GetProperty(regexp, "source");
482
- if (!source->IsString()) {
483
- msg.Append("no source");
484
- return;
485
- }
486
-
487
- switch (regexp->TypeTag()) {
488
- case JSRegExp::ATOM:
489
- msg.Append('a');
490
- break;
491
- default:
492
- break;
493
- }
494
- msg.Append('/');
495
- msg.AppendDetailed(*Handle<String>::cast(source), false);
496
- msg.Append('/');
497
-
498
- // global flag
499
- Handle<Object> global = GetProperty(regexp, "global");
500
- if (global->IsTrue()) {
501
- msg.Append('g');
502
- }
503
- // ignorecase flag
504
- Handle<Object> ignorecase = GetProperty(regexp, "ignoreCase");
505
- if (ignorecase->IsTrue()) {
506
- msg.Append('i');
507
- }
508
- // multiline flag
509
- Handle<Object> multiline = GetProperty(regexp, "multiline");
510
- if (multiline->IsTrue()) {
511
- msg.Append('m');
512
- }
513
-
514
- msg.WriteToLogFile();
515
- }
516
- #endif // ENABLE_LOGGING_AND_PROFILING
517
-
518
-
519
- void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) {
520
- #ifdef ENABLE_LOGGING_AND_PROFILING
521
- if (!Log::IsEnabled() || !FLAG_log_regexp) return;
522
- LogMessageBuilder msg;
523
- msg.Append("regexp-compile,");
524
- LogRegExpSource(regexp);
525
- msg.Append(in_cache ? ",hit\n" : ",miss\n");
526
- msg.WriteToLogFile();
527
- #endif
528
- }
529
-
530
-
531
- void Logger::LogRuntime(Vector<const char> format, JSArray* args) {
532
- #ifdef ENABLE_LOGGING_AND_PROFILING
533
- if (!Log::IsEnabled() || !FLAG_log_runtime) return;
534
- HandleScope scope;
535
- LogMessageBuilder msg;
536
- for (int i = 0; i < format.length(); i++) {
537
- char c = format[i];
538
- if (c == '%' && i <= format.length() - 2) {
539
- i++;
540
- ASSERT('0' <= format[i] && format[i] <= '9');
541
- Object* obj = args->GetElement(format[i] - '0');
542
- i++;
543
- switch (format[i]) {
544
- case 's':
545
- msg.AppendDetailed(String::cast(obj), false);
546
- break;
547
- case 'S':
548
- msg.AppendDetailed(String::cast(obj), true);
549
- break;
550
- case 'r':
551
- Logger::LogRegExpSource(Handle<JSRegExp>(JSRegExp::cast(obj)));
552
- break;
553
- case 'x':
554
- msg.Append("0x%x", Smi::cast(obj)->value());
555
- break;
556
- case 'i':
557
- msg.Append("%i", Smi::cast(obj)->value());
558
- break;
559
- default:
560
- UNREACHABLE();
561
- }
562
- } else {
563
- msg.Append(c);
564
- }
565
- }
566
- msg.Append('\n');
567
- msg.WriteToLogFile();
568
- #endif
569
- }
570
-
571
-
572
- void Logger::ApiIndexedSecurityCheck(uint32_t index) {
573
- #ifdef ENABLE_LOGGING_AND_PROFILING
574
- if (!Log::IsEnabled() || !FLAG_log_api) return;
575
- ApiEvent("api,check-security,%u\n", index);
576
- #endif
577
- }
578
-
579
-
580
- void Logger::ApiNamedPropertyAccess(const char* tag,
581
- JSObject* holder,
582
- Object* name) {
583
- #ifdef ENABLE_LOGGING_AND_PROFILING
584
- ASSERT(name->IsString());
585
- if (!Log::IsEnabled() || !FLAG_log_api) return;
586
- String* class_name_obj = holder->class_name();
587
- SmartPointer<char> class_name =
588
- class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
589
- SmartPointer<char> property_name =
590
- String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
591
- Logger::ApiEvent("api,%s,\"%s\",\"%s\"\n", tag, *class_name, *property_name);
592
- #endif
593
- }
594
-
595
- void Logger::ApiIndexedPropertyAccess(const char* tag,
596
- JSObject* holder,
597
- uint32_t index) {
598
- #ifdef ENABLE_LOGGING_AND_PROFILING
599
- if (!Log::IsEnabled() || !FLAG_log_api) return;
600
- String* class_name_obj = holder->class_name();
601
- SmartPointer<char> class_name =
602
- class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
603
- Logger::ApiEvent("api,%s,\"%s\",%u\n", tag, *class_name, index);
604
- #endif
605
- }
606
-
607
- void Logger::ApiObjectAccess(const char* tag, JSObject* object) {
608
- #ifdef ENABLE_LOGGING_AND_PROFILING
609
- if (!Log::IsEnabled() || !FLAG_log_api) return;
610
- String* class_name_obj = object->class_name();
611
- SmartPointer<char> class_name =
612
- class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
613
- Logger::ApiEvent("api,%s,\"%s\"\n", tag, *class_name);
614
- #endif
615
- }
616
-
617
-
618
- void Logger::ApiEntryCall(const char* name) {
619
- #ifdef ENABLE_LOGGING_AND_PROFILING
620
- if (!Log::IsEnabled() || !FLAG_log_api) return;
621
- Logger::ApiEvent("api,%s\n", name);
622
- #endif
623
- }
624
-
625
-
626
- void Logger::NewEvent(const char* name, void* object, size_t size) {
627
- #ifdef ENABLE_LOGGING_AND_PROFILING
628
- if (!Log::IsEnabled() || !FLAG_log) return;
629
- LogMessageBuilder msg;
630
- msg.Append("new,%s,0x%" V8PRIxPTR ",%u\n", name, object,
631
- static_cast<unsigned int>(size));
632
- msg.WriteToLogFile();
633
- #endif
634
- }
635
-
636
-
637
- void Logger::DeleteEvent(const char* name, void* object) {
638
- #ifdef ENABLE_LOGGING_AND_PROFILING
639
- if (!Log::IsEnabled() || !FLAG_log) return;
640
- LogMessageBuilder msg;
641
- msg.Append("delete,%s,0x%" V8PRIxPTR "\n", name, object);
642
- msg.WriteToLogFile();
643
- #endif
644
- }
645
-
646
-
647
- #ifdef ENABLE_LOGGING_AND_PROFILING
648
-
649
- // A class that contains all common code dealing with record compression.
650
- class CompressionHelper {
651
- public:
652
- explicit CompressionHelper(int window_size)
653
- : compressor_(window_size), repeat_count_(0) { }
654
-
655
- // Handles storing message in compressor, retrieving the previous one and
656
- // prefixing it with repeat count, if needed.
657
- // Returns true if message needs to be written to log.
658
- bool HandleMessage(LogMessageBuilder* msg) {
659
- if (!msg->StoreInCompressor(&compressor_)) {
660
- // Current message repeats the previous one, don't write it.
661
- ++repeat_count_;
662
- return false;
663
- }
664
- if (repeat_count_ == 0) {
665
- return msg->RetrieveCompressedPrevious(&compressor_);
666
- }
667
- OS::SNPrintF(prefix_, "%s,%d,",
668
- Logger::log_events_[Logger::REPEAT_META_EVENT],
669
- repeat_count_ + 1);
670
- repeat_count_ = 0;
671
- return msg->RetrieveCompressedPrevious(&compressor_, prefix_.start());
672
- }
673
-
674
- private:
675
- LogRecordCompressor compressor_;
676
- int repeat_count_;
677
- EmbeddedVector<char, 20> prefix_;
678
- };
679
-
680
- #endif // ENABLE_LOGGING_AND_PROFILING
681
-
682
-
683
- #ifdef ENABLE_LOGGING_AND_PROFILING
684
- void Logger::CallbackEventInternal(const char* prefix, const char* name,
685
- Address entry_point) {
686
- if (!Log::IsEnabled() || !FLAG_log_code) return;
687
- LogMessageBuilder msg;
688
- msg.Append("%s,%s,",
689
- log_events_[CODE_CREATION_EVENT], log_events_[CALLBACK_TAG]);
690
- msg.AppendAddress(entry_point);
691
- msg.Append(",1,\"%s%s\"", prefix, name);
692
- if (FLAG_compress_log) {
693
- ASSERT(compression_helper_ != NULL);
694
- if (!compression_helper_->HandleMessage(&msg)) return;
695
- }
696
- msg.Append('\n');
697
- msg.WriteToLogFile();
698
- }
699
- #endif
700
-
701
-
702
- void Logger::CallbackEvent(String* name, Address entry_point) {
703
- #ifdef ENABLE_LOGGING_AND_PROFILING
704
- if (!Log::IsEnabled() || !FLAG_log_code) return;
705
- SmartPointer<char> str =
706
- name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
707
- CallbackEventInternal("", *str, entry_point);
708
- #endif
709
- }
710
-
711
-
712
- void Logger::GetterCallbackEvent(String* name, Address entry_point) {
713
- #ifdef ENABLE_LOGGING_AND_PROFILING
714
- if (!Log::IsEnabled() || !FLAG_log_code) return;
715
- SmartPointer<char> str =
716
- name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
717
- CallbackEventInternal("get ", *str, entry_point);
718
- #endif
719
- }
720
-
721
-
722
- void Logger::SetterCallbackEvent(String* name, Address entry_point) {
723
- #ifdef ENABLE_LOGGING_AND_PROFILING
724
- if (!Log::IsEnabled() || !FLAG_log_code) return;
725
- SmartPointer<char> str =
726
- name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
727
- CallbackEventInternal("set ", *str, entry_point);
728
- #endif
729
- }
730
-
731
-
732
- void Logger::CodeCreateEvent(LogEventsAndTags tag,
733
- Code* code,
734
- const char* comment) {
735
- #ifdef ENABLE_LOGGING_AND_PROFILING
736
- if (!Log::IsEnabled() || !FLAG_log_code) return;
737
- LogMessageBuilder msg;
738
- msg.Append("%s,%s,", log_events_[CODE_CREATION_EVENT], log_events_[tag]);
739
- msg.AppendAddress(code->address());
740
- msg.Append(",%d,\"", code->ExecutableSize());
741
- for (const char* p = comment; *p != '\0'; p++) {
742
- if (*p == '"') {
743
- msg.Append('\\');
744
- }
745
- msg.Append(*p);
746
- }
747
- msg.Append('"');
748
- if (FLAG_compress_log) {
749
- ASSERT(compression_helper_ != NULL);
750
- if (!compression_helper_->HandleMessage(&msg)) return;
751
- }
752
- msg.Append('\n');
753
- msg.WriteToLogFile();
754
- #endif
755
- }
756
-
757
-
758
- void Logger::CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name) {
759
- #ifdef ENABLE_LOGGING_AND_PROFILING
760
- if (!Log::IsEnabled() || !FLAG_log_code) return;
761
- LogMessageBuilder msg;
762
- SmartPointer<char> str =
763
- name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
764
- msg.Append("%s,%s,", log_events_[CODE_CREATION_EVENT], log_events_[tag]);
765
- msg.AppendAddress(code->address());
766
- msg.Append(",%d,\"%s\"", code->ExecutableSize(), *str);
767
- if (FLAG_compress_log) {
768
- ASSERT(compression_helper_ != NULL);
769
- if (!compression_helper_->HandleMessage(&msg)) return;
770
- }
771
- msg.Append('\n');
772
- msg.WriteToLogFile();
773
- #endif
774
- }
775
-
776
-
777
- void Logger::CodeCreateEvent(LogEventsAndTags tag,
778
- Code* code, String* name,
779
- String* source, int line) {
780
- #ifdef ENABLE_LOGGING_AND_PROFILING
781
- if (!Log::IsEnabled() || !FLAG_log_code) return;
782
- LogMessageBuilder msg;
783
- SmartPointer<char> str =
784
- name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
785
- SmartPointer<char> sourcestr =
786
- source->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
787
- msg.Append("%s,%s,", log_events_[CODE_CREATION_EVENT], log_events_[tag]);
788
- msg.AppendAddress(code->address());
789
- msg.Append(",%d,\"%s %s:%d\"",
790
- code->ExecutableSize(), *str, *sourcestr, line);
791
- if (FLAG_compress_log) {
792
- ASSERT(compression_helper_ != NULL);
793
- if (!compression_helper_->HandleMessage(&msg)) return;
794
- }
795
- msg.Append('\n');
796
- msg.WriteToLogFile();
797
- #endif
798
- }
799
-
800
-
801
- void Logger::CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count) {
802
- #ifdef ENABLE_LOGGING_AND_PROFILING
803
- if (!Log::IsEnabled() || !FLAG_log_code) return;
804
- LogMessageBuilder msg;
805
- msg.Append("%s,%s,", log_events_[CODE_CREATION_EVENT], log_events_[tag]);
806
- msg.AppendAddress(code->address());
807
- msg.Append(",%d,\"args_count: %d\"", code->ExecutableSize(), args_count);
808
- if (FLAG_compress_log) {
809
- ASSERT(compression_helper_ != NULL);
810
- if (!compression_helper_->HandleMessage(&msg)) return;
811
- }
812
- msg.Append('\n');
813
- msg.WriteToLogFile();
814
- #endif
815
- }
816
-
817
-
818
- void Logger::RegExpCodeCreateEvent(Code* code, String* source) {
819
- #ifdef ENABLE_LOGGING_AND_PROFILING
820
- if (!Log::IsEnabled() || !FLAG_log_code) return;
821
- LogMessageBuilder msg;
822
- msg.Append("%s,%s,",
823
- log_events_[CODE_CREATION_EVENT], log_events_[REG_EXP_TAG]);
824
- msg.AppendAddress(code->address());
825
- msg.Append(",%d,\"", code->ExecutableSize());
826
- msg.AppendDetailed(source, false);
827
- msg.Append('\"');
828
- if (FLAG_compress_log) {
829
- ASSERT(compression_helper_ != NULL);
830
- if (!compression_helper_->HandleMessage(&msg)) return;
831
- }
832
- msg.Append('\n');
833
- msg.WriteToLogFile();
834
- #endif
835
- }
836
-
837
-
838
- void Logger::CodeMoveEvent(Address from, Address to) {
839
- #ifdef ENABLE_LOGGING_AND_PROFILING
840
- MoveEventInternal(CODE_MOVE_EVENT, from, to);
841
- #endif
842
- }
843
-
844
-
845
- void Logger::CodeDeleteEvent(Address from) {
846
- #ifdef ENABLE_LOGGING_AND_PROFILING
847
- DeleteEventInternal(CODE_DELETE_EVENT, from);
848
- #endif
849
- }
850
-
851
-
852
- void Logger::SnapshotPositionEvent(Address addr, int pos) {
853
- #ifdef ENABLE_LOGGING_AND_PROFILING
854
- if (!Log::IsEnabled() || !FLAG_log_snapshot_positions) return;
855
- LogMessageBuilder msg;
856
- msg.Append("%s,", log_events_[SNAPSHOT_POSITION_EVENT]);
857
- msg.AppendAddress(addr);
858
- msg.Append(",%d", pos);
859
- if (FLAG_compress_log) {
860
- ASSERT(compression_helper_ != NULL);
861
- if (!compression_helper_->HandleMessage(&msg)) return;
862
- }
863
- msg.Append('\n');
864
- msg.WriteToLogFile();
865
- #endif
866
- }
867
-
868
-
869
- void Logger::FunctionCreateEvent(JSFunction* function) {
870
- #ifdef ENABLE_LOGGING_AND_PROFILING
871
- static Address prev_code = NULL;
872
- if (!Log::IsEnabled() || !FLAG_log_code) return;
873
- LogMessageBuilder msg;
874
- msg.Append("%s,", log_events_[FUNCTION_CREATION_EVENT]);
875
- msg.AppendAddress(function->address());
876
- msg.Append(',');
877
- msg.AppendAddress(function->code()->address(), prev_code);
878
- prev_code = function->code()->address();
879
- if (FLAG_compress_log) {
880
- ASSERT(compression_helper_ != NULL);
881
- if (!compression_helper_->HandleMessage(&msg)) return;
882
- }
883
- msg.Append('\n');
884
- msg.WriteToLogFile();
885
- #endif
886
- }
887
-
888
-
889
- void Logger::FunctionMoveEvent(Address from, Address to) {
890
- #ifdef ENABLE_LOGGING_AND_PROFILING
891
- MoveEventInternal(FUNCTION_MOVE_EVENT, from, to);
892
- #endif
893
- }
894
-
895
-
896
- void Logger::FunctionDeleteEvent(Address from) {
897
- #ifdef ENABLE_LOGGING_AND_PROFILING
898
- DeleteEventInternal(FUNCTION_DELETE_EVENT, from);
899
- #endif
900
- }
901
-
902
-
903
- #ifdef ENABLE_LOGGING_AND_PROFILING
904
- void Logger::MoveEventInternal(LogEventsAndTags event,
905
- Address from,
906
- Address to) {
907
- static Address prev_to_ = NULL;
908
- if (!Log::IsEnabled() || !FLAG_log_code) return;
909
- LogMessageBuilder msg;
910
- msg.Append("%s,", log_events_[event]);
911
- msg.AppendAddress(from);
912
- msg.Append(',');
913
- msg.AppendAddress(to, prev_to_);
914
- prev_to_ = to;
915
- if (FLAG_compress_log) {
916
- ASSERT(compression_helper_ != NULL);
917
- if (!compression_helper_->HandleMessage(&msg)) return;
918
- }
919
- msg.Append('\n');
920
- msg.WriteToLogFile();
921
- }
922
- #endif
923
-
924
-
925
- #ifdef ENABLE_LOGGING_AND_PROFILING
926
- void Logger::DeleteEventInternal(LogEventsAndTags event, Address from) {
927
- if (!Log::IsEnabled() || !FLAG_log_code) return;
928
- LogMessageBuilder msg;
929
- msg.Append("%s,", log_events_[event]);
930
- msg.AppendAddress(from);
931
- if (FLAG_compress_log) {
932
- ASSERT(compression_helper_ != NULL);
933
- if (!compression_helper_->HandleMessage(&msg)) return;
934
- }
935
- msg.Append('\n');
936
- msg.WriteToLogFile();
937
- }
938
- #endif
939
-
940
-
941
- void Logger::ResourceEvent(const char* name, const char* tag) {
942
- #ifdef ENABLE_LOGGING_AND_PROFILING
943
- if (!Log::IsEnabled() || !FLAG_log) return;
944
- LogMessageBuilder msg;
945
- msg.Append("%s,%s,", name, tag);
946
-
947
- uint32_t sec, usec;
948
- if (OS::GetUserTime(&sec, &usec) != -1) {
949
- msg.Append("%d,%d,", sec, usec);
950
- }
951
- msg.Append("%.0f", OS::TimeCurrentMillis());
952
-
953
- msg.Append('\n');
954
- msg.WriteToLogFile();
955
- #endif
956
- }
957
-
958
-
959
- void Logger::SuspectReadEvent(String* name, Object* obj) {
960
- #ifdef ENABLE_LOGGING_AND_PROFILING
961
- if (!Log::IsEnabled() || !FLAG_log_suspect) return;
962
- LogMessageBuilder msg;
963
- String* class_name = obj->IsJSObject()
964
- ? JSObject::cast(obj)->class_name()
965
- : Heap::empty_string();
966
- msg.Append("suspect-read,");
967
- msg.Append(class_name);
968
- msg.Append(',');
969
- msg.Append('"');
970
- msg.Append(name);
971
- msg.Append('"');
972
- msg.Append('\n');
973
- msg.WriteToLogFile();
974
- #endif
975
- }
976
-
977
-
978
- void Logger::HeapSampleBeginEvent(const char* space, const char* kind) {
979
- #ifdef ENABLE_LOGGING_AND_PROFILING
980
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
981
- LogMessageBuilder msg;
982
- // Using non-relative system time in order to be able to synchronize with
983
- // external memory profiling events (e.g. DOM memory size).
984
- msg.Append("heap-sample-begin,\"%s\",\"%s\",%.0f\n",
985
- space, kind, OS::TimeCurrentMillis());
986
- msg.WriteToLogFile();
987
- #endif
988
- }
989
-
990
-
991
- void Logger::HeapSampleStats(const char* space, const char* kind,
992
- int capacity, int used) {
993
- #ifdef ENABLE_LOGGING_AND_PROFILING
994
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
995
- LogMessageBuilder msg;
996
- msg.Append("heap-sample-stats,\"%s\",\"%s\",%d,%d\n",
997
- space, kind, capacity, used);
998
- msg.WriteToLogFile();
999
- #endif
1000
- }
1001
-
1002
-
1003
- void Logger::HeapSampleEndEvent(const char* space, const char* kind) {
1004
- #ifdef ENABLE_LOGGING_AND_PROFILING
1005
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
1006
- LogMessageBuilder msg;
1007
- msg.Append("heap-sample-end,\"%s\",\"%s\"\n", space, kind);
1008
- msg.WriteToLogFile();
1009
- #endif
1010
- }
1011
-
1012
-
1013
- void Logger::HeapSampleItemEvent(const char* type, int number, int bytes) {
1014
- #ifdef ENABLE_LOGGING_AND_PROFILING
1015
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
1016
- LogMessageBuilder msg;
1017
- msg.Append("heap-sample-item,%s,%d,%d\n", type, number, bytes);
1018
- msg.WriteToLogFile();
1019
- #endif
1020
- }
1021
-
1022
-
1023
- void Logger::HeapSampleJSConstructorEvent(const char* constructor,
1024
- int number, int bytes) {
1025
- #ifdef ENABLE_LOGGING_AND_PROFILING
1026
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
1027
- LogMessageBuilder msg;
1028
- msg.Append("heap-js-cons-item,%s,%d,%d\n", constructor, number, bytes);
1029
- msg.WriteToLogFile();
1030
- #endif
1031
- }
1032
-
1033
-
1034
- void Logger::HeapSampleJSRetainersEvent(
1035
- const char* constructor, const char* event) {
1036
- #ifdef ENABLE_LOGGING_AND_PROFILING
1037
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
1038
- // Event starts with comma, so we don't have it in the format string.
1039
- static const char* event_text = "heap-js-ret-item,%s";
1040
- // We take placeholder strings into account, but it's OK to be conservative.
1041
- static const int event_text_len = StrLength(event_text);
1042
- const int cons_len = StrLength(constructor);
1043
- const int event_len = StrLength(event);
1044
- int pos = 0;
1045
- // Retainer lists can be long. We may need to split them into multiple events.
1046
- do {
1047
- LogMessageBuilder msg;
1048
- msg.Append(event_text, constructor);
1049
- int to_write = event_len - pos;
1050
- if (to_write > Log::kMessageBufferSize - (cons_len + event_text_len)) {
1051
- int cut_pos = pos + Log::kMessageBufferSize - (cons_len + event_text_len);
1052
- ASSERT(cut_pos < event_len);
1053
- while (cut_pos > pos && event[cut_pos] != ',') --cut_pos;
1054
- if (event[cut_pos] != ',') {
1055
- // Crash in debug mode, skip in release mode.
1056
- ASSERT(false);
1057
- return;
1058
- }
1059
- // Append a piece of event that fits, without trailing comma.
1060
- msg.AppendStringPart(event + pos, cut_pos - pos);
1061
- // Start next piece with comma.
1062
- pos = cut_pos;
1063
- } else {
1064
- msg.Append("%s", event + pos);
1065
- pos += event_len;
1066
- }
1067
- msg.Append('\n');
1068
- msg.WriteToLogFile();
1069
- } while (pos < event_len);
1070
- #endif
1071
- }
1072
-
1073
-
1074
- void Logger::HeapSampleJSProducerEvent(const char* constructor,
1075
- Address* stack) {
1076
- #ifdef ENABLE_LOGGING_AND_PROFILING
1077
- if (!Log::IsEnabled() || !FLAG_log_gc) return;
1078
- LogMessageBuilder msg;
1079
- msg.Append("heap-js-prod-item,%s", constructor);
1080
- while (*stack != NULL) {
1081
- msg.Append(",0x%" V8PRIxPTR, *stack++);
1082
- }
1083
- msg.Append("\n");
1084
- msg.WriteToLogFile();
1085
- #endif
1086
- }
1087
-
1088
-
1089
- void Logger::DebugTag(const char* call_site_tag) {
1090
- #ifdef ENABLE_LOGGING_AND_PROFILING
1091
- if (!Log::IsEnabled() || !FLAG_log) return;
1092
- LogMessageBuilder msg;
1093
- msg.Append("debug-tag,%s\n", call_site_tag);
1094
- msg.WriteToLogFile();
1095
- #endif
1096
- }
1097
-
1098
-
1099
- void Logger::DebugEvent(const char* event_type, Vector<uint16_t> parameter) {
1100
- #ifdef ENABLE_LOGGING_AND_PROFILING
1101
- if (!Log::IsEnabled() || !FLAG_log) return;
1102
- StringBuilder s(parameter.length() + 1);
1103
- for (int i = 0; i < parameter.length(); ++i) {
1104
- s.AddCharacter(static_cast<char>(parameter[i]));
1105
- }
1106
- char* parameter_string = s.Finalize();
1107
- LogMessageBuilder msg;
1108
- msg.Append("debug-queue-event,%s,%15.3f,%s\n",
1109
- event_type,
1110
- OS::TimeCurrentMillis(),
1111
- parameter_string);
1112
- DeleteArray(parameter_string);
1113
- msg.WriteToLogFile();
1114
- #endif
1115
- }
1116
-
1117
-
1118
- #ifdef ENABLE_LOGGING_AND_PROFILING
1119
- void Logger::TickEvent(TickSample* sample, bool overflow) {
1120
- if (!Log::IsEnabled() || !FLAG_prof) return;
1121
- static Address prev_sp = NULL;
1122
- static Address prev_function = NULL;
1123
- LogMessageBuilder msg;
1124
- msg.Append("%s,", log_events_[TICK_EVENT]);
1125
- Address prev_addr = sample->pc;
1126
- msg.AppendAddress(prev_addr);
1127
- msg.Append(',');
1128
- msg.AppendAddress(sample->sp, prev_sp);
1129
- prev_sp = sample->sp;
1130
- msg.Append(',');
1131
- msg.AppendAddress(sample->function, prev_function);
1132
- prev_function = sample->function;
1133
- msg.Append(",%d", static_cast<int>(sample->state));
1134
- if (overflow) {
1135
- msg.Append(",overflow");
1136
- }
1137
- for (int i = 0; i < sample->frames_count; ++i) {
1138
- msg.Append(',');
1139
- msg.AppendAddress(sample->stack[i], prev_addr);
1140
- prev_addr = sample->stack[i];
1141
- }
1142
- if (FLAG_compress_log) {
1143
- ASSERT(compression_helper_ != NULL);
1144
- if (!compression_helper_->HandleMessage(&msg)) return;
1145
- }
1146
- msg.Append('\n');
1147
- msg.WriteToLogFile();
1148
- }
1149
-
1150
-
1151
- int Logger::GetActiveProfilerModules() {
1152
- int result = PROFILER_MODULE_NONE;
1153
- if (profiler_ != NULL && !profiler_->paused()) {
1154
- result |= PROFILER_MODULE_CPU;
1155
- }
1156
- if (FLAG_log_gc) {
1157
- result |= PROFILER_MODULE_HEAP_STATS | PROFILER_MODULE_JS_CONSTRUCTORS;
1158
- }
1159
- return result;
1160
- }
1161
-
1162
-
1163
- void Logger::PauseProfiler(int flags, int tag) {
1164
- if (!Log::IsEnabled()) return;
1165
- if (profiler_ != NULL && (flags & PROFILER_MODULE_CPU)) {
1166
- // It is OK to have negative nesting.
1167
- if (--cpu_profiler_nesting_ == 0) {
1168
- profiler_->pause();
1169
- if (FLAG_prof_lazy) {
1170
- if (!FLAG_sliding_state_window) ticker_->Stop();
1171
- FLAG_log_code = false;
1172
- // Must be the same message as Log::kDynamicBufferSeal.
1173
- LOG(UncheckedStringEvent("profiler", "pause"));
1174
- }
1175
- --logging_nesting_;
1176
- }
1177
- }
1178
- if (flags &
1179
- (PROFILER_MODULE_HEAP_STATS | PROFILER_MODULE_JS_CONSTRUCTORS)) {
1180
- if (--heap_profiler_nesting_ == 0) {
1181
- FLAG_log_gc = false;
1182
- --logging_nesting_;
1183
- }
1184
- }
1185
- if (tag != 0) {
1186
- UncheckedIntEvent("close-tag", tag);
1187
- }
1188
- }
1189
-
1190
-
1191
- void Logger::ResumeProfiler(int flags, int tag) {
1192
- if (!Log::IsEnabled()) return;
1193
- if (tag != 0) {
1194
- UncheckedIntEvent("open-tag", tag);
1195
- }
1196
- if (profiler_ != NULL && (flags & PROFILER_MODULE_CPU)) {
1197
- if (cpu_profiler_nesting_++ == 0) {
1198
- ++logging_nesting_;
1199
- if (FLAG_prof_lazy) {
1200
- profiler_->Engage();
1201
- LOG(UncheckedStringEvent("profiler", "resume"));
1202
- FLAG_log_code = true;
1203
- LogCompiledFunctions();
1204
- LogFunctionObjects();
1205
- LogAccessorCallbacks();
1206
- if (!FLAG_sliding_state_window) ticker_->Start();
1207
- }
1208
- profiler_->resume();
1209
- }
1210
- }
1211
- if (flags &
1212
- (PROFILER_MODULE_HEAP_STATS | PROFILER_MODULE_JS_CONSTRUCTORS)) {
1213
- if (heap_profiler_nesting_++ == 0) {
1214
- ++logging_nesting_;
1215
- FLAG_log_gc = true;
1216
- }
1217
- }
1218
- }
1219
-
1220
-
1221
- // This function can be called when Log's mutex is acquired,
1222
- // either from main or Profiler's thread.
1223
- void Logger::StopLoggingAndProfiling() {
1224
- Log::stop();
1225
- PauseProfiler(PROFILER_MODULE_CPU, 0);
1226
- }
1227
-
1228
-
1229
- bool Logger::IsProfilerSamplerActive() {
1230
- return ticker_->IsActive();
1231
- }
1232
-
1233
-
1234
- int Logger::GetLogLines(int from_pos, char* dest_buf, int max_size) {
1235
- return Log::GetLogLines(from_pos, dest_buf, max_size);
1236
- }
1237
-
1238
-
1239
- static int EnumerateCompiledFunctions(Handle<SharedFunctionInfo>* sfis) {
1240
- AssertNoAllocation no_alloc;
1241
- int compiled_funcs_count = 0;
1242
- HeapIterator iterator;
1243
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1244
- if (!obj->IsSharedFunctionInfo()) continue;
1245
- SharedFunctionInfo* sfi = SharedFunctionInfo::cast(obj);
1246
- if (sfi->is_compiled()
1247
- && (!sfi->script()->IsScript()
1248
- || Script::cast(sfi->script())->HasValidSource())) {
1249
- if (sfis != NULL)
1250
- sfis[compiled_funcs_count] = Handle<SharedFunctionInfo>(sfi);
1251
- ++compiled_funcs_count;
1252
- }
1253
- }
1254
- return compiled_funcs_count;
1255
- }
1256
-
1257
-
1258
- void Logger::LogCodeObject(Object* object) {
1259
- if (FLAG_log_code) {
1260
- Code* code_object = Code::cast(object);
1261
- LogEventsAndTags tag = Logger::STUB_TAG;
1262
- const char* description = "Unknown code from the snapshot";
1263
- switch (code_object->kind()) {
1264
- case Code::FUNCTION:
1265
- return; // We log this later using LogCompiledFunctions.
1266
- case Code::BINARY_OP_IC:
1267
- // fall through
1268
- case Code::STUB:
1269
- description = CodeStub::MajorName(code_object->major_key(), true);
1270
- if (description == NULL)
1271
- description = "A stub from the snapshot";
1272
- tag = Logger::STUB_TAG;
1273
- break;
1274
- case Code::BUILTIN:
1275
- description = "A builtin from the snapshot";
1276
- tag = Logger::BUILTIN_TAG;
1277
- break;
1278
- case Code::KEYED_LOAD_IC:
1279
- description = "A keyed load IC from the snapshot";
1280
- tag = Logger::KEYED_LOAD_IC_TAG;
1281
- break;
1282
- case Code::LOAD_IC:
1283
- description = "A load IC from the snapshot";
1284
- tag = Logger::LOAD_IC_TAG;
1285
- break;
1286
- case Code::STORE_IC:
1287
- description = "A store IC from the snapshot";
1288
- tag = Logger::STORE_IC_TAG;
1289
- break;
1290
- case Code::KEYED_STORE_IC:
1291
- description = "A keyed store IC from the snapshot";
1292
- tag = Logger::KEYED_STORE_IC_TAG;
1293
- break;
1294
- case Code::CALL_IC:
1295
- description = "A call IC from the snapshot";
1296
- tag = Logger::CALL_IC_TAG;
1297
- break;
1298
- case Code::KEYED_CALL_IC:
1299
- description = "A keyed call IC from the snapshot";
1300
- tag = Logger::KEYED_CALL_IC_TAG;
1301
- break;
1302
- }
1303
- PROFILE(CodeCreateEvent(tag, code_object, description));
1304
- }
1305
- }
1306
-
1307
-
1308
- void Logger::LogCodeObjects() {
1309
- AssertNoAllocation no_alloc;
1310
- HeapIterator iterator;
1311
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1312
- if (obj->IsCode()) LogCodeObject(obj);
1313
- }
1314
- }
1315
-
1316
-
1317
- void Logger::LogCompiledFunctions() {
1318
- HandleScope scope;
1319
- const int compiled_funcs_count = EnumerateCompiledFunctions(NULL);
1320
- ScopedVector< Handle<SharedFunctionInfo> > sfis(compiled_funcs_count);
1321
- EnumerateCompiledFunctions(sfis.start());
1322
-
1323
- // During iteration, there can be heap allocation due to
1324
- // GetScriptLineNumber call.
1325
- for (int i = 0; i < compiled_funcs_count; ++i) {
1326
- Handle<SharedFunctionInfo> shared = sfis[i];
1327
- Handle<String> name(String::cast(shared->name()));
1328
- Handle<String> func_name(name->length() > 0 ?
1329
- *name : shared->inferred_name());
1330
- if (shared->script()->IsScript()) {
1331
- Handle<Script> script(Script::cast(shared->script()));
1332
- if (script->name()->IsString()) {
1333
- Handle<String> script_name(String::cast(script->name()));
1334
- int line_num = GetScriptLineNumber(script, shared->start_position());
1335
- if (line_num > 0) {
1336
- PROFILE(CodeCreateEvent(
1337
- Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
1338
- shared->code(), *func_name,
1339
- *script_name, line_num + 1));
1340
- } else {
1341
- // Can't distinguish eval and script here, so always use Script.
1342
- PROFILE(CodeCreateEvent(
1343
- Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
1344
- shared->code(), *script_name));
1345
- }
1346
- } else {
1347
- PROFILE(CodeCreateEvent(
1348
- Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
1349
- shared->code(), *func_name));
1350
- }
1351
- } else if (shared->IsApiFunction()) {
1352
- // API function.
1353
- FunctionTemplateInfo* fun_data = shared->get_api_func_data();
1354
- Object* raw_call_data = fun_data->call_code();
1355
- if (!raw_call_data->IsUndefined()) {
1356
- CallHandlerInfo* call_data = CallHandlerInfo::cast(raw_call_data);
1357
- Object* callback_obj = call_data->callback();
1358
- Address entry_point = v8::ToCData<Address>(callback_obj);
1359
- PROFILE(CallbackEvent(*func_name, entry_point));
1360
- }
1361
- } else {
1362
- PROFILE(CodeCreateEvent(
1363
- Logger::LAZY_COMPILE_TAG, shared->code(), *func_name));
1364
- }
1365
- }
1366
- }
1367
-
1368
-
1369
- void Logger::LogFunctionObjects() {
1370
- AssertNoAllocation no_alloc;
1371
- HeapIterator iterator;
1372
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1373
- if (!obj->IsJSFunction()) continue;
1374
- JSFunction* jsf = JSFunction::cast(obj);
1375
- if (!jsf->is_compiled()) continue;
1376
- PROFILE(FunctionCreateEvent(jsf));
1377
- }
1378
- }
1379
-
1380
-
1381
- void Logger::LogAccessorCallbacks() {
1382
- AssertNoAllocation no_alloc;
1383
- HeapIterator iterator;
1384
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1385
- if (!obj->IsAccessorInfo()) continue;
1386
- AccessorInfo* ai = AccessorInfo::cast(obj);
1387
- if (!ai->name()->IsString()) continue;
1388
- String* name = String::cast(ai->name());
1389
- Address getter_entry = v8::ToCData<Address>(ai->getter());
1390
- if (getter_entry != 0) {
1391
- PROFILE(GetterCallbackEvent(name, getter_entry));
1392
- }
1393
- Address setter_entry = v8::ToCData<Address>(ai->setter());
1394
- if (setter_entry != 0) {
1395
- PROFILE(SetterCallbackEvent(name, setter_entry));
1396
- }
1397
- }
1398
- }
1399
-
1400
- #endif
1401
-
1402
-
1403
- bool Logger::Setup() {
1404
- #ifdef ENABLE_LOGGING_AND_PROFILING
1405
- // --log-all enables all the log flags.
1406
- if (FLAG_log_all) {
1407
- FLAG_log_runtime = true;
1408
- FLAG_log_api = true;
1409
- FLAG_log_code = true;
1410
- FLAG_log_gc = true;
1411
- FLAG_log_suspect = true;
1412
- FLAG_log_handles = true;
1413
- FLAG_log_regexp = true;
1414
- }
1415
-
1416
- // --prof implies --log-code.
1417
- if (FLAG_prof) FLAG_log_code = true;
1418
-
1419
- // --prof_lazy controls --log-code, implies --noprof_auto.
1420
- if (FLAG_prof_lazy) {
1421
- FLAG_log_code = false;
1422
- FLAG_prof_auto = false;
1423
- }
1424
-
1425
- bool start_logging = FLAG_log || FLAG_log_runtime || FLAG_log_api
1426
- || FLAG_log_code || FLAG_log_gc || FLAG_log_handles || FLAG_log_suspect
1427
- || FLAG_log_regexp || FLAG_log_state_changes;
1428
-
1429
- bool open_log_file = start_logging || FLAG_prof_lazy;
1430
-
1431
- // If we're logging anything, we need to open the log file.
1432
- if (open_log_file) {
1433
- if (strcmp(FLAG_logfile, "-") == 0) {
1434
- Log::OpenStdout();
1435
- } else if (strcmp(FLAG_logfile, "*") == 0) {
1436
- Log::OpenMemoryBuffer();
1437
- } else if (strchr(FLAG_logfile, '%') != NULL) {
1438
- // If there's a '%' in the log file name we have to expand
1439
- // placeholders.
1440
- HeapStringAllocator allocator;
1441
- StringStream stream(&allocator);
1442
- for (const char* p = FLAG_logfile; *p; p++) {
1443
- if (*p == '%') {
1444
- p++;
1445
- switch (*p) {
1446
- case '\0':
1447
- // If there's a % at the end of the string we back up
1448
- // one character so we can escape the loop properly.
1449
- p--;
1450
- break;
1451
- case 't': {
1452
- // %t expands to the current time in milliseconds.
1453
- double time = OS::TimeCurrentMillis();
1454
- stream.Add("%.0f", FmtElm(time));
1455
- break;
1456
- }
1457
- case '%':
1458
- // %% expands (contracts really) to %.
1459
- stream.Put('%');
1460
- break;
1461
- default:
1462
- // All other %'s expand to themselves.
1463
- stream.Put('%');
1464
- stream.Put(*p);
1465
- break;
1466
- }
1467
- } else {
1468
- stream.Put(*p);
1469
- }
1470
- }
1471
- SmartPointer<const char> expanded = stream.ToCString();
1472
- Log::OpenFile(*expanded);
1473
- } else {
1474
- Log::OpenFile(FLAG_logfile);
1475
- }
1476
- }
1477
-
1478
- ASSERT(VMState::is_outermost_external());
1479
-
1480
- ticker_ = new Ticker(kSamplingIntervalMs);
1481
-
1482
- if (FLAG_sliding_state_window && sliding_state_window_ == NULL) {
1483
- sliding_state_window_ = new SlidingStateWindow();
1484
- }
1485
-
1486
- log_events_ = FLAG_compress_log ?
1487
- kCompressedLogEventsNames : kLongLogEventsNames;
1488
- if (FLAG_compress_log) {
1489
- compression_helper_ = new CompressionHelper(kCompressionWindowSize);
1490
- }
1491
-
1492
- if (start_logging) {
1493
- logging_nesting_ = 1;
1494
- }
1495
-
1496
- if (FLAG_prof) {
1497
- profiler_ = new Profiler();
1498
- if (!FLAG_prof_auto) {
1499
- profiler_->pause();
1500
- } else {
1501
- logging_nesting_ = 1;
1502
- }
1503
- if (!FLAG_prof_lazy) {
1504
- profiler_->Engage();
1505
- }
1506
- }
1507
-
1508
- LogMessageBuilder::set_write_failure_handler(StopLoggingAndProfiling);
1509
-
1510
- return true;
1511
-
1512
- #else
1513
- return false;
1514
- #endif
1515
- }
1516
-
1517
-
1518
- void Logger::TearDown() {
1519
- #ifdef ENABLE_LOGGING_AND_PROFILING
1520
- LogMessageBuilder::set_write_failure_handler(NULL);
1521
-
1522
- // Stop the profiler before closing the file.
1523
- if (profiler_ != NULL) {
1524
- profiler_->Disengage();
1525
- delete profiler_;
1526
- profiler_ = NULL;
1527
- }
1528
-
1529
- delete compression_helper_;
1530
- compression_helper_ = NULL;
1531
-
1532
- delete sliding_state_window_;
1533
- sliding_state_window_ = NULL;
1534
-
1535
- delete ticker_;
1536
- ticker_ = NULL;
1537
-
1538
- Log::Close();
1539
- #endif
1540
- }
1541
-
1542
-
1543
- void Logger::EnableSlidingStateWindow() {
1544
- #ifdef ENABLE_LOGGING_AND_PROFILING
1545
- // If the ticker is NULL, Logger::Setup has not been called yet. In
1546
- // that case, we set the sliding_state_window flag so that the
1547
- // sliding window computation will be started when Logger::Setup is
1548
- // called.
1549
- if (ticker_ == NULL) {
1550
- FLAG_sliding_state_window = true;
1551
- return;
1552
- }
1553
- // Otherwise, if the sliding state window computation has not been
1554
- // started we do it now.
1555
- if (sliding_state_window_ == NULL) {
1556
- sliding_state_window_ = new SlidingStateWindow();
1557
- }
1558
- #endif
1559
- }
1560
-
1561
- } } // namespace v8::internal