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,129 +0,0 @@
1
- // Copyright 2006-2008 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_DEBUG_AGENT_H_
29
- #define V8_DEBUG_AGENT_H_
30
-
31
- #ifdef ENABLE_DEBUGGER_SUPPORT
32
- #include "../include/v8-debug.h"
33
- #include "platform.h"
34
-
35
- namespace v8 {
36
- namespace internal {
37
-
38
- // Forward decelrations.
39
- class DebuggerAgentSession;
40
-
41
-
42
- // Debugger agent which starts a socket listener on the debugger port and
43
- // handles connection from a remote debugger.
44
- class DebuggerAgent: public Thread {
45
- public:
46
- explicit DebuggerAgent(const char* name, int port)
47
- : name_(StrDup(name)), port_(port),
48
- server_(OS::CreateSocket()), terminate_(false),
49
- session_access_(OS::CreateMutex()), session_(NULL),
50
- terminate_now_(OS::CreateSemaphore(0)),
51
- listening_(OS::CreateSemaphore(0)) {
52
- ASSERT(instance_ == NULL);
53
- instance_ = this;
54
- }
55
- ~DebuggerAgent() {
56
- instance_ = NULL;
57
- delete server_;
58
- }
59
-
60
- void Shutdown();
61
- void WaitUntilListening();
62
-
63
- private:
64
- void Run();
65
- void CreateSession(Socket* socket);
66
- void DebuggerMessage(const v8::Debug::Message& message);
67
- void CloseSession();
68
- void OnSessionClosed(DebuggerAgentSession* session);
69
-
70
- SmartPointer<const char> name_; // Name of the embedding application.
71
- int port_; // Port to use for the agent.
72
- Socket* server_; // Server socket for listen/accept.
73
- bool terminate_; // Termination flag.
74
- Mutex* session_access_; // Mutex guarging access to session_.
75
- DebuggerAgentSession* session_; // Current active session if any.
76
- Semaphore* terminate_now_; // Semaphore to signal termination.
77
- Semaphore* listening_;
78
-
79
- static DebuggerAgent* instance_;
80
-
81
- friend class DebuggerAgentSession;
82
- friend void DebuggerAgentMessageHandler(const v8::Debug::Message& message);
83
-
84
- DISALLOW_COPY_AND_ASSIGN(DebuggerAgent);
85
- };
86
-
87
-
88
- // Debugger agent session. The session receives requests from the remote
89
- // debugger and sends debugger events/responses to the remote debugger.
90
- class DebuggerAgentSession: public Thread {
91
- public:
92
- DebuggerAgentSession(DebuggerAgent* agent, Socket* client)
93
- : agent_(agent), client_(client) {}
94
-
95
- void DebuggerMessage(Vector<uint16_t> message);
96
- void Shutdown();
97
-
98
- private:
99
- void Run();
100
-
101
- void DebuggerMessage(Vector<char> message);
102
-
103
- DebuggerAgent* agent_;
104
- Socket* client_;
105
-
106
- DISALLOW_COPY_AND_ASSIGN(DebuggerAgentSession);
107
- };
108
-
109
-
110
- // Utility methods factored out to be used by the D8 shell as well.
111
- class DebuggerAgentUtil {
112
- public:
113
- static const char* kContentLength;
114
- static int kContentLengthSize;
115
-
116
- static SmartPointer<char> ReceiveMessage(const Socket* conn);
117
- static bool SendConnectMessage(const Socket* conn,
118
- const char* embedding_host);
119
- static bool SendMessage(const Socket* conn, const Vector<uint16_t> message);
120
- static bool SendMessage(const Socket* conn,
121
- const v8::Handle<v8::String> message);
122
- static int ReceiveAll(const Socket* conn, char* data, int len);
123
- };
124
-
125
- } } // namespace v8::internal
126
-
127
- #endif // ENABLE_DEBUGGER_SUPPORT
128
-
129
- #endif // V8_DEBUG_AGENT_H_
@@ -1,2227 +0,0 @@
1
- // Copyright 2006-2008 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
- // Default number of frames to include in the response to backtrace request.
29
- const kDefaultBacktraceLength = 10;
30
-
31
- const Debug = {};
32
-
33
- // Regular expression to skip "crud" at the beginning of a source line which is
34
- // not really code. Currently the regular expression matches whitespace and
35
- // comments.
36
- const sourceLineBeginningSkip = /^(?:\s*(?:\/\*.*?\*\/)*)*/;
37
-
38
- // Debug events which can occour in the V8 JavaScript engine. These originate
39
- // from the API include file debug.h.
40
- Debug.DebugEvent = { Break: 1,
41
- Exception: 2,
42
- NewFunction: 3,
43
- BeforeCompile: 4,
44
- AfterCompile: 5,
45
- ScriptCollected: 6 };
46
-
47
- // Types of exceptions that can be broken upon.
48
- Debug.ExceptionBreak = { All : 0,
49
- Uncaught: 1 };
50
-
51
- // The different types of steps.
52
- Debug.StepAction = { StepOut: 0,
53
- StepNext: 1,
54
- StepIn: 2,
55
- StepMin: 3,
56
- StepInMin: 4 };
57
-
58
- // The different types of scripts matching enum ScriptType in objects.h.
59
- Debug.ScriptType = { Native: 0,
60
- Extension: 1,
61
- Normal: 2 };
62
-
63
- // The different types of script compilations matching enum
64
- // Script::CompilationType in objects.h.
65
- Debug.ScriptCompilationType = { Host: 0,
66
- Eval: 1,
67
- JSON: 2 };
68
-
69
- // The different script break point types.
70
- Debug.ScriptBreakPointType = { ScriptId: 0,
71
- ScriptName: 1 };
72
-
73
- function ScriptTypeFlag(type) {
74
- return (1 << type);
75
- }
76
-
77
- // Globals.
78
- var next_response_seq = 0;
79
- var next_break_point_number = 1;
80
- var break_points = [];
81
- var script_break_points = [];
82
-
83
-
84
- // Create a new break point object and add it to the list of break points.
85
- function MakeBreakPoint(source_position, opt_line, opt_column, opt_script_break_point) {
86
- var break_point = new BreakPoint(source_position, opt_line, opt_column, opt_script_break_point);
87
- break_points.push(break_point);
88
- return break_point;
89
- }
90
-
91
-
92
- // Object representing a break point.
93
- // NOTE: This object does not have a reference to the function having break
94
- // point as this would cause function not to be garbage collected when it is
95
- // not used any more. We do not want break points to keep functions alive.
96
- function BreakPoint(source_position, opt_line, opt_column, opt_script_break_point) {
97
- this.source_position_ = source_position;
98
- this.source_line_ = opt_line;
99
- this.source_column_ = opt_column;
100
- if (opt_script_break_point) {
101
- this.script_break_point_ = opt_script_break_point;
102
- } else {
103
- this.number_ = next_break_point_number++;
104
- }
105
- this.hit_count_ = 0;
106
- this.active_ = true;
107
- this.condition_ = null;
108
- this.ignoreCount_ = 0;
109
- }
110
-
111
-
112
- BreakPoint.prototype.number = function() {
113
- return this.number_;
114
- };
115
-
116
-
117
- BreakPoint.prototype.func = function() {
118
- return this.func_;
119
- };
120
-
121
-
122
- BreakPoint.prototype.source_position = function() {
123
- return this.source_position_;
124
- };
125
-
126
-
127
- BreakPoint.prototype.hit_count = function() {
128
- return this.hit_count_;
129
- };
130
-
131
-
132
- BreakPoint.prototype.active = function() {
133
- if (this.script_break_point()) {
134
- return this.script_break_point().active();
135
- }
136
- return this.active_;
137
- };
138
-
139
-
140
- BreakPoint.prototype.condition = function() {
141
- if (this.script_break_point() && this.script_break_point().condition()) {
142
- return this.script_break_point().condition();
143
- }
144
- return this.condition_;
145
- };
146
-
147
-
148
- BreakPoint.prototype.ignoreCount = function() {
149
- return this.ignoreCount_;
150
- };
151
-
152
-
153
- BreakPoint.prototype.script_break_point = function() {
154
- return this.script_break_point_;
155
- };
156
-
157
-
158
- BreakPoint.prototype.enable = function() {
159
- this.active_ = true;
160
- };
161
-
162
-
163
- BreakPoint.prototype.disable = function() {
164
- this.active_ = false;
165
- };
166
-
167
-
168
- BreakPoint.prototype.setCondition = function(condition) {
169
- this.condition_ = condition;
170
- };
171
-
172
-
173
- BreakPoint.prototype.setIgnoreCount = function(ignoreCount) {
174
- this.ignoreCount_ = ignoreCount;
175
- };
176
-
177
-
178
- BreakPoint.prototype.isTriggered = function(exec_state) {
179
- // Break point not active - not triggered.
180
- if (!this.active()) return false;
181
-
182
- // Check for conditional break point.
183
- if (this.condition()) {
184
- // If break point has condition try to evaluate it in the top frame.
185
- try {
186
- var mirror = exec_state.frame(0).evaluate(this.condition());
187
- // If no sensible mirror or non true value break point not triggered.
188
- if (!(mirror instanceof ValueMirror) || !%ToBoolean(mirror.value_)) {
189
- return false;
190
- }
191
- } catch (e) {
192
- // Exception evaluating condition counts as not triggered.
193
- return false;
194
- }
195
- }
196
-
197
- // Update the hit count.
198
- this.hit_count_++;
199
- if (this.script_break_point_) {
200
- this.script_break_point_.hit_count_++;
201
- }
202
-
203
- // If the break point has an ignore count it is not triggered.
204
- if (this.ignoreCount_ > 0) {
205
- this.ignoreCount_--;
206
- return false;
207
- }
208
-
209
- // Break point triggered.
210
- return true;
211
- };
212
-
213
-
214
- // Function called from the runtime when a break point is hit. Returns true if
215
- // the break point is triggered and supposed to break execution.
216
- function IsBreakPointTriggered(break_id, break_point) {
217
- return break_point.isTriggered(MakeExecutionState(break_id));
218
- }
219
-
220
-
221
- // Object representing a script break point. The script is referenced by its
222
- // script name or script id and the break point is represented as line and
223
- // column.
224
- function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
225
- opt_groupId) {
226
- this.type_ = type;
227
- if (type == Debug.ScriptBreakPointType.ScriptId) {
228
- this.script_id_ = script_id_or_name;
229
- } else { // type == Debug.ScriptBreakPointType.ScriptName
230
- this.script_name_ = script_id_or_name;
231
- }
232
- this.line_ = opt_line || 0;
233
- this.column_ = opt_column;
234
- this.groupId_ = opt_groupId;
235
- this.hit_count_ = 0;
236
- this.active_ = true;
237
- this.condition_ = null;
238
- this.ignoreCount_ = 0;
239
- this.break_points_ = [];
240
- }
241
-
242
-
243
- //Creates a clone of script breakpoint that is linked to another script.
244
- ScriptBreakPoint.prototype.cloneForOtherScript = function (other_script) {
245
- var copy = new ScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
246
- other_script.id, this.line_, this.column_, this.groupId_);
247
- copy.number_ = next_break_point_number++;
248
- script_break_points.push(copy);
249
-
250
- copy.hit_count_ = this.hit_count_;
251
- copy.active_ = this.active_;
252
- copy.condition_ = this.condition_;
253
- copy.ignoreCount_ = this.ignoreCount_;
254
- return copy;
255
- }
256
-
257
-
258
- ScriptBreakPoint.prototype.number = function() {
259
- return this.number_;
260
- };
261
-
262
-
263
- ScriptBreakPoint.prototype.groupId = function() {
264
- return this.groupId_;
265
- };
266
-
267
-
268
- ScriptBreakPoint.prototype.type = function() {
269
- return this.type_;
270
- };
271
-
272
-
273
- ScriptBreakPoint.prototype.script_id = function() {
274
- return this.script_id_;
275
- };
276
-
277
-
278
- ScriptBreakPoint.prototype.script_name = function() {
279
- return this.script_name_;
280
- };
281
-
282
-
283
- ScriptBreakPoint.prototype.line = function() {
284
- return this.line_;
285
- };
286
-
287
-
288
- ScriptBreakPoint.prototype.column = function() {
289
- return this.column_;
290
- };
291
-
292
-
293
- ScriptBreakPoint.prototype.actual_locations = function() {
294
- var locations = [];
295
- for (var i = 0; i < this.break_points_.length; i++) {
296
- locations.push(this.break_points_[i].actual_location);
297
- }
298
- return locations;
299
- }
300
-
301
-
302
- ScriptBreakPoint.prototype.update_positions = function(line, column) {
303
- this.line_ = line;
304
- this.column_ = column;
305
- }
306
-
307
-
308
- ScriptBreakPoint.prototype.hit_count = function() {
309
- return this.hit_count_;
310
- };
311
-
312
-
313
- ScriptBreakPoint.prototype.active = function() {
314
- return this.active_;
315
- };
316
-
317
-
318
- ScriptBreakPoint.prototype.condition = function() {
319
- return this.condition_;
320
- };
321
-
322
-
323
- ScriptBreakPoint.prototype.ignoreCount = function() {
324
- return this.ignoreCount_;
325
- };
326
-
327
-
328
- ScriptBreakPoint.prototype.enable = function() {
329
- this.active_ = true;
330
- };
331
-
332
-
333
- ScriptBreakPoint.prototype.disable = function() {
334
- this.active_ = false;
335
- };
336
-
337
-
338
- ScriptBreakPoint.prototype.setCondition = function(condition) {
339
- this.condition_ = condition;
340
- };
341
-
342
-
343
- ScriptBreakPoint.prototype.setIgnoreCount = function(ignoreCount) {
344
- this.ignoreCount_ = ignoreCount;
345
-
346
- // Set ignore count on all break points created from this script break point.
347
- for (var i = 0; i < this.break_points_.length; i++) {
348
- this.break_points_[i].setIgnoreCount(ignoreCount);
349
- }
350
- };
351
-
352
-
353
- // Check whether a script matches this script break point. Currently this is
354
- // only based on script name.
355
- ScriptBreakPoint.prototype.matchesScript = function(script) {
356
- if (this.type_ == Debug.ScriptBreakPointType.ScriptId) {
357
- return this.script_id_ == script.id;
358
- } else { // this.type_ == Debug.ScriptBreakPointType.ScriptName
359
- return this.script_name_ == script.nameOrSourceURL() &&
360
- script.line_offset <= this.line_ &&
361
- this.line_ < script.line_offset + script.lineCount();
362
- }
363
- };
364
-
365
-
366
- // Set the script break point in a script.
367
- ScriptBreakPoint.prototype.set = function (script) {
368
- var column = this.column();
369
- var line = this.line();
370
- // If the column is undefined the break is on the line. To help locate the
371
- // first piece of breakable code on the line try to find the column on the
372
- // line which contains some source.
373
- if (IS_UNDEFINED(column)) {
374
- var source_line = script.sourceLine(this.line());
375
-
376
- // Allocate array for caching the columns where the actual source starts.
377
- if (!script.sourceColumnStart_) {
378
- script.sourceColumnStart_ = new Array(script.lineCount());
379
- }
380
-
381
- // Fill cache if needed and get column where the actual source starts.
382
- if (IS_UNDEFINED(script.sourceColumnStart_[line])) {
383
- script.sourceColumnStart_[line] =
384
- source_line.match(sourceLineBeginningSkip)[0].length;
385
- }
386
- column = script.sourceColumnStart_[line];
387
- }
388
-
389
- // Convert the line and column into an absolute position within the script.
390
- var position = Debug.findScriptSourcePosition(script, this.line(), column);
391
-
392
- // If the position is not found in the script (the script might be shorter
393
- // than it used to be) just ignore it.
394
- if (position === null) return;
395
-
396
- // Create a break point object and set the break point.
397
- break_point = MakeBreakPoint(position, this.line(), this.column(), this);
398
- break_point.setIgnoreCount(this.ignoreCount());
399
- var actual_position = %SetScriptBreakPoint(script, position, break_point);
400
- if (IS_UNDEFINED(actual_position)) {
401
- actual_position = position;
402
- }
403
- var actual_location = script.locationFromPosition(actual_position, true);
404
- break_point.actual_location = { line: actual_location.line,
405
- column: actual_location.column };
406
- this.break_points_.push(break_point);
407
- return break_point;
408
- };
409
-
410
-
411
- // Clear all the break points created from this script break point
412
- ScriptBreakPoint.prototype.clear = function () {
413
- var remaining_break_points = [];
414
- for (var i = 0; i < break_points.length; i++) {
415
- if (break_points[i].script_break_point() &&
416
- break_points[i].script_break_point() === this) {
417
- %ClearBreakPoint(break_points[i]);
418
- } else {
419
- remaining_break_points.push(break_points[i]);
420
- }
421
- }
422
- break_points = remaining_break_points;
423
- this.break_points_ = [];
424
- };
425
-
426
-
427
- // Function called from runtime when a new script is compiled to set any script
428
- // break points set in this script.
429
- function UpdateScriptBreakPoints(script) {
430
- for (var i = 0; i < script_break_points.length; i++) {
431
- if (script_break_points[i].type() == Debug.ScriptBreakPointType.ScriptName &&
432
- script_break_points[i].matchesScript(script)) {
433
- script_break_points[i].set(script);
434
- }
435
- }
436
- }
437
-
438
-
439
- function GetScriptBreakPoints(script) {
440
- var result = [];
441
- for (var i = 0; i < script_break_points.length; i++) {
442
- if (script_break_points[i].matchesScript(script)) {
443
- result.push(script_break_points[i]);
444
- }
445
- }
446
- return result;
447
- }
448
-
449
-
450
- Debug.setListener = function(listener, opt_data) {
451
- if (!IS_FUNCTION(listener) && !IS_UNDEFINED(listener) && !IS_NULL(listener)) {
452
- throw new Error('Parameters have wrong types.');
453
- }
454
- %SetDebugEventListener(listener, opt_data);
455
- };
456
-
457
-
458
- Debug.breakExecution = function(f) {
459
- %Break();
460
- };
461
-
462
- Debug.breakLocations = function(f) {
463
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
464
- return %GetBreakLocations(f);
465
- };
466
-
467
- // Returns a Script object. If the parameter is a function the return value
468
- // is the script in which the function is defined. If the parameter is a string
469
- // the return value is the script for which the script name has that string
470
- // value. If it is a regexp and there is a unique script whose name matches
471
- // we return that, otherwise undefined.
472
- Debug.findScript = function(func_or_script_name) {
473
- if (IS_FUNCTION(func_or_script_name)) {
474
- return %FunctionGetScript(func_or_script_name);
475
- } else if (IS_REGEXP(func_or_script_name)) {
476
- var scripts = Debug.scripts();
477
- var last_result = null;
478
- var result_count = 0;
479
- for (var i in scripts) {
480
- var script = scripts[i];
481
- if (func_or_script_name.test(script.name)) {
482
- last_result = script;
483
- result_count++;
484
- }
485
- }
486
- // Return the unique script matching the regexp. If there are more
487
- // than one we don't return a value since there is no good way to
488
- // decide which one to return. Returning a "random" one, say the
489
- // first, would introduce nondeterminism (or something close to it)
490
- // because the order is the heap iteration order.
491
- if (result_count == 1) {
492
- return last_result;
493
- } else {
494
- return undefined;
495
- }
496
- } else {
497
- return %GetScript(func_or_script_name);
498
- }
499
- };
500
-
501
- // Returns the script source. If the parameter is a function the return value
502
- // is the script source for the script in which the function is defined. If the
503
- // parameter is a string the return value is the script for which the script
504
- // name has that string value.
505
- Debug.scriptSource = function(func_or_script_name) {
506
- return this.findScript(func_or_script_name).source;
507
- };
508
-
509
- Debug.source = function(f) {
510
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
511
- return %FunctionGetSourceCode(f);
512
- };
513
-
514
- Debug.disassemble = function(f) {
515
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
516
- return %DebugDisassembleFunction(f);
517
- };
518
-
519
- Debug.disassembleConstructor = function(f) {
520
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
521
- return %DebugDisassembleConstructor(f);
522
- };
523
-
524
- Debug.ExecuteInDebugContext = function(f, without_debugger) {
525
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
526
- return %ExecuteInDebugContext(f, !!without_debugger);
527
- };
528
-
529
- Debug.sourcePosition = function(f) {
530
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
531
- return %FunctionGetScriptSourcePosition(f);
532
- };
533
-
534
-
535
- Debug.findFunctionSourceLocation = function(func, opt_line, opt_column) {
536
- var script = %FunctionGetScript(func);
537
- var script_offset = %FunctionGetScriptSourcePosition(func);
538
- return script.locationFromLine(opt_line, opt_column, script_offset);
539
- }
540
-
541
-
542
- // Returns the character position in a script based on a line number and an
543
- // optional position within that line.
544
- Debug.findScriptSourcePosition = function(script, opt_line, opt_column) {
545
- var location = script.locationFromLine(opt_line, opt_column);
546
- return location ? location.position : null;
547
- }
548
-
549
-
550
- Debug.findBreakPoint = function(break_point_number, remove) {
551
- var break_point;
552
- for (var i = 0; i < break_points.length; i++) {
553
- if (break_points[i].number() == break_point_number) {
554
- break_point = break_points[i];
555
- // Remove the break point from the list if requested.
556
- if (remove) {
557
- break_points.splice(i, 1);
558
- }
559
- break;
560
- }
561
- }
562
- if (break_point) {
563
- return break_point;
564
- } else {
565
- return this.findScriptBreakPoint(break_point_number, remove);
566
- }
567
- };
568
-
569
- Debug.findBreakPointActualLocations = function(break_point_number) {
570
- for (var i = 0; i < script_break_points.length; i++) {
571
- if (script_break_points[i].number() == break_point_number) {
572
- return script_break_points[i].actual_locations();
573
- }
574
- }
575
- for (var i = 0; i < break_points.length; i++) {
576
- if (break_points[i].number() == break_point_number) {
577
- return [break_points[i].actual_location];
578
- }
579
- }
580
- return [];
581
- }
582
-
583
- Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
584
- if (!IS_FUNCTION(func)) throw new Error('Parameters have wrong types.');
585
- // Break points in API functions are not supported.
586
- if (%FunctionIsAPIFunction(func)) {
587
- throw new Error('Cannot set break point in native code.');
588
- }
589
- // Find source position relative to start of the function
590
- var break_position =
591
- this.findFunctionSourceLocation(func, opt_line, opt_column).position;
592
- var source_position = break_position - this.sourcePosition(func);
593
- // Find the script for the function.
594
- var script = %FunctionGetScript(func);
595
- // Break in builtin JavaScript code is not supported.
596
- if (script.type == Debug.ScriptType.Native) {
597
- throw new Error('Cannot set break point in native code.');
598
- }
599
- // If the script for the function has a name convert this to a script break
600
- // point.
601
- if (script && script.id) {
602
- // Adjust the source position to be script relative.
603
- source_position += %FunctionGetScriptSourcePosition(func);
604
- // Find line and column for the position in the script and set a script
605
- // break point from that.
606
- var location = script.locationFromPosition(source_position, false);
607
- return this.setScriptBreakPointById(script.id,
608
- location.line, location.column,
609
- opt_condition);
610
- } else {
611
- // Set a break point directly on the function.
612
- var break_point = MakeBreakPoint(source_position, opt_line, opt_column);
613
- var actual_position =
614
- %SetFunctionBreakPoint(func, source_position, break_point);
615
- actual_position += this.sourcePosition(func);
616
- var actual_location = script.locationFromPosition(actual_position, true);
617
- break_point.actual_location = { line: actual_location.line,
618
- column: actual_location.column };
619
- break_point.setCondition(opt_condition);
620
- return break_point.number();
621
- }
622
- };
623
-
624
-
625
- Debug.enableBreakPoint = function(break_point_number) {
626
- var break_point = this.findBreakPoint(break_point_number, false);
627
- break_point.enable();
628
- };
629
-
630
-
631
- Debug.disableBreakPoint = function(break_point_number) {
632
- var break_point = this.findBreakPoint(break_point_number, false);
633
- break_point.disable();
634
- };
635
-
636
-
637
- Debug.changeBreakPointCondition = function(break_point_number, condition) {
638
- var break_point = this.findBreakPoint(break_point_number, false);
639
- break_point.setCondition(condition);
640
- };
641
-
642
-
643
- Debug.changeBreakPointIgnoreCount = function(break_point_number, ignoreCount) {
644
- if (ignoreCount < 0) {
645
- throw new Error('Invalid argument');
646
- }
647
- var break_point = this.findBreakPoint(break_point_number, false);
648
- break_point.setIgnoreCount(ignoreCount);
649
- };
650
-
651
-
652
- Debug.clearBreakPoint = function(break_point_number) {
653
- var break_point = this.findBreakPoint(break_point_number, true);
654
- if (break_point) {
655
- return %ClearBreakPoint(break_point);
656
- } else {
657
- break_point = this.findScriptBreakPoint(break_point_number, true);
658
- if (!break_point) {
659
- throw new Error('Invalid breakpoint');
660
- }
661
- }
662
- };
663
-
664
-
665
- Debug.clearAllBreakPoints = function() {
666
- for (var i = 0; i < break_points.length; i++) {
667
- break_point = break_points[i];
668
- %ClearBreakPoint(break_point);
669
- }
670
- break_points = [];
671
- };
672
-
673
-
674
- Debug.findScriptBreakPoint = function(break_point_number, remove) {
675
- var script_break_point;
676
- for (var i = 0; i < script_break_points.length; i++) {
677
- if (script_break_points[i].number() == break_point_number) {
678
- script_break_point = script_break_points[i];
679
- // Remove the break point from the list if requested.
680
- if (remove) {
681
- script_break_point.clear();
682
- script_break_points.splice(i,1);
683
- }
684
- break;
685
- }
686
- }
687
- return script_break_point;
688
- }
689
-
690
-
691
- // Sets a breakpoint in a script identified through id or name at the
692
- // specified source line and column within that line.
693
- Debug.setScriptBreakPoint = function(type, script_id_or_name,
694
- opt_line, opt_column, opt_condition,
695
- opt_groupId) {
696
- // Create script break point object.
697
- var script_break_point =
698
- new ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
699
- opt_groupId);
700
-
701
- // Assign number to the new script break point and add it.
702
- script_break_point.number_ = next_break_point_number++;
703
- script_break_point.setCondition(opt_condition);
704
- script_break_points.push(script_break_point);
705
-
706
- // Run through all scripts to see if this script break point matches any
707
- // loaded scripts.
708
- var scripts = this.scripts();
709
- for (var i = 0; i < scripts.length; i++) {
710
- if (script_break_point.matchesScript(scripts[i])) {
711
- script_break_point.set(scripts[i]);
712
- }
713
- }
714
-
715
- return script_break_point.number();
716
- }
717
-
718
-
719
- Debug.setScriptBreakPointById = function(script_id,
720
- opt_line, opt_column,
721
- opt_condition, opt_groupId) {
722
- return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
723
- script_id, opt_line, opt_column,
724
- opt_condition, opt_groupId);
725
- }
726
-
727
-
728
- Debug.setScriptBreakPointByName = function(script_name,
729
- opt_line, opt_column,
730
- opt_condition, opt_groupId) {
731
- return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptName,
732
- script_name, opt_line, opt_column,
733
- opt_condition, opt_groupId);
734
- }
735
-
736
-
737
- Debug.enableScriptBreakPoint = function(break_point_number) {
738
- var script_break_point = this.findScriptBreakPoint(break_point_number, false);
739
- script_break_point.enable();
740
- };
741
-
742
-
743
- Debug.disableScriptBreakPoint = function(break_point_number) {
744
- var script_break_point = this.findScriptBreakPoint(break_point_number, false);
745
- script_break_point.disable();
746
- };
747
-
748
-
749
- Debug.changeScriptBreakPointCondition = function(break_point_number, condition) {
750
- var script_break_point = this.findScriptBreakPoint(break_point_number, false);
751
- script_break_point.setCondition(condition);
752
- };
753
-
754
-
755
- Debug.changeScriptBreakPointIgnoreCount = function(break_point_number, ignoreCount) {
756
- if (ignoreCount < 0) {
757
- throw new Error('Invalid argument');
758
- }
759
- var script_break_point = this.findScriptBreakPoint(break_point_number, false);
760
- script_break_point.setIgnoreCount(ignoreCount);
761
- };
762
-
763
-
764
- Debug.scriptBreakPoints = function() {
765
- return script_break_points;
766
- }
767
-
768
-
769
- Debug.clearStepping = function() {
770
- %ClearStepping();
771
- }
772
-
773
- Debug.setBreakOnException = function() {
774
- return %ChangeBreakOnException(Debug.ExceptionBreak.All, true);
775
- };
776
-
777
- Debug.clearBreakOnException = function() {
778
- return %ChangeBreakOnException(Debug.ExceptionBreak.All, false);
779
- };
780
-
781
- Debug.setBreakOnUncaughtException = function() {
782
- return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught, true);
783
- };
784
-
785
- Debug.clearBreakOnUncaughtException = function() {
786
- return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught, false);
787
- };
788
-
789
- Debug.showBreakPoints = function(f, full) {
790
- if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
791
- var source = full ? this.scriptSource(f) : this.source(f);
792
- var offset = full ? this.sourcePosition(f) : 0;
793
- var locations = this.breakLocations(f);
794
- if (!locations) return source;
795
- locations.sort(function(x, y) { return x - y; });
796
- var result = "";
797
- var prev_pos = 0;
798
- var pos;
799
- for (var i = 0; i < locations.length; i++) {
800
- pos = locations[i] - offset;
801
- result += source.slice(prev_pos, pos);
802
- result += "[B" + i + "]";
803
- prev_pos = pos;
804
- }
805
- pos = source.length;
806
- result += source.substring(prev_pos, pos);
807
- return result;
808
- };
809
-
810
-
811
- // Get all the scripts currently loaded. Locating all the scripts is based on
812
- // scanning the heap.
813
- Debug.scripts = function() {
814
- // Collect all scripts in the heap.
815
- return %DebugGetLoadedScripts();
816
- }
817
-
818
- function MakeExecutionState(break_id) {
819
- return new ExecutionState(break_id);
820
- }
821
-
822
- function ExecutionState(break_id) {
823
- this.break_id = break_id;
824
- this.selected_frame = 0;
825
- }
826
-
827
- ExecutionState.prototype.prepareStep = function(opt_action, opt_count) {
828
- var action = Debug.StepAction.StepIn;
829
- if (!IS_UNDEFINED(opt_action)) action = %ToNumber(opt_action);
830
- var count = opt_count ? %ToNumber(opt_count) : 1;
831
-
832
- return %PrepareStep(this.break_id, action, count);
833
- }
834
-
835
- ExecutionState.prototype.evaluateGlobal = function(source, disable_break) {
836
- return MakeMirror(
837
- %DebugEvaluateGlobal(this.break_id, source, Boolean(disable_break)));
838
- };
839
-
840
- ExecutionState.prototype.frameCount = function() {
841
- return %GetFrameCount(this.break_id);
842
- };
843
-
844
- ExecutionState.prototype.threadCount = function() {
845
- return %GetThreadCount(this.break_id);
846
- };
847
-
848
- ExecutionState.prototype.frame = function(opt_index) {
849
- // If no index supplied return the selected frame.
850
- if (opt_index == null) opt_index = this.selected_frame;
851
- if (opt_index < 0 || opt_index >= this.frameCount())
852
- throw new Error('Illegal frame index.');
853
- return new FrameMirror(this.break_id, opt_index);
854
- };
855
-
856
- ExecutionState.prototype.cframesValue = function(opt_from_index, opt_to_index) {
857
- return %GetCFrames(this.break_id);
858
- };
859
-
860
- ExecutionState.prototype.setSelectedFrame = function(index) {
861
- var i = %ToNumber(index);
862
- if (i < 0 || i >= this.frameCount()) throw new Error('Illegal frame index.');
863
- this.selected_frame = i;
864
- };
865
-
866
- ExecutionState.prototype.selectedFrame = function() {
867
- return this.selected_frame;
868
- };
869
-
870
- ExecutionState.prototype.debugCommandProcessor = function(opt_is_running) {
871
- return new DebugCommandProcessor(this, opt_is_running);
872
- };
873
-
874
-
875
- function MakeBreakEvent(exec_state, break_points_hit) {
876
- return new BreakEvent(exec_state, break_points_hit);
877
- }
878
-
879
-
880
- function BreakEvent(exec_state, break_points_hit) {
881
- this.exec_state_ = exec_state;
882
- this.break_points_hit_ = break_points_hit;
883
- }
884
-
885
-
886
- BreakEvent.prototype.executionState = function() {
887
- return this.exec_state_;
888
- };
889
-
890
-
891
- BreakEvent.prototype.eventType = function() {
892
- return Debug.DebugEvent.Break;
893
- };
894
-
895
-
896
- BreakEvent.prototype.func = function() {
897
- return this.exec_state_.frame(0).func();
898
- };
899
-
900
-
901
- BreakEvent.prototype.sourceLine = function() {
902
- return this.exec_state_.frame(0).sourceLine();
903
- };
904
-
905
-
906
- BreakEvent.prototype.sourceColumn = function() {
907
- return this.exec_state_.frame(0).sourceColumn();
908
- };
909
-
910
-
911
- BreakEvent.prototype.sourceLineText = function() {
912
- return this.exec_state_.frame(0).sourceLineText();
913
- };
914
-
915
-
916
- BreakEvent.prototype.breakPointsHit = function() {
917
- return this.break_points_hit_;
918
- };
919
-
920
-
921
- BreakEvent.prototype.toJSONProtocol = function() {
922
- var o = { seq: next_response_seq++,
923
- type: "event",
924
- event: "break",
925
- body: { invocationText: this.exec_state_.frame(0).invocationText(),
926
- }
927
- };
928
-
929
- // Add script related information to the event if available.
930
- var script = this.func().script();
931
- if (script) {
932
- o.body.sourceLine = this.sourceLine(),
933
- o.body.sourceColumn = this.sourceColumn(),
934
- o.body.sourceLineText = this.sourceLineText(),
935
- o.body.script = MakeScriptObject_(script, false);
936
- }
937
-
938
- // Add an Array of break points hit if any.
939
- if (this.breakPointsHit()) {
940
- o.body.breakpoints = [];
941
- for (var i = 0; i < this.breakPointsHit().length; i++) {
942
- // Find the break point number. For break points originating from a
943
- // script break point supply the script break point number.
944
- var breakpoint = this.breakPointsHit()[i];
945
- var script_break_point = breakpoint.script_break_point();
946
- var number;
947
- if (script_break_point) {
948
- number = script_break_point.number();
949
- } else {
950
- number = breakpoint.number();
951
- }
952
- o.body.breakpoints.push(number);
953
- }
954
- }
955
- return JSON.stringify(ObjectToProtocolObject_(o));
956
- };
957
-
958
-
959
- function MakeExceptionEvent(exec_state, exception, uncaught) {
960
- return new ExceptionEvent(exec_state, exception, uncaught);
961
- }
962
-
963
-
964
- function ExceptionEvent(exec_state, exception, uncaught) {
965
- this.exec_state_ = exec_state;
966
- this.exception_ = exception;
967
- this.uncaught_ = uncaught;
968
- }
969
-
970
-
971
- ExceptionEvent.prototype.executionState = function() {
972
- return this.exec_state_;
973
- };
974
-
975
-
976
- ExceptionEvent.prototype.eventType = function() {
977
- return Debug.DebugEvent.Exception;
978
- };
979
-
980
-
981
- ExceptionEvent.prototype.exception = function() {
982
- return this.exception_;
983
- }
984
-
985
-
986
- ExceptionEvent.prototype.uncaught = function() {
987
- return this.uncaught_;
988
- }
989
-
990
-
991
- ExceptionEvent.prototype.func = function() {
992
- return this.exec_state_.frame(0).func();
993
- };
994
-
995
-
996
- ExceptionEvent.prototype.sourceLine = function() {
997
- return this.exec_state_.frame(0).sourceLine();
998
- };
999
-
1000
-
1001
- ExceptionEvent.prototype.sourceColumn = function() {
1002
- return this.exec_state_.frame(0).sourceColumn();
1003
- };
1004
-
1005
-
1006
- ExceptionEvent.prototype.sourceLineText = function() {
1007
- return this.exec_state_.frame(0).sourceLineText();
1008
- };
1009
-
1010
-
1011
- ExceptionEvent.prototype.toJSONProtocol = function() {
1012
- var o = new ProtocolMessage();
1013
- o.event = "exception";
1014
- o.body = { uncaught: this.uncaught_,
1015
- exception: MakeMirror(this.exception_)
1016
- };
1017
-
1018
- // Exceptions might happen whithout any JavaScript frames.
1019
- if (this.exec_state_.frameCount() > 0) {
1020
- o.body.sourceLine = this.sourceLine();
1021
- o.body.sourceColumn = this.sourceColumn();
1022
- o.body.sourceLineText = this.sourceLineText();
1023
-
1024
- // Add script information to the event if available.
1025
- var script = this.func().script();
1026
- if (script) {
1027
- o.body.script = MakeScriptObject_(script, false);
1028
- }
1029
- } else {
1030
- o.body.sourceLine = -1;
1031
- }
1032
-
1033
- return o.toJSONProtocol();
1034
- };
1035
-
1036
-
1037
- function MakeCompileEvent(exec_state, script, before) {
1038
- return new CompileEvent(exec_state, script, before);
1039
- }
1040
-
1041
-
1042
- function CompileEvent(exec_state, script, before) {
1043
- this.exec_state_ = exec_state;
1044
- this.script_ = MakeMirror(script);
1045
- this.before_ = before;
1046
- }
1047
-
1048
-
1049
- CompileEvent.prototype.executionState = function() {
1050
- return this.exec_state_;
1051
- };
1052
-
1053
-
1054
- CompileEvent.prototype.eventType = function() {
1055
- if (this.before_) {
1056
- return Debug.DebugEvent.BeforeCompile;
1057
- } else {
1058
- return Debug.DebugEvent.AfterCompile;
1059
- }
1060
- };
1061
-
1062
-
1063
- CompileEvent.prototype.script = function() {
1064
- return this.script_;
1065
- };
1066
-
1067
-
1068
- CompileEvent.prototype.toJSONProtocol = function() {
1069
- var o = new ProtocolMessage();
1070
- o.running = true;
1071
- if (this.before_) {
1072
- o.event = "beforeCompile";
1073
- } else {
1074
- o.event = "afterCompile";
1075
- }
1076
- o.body = {};
1077
- o.body.script = this.script_;
1078
-
1079
- return o.toJSONProtocol();
1080
- }
1081
-
1082
-
1083
- function MakeNewFunctionEvent(func) {
1084
- return new NewFunctionEvent(func);
1085
- }
1086
-
1087
-
1088
- function NewFunctionEvent(func) {
1089
- this.func = func;
1090
- }
1091
-
1092
-
1093
- NewFunctionEvent.prototype.eventType = function() {
1094
- return Debug.DebugEvent.NewFunction;
1095
- };
1096
-
1097
-
1098
- NewFunctionEvent.prototype.name = function() {
1099
- return this.func.name;
1100
- };
1101
-
1102
-
1103
- NewFunctionEvent.prototype.setBreakPoint = function(p) {
1104
- Debug.setBreakPoint(this.func, p || 0);
1105
- };
1106
-
1107
-
1108
- function MakeScriptCollectedEvent(exec_state, id) {
1109
- return new ScriptCollectedEvent(exec_state, id);
1110
- }
1111
-
1112
-
1113
- function ScriptCollectedEvent(exec_state, id) {
1114
- this.exec_state_ = exec_state;
1115
- this.id_ = id;
1116
- }
1117
-
1118
-
1119
- ScriptCollectedEvent.prototype.id = function() {
1120
- return this.id_;
1121
- };
1122
-
1123
-
1124
- ScriptCollectedEvent.prototype.executionState = function() {
1125
- return this.exec_state_;
1126
- };
1127
-
1128
-
1129
- ScriptCollectedEvent.prototype.toJSONProtocol = function() {
1130
- var o = new ProtocolMessage();
1131
- o.running = true;
1132
- o.event = "scriptCollected";
1133
- o.body = {};
1134
- o.body.script = { id: this.id() };
1135
- return o.toJSONProtocol();
1136
- }
1137
-
1138
-
1139
- function MakeScriptObject_(script, include_source) {
1140
- var o = { id: script.id(),
1141
- name: script.name(),
1142
- lineOffset: script.lineOffset(),
1143
- columnOffset: script.columnOffset(),
1144
- lineCount: script.lineCount(),
1145
- };
1146
- if (!IS_UNDEFINED(script.data())) {
1147
- o.data = script.data();
1148
- }
1149
- if (include_source) {
1150
- o.source = script.source();
1151
- }
1152
- return o;
1153
- };
1154
-
1155
-
1156
- function DebugCommandProcessor(exec_state, opt_is_running) {
1157
- this.exec_state_ = exec_state;
1158
- this.running_ = opt_is_running || false;
1159
- };
1160
-
1161
-
1162
- DebugCommandProcessor.prototype.processDebugRequest = function (request) {
1163
- return this.processDebugJSONRequest(request);
1164
- }
1165
-
1166
-
1167
- function ProtocolMessage(request) {
1168
- // Update sequence number.
1169
- this.seq = next_response_seq++;
1170
-
1171
- if (request) {
1172
- // If message is based on a request this is a response. Fill the initial
1173
- // response from the request.
1174
- this.type = 'response';
1175
- this.request_seq = request.seq;
1176
- this.command = request.command;
1177
- } else {
1178
- // If message is not based on a request it is a dabugger generated event.
1179
- this.type = 'event';
1180
- }
1181
- this.success = true;
1182
- // Handler may set this field to control debugger state.
1183
- this.running = undefined;
1184
- }
1185
-
1186
-
1187
- ProtocolMessage.prototype.setOption = function(name, value) {
1188
- if (!this.options_) {
1189
- this.options_ = {};
1190
- }
1191
- this.options_[name] = value;
1192
- }
1193
-
1194
-
1195
- ProtocolMessage.prototype.failed = function(message) {
1196
- this.success = false;
1197
- this.message = message;
1198
- }
1199
-
1200
-
1201
- ProtocolMessage.prototype.toJSONProtocol = function() {
1202
- // Encode the protocol header.
1203
- var json = {};
1204
- json.seq= this.seq;
1205
- if (this.request_seq) {
1206
- json.request_seq = this.request_seq;
1207
- }
1208
- json.type = this.type;
1209
- if (this.event) {
1210
- json.event = this.event;
1211
- }
1212
- if (this.command) {
1213
- json.command = this.command;
1214
- }
1215
- if (this.success) {
1216
- json.success = this.success;
1217
- } else {
1218
- json.success = false;
1219
- }
1220
- if (this.body) {
1221
- // Encode the body part.
1222
- var bodyJson;
1223
- var serializer = MakeMirrorSerializer(true, this.options_);
1224
- if (this.body instanceof Mirror) {
1225
- bodyJson = serializer.serializeValue(this.body);
1226
- } else if (this.body instanceof Array) {
1227
- bodyJson = [];
1228
- for (var i = 0; i < this.body.length; i++) {
1229
- if (this.body[i] instanceof Mirror) {
1230
- bodyJson.push(serializer.serializeValue(this.body[i]));
1231
- } else {
1232
- bodyJson.push(ObjectToProtocolObject_(this.body[i], serializer));
1233
- }
1234
- }
1235
- } else {
1236
- bodyJson = ObjectToProtocolObject_(this.body, serializer);
1237
- }
1238
- json.body = bodyJson;
1239
- json.refs = serializer.serializeReferencedObjects();
1240
- }
1241
- if (this.message) {
1242
- json.message = this.message;
1243
- }
1244
- json.running = this.running;
1245
- return JSON.stringify(json);
1246
- }
1247
-
1248
-
1249
- DebugCommandProcessor.prototype.createResponse = function(request) {
1250
- return new ProtocolMessage(request);
1251
- };
1252
-
1253
-
1254
- DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request) {
1255
- var request; // Current request.
1256
- var response; // Generated response.
1257
- try {
1258
- try {
1259
- // Convert the JSON string to an object.
1260
- request = %CompileString('(' + json_request + ')', false)();
1261
-
1262
- // Create an initial response.
1263
- response = this.createResponse(request);
1264
-
1265
- if (!request.type) {
1266
- throw new Error('Type not specified');
1267
- }
1268
-
1269
- if (request.type != 'request') {
1270
- throw new Error("Illegal type '" + request.type + "' in request");
1271
- }
1272
-
1273
- if (!request.command) {
1274
- throw new Error('Command not specified');
1275
- }
1276
-
1277
- if (request.arguments) {
1278
- var args = request.arguments;
1279
- // TODO(yurys): remove request.arguments.compactFormat check once
1280
- // ChromeDevTools are switched to 'inlineRefs'
1281
- if (args.inlineRefs || args.compactFormat) {
1282
- response.setOption('inlineRefs', true);
1283
- }
1284
- if (!IS_UNDEFINED(args.maxStringLength)) {
1285
- response.setOption('maxStringLength', args.maxStringLength);
1286
- }
1287
- }
1288
-
1289
- if (request.command == 'continue') {
1290
- this.continueRequest_(request, response);
1291
- } else if (request.command == 'break') {
1292
- this.breakRequest_(request, response);
1293
- } else if (request.command == 'setbreakpoint') {
1294
- this.setBreakPointRequest_(request, response);
1295
- } else if (request.command == 'changebreakpoint') {
1296
- this.changeBreakPointRequest_(request, response);
1297
- } else if (request.command == 'clearbreakpoint') {
1298
- this.clearBreakPointRequest_(request, response);
1299
- } else if (request.command == 'clearbreakpointgroup') {
1300
- this.clearBreakPointGroupRequest_(request, response);
1301
- } else if (request.command == 'listbreakpoints') {
1302
- this.listBreakpointsRequest_(request, response);
1303
- } else if (request.command == 'backtrace') {
1304
- this.backtraceRequest_(request, response);
1305
- } else if (request.command == 'frame') {
1306
- this.frameRequest_(request, response);
1307
- } else if (request.command == 'scopes') {
1308
- this.scopesRequest_(request, response);
1309
- } else if (request.command == 'scope') {
1310
- this.scopeRequest_(request, response);
1311
- } else if (request.command == 'evaluate') {
1312
- this.evaluateRequest_(request, response);
1313
- } else if (request.command == 'lookup') {
1314
- this.lookupRequest_(request, response);
1315
- } else if (request.command == 'references') {
1316
- this.referencesRequest_(request, response);
1317
- } else if (request.command == 'source') {
1318
- this.sourceRequest_(request, response);
1319
- } else if (request.command == 'scripts') {
1320
- this.scriptsRequest_(request, response);
1321
- } else if (request.command == 'threads') {
1322
- this.threadsRequest_(request, response);
1323
- } else if (request.command == 'suspend') {
1324
- this.suspendRequest_(request, response);
1325
- } else if (request.command == 'version') {
1326
- this.versionRequest_(request, response);
1327
- } else if (request.command == 'profile') {
1328
- this.profileRequest_(request, response);
1329
- } else if (request.command == 'changelive') {
1330
- this.changeLiveRequest_(request, response);
1331
- } else {
1332
- throw new Error('Unknown command "' + request.command + '" in request');
1333
- }
1334
- } catch (e) {
1335
- // If there is no response object created one (without command).
1336
- if (!response) {
1337
- response = this.createResponse();
1338
- }
1339
- response.success = false;
1340
- response.message = %ToString(e);
1341
- }
1342
-
1343
- // Return the response as a JSON encoded string.
1344
- try {
1345
- if (!IS_UNDEFINED(response.running)) {
1346
- // Response controls running state.
1347
- this.running_ = response.running;
1348
- }
1349
- response.running = this.running_;
1350
- return response.toJSONProtocol();
1351
- } catch (e) {
1352
- // Failed to generate response - return generic error.
1353
- return '{"seq":' + response.seq + ',' +
1354
- '"request_seq":' + request.seq + ',' +
1355
- '"type":"response",' +
1356
- '"success":false,' +
1357
- '"message":"Internal error: ' + %ToString(e) + '"}';
1358
- }
1359
- } catch (e) {
1360
- // Failed in one of the catch blocks above - most generic error.
1361
- return '{"seq":0,"type":"response","success":false,"message":"Internal error"}';
1362
- }
1363
- };
1364
-
1365
-
1366
- DebugCommandProcessor.prototype.continueRequest_ = function(request, response) {
1367
- // Check for arguments for continue.
1368
- if (request.arguments) {
1369
- var count = 1;
1370
- var action = Debug.StepAction.StepIn;
1371
-
1372
- // Pull out arguments.
1373
- var stepaction = request.arguments.stepaction;
1374
- var stepcount = request.arguments.stepcount;
1375
-
1376
- // Get the stepcount argument if any.
1377
- if (stepcount) {
1378
- count = %ToNumber(stepcount);
1379
- if (count < 0) {
1380
- throw new Error('Invalid stepcount argument "' + stepcount + '".');
1381
- }
1382
- }
1383
-
1384
- // Get the stepaction argument.
1385
- if (stepaction) {
1386
- if (stepaction == 'in') {
1387
- action = Debug.StepAction.StepIn;
1388
- } else if (stepaction == 'min') {
1389
- action = Debug.StepAction.StepMin;
1390
- } else if (stepaction == 'next') {
1391
- action = Debug.StepAction.StepNext;
1392
- } else if (stepaction == 'out') {
1393
- action = Debug.StepAction.StepOut;
1394
- } else {
1395
- throw new Error('Invalid stepaction argument "' + stepaction + '".');
1396
- }
1397
- }
1398
-
1399
- // Setup the VM for stepping.
1400
- this.exec_state_.prepareStep(action, count);
1401
- }
1402
-
1403
- // VM should be running after executing this request.
1404
- response.running = true;
1405
- };
1406
-
1407
-
1408
- DebugCommandProcessor.prototype.breakRequest_ = function(request, response) {
1409
- // Ignore as break command does not do anything when broken.
1410
- };
1411
-
1412
-
1413
- DebugCommandProcessor.prototype.setBreakPointRequest_ =
1414
- function(request, response) {
1415
- // Check for legal request.
1416
- if (!request.arguments) {
1417
- response.failed('Missing arguments');
1418
- return;
1419
- }
1420
-
1421
- // Pull out arguments.
1422
- var type = request.arguments.type;
1423
- var target = request.arguments.target;
1424
- var line = request.arguments.line;
1425
- var column = request.arguments.column;
1426
- var enabled = IS_UNDEFINED(request.arguments.enabled) ?
1427
- true : request.arguments.enabled;
1428
- var condition = request.arguments.condition;
1429
- var ignoreCount = request.arguments.ignoreCount;
1430
- var groupId = request.arguments.groupId;
1431
-
1432
- // Check for legal arguments.
1433
- if (!type || IS_UNDEFINED(target)) {
1434
- response.failed('Missing argument "type" or "target"');
1435
- return;
1436
- }
1437
- if (type != 'function' && type != 'handle' &&
1438
- type != 'script' && type != 'scriptId') {
1439
- response.failed('Illegal type "' + type + '"');
1440
- return;
1441
- }
1442
-
1443
- // Either function or script break point.
1444
- var break_point_number;
1445
- if (type == 'function') {
1446
- // Handle function break point.
1447
- if (!IS_STRING(target)) {
1448
- response.failed('Argument "target" is not a string value');
1449
- return;
1450
- }
1451
- var f;
1452
- try {
1453
- // Find the function through a global evaluate.
1454
- f = this.exec_state_.evaluateGlobal(target).value();
1455
- } catch (e) {
1456
- response.failed('Error: "' + %ToString(e) +
1457
- '" evaluating "' + target + '"');
1458
- return;
1459
- }
1460
- if (!IS_FUNCTION(f)) {
1461
- response.failed('"' + target + '" does not evaluate to a function');
1462
- return;
1463
- }
1464
-
1465
- // Set function break point.
1466
- break_point_number = Debug.setBreakPoint(f, line, column, condition);
1467
- } else if (type == 'handle') {
1468
- // Find the object pointed by the specified handle.
1469
- var handle = parseInt(target, 10);
1470
- var mirror = LookupMirror(handle);
1471
- if (!mirror) {
1472
- return response.failed('Object #' + handle + '# not found');
1473
- }
1474
- if (!mirror.isFunction()) {
1475
- return response.failed('Object #' + handle + '# is not a function');
1476
- }
1477
-
1478
- // Set function break point.
1479
- break_point_number = Debug.setBreakPoint(mirror.value(),
1480
- line, column, condition);
1481
- } else if (type == 'script') {
1482
- // set script break point.
1483
- break_point_number =
1484
- Debug.setScriptBreakPointByName(target, line, column, condition,
1485
- groupId);
1486
- } else { // type == 'scriptId.
1487
- break_point_number =
1488
- Debug.setScriptBreakPointById(target, line, column, condition, groupId);
1489
- }
1490
-
1491
- // Set additional break point properties.
1492
- var break_point = Debug.findBreakPoint(break_point_number);
1493
- if (ignoreCount) {
1494
- Debug.changeBreakPointIgnoreCount(break_point_number, ignoreCount);
1495
- }
1496
- if (!enabled) {
1497
- Debug.disableBreakPoint(break_point_number);
1498
- }
1499
-
1500
- // Add the break point number to the response.
1501
- response.body = { type: type,
1502
- breakpoint: break_point_number }
1503
-
1504
- // Add break point information to the response.
1505
- if (break_point instanceof ScriptBreakPoint) {
1506
- if (break_point.type() == Debug.ScriptBreakPointType.ScriptId) {
1507
- response.body.type = 'scriptId';
1508
- response.body.script_id = break_point.script_id();
1509
- } else {
1510
- response.body.type = 'scriptName';
1511
- response.body.script_name = break_point.script_name();
1512
- }
1513
- response.body.line = break_point.line();
1514
- response.body.column = break_point.column();
1515
- response.body.actual_locations = break_point.actual_locations();
1516
- } else {
1517
- response.body.type = 'function';
1518
- response.body.actual_locations = [break_point.actual_location];
1519
- }
1520
- };
1521
-
1522
-
1523
- DebugCommandProcessor.prototype.changeBreakPointRequest_ = function(request, response) {
1524
- // Check for legal request.
1525
- if (!request.arguments) {
1526
- response.failed('Missing arguments');
1527
- return;
1528
- }
1529
-
1530
- // Pull out arguments.
1531
- var break_point = %ToNumber(request.arguments.breakpoint);
1532
- var enabled = request.arguments.enabled;
1533
- var condition = request.arguments.condition;
1534
- var ignoreCount = request.arguments.ignoreCount;
1535
-
1536
- // Check for legal arguments.
1537
- if (!break_point) {
1538
- response.failed('Missing argument "breakpoint"');
1539
- return;
1540
- }
1541
-
1542
- // Change enabled state if supplied.
1543
- if (!IS_UNDEFINED(enabled)) {
1544
- if (enabled) {
1545
- Debug.enableBreakPoint(break_point);
1546
- } else {
1547
- Debug.disableBreakPoint(break_point);
1548
- }
1549
- }
1550
-
1551
- // Change condition if supplied
1552
- if (!IS_UNDEFINED(condition)) {
1553
- Debug.changeBreakPointCondition(break_point, condition);
1554
- }
1555
-
1556
- // Change ignore count if supplied
1557
- if (!IS_UNDEFINED(ignoreCount)) {
1558
- Debug.changeBreakPointIgnoreCount(break_point, ignoreCount);
1559
- }
1560
- }
1561
-
1562
-
1563
- DebugCommandProcessor.prototype.clearBreakPointGroupRequest_ = function(request, response) {
1564
- // Check for legal request.
1565
- if (!request.arguments) {
1566
- response.failed('Missing arguments');
1567
- return;
1568
- }
1569
-
1570
- // Pull out arguments.
1571
- var group_id = request.arguments.groupId;
1572
-
1573
- // Check for legal arguments.
1574
- if (!group_id) {
1575
- response.failed('Missing argument "groupId"');
1576
- return;
1577
- }
1578
-
1579
- var cleared_break_points = [];
1580
- var new_script_break_points = [];
1581
- for (var i = 0; i < script_break_points.length; i++) {
1582
- var next_break_point = script_break_points[i];
1583
- if (next_break_point.groupId() == group_id) {
1584
- cleared_break_points.push(next_break_point.number());
1585
- next_break_point.clear();
1586
- } else {
1587
- new_script_break_points.push(next_break_point);
1588
- }
1589
- }
1590
- script_break_points = new_script_break_points;
1591
-
1592
- // Add the cleared break point numbers to the response.
1593
- response.body = { breakpoints: cleared_break_points };
1594
- }
1595
-
1596
-
1597
- DebugCommandProcessor.prototype.clearBreakPointRequest_ = function(request, response) {
1598
- // Check for legal request.
1599
- if (!request.arguments) {
1600
- response.failed('Missing arguments');
1601
- return;
1602
- }
1603
-
1604
- // Pull out arguments.
1605
- var break_point = %ToNumber(request.arguments.breakpoint);
1606
-
1607
- // Check for legal arguments.
1608
- if (!break_point) {
1609
- response.failed('Missing argument "breakpoint"');
1610
- return;
1611
- }
1612
-
1613
- // Clear break point.
1614
- Debug.clearBreakPoint(break_point);
1615
-
1616
- // Add the cleared break point number to the response.
1617
- response.body = { breakpoint: break_point }
1618
- }
1619
-
1620
- DebugCommandProcessor.prototype.listBreakpointsRequest_ = function(request, response) {
1621
- var array = [];
1622
- for (var i = 0; i < script_break_points.length; i++) {
1623
- var break_point = script_break_points[i];
1624
-
1625
- var description = {
1626
- number: break_point.number(),
1627
- line: break_point.line(),
1628
- column: break_point.column(),
1629
- groupId: break_point.groupId(),
1630
- hit_count: break_point.hit_count(),
1631
- active: break_point.active(),
1632
- condition: break_point.condition(),
1633
- ignoreCount: break_point.ignoreCount(),
1634
- actual_locations: break_point.actual_locations()
1635
- }
1636
-
1637
- if (break_point.type() == Debug.ScriptBreakPointType.ScriptId) {
1638
- description.type = 'scriptId';
1639
- description.script_id = break_point.script_id();
1640
- } else {
1641
- description.type = 'scriptName';
1642
- description.script_name = break_point.script_name();
1643
- }
1644
- array.push(description);
1645
- }
1646
-
1647
- response.body = { breakpoints: array }
1648
- }
1649
-
1650
-
1651
- DebugCommandProcessor.prototype.backtraceRequest_ = function(request, response) {
1652
- // Get the number of frames.
1653
- var total_frames = this.exec_state_.frameCount();
1654
-
1655
- // Create simple response if there are no frames.
1656
- if (total_frames == 0) {
1657
- response.body = {
1658
- totalFrames: total_frames
1659
- }
1660
- return;
1661
- }
1662
-
1663
- // Default frame range to include in backtrace.
1664
- var from_index = 0
1665
- var to_index = kDefaultBacktraceLength;
1666
-
1667
- // Get the range from the arguments.
1668
- if (request.arguments) {
1669
- if (request.arguments.fromFrame) {
1670
- from_index = request.arguments.fromFrame;
1671
- }
1672
- if (request.arguments.toFrame) {
1673
- to_index = request.arguments.toFrame;
1674
- }
1675
- if (request.arguments.bottom) {
1676
- var tmp_index = total_frames - from_index;
1677
- from_index = total_frames - to_index
1678
- to_index = tmp_index;
1679
- }
1680
- if (from_index < 0 || to_index < 0) {
1681
- return response.failed('Invalid frame number');
1682
- }
1683
- }
1684
-
1685
- // Adjust the index.
1686
- to_index = Math.min(total_frames, to_index);
1687
-
1688
- if (to_index <= from_index) {
1689
- var error = 'Invalid frame range';
1690
- return response.failed(error);
1691
- }
1692
-
1693
- // Create the response body.
1694
- var frames = [];
1695
- for (var i = from_index; i < to_index; i++) {
1696
- frames.push(this.exec_state_.frame(i));
1697
- }
1698
- response.body = {
1699
- fromFrame: from_index,
1700
- toFrame: to_index,
1701
- totalFrames: total_frames,
1702
- frames: frames
1703
- }
1704
- };
1705
-
1706
-
1707
- DebugCommandProcessor.prototype.backtracec = function(cmd, args) {
1708
- return this.exec_state_.cframesValue();
1709
- };
1710
-
1711
-
1712
- DebugCommandProcessor.prototype.frameRequest_ = function(request, response) {
1713
- // No frames no source.
1714
- if (this.exec_state_.frameCount() == 0) {
1715
- return response.failed('No frames');
1716
- }
1717
-
1718
- // With no arguments just keep the selected frame.
1719
- if (request.arguments) {
1720
- var index = request.arguments.number;
1721
- if (index < 0 || this.exec_state_.frameCount() <= index) {
1722
- return response.failed('Invalid frame number');
1723
- }
1724
-
1725
- this.exec_state_.setSelectedFrame(request.arguments.number);
1726
- }
1727
- response.body = this.exec_state_.frame();
1728
- };
1729
-
1730
-
1731
- DebugCommandProcessor.prototype.frameForScopeRequest_ = function(request) {
1732
- // Get the frame for which the scope or scopes are requested. With no frameNumber
1733
- // argument use the currently selected frame.
1734
- if (request.arguments && !IS_UNDEFINED(request.arguments.frameNumber)) {
1735
- frame_index = request.arguments.frameNumber;
1736
- if (frame_index < 0 || this.exec_state_.frameCount() <= frame_index) {
1737
- return response.failed('Invalid frame number');
1738
- }
1739
- return this.exec_state_.frame(frame_index);
1740
- } else {
1741
- return this.exec_state_.frame();
1742
- }
1743
- }
1744
-
1745
-
1746
- DebugCommandProcessor.prototype.scopesRequest_ = function(request, response) {
1747
- // No frames no scopes.
1748
- if (this.exec_state_.frameCount() == 0) {
1749
- return response.failed('No scopes');
1750
- }
1751
-
1752
- // Get the frame for which the scopes are requested.
1753
- var frame = this.frameForScopeRequest_(request);
1754
-
1755
- // Fill all scopes for this frame.
1756
- var total_scopes = frame.scopeCount();
1757
- var scopes = [];
1758
- for (var i = 0; i < total_scopes; i++) {
1759
- scopes.push(frame.scope(i));
1760
- }
1761
- response.body = {
1762
- fromScope: 0,
1763
- toScope: total_scopes,
1764
- totalScopes: total_scopes,
1765
- scopes: scopes
1766
- }
1767
- };
1768
-
1769
-
1770
- DebugCommandProcessor.prototype.scopeRequest_ = function(request, response) {
1771
- // No frames no scopes.
1772
- if (this.exec_state_.frameCount() == 0) {
1773
- return response.failed('No scopes');
1774
- }
1775
-
1776
- // Get the frame for which the scope is requested.
1777
- var frame = this.frameForScopeRequest_(request);
1778
-
1779
- // With no scope argument just return top scope.
1780
- var scope_index = 0;
1781
- if (request.arguments && !IS_UNDEFINED(request.arguments.number)) {
1782
- scope_index = %ToNumber(request.arguments.number);
1783
- if (scope_index < 0 || frame.scopeCount() <= scope_index) {
1784
- return response.failed('Invalid scope number');
1785
- }
1786
- }
1787
-
1788
- response.body = frame.scope(scope_index);
1789
- };
1790
-
1791
-
1792
- DebugCommandProcessor.prototype.evaluateRequest_ = function(request, response) {
1793
- if (!request.arguments) {
1794
- return response.failed('Missing arguments');
1795
- }
1796
-
1797
- // Pull out arguments.
1798
- var expression = request.arguments.expression;
1799
- var frame = request.arguments.frame;
1800
- var global = request.arguments.global;
1801
- var disable_break = request.arguments.disable_break;
1802
-
1803
- // The expression argument could be an integer so we convert it to a
1804
- // string.
1805
- try {
1806
- expression = String(expression);
1807
- } catch(e) {
1808
- return response.failed('Failed to convert expression argument to string');
1809
- }
1810
-
1811
- // Check for legal arguments.
1812
- if (!IS_UNDEFINED(frame) && global) {
1813
- return response.failed('Arguments "frame" and "global" are exclusive');
1814
- }
1815
-
1816
- // Global evaluate.
1817
- if (global) {
1818
- // Evaluate in the global context.
1819
- response.body =
1820
- this.exec_state_.evaluateGlobal(expression, Boolean(disable_break));
1821
- return;
1822
- }
1823
-
1824
- // Default value for disable_break is true.
1825
- if (IS_UNDEFINED(disable_break)) {
1826
- disable_break = true;
1827
- }
1828
-
1829
- // No frames no evaluate in frame.
1830
- if (this.exec_state_.frameCount() == 0) {
1831
- return response.failed('No frames');
1832
- }
1833
-
1834
- // Check whether a frame was specified.
1835
- if (!IS_UNDEFINED(frame)) {
1836
- var frame_number = %ToNumber(frame);
1837
- if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
1838
- return response.failed('Invalid frame "' + frame + '"');
1839
- }
1840
- // Evaluate in the specified frame.
1841
- response.body = this.exec_state_.frame(frame_number).evaluate(
1842
- expression, Boolean(disable_break));
1843
- return;
1844
- } else {
1845
- // Evaluate in the selected frame.
1846
- response.body = this.exec_state_.frame().evaluate(
1847
- expression, Boolean(disable_break));
1848
- return;
1849
- }
1850
- };
1851
-
1852
-
1853
- DebugCommandProcessor.prototype.lookupRequest_ = function(request, response) {
1854
- if (!request.arguments) {
1855
- return response.failed('Missing arguments');
1856
- }
1857
-
1858
- // Pull out arguments.
1859
- var handles = request.arguments.handles;
1860
-
1861
- // Check for legal arguments.
1862
- if (IS_UNDEFINED(handles)) {
1863
- return response.failed('Argument "handles" missing');
1864
- }
1865
-
1866
- // Set 'includeSource' option for script lookup.
1867
- if (!IS_UNDEFINED(request.arguments.includeSource)) {
1868
- includeSource = %ToBoolean(request.arguments.includeSource);
1869
- response.setOption('includeSource', includeSource);
1870
- }
1871
-
1872
- // Lookup handles.
1873
- var mirrors = {};
1874
- for (var i = 0; i < handles.length; i++) {
1875
- var handle = handles[i];
1876
- var mirror = LookupMirror(handle);
1877
- if (!mirror) {
1878
- return response.failed('Object #' + handle + '# not found');
1879
- }
1880
- mirrors[handle] = mirror;
1881
- }
1882
- response.body = mirrors;
1883
- };
1884
-
1885
-
1886
- DebugCommandProcessor.prototype.referencesRequest_ =
1887
- function(request, response) {
1888
- if (!request.arguments) {
1889
- return response.failed('Missing arguments');
1890
- }
1891
-
1892
- // Pull out arguments.
1893
- var type = request.arguments.type;
1894
- var handle = request.arguments.handle;
1895
-
1896
- // Check for legal arguments.
1897
- if (IS_UNDEFINED(type)) {
1898
- return response.failed('Argument "type" missing');
1899
- }
1900
- if (IS_UNDEFINED(handle)) {
1901
- return response.failed('Argument "handle" missing');
1902
- }
1903
- if (type != 'referencedBy' && type != 'constructedBy') {
1904
- return response.failed('Invalid type "' + type + '"');
1905
- }
1906
-
1907
- // Lookup handle and return objects with references the object.
1908
- var mirror = LookupMirror(handle);
1909
- if (mirror) {
1910
- if (type == 'referencedBy') {
1911
- response.body = mirror.referencedBy();
1912
- } else {
1913
- response.body = mirror.constructedBy();
1914
- }
1915
- } else {
1916
- return response.failed('Object #' + handle + '# not found');
1917
- }
1918
- };
1919
-
1920
-
1921
- DebugCommandProcessor.prototype.sourceRequest_ = function(request, response) {
1922
- // No frames no source.
1923
- if (this.exec_state_.frameCount() == 0) {
1924
- return response.failed('No source');
1925
- }
1926
-
1927
- var from_line;
1928
- var to_line;
1929
- var frame = this.exec_state_.frame();
1930
- if (request.arguments) {
1931
- // Pull out arguments.
1932
- from_line = request.arguments.fromLine;
1933
- to_line = request.arguments.toLine;
1934
-
1935
- if (!IS_UNDEFINED(request.arguments.frame)) {
1936
- var frame_number = %ToNumber(request.arguments.frame);
1937
- if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
1938
- return response.failed('Invalid frame "' + frame + '"');
1939
- }
1940
- frame = this.exec_state_.frame(frame_number);
1941
- }
1942
- }
1943
-
1944
- // Get the script selected.
1945
- var script = frame.func().script();
1946
- if (!script) {
1947
- return response.failed('No source');
1948
- }
1949
-
1950
- // Get the source slice and fill it into the response.
1951
- var slice = script.sourceSlice(from_line, to_line);
1952
- if (!slice) {
1953
- return response.failed('Invalid line interval');
1954
- }
1955
- response.body = {};
1956
- response.body.source = slice.sourceText();
1957
- response.body.fromLine = slice.from_line;
1958
- response.body.toLine = slice.to_line;
1959
- response.body.fromPosition = slice.from_position;
1960
- response.body.toPosition = slice.to_position;
1961
- response.body.totalLines = script.lineCount();
1962
- };
1963
-
1964
-
1965
- DebugCommandProcessor.prototype.scriptsRequest_ = function(request, response) {
1966
- var types = ScriptTypeFlag(Debug.ScriptType.Normal);
1967
- var includeSource = false;
1968
- var idsToInclude = null;
1969
- if (request.arguments) {
1970
- // Pull out arguments.
1971
- if (!IS_UNDEFINED(request.arguments.types)) {
1972
- types = %ToNumber(request.arguments.types);
1973
- if (isNaN(types) || types < 0) {
1974
- return response.failed('Invalid types "' + request.arguments.types + '"');
1975
- }
1976
- }
1977
-
1978
- if (!IS_UNDEFINED(request.arguments.includeSource)) {
1979
- includeSource = %ToBoolean(request.arguments.includeSource);
1980
- response.setOption('includeSource', includeSource);
1981
- }
1982
-
1983
- if (IS_ARRAY(request.arguments.ids)) {
1984
- idsToInclude = {};
1985
- var ids = request.arguments.ids;
1986
- for (var i = 0; i < ids.length; i++) {
1987
- idsToInclude[ids[i]] = true;
1988
- }
1989
- }
1990
- }
1991
-
1992
- // Collect all scripts in the heap.
1993
- var scripts = %DebugGetLoadedScripts();
1994
-
1995
- response.body = [];
1996
-
1997
- for (var i = 0; i < scripts.length; i++) {
1998
- if (idsToInclude && !idsToInclude[scripts[i].id]) {
1999
- continue;
2000
- }
2001
- if (types & ScriptTypeFlag(scripts[i].type)) {
2002
- response.body.push(MakeMirror(scripts[i]));
2003
- }
2004
- }
2005
- };
2006
-
2007
-
2008
- DebugCommandProcessor.prototype.threadsRequest_ = function(request, response) {
2009
- // Get the number of threads.
2010
- var total_threads = this.exec_state_.threadCount();
2011
-
2012
- // Get information for all threads.
2013
- var threads = [];
2014
- for (var i = 0; i < total_threads; i++) {
2015
- var details = %GetThreadDetails(this.exec_state_.break_id, i);
2016
- var thread_info = { current: details[0],
2017
- id: details[1]
2018
- }
2019
- threads.push(thread_info);
2020
- }
2021
-
2022
- // Create the response body.
2023
- response.body = {
2024
- totalThreads: total_threads,
2025
- threads: threads
2026
- }
2027
- };
2028
-
2029
-
2030
- DebugCommandProcessor.prototype.suspendRequest_ = function(request, response) {
2031
- response.running = false;
2032
- };
2033
-
2034
-
2035
- DebugCommandProcessor.prototype.versionRequest_ = function(request, response) {
2036
- response.body = {
2037
- V8Version: %GetV8Version()
2038
- }
2039
- };
2040
-
2041
-
2042
- DebugCommandProcessor.prototype.profileRequest_ = function(request, response) {
2043
- if (!request.arguments) {
2044
- return response.failed('Missing arguments');
2045
- }
2046
- var modules = parseInt(request.arguments.modules);
2047
- if (isNaN(modules)) {
2048
- return response.failed('Modules is not an integer');
2049
- }
2050
- var tag = parseInt(request.arguments.tag);
2051
- if (isNaN(tag)) {
2052
- tag = 0;
2053
- }
2054
- if (request.arguments.command == 'resume') {
2055
- %ProfilerResume(modules, tag);
2056
- } else if (request.arguments.command == 'pause') {
2057
- %ProfilerPause(modules, tag);
2058
- } else {
2059
- return response.failed('Unknown command');
2060
- }
2061
- response.body = {};
2062
- };
2063
-
2064
-
2065
- DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response) {
2066
- if (!Debug.LiveEdit) {
2067
- return response.failed('LiveEdit feature is not supported');
2068
- }
2069
- if (!request.arguments) {
2070
- return response.failed('Missing arguments');
2071
- }
2072
- var script_id = request.arguments.script_id;
2073
- var preview_only = !!request.arguments.preview_only;
2074
-
2075
- var scripts = %DebugGetLoadedScripts();
2076
-
2077
- var the_script = null;
2078
- for (var i = 0; i < scripts.length; i++) {
2079
- if (scripts[i].id == script_id) {
2080
- the_script = scripts[i];
2081
- }
2082
- }
2083
- if (!the_script) {
2084
- response.failed('Script not found');
2085
- return;
2086
- }
2087
-
2088
- var change_log = new Array();
2089
-
2090
- if (!IS_STRING(request.arguments.new_source)) {
2091
- throw "new_source argument expected";
2092
- }
2093
-
2094
- var new_source = request.arguments.new_source;
2095
-
2096
- var result_description = Debug.LiveEdit.SetScriptSource(the_script,
2097
- new_source, preview_only, change_log);
2098
- response.body = {change_log: change_log, result: result_description};
2099
- };
2100
-
2101
-
2102
- // Check whether the previously processed command caused the VM to become
2103
- // running.
2104
- DebugCommandProcessor.prototype.isRunning = function() {
2105
- return this.running_;
2106
- }
2107
-
2108
-
2109
- DebugCommandProcessor.prototype.systemBreak = function(cmd, args) {
2110
- return %SystemBreak();
2111
- };
2112
-
2113
-
2114
- function NumberToHex8Str(n) {
2115
- var r = "";
2116
- for (var i = 0; i < 8; ++i) {
2117
- var c = hexCharArray[n & 0x0F]; // hexCharArray is defined in uri.js
2118
- r = c + r;
2119
- n = n >>> 4;
2120
- }
2121
- return r;
2122
- };
2123
-
2124
- DebugCommandProcessor.prototype.formatCFrames = function(cframes_value) {
2125
- var result = "";
2126
- if (cframes_value == null || cframes_value.length == 0) {
2127
- result += "(stack empty)";
2128
- } else {
2129
- for (var i = 0; i < cframes_value.length; ++i) {
2130
- if (i != 0) result += "\n";
2131
- result += this.formatCFrame(cframes_value[i]);
2132
- }
2133
- }
2134
- return result;
2135
- };
2136
-
2137
-
2138
- DebugCommandProcessor.prototype.formatCFrame = function(cframe_value) {
2139
- var result = "";
2140
- result += "0x" + NumberToHex8Str(cframe_value.address);
2141
- if (!IS_UNDEFINED(cframe_value.text)) {
2142
- result += " " + cframe_value.text;
2143
- }
2144
- return result;
2145
- }
2146
-
2147
-
2148
- /**
2149
- * Convert an Object to its debugger protocol representation. The representation
2150
- * may be serilized to a JSON object using JSON.stringify().
2151
- * This implementation simply runs through all string property names, converts
2152
- * each property value to a protocol value and adds the property to the result
2153
- * object. For type "object" the function will be called recursively. Note that
2154
- * circular structures will cause infinite recursion.
2155
- * @param {Object} object The object to format as protocol object.
2156
- * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2157
- * mirror objects are encountered.
2158
- * @return {Object} Protocol object value.
2159
- */
2160
- function ObjectToProtocolObject_(object, mirror_serializer) {
2161
- var content = {};
2162
- for (var key in object) {
2163
- // Only consider string keys.
2164
- if (typeof key == 'string') {
2165
- // Format the value based on its type.
2166
- var property_value_json = ValueToProtocolValue_(object[key],
2167
- mirror_serializer);
2168
- // Add the property if relevant.
2169
- if (!IS_UNDEFINED(property_value_json)) {
2170
- content[key] = property_value_json;
2171
- }
2172
- }
2173
- }
2174
-
2175
- return content;
2176
- }
2177
-
2178
-
2179
- /**
2180
- * Convert an array to its debugger protocol representation. It will convert
2181
- * each array element to a protocol value.
2182
- * @param {Array} array The array to format as protocol array.
2183
- * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2184
- * mirror objects are encountered.
2185
- * @return {Array} Protocol array value.
2186
- */
2187
- function ArrayToProtocolArray_(array, mirror_serializer) {
2188
- var json = [];
2189
- for (var i = 0; i < array.length; i++) {
2190
- json.push(ValueToProtocolValue_(array[i], mirror_serializer));
2191
- }
2192
- return json;
2193
- }
2194
-
2195
-
2196
- /**
2197
- * Convert a value to its debugger protocol representation.
2198
- * @param {*} value The value to format as protocol value.
2199
- * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2200
- * mirror objects are encountered.
2201
- * @return {*} Protocol value.
2202
- */
2203
- function ValueToProtocolValue_(value, mirror_serializer) {
2204
- // Format the value based on its type.
2205
- var json;
2206
- switch (typeof value) {
2207
- case 'object':
2208
- if (value instanceof Mirror) {
2209
- json = mirror_serializer.serializeValue(value);
2210
- } else if (IS_ARRAY(value)){
2211
- json = ArrayToProtocolArray_(value, mirror_serializer);
2212
- } else {
2213
- json = ObjectToProtocolObject_(value, mirror_serializer);
2214
- }
2215
- break;
2216
-
2217
- case 'boolean':
2218
- case 'string':
2219
- case 'number':
2220
- json = value;
2221
- break
2222
-
2223
- default:
2224
- json = null;
2225
- }
2226
- return json;
2227
- }