therubyracer 0.4.7-x86-darwin-9

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 (1193) hide show
  1. data/Doxyfile +1514 -0
  2. data/History.txt +39 -0
  3. data/Manifest.txt +1191 -0
  4. data/README.rdoc +157 -0
  5. data/Rakefile +49 -0
  6. data/docs/data_conversion.txt +18 -0
  7. data/ext/v8/callbacks.cpp +160 -0
  8. data/ext/v8/callbacks.h +14 -0
  9. data/ext/v8/convert_ruby.cpp +8 -0
  10. data/ext/v8/convert_ruby.h +99 -0
  11. data/ext/v8/convert_string.cpp +10 -0
  12. data/ext/v8/convert_string.h +73 -0
  13. data/ext/v8/convert_v8.cpp +9 -0
  14. data/ext/v8/convert_v8.h +121 -0
  15. data/ext/v8/converters.cpp +83 -0
  16. data/ext/v8/converters.h +23 -0
  17. data/ext/v8/extconf.rb +44 -0
  18. data/ext/v8/upstream/2.0.6/.sconsign.dblite +0 -0
  19. data/ext/v8/upstream/2.0.6/AUTHORS +23 -0
  20. data/ext/v8/upstream/2.0.6/ChangeLog +1479 -0
  21. data/ext/v8/upstream/2.0.6/LICENSE +55 -0
  22. data/ext/v8/upstream/2.0.6/SConstruct +1028 -0
  23. data/ext/v8/upstream/2.0.6/benchmarks/README.txt +63 -0
  24. data/ext/v8/upstream/2.0.6/benchmarks/base.js +264 -0
  25. data/ext/v8/upstream/2.0.6/benchmarks/crypto.js +1698 -0
  26. data/ext/v8/upstream/2.0.6/benchmarks/deltablue.js +880 -0
  27. data/ext/v8/upstream/2.0.6/benchmarks/earley-boyer.js +4684 -0
  28. data/ext/v8/upstream/2.0.6/benchmarks/raytrace.js +935 -0
  29. data/ext/v8/upstream/2.0.6/benchmarks/regexp.js +1614 -0
  30. data/ext/v8/upstream/2.0.6/benchmarks/revisions.html +86 -0
  31. data/ext/v8/upstream/2.0.6/benchmarks/richards.js +539 -0
  32. data/ext/v8/upstream/2.0.6/benchmarks/run.html +141 -0
  33. data/ext/v8/upstream/2.0.6/benchmarks/run.js +61 -0
  34. data/ext/v8/upstream/2.0.6/benchmarks/splay.js +378 -0
  35. data/ext/v8/upstream/2.0.6/benchmarks/style.css +77 -0
  36. data/ext/v8/upstream/2.0.6/benchmarks/v8-logo.png +0 -0
  37. data/ext/v8/upstream/2.0.6/include/v8-debug.h +275 -0
  38. data/ext/v8/upstream/2.0.6/include/v8.h +3236 -0
  39. data/ext/v8/upstream/2.0.6/samples/SConscript +38 -0
  40. data/ext/v8/upstream/2.0.6/samples/count-hosts.js +42 -0
  41. data/ext/v8/upstream/2.0.6/samples/process.cc +622 -0
  42. data/ext/v8/upstream/2.0.6/samples/shell.cc +303 -0
  43. data/ext/v8/upstream/2.0.6/src/SConscript +283 -0
  44. data/ext/v8/upstream/2.0.6/src/accessors.cc +695 -0
  45. data/ext/v8/upstream/2.0.6/src/accessors.h +114 -0
  46. data/ext/v8/upstream/2.0.6/src/allocation.cc +198 -0
  47. data/ext/v8/upstream/2.0.6/src/allocation.h +169 -0
  48. data/ext/v8/upstream/2.0.6/src/api.cc +3831 -0
  49. data/ext/v8/upstream/2.0.6/src/api.h +479 -0
  50. data/ext/v8/upstream/2.0.6/src/apinatives.js +110 -0
  51. data/ext/v8/upstream/2.0.6/src/apiutils.h +69 -0
  52. data/ext/v8/upstream/2.0.6/src/arguments.h +97 -0
  53. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +277 -0
  54. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +1821 -0
  55. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +1027 -0
  56. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +267 -0
  57. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +1821 -0
  58. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +1027 -0
  59. data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +1271 -0
  60. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +74 -0
  61. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +6682 -0
  62. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +535 -0
  63. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +112 -0
  64. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +347 -0
  65. data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +132 -0
  66. data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +213 -0
  67. data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +1166 -0
  68. data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +1698 -0
  69. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +123 -0
  70. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +162 -0
  71. data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +849 -0
  72. data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +238 -0
  73. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +1259 -0
  74. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +423 -0
  75. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +1266 -0
  76. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +282 -0
  77. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +103 -0
  78. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +59 -0
  79. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +43 -0
  80. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +2264 -0
  81. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +306 -0
  82. data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +1516 -0
  83. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +412 -0
  84. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +532 -0
  85. data/ext/v8/upstream/2.0.6/src/array.js +1154 -0
  86. data/ext/v8/upstream/2.0.6/src/assembler.cc +772 -0
  87. data/ext/v8/upstream/2.0.6/src/assembler.h +525 -0
  88. data/ext/v8/upstream/2.0.6/src/ast.cc +512 -0
  89. data/ext/v8/upstream/2.0.6/src/ast.h +1820 -0
  90. data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +1680 -0
  91. data/ext/v8/upstream/2.0.6/src/bootstrapper.h +103 -0
  92. data/ext/v8/upstream/2.0.6/src/builtins.cc +851 -0
  93. data/ext/v8/upstream/2.0.6/src/builtins.h +245 -0
  94. data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +104 -0
  95. data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +86 -0
  96. data/ext/v8/upstream/2.0.6/src/char-predicates.h +65 -0
  97. data/ext/v8/upstream/2.0.6/src/checks.cc +100 -0
  98. data/ext/v8/upstream/2.0.6/src/checks.h +284 -0
  99. data/ext/v8/upstream/2.0.6/src/code-stubs.cc +164 -0
  100. data/ext/v8/upstream/2.0.6/src/code-stubs.h +164 -0
  101. data/ext/v8/upstream/2.0.6/src/code.h +68 -0
  102. data/ext/v8/upstream/2.0.6/src/codegen-inl.h +88 -0
  103. data/ext/v8/upstream/2.0.6/src/codegen.cc +504 -0
  104. data/ext/v8/upstream/2.0.6/src/codegen.h +522 -0
  105. data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +490 -0
  106. data/ext/v8/upstream/2.0.6/src/compilation-cache.h +98 -0
  107. data/ext/v8/upstream/2.0.6/src/compiler.cc +1132 -0
  108. data/ext/v8/upstream/2.0.6/src/compiler.h +107 -0
  109. data/ext/v8/upstream/2.0.6/src/contexts.cc +256 -0
  110. data/ext/v8/upstream/2.0.6/src/contexts.h +345 -0
  111. data/ext/v8/upstream/2.0.6/src/conversions-inl.h +95 -0
  112. data/ext/v8/upstream/2.0.6/src/conversions.cc +709 -0
  113. data/ext/v8/upstream/2.0.6/src/conversions.h +118 -0
  114. data/ext/v8/upstream/2.0.6/src/counters.cc +78 -0
  115. data/ext/v8/upstream/2.0.6/src/counters.h +239 -0
  116. data/ext/v8/upstream/2.0.6/src/cpu.h +65 -0
  117. data/ext/v8/upstream/2.0.6/src/d8-debug.cc +345 -0
  118. data/ext/v8/upstream/2.0.6/src/d8-debug.h +155 -0
  119. data/ext/v8/upstream/2.0.6/src/d8-posix.cc +675 -0
  120. data/ext/v8/upstream/2.0.6/src/d8-readline.cc +128 -0
  121. data/ext/v8/upstream/2.0.6/src/d8-windows.cc +42 -0
  122. data/ext/v8/upstream/2.0.6/src/d8.cc +776 -0
  123. data/ext/v8/upstream/2.0.6/src/d8.h +225 -0
  124. data/ext/v8/upstream/2.0.6/src/d8.js +1625 -0
  125. data/ext/v8/upstream/2.0.6/src/date-delay.js +1138 -0
  126. data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +114 -0
  127. data/ext/v8/upstream/2.0.6/src/dateparser.cc +186 -0
  128. data/ext/v8/upstream/2.0.6/src/dateparser.h +240 -0
  129. data/ext/v8/upstream/2.0.6/src/debug-agent.cc +425 -0
  130. data/ext/v8/upstream/2.0.6/src/debug-agent.h +129 -0
  131. data/ext/v8/upstream/2.0.6/src/debug-delay.js +2073 -0
  132. data/ext/v8/upstream/2.0.6/src/debug.cc +2751 -0
  133. data/ext/v8/upstream/2.0.6/src/debug.h +866 -0
  134. data/ext/v8/upstream/2.0.6/src/disasm.h +77 -0
  135. data/ext/v8/upstream/2.0.6/src/disassembler.cc +318 -0
  136. data/ext/v8/upstream/2.0.6/src/disassembler.h +56 -0
  137. data/ext/v8/upstream/2.0.6/src/dtoa-config.c +91 -0
  138. data/ext/v8/upstream/2.0.6/src/execution.cc +701 -0
  139. data/ext/v8/upstream/2.0.6/src/execution.h +312 -0
  140. data/ext/v8/upstream/2.0.6/src/factory.cc +957 -0
  141. data/ext/v8/upstream/2.0.6/src/factory.h +393 -0
  142. data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +725 -0
  143. data/ext/v8/upstream/2.0.6/src/fast-codegen.h +371 -0
  144. data/ext/v8/upstream/2.0.6/src/flag-definitions.h +426 -0
  145. data/ext/v8/upstream/2.0.6/src/flags.cc +555 -0
  146. data/ext/v8/upstream/2.0.6/src/flags.h +81 -0
  147. data/ext/v8/upstream/2.0.6/src/frame-element.cc +45 -0
  148. data/ext/v8/upstream/2.0.6/src/frame-element.h +235 -0
  149. data/ext/v8/upstream/2.0.6/src/frames-inl.h +215 -0
  150. data/ext/v8/upstream/2.0.6/src/frames.cc +749 -0
  151. data/ext/v8/upstream/2.0.6/src/frames.h +659 -0
  152. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +76 -0
  153. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +135 -0
  154. data/ext/v8/upstream/2.0.6/src/global-handles.cc +516 -0
  155. data/ext/v8/upstream/2.0.6/src/global-handles.h +180 -0
  156. data/ext/v8/upstream/2.0.6/src/globals.h +608 -0
  157. data/ext/v8/upstream/2.0.6/src/handles-inl.h +76 -0
  158. data/ext/v8/upstream/2.0.6/src/handles.cc +811 -0
  159. data/ext/v8/upstream/2.0.6/src/handles.h +367 -0
  160. data/ext/v8/upstream/2.0.6/src/hashmap.cc +226 -0
  161. data/ext/v8/upstream/2.0.6/src/hashmap.h +120 -0
  162. data/ext/v8/upstream/2.0.6/src/heap-inl.h +407 -0
  163. data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +695 -0
  164. data/ext/v8/upstream/2.0.6/src/heap-profiler.h +277 -0
  165. data/ext/v8/upstream/2.0.6/src/heap.cc +4204 -0
  166. data/ext/v8/upstream/2.0.6/src/heap.h +1704 -0
  167. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +325 -0
  168. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +2375 -0
  169. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +914 -0
  170. data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +1222 -0
  171. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +46 -0
  172. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +9770 -0
  173. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +834 -0
  174. data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +79 -0
  175. data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +208 -0
  176. data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +1357 -0
  177. data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +1813 -0
  178. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +111 -0
  179. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +135 -0
  180. data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +1490 -0
  181. data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +432 -0
  182. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +1517 -0
  183. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +528 -0
  184. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +1219 -0
  185. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +230 -0
  186. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +82 -0
  187. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +99 -0
  188. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +43 -0
  189. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +30 -0
  190. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +62 -0
  191. data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +1961 -0
  192. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +1105 -0
  193. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +580 -0
  194. data/ext/v8/upstream/2.0.6/src/ic-inl.h +93 -0
  195. data/ext/v8/upstream/2.0.6/src/ic.cc +1426 -0
  196. data/ext/v8/upstream/2.0.6/src/ic.h +443 -0
  197. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +646 -0
  198. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +48 -0
  199. data/ext/v8/upstream/2.0.6/src/json-delay.js +254 -0
  200. data/ext/v8/upstream/2.0.6/src/jsregexp.cc +5234 -0
  201. data/ext/v8/upstream/2.0.6/src/jsregexp.h +1439 -0
  202. data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +49 -0
  203. data/ext/v8/upstream/2.0.6/src/jump-target.cc +383 -0
  204. data/ext/v8/upstream/2.0.6/src/jump-target.h +280 -0
  205. data/ext/v8/upstream/2.0.6/src/list-inl.h +166 -0
  206. data/ext/v8/upstream/2.0.6/src/list.h +158 -0
  207. data/ext/v8/upstream/2.0.6/src/log-inl.h +126 -0
  208. data/ext/v8/upstream/2.0.6/src/log-utils.cc +503 -0
  209. data/ext/v8/upstream/2.0.6/src/log-utils.h +292 -0
  210. data/ext/v8/upstream/2.0.6/src/log.cc +1457 -0
  211. data/ext/v8/upstream/2.0.6/src/log.h +371 -0
  212. data/ext/v8/upstream/2.0.6/src/macro-assembler.h +93 -0
  213. data/ext/v8/upstream/2.0.6/src/macros.py +137 -0
  214. data/ext/v8/upstream/2.0.6/src/mark-compact.cc +2007 -0
  215. data/ext/v8/upstream/2.0.6/src/mark-compact.h +442 -0
  216. data/ext/v8/upstream/2.0.6/src/math.js +263 -0
  217. data/ext/v8/upstream/2.0.6/src/memory.h +74 -0
  218. data/ext/v8/upstream/2.0.6/src/messages.cc +177 -0
  219. data/ext/v8/upstream/2.0.6/src/messages.h +112 -0
  220. data/ext/v8/upstream/2.0.6/src/messages.js +937 -0
  221. data/ext/v8/upstream/2.0.6/src/mirror-delay.js +2332 -0
  222. data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +169 -0
  223. data/ext/v8/upstream/2.0.6/src/natives.h +63 -0
  224. data/ext/v8/upstream/2.0.6/src/objects-debug.cc +1317 -0
  225. data/ext/v8/upstream/2.0.6/src/objects-inl.h +3044 -0
  226. data/ext/v8/upstream/2.0.6/src/objects.cc +8306 -0
  227. data/ext/v8/upstream/2.0.6/src/objects.h +4960 -0
  228. data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +116 -0
  229. data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +69 -0
  230. data/ext/v8/upstream/2.0.6/src/parser.cc +4810 -0
  231. data/ext/v8/upstream/2.0.6/src/parser.h +195 -0
  232. data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +645 -0
  233. data/ext/v8/upstream/2.0.6/src/platform-linux.cc +808 -0
  234. data/ext/v8/upstream/2.0.6/src/platform-macos.cc +643 -0
  235. data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +454 -0
  236. data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +597 -0
  237. data/ext/v8/upstream/2.0.6/src/platform-posix.cc +380 -0
  238. data/ext/v8/upstream/2.0.6/src/platform-win32.cc +1908 -0
  239. data/ext/v8/upstream/2.0.6/src/platform.h +556 -0
  240. data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +1511 -0
  241. data/ext/v8/upstream/2.0.6/src/prettyprinter.h +219 -0
  242. data/ext/v8/upstream/2.0.6/src/property.cc +96 -0
  243. data/ext/v8/upstream/2.0.6/src/property.h +327 -0
  244. data/ext/v8/upstream/2.0.6/src/regexp-delay.js +406 -0
  245. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  246. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +464 -0
  247. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +141 -0
  248. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +356 -0
  249. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +103 -0
  250. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +240 -0
  251. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +220 -0
  252. data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +103 -0
  253. data/ext/v8/upstream/2.0.6/src/regexp-stack.h +123 -0
  254. data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +74 -0
  255. data/ext/v8/upstream/2.0.6/src/register-allocator.cc +100 -0
  256. data/ext/v8/upstream/2.0.6/src/register-allocator.h +295 -0
  257. data/ext/v8/upstream/2.0.6/src/rewriter.cc +855 -0
  258. data/ext/v8/upstream/2.0.6/src/rewriter.h +54 -0
  259. data/ext/v8/upstream/2.0.6/src/runtime.cc +8163 -0
  260. data/ext/v8/upstream/2.0.6/src/runtime.h +432 -0
  261. data/ext/v8/upstream/2.0.6/src/runtime.js +626 -0
  262. data/ext/v8/upstream/2.0.6/src/scanner.cc +1098 -0
  263. data/ext/v8/upstream/2.0.6/src/scanner.h +425 -0
  264. data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +649 -0
  265. data/ext/v8/upstream/2.0.6/src/scopeinfo.h +236 -0
  266. data/ext/v8/upstream/2.0.6/src/scopes.cc +963 -0
  267. data/ext/v8/upstream/2.0.6/src/scopes.h +401 -0
  268. data/ext/v8/upstream/2.0.6/src/serialize.cc +1260 -0
  269. data/ext/v8/upstream/2.0.6/src/serialize.h +404 -0
  270. data/ext/v8/upstream/2.0.6/src/shell.h +55 -0
  271. data/ext/v8/upstream/2.0.6/src/simulator.h +41 -0
  272. data/ext/v8/upstream/2.0.6/src/smart-pointer.h +109 -0
  273. data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +97 -0
  274. data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +40 -0
  275. data/ext/v8/upstream/2.0.6/src/snapshot.h +59 -0
  276. data/ext/v8/upstream/2.0.6/src/spaces-inl.h +372 -0
  277. data/ext/v8/upstream/2.0.6/src/spaces.cc +2864 -0
  278. data/ext/v8/upstream/2.0.6/src/spaces.h +2072 -0
  279. data/ext/v8/upstream/2.0.6/src/string-stream.cc +584 -0
  280. data/ext/v8/upstream/2.0.6/src/string-stream.h +189 -0
  281. data/ext/v8/upstream/2.0.6/src/string.js +901 -0
  282. data/ext/v8/upstream/2.0.6/src/stub-cache.cc +1108 -0
  283. data/ext/v8/upstream/2.0.6/src/stub-cache.h +578 -0
  284. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +15 -0
  285. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +3330 -0
  286. data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +3925 -0
  287. data/ext/v8/upstream/2.0.6/src/token.cc +56 -0
  288. data/ext/v8/upstream/2.0.6/src/token.h +270 -0
  289. data/ext/v8/upstream/2.0.6/src/top.cc +991 -0
  290. data/ext/v8/upstream/2.0.6/src/top.h +459 -0
  291. data/ext/v8/upstream/2.0.6/src/unicode-inl.h +238 -0
  292. data/ext/v8/upstream/2.0.6/src/unicode.cc +749 -0
  293. data/ext/v8/upstream/2.0.6/src/unicode.h +279 -0
  294. data/ext/v8/upstream/2.0.6/src/uri.js +415 -0
  295. data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +426 -0
  296. data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +40 -0
  297. data/ext/v8/upstream/2.0.6/src/utils.cc +322 -0
  298. data/ext/v8/upstream/2.0.6/src/utils.h +592 -0
  299. data/ext/v8/upstream/2.0.6/src/v8-counters.cc +55 -0
  300. data/ext/v8/upstream/2.0.6/src/v8-counters.h +198 -0
  301. data/ext/v8/upstream/2.0.6/src/v8.cc +193 -0
  302. data/ext/v8/upstream/2.0.6/src/v8.h +119 -0
  303. data/ext/v8/upstream/2.0.6/src/v8natives.js +846 -0
  304. data/ext/v8/upstream/2.0.6/src/v8threads.cc +450 -0
  305. data/ext/v8/upstream/2.0.6/src/v8threads.h +144 -0
  306. data/ext/v8/upstream/2.0.6/src/variables.cc +163 -0
  307. data/ext/v8/upstream/2.0.6/src/variables.h +235 -0
  308. data/ext/v8/upstream/2.0.6/src/version.cc +88 -0
  309. data/ext/v8/upstream/2.0.6/src/version.h +64 -0
  310. data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +381 -0
  311. data/ext/v8/upstream/2.0.6/src/virtual-frame.h +44 -0
  312. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +352 -0
  313. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +2539 -0
  314. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +1399 -0
  315. data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +1255 -0
  316. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +46 -0
  317. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +8223 -0
  318. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +785 -0
  319. data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +79 -0
  320. data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +202 -0
  321. data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +1596 -0
  322. data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +1820 -0
  323. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +109 -0
  324. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +121 -0
  325. data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +1392 -0
  326. data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +432 -0
  327. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +2409 -0
  328. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +765 -0
  329. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +1337 -0
  330. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +295 -0
  331. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +86 -0
  332. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +84 -0
  333. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +43 -0
  334. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +27 -0
  335. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +63 -0
  336. data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +1884 -0
  337. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +1089 -0
  338. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +560 -0
  339. data/ext/v8/upstream/2.0.6/src/zone-inl.h +297 -0
  340. data/ext/v8/upstream/2.0.6/src/zone.cc +193 -0
  341. data/ext/v8/upstream/2.0.6/src/zone.h +305 -0
  342. data/ext/v8/upstream/2.0.6/test/cctest/SConscript +95 -0
  343. data/ext/v8/upstream/2.0.6/test/cctest/cctest.cc +126 -0
  344. data/ext/v8/upstream/2.0.6/test/cctest/cctest.h +211 -0
  345. data/ext/v8/upstream/2.0.6/test/cctest/cctest.status +54 -0
  346. data/ext/v8/upstream/2.0.6/test/cctest/test-accessors.cc +450 -0
  347. data/ext/v8/upstream/2.0.6/test/cctest/test-alloc.cc +215 -0
  348. data/ext/v8/upstream/2.0.6/test/cctest/test-api.cc +8699 -0
  349. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-arm.cc +227 -0
  350. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-ia32.cc +395 -0
  351. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-x64.cc +292 -0
  352. data/ext/v8/upstream/2.0.6/test/cctest/test-ast.cc +97 -0
  353. data/ext/v8/upstream/2.0.6/test/cctest/test-compiler.cc +318 -0
  354. data/ext/v8/upstream/2.0.6/test/cctest/test-conversions.cc +130 -0
  355. data/ext/v8/upstream/2.0.6/test/cctest/test-debug.cc +5788 -0
  356. data/ext/v8/upstream/2.0.6/test/cctest/test-decls.cc +593 -0
  357. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-arm.cc +281 -0
  358. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-ia32.cc +418 -0
  359. data/ext/v8/upstream/2.0.6/test/cctest/test-flags.cc +234 -0
  360. data/ext/v8/upstream/2.0.6/test/cctest/test-func-name-inference.cc +267 -0
  361. data/ext/v8/upstream/2.0.6/test/cctest/test-hashmap.cc +176 -0
  362. data/ext/v8/upstream/2.0.6/test/cctest/test-heap-profiler.cc +396 -0
  363. data/ext/v8/upstream/2.0.6/test/cctest/test-heap.cc +796 -0
  364. data/ext/v8/upstream/2.0.6/test/cctest/test-list.cc +101 -0
  365. data/ext/v8/upstream/2.0.6/test/cctest/test-lock.cc +63 -0
  366. data/ext/v8/upstream/2.0.6/test/cctest/test-log-stack-tracer.cc +372 -0
  367. data/ext/v8/upstream/2.0.6/test/cctest/test-log-utils.cc +310 -0
  368. data/ext/v8/upstream/2.0.6/test/cctest/test-log.cc +1081 -0
  369. data/ext/v8/upstream/2.0.6/test/cctest/test-macro-assembler-x64.cc +2104 -0
  370. data/ext/v8/upstream/2.0.6/test/cctest/test-mark-compact.cc +341 -0
  371. data/ext/v8/upstream/2.0.6/test/cctest/test-parsing.cc +129 -0
  372. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-linux.cc +80 -0
  373. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-macos.cc +10 -0
  374. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-nullos.cc +80 -0
  375. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-win32.cc +26 -0
  376. data/ext/v8/upstream/2.0.6/test/cctest/test-regexp.cc +1815 -0
  377. data/ext/v8/upstream/2.0.6/test/cctest/test-serialize.cc +438 -0
  378. data/ext/v8/upstream/2.0.6/test/cctest/test-sockets.cc +162 -0
  379. data/ext/v8/upstream/2.0.6/test/cctest/test-spaces.cc +248 -0
  380. data/ext/v8/upstream/2.0.6/test/cctest/test-strings.cc +432 -0
  381. data/ext/v8/upstream/2.0.6/test/cctest/test-thread-termination.cc +290 -0
  382. data/ext/v8/upstream/2.0.6/test/cctest/test-threads.cc +52 -0
  383. data/ext/v8/upstream/2.0.6/test/cctest/test-utils.cc +186 -0
  384. data/ext/v8/upstream/2.0.6/test/cctest/test-version.cc +89 -0
  385. data/ext/v8/upstream/2.0.6/test/cctest/testcfg.py +108 -0
  386. data/ext/v8/upstream/2.0.6/test/es5conform/README +14 -0
  387. data/ext/v8/upstream/2.0.6/test/es5conform/es5conform.status +226 -0
  388. data/ext/v8/upstream/2.0.6/test/es5conform/harness-adapt.js +74 -0
  389. data/ext/v8/upstream/2.0.6/test/es5conform/testcfg.py +108 -0
  390. data/ext/v8/upstream/2.0.6/test/message/message.status +31 -0
  391. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.js +31 -0
  392. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.out +30 -0
  393. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.js +33 -0
  394. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.out +30 -0
  395. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.js +32 -0
  396. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.out +30 -0
  397. data/ext/v8/upstream/2.0.6/test/message/simple-throw.js +28 -0
  398. data/ext/v8/upstream/2.0.6/test/message/simple-throw.out +30 -0
  399. data/ext/v8/upstream/2.0.6/test/message/testcfg.py +135 -0
  400. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.js +51 -0
  401. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.out +26 -0
  402. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.js +39 -0
  403. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.out +28 -0
  404. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.js +34 -0
  405. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.out +30 -0
  406. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.js +34 -0
  407. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.out +30 -0
  408. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.js +34 -0
  409. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.out +30 -0
  410. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.js +37 -0
  411. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.out +28 -0
  412. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.js +32 -0
  413. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.out +30 -0
  414. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.js +32 -0
  415. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.out +30 -0
  416. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.js +32 -0
  417. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.out +30 -0
  418. data/ext/v8/upstream/2.0.6/test/mjsunit/api-call-after-bypassed-exception.js +39 -0
  419. data/ext/v8/upstream/2.0.6/test/mjsunit/apply.js +196 -0
  420. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-apply.js +134 -0
  421. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-call-apply.js +41 -0
  422. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-enum.js +52 -0
  423. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-indirect.js +47 -0
  424. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-lazy.js +47 -0
  425. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-opt.js +130 -0
  426. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-read-and-assignment.js +164 -0
  427. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments.js +97 -0
  428. data/ext/v8/upstream/2.0.6/test/mjsunit/array-concat.js +120 -0
  429. data/ext/v8/upstream/2.0.6/test/mjsunit/array-constructor.js +119 -0
  430. data/ext/v8/upstream/2.0.6/test/mjsunit/array-functions-prototype.js +159 -0
  431. data/ext/v8/upstream/2.0.6/test/mjsunit/array-indexing.js +66 -0
  432. data/ext/v8/upstream/2.0.6/test/mjsunit/array-iteration.js +228 -0
  433. data/ext/v8/upstream/2.0.6/test/mjsunit/array-join.js +45 -0
  434. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length-number-conversion.js +53 -0
  435. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length.js +111 -0
  436. data/ext/v8/upstream/2.0.6/test/mjsunit/array-reduce.js +514 -0
  437. data/ext/v8/upstream/2.0.6/test/mjsunit/array-sort.js +362 -0
  438. data/ext/v8/upstream/2.0.6/test/mjsunit/array-splice.js +314 -0
  439. data/ext/v8/upstream/2.0.6/test/mjsunit/ascii-regexp-subject.js +49 -0
  440. data/ext/v8/upstream/2.0.6/test/mjsunit/big-array-literal.js +111 -0
  441. data/ext/v8/upstream/2.0.6/test/mjsunit/big-object-literal.js +114 -0
  442. data/ext/v8/upstream/2.0.6/test/mjsunit/binary-operation-overwrite.js +36 -0
  443. data/ext/v8/upstream/2.0.6/test/mjsunit/bit-not.js +75 -0
  444. data/ext/v8/upstream/2.0.6/test/mjsunit/bitwise-operations-undefined.js +49 -0
  445. data/ext/v8/upstream/2.0.6/test/mjsunit/body-not-visible.js +39 -0
  446. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-1344252.js +79 -0
  447. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-222.js +42 -0
  448. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-223.js +39 -0
  449. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-900066.js +38 -0
  450. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-941049.js +100 -0
  451. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function-call.js +38 -0
  452. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function.js +63 -0
  453. data/ext/v8/upstream/2.0.6/test/mjsunit/call.js +87 -0
  454. data/ext/v8/upstream/2.0.6/test/mjsunit/char-escape.js +53 -0
  455. data/ext/v8/upstream/2.0.6/test/mjsunit/class-of-builtins.js +50 -0
  456. data/ext/v8/upstream/2.0.6/test/mjsunit/closure.js +37 -0
  457. data/ext/v8/upstream/2.0.6/test/mjsunit/codegen-coverage.js +91 -0
  458. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-character.js +50 -0
  459. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-nan.js +66 -0
  460. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/countoperation.js +111 -0
  461. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/function-call.js +52 -0
  462. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/globals.js +65 -0
  463. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/jsnatives.js +33 -0
  464. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals-assignment.js +104 -0
  465. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals.js +52 -0
  466. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/loops.js +35 -0
  467. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/objectliterals.js +57 -0
  468. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/property-simple.js +39 -0
  469. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/short-circuit.js +102 -0
  470. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/thisfunction.js +35 -0
  471. data/ext/v8/upstream/2.0.6/test/mjsunit/const-declaration.js +172 -0
  472. data/ext/v8/upstream/2.0.6/test/mjsunit/const-eval-init.js +111 -0
  473. data/ext/v8/upstream/2.0.6/test/mjsunit/const-redecl.js +220 -0
  474. data/ext/v8/upstream/2.0.6/test/mjsunit/const.js +70 -0
  475. data/ext/v8/upstream/2.0.6/test/mjsunit/constant-folding.js +232 -0
  476. data/ext/v8/upstream/2.0.6/test/mjsunit/context-variable-assignments.js +37 -0
  477. data/ext/v8/upstream/2.0.6/test/mjsunit/cyclic-array-to-string.js +65 -0
  478. data/ext/v8/upstream/2.0.6/test/mjsunit/cyrillic.js +199 -0
  479. data/ext/v8/upstream/2.0.6/test/mjsunit/d8-os.js +180 -0
  480. data/ext/v8/upstream/2.0.6/test/mjsunit/date-parse.js +268 -0
  481. data/ext/v8/upstream/2.0.6/test/mjsunit/date.js +149 -0
  482. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace-text.js +122 -0
  483. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace.js +272 -0
  484. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-breakpoints.js +120 -0
  485. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-changebreakpoint.js +108 -0
  486. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpoint.js +101 -0
  487. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpointgroup.js +117 -0
  488. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-compile-event.js +126 -0
  489. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-conditional-breakpoints.js +171 -0
  490. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructed-by.js +60 -0
  491. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructor.js +78 -0
  492. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-continue.js +114 -0
  493. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-enable-disable-breakpoints.js +90 -0
  494. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-arguments.js +93 -0
  495. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-bool-constructor.js +80 -0
  496. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-locals.js +132 -0
  497. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-recursive.js +167 -0
  498. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-with.js +77 -0
  499. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate.js +118 -0
  500. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-event-listener.js +73 -0
  501. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-handle.js +252 -0
  502. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-ignore-breakpoints.js +89 -0
  503. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-mirror-cache.js +85 -0
  504. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-multiple-breakpoints.js +105 -0
  505. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-referenced-by.js +112 -0
  506. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-references.js +118 -0
  507. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scopes.js +761 -0
  508. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script-breakpoints.js +112 -0
  509. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script.js +92 -0
  510. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scripts-request.js +108 -0
  511. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-setbreakpoint.js +165 -0
  512. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceinfo.js +352 -0
  513. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceslice.js +74 -0
  514. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step-stub-callfunction.js +87 -0
  515. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step.js +82 -0
  516. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-accessor.js +248 -0
  517. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-builtin.js +78 -0
  518. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-call-function-stub.js +115 -0
  519. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-constructor.js +78 -0
  520. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-function-call.js +149 -0
  521. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepnext-do-while.js +79 -0
  522. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-recursive-function.js +106 -0
  523. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-to-builtin.js +84 -0
  524. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-suspend.js +96 -0
  525. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-version.js +90 -0
  526. data/ext/v8/upstream/2.0.6/test/mjsunit/declare-locally.js +43 -0
  527. data/ext/v8/upstream/2.0.6/test/mjsunit/deep-recursion.js +66 -0
  528. data/ext/v8/upstream/2.0.6/test/mjsunit/delay-syntax-error.js +41 -0
  529. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-global-properties.js +37 -0
  530. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-eval.js +32 -0
  531. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-with.js +34 -0
  532. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-vars-from-eval.js +40 -0
  533. data/ext/v8/upstream/2.0.6/test/mjsunit/delete.js +163 -0
  534. data/ext/v8/upstream/2.0.6/test/mjsunit/div-mod.js +157 -0
  535. data/ext/v8/upstream/2.0.6/test/mjsunit/do-not-strip-fc.js +31 -0
  536. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-enum-array-holes.js +35 -0
  537. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-reinit-global-var.js +47 -0
  538. data/ext/v8/upstream/2.0.6/test/mjsunit/double-equals.js +114 -0
  539. data/ext/v8/upstream/2.0.6/test/mjsunit/dtoa.js +32 -0
  540. data/ext/v8/upstream/2.0.6/test/mjsunit/enumeration-order.js +109 -0
  541. data/ext/v8/upstream/2.0.6/test/mjsunit/error-constructors.js +32 -0
  542. data/ext/v8/upstream/2.0.6/test/mjsunit/escape.js +118 -0
  543. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-enclosing-function-name.js +76 -0
  544. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-typeof-non-existing.js +35 -0
  545. data/ext/v8/upstream/2.0.6/test/mjsunit/eval.js +157 -0
  546. data/ext/v8/upstream/2.0.6/test/mjsunit/execScript-case-insensitive.js +34 -0
  547. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-arguments.js +54 -0
  548. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-commas.js +46 -0
  549. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-null-or-undefined.js +33 -0
  550. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-special-cases.js +64 -0
  551. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in.js +86 -0
  552. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-as-prototype.js +36 -0
  553. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-name.js +34 -0
  554. data/ext/v8/upstream/2.0.6/test/mjsunit/function-arguments-null.js +30 -0
  555. data/ext/v8/upstream/2.0.6/test/mjsunit/function-caller.js +48 -0
  556. data/ext/v8/upstream/2.0.6/test/mjsunit/function-names.js +133 -0
  557. data/ext/v8/upstream/2.0.6/test/mjsunit/function-property.js +29 -0
  558. data/ext/v8/upstream/2.0.6/test/mjsunit/function-prototype.js +98 -0
  559. data/ext/v8/upstream/2.0.6/test/mjsunit/function-source.js +49 -0
  560. data/ext/v8/upstream/2.0.6/test/mjsunit/function.js +83 -0
  561. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-accessors.js +85 -0
  562. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-natives.js +159 -0
  563. data/ext/v8/upstream/2.0.6/test/mjsunit/get-own-property-descriptor.js +51 -0
  564. data/ext/v8/upstream/2.0.6/test/mjsunit/get-prototype-of.js +68 -0
  565. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-prototype.js +50 -0
  566. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-value-prototype.js +35 -0
  567. data/ext/v8/upstream/2.0.6/test/mjsunit/global-const-var-conflicts.js +57 -0
  568. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-ic.js +45 -0
  569. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-keyed.js +38 -0
  570. data/ext/v8/upstream/2.0.6/test/mjsunit/global-ic.js +48 -0
  571. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval-in-with.js +59 -0
  572. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval.js +85 -0
  573. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-nested-eval.js +66 -0
  574. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-eval.js +34 -0
  575. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-with.js +43 -0
  576. data/ext/v8/upstream/2.0.6/test/mjsunit/greedy.js +60 -0
  577. data/ext/v8/upstream/2.0.6/test/mjsunit/has-own-property.js +38 -0
  578. data/ext/v8/upstream/2.0.6/test/mjsunit/html-comments.js +57 -0
  579. data/ext/v8/upstream/2.0.6/test/mjsunit/html-string-funcs.js +47 -0
  580. data/ext/v8/upstream/2.0.6/test/mjsunit/if-in-undefined.js +36 -0
  581. data/ext/v8/upstream/2.0.6/test/mjsunit/in.js +159 -0
  582. data/ext/v8/upstream/2.0.6/test/mjsunit/indexed-accessors.js +120 -0
  583. data/ext/v8/upstream/2.0.6/test/mjsunit/instanceof.js +93 -0
  584. data/ext/v8/upstream/2.0.6/test/mjsunit/integer-to-string.js +35 -0
  585. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-lhs.js +65 -0
  586. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-source-element.js +31 -0
  587. data/ext/v8/upstream/2.0.6/test/mjsunit/json.js +207 -0
  588. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-ic.js +236 -0
  589. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-storage-extend.js +55 -0
  590. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-allocation.js +300 -0
  591. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-literal.js +56 -0
  592. data/ext/v8/upstream/2.0.6/test/mjsunit/lazy-load.js +34 -0
  593. data/ext/v8/upstream/2.0.6/test/mjsunit/leakcheck.js +53 -0
  594. data/ext/v8/upstream/2.0.6/test/mjsunit/length.js +78 -0
  595. data/ext/v8/upstream/2.0.6/test/mjsunit/local-load-from-eval.js +39 -0
  596. data/ext/v8/upstream/2.0.6/test/mjsunit/math-min-max.js +105 -0
  597. data/ext/v8/upstream/2.0.6/test/mjsunit/megamorphic-callbacks.js +70 -0
  598. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-array.js +138 -0
  599. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-boolean.js +59 -0
  600. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-date.js +77 -0
  601. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-error.js +94 -0
  602. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-function.js +90 -0
  603. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-null.js +50 -0
  604. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-number.js +77 -0
  605. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-object.js +227 -0
  606. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-regexp.js +110 -0
  607. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-script.js +100 -0
  608. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-string.js +89 -0
  609. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-undefined.js +50 -0
  610. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-unresolved-function.js +81 -0
  611. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.js +203 -0
  612. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.status +66 -0
  613. data/ext/v8/upstream/2.0.6/test/mjsunit/mul-exhaustive.js +4511 -0
  614. data/ext/v8/upstream/2.0.6/test/mjsunit/multiple-return.js +62 -0
  615. data/ext/v8/upstream/2.0.6/test/mjsunit/negate-zero.js +42 -0
  616. data/ext/v8/upstream/2.0.6/test/mjsunit/negate.js +59 -0
  617. data/ext/v8/upstream/2.0.6/test/mjsunit/new.js +56 -0
  618. data/ext/v8/upstream/2.0.6/test/mjsunit/newline-in-string.js +46 -0
  619. data/ext/v8/upstream/2.0.6/test/mjsunit/no-branch-elimination.js +36 -0
  620. data/ext/v8/upstream/2.0.6/test/mjsunit/no-octal-constants-above-256.js +32 -0
  621. data/ext/v8/upstream/2.0.6/test/mjsunit/no-semicolon.js +45 -0
  622. data/ext/v8/upstream/2.0.6/test/mjsunit/non-ascii-replace.js +30 -0
  623. data/ext/v8/upstream/2.0.6/test/mjsunit/nul-characters.js +38 -0
  624. data/ext/v8/upstream/2.0.6/test/mjsunit/number-limits.js +47 -0
  625. data/ext/v8/upstream/2.0.6/test/mjsunit/number-string-index-call.js +32 -0
  626. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring-small.js +395 -0
  627. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring.js +338 -0
  628. data/ext/v8/upstream/2.0.6/test/mjsunit/obj-construct.js +46 -0
  629. data/ext/v8/upstream/2.0.6/test/mjsunit/object-create.js +250 -0
  630. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal-gc.js +66 -0
  631. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal.js +105 -0
  632. data/ext/v8/upstream/2.0.6/test/mjsunit/override-read-only-property.js +64 -0
  633. data/ext/v8/upstream/2.0.6/test/mjsunit/parse-int-float.js +85 -0
  634. data/ext/v8/upstream/2.0.6/test/mjsunit/property-load-across-eval.js +85 -0
  635. data/ext/v8/upstream/2.0.6/test/mjsunit/property-object-key.js +36 -0
  636. data/ext/v8/upstream/2.0.6/test/mjsunit/proto.js +33 -0
  637. data/ext/v8/upstream/2.0.6/test/mjsunit/prototype.js +93 -0
  638. data/ext/v8/upstream/2.0.6/test/mjsunit/receiver-in-with-calls.js +47 -0
  639. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-UC16.js +47 -0
  640. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-call-as-function.js +36 -0
  641. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-capture.js +57 -0
  642. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-captures.js +31 -0
  643. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-indexof.js +77 -0
  644. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-lookahead.js +166 -0
  645. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-loop-capture.js +29 -0
  646. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline-stack-trace.js +116 -0
  647. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline.js +112 -0
  648. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-standalones.js +78 -0
  649. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-static.js +167 -0
  650. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-string-methods.js +51 -0
  651. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp.js +390 -0
  652. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1030466.js +45 -0
  653. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1036894.js +38 -0
  654. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1039610.js +29 -0
  655. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1050043.js +51 -0
  656. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1062422.js +30 -0
  657. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1066899.js +37 -0
  658. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1081309.js +110 -0
  659. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1102760.js +35 -0
  660. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1110164.js +46 -0
  661. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1112051.js +33 -0
  662. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1114040.js +58 -0
  663. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1134697.js +31 -0
  664. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-114.js +43 -0
  665. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-116.js +40 -0
  666. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1170187.js +80 -0
  667. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1173979.js +48 -0
  668. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1175390.js +30 -0
  669. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177518.js +39 -0
  670. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177809.js +31 -0
  671. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1178598.js +90 -0
  672. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1182832.js +38 -0
  673. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1187524.js +34 -0
  674. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199401.js +75 -0
  675. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199637.js +78 -0
  676. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1200351.js +2032 -0
  677. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1201933.js +40 -0
  678. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1203459.js +29 -0
  679. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1207276.js +36 -0
  680. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213516.js +40 -0
  681. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213575.js +41 -0
  682. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1215653.js +365 -0
  683. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-124.js +57 -0
  684. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1254366.js +38 -0
  685. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1327557.js +36 -0
  686. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1341167.js +33 -0
  687. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1346700.js +29 -0
  688. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-137.js +46 -0
  689. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1439135.js +40 -0
  690. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-149.js +28 -0
  691. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1493017.js +52 -0
  692. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-155924.js +46 -0
  693. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-171.js +41 -0
  694. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-176.js +50 -0
  695. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-186.js +72 -0
  696. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-187.js +30 -0
  697. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-189.js +36 -0
  698. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-191.js +42 -0
  699. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1919169.js +40 -0
  700. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-192.js +38 -0
  701. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-193.js +44 -0
  702. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-20070207.js +42 -0
  703. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-201.js +37 -0
  704. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-219.js +176 -0
  705. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-220.js +31 -0
  706. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-221.js +34 -0
  707. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-2249423.js +40 -0
  708. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-225.js +32 -0
  709. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-227.js +33 -0
  710. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-231.js +92 -0
  711. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-233.js +39 -0
  712. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-244.js +67 -0
  713. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-246.js +31 -0
  714. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-253.js +31 -0
  715. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-254.js +58 -0
  716. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-259.js +33 -0
  717. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-260.js +33 -0
  718. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-263.js +38 -0
  719. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-265.js +64 -0
  720. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-267.js +35 -0
  721. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-269.js +49 -0
  722. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-279.js +62 -0
  723. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-284.js +50 -0
  724. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-286.js +36 -0
  725. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-294.js +43 -0
  726. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-312.js +31 -0
  727. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-317.js +31 -0
  728. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-318.js +35 -0
  729. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-326.js +40 -0
  730. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-334.js +90 -0
  731. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-341.js +36 -0
  732. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-345.js +51 -0
  733. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-349.js +32 -0
  734. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-35.js +33 -0
  735. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-351.js +31 -0
  736. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-386.js +47 -0
  737. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-392.js +34 -0
  738. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-394.js +47 -0
  739. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-396.js +39 -0
  740. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-397.js +34 -0
  741. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-399.js +32 -0
  742. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-406.js +69 -0
  743. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-416.js +38 -0
  744. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-475.js +28 -0
  745. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-483.js +35 -0
  746. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-485.js +64 -0
  747. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-486.js +30 -0
  748. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-490.js +48 -0
  749. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-491.js +47 -0
  750. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-492.js +52 -0
  751. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-496.js +39 -0
  752. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-502.js +38 -0
  753. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-503.js +63 -0
  754. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-515.js +40 -0
  755. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-524.js +32 -0
  756. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-526.js +32 -0
  757. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-540.js +47 -0
  758. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-545.js +47 -0
  759. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-57.js +32 -0
  760. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-580.js +55 -0
  761. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-588599.js +31 -0
  762. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-6-9-regexp.js +30 -0
  763. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-662254.js +40 -0
  764. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-666721.js +53 -0
  765. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-667061.js +90 -0
  766. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-670147.js +34 -0
  767. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-674753.js +87 -0
  768. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-676025.js +31 -0
  769. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-678525.js +59 -0
  770. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-682649.js +30 -0
  771. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-69.js +43 -0
  772. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-734862.js +37 -0
  773. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-737588.js +34 -0
  774. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-74.js +41 -0
  775. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-780423.js +39 -0
  776. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-799761.js +92 -0
  777. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-806473.js +60 -0
  778. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-842017.js +60 -0
  779. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-86.js +46 -0
  780. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-87.js +58 -0
  781. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-874178.js +32 -0
  782. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-875031.js +37 -0
  783. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-877615.js +37 -0
  784. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-892742.js +50 -0
  785. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900055.js +42 -0
  786. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900966.js +38 -0
  787. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-91.js +38 -0
  788. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-925537.js +42 -0
  789. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-937896.js +50 -0
  790. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-990205.js +35 -0
  791. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-992733.js +35 -0
  792. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-996542.js +40 -0
  793. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-998565.js +51 -0
  794. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-crbug-18639.js +34 -0
  795. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-r3391.js +77 -0
  796. data/ext/v8/upstream/2.0.6/test/mjsunit/scanner.js +30 -0
  797. data/ext/v8/upstream/2.0.6/test/mjsunit/short-circuit-boolean.js +46 -0
  798. data/ext/v8/upstream/2.0.6/test/mjsunit/simple-constructor.js +140 -0
  799. data/ext/v8/upstream/2.0.6/test/mjsunit/sin-cos.js +45 -0
  800. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-negative-zero.js +100 -0
  801. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-ops.js +671 -0
  802. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array-reverse.js +131 -0
  803. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array.js +41 -0
  804. data/ext/v8/upstream/2.0.6/test/mjsunit/stack-traces.js +204 -0
  805. data/ext/v8/upstream/2.0.6/test/mjsunit/str-to-num.js +158 -0
  806. data/ext/v8/upstream/2.0.6/test/mjsunit/stress-array-push.js +34 -0
  807. data/ext/v8/upstream/2.0.6/test/mjsunit/strict-equals.js +90 -0
  808. data/ext/v8/upstream/2.0.6/test/mjsunit/string-add.js +195 -0
  809. data/ext/v8/upstream/2.0.6/test/mjsunit/string-case.js +28 -0
  810. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charat.js +53 -0
  811. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charcodeat.js +192 -0
  812. data/ext/v8/upstream/2.0.6/test/mjsunit/string-compare-alignment.js +47 -0
  813. data/ext/v8/upstream/2.0.6/test/mjsunit/string-flatten.js +37 -0
  814. data/ext/v8/upstream/2.0.6/test/mjsunit/string-index.js +154 -0
  815. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-1.js +99 -0
  816. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-2.js +68 -0
  817. data/ext/v8/upstream/2.0.6/test/mjsunit/string-lastindexof.js +88 -0
  818. data/ext/v8/upstream/2.0.6/test/mjsunit/string-localecompare.js +40 -0
  819. data/ext/v8/upstream/2.0.6/test/mjsunit/string-match.js +149 -0
  820. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace-gc.js +57 -0
  821. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace.js +182 -0
  822. data/ext/v8/upstream/2.0.6/test/mjsunit/string-search.js +30 -0
  823. data/ext/v8/upstream/2.0.6/test/mjsunit/string-split.js +126 -0
  824. data/ext/v8/upstream/2.0.6/test/mjsunit/substr.js +65 -0
  825. data/ext/v8/upstream/2.0.6/test/mjsunit/switch.js +289 -0
  826. data/ext/v8/upstream/2.0.6/test/mjsunit/testcfg.py +137 -0
  827. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-isarray.js +48 -0
  828. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-splice-webkit.js +62 -0
  829. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/object-keys.js +68 -0
  830. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/regexp-pcre.js +6603 -0
  831. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/string-trim.js +107 -0
  832. data/ext/v8/upstream/2.0.6/test/mjsunit/this-in-callbacks.js +47 -0
  833. data/ext/v8/upstream/2.0.6/test/mjsunit/this.js +46 -0
  834. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-and-catch-function.js +50 -0
  835. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-exception-for-null-access.js +37 -0
  836. data/ext/v8/upstream/2.0.6/test/mjsunit/to-precision.js +82 -0
  837. data/ext/v8/upstream/2.0.6/test/mjsunit/to_number_order.js +129 -0
  838. data/ext/v8/upstream/2.0.6/test/mjsunit/tobool.js +36 -0
  839. data/ext/v8/upstream/2.0.6/test/mjsunit/toint32.js +129 -0
  840. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/codemap.js +180 -0
  841. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/consarray.js +60 -0
  842. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/csvparser.js +79 -0
  843. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/logreader.js +98 -0
  844. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile.js +348 -0
  845. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile_view.js +95 -0
  846. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/splaytree.js +166 -0
  847. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.default +55 -0
  848. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.gc-state +21 -0
  849. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.ignore-unknown +51 -0
  850. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.separate-ic +61 -0
  851. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor.js +409 -0
  852. data/ext/v8/upstream/2.0.6/test/mjsunit/top-level-assignments.js +107 -0
  853. data/ext/v8/upstream/2.0.6/test/mjsunit/touint32.js +72 -0
  854. data/ext/v8/upstream/2.0.6/test/mjsunit/transcendentals.js +49 -0
  855. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-extension-object.js +58 -0
  856. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-scopes.js +42 -0
  857. data/ext/v8/upstream/2.0.6/test/mjsunit/try-finally-nested.js +46 -0
  858. data/ext/v8/upstream/2.0.6/test/mjsunit/try.js +394 -0
  859. data/ext/v8/upstream/2.0.6/test/mjsunit/typeof.js +40 -0
  860. data/ext/v8/upstream/2.0.6/test/mjsunit/undeletable-functions.js +181 -0
  861. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-case-overoptimization.js +35 -0
  862. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-string-to-number.js +46 -0
  863. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-test.js +9169 -0
  864. data/ext/v8/upstream/2.0.6/test/mjsunit/unusual-constructor.js +38 -0
  865. data/ext/v8/upstream/2.0.6/test/mjsunit/uri.js +78 -0
  866. data/ext/v8/upstream/2.0.6/test/mjsunit/value-callic-prototype-change.js +94 -0
  867. data/ext/v8/upstream/2.0.6/test/mjsunit/var.js +37 -0
  868. data/ext/v8/upstream/2.0.6/test/mjsunit/with-function-expression.js +36 -0
  869. data/ext/v8/upstream/2.0.6/test/mjsunit/with-leave.js +61 -0
  870. data/ext/v8/upstream/2.0.6/test/mjsunit/with-parameter-access.js +47 -0
  871. data/ext/v8/upstream/2.0.6/test/mjsunit/with-prototype.js +44 -0
  872. data/ext/v8/upstream/2.0.6/test/mjsunit/with-value.js +38 -0
  873. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla-shell-emulation.js +37 -0
  874. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla.status +815 -0
  875. data/ext/v8/upstream/2.0.6/test/mozilla/testcfg.py +138 -0
  876. data/ext/v8/upstream/2.0.6/test/sputnik/README +6 -0
  877. data/ext/v8/upstream/2.0.6/test/sputnik/sputnik.status +318 -0
  878. data/ext/v8/upstream/2.0.6/test/sputnik/testcfg.py +112 -0
  879. data/ext/v8/upstream/2.0.6/tools/codemap.js +258 -0
  880. data/ext/v8/upstream/2.0.6/tools/consarray.js +93 -0
  881. data/ext/v8/upstream/2.0.6/tools/csvparser.js +98 -0
  882. data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +620 -0
  883. data/ext/v8/upstream/2.0.6/tools/js2c.py +376 -0
  884. data/ext/v8/upstream/2.0.6/tools/js2c.pyc +0 -0
  885. data/ext/v8/upstream/2.0.6/tools/jsmin.py +280 -0
  886. data/ext/v8/upstream/2.0.6/tools/jsmin.pyc +0 -0
  887. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +24 -0
  888. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +78 -0
  889. data/ext/v8/upstream/2.0.6/tools/logreader.js +320 -0
  890. data/ext/v8/upstream/2.0.6/tools/mac-nm +18 -0
  891. data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +6 -0
  892. data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +7 -0
  893. data/ext/v8/upstream/2.0.6/tools/oprofile/common +19 -0
  894. data/ext/v8/upstream/2.0.6/tools/oprofile/dump +7 -0
  895. data/ext/v8/upstream/2.0.6/tools/oprofile/report +7 -0
  896. data/ext/v8/upstream/2.0.6/tools/oprofile/reset +7 -0
  897. data/ext/v8/upstream/2.0.6/tools/oprofile/run +14 -0
  898. data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +7 -0
  899. data/ext/v8/upstream/2.0.6/tools/oprofile/start +7 -0
  900. data/ext/v8/upstream/2.0.6/tools/presubmit.py +299 -0
  901. data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +120 -0
  902. data/ext/v8/upstream/2.0.6/tools/profile.js +621 -0
  903. data/ext/v8/upstream/2.0.6/tools/profile_view.js +224 -0
  904. data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +77 -0
  905. data/ext/v8/upstream/2.0.6/tools/splaytree.js +322 -0
  906. data/ext/v8/upstream/2.0.6/tools/splaytree.py +226 -0
  907. data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +456 -0
  908. data/ext/v8/upstream/2.0.6/tools/test.py +1370 -0
  909. data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +53 -0
  910. data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +731 -0
  911. data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +535 -0
  912. data/ext/v8/upstream/2.0.6/tools/utils.py +82 -0
  913. data/ext/v8/upstream/2.0.6/tools/utils.pyc +0 -0
  914. data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +71 -0
  915. data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +14 -0
  916. data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +35 -0
  917. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +199 -0
  918. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +199 -0
  919. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +201 -0
  920. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +6 -0
  921. data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +17 -0
  922. data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +13 -0
  923. data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +6 -0
  924. data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +24 -0
  925. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +101 -0
  926. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +223 -0
  927. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +74 -0
  928. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +223 -0
  929. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +971 -0
  930. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +983 -0
  931. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +959 -0
  932. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +255 -0
  933. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +243 -0
  934. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
  935. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +151 -0
  936. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +151 -0
  937. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +151 -0
  938. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +151 -0
  939. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +151 -0
  940. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +151 -0
  941. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +151 -0
  942. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +153 -0
  943. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +142 -0
  944. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
  945. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
  946. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
  947. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +101 -0
  948. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +223 -0
  949. data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +13 -0
  950. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +5 -0
  951. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +137 -0
  952. data/ext/v8/upstream/scons/CHANGES.txt +5183 -0
  953. data/ext/v8/upstream/scons/LICENSE.txt +20 -0
  954. data/ext/v8/upstream/scons/MANIFEST +202 -0
  955. data/ext/v8/upstream/scons/PKG-INFO +13 -0
  956. data/ext/v8/upstream/scons/README.txt +273 -0
  957. data/ext/v8/upstream/scons/RELEASE.txt +1040 -0
  958. data/ext/v8/upstream/scons/engine/SCons/Action.py +1256 -0
  959. data/ext/v8/upstream/scons/engine/SCons/Builder.py +868 -0
  960. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +217 -0
  961. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +794 -0
  962. data/ext/v8/upstream/scons/engine/SCons/Debug.py +237 -0
  963. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +485 -0
  964. data/ext/v8/upstream/scons/engine/SCons/Environment.py +2327 -0
  965. data/ext/v8/upstream/scons/engine/SCons/Errors.py +207 -0
  966. data/ext/v8/upstream/scons/engine/SCons/Executor.py +636 -0
  967. data/ext/v8/upstream/scons/engine/SCons/Job.py +435 -0
  968. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +292 -0
  969. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +153 -0
  970. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +3220 -0
  971. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +128 -0
  972. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +1341 -0
  973. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +50 -0
  974. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +50 -0
  975. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +50 -0
  976. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +50 -0
  977. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +76 -0
  978. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +74 -0
  979. data/ext/v8/upstream/scons/engine/SCons/PathList.py +232 -0
  980. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +236 -0
  981. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +70 -0
  982. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +55 -0
  983. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +46 -0
  984. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +46 -0
  985. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +44 -0
  986. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +58 -0
  987. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +264 -0
  988. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +50 -0
  989. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +386 -0
  990. data/ext/v8/upstream/scons/engine/SCons/SConf.py +1038 -0
  991. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +381 -0
  992. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +132 -0
  993. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +74 -0
  994. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +111 -0
  995. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +320 -0
  996. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +48 -0
  997. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +378 -0
  998. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +103 -0
  999. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +55 -0
  1000. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +415 -0
  1001. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +386 -0
  1002. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +1360 -0
  1003. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +944 -0
  1004. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +642 -0
  1005. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +414 -0
  1006. data/ext/v8/upstream/scons/engine/SCons/Sig.py +63 -0
  1007. data/ext/v8/upstream/scons/engine/SCons/Subst.py +911 -0
  1008. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +1030 -0
  1009. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +61 -0
  1010. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +65 -0
  1011. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +73 -0
  1012. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +247 -0
  1013. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +324 -0
  1014. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  1015. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  1016. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
  1017. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
  1018. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
  1019. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
  1020. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
  1021. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +104 -0
  1022. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
  1023. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +64 -0
  1024. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +64 -0
  1025. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +71 -0
  1026. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +675 -0
  1027. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +82 -0
  1028. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +74 -0
  1029. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +80 -0
  1030. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +76 -0
  1031. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +71 -0
  1032. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +63 -0
  1033. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +78 -0
  1034. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +82 -0
  1035. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +99 -0
  1036. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +114 -0
  1037. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +58 -0
  1038. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +50 -0
  1039. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +224 -0
  1040. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +64 -0
  1041. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +125 -0
  1042. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +94 -0
  1043. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +62 -0
  1044. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +62 -0
  1045. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +63 -0
  1046. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +98 -0
  1047. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +63 -0
  1048. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +90 -0
  1049. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +73 -0
  1050. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +53 -0
  1051. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +80 -0
  1052. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +64 -0
  1053. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +63 -0
  1054. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +81 -0
  1055. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +85 -0
  1056. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +53 -0
  1057. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +77 -0
  1058. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +59 -0
  1059. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +52 -0
  1060. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +72 -0
  1061. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +90 -0
  1062. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +59 -0
  1063. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +60 -0
  1064. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +229 -0
  1065. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +490 -0
  1066. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +71 -0
  1067. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +110 -0
  1068. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +234 -0
  1069. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +138 -0
  1070. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +79 -0
  1071. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +99 -0
  1072. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +121 -0
  1073. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +112 -0
  1074. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +63 -0
  1075. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +77 -0
  1076. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +90 -0
  1077. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +159 -0
  1078. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +64 -0
  1079. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +266 -0
  1080. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +50 -0
  1081. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +269 -0
  1082. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +1439 -0
  1083. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +208 -0
  1084. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +107 -0
  1085. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +72 -0
  1086. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
  1087. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  1088. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +526 -0
  1089. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
  1090. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  1091. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  1092. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  1093. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  1094. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  1095. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  1096. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +78 -0
  1097. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +83 -0
  1098. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +108 -0
  1099. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +336 -0
  1100. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +121 -0
  1101. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +70 -0
  1102. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +132 -0
  1103. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +68 -0
  1104. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +58 -0
  1105. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +53 -0
  1106. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +63 -0
  1107. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +67 -0
  1108. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +142 -0
  1109. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +58 -0
  1110. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +63 -0
  1111. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +64 -0
  1112. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +64 -0
  1113. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +77 -0
  1114. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +186 -0
  1115. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +73 -0
  1116. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +805 -0
  1117. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +175 -0
  1118. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +53 -0
  1119. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +100 -0
  1120. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +131 -0
  1121. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +100 -0
  1122. data/ext/v8/upstream/scons/engine/SCons/Util.py +1645 -0
  1123. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +91 -0
  1124. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +107 -0
  1125. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +139 -0
  1126. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +109 -0
  1127. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +147 -0
  1128. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +317 -0
  1129. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +228 -0
  1130. data/ext/v8/upstream/scons/engine/SCons/__init__.py +49 -0
  1131. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +302 -0
  1132. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +98 -0
  1133. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
  1134. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +124 -0
  1135. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
  1136. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +583 -0
  1137. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +176 -0
  1138. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +325 -0
  1139. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
  1140. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
  1141. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +187 -0
  1142. data/ext/v8/upstream/scons/engine/SCons/cpp.py +598 -0
  1143. data/ext/v8/upstream/scons/engine/SCons/dblite.py +248 -0
  1144. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +77 -0
  1145. data/ext/v8/upstream/scons/os_spawnv_fix.diff +83 -0
  1146. data/ext/v8/upstream/scons/scons-time.1 +1017 -0
  1147. data/ext/v8/upstream/scons/scons.1 +15179 -0
  1148. data/ext/v8/upstream/scons/sconsign.1 +208 -0
  1149. data/ext/v8/upstream/scons/script/scons +184 -0
  1150. data/ext/v8/upstream/scons/script/scons-time +1529 -0
  1151. data/ext/v8/upstream/scons/script/scons.bat +31 -0
  1152. data/ext/v8/upstream/scons/script/sconsign +508 -0
  1153. data/ext/v8/upstream/scons/setup.cfg +6 -0
  1154. data/ext/v8/upstream/scons/setup.py +427 -0
  1155. data/ext/v8/v8.cpp +81 -0
  1156. data/ext/v8/v8_cxt.cpp +92 -0
  1157. data/ext/v8/v8_cxt.h +20 -0
  1158. data/ext/v8/v8_func.cpp +10 -0
  1159. data/ext/v8/v8_func.h +11 -0
  1160. data/ext/v8/v8_msg.cpp +17 -0
  1161. data/ext/v8/v8_msg.h +10 -0
  1162. data/ext/v8/v8_obj.cpp +52 -0
  1163. data/ext/v8/v8_obj.h +13 -0
  1164. data/ext/v8/v8_ref.cpp +26 -0
  1165. data/ext/v8/v8_ref.h +31 -0
  1166. data/ext/v8/v8_script.cpp +20 -0
  1167. data/ext/v8/v8_script.h +8 -0
  1168. data/ext/v8/v8_standalone.cpp +69 -0
  1169. data/ext/v8/v8_standalone.h +31 -0
  1170. data/ext/v8/v8_str.cpp +17 -0
  1171. data/ext/v8/v8_str.h +9 -0
  1172. data/ext/v8/v8_template.cpp +53 -0
  1173. data/ext/v8/v8_template.h +13 -0
  1174. data/lib/v8.rb +10 -0
  1175. data/lib/v8/context.rb +87 -0
  1176. data/lib/v8/object.rb +38 -0
  1177. data/lib/v8/to.rb +33 -0
  1178. data/lib/v8/v8.bundle +0 -0
  1179. data/script/console +10 -0
  1180. data/script/destroy +14 -0
  1181. data/script/generate +14 -0
  1182. data/spec/ext/cxt_spec.rb +25 -0
  1183. data/spec/ext/obj_spec.rb +13 -0
  1184. data/spec/redjs/README.txt +8 -0
  1185. data/spec/redjs/jsapi_spec.rb +394 -0
  1186. data/spec/redjs/tap.rb +8 -0
  1187. data/spec/redjs_helper.rb +3 -0
  1188. data/spec/spec.opts +1 -0
  1189. data/spec/spec_helper.rb +14 -0
  1190. data/spec/v8/to_spec.rb +15 -0
  1191. data/tasks/rspec.rake +21 -0
  1192. data/therubyracer.gemspec +34 -0
  1193. metadata +1268 -0
@@ -0,0 +1,225 @@
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 void ReportException(TryCatch* try_catch);
121
+ static void Initialize();
122
+ static void OnExit();
123
+ static int* LookupCounter(const char* name);
124
+ static void* CreateHistogram(const char* name,
125
+ int min,
126
+ int max,
127
+ size_t buckets);
128
+ static void AddHistogramSample(void* histogram, int sample);
129
+ static void MapCounters(const char* name);
130
+ static Handle<String> ReadFile(const char* name);
131
+ static void RunShell();
132
+ static int Main(int argc, char* argv[]);
133
+ static Handle<Array> GetCompletions(Handle<String> text,
134
+ Handle<String> full);
135
+ #ifdef ENABLE_DEBUGGER_SUPPORT
136
+ static Handle<Object> DebugMessageDetails(Handle<String> message);
137
+ static Handle<Value> DebugCommandToJSONRequest(Handle<String> command);
138
+ #endif
139
+
140
+ static Handle<Value> Print(const Arguments& args);
141
+ static Handle<Value> Write(const Arguments& args);
142
+ static Handle<Value> Yield(const Arguments& args);
143
+ static Handle<Value> Quit(const Arguments& args);
144
+ static Handle<Value> Version(const Arguments& args);
145
+ static Handle<Value> Read(const Arguments& args);
146
+ static Handle<Value> ReadLine(const Arguments& args);
147
+ static Handle<Value> Load(const Arguments& args);
148
+ // The OS object on the global object contains methods for performing
149
+ // operating system calls:
150
+ //
151
+ // os.system("program_name", ["arg1", "arg2", ...], timeout1, timeout2) will
152
+ // run the command, passing the arguments to the program. The standard output
153
+ // of the program will be picked up and returned as a multiline string. If
154
+ // timeout1 is present then it should be a number. -1 indicates no timeout
155
+ // and a positive number is used as a timeout in milliseconds that limits the
156
+ // time spent waiting between receiving output characters from the program.
157
+ // timeout2, if present, should be a number indicating the limit in
158
+ // milliseconds on the total running time of the program. Exceptions are
159
+ // thrown on timeouts or other errors or if the exit status of the program
160
+ // indicates an error.
161
+ //
162
+ // os.chdir(dir) changes directory to the given directory. Throws an
163
+ // exception/ on error.
164
+ //
165
+ // os.setenv(variable, value) sets an environment variable. Repeated calls to
166
+ // this method leak memory due to the API of setenv in the standard C library.
167
+ //
168
+ // os.umask(alue) calls the umask system call and returns the old umask.
169
+ //
170
+ // os.mkdirp(name, mask) creates a directory. The mask (if present) is anded
171
+ // with the current umask. Intermediate directories are created if necessary.
172
+ // An exception is not thrown if the directory already exists. Analogous to
173
+ // the "mkdir -p" command.
174
+ static Handle<Value> OSObject(const Arguments& args);
175
+ static Handle<Value> System(const Arguments& args);
176
+ static Handle<Value> ChangeDirectory(const Arguments& args);
177
+ static Handle<Value> SetEnvironment(const Arguments& args);
178
+ static Handle<Value> SetUMask(const Arguments& args);
179
+ static Handle<Value> MakeDirectory(const Arguments& args);
180
+ static Handle<Value> RemoveDirectory(const Arguments& args);
181
+
182
+ static void AddOSMethods(Handle<ObjectTemplate> os_template);
183
+
184
+ static Handle<Context> utility_context() { return utility_context_; }
185
+
186
+ static const char* kHistoryFileName;
187
+ static const char* kPrompt;
188
+ private:
189
+ static Persistent<Context> utility_context_;
190
+ static Persistent<Context> evaluation_context_;
191
+ static CounterMap* counter_map_;
192
+ // We statically allocate a set of local counters to be used if we
193
+ // don't want to store the stats in a memory-mapped file
194
+ static CounterCollection local_counters_;
195
+ static CounterCollection* counters_;
196
+ static i::OS::MemoryMappedFile* counters_file_;
197
+ static Counter* GetCounter(const char* name, bool is_histogram);
198
+ };
199
+
200
+
201
+ class LineEditor {
202
+ public:
203
+ enum Type { DUMB = 0, READLINE = 1 };
204
+ LineEditor(Type type, const char* name);
205
+ virtual ~LineEditor() { }
206
+
207
+ virtual i::SmartPointer<char> Prompt(const char* prompt) = 0;
208
+ virtual bool Open() { return true; }
209
+ virtual bool Close() { return true; }
210
+ virtual void AddHistory(const char* str) { }
211
+
212
+ const char* name() { return name_; }
213
+ static LineEditor* Get();
214
+ private:
215
+ Type type_;
216
+ const char* name_;
217
+ LineEditor* next_;
218
+ static LineEditor* first_;
219
+ };
220
+
221
+
222
+ } // namespace v8
223
+
224
+
225
+ #endif // V8_D8_H_
@@ -0,0 +1,1625 @@
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 'clear':
345
+ this.request_ = this.clearCommandToJSONRequest_(args);
346
+ break;
347
+
348
+ case 'threads':
349
+ this.request_ = this.threadsCommandToJSONRequest_(args);
350
+ break;
351
+
352
+ case 'trace':
353
+ // Return undefined to indicate command handled internally (no JSON).
354
+ this.request_ = void 0;
355
+ this.traceCommand_(args);
356
+ break;
357
+
358
+ case 'help':
359
+ case '?':
360
+ this.helpCommand_(args);
361
+ // Return undefined to indicate command handled internally (no JSON).
362
+ this.request_ = void 0;
363
+ break;
364
+
365
+ default:
366
+ throw new Error('Unknown command "' + cmd + '"');
367
+ }
368
+
369
+ last_cmd = cmd;
370
+ }
371
+
372
+ DebugRequest.prototype.JSONRequest = function() {
373
+ return this.request_;
374
+ }
375
+
376
+
377
+ function RequestPacket(command) {
378
+ this.seq = 0;
379
+ this.type = 'request';
380
+ this.command = command;
381
+ }
382
+
383
+
384
+ RequestPacket.prototype.toJSONProtocol = function() {
385
+ // Encode the protocol header.
386
+ var json = '{';
387
+ json += '"seq":' + this.seq;
388
+ json += ',"type":"' + this.type + '"';
389
+ if (this.command) {
390
+ json += ',"command":' + StringToJSON_(this.command);
391
+ }
392
+ if (this.arguments) {
393
+ json += ',"arguments":';
394
+ // Encode the arguments part.
395
+ if (this.arguments.toJSONProtocol) {
396
+ json += this.arguments.toJSONProtocol()
397
+ } else {
398
+ json += SimpleObjectToJSON_(this.arguments);
399
+ }
400
+ }
401
+ json += '}';
402
+ return json;
403
+ }
404
+
405
+
406
+ DebugRequest.prototype.createRequest = function(command) {
407
+ return new RequestPacket(command);
408
+ };
409
+
410
+
411
+ // Create a JSON request for the evaluation command.
412
+ DebugRequest.prototype.makeEvaluateJSONRequest_ = function(expression) {
413
+ // Global varaible used to store whether a handle was requested.
414
+ lookup_handle = null;
415
+ // Check if the expression is a handle id in the form #<handle>#.
416
+ var handle_match = expression.match(/^#([0-9]*)#$/);
417
+ if (handle_match) {
418
+ // Remember the handle requested in a global variable.
419
+ lookup_handle = parseInt(handle_match[1]);
420
+ // Build a lookup request.
421
+ var request = this.createRequest('lookup');
422
+ request.arguments = {};
423
+ request.arguments.handles = [ lookup_handle ];
424
+ return request.toJSONProtocol();
425
+ } else {
426
+ // Build an evaluate request.
427
+ var request = this.createRequest('evaluate');
428
+ request.arguments = {};
429
+ request.arguments.expression = expression;
430
+ // Request a global evaluation if there is no current frame.
431
+ if (Debug.State.currentFrame == kNoFrame) {
432
+ request.arguments.global = true;
433
+ }
434
+ return request.toJSONProtocol();
435
+ }
436
+ };
437
+
438
+
439
+ // Create a JSON request for the references/instances command.
440
+ DebugRequest.prototype.makeReferencesJSONRequest_ = function(handle, type) {
441
+ // Build a references request.
442
+ var handle_match = handle.match(/^#([0-9]*)#$/);
443
+ if (handle_match) {
444
+ var request = this.createRequest('references');
445
+ request.arguments = {};
446
+ request.arguments.type = type;
447
+ request.arguments.handle = parseInt(handle_match[1]);
448
+ return request.toJSONProtocol();
449
+ } else {
450
+ throw new Error('Invalid object id.');
451
+ }
452
+ };
453
+
454
+
455
+ // Create a JSON request for the continue command.
456
+ DebugRequest.prototype.continueCommandToJSONRequest_ = function(args) {
457
+ var request = this.createRequest('continue');
458
+ return request.toJSONProtocol();
459
+ };
460
+
461
+
462
+ // Create a JSON request for the step command.
463
+ DebugRequest.prototype.stepCommandToJSONRequest_ = function(args) {
464
+ // Requesting a step is through the continue command with additional
465
+ // arguments.
466
+ var request = this.createRequest('continue');
467
+ request.arguments = {};
468
+
469
+ // Process arguments if any.
470
+ if (args && args.length > 0) {
471
+ args = args.split(/\s*[ ]+\s*/g);
472
+
473
+ if (args.length > 2) {
474
+ throw new Error('Invalid step arguments.');
475
+ }
476
+
477
+ if (args.length > 0) {
478
+ // Get step count argument if any.
479
+ if (args.length == 2) {
480
+ var stepcount = parseInt(args[1]);
481
+ if (isNaN(stepcount) || stepcount <= 0) {
482
+ throw new Error('Invalid step count argument "' + args[0] + '".');
483
+ }
484
+ request.arguments.stepcount = stepcount;
485
+ }
486
+
487
+ // Get the step action.
488
+ switch (args[0]) {
489
+ case 'in':
490
+ case 'i':
491
+ request.arguments.stepaction = 'in';
492
+ break;
493
+
494
+ case 'min':
495
+ case 'm':
496
+ request.arguments.stepaction = 'min';
497
+ break;
498
+
499
+ case 'next':
500
+ case 'n':
501
+ request.arguments.stepaction = 'next';
502
+ break;
503
+
504
+ case 'out':
505
+ case 'o':
506
+ request.arguments.stepaction = 'out';
507
+ break;
508
+
509
+ default:
510
+ throw new Error('Invalid step argument "' + args[0] + '".');
511
+ }
512
+ }
513
+ } else {
514
+ // Default is step next.
515
+ request.arguments.stepaction = 'next';
516
+ }
517
+
518
+ return request.toJSONProtocol();
519
+ };
520
+
521
+
522
+ // Create a JSON request for the backtrace command.
523
+ DebugRequest.prototype.backtraceCommandToJSONRequest_ = function(args) {
524
+ // Build a backtrace request from the text command.
525
+ var request = this.createRequest('backtrace');
526
+
527
+ // Default is to show top 10 frames.
528
+ request.arguments = {};
529
+ request.arguments.fromFrame = 0;
530
+ request.arguments.toFrame = 10;
531
+
532
+ args = args.split(/\s*[ ]+\s*/g);
533
+ if (args.length == 1 && args[0].length > 0) {
534
+ var frameCount = parseInt(args[0]);
535
+ if (frameCount > 0) {
536
+ // Show top frames.
537
+ request.arguments.fromFrame = 0;
538
+ request.arguments.toFrame = frameCount;
539
+ } else {
540
+ // Show bottom frames.
541
+ request.arguments.fromFrame = 0;
542
+ request.arguments.toFrame = -frameCount;
543
+ request.arguments.bottom = true;
544
+ }
545
+ } else if (args.length == 2) {
546
+ var fromFrame = parseInt(args[0]);
547
+ var toFrame = parseInt(args[1]);
548
+ if (isNaN(fromFrame) || fromFrame < 0) {
549
+ throw new Error('Invalid start frame argument "' + args[0] + '".');
550
+ }
551
+ if (isNaN(toFrame) || toFrame < 0) {
552
+ throw new Error('Invalid end frame argument "' + args[1] + '".');
553
+ }
554
+ if (fromFrame > toFrame) {
555
+ throw new Error('Invalid arguments start frame cannot be larger ' +
556
+ 'than end frame.');
557
+ }
558
+ // Show frame range.
559
+ request.arguments.fromFrame = fromFrame;
560
+ request.arguments.toFrame = toFrame + 1;
561
+ } else if (args.length > 2) {
562
+ throw new Error('Invalid backtrace arguments.');
563
+ }
564
+
565
+ return request.toJSONProtocol();
566
+ };
567
+
568
+
569
+ // Create a JSON request for the frame command.
570
+ DebugRequest.prototype.frameCommandToJSONRequest_ = function(args) {
571
+ // Build a frame request from the text command.
572
+ var request = this.createRequest('frame');
573
+ args = args.split(/\s*[ ]+\s*/g);
574
+ if (args.length > 0 && args[0].length > 0) {
575
+ request.arguments = {};
576
+ request.arguments.number = args[0];
577
+ }
578
+ return request.toJSONProtocol();
579
+ };
580
+
581
+
582
+ // Create a JSON request for the scopes command.
583
+ DebugRequest.prototype.scopesCommandToJSONRequest_ = function(args) {
584
+ // Build a scopes request from the text command.
585
+ var request = this.createRequest('scopes');
586
+ return request.toJSONProtocol();
587
+ };
588
+
589
+
590
+ // Create a JSON request for the scope command.
591
+ DebugRequest.prototype.scopeCommandToJSONRequest_ = function(args) {
592
+ // Build a scope request from the text command.
593
+ var request = this.createRequest('scope');
594
+ args = args.split(/\s*[ ]+\s*/g);
595
+ if (args.length > 0 && args[0].length > 0) {
596
+ request.arguments = {};
597
+ request.arguments.number = args[0];
598
+ }
599
+ return request.toJSONProtocol();
600
+ };
601
+
602
+
603
+ // Create a JSON request for the print command.
604
+ DebugRequest.prototype.printCommandToJSONRequest_ = function(args) {
605
+ // Build an evaluate request from the text command.
606
+ if (args.length == 0) {
607
+ throw new Error('Missing expression.');
608
+ }
609
+ return this.makeEvaluateJSONRequest_(args);
610
+ };
611
+
612
+
613
+ // Create a JSON request for the dir command.
614
+ DebugRequest.prototype.dirCommandToJSONRequest_ = function(args) {
615
+ // Build an evaluate request from the text command.
616
+ if (args.length == 0) {
617
+ throw new Error('Missing expression.');
618
+ }
619
+ return this.makeEvaluateJSONRequest_(args);
620
+ };
621
+
622
+
623
+ // Create a JSON request for the references command.
624
+ DebugRequest.prototype.referencesCommandToJSONRequest_ = function(args) {
625
+ // Build an evaluate request from the text command.
626
+ if (args.length == 0) {
627
+ throw new Error('Missing object id.');
628
+ }
629
+
630
+ return this.makeReferencesJSONRequest_(args, 'referencedBy');
631
+ };
632
+
633
+
634
+ // Create a JSON request for the instances command.
635
+ DebugRequest.prototype.instancesCommandToJSONRequest_ = function(args) {
636
+ // Build an evaluate request from the text command.
637
+ if (args.length == 0) {
638
+ throw new Error('Missing object id.');
639
+ }
640
+
641
+ // Build a references request.
642
+ return this.makeReferencesJSONRequest_(args, 'constructedBy');
643
+ };
644
+
645
+
646
+ // Create a JSON request for the source command.
647
+ DebugRequest.prototype.sourceCommandToJSONRequest_ = function(args) {
648
+ // Build a evaluate request from the text command.
649
+ var request = this.createRequest('source');
650
+
651
+ // Default is ten lines starting five lines before the current location.
652
+ var from = Debug.State.currentSourceLine - 5;
653
+ var lines = 10;
654
+
655
+ // Parse the arguments.
656
+ args = args.split(/\s*[ ]+\s*/g);
657
+ if (args.length > 1 && args[0].length > 0 && args[1].length > 0) {
658
+ from = parseInt(args[0]) - 1;
659
+ lines = parseInt(args[1]);
660
+ } else if (args.length > 0 && args[0].length > 0) {
661
+ from = parseInt(args[0]) - 1;
662
+ }
663
+
664
+ if (from < 0) from = 0;
665
+ if (lines < 0) lines = 10;
666
+
667
+ // Request source arround current source location.
668
+ request.arguments = {};
669
+ request.arguments.fromLine = from;
670
+ request.arguments.toLine = from + lines;
671
+
672
+ return request.toJSONProtocol();
673
+ };
674
+
675
+
676
+ // Create a JSON request for the scripts command.
677
+ DebugRequest.prototype.scriptsCommandToJSONRequest_ = function(args) {
678
+ // Build a evaluate request from the text command.
679
+ var request = this.createRequest('scripts');
680
+
681
+ // Process arguments if any.
682
+ if (args && args.length > 0) {
683
+ args = args.split(/\s*[ ]+\s*/g);
684
+
685
+ if (args.length > 1) {
686
+ throw new Error('Invalid scripts arguments.');
687
+ }
688
+
689
+ request.arguments = {};
690
+ switch (args[0]) {
691
+ case 'natives':
692
+ request.arguments.types = ScriptTypeFlag(Debug.ScriptType.Native);
693
+ break;
694
+
695
+ case 'extensions':
696
+ request.arguments.types = ScriptTypeFlag(Debug.ScriptType.Extension);
697
+ break;
698
+
699
+ case 'all':
700
+ request.arguments.types =
701
+ ScriptTypeFlag(Debug.ScriptType.Normal) |
702
+ ScriptTypeFlag(Debug.ScriptType.Native) |
703
+ ScriptTypeFlag(Debug.ScriptType.Extension);
704
+ break;
705
+
706
+ default:
707
+ throw new Error('Invalid argument "' + args[0] + '".');
708
+ }
709
+ }
710
+
711
+ return request.toJSONProtocol();
712
+ };
713
+
714
+
715
+ // Create a JSON request for the break command.
716
+ DebugRequest.prototype.breakCommandToJSONRequest_ = function(args) {
717
+ // Build a evaluate request from the text command.
718
+ var request = this.createRequest('setbreakpoint');
719
+
720
+ // Process arguments if any.
721
+ if (args && args.length > 0) {
722
+ var target = args;
723
+ var type = 'function';
724
+ var line;
725
+ var column;
726
+ var condition;
727
+ var pos;
728
+
729
+ // Check for breakpoint condition.
730
+ pos = args.indexOf(' ');
731
+ if (pos > 0) {
732
+ target = args.substring(0, pos);
733
+ condition = args.substring(pos + 1, args.length);
734
+ }
735
+
736
+ // Check for script breakpoint (name:line[:column]). If no ':' in break
737
+ // specification it is considered a function break point.
738
+ pos = target.indexOf(':');
739
+ if (pos > 0) {
740
+ type = 'script';
741
+ var tmp = target.substring(pos + 1, target.length);
742
+ target = target.substring(0, pos);
743
+
744
+ // Check for both line and column.
745
+ pos = tmp.indexOf(':');
746
+ if (pos > 0) {
747
+ column = parseInt(tmp.substring(pos + 1, tmp.length)) - 1;
748
+ line = parseInt(tmp.substring(0, pos)) - 1;
749
+ } else {
750
+ line = parseInt(tmp) - 1;
751
+ }
752
+ } else if (target[0] == '#' && target[target.length - 1] == '#') {
753
+ type = 'handle';
754
+ target = target.substring(1, target.length - 1);
755
+ } else {
756
+ type = 'function';
757
+ }
758
+
759
+ request.arguments = {};
760
+ request.arguments.type = type;
761
+ request.arguments.target = target;
762
+ request.arguments.line = line;
763
+ request.arguments.column = column;
764
+ request.arguments.condition = condition;
765
+ } else {
766
+ throw new Error('Invalid break arguments.');
767
+ }
768
+
769
+ return request.toJSONProtocol();
770
+ };
771
+
772
+
773
+ // Create a JSON request for the clear command.
774
+ DebugRequest.prototype.clearCommandToJSONRequest_ = function(args) {
775
+ // Build a evaluate request from the text command.
776
+ var request = this.createRequest('clearbreakpoint');
777
+
778
+ // Process arguments if any.
779
+ if (args && args.length > 0) {
780
+ request.arguments = {};
781
+ request.arguments.breakpoint = parseInt(args);
782
+ } else {
783
+ throw new Error('Invalid break arguments.');
784
+ }
785
+
786
+ return request.toJSONProtocol();
787
+ };
788
+
789
+
790
+ // Create a JSON request for the threads command.
791
+ DebugRequest.prototype.threadsCommandToJSONRequest_ = function(args) {
792
+ // Build a threads request from the text command.
793
+ var request = this.createRequest('threads');
794
+ return request.toJSONProtocol();
795
+ };
796
+
797
+
798
+ // Handle the trace command.
799
+ DebugRequest.prototype.traceCommand_ = function(args) {
800
+ // Process arguments.
801
+ if (args && args.length > 0) {
802
+ if (args == 'compile') {
803
+ trace_compile = !trace_compile;
804
+ print('Tracing of compiled scripts ' + (trace_compile ? 'on' : 'off'));
805
+ } else {
806
+ throw new Error('Invalid trace arguments.');
807
+ }
808
+ } else {
809
+ throw new Error('Invalid trace arguments.');
810
+ }
811
+ }
812
+
813
+ // Handle the help command.
814
+ DebugRequest.prototype.helpCommand_ = function(args) {
815
+ // Help os quite simple.
816
+ if (args && args.length > 0) {
817
+ print('warning: arguments to \'help\' are ignored');
818
+ }
819
+
820
+ print('break location [condition]');
821
+ print(' break on named function: location is a function name');
822
+ print(' break on function: location is #<id>#');
823
+ print(' break on script position: location is name:line[:column]');
824
+ print('clear <breakpoint #>');
825
+ print('backtrace [n] | [-n] | [from to]');
826
+ print('frame <frame #>');
827
+ print('scopes');
828
+ print('scope <scope #>');
829
+ print('step [in | next | out| min [step count]]');
830
+ print('print <expression>');
831
+ print('dir <expression>');
832
+ print('source [from line [num lines]]');
833
+ print('scripts');
834
+ print('continue');
835
+ print('trace compile');
836
+ print('help');
837
+ }
838
+
839
+
840
+ function formatHandleReference_(value) {
841
+ if (value.handle() >= 0) {
842
+ return '#' + value.handle() + '#';
843
+ } else {
844
+ return '#Transient#';
845
+ }
846
+ }
847
+
848
+
849
+ function formatObject_(value, include_properties) {
850
+ var result = '';
851
+ result += formatHandleReference_(value);
852
+ result += ', type: object'
853
+ result += ', constructor ';
854
+ var ctor = value.constructorFunctionValue();
855
+ result += formatHandleReference_(ctor);
856
+ result += ', __proto__ ';
857
+ var proto = value.protoObjectValue();
858
+ result += formatHandleReference_(proto);
859
+ result += ', ';
860
+ result += value.propertyCount();
861
+ result += ' properties.';
862
+ if (include_properties) {
863
+ result += '\n';
864
+ for (var i = 0; i < value.propertyCount(); i++) {
865
+ result += ' ';
866
+ result += value.propertyName(i);
867
+ result += ': ';
868
+ var property_value = value.propertyValue(i);
869
+ if (property_value instanceof ProtocolReference) {
870
+ result += '<no type>';
871
+ } else {
872
+ if (property_value && property_value.type()) {
873
+ result += property_value.type();
874
+ } else {
875
+ result += '<no type>';
876
+ }
877
+ }
878
+ result += ' ';
879
+ result += formatHandleReference_(property_value);
880
+ result += '\n';
881
+ }
882
+ }
883
+ return result;
884
+ }
885
+
886
+
887
+ function formatScope_(scope) {
888
+ var result = '';
889
+ var index = scope.index;
890
+ result += '#' + (index <= 9 ? '0' : '') + index;
891
+ result += ' ';
892
+ switch (scope.type) {
893
+ case Debug.ScopeType.Global:
894
+ result += 'Global, ';
895
+ result += '#' + scope.object.ref + '#';
896
+ break;
897
+ case Debug.ScopeType.Local:
898
+ result += 'Local';
899
+ break;
900
+ case Debug.ScopeType.With:
901
+ result += 'With, ';
902
+ result += '#' + scope.object.ref + '#';
903
+ break;
904
+ case Debug.ScopeType.Catch:
905
+ result += 'Catch, ';
906
+ result += '#' + scope.object.ref + '#';
907
+ break;
908
+ case Debug.ScopeType.Closure:
909
+ result += 'Closure';
910
+ break;
911
+ default:
912
+ result += 'UNKNOWN';
913
+ }
914
+ return result;
915
+ }
916
+
917
+
918
+ // Convert a JSON response to text for display in a text based debugger.
919
+ function DebugResponseDetails(response) {
920
+ details = {text:'', running:false}
921
+
922
+ try {
923
+ if (!response.success()) {
924
+ details.text = response.message();
925
+ return details;
926
+ }
927
+
928
+ // Get the running state.
929
+ details.running = response.running();
930
+
931
+ var body = response.body();
932
+ var result = '';
933
+ switch (response.command()) {
934
+ case 'setbreakpoint':
935
+ result = 'set breakpoint #';
936
+ result += body.breakpoint;
937
+ details.text = result;
938
+ break;
939
+
940
+ case 'clearbreakpoint':
941
+ result = 'cleared breakpoint #';
942
+ result += body.breakpoint;
943
+ details.text = result;
944
+ break;
945
+
946
+ case 'backtrace':
947
+ if (body.totalFrames == 0) {
948
+ result = '(empty stack)';
949
+ } else {
950
+ var result = 'Frames #' + body.fromFrame + ' to #' +
951
+ (body.toFrame - 1) + ' of ' + body.totalFrames + '\n';
952
+ for (i = 0; i < body.frames.length; i++) {
953
+ if (i != 0) result += '\n';
954
+ result += body.frames[i].text;
955
+ }
956
+ }
957
+ details.text = result;
958
+ break;
959
+
960
+ case 'frame':
961
+ details.text = SourceUnderline(body.sourceLineText,
962
+ body.column);
963
+ Debug.State.currentSourceLine = body.line;
964
+ Debug.State.currentFrame = body.index;
965
+ break;
966
+
967
+ case 'scopes':
968
+ if (body.totalScopes == 0) {
969
+ result = '(no scopes)';
970
+ } else {
971
+ result = 'Scopes #' + body.fromScope + ' to #' +
972
+ (body.toScope - 1) + ' of ' + body.totalScopes + '\n';
973
+ for (i = 0; i < body.scopes.length; i++) {
974
+ if (i != 0) {
975
+ result += '\n';
976
+ }
977
+ result += formatScope_(body.scopes[i]);
978
+ }
979
+ }
980
+ details.text = result;
981
+ break;
982
+
983
+ case 'scope':
984
+ result += formatScope_(body);
985
+ result += '\n';
986
+ var scope_object_value = response.lookup(body.object.ref);
987
+ result += formatObject_(scope_object_value, true);
988
+ details.text = result;
989
+ break;
990
+
991
+ case 'evaluate':
992
+ case 'lookup':
993
+ if (last_cmd == 'p' || last_cmd == 'print') {
994
+ result = body.text;
995
+ } else {
996
+ var value;
997
+ if (lookup_handle) {
998
+ value = response.bodyValue(lookup_handle);
999
+ } else {
1000
+ value = response.bodyValue();
1001
+ }
1002
+ if (value.isObject()) {
1003
+ result += formatObject_(value, true);
1004
+ } else {
1005
+ result += 'type: ';
1006
+ result += value.type();
1007
+ if (!value.isUndefined() && !value.isNull()) {
1008
+ result += ', ';
1009
+ if (value.isString()) {
1010
+ result += '"';
1011
+ }
1012
+ result += value.value();
1013
+ if (value.isString()) {
1014
+ result += '"';
1015
+ }
1016
+ }
1017
+ result += '\n';
1018
+ }
1019
+ }
1020
+ details.text = result;
1021
+ break;
1022
+
1023
+ case 'references':
1024
+ var count = body.length;
1025
+ result += 'found ' + count + ' objects';
1026
+ result += '\n';
1027
+ for (var i = 0; i < count; i++) {
1028
+ var value = response.bodyValue(i);
1029
+ result += formatObject_(value, false);
1030
+ result += '\n';
1031
+ }
1032
+ details.text = result;
1033
+ break;
1034
+
1035
+ case 'source':
1036
+ // Get the source from the response.
1037
+ var source = body.source;
1038
+ var from_line = body.fromLine + 1;
1039
+ var lines = source.split('\n');
1040
+ var maxdigits = 1 + Math.floor(log10(from_line + lines.length));
1041
+ if (maxdigits < 3) {
1042
+ maxdigits = 3;
1043
+ }
1044
+ var result = '';
1045
+ for (var num = 0; num < lines.length; num++) {
1046
+ // Check if there's an extra newline at the end.
1047
+ if (num == (lines.length - 1) && lines[num].length == 0) {
1048
+ break;
1049
+ }
1050
+
1051
+ var current_line = from_line + num;
1052
+ spacer = maxdigits - (1 + Math.floor(log10(current_line)));
1053
+ if (current_line == Debug.State.currentSourceLine + 1) {
1054
+ for (var i = 0; i < maxdigits; i++) {
1055
+ result += '>';
1056
+ }
1057
+ result += ' ';
1058
+ } else {
1059
+ for (var i = 0; i < spacer; i++) {
1060
+ result += ' ';
1061
+ }
1062
+ result += current_line + ': ';
1063
+ }
1064
+ result += lines[num];
1065
+ result += '\n';
1066
+ }
1067
+ details.text = result;
1068
+ break;
1069
+
1070
+ case 'scripts':
1071
+ var result = '';
1072
+ for (i = 0; i < body.length; i++) {
1073
+ if (i != 0) result += '\n';
1074
+ if (body[i].id) {
1075
+ result += body[i].id;
1076
+ } else {
1077
+ result += '[no id]';
1078
+ }
1079
+ result += ', ';
1080
+ if (body[i].name) {
1081
+ result += body[i].name;
1082
+ } else {
1083
+ if (body[i].compilationType == Debug.ScriptCompilationType.Eval) {
1084
+ result += 'eval from ';
1085
+ var script_value = response.lookup(body[i].evalFromScript.ref);
1086
+ result += ' ' + script_value.field('name');
1087
+ result += ':' + (body[i].evalFromLocation.line + 1);
1088
+ result += ':' + body[i].evalFromLocation.column;
1089
+ } else if (body[i].compilationType ==
1090
+ Debug.ScriptCompilationType.JSON) {
1091
+ result += 'JSON ';
1092
+ } else { // body[i].compilation == Debug.ScriptCompilationType.Host
1093
+ result += '[unnamed] ';
1094
+ }
1095
+ }
1096
+ result += ' (lines: ';
1097
+ result += body[i].lineCount;
1098
+ result += ', length: ';
1099
+ result += body[i].sourceLength;
1100
+ if (body[i].type == Debug.ScriptType.Native) {
1101
+ result += ', native';
1102
+ } else if (body[i].type == Debug.ScriptType.Extension) {
1103
+ result += ', extension';
1104
+ }
1105
+ result += '), [';
1106
+ var sourceStart = body[i].sourceStart;
1107
+ if (sourceStart.length > 40) {
1108
+ sourceStart = sourceStart.substring(0, 37) + '...';
1109
+ }
1110
+ result += sourceStart;
1111
+ result += ']';
1112
+ }
1113
+ details.text = result;
1114
+ break;
1115
+
1116
+ case 'threads':
1117
+ var result = 'Active V8 threads: ' + body.totalThreads + '\n';
1118
+ body.threads.sort(function(a, b) { return a.id - b.id; });
1119
+ for (i = 0; i < body.threads.length; i++) {
1120
+ result += body.threads[i].current ? '*' : ' ';
1121
+ result += ' ';
1122
+ result += body.threads[i].id;
1123
+ result += '\n';
1124
+ }
1125
+ details.text = result;
1126
+ break;
1127
+
1128
+ case 'continue':
1129
+ details.text = "(running)";
1130
+ break;
1131
+
1132
+ default:
1133
+ details.text =
1134
+ 'Response for unknown command \'' + response.command + '\'' +
1135
+ ' (' + json_response + ')';
1136
+ }
1137
+ } catch (e) {
1138
+ details.text = 'Error: "' + e + '" formatting response';
1139
+ }
1140
+
1141
+ return details;
1142
+ };
1143
+
1144
+
1145
+ /**
1146
+ * Protocol packages send from the debugger.
1147
+ * @param {string} json - raw protocol packet as JSON string.
1148
+ * @constructor
1149
+ */
1150
+ function ProtocolPackage(json) {
1151
+ this.packet_ = JSON.parse(json);
1152
+ this.refs_ = [];
1153
+ if (this.packet_.refs) {
1154
+ for (var i = 0; i < this.packet_.refs.length; i++) {
1155
+ this.refs_[this.packet_.refs[i].handle] = this.packet_.refs[i];
1156
+ }
1157
+ }
1158
+ }
1159
+
1160
+
1161
+ /**
1162
+ * Get the packet type.
1163
+ * @return {String} the packet type
1164
+ */
1165
+ ProtocolPackage.prototype.type = function() {
1166
+ return this.packet_.type;
1167
+ }
1168
+
1169
+
1170
+ /**
1171
+ * Get the packet event.
1172
+ * @return {Object} the packet event
1173
+ */
1174
+ ProtocolPackage.prototype.event = function() {
1175
+ return this.packet_.event;
1176
+ }
1177
+
1178
+
1179
+ /**
1180
+ * Get the packet request sequence.
1181
+ * @return {number} the packet request sequence
1182
+ */
1183
+ ProtocolPackage.prototype.requestSeq = function() {
1184
+ return this.packet_.request_seq;
1185
+ }
1186
+
1187
+
1188
+ /**
1189
+ * Get the packet request sequence.
1190
+ * @return {number} the packet request sequence
1191
+ */
1192
+ ProtocolPackage.prototype.running = function() {
1193
+ return this.packet_.running ? true : false;
1194
+ }
1195
+
1196
+
1197
+ ProtocolPackage.prototype.success = function() {
1198
+ return this.packet_.success ? true : false;
1199
+ }
1200
+
1201
+
1202
+ ProtocolPackage.prototype.message = function() {
1203
+ return this.packet_.message;
1204
+ }
1205
+
1206
+
1207
+ ProtocolPackage.prototype.command = function() {
1208
+ return this.packet_.command;
1209
+ }
1210
+
1211
+
1212
+ ProtocolPackage.prototype.body = function() {
1213
+ return this.packet_.body;
1214
+ }
1215
+
1216
+
1217
+ ProtocolPackage.prototype.bodyValue = function(index) {
1218
+ if (index != null) {
1219
+ return new ProtocolValue(this.packet_.body[index], this);
1220
+ } else {
1221
+ return new ProtocolValue(this.packet_.body, this);
1222
+ }
1223
+ }
1224
+
1225
+
1226
+ ProtocolPackage.prototype.body = function() {
1227
+ return this.packet_.body;
1228
+ }
1229
+
1230
+
1231
+ ProtocolPackage.prototype.lookup = function(handle) {
1232
+ var value = this.refs_[handle];
1233
+ if (value) {
1234
+ return new ProtocolValue(value, this);
1235
+ } else {
1236
+ return new ProtocolReference(handle);
1237
+ }
1238
+ }
1239
+
1240
+
1241
+ function ProtocolValue(value, packet) {
1242
+ this.value_ = value;
1243
+ this.packet_ = packet;
1244
+ }
1245
+
1246
+
1247
+ /**
1248
+ * Get the value type.
1249
+ * @return {String} the value type
1250
+ */
1251
+ ProtocolValue.prototype.type = function() {
1252
+ return this.value_.type;
1253
+ }
1254
+
1255
+
1256
+ /**
1257
+ * Get a metadata field from a protocol value.
1258
+ * @return {Object} the metadata field value
1259
+ */
1260
+ ProtocolValue.prototype.field = function(name) {
1261
+ return this.value_[name];
1262
+ }
1263
+
1264
+
1265
+ /**
1266
+ * Check is the value is a primitive value.
1267
+ * @return {boolean} true if the value is primitive
1268
+ */
1269
+ ProtocolValue.prototype.isPrimitive = function() {
1270
+ return this.isUndefined() || this.isNull() || this.isBoolean() ||
1271
+ this.isNumber() || this.isString();
1272
+ }
1273
+
1274
+
1275
+ /**
1276
+ * Get the object handle.
1277
+ * @return {number} the value handle
1278
+ */
1279
+ ProtocolValue.prototype.handle = function() {
1280
+ return this.value_.handle;
1281
+ }
1282
+
1283
+
1284
+ /**
1285
+ * Check is the value is undefined.
1286
+ * @return {boolean} true if the value is undefined
1287
+ */
1288
+ ProtocolValue.prototype.isUndefined = function() {
1289
+ return this.value_.type == 'undefined';
1290
+ }
1291
+
1292
+
1293
+ /**
1294
+ * Check is the value is null.
1295
+ * @return {boolean} true if the value is null
1296
+ */
1297
+ ProtocolValue.prototype.isNull = function() {
1298
+ return this.value_.type == 'null';
1299
+ }
1300
+
1301
+
1302
+ /**
1303
+ * Check is the value is a boolean.
1304
+ * @return {boolean} true if the value is a boolean
1305
+ */
1306
+ ProtocolValue.prototype.isBoolean = function() {
1307
+ return this.value_.type == 'boolean';
1308
+ }
1309
+
1310
+
1311
+ /**
1312
+ * Check is the value is a number.
1313
+ * @return {boolean} true if the value is a number
1314
+ */
1315
+ ProtocolValue.prototype.isNumber = function() {
1316
+ return this.value_.type == 'number';
1317
+ }
1318
+
1319
+
1320
+ /**
1321
+ * Check is the value is a string.
1322
+ * @return {boolean} true if the value is a string
1323
+ */
1324
+ ProtocolValue.prototype.isString = function() {
1325
+ return this.value_.type == 'string';
1326
+ }
1327
+
1328
+
1329
+ /**
1330
+ * Check is the value is an object.
1331
+ * @return {boolean} true if the value is an object
1332
+ */
1333
+ ProtocolValue.prototype.isObject = function() {
1334
+ return this.value_.type == 'object' || this.value_.type == 'function' ||
1335
+ this.value_.type == 'error' || this.value_.type == 'regexp';
1336
+ }
1337
+
1338
+
1339
+ /**
1340
+ * Get the constructor function
1341
+ * @return {ProtocolValue} constructor function
1342
+ */
1343
+ ProtocolValue.prototype.constructorFunctionValue = function() {
1344
+ var ctor = this.value_.constructorFunction;
1345
+ return this.packet_.lookup(ctor.ref);
1346
+ }
1347
+
1348
+
1349
+ /**
1350
+ * Get the __proto__ value
1351
+ * @return {ProtocolValue} __proto__ value
1352
+ */
1353
+ ProtocolValue.prototype.protoObjectValue = function() {
1354
+ var proto = this.value_.protoObject;
1355
+ return this.packet_.lookup(proto.ref);
1356
+ }
1357
+
1358
+
1359
+ /**
1360
+ * Get the number og properties.
1361
+ * @return {number} the number of properties
1362
+ */
1363
+ ProtocolValue.prototype.propertyCount = function() {
1364
+ return this.value_.properties ? this.value_.properties.length : 0;
1365
+ }
1366
+
1367
+
1368
+ /**
1369
+ * Get the specified property name.
1370
+ * @return {string} property name
1371
+ */
1372
+ ProtocolValue.prototype.propertyName = function(index) {
1373
+ var property = this.value_.properties[index];
1374
+ return property.name;
1375
+ }
1376
+
1377
+
1378
+ /**
1379
+ * Return index for the property name.
1380
+ * @param name The property name to look for
1381
+ * @return {number} index for the property name
1382
+ */
1383
+ ProtocolValue.prototype.propertyIndex = function(name) {
1384
+ for (var i = 0; i < this.propertyCount(); i++) {
1385
+ if (this.value_.properties[i].name == name) {
1386
+ return i;
1387
+ }
1388
+ }
1389
+ return null;
1390
+ }
1391
+
1392
+
1393
+ /**
1394
+ * Get the specified property value.
1395
+ * @return {ProtocolValue} property value
1396
+ */
1397
+ ProtocolValue.prototype.propertyValue = function(index) {
1398
+ var property = this.value_.properties[index];
1399
+ return this.packet_.lookup(property.ref);
1400
+ }
1401
+
1402
+
1403
+ /**
1404
+ * Check is the value is a string.
1405
+ * @return {boolean} true if the value is a string
1406
+ */
1407
+ ProtocolValue.prototype.value = function() {
1408
+ return this.value_.value;
1409
+ }
1410
+
1411
+
1412
+ function ProtocolReference(handle) {
1413
+ this.handle_ = handle;
1414
+ }
1415
+
1416
+
1417
+ ProtocolReference.prototype.handle = function() {
1418
+ return this.handle_;
1419
+ }
1420
+
1421
+
1422
+ function MakeJSONPair_(name, value) {
1423
+ return '"' + name + '":' + value;
1424
+ }
1425
+
1426
+
1427
+ function ArrayToJSONObject_(content) {
1428
+ return '{' + content.join(',') + '}';
1429
+ }
1430
+
1431
+
1432
+ function ArrayToJSONArray_(content) {
1433
+ return '[' + content.join(',') + ']';
1434
+ }
1435
+
1436
+
1437
+ function BooleanToJSON_(value) {
1438
+ return String(value);
1439
+ }
1440
+
1441
+
1442
+ function NumberToJSON_(value) {
1443
+ return String(value);
1444
+ }
1445
+
1446
+
1447
+ // Mapping of some control characters to avoid the \uXXXX syntax for most
1448
+ // commonly used control cahracters.
1449
+ const ctrlCharMap_ = {
1450
+ '\b': '\\b',
1451
+ '\t': '\\t',
1452
+ '\n': '\\n',
1453
+ '\f': '\\f',
1454
+ '\r': '\\r',
1455
+ '"' : '\\"',
1456
+ '\\': '\\\\'
1457
+ };
1458
+
1459
+
1460
+ // Regular expression testing for ", \ and control characters (0x00 - 0x1F).
1461
+ const ctrlCharTest_ = new RegExp('["\\\\\x00-\x1F]');
1462
+
1463
+
1464
+ // Regular expression matching ", \ and control characters (0x00 - 0x1F)
1465
+ // globally.
1466
+ const ctrlCharMatch_ = new RegExp('["\\\\\x00-\x1F]', 'g');
1467
+
1468
+
1469
+ /**
1470
+ * Convert a String to its JSON representation (see http://www.json.org/). To
1471
+ * avoid depending on the String object this method calls the functions in
1472
+ * string.js directly and not through the value.
1473
+ * @param {String} value The String value to format as JSON
1474
+ * @return {string} JSON formatted String value
1475
+ */
1476
+ function StringToJSON_(value) {
1477
+ // Check for" , \ and control characters (0x00 - 0x1F). No need to call
1478
+ // RegExpTest as ctrlchar is constructed using RegExp.
1479
+ if (ctrlCharTest_.test(value)) {
1480
+ // Replace ", \ and control characters (0x00 - 0x1F).
1481
+ return '"' +
1482
+ value.replace(ctrlCharMatch_, function (char) {
1483
+ // Use charmap if possible.
1484
+ var mapped = ctrlCharMap_[char];
1485
+ if (mapped) return mapped;
1486
+ mapped = char.charCodeAt();
1487
+ // Convert control character to unicode escape sequence.
1488
+ return '\\u00' +
1489
+ '0' + // TODO %NumberToRadixString(Math.floor(mapped / 16), 16) +
1490
+ '0' // TODO %NumberToRadixString(mapped % 16, 16);
1491
+ })
1492
+ + '"';
1493
+ }
1494
+
1495
+ // Simple string with no special characters.
1496
+ return '"' + value + '"';
1497
+ }
1498
+
1499
+
1500
+ /**
1501
+ * Convert a Date to ISO 8601 format. To avoid depending on the Date object
1502
+ * this method calls the functions in date.js directly and not through the
1503
+ * value.
1504
+ * @param {Date} value The Date value to format as JSON
1505
+ * @return {string} JSON formatted Date value
1506
+ */
1507
+ function DateToISO8601_(value) {
1508
+ function f(n) {
1509
+ return n < 10 ? '0' + n : n;
1510
+ }
1511
+ function g(n) {
1512
+ return n < 10 ? '00' + n : n < 100 ? '0' + n : n;
1513
+ }
1514
+ return builtins.GetUTCFullYearFrom(value) + '-' +
1515
+ f(builtins.GetUTCMonthFrom(value) + 1) + '-' +
1516
+ f(builtins.GetUTCDateFrom(value)) + 'T' +
1517
+ f(builtins.GetUTCHoursFrom(value)) + ':' +
1518
+ f(builtins.GetUTCMinutesFrom(value)) + ':' +
1519
+ f(builtins.GetUTCSecondsFrom(value)) + '.' +
1520
+ g(builtins.GetUTCMillisecondsFrom(value)) + 'Z';
1521
+ }
1522
+
1523
+
1524
+ /**
1525
+ * Convert a Date to ISO 8601 format. To avoid depending on the Date object
1526
+ * this method calls the functions in date.js directly and not through the
1527
+ * value.
1528
+ * @param {Date} value The Date value to format as JSON
1529
+ * @return {string} JSON formatted Date value
1530
+ */
1531
+ function DateToJSON_(value) {
1532
+ return '"' + DateToISO8601_(value) + '"';
1533
+ }
1534
+
1535
+
1536
+ /**
1537
+ * Convert an Object to its JSON representation (see http://www.json.org/).
1538
+ * This implementation simply runs through all string property names and adds
1539
+ * each property to the JSON representation for some predefined types. For type
1540
+ * "object" the function calls itself recursively unless the object has the
1541
+ * function property "toJSONProtocol" in which case that is used. This is not
1542
+ * a general implementation but sufficient for the debugger. Note that circular
1543
+ * structures will cause infinite recursion.
1544
+ * @param {Object} object The object to format as JSON
1545
+ * @return {string} JSON formatted object value
1546
+ */
1547
+ function SimpleObjectToJSON_(object) {
1548
+ var content = [];
1549
+ for (var key in object) {
1550
+ // Only consider string keys.
1551
+ if (typeof key == 'string') {
1552
+ var property_value = object[key];
1553
+
1554
+ // Format the value based on its type.
1555
+ var property_value_json;
1556
+ switch (typeof property_value) {
1557
+ case 'object':
1558
+ if (typeof property_value.toJSONProtocol == 'function') {
1559
+ property_value_json = property_value.toJSONProtocol(true)
1560
+ } else if (property_value.constructor.name == 'Array'){
1561
+ property_value_json = SimpleArrayToJSON_(property_value);
1562
+ } else {
1563
+ property_value_json = SimpleObjectToJSON_(property_value);
1564
+ }
1565
+ break;
1566
+
1567
+ case 'boolean':
1568
+ property_value_json = BooleanToJSON_(property_value);
1569
+ break;
1570
+
1571
+ case 'number':
1572
+ property_value_json = NumberToJSON_(property_value);
1573
+ break;
1574
+
1575
+ case 'string':
1576
+ property_value_json = StringToJSON_(property_value);
1577
+ break;
1578
+
1579
+ default:
1580
+ property_value_json = null;
1581
+ }
1582
+
1583
+ // Add the property if relevant.
1584
+ if (property_value_json) {
1585
+ content.push(StringToJSON_(key) + ':' + property_value_json);
1586
+ }
1587
+ }
1588
+ }
1589
+
1590
+ // Make JSON object representation.
1591
+ return '{' + content.join(',') + '}';
1592
+ }
1593
+
1594
+
1595
+ /**
1596
+ * Convert an array to its JSON representation. This is a VERY simple
1597
+ * implementation just to support what is needed for the debugger.
1598
+ * @param {Array} arrya The array to format as JSON
1599
+ * @return {string} JSON formatted array value
1600
+ */
1601
+ function SimpleArrayToJSON_(array) {
1602
+ // Make JSON array representation.
1603
+ var json = '[';
1604
+ for (var i = 0; i < array.length; i++) {
1605
+ if (i != 0) {
1606
+ json += ',';
1607
+ }
1608
+ var elem = array[i];
1609
+ if (elem.toJSONProtocol) {
1610
+ json += elem.toJSONProtocol(true)
1611
+ } else if (typeof(elem) === 'object') {
1612
+ json += SimpleObjectToJSON_(elem);
1613
+ } else if (typeof(elem) === 'boolean') {
1614
+ json += BooleanToJSON_(elem);
1615
+ } else if (typeof(elem) === 'number') {
1616
+ json += NumberToJSON_(elem);
1617
+ } else if (typeof(elem) === 'string') {
1618
+ json += StringToJSON_(elem);
1619
+ } else {
1620
+ json += elem;
1621
+ }
1622
+ }
1623
+ json += ']';
1624
+ return json;
1625
+ }