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,227 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifndef V8_D8_H_
29
- #define V8_D8_H_
30
-
31
- #include "v8.h"
32
- #include "hashmap.h"
33
-
34
-
35
- namespace v8 {
36
-
37
-
38
- namespace i = v8::internal;
39
-
40
-
41
- // A single counter in a counter collection.
42
- class Counter {
43
- public:
44
- static const int kMaxNameSize = 64;
45
- int32_t* Bind(const char* name, bool histogram);
46
- int32_t* ptr() { return &count_; }
47
- int32_t count() { return count_; }
48
- int32_t sample_total() { return sample_total_; }
49
- bool is_histogram() { return is_histogram_; }
50
- void AddSample(int32_t sample);
51
- private:
52
- int32_t count_;
53
- int32_t sample_total_;
54
- bool is_histogram_;
55
- uint8_t name_[kMaxNameSize];
56
- };
57
-
58
-
59
- // A set of counters and associated information. An instance of this
60
- // class is stored directly in the memory-mapped counters file if
61
- // the --map-counters options is used
62
- class CounterCollection {
63
- public:
64
- CounterCollection();
65
- Counter* GetNextCounter();
66
- private:
67
- static const unsigned kMaxCounters = 256;
68
- uint32_t magic_number_;
69
- uint32_t max_counters_;
70
- uint32_t max_name_size_;
71
- uint32_t counters_in_use_;
72
- Counter counters_[kMaxCounters];
73
- };
74
-
75
-
76
- class CounterMap {
77
- public:
78
- CounterMap(): hash_map_(Match) { }
79
- Counter* Lookup(const char* name) {
80
- i::HashMap::Entry* answer = hash_map_.Lookup(
81
- const_cast<char*>(name),
82
- Hash(name),
83
- false);
84
- if (!answer) return NULL;
85
- return reinterpret_cast<Counter*>(answer->value);
86
- }
87
- void Set(const char* name, Counter* value) {
88
- i::HashMap::Entry* answer = hash_map_.Lookup(
89
- const_cast<char*>(name),
90
- Hash(name),
91
- true);
92
- ASSERT(answer != NULL);
93
- answer->value = value;
94
- }
95
- class Iterator {
96
- public:
97
- explicit Iterator(CounterMap* map)
98
- : map_(&map->hash_map_), entry_(map_->Start()) { }
99
- void Next() { entry_ = map_->Next(entry_); }
100
- bool More() { return entry_ != NULL; }
101
- const char* CurrentKey() { return static_cast<const char*>(entry_->key); }
102
- Counter* CurrentValue() { return static_cast<Counter*>(entry_->value); }
103
- private:
104
- i::HashMap* map_;
105
- i::HashMap::Entry* entry_;
106
- };
107
- private:
108
- static int Hash(const char* name);
109
- static bool Match(void* key1, void* key2);
110
- i::HashMap hash_map_;
111
- };
112
-
113
-
114
- class Shell: public i::AllStatic {
115
- public:
116
- static bool ExecuteString(Handle<String> source,
117
- Handle<Value> name,
118
- bool print_result,
119
- bool report_exceptions);
120
- static const char* ToCString(const v8::String::Utf8Value& value);
121
- static void ReportException(TryCatch* try_catch);
122
- static void Initialize();
123
- static void OnExit();
124
- static int* LookupCounter(const char* name);
125
- static void* CreateHistogram(const char* name,
126
- int min,
127
- int max,
128
- size_t buckets);
129
- static void AddHistogramSample(void* histogram, int sample);
130
- static void MapCounters(const char* name);
131
- static Handle<String> ReadFile(const char* name);
132
- static void RunShell();
133
- static int Main(int argc, char* argv[]);
134
- static Handle<Array> GetCompletions(Handle<String> text,
135
- Handle<String> full);
136
- #ifdef ENABLE_DEBUGGER_SUPPORT
137
- static Handle<Object> DebugMessageDetails(Handle<String> message);
138
- static Handle<Value> DebugCommandToJSONRequest(Handle<String> command);
139
- #endif
140
-
141
- static Handle<Value> Print(const Arguments& args);
142
- static Handle<Value> Write(const Arguments& args);
143
- static Handle<Value> Yield(const Arguments& args);
144
- static Handle<Value> Quit(const Arguments& args);
145
- static Handle<Value> Version(const Arguments& args);
146
- static Handle<Value> Read(const Arguments& args);
147
- static Handle<Value> ReadLine(const Arguments& args);
148
- static Handle<Value> Load(const Arguments& args);
149
- // The OS object on the global object contains methods for performing
150
- // operating system calls:
151
- //
152
- // os.system("program_name", ["arg1", "arg2", ...], timeout1, timeout2) will
153
- // run the command, passing the arguments to the program. The standard output
154
- // of the program will be picked up and returned as a multiline string. If
155
- // timeout1 is present then it should be a number. -1 indicates no timeout
156
- // and a positive number is used as a timeout in milliseconds that limits the
157
- // time spent waiting between receiving output characters from the program.
158
- // timeout2, if present, should be a number indicating the limit in
159
- // milliseconds on the total running time of the program. Exceptions are
160
- // thrown on timeouts or other errors or if the exit status of the program
161
- // indicates an error.
162
- //
163
- // os.chdir(dir) changes directory to the given directory. Throws an
164
- // exception/ on error.
165
- //
166
- // os.setenv(variable, value) sets an environment variable. Repeated calls to
167
- // this method leak memory due to the API of setenv in the standard C library.
168
- //
169
- // os.umask(alue) calls the umask system call and returns the old umask.
170
- //
171
- // os.mkdirp(name, mask) creates a directory. The mask (if present) is anded
172
- // with the current umask. Intermediate directories are created if necessary.
173
- // An exception is not thrown if the directory already exists. Analogous to
174
- // the "mkdir -p" command.
175
- static Handle<Value> OSObject(const Arguments& args);
176
- static Handle<Value> System(const Arguments& args);
177
- static Handle<Value> ChangeDirectory(const Arguments& args);
178
- static Handle<Value> SetEnvironment(const Arguments& args);
179
- static Handle<Value> UnsetEnvironment(const Arguments& args);
180
- static Handle<Value> SetUMask(const Arguments& args);
181
- static Handle<Value> MakeDirectory(const Arguments& args);
182
- static Handle<Value> RemoveDirectory(const Arguments& args);
183
-
184
- static void AddOSMethods(Handle<ObjectTemplate> os_template);
185
-
186
- static Handle<Context> utility_context() { return utility_context_; }
187
-
188
- static const char* kHistoryFileName;
189
- static const char* kPrompt;
190
- private:
191
- static Persistent<Context> utility_context_;
192
- static Persistent<Context> evaluation_context_;
193
- static CounterMap* counter_map_;
194
- // We statically allocate a set of local counters to be used if we
195
- // don't want to store the stats in a memory-mapped file
196
- static CounterCollection local_counters_;
197
- static CounterCollection* counters_;
198
- static i::OS::MemoryMappedFile* counters_file_;
199
- static Counter* GetCounter(const char* name, bool is_histogram);
200
- };
201
-
202
-
203
- class LineEditor {
204
- public:
205
- enum Type { DUMB = 0, READLINE = 1 };
206
- LineEditor(Type type, const char* name);
207
- virtual ~LineEditor() { }
208
-
209
- virtual i::SmartPointer<char> Prompt(const char* prompt) = 0;
210
- virtual bool Open() { return true; }
211
- virtual bool Close() { return true; }
212
- virtual void AddHistory(const char* str) { }
213
-
214
- const char* name() { return name_; }
215
- static LineEditor* Get();
216
- private:
217
- Type type_;
218
- const char* name_;
219
- LineEditor* next_;
220
- static LineEditor* first_;
221
- };
222
-
223
-
224
- } // namespace v8
225
-
226
-
227
- #endif // V8_D8_H_
@@ -1,1683 +0,0 @@
1
- // Copyright 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
- String.prototype.startsWith = function (str) {
29
- if (str.length > this.length)
30
- return false;
31
- return this.substr(0, str.length) == str;
32
- }
33
-
34
- function log10(num) {
35
- return Math.log(num)/Math.log(10);
36
- }
37
-
38
- function ToInspectableObject(obj) {
39
- if (!obj && typeof obj === 'object') {
40
- return void 0;
41
- } else {
42
- return Object(obj);
43
- }
44
- }
45
-
46
- function GetCompletions(global, last, full) {
47
- var full_tokens = full.split();
48
- full = full_tokens.pop();
49
- var parts = full.split('.');
50
- parts.pop();
51
- var current = global;
52
- for (var i = 0; i < parts.length; i++) {
53
- var part = parts[i];
54
- var next = current[part];
55
- if (!next)
56
- return [];
57
- current = next;
58
- }
59
- var result = [];
60
- current = ToInspectableObject(current);
61
- while (typeof current !== 'undefined') {
62
- var mirror = new $debug.ObjectMirror(current);
63
- var properties = mirror.properties();
64
- for (var i = 0; i < properties.length; i++) {
65
- var name = properties[i].name();
66
- if (typeof name === 'string' && name.startsWith(last))
67
- result.push(name);
68
- }
69
- current = ToInspectableObject(current.__proto__);
70
- }
71
- return result;
72
- }
73
-
74
-
75
- // Global object holding debugger related constants and state.
76
- const Debug = {};
77
-
78
-
79
- // Debug events which can occour in the V8 JavaScript engine. These originate
80
- // from the API include file v8-debug.h.
81
- Debug.DebugEvent = { Break: 1,
82
- Exception: 2,
83
- NewFunction: 3,
84
- BeforeCompile: 4,
85
- AfterCompile: 5 };
86
-
87
-
88
- // The different types of scripts matching enum ScriptType in objects.h.
89
- Debug.ScriptType = { Native: 0,
90
- Extension: 1,
91
- Normal: 2 };
92
-
93
-
94
- // The different types of script compilations matching enum
95
- // Script::CompilationType in objects.h.
96
- Debug.ScriptCompilationType = { Host: 0,
97
- Eval: 1,
98
- JSON: 2 };
99
-
100
-
101
- // The different types of scopes matching constants runtime.cc.
102
- Debug.ScopeType = { Global: 0,
103
- Local: 1,
104
- With: 2,
105
- Closure: 3,
106
- Catch: 4 };
107
-
108
-
109
- // Current debug state.
110
- const kNoFrame = -1;
111
- Debug.State = {
112
- currentFrame: kNoFrame,
113
- currentSourceLine: -1
114
- }
115
- var trace_compile = false; // Tracing all compile events?
116
-
117
-
118
- // Process a debugger JSON message into a display text and a running status.
119
- // This function returns an object with properties "text" and "running" holding
120
- // this information.
121
- function DebugMessageDetails(message) {
122
- // Convert the JSON string to an object.
123
- var response = new ProtocolPackage(message);
124
-
125
- if (response.type() == 'event') {
126
- return DebugEventDetails(response);
127
- } else {
128
- return DebugResponseDetails(response);
129
- }
130
- }
131
-
132
- function DebugEventDetails(response) {
133
- details = {text:'', running:false}
134
-
135
- // Get the running state.
136
- details.running = response.running();
137
-
138
- var body = response.body();
139
- var result = '';
140
- switch (response.event()) {
141
- case 'break':
142
- if (body.breakpoints) {
143
- result += 'breakpoint';
144
- if (body.breakpoints.length > 1) {
145
- result += 's';
146
- }
147
- result += ' #';
148
- for (var i = 0; i < body.breakpoints.length; i++) {
149
- if (i > 0) {
150
- result += ', #';
151
- }
152
- result += body.breakpoints[i];
153
- }
154
- } else {
155
- result += 'break';
156
- }
157
- result += ' in ';
158
- result += body.invocationText;
159
- result += ', ';
160
- result += SourceInfo(body);
161
- result += '\n';
162
- result += SourceUnderline(body.sourceLineText, body.sourceColumn);
163
- Debug.State.currentSourceLine = body.sourceLine;
164
- Debug.State.currentFrame = 0;
165
- details.text = result;
166
- break;
167
-
168
- case 'exception':
169
- if (body.uncaught) {
170
- result += 'Uncaught: ';
171
- } else {
172
- result += 'Exception: ';
173
- }
174
- result += '"';
175
- result += body.exception.text;
176
- result += '"';
177
- if (body.sourceLine >= 0) {
178
- result += ', ';
179
- result += SourceInfo(body);
180
- result += '\n';
181
- result += SourceUnderline(body.sourceLineText, body.sourceColumn);
182
- Debug.State.currentSourceLine = body.sourceLine;
183
- Debug.State.currentFrame = 0;
184
- } else {
185
- result += ' (empty stack)';
186
- Debug.State.currentSourceLine = -1;
187
- Debug.State.currentFrame = kNoFrame;
188
- }
189
- details.text = result;
190
- break;
191
-
192
- case 'afterCompile':
193
- if (trace_compile) {
194
- result = 'Source ' + body.script.name + ' compiled:\n'
195
- var source = body.script.source;
196
- if (!(source[source.length - 1] == '\n')) {
197
- result += source;
198
- } else {
199
- result += source.substring(0, source.length - 1);
200
- }
201
- }
202
- details.text = result;
203
- break;
204
-
205
- default:
206
- details.text = 'Unknown debug event ' + response.event();
207
- }
208
-
209
- return details;
210
- };
211
-
212
-
213
- function SourceInfo(body) {
214
- var result = '';
215
-
216
- if (body.script) {
217
- if (body.script.name) {
218
- result += body.script.name;
219
- } else {
220
- result += '[unnamed]';
221
- }
222
- }
223
- result += ' line ';
224
- result += body.sourceLine + 1;
225
- result += ' column ';
226
- result += body.sourceColumn + 1;
227
-
228
- return result;
229
- }
230
-
231
-
232
- function SourceUnderline(source_text, position) {
233
- if (!source_text) {
234
- return;
235
- }
236
-
237
- // Create an underline with a caret pointing to the source position. If the
238
- // source contains a tab character the underline will have a tab character in
239
- // the same place otherwise the underline will have a space character.
240
- var underline = '';
241
- for (var i = 0; i < position; i++) {
242
- if (source_text[i] == '\t') {
243
- underline += '\t';
244
- } else {
245
- underline += ' ';
246
- }
247
- }
248
- underline += '^';
249
-
250
- // Return the source line text with the underline beneath.
251
- return source_text + '\n' + underline;
252
- };
253
-
254
-
255
- // Converts a text command to a JSON request.
256
- function DebugCommandToJSONRequest(cmd_line) {
257
- return new DebugRequest(cmd_line).JSONRequest();
258
- };
259
-
260
-
261
- function DebugRequest(cmd_line) {
262
- // If the very first character is a { assume that a JSON request have been
263
- // entered as a command. Converting that to a JSON request is trivial.
264
- if (cmd_line && cmd_line.length > 0 && cmd_line.charAt(0) == '{') {
265
- this.request_ = cmd_line;
266
- return;
267
- }
268
-
269
- // Trim string for leading and trailing whitespace.
270
- cmd_line = cmd_line.replace(/^\s+|\s+$/g, '');
271
-
272
- // Find the command.
273
- var pos = cmd_line.indexOf(' ');
274
- var cmd;
275
- var args;
276
- if (pos == -1) {
277
- cmd = cmd_line;
278
- args = '';
279
- } else {
280
- cmd = cmd_line.slice(0, pos);
281
- args = cmd_line.slice(pos).replace(/^\s+|\s+$/g, '');
282
- }
283
-
284
- // Switch on command.
285
- switch (cmd) {
286
- case 'continue':
287
- case 'c':
288
- this.request_ = this.continueCommandToJSONRequest_(args);
289
- break;
290
-
291
- case 'step':
292
- case 's':
293
- this.request_ = this.stepCommandToJSONRequest_(args);
294
- break;
295
-
296
- case 'backtrace':
297
- case 'bt':
298
- this.request_ = this.backtraceCommandToJSONRequest_(args);
299
- break;
300
-
301
- case 'frame':
302
- case 'f':
303
- this.request_ = this.frameCommandToJSONRequest_(args);
304
- break;
305
-
306
- case 'scopes':
307
- this.request_ = this.scopesCommandToJSONRequest_(args);
308
- break;
309
-
310
- case 'scope':
311
- this.request_ = this.scopeCommandToJSONRequest_(args);
312
- break;
313
-
314
- case 'print':
315
- case 'p':
316
- this.request_ = this.printCommandToJSONRequest_(args);
317
- break;
318
-
319
- case 'dir':
320
- this.request_ = this.dirCommandToJSONRequest_(args);
321
- break;
322
-
323
- case 'references':
324
- this.request_ = this.referencesCommandToJSONRequest_(args);
325
- break;
326
-
327
- case 'instances':
328
- this.request_ = this.instancesCommandToJSONRequest_(args);
329
- break;
330
-
331
- case 'source':
332
- this.request_ = this.sourceCommandToJSONRequest_(args);
333
- break;
334
-
335
- case 'scripts':
336
- this.request_ = this.scriptsCommandToJSONRequest_(args);
337
- break;
338
-
339
- case 'break':
340
- case 'b':
341
- this.request_ = this.breakCommandToJSONRequest_(args);
342
- break;
343
-
344
- case 'breakpoints':
345
- case 'bb':
346
- this.request_ = this.breakpointsCommandToJSONRequest_(args);
347
- break;
348
-
349
- case 'clear':
350
- this.request_ = this.clearCommandToJSONRequest_(args);
351
- break;
352
-
353
- case 'threads':
354
- this.request_ = this.threadsCommandToJSONRequest_(args);
355
- break;
356
-
357
- case 'trace':
358
- // Return undefined to indicate command handled internally (no JSON).
359
- this.request_ = void 0;
360
- this.traceCommand_(args);
361
- break;
362
-
363
- case 'help':
364
- case '?':
365
- this.helpCommand_(args);
366
- // Return undefined to indicate command handled internally (no JSON).
367
- this.request_ = void 0;
368
- break;
369
-
370
- default:
371
- throw new Error('Unknown command "' + cmd + '"');
372
- }
373
-
374
- last_cmd = cmd;
375
- }
376
-
377
- DebugRequest.prototype.JSONRequest = function() {
378
- return this.request_;
379
- }
380
-
381
-
382
- function RequestPacket(command) {
383
- this.seq = 0;
384
- this.type = 'request';
385
- this.command = command;
386
- }
387
-
388
-
389
- RequestPacket.prototype.toJSONProtocol = function() {
390
- // Encode the protocol header.
391
- var json = '{';
392
- json += '"seq":' + this.seq;
393
- json += ',"type":"' + this.type + '"';
394
- if (this.command) {
395
- json += ',"command":' + StringToJSON_(this.command);
396
- }
397
- if (this.arguments) {
398
- json += ',"arguments":';
399
- // Encode the arguments part.
400
- if (this.arguments.toJSONProtocol) {
401
- json += this.arguments.toJSONProtocol()
402
- } else {
403
- json += SimpleObjectToJSON_(this.arguments);
404
- }
405
- }
406
- json += '}';
407
- return json;
408
- }
409
-
410
-
411
- DebugRequest.prototype.createRequest = function(command) {
412
- return new RequestPacket(command);
413
- };
414
-
415
-
416
- // Create a JSON request for the evaluation command.
417
- DebugRequest.prototype.makeEvaluateJSONRequest_ = function(expression) {
418
- // Global varaible used to store whether a handle was requested.
419
- lookup_handle = null;
420
- // Check if the expression is a handle id in the form #<handle>#.
421
- var handle_match = expression.match(/^#([0-9]*)#$/);
422
- if (handle_match) {
423
- // Remember the handle requested in a global variable.
424
- lookup_handle = parseInt(handle_match[1]);
425
- // Build a lookup request.
426
- var request = this.createRequest('lookup');
427
- request.arguments = {};
428
- request.arguments.handles = [ lookup_handle ];
429
- return request.toJSONProtocol();
430
- } else {
431
- // Build an evaluate request.
432
- var request = this.createRequest('evaluate');
433
- request.arguments = {};
434
- request.arguments.expression = expression;
435
- // Request a global evaluation if there is no current frame.
436
- if (Debug.State.currentFrame == kNoFrame) {
437
- request.arguments.global = true;
438
- }
439
- return request.toJSONProtocol();
440
- }
441
- };
442
-
443
-
444
- // Create a JSON request for the references/instances command.
445
- DebugRequest.prototype.makeReferencesJSONRequest_ = function(handle, type) {
446
- // Build a references request.
447
- var handle_match = handle.match(/^#([0-9]*)#$/);
448
- if (handle_match) {
449
- var request = this.createRequest('references');
450
- request.arguments = {};
451
- request.arguments.type = type;
452
- request.arguments.handle = parseInt(handle_match[1]);
453
- return request.toJSONProtocol();
454
- } else {
455
- throw new Error('Invalid object id.');
456
- }
457
- };
458
-
459
-
460
- // Create a JSON request for the continue command.
461
- DebugRequest.prototype.continueCommandToJSONRequest_ = function(args) {
462
- var request = this.createRequest('continue');
463
- return request.toJSONProtocol();
464
- };
465
-
466
-
467
- // Create a JSON request for the step command.
468
- DebugRequest.prototype.stepCommandToJSONRequest_ = function(args) {
469
- // Requesting a step is through the continue command with additional
470
- // arguments.
471
- var request = this.createRequest('continue');
472
- request.arguments = {};
473
-
474
- // Process arguments if any.
475
- if (args && args.length > 0) {
476
- args = args.split(/\s*[ ]+\s*/g);
477
-
478
- if (args.length > 2) {
479
- throw new Error('Invalid step arguments.');
480
- }
481
-
482
- if (args.length > 0) {
483
- // Get step count argument if any.
484
- if (args.length == 2) {
485
- var stepcount = parseInt(args[1]);
486
- if (isNaN(stepcount) || stepcount <= 0) {
487
- throw new Error('Invalid step count argument "' + args[0] + '".');
488
- }
489
- request.arguments.stepcount = stepcount;
490
- }
491
-
492
- // Get the step action.
493
- switch (args[0]) {
494
- case 'in':
495
- case 'i':
496
- request.arguments.stepaction = 'in';
497
- break;
498
-
499
- case 'min':
500
- case 'm':
501
- request.arguments.stepaction = 'min';
502
- break;
503
-
504
- case 'next':
505
- case 'n':
506
- request.arguments.stepaction = 'next';
507
- break;
508
-
509
- case 'out':
510
- case 'o':
511
- request.arguments.stepaction = 'out';
512
- break;
513
-
514
- default:
515
- throw new Error('Invalid step argument "' + args[0] + '".');
516
- }
517
- }
518
- } else {
519
- // Default is step next.
520
- request.arguments.stepaction = 'next';
521
- }
522
-
523
- return request.toJSONProtocol();
524
- };
525
-
526
-
527
- // Create a JSON request for the backtrace command.
528
- DebugRequest.prototype.backtraceCommandToJSONRequest_ = function(args) {
529
- // Build a backtrace request from the text command.
530
- var request = this.createRequest('backtrace');
531
-
532
- // Default is to show top 10 frames.
533
- request.arguments = {};
534
- request.arguments.fromFrame = 0;
535
- request.arguments.toFrame = 10;
536
-
537
- args = args.split(/\s*[ ]+\s*/g);
538
- if (args.length == 1 && args[0].length > 0) {
539
- var frameCount = parseInt(args[0]);
540
- if (frameCount > 0) {
541
- // Show top frames.
542
- request.arguments.fromFrame = 0;
543
- request.arguments.toFrame = frameCount;
544
- } else {
545
- // Show bottom frames.
546
- request.arguments.fromFrame = 0;
547
- request.arguments.toFrame = -frameCount;
548
- request.arguments.bottom = true;
549
- }
550
- } else if (args.length == 2) {
551
- var fromFrame = parseInt(args[0]);
552
- var toFrame = parseInt(args[1]);
553
- if (isNaN(fromFrame) || fromFrame < 0) {
554
- throw new Error('Invalid start frame argument "' + args[0] + '".');
555
- }
556
- if (isNaN(toFrame) || toFrame < 0) {
557
- throw new Error('Invalid end frame argument "' + args[1] + '".');
558
- }
559
- if (fromFrame > toFrame) {
560
- throw new Error('Invalid arguments start frame cannot be larger ' +
561
- 'than end frame.');
562
- }
563
- // Show frame range.
564
- request.arguments.fromFrame = fromFrame;
565
- request.arguments.toFrame = toFrame + 1;
566
- } else if (args.length > 2) {
567
- throw new Error('Invalid backtrace arguments.');
568
- }
569
-
570
- return request.toJSONProtocol();
571
- };
572
-
573
-
574
- // Create a JSON request for the frame command.
575
- DebugRequest.prototype.frameCommandToJSONRequest_ = function(args) {
576
- // Build a frame request from the text command.
577
- var request = this.createRequest('frame');
578
- args = args.split(/\s*[ ]+\s*/g);
579
- if (args.length > 0 && args[0].length > 0) {
580
- request.arguments = {};
581
- request.arguments.number = args[0];
582
- }
583
- return request.toJSONProtocol();
584
- };
585
-
586
-
587
- // Create a JSON request for the scopes command.
588
- DebugRequest.prototype.scopesCommandToJSONRequest_ = function(args) {
589
- // Build a scopes request from the text command.
590
- var request = this.createRequest('scopes');
591
- return request.toJSONProtocol();
592
- };
593
-
594
-
595
- // Create a JSON request for the scope command.
596
- DebugRequest.prototype.scopeCommandToJSONRequest_ = function(args) {
597
- // Build a scope request from the text command.
598
- var request = this.createRequest('scope');
599
- args = args.split(/\s*[ ]+\s*/g);
600
- if (args.length > 0 && args[0].length > 0) {
601
- request.arguments = {};
602
- request.arguments.number = args[0];
603
- }
604
- return request.toJSONProtocol();
605
- };
606
-
607
-
608
- // Create a JSON request for the print command.
609
- DebugRequest.prototype.printCommandToJSONRequest_ = function(args) {
610
- // Build an evaluate request from the text command.
611
- if (args.length == 0) {
612
- throw new Error('Missing expression.');
613
- }
614
- return this.makeEvaluateJSONRequest_(args);
615
- };
616
-
617
-
618
- // Create a JSON request for the dir command.
619
- DebugRequest.prototype.dirCommandToJSONRequest_ = function(args) {
620
- // Build an evaluate request from the text command.
621
- if (args.length == 0) {
622
- throw new Error('Missing expression.');
623
- }
624
- return this.makeEvaluateJSONRequest_(args);
625
- };
626
-
627
-
628
- // Create a JSON request for the references command.
629
- DebugRequest.prototype.referencesCommandToJSONRequest_ = function(args) {
630
- // Build an evaluate request from the text command.
631
- if (args.length == 0) {
632
- throw new Error('Missing object id.');
633
- }
634
-
635
- return this.makeReferencesJSONRequest_(args, 'referencedBy');
636
- };
637
-
638
-
639
- // Create a JSON request for the instances command.
640
- DebugRequest.prototype.instancesCommandToJSONRequest_ = function(args) {
641
- // Build an evaluate request from the text command.
642
- if (args.length == 0) {
643
- throw new Error('Missing object id.');
644
- }
645
-
646
- // Build a references request.
647
- return this.makeReferencesJSONRequest_(args, 'constructedBy');
648
- };
649
-
650
-
651
- // Create a JSON request for the source command.
652
- DebugRequest.prototype.sourceCommandToJSONRequest_ = function(args) {
653
- // Build a evaluate request from the text command.
654
- var request = this.createRequest('source');
655
-
656
- // Default is ten lines starting five lines before the current location.
657
- var from = Debug.State.currentSourceLine - 5;
658
- var lines = 10;
659
-
660
- // Parse the arguments.
661
- args = args.split(/\s*[ ]+\s*/g);
662
- if (args.length > 1 && args[0].length > 0 && args[1].length > 0) {
663
- from = parseInt(args[0]) - 1;
664
- lines = parseInt(args[1]);
665
- } else if (args.length > 0 && args[0].length > 0) {
666
- from = parseInt(args[0]) - 1;
667
- }
668
-
669
- if (from < 0) from = 0;
670
- if (lines < 0) lines = 10;
671
-
672
- // Request source arround current source location.
673
- request.arguments = {};
674
- request.arguments.fromLine = from;
675
- request.arguments.toLine = from + lines;
676
-
677
- return request.toJSONProtocol();
678
- };
679
-
680
-
681
- // Create a JSON request for the scripts command.
682
- DebugRequest.prototype.scriptsCommandToJSONRequest_ = function(args) {
683
- // Build a evaluate request from the text command.
684
- var request = this.createRequest('scripts');
685
-
686
- // Process arguments if any.
687
- if (args && args.length > 0) {
688
- args = args.split(/\s*[ ]+\s*/g);
689
-
690
- if (args.length > 1) {
691
- throw new Error('Invalid scripts arguments.');
692
- }
693
-
694
- request.arguments = {};
695
- switch (args[0]) {
696
- case 'natives':
697
- request.arguments.types = ScriptTypeFlag(Debug.ScriptType.Native);
698
- break;
699
-
700
- case 'extensions':
701
- request.arguments.types = ScriptTypeFlag(Debug.ScriptType.Extension);
702
- break;
703
-
704
- case 'all':
705
- request.arguments.types =
706
- ScriptTypeFlag(Debug.ScriptType.Normal) |
707
- ScriptTypeFlag(Debug.ScriptType.Native) |
708
- ScriptTypeFlag(Debug.ScriptType.Extension);
709
- break;
710
-
711
- default:
712
- throw new Error('Invalid argument "' + args[0] + '".');
713
- }
714
- }
715
-
716
- return request.toJSONProtocol();
717
- };
718
-
719
-
720
- // Create a JSON request for the break command.
721
- DebugRequest.prototype.breakCommandToJSONRequest_ = function(args) {
722
- // Build a evaluate request from the text command.
723
- // Process arguments if any.
724
- if (args && args.length > 0) {
725
- var target = args;
726
- var type = 'function';
727
- var line;
728
- var column;
729
- var condition;
730
- var pos;
731
-
732
- var request = this.createRequest('setbreakpoint');
733
-
734
- // Check for breakpoint condition.
735
- pos = args.indexOf(' ');
736
- if (pos > 0) {
737
- target = args.substring(0, pos);
738
- condition = args.substring(pos + 1, args.length);
739
- }
740
-
741
- // Check for script breakpoint (name:line[:column]). If no ':' in break
742
- // specification it is considered a function break point.
743
- pos = target.indexOf(':');
744
- if (pos > 0) {
745
- type = 'script';
746
- var tmp = target.substring(pos + 1, target.length);
747
- target = target.substring(0, pos);
748
-
749
- // Check for both line and column.
750
- pos = tmp.indexOf(':');
751
- if (pos > 0) {
752
- column = parseInt(tmp.substring(pos + 1, tmp.length)) - 1;
753
- line = parseInt(tmp.substring(0, pos)) - 1;
754
- } else {
755
- line = parseInt(tmp) - 1;
756
- }
757
- } else if (target[0] == '#' && target[target.length - 1] == '#') {
758
- type = 'handle';
759
- target = target.substring(1, target.length - 1);
760
- } else {
761
- type = 'function';
762
- }
763
-
764
- request.arguments = {};
765
- request.arguments.type = type;
766
- request.arguments.target = target;
767
- request.arguments.line = line;
768
- request.arguments.column = column;
769
- request.arguments.condition = condition;
770
- } else {
771
- var request = this.createRequest('suspend');
772
- }
773
-
774
- return request.toJSONProtocol();
775
- };
776
-
777
-
778
- DebugRequest.prototype.breakpointsCommandToJSONRequest_ = function(args) {
779
- if (args && args.length > 0) {
780
- throw new Error('Unexpected arguments.');
781
- }
782
- var request = this.createRequest('listbreakpoints');
783
- return request.toJSONProtocol();
784
- };
785
-
786
-
787
- // Create a JSON request for the clear command.
788
- DebugRequest.prototype.clearCommandToJSONRequest_ = function(args) {
789
- // Build a evaluate request from the text command.
790
- var request = this.createRequest('clearbreakpoint');
791
-
792
- // Process arguments if any.
793
- if (args && args.length > 0) {
794
- request.arguments = {};
795
- request.arguments.breakpoint = parseInt(args);
796
- } else {
797
- throw new Error('Invalid break arguments.');
798
- }
799
-
800
- return request.toJSONProtocol();
801
- };
802
-
803
-
804
- // Create a JSON request for the threads command.
805
- DebugRequest.prototype.threadsCommandToJSONRequest_ = function(args) {
806
- // Build a threads request from the text command.
807
- var request = this.createRequest('threads');
808
- return request.toJSONProtocol();
809
- };
810
-
811
-
812
- // Handle the trace command.
813
- DebugRequest.prototype.traceCommand_ = function(args) {
814
- // Process arguments.
815
- if (args && args.length > 0) {
816
- if (args == 'compile') {
817
- trace_compile = !trace_compile;
818
- print('Tracing of compiled scripts ' + (trace_compile ? 'on' : 'off'));
819
- } else {
820
- throw new Error('Invalid trace arguments.');
821
- }
822
- } else {
823
- throw new Error('Invalid trace arguments.');
824
- }
825
- }
826
-
827
- // Handle the help command.
828
- DebugRequest.prototype.helpCommand_ = function(args) {
829
- // Help os quite simple.
830
- if (args && args.length > 0) {
831
- print('warning: arguments to \'help\' are ignored');
832
- }
833
-
834
- print('break');
835
- print('break location [condition]');
836
- print(' break on named function: location is a function name');
837
- print(' break on function: location is #<id>#');
838
- print(' break on script position: location is name:line[:column]');
839
- print('clear <breakpoint #>');
840
- print('backtrace [n] | [-n] | [from to]');
841
- print('frame <frame #>');
842
- print('scopes');
843
- print('scope <scope #>');
844
- print('step [in | next | out| min [step count]]');
845
- print('print <expression>');
846
- print('dir <expression>');
847
- print('source [from line [num lines]]');
848
- print('scripts');
849
- print('continue');
850
- print('trace compile');
851
- print('help');
852
- }
853
-
854
-
855
- function formatHandleReference_(value) {
856
- if (value.handle() >= 0) {
857
- return '#' + value.handle() + '#';
858
- } else {
859
- return '#Transient#';
860
- }
861
- }
862
-
863
-
864
- function formatObject_(value, include_properties) {
865
- var result = '';
866
- result += formatHandleReference_(value);
867
- result += ', type: object'
868
- result += ', constructor ';
869
- var ctor = value.constructorFunctionValue();
870
- result += formatHandleReference_(ctor);
871
- result += ', __proto__ ';
872
- var proto = value.protoObjectValue();
873
- result += formatHandleReference_(proto);
874
- result += ', ';
875
- result += value.propertyCount();
876
- result += ' properties.';
877
- if (include_properties) {
878
- result += '\n';
879
- for (var i = 0; i < value.propertyCount(); i++) {
880
- result += ' ';
881
- result += value.propertyName(i);
882
- result += ': ';
883
- var property_value = value.propertyValue(i);
884
- if (property_value instanceof ProtocolReference) {
885
- result += '<no type>';
886
- } else {
887
- if (property_value && property_value.type()) {
888
- result += property_value.type();
889
- } else {
890
- result += '<no type>';
891
- }
892
- }
893
- result += ' ';
894
- result += formatHandleReference_(property_value);
895
- result += '\n';
896
- }
897
- }
898
- return result;
899
- }
900
-
901
-
902
- function formatScope_(scope) {
903
- var result = '';
904
- var index = scope.index;
905
- result += '#' + (index <= 9 ? '0' : '') + index;
906
- result += ' ';
907
- switch (scope.type) {
908
- case Debug.ScopeType.Global:
909
- result += 'Global, ';
910
- result += '#' + scope.object.ref + '#';
911
- break;
912
- case Debug.ScopeType.Local:
913
- result += 'Local';
914
- break;
915
- case Debug.ScopeType.With:
916
- result += 'With, ';
917
- result += '#' + scope.object.ref + '#';
918
- break;
919
- case Debug.ScopeType.Catch:
920
- result += 'Catch, ';
921
- result += '#' + scope.object.ref + '#';
922
- break;
923
- case Debug.ScopeType.Closure:
924
- result += 'Closure';
925
- break;
926
- default:
927
- result += 'UNKNOWN';
928
- }
929
- return result;
930
- }
931
-
932
-
933
- // Convert a JSON response to text for display in a text based debugger.
934
- function DebugResponseDetails(response) {
935
- details = {text:'', running:false}
936
-
937
- try {
938
- if (!response.success()) {
939
- details.text = response.message();
940
- return details;
941
- }
942
-
943
- // Get the running state.
944
- details.running = response.running();
945
-
946
- var body = response.body();
947
- var result = '';
948
- switch (response.command()) {
949
- case 'suspend':
950
- details.text = 'stopped';
951
- break;
952
-
953
- case 'setbreakpoint':
954
- result = 'set breakpoint #';
955
- result += body.breakpoint;
956
- details.text = result;
957
- break;
958
-
959
- case 'clearbreakpoint':
960
- result = 'cleared breakpoint #';
961
- result += body.breakpoint;
962
- details.text = result;
963
- break;
964
-
965
- case 'listbreakpoints':
966
- result = 'breakpoints: (' + body.breakpoints.length + ')';
967
- for (var i = 0; i < body.breakpoints.length; i++) {
968
- var breakpoint = body.breakpoints[i];
969
- result += '\n id=' + breakpoint.number;
970
- result += ' type=' + breakpoint.type;
971
- if (breakpoint.script_id) {
972
- result += ' script_id=' + breakpoint.script_id;
973
- }
974
- if (breakpoint.script_name) {
975
- result += ' script_name=' + breakpoint.script_name;
976
- }
977
- result += ' line=' + breakpoint.line;
978
- if (breakpoint.column != null) {
979
- result += ' column=' + breakpoint.column;
980
- }
981
- if (breakpoint.groupId) {
982
- result += ' groupId=' + breakpoint.groupId;
983
- }
984
- if (breakpoint.ignoreCount) {
985
- result += ' ignoreCount=' + breakpoint.ignoreCount;
986
- }
987
- if (breakpoint.active === false) {
988
- result += ' inactive';
989
- }
990
- if (breakpoint.condition) {
991
- result += ' condition=' + breakpoint.condition;
992
- }
993
- result += ' hit_count=' + breakpoint.hit_count;
994
- }
995
- details.text = result;
996
- break;
997
-
998
- case 'backtrace':
999
- if (body.totalFrames == 0) {
1000
- result = '(empty stack)';
1001
- } else {
1002
- var result = 'Frames #' + body.fromFrame + ' to #' +
1003
- (body.toFrame - 1) + ' of ' + body.totalFrames + '\n';
1004
- for (i = 0; i < body.frames.length; i++) {
1005
- if (i != 0) result += '\n';
1006
- result += body.frames[i].text;
1007
- }
1008
- }
1009
- details.text = result;
1010
- break;
1011
-
1012
- case 'frame':
1013
- details.text = SourceUnderline(body.sourceLineText,
1014
- body.column);
1015
- Debug.State.currentSourceLine = body.line;
1016
- Debug.State.currentFrame = body.index;
1017
- break;
1018
-
1019
- case 'scopes':
1020
- if (body.totalScopes == 0) {
1021
- result = '(no scopes)';
1022
- } else {
1023
- result = 'Scopes #' + body.fromScope + ' to #' +
1024
- (body.toScope - 1) + ' of ' + body.totalScopes + '\n';
1025
- for (i = 0; i < body.scopes.length; i++) {
1026
- if (i != 0) {
1027
- result += '\n';
1028
- }
1029
- result += formatScope_(body.scopes[i]);
1030
- }
1031
- }
1032
- details.text = result;
1033
- break;
1034
-
1035
- case 'scope':
1036
- result += formatScope_(body);
1037
- result += '\n';
1038
- var scope_object_value = response.lookup(body.object.ref);
1039
- result += formatObject_(scope_object_value, true);
1040
- details.text = result;
1041
- break;
1042
-
1043
- case 'evaluate':
1044
- case 'lookup':
1045
- if (last_cmd == 'p' || last_cmd == 'print') {
1046
- result = body.text;
1047
- } else {
1048
- var value;
1049
- if (lookup_handle) {
1050
- value = response.bodyValue(lookup_handle);
1051
- } else {
1052
- value = response.bodyValue();
1053
- }
1054
- if (value.isObject()) {
1055
- result += formatObject_(value, true);
1056
- } else {
1057
- result += 'type: ';
1058
- result += value.type();
1059
- if (!value.isUndefined() && !value.isNull()) {
1060
- result += ', ';
1061
- if (value.isString()) {
1062
- result += '"';
1063
- }
1064
- result += value.value();
1065
- if (value.isString()) {
1066
- result += '"';
1067
- }
1068
- }
1069
- result += '\n';
1070
- }
1071
- }
1072
- details.text = result;
1073
- break;
1074
-
1075
- case 'references':
1076
- var count = body.length;
1077
- result += 'found ' + count + ' objects';
1078
- result += '\n';
1079
- for (var i = 0; i < count; i++) {
1080
- var value = response.bodyValue(i);
1081
- result += formatObject_(value, false);
1082
- result += '\n';
1083
- }
1084
- details.text = result;
1085
- break;
1086
-
1087
- case 'source':
1088
- // Get the source from the response.
1089
- var source = body.source;
1090
- var from_line = body.fromLine + 1;
1091
- var lines = source.split('\n');
1092
- var maxdigits = 1 + Math.floor(log10(from_line + lines.length));
1093
- if (maxdigits < 3) {
1094
- maxdigits = 3;
1095
- }
1096
- var result = '';
1097
- for (var num = 0; num < lines.length; num++) {
1098
- // Check if there's an extra newline at the end.
1099
- if (num == (lines.length - 1) && lines[num].length == 0) {
1100
- break;
1101
- }
1102
-
1103
- var current_line = from_line + num;
1104
- spacer = maxdigits - (1 + Math.floor(log10(current_line)));
1105
- if (current_line == Debug.State.currentSourceLine + 1) {
1106
- for (var i = 0; i < maxdigits; i++) {
1107
- result += '>';
1108
- }
1109
- result += ' ';
1110
- } else {
1111
- for (var i = 0; i < spacer; i++) {
1112
- result += ' ';
1113
- }
1114
- result += current_line + ': ';
1115
- }
1116
- result += lines[num];
1117
- result += '\n';
1118
- }
1119
- details.text = result;
1120
- break;
1121
-
1122
- case 'scripts':
1123
- var result = '';
1124
- for (i = 0; i < body.length; i++) {
1125
- if (i != 0) result += '\n';
1126
- if (body[i].id) {
1127
- result += body[i].id;
1128
- } else {
1129
- result += '[no id]';
1130
- }
1131
- result += ', ';
1132
- if (body[i].name) {
1133
- result += body[i].name;
1134
- } else {
1135
- if (body[i].compilationType == Debug.ScriptCompilationType.Eval) {
1136
- result += 'eval from ';
1137
- var script_value = response.lookup(body[i].evalFromScript.ref);
1138
- result += ' ' + script_value.field('name');
1139
- result += ':' + (body[i].evalFromLocation.line + 1);
1140
- result += ':' + body[i].evalFromLocation.column;
1141
- } else if (body[i].compilationType ==
1142
- Debug.ScriptCompilationType.JSON) {
1143
- result += 'JSON ';
1144
- } else { // body[i].compilation == Debug.ScriptCompilationType.Host
1145
- result += '[unnamed] ';
1146
- }
1147
- }
1148
- result += ' (lines: ';
1149
- result += body[i].lineCount;
1150
- result += ', length: ';
1151
- result += body[i].sourceLength;
1152
- if (body[i].type == Debug.ScriptType.Native) {
1153
- result += ', native';
1154
- } else if (body[i].type == Debug.ScriptType.Extension) {
1155
- result += ', extension';
1156
- }
1157
- result += '), [';
1158
- var sourceStart = body[i].sourceStart;
1159
- if (sourceStart.length > 40) {
1160
- sourceStart = sourceStart.substring(0, 37) + '...';
1161
- }
1162
- result += sourceStart;
1163
- result += ']';
1164
- }
1165
- details.text = result;
1166
- break;
1167
-
1168
- case 'threads':
1169
- var result = 'Active V8 threads: ' + body.totalThreads + '\n';
1170
- body.threads.sort(function(a, b) { return a.id - b.id; });
1171
- for (i = 0; i < body.threads.length; i++) {
1172
- result += body.threads[i].current ? '*' : ' ';
1173
- result += ' ';
1174
- result += body.threads[i].id;
1175
- result += '\n';
1176
- }
1177
- details.text = result;
1178
- break;
1179
-
1180
- case 'continue':
1181
- details.text = "(running)";
1182
- break;
1183
-
1184
- default:
1185
- details.text =
1186
- 'Response for unknown command \'' + response.command() + '\'' +
1187
- ' (' + response.raw_json() + ')';
1188
- }
1189
- } catch (e) {
1190
- details.text = 'Error: "' + e + '" formatting response';
1191
- }
1192
-
1193
- return details;
1194
- };
1195
-
1196
-
1197
- /**
1198
- * Protocol packages send from the debugger.
1199
- * @param {string} json - raw protocol packet as JSON string.
1200
- * @constructor
1201
- */
1202
- function ProtocolPackage(json) {
1203
- this.raw_json_ = json;
1204
- this.packet_ = JSON.parse(json);
1205
- this.refs_ = [];
1206
- if (this.packet_.refs) {
1207
- for (var i = 0; i < this.packet_.refs.length; i++) {
1208
- this.refs_[this.packet_.refs[i].handle] = this.packet_.refs[i];
1209
- }
1210
- }
1211
- }
1212
-
1213
-
1214
- /**
1215
- * Get the packet type.
1216
- * @return {String} the packet type
1217
- */
1218
- ProtocolPackage.prototype.type = function() {
1219
- return this.packet_.type;
1220
- }
1221
-
1222
-
1223
- /**
1224
- * Get the packet event.
1225
- * @return {Object} the packet event
1226
- */
1227
- ProtocolPackage.prototype.event = function() {
1228
- return this.packet_.event;
1229
- }
1230
-
1231
-
1232
- /**
1233
- * Get the packet request sequence.
1234
- * @return {number} the packet request sequence
1235
- */
1236
- ProtocolPackage.prototype.requestSeq = function() {
1237
- return this.packet_.request_seq;
1238
- }
1239
-
1240
-
1241
- /**
1242
- * Get the packet request sequence.
1243
- * @return {number} the packet request sequence
1244
- */
1245
- ProtocolPackage.prototype.running = function() {
1246
- return this.packet_.running ? true : false;
1247
- }
1248
-
1249
-
1250
- ProtocolPackage.prototype.success = function() {
1251
- return this.packet_.success ? true : false;
1252
- }
1253
-
1254
-
1255
- ProtocolPackage.prototype.message = function() {
1256
- return this.packet_.message;
1257
- }
1258
-
1259
-
1260
- ProtocolPackage.prototype.command = function() {
1261
- return this.packet_.command;
1262
- }
1263
-
1264
-
1265
- ProtocolPackage.prototype.body = function() {
1266
- return this.packet_.body;
1267
- }
1268
-
1269
-
1270
- ProtocolPackage.prototype.bodyValue = function(index) {
1271
- if (index != null) {
1272
- return new ProtocolValue(this.packet_.body[index], this);
1273
- } else {
1274
- return new ProtocolValue(this.packet_.body, this);
1275
- }
1276
- }
1277
-
1278
-
1279
- ProtocolPackage.prototype.body = function() {
1280
- return this.packet_.body;
1281
- }
1282
-
1283
-
1284
- ProtocolPackage.prototype.lookup = function(handle) {
1285
- var value = this.refs_[handle];
1286
- if (value) {
1287
- return new ProtocolValue(value, this);
1288
- } else {
1289
- return new ProtocolReference(handle);
1290
- }
1291
- }
1292
-
1293
-
1294
- ProtocolPackage.prototype.raw_json = function() {
1295
- return this.raw_json_;
1296
- }
1297
-
1298
-
1299
- function ProtocolValue(value, packet) {
1300
- this.value_ = value;
1301
- this.packet_ = packet;
1302
- }
1303
-
1304
-
1305
- /**
1306
- * Get the value type.
1307
- * @return {String} the value type
1308
- */
1309
- ProtocolValue.prototype.type = function() {
1310
- return this.value_.type;
1311
- }
1312
-
1313
-
1314
- /**
1315
- * Get a metadata field from a protocol value.
1316
- * @return {Object} the metadata field value
1317
- */
1318
- ProtocolValue.prototype.field = function(name) {
1319
- return this.value_[name];
1320
- }
1321
-
1322
-
1323
- /**
1324
- * Check is the value is a primitive value.
1325
- * @return {boolean} true if the value is primitive
1326
- */
1327
- ProtocolValue.prototype.isPrimitive = function() {
1328
- return this.isUndefined() || this.isNull() || this.isBoolean() ||
1329
- this.isNumber() || this.isString();
1330
- }
1331
-
1332
-
1333
- /**
1334
- * Get the object handle.
1335
- * @return {number} the value handle
1336
- */
1337
- ProtocolValue.prototype.handle = function() {
1338
- return this.value_.handle;
1339
- }
1340
-
1341
-
1342
- /**
1343
- * Check is the value is undefined.
1344
- * @return {boolean} true if the value is undefined
1345
- */
1346
- ProtocolValue.prototype.isUndefined = function() {
1347
- return this.value_.type == 'undefined';
1348
- }
1349
-
1350
-
1351
- /**
1352
- * Check is the value is null.
1353
- * @return {boolean} true if the value is null
1354
- */
1355
- ProtocolValue.prototype.isNull = function() {
1356
- return this.value_.type == 'null';
1357
- }
1358
-
1359
-
1360
- /**
1361
- * Check is the value is a boolean.
1362
- * @return {boolean} true if the value is a boolean
1363
- */
1364
- ProtocolValue.prototype.isBoolean = function() {
1365
- return this.value_.type == 'boolean';
1366
- }
1367
-
1368
-
1369
- /**
1370
- * Check is the value is a number.
1371
- * @return {boolean} true if the value is a number
1372
- */
1373
- ProtocolValue.prototype.isNumber = function() {
1374
- return this.value_.type == 'number';
1375
- }
1376
-
1377
-
1378
- /**
1379
- * Check is the value is a string.
1380
- * @return {boolean} true if the value is a string
1381
- */
1382
- ProtocolValue.prototype.isString = function() {
1383
- return this.value_.type == 'string';
1384
- }
1385
-
1386
-
1387
- /**
1388
- * Check is the value is an object.
1389
- * @return {boolean} true if the value is an object
1390
- */
1391
- ProtocolValue.prototype.isObject = function() {
1392
- return this.value_.type == 'object' || this.value_.type == 'function' ||
1393
- this.value_.type == 'error' || this.value_.type == 'regexp';
1394
- }
1395
-
1396
-
1397
- /**
1398
- * Get the constructor function
1399
- * @return {ProtocolValue} constructor function
1400
- */
1401
- ProtocolValue.prototype.constructorFunctionValue = function() {
1402
- var ctor = this.value_.constructorFunction;
1403
- return this.packet_.lookup(ctor.ref);
1404
- }
1405
-
1406
-
1407
- /**
1408
- * Get the __proto__ value
1409
- * @return {ProtocolValue} __proto__ value
1410
- */
1411
- ProtocolValue.prototype.protoObjectValue = function() {
1412
- var proto = this.value_.protoObject;
1413
- return this.packet_.lookup(proto.ref);
1414
- }
1415
-
1416
-
1417
- /**
1418
- * Get the number og properties.
1419
- * @return {number} the number of properties
1420
- */
1421
- ProtocolValue.prototype.propertyCount = function() {
1422
- return this.value_.properties ? this.value_.properties.length : 0;
1423
- }
1424
-
1425
-
1426
- /**
1427
- * Get the specified property name.
1428
- * @return {string} property name
1429
- */
1430
- ProtocolValue.prototype.propertyName = function(index) {
1431
- var property = this.value_.properties[index];
1432
- return property.name;
1433
- }
1434
-
1435
-
1436
- /**
1437
- * Return index for the property name.
1438
- * @param name The property name to look for
1439
- * @return {number} index for the property name
1440
- */
1441
- ProtocolValue.prototype.propertyIndex = function(name) {
1442
- for (var i = 0; i < this.propertyCount(); i++) {
1443
- if (this.value_.properties[i].name == name) {
1444
- return i;
1445
- }
1446
- }
1447
- return null;
1448
- }
1449
-
1450
-
1451
- /**
1452
- * Get the specified property value.
1453
- * @return {ProtocolValue} property value
1454
- */
1455
- ProtocolValue.prototype.propertyValue = function(index) {
1456
- var property = this.value_.properties[index];
1457
- return this.packet_.lookup(property.ref);
1458
- }
1459
-
1460
-
1461
- /**
1462
- * Check is the value is a string.
1463
- * @return {boolean} true if the value is a string
1464
- */
1465
- ProtocolValue.prototype.value = function() {
1466
- return this.value_.value;
1467
- }
1468
-
1469
-
1470
- function ProtocolReference(handle) {
1471
- this.handle_ = handle;
1472
- }
1473
-
1474
-
1475
- ProtocolReference.prototype.handle = function() {
1476
- return this.handle_;
1477
- }
1478
-
1479
-
1480
- function MakeJSONPair_(name, value) {
1481
- return '"' + name + '":' + value;
1482
- }
1483
-
1484
-
1485
- function ArrayToJSONObject_(content) {
1486
- return '{' + content.join(',') + '}';
1487
- }
1488
-
1489
-
1490
- function ArrayToJSONArray_(content) {
1491
- return '[' + content.join(',') + ']';
1492
- }
1493
-
1494
-
1495
- function BooleanToJSON_(value) {
1496
- return String(value);
1497
- }
1498
-
1499
-
1500
- function NumberToJSON_(value) {
1501
- return String(value);
1502
- }
1503
-
1504
-
1505
- // Mapping of some control characters to avoid the \uXXXX syntax for most
1506
- // commonly used control cahracters.
1507
- const ctrlCharMap_ = {
1508
- '\b': '\\b',
1509
- '\t': '\\t',
1510
- '\n': '\\n',
1511
- '\f': '\\f',
1512
- '\r': '\\r',
1513
- '"' : '\\"',
1514
- '\\': '\\\\'
1515
- };
1516
-
1517
-
1518
- // Regular expression testing for ", \ and control characters (0x00 - 0x1F).
1519
- const ctrlCharTest_ = new RegExp('["\\\\\x00-\x1F]');
1520
-
1521
-
1522
- // Regular expression matching ", \ and control characters (0x00 - 0x1F)
1523
- // globally.
1524
- const ctrlCharMatch_ = new RegExp('["\\\\\x00-\x1F]', 'g');
1525
-
1526
-
1527
- /**
1528
- * Convert a String to its JSON representation (see http://www.json.org/). To
1529
- * avoid depending on the String object this method calls the functions in
1530
- * string.js directly and not through the value.
1531
- * @param {String} value The String value to format as JSON
1532
- * @return {string} JSON formatted String value
1533
- */
1534
- function StringToJSON_(value) {
1535
- // Check for" , \ and control characters (0x00 - 0x1F). No need to call
1536
- // RegExpTest as ctrlchar is constructed using RegExp.
1537
- if (ctrlCharTest_.test(value)) {
1538
- // Replace ", \ and control characters (0x00 - 0x1F).
1539
- return '"' +
1540
- value.replace(ctrlCharMatch_, function (char) {
1541
- // Use charmap if possible.
1542
- var mapped = ctrlCharMap_[char];
1543
- if (mapped) return mapped;
1544
- mapped = char.charCodeAt();
1545
- // Convert control character to unicode escape sequence.
1546
- return '\\u00' +
1547
- '0' + // TODO %NumberToRadixString(Math.floor(mapped / 16), 16) +
1548
- '0' // TODO %NumberToRadixString(mapped % 16, 16);
1549
- })
1550
- + '"';
1551
- }
1552
-
1553
- // Simple string with no special characters.
1554
- return '"' + value + '"';
1555
- }
1556
-
1557
-
1558
- /**
1559
- * Convert a Date to ISO 8601 format. To avoid depending on the Date object
1560
- * this method calls the functions in date.js directly and not through the
1561
- * value.
1562
- * @param {Date} value The Date value to format as JSON
1563
- * @return {string} JSON formatted Date value
1564
- */
1565
- function DateToISO8601_(value) {
1566
- function f(n) {
1567
- return n < 10 ? '0' + n : n;
1568
- }
1569
- function g(n) {
1570
- return n < 10 ? '00' + n : n < 100 ? '0' + n : n;
1571
- }
1572
- return builtins.GetUTCFullYearFrom(value) + '-' +
1573
- f(builtins.GetUTCMonthFrom(value) + 1) + '-' +
1574
- f(builtins.GetUTCDateFrom(value)) + 'T' +
1575
- f(builtins.GetUTCHoursFrom(value)) + ':' +
1576
- f(builtins.GetUTCMinutesFrom(value)) + ':' +
1577
- f(builtins.GetUTCSecondsFrom(value)) + '.' +
1578
- g(builtins.GetUTCMillisecondsFrom(value)) + 'Z';
1579
- }
1580
-
1581
-
1582
- /**
1583
- * Convert a Date to ISO 8601 format. To avoid depending on the Date object
1584
- * this method calls the functions in date.js directly and not through the
1585
- * value.
1586
- * @param {Date} value The Date value to format as JSON
1587
- * @return {string} JSON formatted Date value
1588
- */
1589
- function DateToJSON_(value) {
1590
- return '"' + DateToISO8601_(value) + '"';
1591
- }
1592
-
1593
-
1594
- /**
1595
- * Convert an Object to its JSON representation (see http://www.json.org/).
1596
- * This implementation simply runs through all string property names and adds
1597
- * each property to the JSON representation for some predefined types. For type
1598
- * "object" the function calls itself recursively unless the object has the
1599
- * function property "toJSONProtocol" in which case that is used. This is not
1600
- * a general implementation but sufficient for the debugger. Note that circular
1601
- * structures will cause infinite recursion.
1602
- * @param {Object} object The object to format as JSON
1603
- * @return {string} JSON formatted object value
1604
- */
1605
- function SimpleObjectToJSON_(object) {
1606
- var content = [];
1607
- for (var key in object) {
1608
- // Only consider string keys.
1609
- if (typeof key == 'string') {
1610
- var property_value = object[key];
1611
-
1612
- // Format the value based on its type.
1613
- var property_value_json;
1614
- switch (typeof property_value) {
1615
- case 'object':
1616
- if (typeof property_value.toJSONProtocol == 'function') {
1617
- property_value_json = property_value.toJSONProtocol(true)
1618
- } else if (property_value.constructor.name == 'Array'){
1619
- property_value_json = SimpleArrayToJSON_(property_value);
1620
- } else {
1621
- property_value_json = SimpleObjectToJSON_(property_value);
1622
- }
1623
- break;
1624
-
1625
- case 'boolean':
1626
- property_value_json = BooleanToJSON_(property_value);
1627
- break;
1628
-
1629
- case 'number':
1630
- property_value_json = NumberToJSON_(property_value);
1631
- break;
1632
-
1633
- case 'string':
1634
- property_value_json = StringToJSON_(property_value);
1635
- break;
1636
-
1637
- default:
1638
- property_value_json = null;
1639
- }
1640
-
1641
- // Add the property if relevant.
1642
- if (property_value_json) {
1643
- content.push(StringToJSON_(key) + ':' + property_value_json);
1644
- }
1645
- }
1646
- }
1647
-
1648
- // Make JSON object representation.
1649
- return '{' + content.join(',') + '}';
1650
- }
1651
-
1652
-
1653
- /**
1654
- * Convert an array to its JSON representation. This is a VERY simple
1655
- * implementation just to support what is needed for the debugger.
1656
- * @param {Array} arrya The array to format as JSON
1657
- * @return {string} JSON formatted array value
1658
- */
1659
- function SimpleArrayToJSON_(array) {
1660
- // Make JSON array representation.
1661
- var json = '[';
1662
- for (var i = 0; i < array.length; i++) {
1663
- if (i != 0) {
1664
- json += ',';
1665
- }
1666
- var elem = array[i];
1667
- if (elem.toJSONProtocol) {
1668
- json += elem.toJSONProtocol(true)
1669
- } else if (typeof(elem) === 'object') {
1670
- json += SimpleObjectToJSON_(elem);
1671
- } else if (typeof(elem) === 'boolean') {
1672
- json += BooleanToJSON_(elem);
1673
- } else if (typeof(elem) === 'number') {
1674
- json += NumberToJSON_(elem);
1675
- } else if (typeof(elem) === 'string') {
1676
- json += StringToJSON_(elem);
1677
- } else {
1678
- json += elem;
1679
- }
1680
- }
1681
- json += ']';
1682
- return json;
1683
- }