therubyracer 0.4.7-x86-darwin-10

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 (1194) hide show
  1. data/Doxyfile +1514 -0
  2. data/History.txt +39 -0
  3. data/Manifest.txt +1192 -0
  4. data/README.rdoc +157 -0
  5. data/Rakefile +49 -0
  6. data/docs/data_conversion.txt +18 -0
  7. data/ext/v8/Makefile +169 -0
  8. data/ext/v8/callbacks.cpp +160 -0
  9. data/ext/v8/callbacks.h +14 -0
  10. data/ext/v8/convert_ruby.cpp +8 -0
  11. data/ext/v8/convert_ruby.h +99 -0
  12. data/ext/v8/convert_string.cpp +10 -0
  13. data/ext/v8/convert_string.h +73 -0
  14. data/ext/v8/convert_v8.cpp +9 -0
  15. data/ext/v8/convert_v8.h +121 -0
  16. data/ext/v8/converters.cpp +83 -0
  17. data/ext/v8/converters.h +23 -0
  18. data/ext/v8/extconf.rb +44 -0
  19. data/ext/v8/upstream/2.0.6/.sconsign.dblite +0 -0
  20. data/ext/v8/upstream/2.0.6/AUTHORS +23 -0
  21. data/ext/v8/upstream/2.0.6/ChangeLog +1479 -0
  22. data/ext/v8/upstream/2.0.6/LICENSE +55 -0
  23. data/ext/v8/upstream/2.0.6/SConstruct +1028 -0
  24. data/ext/v8/upstream/2.0.6/benchmarks/README.txt +63 -0
  25. data/ext/v8/upstream/2.0.6/benchmarks/base.js +264 -0
  26. data/ext/v8/upstream/2.0.6/benchmarks/crypto.js +1698 -0
  27. data/ext/v8/upstream/2.0.6/benchmarks/deltablue.js +880 -0
  28. data/ext/v8/upstream/2.0.6/benchmarks/earley-boyer.js +4684 -0
  29. data/ext/v8/upstream/2.0.6/benchmarks/raytrace.js +935 -0
  30. data/ext/v8/upstream/2.0.6/benchmarks/regexp.js +1614 -0
  31. data/ext/v8/upstream/2.0.6/benchmarks/revisions.html +86 -0
  32. data/ext/v8/upstream/2.0.6/benchmarks/richards.js +539 -0
  33. data/ext/v8/upstream/2.0.6/benchmarks/run.html +141 -0
  34. data/ext/v8/upstream/2.0.6/benchmarks/run.js +61 -0
  35. data/ext/v8/upstream/2.0.6/benchmarks/splay.js +378 -0
  36. data/ext/v8/upstream/2.0.6/benchmarks/style.css +77 -0
  37. data/ext/v8/upstream/2.0.6/benchmarks/v8-logo.png +0 -0
  38. data/ext/v8/upstream/2.0.6/include/v8-debug.h +275 -0
  39. data/ext/v8/upstream/2.0.6/include/v8.h +3236 -0
  40. data/ext/v8/upstream/2.0.6/samples/SConscript +38 -0
  41. data/ext/v8/upstream/2.0.6/samples/count-hosts.js +42 -0
  42. data/ext/v8/upstream/2.0.6/samples/process.cc +622 -0
  43. data/ext/v8/upstream/2.0.6/samples/shell.cc +303 -0
  44. data/ext/v8/upstream/2.0.6/src/SConscript +283 -0
  45. data/ext/v8/upstream/2.0.6/src/accessors.cc +695 -0
  46. data/ext/v8/upstream/2.0.6/src/accessors.h +114 -0
  47. data/ext/v8/upstream/2.0.6/src/allocation.cc +198 -0
  48. data/ext/v8/upstream/2.0.6/src/allocation.h +169 -0
  49. data/ext/v8/upstream/2.0.6/src/api.cc +3831 -0
  50. data/ext/v8/upstream/2.0.6/src/api.h +479 -0
  51. data/ext/v8/upstream/2.0.6/src/apinatives.js +110 -0
  52. data/ext/v8/upstream/2.0.6/src/apiutils.h +69 -0
  53. data/ext/v8/upstream/2.0.6/src/arguments.h +97 -0
  54. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +277 -0
  55. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +1821 -0
  56. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +1027 -0
  57. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +267 -0
  58. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +1821 -0
  59. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +1027 -0
  60. data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +1271 -0
  61. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +74 -0
  62. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +6682 -0
  63. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +535 -0
  64. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +112 -0
  65. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +347 -0
  66. data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +132 -0
  67. data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +213 -0
  68. data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +1166 -0
  69. data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +1698 -0
  70. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +123 -0
  71. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +162 -0
  72. data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +849 -0
  73. data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +238 -0
  74. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +1259 -0
  75. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +423 -0
  76. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +1266 -0
  77. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +282 -0
  78. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +103 -0
  79. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +59 -0
  80. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +43 -0
  81. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +2264 -0
  82. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +306 -0
  83. data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +1516 -0
  84. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +412 -0
  85. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +532 -0
  86. data/ext/v8/upstream/2.0.6/src/array.js +1154 -0
  87. data/ext/v8/upstream/2.0.6/src/assembler.cc +772 -0
  88. data/ext/v8/upstream/2.0.6/src/assembler.h +525 -0
  89. data/ext/v8/upstream/2.0.6/src/ast.cc +512 -0
  90. data/ext/v8/upstream/2.0.6/src/ast.h +1820 -0
  91. data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +1680 -0
  92. data/ext/v8/upstream/2.0.6/src/bootstrapper.h +103 -0
  93. data/ext/v8/upstream/2.0.6/src/builtins.cc +851 -0
  94. data/ext/v8/upstream/2.0.6/src/builtins.h +245 -0
  95. data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +104 -0
  96. data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +86 -0
  97. data/ext/v8/upstream/2.0.6/src/char-predicates.h +65 -0
  98. data/ext/v8/upstream/2.0.6/src/checks.cc +100 -0
  99. data/ext/v8/upstream/2.0.6/src/checks.h +284 -0
  100. data/ext/v8/upstream/2.0.6/src/code-stubs.cc +164 -0
  101. data/ext/v8/upstream/2.0.6/src/code-stubs.h +164 -0
  102. data/ext/v8/upstream/2.0.6/src/code.h +68 -0
  103. data/ext/v8/upstream/2.0.6/src/codegen-inl.h +88 -0
  104. data/ext/v8/upstream/2.0.6/src/codegen.cc +504 -0
  105. data/ext/v8/upstream/2.0.6/src/codegen.h +522 -0
  106. data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +490 -0
  107. data/ext/v8/upstream/2.0.6/src/compilation-cache.h +98 -0
  108. data/ext/v8/upstream/2.0.6/src/compiler.cc +1132 -0
  109. data/ext/v8/upstream/2.0.6/src/compiler.h +107 -0
  110. data/ext/v8/upstream/2.0.6/src/contexts.cc +256 -0
  111. data/ext/v8/upstream/2.0.6/src/contexts.h +345 -0
  112. data/ext/v8/upstream/2.0.6/src/conversions-inl.h +95 -0
  113. data/ext/v8/upstream/2.0.6/src/conversions.cc +709 -0
  114. data/ext/v8/upstream/2.0.6/src/conversions.h +118 -0
  115. data/ext/v8/upstream/2.0.6/src/counters.cc +78 -0
  116. data/ext/v8/upstream/2.0.6/src/counters.h +239 -0
  117. data/ext/v8/upstream/2.0.6/src/cpu.h +65 -0
  118. data/ext/v8/upstream/2.0.6/src/d8-debug.cc +345 -0
  119. data/ext/v8/upstream/2.0.6/src/d8-debug.h +155 -0
  120. data/ext/v8/upstream/2.0.6/src/d8-posix.cc +675 -0
  121. data/ext/v8/upstream/2.0.6/src/d8-readline.cc +128 -0
  122. data/ext/v8/upstream/2.0.6/src/d8-windows.cc +42 -0
  123. data/ext/v8/upstream/2.0.6/src/d8.cc +776 -0
  124. data/ext/v8/upstream/2.0.6/src/d8.h +225 -0
  125. data/ext/v8/upstream/2.0.6/src/d8.js +1625 -0
  126. data/ext/v8/upstream/2.0.6/src/date-delay.js +1138 -0
  127. data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +114 -0
  128. data/ext/v8/upstream/2.0.6/src/dateparser.cc +186 -0
  129. data/ext/v8/upstream/2.0.6/src/dateparser.h +240 -0
  130. data/ext/v8/upstream/2.0.6/src/debug-agent.cc +425 -0
  131. data/ext/v8/upstream/2.0.6/src/debug-agent.h +129 -0
  132. data/ext/v8/upstream/2.0.6/src/debug-delay.js +2073 -0
  133. data/ext/v8/upstream/2.0.6/src/debug.cc +2751 -0
  134. data/ext/v8/upstream/2.0.6/src/debug.h +866 -0
  135. data/ext/v8/upstream/2.0.6/src/disasm.h +77 -0
  136. data/ext/v8/upstream/2.0.6/src/disassembler.cc +318 -0
  137. data/ext/v8/upstream/2.0.6/src/disassembler.h +56 -0
  138. data/ext/v8/upstream/2.0.6/src/dtoa-config.c +91 -0
  139. data/ext/v8/upstream/2.0.6/src/execution.cc +701 -0
  140. data/ext/v8/upstream/2.0.6/src/execution.h +312 -0
  141. data/ext/v8/upstream/2.0.6/src/factory.cc +957 -0
  142. data/ext/v8/upstream/2.0.6/src/factory.h +393 -0
  143. data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +725 -0
  144. data/ext/v8/upstream/2.0.6/src/fast-codegen.h +371 -0
  145. data/ext/v8/upstream/2.0.6/src/flag-definitions.h +426 -0
  146. data/ext/v8/upstream/2.0.6/src/flags.cc +555 -0
  147. data/ext/v8/upstream/2.0.6/src/flags.h +81 -0
  148. data/ext/v8/upstream/2.0.6/src/frame-element.cc +45 -0
  149. data/ext/v8/upstream/2.0.6/src/frame-element.h +235 -0
  150. data/ext/v8/upstream/2.0.6/src/frames-inl.h +215 -0
  151. data/ext/v8/upstream/2.0.6/src/frames.cc +749 -0
  152. data/ext/v8/upstream/2.0.6/src/frames.h +659 -0
  153. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +76 -0
  154. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +135 -0
  155. data/ext/v8/upstream/2.0.6/src/global-handles.cc +516 -0
  156. data/ext/v8/upstream/2.0.6/src/global-handles.h +180 -0
  157. data/ext/v8/upstream/2.0.6/src/globals.h +608 -0
  158. data/ext/v8/upstream/2.0.6/src/handles-inl.h +76 -0
  159. data/ext/v8/upstream/2.0.6/src/handles.cc +811 -0
  160. data/ext/v8/upstream/2.0.6/src/handles.h +367 -0
  161. data/ext/v8/upstream/2.0.6/src/hashmap.cc +226 -0
  162. data/ext/v8/upstream/2.0.6/src/hashmap.h +120 -0
  163. data/ext/v8/upstream/2.0.6/src/heap-inl.h +407 -0
  164. data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +695 -0
  165. data/ext/v8/upstream/2.0.6/src/heap-profiler.h +277 -0
  166. data/ext/v8/upstream/2.0.6/src/heap.cc +4204 -0
  167. data/ext/v8/upstream/2.0.6/src/heap.h +1704 -0
  168. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +325 -0
  169. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +2375 -0
  170. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +914 -0
  171. data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +1222 -0
  172. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +46 -0
  173. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +9770 -0
  174. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +834 -0
  175. data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +79 -0
  176. data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +208 -0
  177. data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +1357 -0
  178. data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +1813 -0
  179. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +111 -0
  180. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +135 -0
  181. data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +1490 -0
  182. data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +432 -0
  183. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +1517 -0
  184. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +528 -0
  185. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +1219 -0
  186. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +230 -0
  187. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +82 -0
  188. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +99 -0
  189. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +43 -0
  190. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +30 -0
  191. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +62 -0
  192. data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +1961 -0
  193. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +1105 -0
  194. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +580 -0
  195. data/ext/v8/upstream/2.0.6/src/ic-inl.h +93 -0
  196. data/ext/v8/upstream/2.0.6/src/ic.cc +1426 -0
  197. data/ext/v8/upstream/2.0.6/src/ic.h +443 -0
  198. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +646 -0
  199. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +48 -0
  200. data/ext/v8/upstream/2.0.6/src/json-delay.js +254 -0
  201. data/ext/v8/upstream/2.0.6/src/jsregexp.cc +5234 -0
  202. data/ext/v8/upstream/2.0.6/src/jsregexp.h +1439 -0
  203. data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +49 -0
  204. data/ext/v8/upstream/2.0.6/src/jump-target.cc +383 -0
  205. data/ext/v8/upstream/2.0.6/src/jump-target.h +280 -0
  206. data/ext/v8/upstream/2.0.6/src/list-inl.h +166 -0
  207. data/ext/v8/upstream/2.0.6/src/list.h +158 -0
  208. data/ext/v8/upstream/2.0.6/src/log-inl.h +126 -0
  209. data/ext/v8/upstream/2.0.6/src/log-utils.cc +503 -0
  210. data/ext/v8/upstream/2.0.6/src/log-utils.h +292 -0
  211. data/ext/v8/upstream/2.0.6/src/log.cc +1457 -0
  212. data/ext/v8/upstream/2.0.6/src/log.h +371 -0
  213. data/ext/v8/upstream/2.0.6/src/macro-assembler.h +93 -0
  214. data/ext/v8/upstream/2.0.6/src/macros.py +137 -0
  215. data/ext/v8/upstream/2.0.6/src/mark-compact.cc +2007 -0
  216. data/ext/v8/upstream/2.0.6/src/mark-compact.h +442 -0
  217. data/ext/v8/upstream/2.0.6/src/math.js +263 -0
  218. data/ext/v8/upstream/2.0.6/src/memory.h +74 -0
  219. data/ext/v8/upstream/2.0.6/src/messages.cc +177 -0
  220. data/ext/v8/upstream/2.0.6/src/messages.h +112 -0
  221. data/ext/v8/upstream/2.0.6/src/messages.js +937 -0
  222. data/ext/v8/upstream/2.0.6/src/mirror-delay.js +2332 -0
  223. data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +169 -0
  224. data/ext/v8/upstream/2.0.6/src/natives.h +63 -0
  225. data/ext/v8/upstream/2.0.6/src/objects-debug.cc +1317 -0
  226. data/ext/v8/upstream/2.0.6/src/objects-inl.h +3044 -0
  227. data/ext/v8/upstream/2.0.6/src/objects.cc +8306 -0
  228. data/ext/v8/upstream/2.0.6/src/objects.h +4960 -0
  229. data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +116 -0
  230. data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +69 -0
  231. data/ext/v8/upstream/2.0.6/src/parser.cc +4810 -0
  232. data/ext/v8/upstream/2.0.6/src/parser.h +195 -0
  233. data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +645 -0
  234. data/ext/v8/upstream/2.0.6/src/platform-linux.cc +808 -0
  235. data/ext/v8/upstream/2.0.6/src/platform-macos.cc +643 -0
  236. data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +454 -0
  237. data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +597 -0
  238. data/ext/v8/upstream/2.0.6/src/platform-posix.cc +380 -0
  239. data/ext/v8/upstream/2.0.6/src/platform-win32.cc +1908 -0
  240. data/ext/v8/upstream/2.0.6/src/platform.h +556 -0
  241. data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +1511 -0
  242. data/ext/v8/upstream/2.0.6/src/prettyprinter.h +219 -0
  243. data/ext/v8/upstream/2.0.6/src/property.cc +96 -0
  244. data/ext/v8/upstream/2.0.6/src/property.h +327 -0
  245. data/ext/v8/upstream/2.0.6/src/regexp-delay.js +406 -0
  246. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  247. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +464 -0
  248. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +141 -0
  249. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +356 -0
  250. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +103 -0
  251. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +240 -0
  252. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +220 -0
  253. data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +103 -0
  254. data/ext/v8/upstream/2.0.6/src/regexp-stack.h +123 -0
  255. data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +74 -0
  256. data/ext/v8/upstream/2.0.6/src/register-allocator.cc +100 -0
  257. data/ext/v8/upstream/2.0.6/src/register-allocator.h +295 -0
  258. data/ext/v8/upstream/2.0.6/src/rewriter.cc +855 -0
  259. data/ext/v8/upstream/2.0.6/src/rewriter.h +54 -0
  260. data/ext/v8/upstream/2.0.6/src/runtime.cc +8163 -0
  261. data/ext/v8/upstream/2.0.6/src/runtime.h +432 -0
  262. data/ext/v8/upstream/2.0.6/src/runtime.js +626 -0
  263. data/ext/v8/upstream/2.0.6/src/scanner.cc +1098 -0
  264. data/ext/v8/upstream/2.0.6/src/scanner.h +425 -0
  265. data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +649 -0
  266. data/ext/v8/upstream/2.0.6/src/scopeinfo.h +236 -0
  267. data/ext/v8/upstream/2.0.6/src/scopes.cc +963 -0
  268. data/ext/v8/upstream/2.0.6/src/scopes.h +401 -0
  269. data/ext/v8/upstream/2.0.6/src/serialize.cc +1260 -0
  270. data/ext/v8/upstream/2.0.6/src/serialize.h +404 -0
  271. data/ext/v8/upstream/2.0.6/src/shell.h +55 -0
  272. data/ext/v8/upstream/2.0.6/src/simulator.h +41 -0
  273. data/ext/v8/upstream/2.0.6/src/smart-pointer.h +109 -0
  274. data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +97 -0
  275. data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +40 -0
  276. data/ext/v8/upstream/2.0.6/src/snapshot.h +59 -0
  277. data/ext/v8/upstream/2.0.6/src/spaces-inl.h +372 -0
  278. data/ext/v8/upstream/2.0.6/src/spaces.cc +2864 -0
  279. data/ext/v8/upstream/2.0.6/src/spaces.h +2072 -0
  280. data/ext/v8/upstream/2.0.6/src/string-stream.cc +584 -0
  281. data/ext/v8/upstream/2.0.6/src/string-stream.h +189 -0
  282. data/ext/v8/upstream/2.0.6/src/string.js +901 -0
  283. data/ext/v8/upstream/2.0.6/src/stub-cache.cc +1108 -0
  284. data/ext/v8/upstream/2.0.6/src/stub-cache.h +578 -0
  285. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +15 -0
  286. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +3330 -0
  287. data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +3925 -0
  288. data/ext/v8/upstream/2.0.6/src/token.cc +56 -0
  289. data/ext/v8/upstream/2.0.6/src/token.h +270 -0
  290. data/ext/v8/upstream/2.0.6/src/top.cc +991 -0
  291. data/ext/v8/upstream/2.0.6/src/top.h +459 -0
  292. data/ext/v8/upstream/2.0.6/src/unicode-inl.h +238 -0
  293. data/ext/v8/upstream/2.0.6/src/unicode.cc +749 -0
  294. data/ext/v8/upstream/2.0.6/src/unicode.h +279 -0
  295. data/ext/v8/upstream/2.0.6/src/uri.js +415 -0
  296. data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +426 -0
  297. data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +40 -0
  298. data/ext/v8/upstream/2.0.6/src/utils.cc +322 -0
  299. data/ext/v8/upstream/2.0.6/src/utils.h +592 -0
  300. data/ext/v8/upstream/2.0.6/src/v8-counters.cc +55 -0
  301. data/ext/v8/upstream/2.0.6/src/v8-counters.h +198 -0
  302. data/ext/v8/upstream/2.0.6/src/v8.cc +193 -0
  303. data/ext/v8/upstream/2.0.6/src/v8.h +119 -0
  304. data/ext/v8/upstream/2.0.6/src/v8natives.js +846 -0
  305. data/ext/v8/upstream/2.0.6/src/v8threads.cc +450 -0
  306. data/ext/v8/upstream/2.0.6/src/v8threads.h +144 -0
  307. data/ext/v8/upstream/2.0.6/src/variables.cc +163 -0
  308. data/ext/v8/upstream/2.0.6/src/variables.h +235 -0
  309. data/ext/v8/upstream/2.0.6/src/version.cc +88 -0
  310. data/ext/v8/upstream/2.0.6/src/version.h +64 -0
  311. data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +381 -0
  312. data/ext/v8/upstream/2.0.6/src/virtual-frame.h +44 -0
  313. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +352 -0
  314. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +2539 -0
  315. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +1399 -0
  316. data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +1255 -0
  317. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +46 -0
  318. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +8223 -0
  319. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +785 -0
  320. data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +79 -0
  321. data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +202 -0
  322. data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +1596 -0
  323. data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +1820 -0
  324. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +109 -0
  325. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +121 -0
  326. data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +1392 -0
  327. data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +432 -0
  328. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +2409 -0
  329. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +765 -0
  330. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +1337 -0
  331. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +295 -0
  332. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +86 -0
  333. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +84 -0
  334. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +43 -0
  335. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +27 -0
  336. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +63 -0
  337. data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +1884 -0
  338. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +1089 -0
  339. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +560 -0
  340. data/ext/v8/upstream/2.0.6/src/zone-inl.h +297 -0
  341. data/ext/v8/upstream/2.0.6/src/zone.cc +193 -0
  342. data/ext/v8/upstream/2.0.6/src/zone.h +305 -0
  343. data/ext/v8/upstream/2.0.6/test/cctest/SConscript +95 -0
  344. data/ext/v8/upstream/2.0.6/test/cctest/cctest.cc +126 -0
  345. data/ext/v8/upstream/2.0.6/test/cctest/cctest.h +211 -0
  346. data/ext/v8/upstream/2.0.6/test/cctest/cctest.status +54 -0
  347. data/ext/v8/upstream/2.0.6/test/cctest/test-accessors.cc +450 -0
  348. data/ext/v8/upstream/2.0.6/test/cctest/test-alloc.cc +215 -0
  349. data/ext/v8/upstream/2.0.6/test/cctest/test-api.cc +8699 -0
  350. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-arm.cc +227 -0
  351. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-ia32.cc +395 -0
  352. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-x64.cc +292 -0
  353. data/ext/v8/upstream/2.0.6/test/cctest/test-ast.cc +97 -0
  354. data/ext/v8/upstream/2.0.6/test/cctest/test-compiler.cc +318 -0
  355. data/ext/v8/upstream/2.0.6/test/cctest/test-conversions.cc +130 -0
  356. data/ext/v8/upstream/2.0.6/test/cctest/test-debug.cc +5788 -0
  357. data/ext/v8/upstream/2.0.6/test/cctest/test-decls.cc +593 -0
  358. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-arm.cc +281 -0
  359. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-ia32.cc +418 -0
  360. data/ext/v8/upstream/2.0.6/test/cctest/test-flags.cc +234 -0
  361. data/ext/v8/upstream/2.0.6/test/cctest/test-func-name-inference.cc +267 -0
  362. data/ext/v8/upstream/2.0.6/test/cctest/test-hashmap.cc +176 -0
  363. data/ext/v8/upstream/2.0.6/test/cctest/test-heap-profiler.cc +396 -0
  364. data/ext/v8/upstream/2.0.6/test/cctest/test-heap.cc +796 -0
  365. data/ext/v8/upstream/2.0.6/test/cctest/test-list.cc +101 -0
  366. data/ext/v8/upstream/2.0.6/test/cctest/test-lock.cc +63 -0
  367. data/ext/v8/upstream/2.0.6/test/cctest/test-log-stack-tracer.cc +372 -0
  368. data/ext/v8/upstream/2.0.6/test/cctest/test-log-utils.cc +310 -0
  369. data/ext/v8/upstream/2.0.6/test/cctest/test-log.cc +1081 -0
  370. data/ext/v8/upstream/2.0.6/test/cctest/test-macro-assembler-x64.cc +2104 -0
  371. data/ext/v8/upstream/2.0.6/test/cctest/test-mark-compact.cc +341 -0
  372. data/ext/v8/upstream/2.0.6/test/cctest/test-parsing.cc +129 -0
  373. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-linux.cc +80 -0
  374. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-macos.cc +10 -0
  375. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-nullos.cc +80 -0
  376. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-win32.cc +26 -0
  377. data/ext/v8/upstream/2.0.6/test/cctest/test-regexp.cc +1815 -0
  378. data/ext/v8/upstream/2.0.6/test/cctest/test-serialize.cc +438 -0
  379. data/ext/v8/upstream/2.0.6/test/cctest/test-sockets.cc +162 -0
  380. data/ext/v8/upstream/2.0.6/test/cctest/test-spaces.cc +248 -0
  381. data/ext/v8/upstream/2.0.6/test/cctest/test-strings.cc +432 -0
  382. data/ext/v8/upstream/2.0.6/test/cctest/test-thread-termination.cc +290 -0
  383. data/ext/v8/upstream/2.0.6/test/cctest/test-threads.cc +52 -0
  384. data/ext/v8/upstream/2.0.6/test/cctest/test-utils.cc +186 -0
  385. data/ext/v8/upstream/2.0.6/test/cctest/test-version.cc +89 -0
  386. data/ext/v8/upstream/2.0.6/test/cctest/testcfg.py +108 -0
  387. data/ext/v8/upstream/2.0.6/test/es5conform/README +14 -0
  388. data/ext/v8/upstream/2.0.6/test/es5conform/es5conform.status +226 -0
  389. data/ext/v8/upstream/2.0.6/test/es5conform/harness-adapt.js +74 -0
  390. data/ext/v8/upstream/2.0.6/test/es5conform/testcfg.py +108 -0
  391. data/ext/v8/upstream/2.0.6/test/message/message.status +31 -0
  392. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.js +31 -0
  393. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.out +30 -0
  394. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.js +33 -0
  395. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.out +30 -0
  396. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.js +32 -0
  397. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.out +30 -0
  398. data/ext/v8/upstream/2.0.6/test/message/simple-throw.js +28 -0
  399. data/ext/v8/upstream/2.0.6/test/message/simple-throw.out +30 -0
  400. data/ext/v8/upstream/2.0.6/test/message/testcfg.py +135 -0
  401. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.js +51 -0
  402. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.out +26 -0
  403. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.js +39 -0
  404. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.out +28 -0
  405. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.js +34 -0
  406. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.out +30 -0
  407. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.js +34 -0
  408. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.out +30 -0
  409. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.js +34 -0
  410. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.out +30 -0
  411. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.js +37 -0
  412. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.out +28 -0
  413. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.js +32 -0
  414. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.out +30 -0
  415. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.js +32 -0
  416. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.out +30 -0
  417. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.js +32 -0
  418. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.out +30 -0
  419. data/ext/v8/upstream/2.0.6/test/mjsunit/api-call-after-bypassed-exception.js +39 -0
  420. data/ext/v8/upstream/2.0.6/test/mjsunit/apply.js +196 -0
  421. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-apply.js +134 -0
  422. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-call-apply.js +41 -0
  423. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-enum.js +52 -0
  424. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-indirect.js +47 -0
  425. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-lazy.js +47 -0
  426. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-opt.js +130 -0
  427. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-read-and-assignment.js +164 -0
  428. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments.js +97 -0
  429. data/ext/v8/upstream/2.0.6/test/mjsunit/array-concat.js +120 -0
  430. data/ext/v8/upstream/2.0.6/test/mjsunit/array-constructor.js +119 -0
  431. data/ext/v8/upstream/2.0.6/test/mjsunit/array-functions-prototype.js +159 -0
  432. data/ext/v8/upstream/2.0.6/test/mjsunit/array-indexing.js +66 -0
  433. data/ext/v8/upstream/2.0.6/test/mjsunit/array-iteration.js +228 -0
  434. data/ext/v8/upstream/2.0.6/test/mjsunit/array-join.js +45 -0
  435. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length-number-conversion.js +53 -0
  436. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length.js +111 -0
  437. data/ext/v8/upstream/2.0.6/test/mjsunit/array-reduce.js +514 -0
  438. data/ext/v8/upstream/2.0.6/test/mjsunit/array-sort.js +362 -0
  439. data/ext/v8/upstream/2.0.6/test/mjsunit/array-splice.js +314 -0
  440. data/ext/v8/upstream/2.0.6/test/mjsunit/ascii-regexp-subject.js +49 -0
  441. data/ext/v8/upstream/2.0.6/test/mjsunit/big-array-literal.js +111 -0
  442. data/ext/v8/upstream/2.0.6/test/mjsunit/big-object-literal.js +114 -0
  443. data/ext/v8/upstream/2.0.6/test/mjsunit/binary-operation-overwrite.js +36 -0
  444. data/ext/v8/upstream/2.0.6/test/mjsunit/bit-not.js +75 -0
  445. data/ext/v8/upstream/2.0.6/test/mjsunit/bitwise-operations-undefined.js +49 -0
  446. data/ext/v8/upstream/2.0.6/test/mjsunit/body-not-visible.js +39 -0
  447. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-1344252.js +79 -0
  448. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-222.js +42 -0
  449. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-223.js +39 -0
  450. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-900066.js +38 -0
  451. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-941049.js +100 -0
  452. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function-call.js +38 -0
  453. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function.js +63 -0
  454. data/ext/v8/upstream/2.0.6/test/mjsunit/call.js +87 -0
  455. data/ext/v8/upstream/2.0.6/test/mjsunit/char-escape.js +53 -0
  456. data/ext/v8/upstream/2.0.6/test/mjsunit/class-of-builtins.js +50 -0
  457. data/ext/v8/upstream/2.0.6/test/mjsunit/closure.js +37 -0
  458. data/ext/v8/upstream/2.0.6/test/mjsunit/codegen-coverage.js +91 -0
  459. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-character.js +50 -0
  460. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-nan.js +66 -0
  461. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/countoperation.js +111 -0
  462. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/function-call.js +52 -0
  463. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/globals.js +65 -0
  464. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/jsnatives.js +33 -0
  465. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals-assignment.js +104 -0
  466. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals.js +52 -0
  467. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/loops.js +35 -0
  468. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/objectliterals.js +57 -0
  469. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/property-simple.js +39 -0
  470. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/short-circuit.js +102 -0
  471. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/thisfunction.js +35 -0
  472. data/ext/v8/upstream/2.0.6/test/mjsunit/const-declaration.js +172 -0
  473. data/ext/v8/upstream/2.0.6/test/mjsunit/const-eval-init.js +111 -0
  474. data/ext/v8/upstream/2.0.6/test/mjsunit/const-redecl.js +220 -0
  475. data/ext/v8/upstream/2.0.6/test/mjsunit/const.js +70 -0
  476. data/ext/v8/upstream/2.0.6/test/mjsunit/constant-folding.js +232 -0
  477. data/ext/v8/upstream/2.0.6/test/mjsunit/context-variable-assignments.js +37 -0
  478. data/ext/v8/upstream/2.0.6/test/mjsunit/cyclic-array-to-string.js +65 -0
  479. data/ext/v8/upstream/2.0.6/test/mjsunit/cyrillic.js +199 -0
  480. data/ext/v8/upstream/2.0.6/test/mjsunit/d8-os.js +180 -0
  481. data/ext/v8/upstream/2.0.6/test/mjsunit/date-parse.js +268 -0
  482. data/ext/v8/upstream/2.0.6/test/mjsunit/date.js +149 -0
  483. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace-text.js +122 -0
  484. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace.js +272 -0
  485. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-breakpoints.js +120 -0
  486. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-changebreakpoint.js +108 -0
  487. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpoint.js +101 -0
  488. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpointgroup.js +117 -0
  489. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-compile-event.js +126 -0
  490. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-conditional-breakpoints.js +171 -0
  491. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructed-by.js +60 -0
  492. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructor.js +78 -0
  493. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-continue.js +114 -0
  494. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-enable-disable-breakpoints.js +90 -0
  495. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-arguments.js +93 -0
  496. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-bool-constructor.js +80 -0
  497. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-locals.js +132 -0
  498. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-recursive.js +167 -0
  499. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-with.js +77 -0
  500. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate.js +118 -0
  501. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-event-listener.js +73 -0
  502. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-handle.js +252 -0
  503. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-ignore-breakpoints.js +89 -0
  504. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-mirror-cache.js +85 -0
  505. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-multiple-breakpoints.js +105 -0
  506. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-referenced-by.js +112 -0
  507. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-references.js +118 -0
  508. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scopes.js +761 -0
  509. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script-breakpoints.js +112 -0
  510. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script.js +92 -0
  511. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scripts-request.js +108 -0
  512. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-setbreakpoint.js +165 -0
  513. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceinfo.js +352 -0
  514. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceslice.js +74 -0
  515. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step-stub-callfunction.js +87 -0
  516. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step.js +82 -0
  517. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-accessor.js +248 -0
  518. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-builtin.js +78 -0
  519. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-call-function-stub.js +115 -0
  520. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-constructor.js +78 -0
  521. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-function-call.js +149 -0
  522. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepnext-do-while.js +79 -0
  523. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-recursive-function.js +106 -0
  524. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-to-builtin.js +84 -0
  525. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-suspend.js +96 -0
  526. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-version.js +90 -0
  527. data/ext/v8/upstream/2.0.6/test/mjsunit/declare-locally.js +43 -0
  528. data/ext/v8/upstream/2.0.6/test/mjsunit/deep-recursion.js +66 -0
  529. data/ext/v8/upstream/2.0.6/test/mjsunit/delay-syntax-error.js +41 -0
  530. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-global-properties.js +37 -0
  531. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-eval.js +32 -0
  532. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-with.js +34 -0
  533. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-vars-from-eval.js +40 -0
  534. data/ext/v8/upstream/2.0.6/test/mjsunit/delete.js +163 -0
  535. data/ext/v8/upstream/2.0.6/test/mjsunit/div-mod.js +157 -0
  536. data/ext/v8/upstream/2.0.6/test/mjsunit/do-not-strip-fc.js +31 -0
  537. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-enum-array-holes.js +35 -0
  538. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-reinit-global-var.js +47 -0
  539. data/ext/v8/upstream/2.0.6/test/mjsunit/double-equals.js +114 -0
  540. data/ext/v8/upstream/2.0.6/test/mjsunit/dtoa.js +32 -0
  541. data/ext/v8/upstream/2.0.6/test/mjsunit/enumeration-order.js +109 -0
  542. data/ext/v8/upstream/2.0.6/test/mjsunit/error-constructors.js +32 -0
  543. data/ext/v8/upstream/2.0.6/test/mjsunit/escape.js +118 -0
  544. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-enclosing-function-name.js +76 -0
  545. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-typeof-non-existing.js +35 -0
  546. data/ext/v8/upstream/2.0.6/test/mjsunit/eval.js +157 -0
  547. data/ext/v8/upstream/2.0.6/test/mjsunit/execScript-case-insensitive.js +34 -0
  548. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-arguments.js +54 -0
  549. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-commas.js +46 -0
  550. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-null-or-undefined.js +33 -0
  551. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-special-cases.js +64 -0
  552. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in.js +86 -0
  553. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-as-prototype.js +36 -0
  554. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-name.js +34 -0
  555. data/ext/v8/upstream/2.0.6/test/mjsunit/function-arguments-null.js +30 -0
  556. data/ext/v8/upstream/2.0.6/test/mjsunit/function-caller.js +48 -0
  557. data/ext/v8/upstream/2.0.6/test/mjsunit/function-names.js +133 -0
  558. data/ext/v8/upstream/2.0.6/test/mjsunit/function-property.js +29 -0
  559. data/ext/v8/upstream/2.0.6/test/mjsunit/function-prototype.js +98 -0
  560. data/ext/v8/upstream/2.0.6/test/mjsunit/function-source.js +49 -0
  561. data/ext/v8/upstream/2.0.6/test/mjsunit/function.js +83 -0
  562. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-accessors.js +85 -0
  563. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-natives.js +159 -0
  564. data/ext/v8/upstream/2.0.6/test/mjsunit/get-own-property-descriptor.js +51 -0
  565. data/ext/v8/upstream/2.0.6/test/mjsunit/get-prototype-of.js +68 -0
  566. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-prototype.js +50 -0
  567. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-value-prototype.js +35 -0
  568. data/ext/v8/upstream/2.0.6/test/mjsunit/global-const-var-conflicts.js +57 -0
  569. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-ic.js +45 -0
  570. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-keyed.js +38 -0
  571. data/ext/v8/upstream/2.0.6/test/mjsunit/global-ic.js +48 -0
  572. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval-in-with.js +59 -0
  573. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval.js +85 -0
  574. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-nested-eval.js +66 -0
  575. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-eval.js +34 -0
  576. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-with.js +43 -0
  577. data/ext/v8/upstream/2.0.6/test/mjsunit/greedy.js +60 -0
  578. data/ext/v8/upstream/2.0.6/test/mjsunit/has-own-property.js +38 -0
  579. data/ext/v8/upstream/2.0.6/test/mjsunit/html-comments.js +57 -0
  580. data/ext/v8/upstream/2.0.6/test/mjsunit/html-string-funcs.js +47 -0
  581. data/ext/v8/upstream/2.0.6/test/mjsunit/if-in-undefined.js +36 -0
  582. data/ext/v8/upstream/2.0.6/test/mjsunit/in.js +159 -0
  583. data/ext/v8/upstream/2.0.6/test/mjsunit/indexed-accessors.js +120 -0
  584. data/ext/v8/upstream/2.0.6/test/mjsunit/instanceof.js +93 -0
  585. data/ext/v8/upstream/2.0.6/test/mjsunit/integer-to-string.js +35 -0
  586. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-lhs.js +65 -0
  587. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-source-element.js +31 -0
  588. data/ext/v8/upstream/2.0.6/test/mjsunit/json.js +207 -0
  589. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-ic.js +236 -0
  590. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-storage-extend.js +55 -0
  591. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-allocation.js +300 -0
  592. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-literal.js +56 -0
  593. data/ext/v8/upstream/2.0.6/test/mjsunit/lazy-load.js +34 -0
  594. data/ext/v8/upstream/2.0.6/test/mjsunit/leakcheck.js +53 -0
  595. data/ext/v8/upstream/2.0.6/test/mjsunit/length.js +78 -0
  596. data/ext/v8/upstream/2.0.6/test/mjsunit/local-load-from-eval.js +39 -0
  597. data/ext/v8/upstream/2.0.6/test/mjsunit/math-min-max.js +105 -0
  598. data/ext/v8/upstream/2.0.6/test/mjsunit/megamorphic-callbacks.js +70 -0
  599. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-array.js +138 -0
  600. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-boolean.js +59 -0
  601. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-date.js +77 -0
  602. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-error.js +94 -0
  603. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-function.js +90 -0
  604. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-null.js +50 -0
  605. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-number.js +77 -0
  606. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-object.js +227 -0
  607. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-regexp.js +110 -0
  608. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-script.js +100 -0
  609. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-string.js +89 -0
  610. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-undefined.js +50 -0
  611. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-unresolved-function.js +81 -0
  612. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.js +203 -0
  613. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.status +66 -0
  614. data/ext/v8/upstream/2.0.6/test/mjsunit/mul-exhaustive.js +4511 -0
  615. data/ext/v8/upstream/2.0.6/test/mjsunit/multiple-return.js +62 -0
  616. data/ext/v8/upstream/2.0.6/test/mjsunit/negate-zero.js +42 -0
  617. data/ext/v8/upstream/2.0.6/test/mjsunit/negate.js +59 -0
  618. data/ext/v8/upstream/2.0.6/test/mjsunit/new.js +56 -0
  619. data/ext/v8/upstream/2.0.6/test/mjsunit/newline-in-string.js +46 -0
  620. data/ext/v8/upstream/2.0.6/test/mjsunit/no-branch-elimination.js +36 -0
  621. data/ext/v8/upstream/2.0.6/test/mjsunit/no-octal-constants-above-256.js +32 -0
  622. data/ext/v8/upstream/2.0.6/test/mjsunit/no-semicolon.js +45 -0
  623. data/ext/v8/upstream/2.0.6/test/mjsunit/non-ascii-replace.js +30 -0
  624. data/ext/v8/upstream/2.0.6/test/mjsunit/nul-characters.js +38 -0
  625. data/ext/v8/upstream/2.0.6/test/mjsunit/number-limits.js +47 -0
  626. data/ext/v8/upstream/2.0.6/test/mjsunit/number-string-index-call.js +32 -0
  627. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring-small.js +395 -0
  628. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring.js +338 -0
  629. data/ext/v8/upstream/2.0.6/test/mjsunit/obj-construct.js +46 -0
  630. data/ext/v8/upstream/2.0.6/test/mjsunit/object-create.js +250 -0
  631. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal-gc.js +66 -0
  632. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal.js +105 -0
  633. data/ext/v8/upstream/2.0.6/test/mjsunit/override-read-only-property.js +64 -0
  634. data/ext/v8/upstream/2.0.6/test/mjsunit/parse-int-float.js +85 -0
  635. data/ext/v8/upstream/2.0.6/test/mjsunit/property-load-across-eval.js +85 -0
  636. data/ext/v8/upstream/2.0.6/test/mjsunit/property-object-key.js +36 -0
  637. data/ext/v8/upstream/2.0.6/test/mjsunit/proto.js +33 -0
  638. data/ext/v8/upstream/2.0.6/test/mjsunit/prototype.js +93 -0
  639. data/ext/v8/upstream/2.0.6/test/mjsunit/receiver-in-with-calls.js +47 -0
  640. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-UC16.js +47 -0
  641. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-call-as-function.js +36 -0
  642. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-capture.js +57 -0
  643. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-captures.js +31 -0
  644. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-indexof.js +77 -0
  645. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-lookahead.js +166 -0
  646. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-loop-capture.js +29 -0
  647. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline-stack-trace.js +116 -0
  648. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline.js +112 -0
  649. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-standalones.js +78 -0
  650. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-static.js +167 -0
  651. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-string-methods.js +51 -0
  652. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp.js +390 -0
  653. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1030466.js +45 -0
  654. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1036894.js +38 -0
  655. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1039610.js +29 -0
  656. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1050043.js +51 -0
  657. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1062422.js +30 -0
  658. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1066899.js +37 -0
  659. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1081309.js +110 -0
  660. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1102760.js +35 -0
  661. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1110164.js +46 -0
  662. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1112051.js +33 -0
  663. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1114040.js +58 -0
  664. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1134697.js +31 -0
  665. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-114.js +43 -0
  666. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-116.js +40 -0
  667. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1170187.js +80 -0
  668. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1173979.js +48 -0
  669. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1175390.js +30 -0
  670. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177518.js +39 -0
  671. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177809.js +31 -0
  672. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1178598.js +90 -0
  673. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1182832.js +38 -0
  674. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1187524.js +34 -0
  675. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199401.js +75 -0
  676. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199637.js +78 -0
  677. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1200351.js +2032 -0
  678. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1201933.js +40 -0
  679. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1203459.js +29 -0
  680. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1207276.js +36 -0
  681. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213516.js +40 -0
  682. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213575.js +41 -0
  683. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1215653.js +365 -0
  684. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-124.js +57 -0
  685. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1254366.js +38 -0
  686. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1327557.js +36 -0
  687. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1341167.js +33 -0
  688. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1346700.js +29 -0
  689. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-137.js +46 -0
  690. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1439135.js +40 -0
  691. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-149.js +28 -0
  692. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1493017.js +52 -0
  693. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-155924.js +46 -0
  694. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-171.js +41 -0
  695. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-176.js +50 -0
  696. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-186.js +72 -0
  697. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-187.js +30 -0
  698. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-189.js +36 -0
  699. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-191.js +42 -0
  700. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1919169.js +40 -0
  701. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-192.js +38 -0
  702. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-193.js +44 -0
  703. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-20070207.js +42 -0
  704. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-201.js +37 -0
  705. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-219.js +176 -0
  706. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-220.js +31 -0
  707. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-221.js +34 -0
  708. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-2249423.js +40 -0
  709. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-225.js +32 -0
  710. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-227.js +33 -0
  711. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-231.js +92 -0
  712. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-233.js +39 -0
  713. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-244.js +67 -0
  714. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-246.js +31 -0
  715. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-253.js +31 -0
  716. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-254.js +58 -0
  717. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-259.js +33 -0
  718. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-260.js +33 -0
  719. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-263.js +38 -0
  720. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-265.js +64 -0
  721. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-267.js +35 -0
  722. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-269.js +49 -0
  723. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-279.js +62 -0
  724. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-284.js +50 -0
  725. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-286.js +36 -0
  726. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-294.js +43 -0
  727. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-312.js +31 -0
  728. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-317.js +31 -0
  729. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-318.js +35 -0
  730. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-326.js +40 -0
  731. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-334.js +90 -0
  732. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-341.js +36 -0
  733. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-345.js +51 -0
  734. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-349.js +32 -0
  735. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-35.js +33 -0
  736. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-351.js +31 -0
  737. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-386.js +47 -0
  738. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-392.js +34 -0
  739. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-394.js +47 -0
  740. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-396.js +39 -0
  741. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-397.js +34 -0
  742. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-399.js +32 -0
  743. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-406.js +69 -0
  744. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-416.js +38 -0
  745. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-475.js +28 -0
  746. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-483.js +35 -0
  747. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-485.js +64 -0
  748. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-486.js +30 -0
  749. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-490.js +48 -0
  750. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-491.js +47 -0
  751. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-492.js +52 -0
  752. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-496.js +39 -0
  753. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-502.js +38 -0
  754. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-503.js +63 -0
  755. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-515.js +40 -0
  756. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-524.js +32 -0
  757. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-526.js +32 -0
  758. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-540.js +47 -0
  759. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-545.js +47 -0
  760. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-57.js +32 -0
  761. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-580.js +55 -0
  762. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-588599.js +31 -0
  763. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-6-9-regexp.js +30 -0
  764. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-662254.js +40 -0
  765. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-666721.js +53 -0
  766. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-667061.js +90 -0
  767. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-670147.js +34 -0
  768. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-674753.js +87 -0
  769. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-676025.js +31 -0
  770. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-678525.js +59 -0
  771. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-682649.js +30 -0
  772. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-69.js +43 -0
  773. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-734862.js +37 -0
  774. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-737588.js +34 -0
  775. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-74.js +41 -0
  776. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-780423.js +39 -0
  777. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-799761.js +92 -0
  778. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-806473.js +60 -0
  779. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-842017.js +60 -0
  780. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-86.js +46 -0
  781. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-87.js +58 -0
  782. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-874178.js +32 -0
  783. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-875031.js +37 -0
  784. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-877615.js +37 -0
  785. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-892742.js +50 -0
  786. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900055.js +42 -0
  787. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900966.js +38 -0
  788. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-91.js +38 -0
  789. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-925537.js +42 -0
  790. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-937896.js +50 -0
  791. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-990205.js +35 -0
  792. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-992733.js +35 -0
  793. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-996542.js +40 -0
  794. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-998565.js +51 -0
  795. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-crbug-18639.js +34 -0
  796. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-r3391.js +77 -0
  797. data/ext/v8/upstream/2.0.6/test/mjsunit/scanner.js +30 -0
  798. data/ext/v8/upstream/2.0.6/test/mjsunit/short-circuit-boolean.js +46 -0
  799. data/ext/v8/upstream/2.0.6/test/mjsunit/simple-constructor.js +140 -0
  800. data/ext/v8/upstream/2.0.6/test/mjsunit/sin-cos.js +45 -0
  801. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-negative-zero.js +100 -0
  802. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-ops.js +671 -0
  803. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array-reverse.js +131 -0
  804. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array.js +41 -0
  805. data/ext/v8/upstream/2.0.6/test/mjsunit/stack-traces.js +204 -0
  806. data/ext/v8/upstream/2.0.6/test/mjsunit/str-to-num.js +158 -0
  807. data/ext/v8/upstream/2.0.6/test/mjsunit/stress-array-push.js +34 -0
  808. data/ext/v8/upstream/2.0.6/test/mjsunit/strict-equals.js +90 -0
  809. data/ext/v8/upstream/2.0.6/test/mjsunit/string-add.js +195 -0
  810. data/ext/v8/upstream/2.0.6/test/mjsunit/string-case.js +28 -0
  811. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charat.js +53 -0
  812. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charcodeat.js +192 -0
  813. data/ext/v8/upstream/2.0.6/test/mjsunit/string-compare-alignment.js +47 -0
  814. data/ext/v8/upstream/2.0.6/test/mjsunit/string-flatten.js +37 -0
  815. data/ext/v8/upstream/2.0.6/test/mjsunit/string-index.js +154 -0
  816. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-1.js +99 -0
  817. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-2.js +68 -0
  818. data/ext/v8/upstream/2.0.6/test/mjsunit/string-lastindexof.js +88 -0
  819. data/ext/v8/upstream/2.0.6/test/mjsunit/string-localecompare.js +40 -0
  820. data/ext/v8/upstream/2.0.6/test/mjsunit/string-match.js +149 -0
  821. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace-gc.js +57 -0
  822. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace.js +182 -0
  823. data/ext/v8/upstream/2.0.6/test/mjsunit/string-search.js +30 -0
  824. data/ext/v8/upstream/2.0.6/test/mjsunit/string-split.js +126 -0
  825. data/ext/v8/upstream/2.0.6/test/mjsunit/substr.js +65 -0
  826. data/ext/v8/upstream/2.0.6/test/mjsunit/switch.js +289 -0
  827. data/ext/v8/upstream/2.0.6/test/mjsunit/testcfg.py +137 -0
  828. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-isarray.js +48 -0
  829. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-splice-webkit.js +62 -0
  830. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/object-keys.js +68 -0
  831. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/regexp-pcre.js +6603 -0
  832. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/string-trim.js +107 -0
  833. data/ext/v8/upstream/2.0.6/test/mjsunit/this-in-callbacks.js +47 -0
  834. data/ext/v8/upstream/2.0.6/test/mjsunit/this.js +46 -0
  835. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-and-catch-function.js +50 -0
  836. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-exception-for-null-access.js +37 -0
  837. data/ext/v8/upstream/2.0.6/test/mjsunit/to-precision.js +82 -0
  838. data/ext/v8/upstream/2.0.6/test/mjsunit/to_number_order.js +129 -0
  839. data/ext/v8/upstream/2.0.6/test/mjsunit/tobool.js +36 -0
  840. data/ext/v8/upstream/2.0.6/test/mjsunit/toint32.js +129 -0
  841. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/codemap.js +180 -0
  842. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/consarray.js +60 -0
  843. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/csvparser.js +79 -0
  844. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/logreader.js +98 -0
  845. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile.js +348 -0
  846. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile_view.js +95 -0
  847. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/splaytree.js +166 -0
  848. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.default +55 -0
  849. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.gc-state +21 -0
  850. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.ignore-unknown +51 -0
  851. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.separate-ic +61 -0
  852. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor.js +409 -0
  853. data/ext/v8/upstream/2.0.6/test/mjsunit/top-level-assignments.js +107 -0
  854. data/ext/v8/upstream/2.0.6/test/mjsunit/touint32.js +72 -0
  855. data/ext/v8/upstream/2.0.6/test/mjsunit/transcendentals.js +49 -0
  856. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-extension-object.js +58 -0
  857. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-scopes.js +42 -0
  858. data/ext/v8/upstream/2.0.6/test/mjsunit/try-finally-nested.js +46 -0
  859. data/ext/v8/upstream/2.0.6/test/mjsunit/try.js +394 -0
  860. data/ext/v8/upstream/2.0.6/test/mjsunit/typeof.js +40 -0
  861. data/ext/v8/upstream/2.0.6/test/mjsunit/undeletable-functions.js +181 -0
  862. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-case-overoptimization.js +35 -0
  863. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-string-to-number.js +46 -0
  864. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-test.js +9169 -0
  865. data/ext/v8/upstream/2.0.6/test/mjsunit/unusual-constructor.js +38 -0
  866. data/ext/v8/upstream/2.0.6/test/mjsunit/uri.js +78 -0
  867. data/ext/v8/upstream/2.0.6/test/mjsunit/value-callic-prototype-change.js +94 -0
  868. data/ext/v8/upstream/2.0.6/test/mjsunit/var.js +37 -0
  869. data/ext/v8/upstream/2.0.6/test/mjsunit/with-function-expression.js +36 -0
  870. data/ext/v8/upstream/2.0.6/test/mjsunit/with-leave.js +61 -0
  871. data/ext/v8/upstream/2.0.6/test/mjsunit/with-parameter-access.js +47 -0
  872. data/ext/v8/upstream/2.0.6/test/mjsunit/with-prototype.js +44 -0
  873. data/ext/v8/upstream/2.0.6/test/mjsunit/with-value.js +38 -0
  874. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla-shell-emulation.js +37 -0
  875. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla.status +815 -0
  876. data/ext/v8/upstream/2.0.6/test/mozilla/testcfg.py +138 -0
  877. data/ext/v8/upstream/2.0.6/test/sputnik/README +6 -0
  878. data/ext/v8/upstream/2.0.6/test/sputnik/sputnik.status +318 -0
  879. data/ext/v8/upstream/2.0.6/test/sputnik/testcfg.py +112 -0
  880. data/ext/v8/upstream/2.0.6/tools/codemap.js +258 -0
  881. data/ext/v8/upstream/2.0.6/tools/consarray.js +93 -0
  882. data/ext/v8/upstream/2.0.6/tools/csvparser.js +98 -0
  883. data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +620 -0
  884. data/ext/v8/upstream/2.0.6/tools/js2c.py +376 -0
  885. data/ext/v8/upstream/2.0.6/tools/js2c.pyc +0 -0
  886. data/ext/v8/upstream/2.0.6/tools/jsmin.py +280 -0
  887. data/ext/v8/upstream/2.0.6/tools/jsmin.pyc +0 -0
  888. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +24 -0
  889. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +78 -0
  890. data/ext/v8/upstream/2.0.6/tools/logreader.js +320 -0
  891. data/ext/v8/upstream/2.0.6/tools/mac-nm +18 -0
  892. data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +6 -0
  893. data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +7 -0
  894. data/ext/v8/upstream/2.0.6/tools/oprofile/common +19 -0
  895. data/ext/v8/upstream/2.0.6/tools/oprofile/dump +7 -0
  896. data/ext/v8/upstream/2.0.6/tools/oprofile/report +7 -0
  897. data/ext/v8/upstream/2.0.6/tools/oprofile/reset +7 -0
  898. data/ext/v8/upstream/2.0.6/tools/oprofile/run +14 -0
  899. data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +7 -0
  900. data/ext/v8/upstream/2.0.6/tools/oprofile/start +7 -0
  901. data/ext/v8/upstream/2.0.6/tools/presubmit.py +299 -0
  902. data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +120 -0
  903. data/ext/v8/upstream/2.0.6/tools/profile.js +621 -0
  904. data/ext/v8/upstream/2.0.6/tools/profile_view.js +224 -0
  905. data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +77 -0
  906. data/ext/v8/upstream/2.0.6/tools/splaytree.js +322 -0
  907. data/ext/v8/upstream/2.0.6/tools/splaytree.py +226 -0
  908. data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +456 -0
  909. data/ext/v8/upstream/2.0.6/tools/test.py +1370 -0
  910. data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +53 -0
  911. data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +731 -0
  912. data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +535 -0
  913. data/ext/v8/upstream/2.0.6/tools/utils.py +82 -0
  914. data/ext/v8/upstream/2.0.6/tools/utils.pyc +0 -0
  915. data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +71 -0
  916. data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +14 -0
  917. data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +35 -0
  918. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +199 -0
  919. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +199 -0
  920. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +201 -0
  921. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +6 -0
  922. data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +17 -0
  923. data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +13 -0
  924. data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +6 -0
  925. data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +24 -0
  926. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +101 -0
  927. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +223 -0
  928. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +74 -0
  929. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +223 -0
  930. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +971 -0
  931. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +983 -0
  932. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +959 -0
  933. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +255 -0
  934. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +243 -0
  935. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
  936. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +151 -0
  937. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +151 -0
  938. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +151 -0
  939. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +151 -0
  940. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +151 -0
  941. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +151 -0
  942. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +151 -0
  943. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +153 -0
  944. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +142 -0
  945. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
  946. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
  947. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
  948. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +101 -0
  949. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +223 -0
  950. data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +13 -0
  951. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +5 -0
  952. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +137 -0
  953. data/ext/v8/upstream/scons/CHANGES.txt +5183 -0
  954. data/ext/v8/upstream/scons/LICENSE.txt +20 -0
  955. data/ext/v8/upstream/scons/MANIFEST +202 -0
  956. data/ext/v8/upstream/scons/PKG-INFO +13 -0
  957. data/ext/v8/upstream/scons/README.txt +273 -0
  958. data/ext/v8/upstream/scons/RELEASE.txt +1040 -0
  959. data/ext/v8/upstream/scons/engine/SCons/Action.py +1256 -0
  960. data/ext/v8/upstream/scons/engine/SCons/Builder.py +868 -0
  961. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +217 -0
  962. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +794 -0
  963. data/ext/v8/upstream/scons/engine/SCons/Debug.py +237 -0
  964. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +485 -0
  965. data/ext/v8/upstream/scons/engine/SCons/Environment.py +2327 -0
  966. data/ext/v8/upstream/scons/engine/SCons/Errors.py +207 -0
  967. data/ext/v8/upstream/scons/engine/SCons/Executor.py +636 -0
  968. data/ext/v8/upstream/scons/engine/SCons/Job.py +435 -0
  969. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +292 -0
  970. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +153 -0
  971. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +3220 -0
  972. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +128 -0
  973. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +1341 -0
  974. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +50 -0
  975. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +50 -0
  976. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +50 -0
  977. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +50 -0
  978. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +76 -0
  979. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +74 -0
  980. data/ext/v8/upstream/scons/engine/SCons/PathList.py +232 -0
  981. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +236 -0
  982. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +70 -0
  983. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +55 -0
  984. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +46 -0
  985. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +46 -0
  986. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +44 -0
  987. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +58 -0
  988. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +264 -0
  989. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +50 -0
  990. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +386 -0
  991. data/ext/v8/upstream/scons/engine/SCons/SConf.py +1038 -0
  992. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +381 -0
  993. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +132 -0
  994. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +74 -0
  995. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +111 -0
  996. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +320 -0
  997. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +48 -0
  998. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +378 -0
  999. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +103 -0
  1000. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +55 -0
  1001. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +415 -0
  1002. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +386 -0
  1003. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +1360 -0
  1004. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +944 -0
  1005. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +642 -0
  1006. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +414 -0
  1007. data/ext/v8/upstream/scons/engine/SCons/Sig.py +63 -0
  1008. data/ext/v8/upstream/scons/engine/SCons/Subst.py +911 -0
  1009. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +1030 -0
  1010. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +61 -0
  1011. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +65 -0
  1012. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +73 -0
  1013. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +247 -0
  1014. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +324 -0
  1015. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  1016. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  1017. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
  1018. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
  1019. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
  1020. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
  1021. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
  1022. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +104 -0
  1023. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
  1024. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +64 -0
  1025. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +64 -0
  1026. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +71 -0
  1027. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +675 -0
  1028. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +82 -0
  1029. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +74 -0
  1030. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +80 -0
  1031. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +76 -0
  1032. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +71 -0
  1033. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +63 -0
  1034. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +78 -0
  1035. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +82 -0
  1036. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +99 -0
  1037. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +114 -0
  1038. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +58 -0
  1039. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +50 -0
  1040. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +224 -0
  1041. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +64 -0
  1042. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +125 -0
  1043. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +94 -0
  1044. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +62 -0
  1045. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +62 -0
  1046. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +63 -0
  1047. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +98 -0
  1048. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +63 -0
  1049. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +90 -0
  1050. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +73 -0
  1051. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +53 -0
  1052. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +80 -0
  1053. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +64 -0
  1054. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +63 -0
  1055. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +81 -0
  1056. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +85 -0
  1057. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +53 -0
  1058. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +77 -0
  1059. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +59 -0
  1060. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +52 -0
  1061. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +72 -0
  1062. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +90 -0
  1063. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +59 -0
  1064. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +60 -0
  1065. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +229 -0
  1066. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +490 -0
  1067. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +71 -0
  1068. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +110 -0
  1069. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +234 -0
  1070. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +138 -0
  1071. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +79 -0
  1072. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +99 -0
  1073. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +121 -0
  1074. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +112 -0
  1075. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +63 -0
  1076. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +77 -0
  1077. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +90 -0
  1078. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +159 -0
  1079. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +64 -0
  1080. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +266 -0
  1081. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +50 -0
  1082. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +269 -0
  1083. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +1439 -0
  1084. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +208 -0
  1085. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +107 -0
  1086. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +72 -0
  1087. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
  1088. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  1089. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +526 -0
  1090. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
  1091. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  1092. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  1093. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  1094. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  1095. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  1096. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  1097. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +78 -0
  1098. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +83 -0
  1099. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +108 -0
  1100. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +336 -0
  1101. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +121 -0
  1102. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +70 -0
  1103. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +132 -0
  1104. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +68 -0
  1105. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +58 -0
  1106. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +53 -0
  1107. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +63 -0
  1108. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +67 -0
  1109. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +142 -0
  1110. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +58 -0
  1111. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +63 -0
  1112. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +64 -0
  1113. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +64 -0
  1114. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +77 -0
  1115. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +186 -0
  1116. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +73 -0
  1117. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +805 -0
  1118. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +175 -0
  1119. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +53 -0
  1120. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +100 -0
  1121. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +131 -0
  1122. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +100 -0
  1123. data/ext/v8/upstream/scons/engine/SCons/Util.py +1645 -0
  1124. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +91 -0
  1125. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +107 -0
  1126. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +139 -0
  1127. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +109 -0
  1128. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +147 -0
  1129. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +317 -0
  1130. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +228 -0
  1131. data/ext/v8/upstream/scons/engine/SCons/__init__.py +49 -0
  1132. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +302 -0
  1133. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +98 -0
  1134. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
  1135. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +124 -0
  1136. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
  1137. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +583 -0
  1138. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +176 -0
  1139. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +325 -0
  1140. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
  1141. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
  1142. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +187 -0
  1143. data/ext/v8/upstream/scons/engine/SCons/cpp.py +598 -0
  1144. data/ext/v8/upstream/scons/engine/SCons/dblite.py +248 -0
  1145. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +77 -0
  1146. data/ext/v8/upstream/scons/os_spawnv_fix.diff +83 -0
  1147. data/ext/v8/upstream/scons/scons-time.1 +1017 -0
  1148. data/ext/v8/upstream/scons/scons.1 +15179 -0
  1149. data/ext/v8/upstream/scons/sconsign.1 +208 -0
  1150. data/ext/v8/upstream/scons/script/scons +184 -0
  1151. data/ext/v8/upstream/scons/script/scons-time +1529 -0
  1152. data/ext/v8/upstream/scons/script/scons.bat +31 -0
  1153. data/ext/v8/upstream/scons/script/sconsign +508 -0
  1154. data/ext/v8/upstream/scons/setup.cfg +6 -0
  1155. data/ext/v8/upstream/scons/setup.py +427 -0
  1156. data/ext/v8/v8.cpp +81 -0
  1157. data/ext/v8/v8_cxt.cpp +92 -0
  1158. data/ext/v8/v8_cxt.h +20 -0
  1159. data/ext/v8/v8_func.cpp +10 -0
  1160. data/ext/v8/v8_func.h +11 -0
  1161. data/ext/v8/v8_msg.cpp +17 -0
  1162. data/ext/v8/v8_msg.h +10 -0
  1163. data/ext/v8/v8_obj.cpp +52 -0
  1164. data/ext/v8/v8_obj.h +13 -0
  1165. data/ext/v8/v8_ref.cpp +26 -0
  1166. data/ext/v8/v8_ref.h +31 -0
  1167. data/ext/v8/v8_script.cpp +20 -0
  1168. data/ext/v8/v8_script.h +8 -0
  1169. data/ext/v8/v8_standalone.cpp +69 -0
  1170. data/ext/v8/v8_standalone.h +31 -0
  1171. data/ext/v8/v8_str.cpp +17 -0
  1172. data/ext/v8/v8_str.h +9 -0
  1173. data/ext/v8/v8_template.cpp +53 -0
  1174. data/ext/v8/v8_template.h +13 -0
  1175. data/lib/v8.rb +10 -0
  1176. data/lib/v8/context.rb +87 -0
  1177. data/lib/v8/object.rb +38 -0
  1178. data/lib/v8/to.rb +33 -0
  1179. data/lib/v8/v8.bundle +0 -0
  1180. data/script/console +10 -0
  1181. data/script/destroy +14 -0
  1182. data/script/generate +14 -0
  1183. data/spec/ext/cxt_spec.rb +25 -0
  1184. data/spec/ext/obj_spec.rb +13 -0
  1185. data/spec/redjs/README.txt +8 -0
  1186. data/spec/redjs/jsapi_spec.rb +394 -0
  1187. data/spec/redjs/tap.rb +8 -0
  1188. data/spec/redjs_helper.rb +3 -0
  1189. data/spec/spec.opts +1 -0
  1190. data/spec/spec_helper.rb +14 -0
  1191. data/spec/v8/to_spec.rb +15 -0
  1192. data/tasks/rspec.rake +21 -0
  1193. data/therubyracer.gemspec +34 -0
  1194. metadata +1269 -0
@@ -0,0 +1,2073 @@
1
+ // Copyright 2006-2008 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ // Default number of frames to include in the response to backtrace request.
29
+ const kDefaultBacktraceLength = 10;
30
+
31
+ const Debug = {};
32
+
33
+ // Regular expression to skip "crud" at the beginning of a source line which is
34
+ // not really code. Currently the regular expression matches whitespace and
35
+ // comments.
36
+ const sourceLineBeginningSkip = /^(?:\s*(?:\/\*.*?\*\/)*)*/;
37
+
38
+ // Debug events which can occour in the V8 JavaScript engine. These originate
39
+ // from the API include file debug.h.
40
+ Debug.DebugEvent = { Break: 1,
41
+ Exception: 2,
42
+ NewFunction: 3,
43
+ BeforeCompile: 4,
44
+ AfterCompile: 5,
45
+ ScriptCollected: 6 };
46
+
47
+ // Types of exceptions that can be broken upon.
48
+ Debug.ExceptionBreak = { All : 0,
49
+ Uncaught: 1 };
50
+
51
+ // The different types of steps.
52
+ Debug.StepAction = { StepOut: 0,
53
+ StepNext: 1,
54
+ StepIn: 2,
55
+ StepMin: 3,
56
+ StepInMin: 4 };
57
+
58
+ // The different types of scripts matching enum ScriptType in objects.h.
59
+ Debug.ScriptType = { Native: 0,
60
+ Extension: 1,
61
+ Normal: 2 };
62
+
63
+ // The different types of script compilations matching enum
64
+ // Script::CompilationType in objects.h.
65
+ Debug.ScriptCompilationType = { Host: 0,
66
+ Eval: 1,
67
+ JSON: 2 };
68
+
69
+ // The different script break point types.
70
+ Debug.ScriptBreakPointType = { ScriptId: 0,
71
+ ScriptName: 1 };
72
+
73
+ function ScriptTypeFlag(type) {
74
+ return (1 << type);
75
+ }
76
+
77
+ // Globals.
78
+ var next_response_seq = 0;
79
+ var next_break_point_number = 1;
80
+ var break_points = [];
81
+ var script_break_points = [];
82
+
83
+
84
+ // Create a new break point object and add it to the list of break points.
85
+ function MakeBreakPoint(source_position, opt_line, opt_column, opt_script_break_point) {
86
+ var break_point = new BreakPoint(source_position, opt_line, opt_column, opt_script_break_point);
87
+ break_points.push(break_point);
88
+ return break_point;
89
+ }
90
+
91
+
92
+ // Object representing a break point.
93
+ // NOTE: This object does not have a reference to the function having break
94
+ // point as this would cause function not to be garbage collected when it is
95
+ // not used any more. We do not want break points to keep functions alive.
96
+ function BreakPoint(source_position, opt_line, opt_column, opt_script_break_point) {
97
+ this.source_position_ = source_position;
98
+ this.source_line_ = opt_line;
99
+ this.source_column_ = opt_column;
100
+ if (opt_script_break_point) {
101
+ this.script_break_point_ = opt_script_break_point;
102
+ } else {
103
+ this.number_ = next_break_point_number++;
104
+ }
105
+ this.hit_count_ = 0;
106
+ this.active_ = true;
107
+ this.condition_ = null;
108
+ this.ignoreCount_ = 0;
109
+ }
110
+
111
+
112
+ BreakPoint.prototype.number = function() {
113
+ return this.number_;
114
+ };
115
+
116
+
117
+ BreakPoint.prototype.func = function() {
118
+ return this.func_;
119
+ };
120
+
121
+
122
+ BreakPoint.prototype.source_position = function() {
123
+ return this.source_position_;
124
+ };
125
+
126
+
127
+ BreakPoint.prototype.hit_count = function() {
128
+ return this.hit_count_;
129
+ };
130
+
131
+
132
+ BreakPoint.prototype.active = function() {
133
+ if (this.script_break_point()) {
134
+ return this.script_break_point().active();
135
+ }
136
+ return this.active_;
137
+ };
138
+
139
+
140
+ BreakPoint.prototype.condition = function() {
141
+ if (this.script_break_point() && this.script_break_point().condition()) {
142
+ return this.script_break_point().condition();
143
+ }
144
+ return this.condition_;
145
+ };
146
+
147
+
148
+ BreakPoint.prototype.ignoreCount = function() {
149
+ return this.ignoreCount_;
150
+ };
151
+
152
+
153
+ BreakPoint.prototype.script_break_point = function() {
154
+ return this.script_break_point_;
155
+ };
156
+
157
+
158
+ BreakPoint.prototype.enable = function() {
159
+ this.active_ = true;
160
+ };
161
+
162
+
163
+ BreakPoint.prototype.disable = function() {
164
+ this.active_ = false;
165
+ };
166
+
167
+
168
+ BreakPoint.prototype.setCondition = function(condition) {
169
+ this.condition_ = condition;
170
+ };
171
+
172
+
173
+ BreakPoint.prototype.setIgnoreCount = function(ignoreCount) {
174
+ this.ignoreCount_ = ignoreCount;
175
+ };
176
+
177
+
178
+ BreakPoint.prototype.isTriggered = function(exec_state) {
179
+ // Break point not active - not triggered.
180
+ if (!this.active()) return false;
181
+
182
+ // Check for conditional break point.
183
+ if (this.condition()) {
184
+ // If break point has condition try to evaluate it in the top frame.
185
+ try {
186
+ var mirror = exec_state.frame(0).evaluate(this.condition());
187
+ // If no sensible mirror or non true value break point not triggered.
188
+ if (!(mirror instanceof ValueMirror) || !%ToBoolean(mirror.value_)) {
189
+ return false;
190
+ }
191
+ } catch (e) {
192
+ // Exception evaluating condition counts as not triggered.
193
+ return false;
194
+ }
195
+ }
196
+
197
+ // Update the hit count.
198
+ this.hit_count_++;
199
+ if (this.script_break_point_) {
200
+ this.script_break_point_.hit_count_++;
201
+ }
202
+
203
+ // If the break point has an ignore count it is not triggered.
204
+ if (this.ignoreCount_ > 0) {
205
+ this.ignoreCount_--;
206
+ return false;
207
+ }
208
+
209
+ // Break point triggered.
210
+ return true;
211
+ };
212
+
213
+
214
+ // Function called from the runtime when a break point is hit. Returns true if
215
+ // the break point is triggered and supposed to break execution.
216
+ function IsBreakPointTriggered(break_id, break_point) {
217
+ return break_point.isTriggered(MakeExecutionState(break_id));
218
+ }
219
+
220
+
221
+ // Object representing a script break point. The script is referenced by its
222
+ // script name or script id and the break point is represented as line and
223
+ // column.
224
+ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
225
+ opt_groupId) {
226
+ this.type_ = type;
227
+ if (type == Debug.ScriptBreakPointType.ScriptId) {
228
+ this.script_id_ = script_id_or_name;
229
+ } else { // type == Debug.ScriptBreakPointType.ScriptName
230
+ this.script_name_ = script_id_or_name;
231
+ }
232
+ this.line_ = opt_line || 0;
233
+ this.column_ = opt_column;
234
+ this.groupId_ = opt_groupId;
235
+ this.hit_count_ = 0;
236
+ this.active_ = true;
237
+ this.condition_ = null;
238
+ this.ignoreCount_ = 0;
239
+ }
240
+
241
+
242
+ ScriptBreakPoint.prototype.number = function() {
243
+ return this.number_;
244
+ };
245
+
246
+
247
+ ScriptBreakPoint.prototype.groupId = function() {
248
+ return this.groupId_;
249
+ };
250
+
251
+
252
+ ScriptBreakPoint.prototype.type = function() {
253
+ return this.type_;
254
+ };
255
+
256
+
257
+ ScriptBreakPoint.prototype.script_id = function() {
258
+ return this.script_id_;
259
+ };
260
+
261
+
262
+ ScriptBreakPoint.prototype.script_name = function() {
263
+ return this.script_name_;
264
+ };
265
+
266
+
267
+ ScriptBreakPoint.prototype.line = function() {
268
+ return this.line_;
269
+ };
270
+
271
+
272
+ ScriptBreakPoint.prototype.column = function() {
273
+ return this.column_;
274
+ };
275
+
276
+
277
+ ScriptBreakPoint.prototype.hit_count = function() {
278
+ return this.hit_count_;
279
+ };
280
+
281
+
282
+ ScriptBreakPoint.prototype.active = function() {
283
+ return this.active_;
284
+ };
285
+
286
+
287
+ ScriptBreakPoint.prototype.condition = function() {
288
+ return this.condition_;
289
+ };
290
+
291
+
292
+ ScriptBreakPoint.prototype.ignoreCount = function() {
293
+ return this.ignoreCount_;
294
+ };
295
+
296
+
297
+ ScriptBreakPoint.prototype.enable = function() {
298
+ this.active_ = true;
299
+ };
300
+
301
+
302
+ ScriptBreakPoint.prototype.disable = function() {
303
+ this.active_ = false;
304
+ };
305
+
306
+
307
+ ScriptBreakPoint.prototype.setCondition = function(condition) {
308
+ this.condition_ = condition;
309
+ };
310
+
311
+
312
+ ScriptBreakPoint.prototype.setIgnoreCount = function(ignoreCount) {
313
+ this.ignoreCount_ = ignoreCount;
314
+
315
+ // Set ignore count on all break points created from this script break point.
316
+ for (var i = 0; i < break_points.length; i++) {
317
+ if (break_points[i].script_break_point() === this) {
318
+ break_points[i].setIgnoreCount(ignoreCount);
319
+ }
320
+ }
321
+ };
322
+
323
+
324
+ // Check whether a script matches this script break point. Currently this is
325
+ // only based on script name.
326
+ ScriptBreakPoint.prototype.matchesScript = function(script) {
327
+ if (this.type_ == Debug.ScriptBreakPointType.ScriptId) {
328
+ return this.script_id_ == script.id;
329
+ } else { // this.type_ == Debug.ScriptBreakPointType.ScriptName
330
+ return this.script_name_ == script.name &&
331
+ script.line_offset <= this.line_ &&
332
+ this.line_ < script.line_offset + script.lineCount();
333
+ }
334
+ };
335
+
336
+
337
+ // Set the script break point in a script.
338
+ ScriptBreakPoint.prototype.set = function (script) {
339
+ var column = this.column();
340
+ var line = this.line();
341
+ // If the column is undefined the break is on the line. To help locate the
342
+ // first piece of breakable code on the line try to find the column on the
343
+ // line which contains some source.
344
+ if (IS_UNDEFINED(column)) {
345
+ var source_line = script.sourceLine(this.line());
346
+
347
+ // Allocate array for caching the columns where the actual source starts.
348
+ if (!script.sourceColumnStart_) {
349
+ script.sourceColumnStart_ = new Array(script.lineCount());
350
+ }
351
+
352
+ // Fill cache if needed and get column where the actual source starts.
353
+ if (IS_UNDEFINED(script.sourceColumnStart_[line])) {
354
+ script.sourceColumnStart_[line] =
355
+ source_line.match(sourceLineBeginningSkip)[0].length;
356
+ }
357
+ column = script.sourceColumnStart_[line];
358
+ }
359
+
360
+ // Convert the line and column into an absolute position within the script.
361
+ var pos = Debug.findScriptSourcePosition(script, this.line(), column);
362
+
363
+ // If the position is not found in the script (the script might be shorter
364
+ // than it used to be) just ignore it.
365
+ if (pos === null) return;
366
+
367
+ // Create a break point object and set the break point.
368
+ break_point = MakeBreakPoint(pos, this.line(), this.column(), this);
369
+ break_point.setIgnoreCount(this.ignoreCount());
370
+ %SetScriptBreakPoint(script, pos, break_point);
371
+
372
+ return break_point;
373
+ };
374
+
375
+
376
+ // Clear all the break points created from this script break point
377
+ ScriptBreakPoint.prototype.clear = function () {
378
+ var remaining_break_points = [];
379
+ for (var i = 0; i < break_points.length; i++) {
380
+ if (break_points[i].script_break_point() &&
381
+ break_points[i].script_break_point() === this) {
382
+ %ClearBreakPoint(break_points[i]);
383
+ } else {
384
+ remaining_break_points.push(break_points[i]);
385
+ }
386
+ }
387
+ break_points = remaining_break_points;
388
+ };
389
+
390
+
391
+ // Function called from runtime when a new script is compiled to set any script
392
+ // break points set in this script.
393
+ function UpdateScriptBreakPoints(script) {
394
+ for (var i = 0; i < script_break_points.length; i++) {
395
+ if (script_break_points[i].type() == Debug.ScriptBreakPointType.ScriptName &&
396
+ script_break_points[i].matchesScript(script)) {
397
+ script_break_points[i].set(script);
398
+ }
399
+ }
400
+ }
401
+
402
+
403
+ Debug.setListener = function(listener, opt_data) {
404
+ if (!IS_FUNCTION(listener) && !IS_UNDEFINED(listener) && !IS_NULL(listener)) {
405
+ throw new Error('Parameters have wrong types.');
406
+ }
407
+ %SetDebugEventListener(listener, opt_data);
408
+ };
409
+
410
+
411
+ Debug.breakExecution = function(f) {
412
+ %Break();
413
+ };
414
+
415
+ Debug.breakLocations = function(f) {
416
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
417
+ return %GetBreakLocations(f);
418
+ };
419
+
420
+ // Returns a Script object. If the parameter is a function the return value
421
+ // is the script in which the function is defined. If the parameter is a string
422
+ // the return value is the script for which the script name has that string
423
+ // value. If it is a regexp and there is a unique script whose name matches
424
+ // we return that, otherwise undefined.
425
+ Debug.findScript = function(func_or_script_name) {
426
+ if (IS_FUNCTION(func_or_script_name)) {
427
+ return %FunctionGetScript(func_or_script_name);
428
+ } else if (IS_REGEXP(func_or_script_name)) {
429
+ var scripts = Debug.scripts();
430
+ var last_result = null;
431
+ var result_count = 0;
432
+ for (var i in scripts) {
433
+ var script = scripts[i];
434
+ if (func_or_script_name.test(script.name)) {
435
+ last_result = script;
436
+ result_count++;
437
+ }
438
+ }
439
+ // Return the unique script matching the regexp. If there are more
440
+ // than one we don't return a value since there is no good way to
441
+ // decide which one to return. Returning a "random" one, say the
442
+ // first, would introduce nondeterminism (or something close to it)
443
+ // because the order is the heap iteration order.
444
+ if (result_count == 1) {
445
+ return last_result;
446
+ } else {
447
+ return undefined;
448
+ }
449
+ } else {
450
+ return %GetScript(func_or_script_name);
451
+ }
452
+ };
453
+
454
+ // Returns the script source. If the parameter is a function the return value
455
+ // is the script source for the script in which the function is defined. If the
456
+ // parameter is a string the return value is the script for which the script
457
+ // name has that string value.
458
+ Debug.scriptSource = function(func_or_script_name) {
459
+ return this.findScript(func_or_script_name).source;
460
+ };
461
+
462
+ Debug.source = function(f) {
463
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
464
+ return %FunctionGetSourceCode(f);
465
+ };
466
+
467
+ Debug.disassemble = function(f) {
468
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
469
+ return %DebugDisassembleFunction(f);
470
+ };
471
+
472
+ Debug.disassembleConstructor = function(f) {
473
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
474
+ return %DebugDisassembleConstructor(f);
475
+ };
476
+
477
+ Debug.sourcePosition = function(f) {
478
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
479
+ return %FunctionGetScriptSourcePosition(f);
480
+ };
481
+
482
+
483
+ Debug.findFunctionSourceLocation = function(func, opt_line, opt_column) {
484
+ var script = %FunctionGetScript(func);
485
+ var script_offset = %FunctionGetScriptSourcePosition(func);
486
+ return script.locationFromLine(opt_line, opt_column, script_offset);
487
+ }
488
+
489
+
490
+ // Returns the character position in a script based on a line number and an
491
+ // optional position within that line.
492
+ Debug.findScriptSourcePosition = function(script, opt_line, opt_column) {
493
+ var location = script.locationFromLine(opt_line, opt_column);
494
+ return location ? location.position : null;
495
+ }
496
+
497
+
498
+ Debug.findBreakPoint = function(break_point_number, remove) {
499
+ var break_point;
500
+ for (var i = 0; i < break_points.length; i++) {
501
+ if (break_points[i].number() == break_point_number) {
502
+ break_point = break_points[i];
503
+ // Remove the break point from the list if requested.
504
+ if (remove) {
505
+ break_points.splice(i, 1);
506
+ }
507
+ break;
508
+ }
509
+ }
510
+ if (break_point) {
511
+ return break_point;
512
+ } else {
513
+ return this.findScriptBreakPoint(break_point_number, remove);
514
+ }
515
+ };
516
+
517
+
518
+ Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
519
+ if (!IS_FUNCTION(func)) throw new Error('Parameters have wrong types.');
520
+ // Break points in API functions are not supported.
521
+ if (%FunctionIsAPIFunction(func)) {
522
+ throw new Error('Cannot set break point in native code.');
523
+ }
524
+ // Find source position relative to start of the function
525
+ var break_position =
526
+ this.findFunctionSourceLocation(func, opt_line, opt_column).position;
527
+ var source_position = break_position - this.sourcePosition(func);
528
+ // Find the script for the function.
529
+ var script = %FunctionGetScript(func);
530
+ // Break in builtin JavaScript code is not supported.
531
+ if (script.type == Debug.ScriptType.Native) {
532
+ throw new Error('Cannot set break point in native code.');
533
+ }
534
+ // If the script for the function has a name convert this to a script break
535
+ // point.
536
+ if (script && script.id) {
537
+ // Adjust the source position to be script relative.
538
+ source_position += %FunctionGetScriptSourcePosition(func);
539
+ // Find line and column for the position in the script and set a script
540
+ // break point from that.
541
+ var location = script.locationFromPosition(source_position, false);
542
+ return this.setScriptBreakPointById(script.id,
543
+ location.line, location.column,
544
+ opt_condition);
545
+ } else {
546
+ // Set a break point directly on the function.
547
+ var break_point = MakeBreakPoint(source_position, opt_line, opt_column);
548
+ %SetFunctionBreakPoint(func, source_position, break_point);
549
+ break_point.setCondition(opt_condition);
550
+ return break_point.number();
551
+ }
552
+ };
553
+
554
+
555
+ Debug.enableBreakPoint = function(break_point_number) {
556
+ var break_point = this.findBreakPoint(break_point_number, false);
557
+ break_point.enable();
558
+ };
559
+
560
+
561
+ Debug.disableBreakPoint = function(break_point_number) {
562
+ var break_point = this.findBreakPoint(break_point_number, false);
563
+ break_point.disable();
564
+ };
565
+
566
+
567
+ Debug.changeBreakPointCondition = function(break_point_number, condition) {
568
+ var break_point = this.findBreakPoint(break_point_number, false);
569
+ break_point.setCondition(condition);
570
+ };
571
+
572
+
573
+ Debug.changeBreakPointIgnoreCount = function(break_point_number, ignoreCount) {
574
+ if (ignoreCount < 0) {
575
+ throw new Error('Invalid argument');
576
+ }
577
+ var break_point = this.findBreakPoint(break_point_number, false);
578
+ break_point.setIgnoreCount(ignoreCount);
579
+ };
580
+
581
+
582
+ Debug.clearBreakPoint = function(break_point_number) {
583
+ var break_point = this.findBreakPoint(break_point_number, true);
584
+ if (break_point) {
585
+ return %ClearBreakPoint(break_point);
586
+ } else {
587
+ break_point = this.findScriptBreakPoint(break_point_number, true);
588
+ if (!break_point) {
589
+ throw new Error('Invalid breakpoint');
590
+ }
591
+ }
592
+ };
593
+
594
+
595
+ Debug.clearAllBreakPoints = function() {
596
+ for (var i = 0; i < break_points.length; i++) {
597
+ break_point = break_points[i];
598
+ %ClearBreakPoint(break_point);
599
+ }
600
+ break_points = [];
601
+ };
602
+
603
+
604
+ Debug.findScriptBreakPoint = function(break_point_number, remove) {
605
+ var script_break_point;
606
+ for (var i = 0; i < script_break_points.length; i++) {
607
+ if (script_break_points[i].number() == break_point_number) {
608
+ script_break_point = script_break_points[i];
609
+ // Remove the break point from the list if requested.
610
+ if (remove) {
611
+ script_break_point.clear();
612
+ script_break_points.splice(i,1);
613
+ }
614
+ break;
615
+ }
616
+ }
617
+ return script_break_point;
618
+ }
619
+
620
+
621
+ // Sets a breakpoint in a script identified through id or name at the
622
+ // specified source line and column within that line.
623
+ Debug.setScriptBreakPoint = function(type, script_id_or_name,
624
+ opt_line, opt_column, opt_condition,
625
+ opt_groupId) {
626
+ // Create script break point object.
627
+ var script_break_point =
628
+ new ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
629
+ opt_groupId);
630
+
631
+ // Assign number to the new script break point and add it.
632
+ script_break_point.number_ = next_break_point_number++;
633
+ script_break_point.setCondition(opt_condition);
634
+ script_break_points.push(script_break_point);
635
+
636
+ // Run through all scripts to see if this script break point matches any
637
+ // loaded scripts.
638
+ var scripts = this.scripts();
639
+ for (var i = 0; i < scripts.length; i++) {
640
+ if (script_break_point.matchesScript(scripts[i])) {
641
+ script_break_point.set(scripts[i]);
642
+ }
643
+ }
644
+
645
+ return script_break_point.number();
646
+ }
647
+
648
+
649
+ Debug.setScriptBreakPointById = function(script_id,
650
+ opt_line, opt_column,
651
+ opt_condition, opt_groupId) {
652
+ return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
653
+ script_id, opt_line, opt_column,
654
+ opt_condition, opt_groupId);
655
+ }
656
+
657
+
658
+ Debug.setScriptBreakPointByName = function(script_name,
659
+ opt_line, opt_column,
660
+ opt_condition, opt_groupId) {
661
+ return this.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptName,
662
+ script_name, opt_line, opt_column,
663
+ opt_condition, opt_groupId);
664
+ }
665
+
666
+
667
+ Debug.enableScriptBreakPoint = function(break_point_number) {
668
+ var script_break_point = this.findScriptBreakPoint(break_point_number, false);
669
+ script_break_point.enable();
670
+ };
671
+
672
+
673
+ Debug.disableScriptBreakPoint = function(break_point_number) {
674
+ var script_break_point = this.findScriptBreakPoint(break_point_number, false);
675
+ script_break_point.disable();
676
+ };
677
+
678
+
679
+ Debug.changeScriptBreakPointCondition = function(break_point_number, condition) {
680
+ var script_break_point = this.findScriptBreakPoint(break_point_number, false);
681
+ script_break_point.setCondition(condition);
682
+ };
683
+
684
+
685
+ Debug.changeScriptBreakPointIgnoreCount = function(break_point_number, ignoreCount) {
686
+ if (ignoreCount < 0) {
687
+ throw new Error('Invalid argument');
688
+ }
689
+ var script_break_point = this.findScriptBreakPoint(break_point_number, false);
690
+ script_break_point.setIgnoreCount(ignoreCount);
691
+ };
692
+
693
+
694
+ Debug.scriptBreakPoints = function() {
695
+ return script_break_points;
696
+ }
697
+
698
+
699
+ Debug.clearStepping = function() {
700
+ %ClearStepping();
701
+ }
702
+
703
+ Debug.setBreakOnException = function() {
704
+ return %ChangeBreakOnException(Debug.ExceptionBreak.All, true);
705
+ };
706
+
707
+ Debug.clearBreakOnException = function() {
708
+ return %ChangeBreakOnException(Debug.ExceptionBreak.All, false);
709
+ };
710
+
711
+ Debug.setBreakOnUncaughtException = function() {
712
+ return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught, true);
713
+ };
714
+
715
+ Debug.clearBreakOnUncaughtException = function() {
716
+ return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught, false);
717
+ };
718
+
719
+ Debug.showBreakPoints = function(f, full) {
720
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
721
+ var source = full ? this.scriptSource(f) : this.source(f);
722
+ var offset = full ? this.sourcePosition(f) : 0;
723
+ var locations = this.breakLocations(f);
724
+ if (!locations) return source;
725
+ locations.sort(function(x, y) { return x - y; });
726
+ var result = "";
727
+ var prev_pos = 0;
728
+ var pos;
729
+ for (var i = 0; i < locations.length; i++) {
730
+ pos = locations[i] - offset;
731
+ result += source.slice(prev_pos, pos);
732
+ result += "[B" + i + "]";
733
+ prev_pos = pos;
734
+ }
735
+ pos = source.length;
736
+ result += source.substring(prev_pos, pos);
737
+ return result;
738
+ };
739
+
740
+
741
+ // Get all the scripts currently loaded. Locating all the scripts is based on
742
+ // scanning the heap.
743
+ Debug.scripts = function() {
744
+ // Collect all scripts in the heap.
745
+ return %DebugGetLoadedScripts();
746
+ }
747
+
748
+ function MakeExecutionState(break_id) {
749
+ return new ExecutionState(break_id);
750
+ }
751
+
752
+ function ExecutionState(break_id) {
753
+ this.break_id = break_id;
754
+ this.selected_frame = 0;
755
+ }
756
+
757
+ ExecutionState.prototype.prepareStep = function(opt_action, opt_count) {
758
+ var action = Debug.StepAction.StepIn;
759
+ if (!IS_UNDEFINED(opt_action)) action = %ToNumber(opt_action);
760
+ var count = opt_count ? %ToNumber(opt_count) : 1;
761
+
762
+ return %PrepareStep(this.break_id, action, count);
763
+ }
764
+
765
+ ExecutionState.prototype.evaluateGlobal = function(source, disable_break) {
766
+ return MakeMirror(
767
+ %DebugEvaluateGlobal(this.break_id, source, Boolean(disable_break)));
768
+ };
769
+
770
+ ExecutionState.prototype.frameCount = function() {
771
+ return %GetFrameCount(this.break_id);
772
+ };
773
+
774
+ ExecutionState.prototype.threadCount = function() {
775
+ return %GetThreadCount(this.break_id);
776
+ };
777
+
778
+ ExecutionState.prototype.frame = function(opt_index) {
779
+ // If no index supplied return the selected frame.
780
+ if (opt_index == null) opt_index = this.selected_frame;
781
+ return new FrameMirror(this.break_id, opt_index);
782
+ };
783
+
784
+ ExecutionState.prototype.cframesValue = function(opt_from_index, opt_to_index) {
785
+ return %GetCFrames(this.break_id);
786
+ };
787
+
788
+ ExecutionState.prototype.setSelectedFrame = function(index) {
789
+ var i = %ToNumber(index);
790
+ if (i < 0 || i >= this.frameCount()) throw new Error('Illegal frame index.');
791
+ this.selected_frame = i;
792
+ };
793
+
794
+ ExecutionState.prototype.selectedFrame = function() {
795
+ return this.selected_frame;
796
+ };
797
+
798
+ ExecutionState.prototype.debugCommandProcessor = function(opt_is_running) {
799
+ return new DebugCommandProcessor(this, opt_is_running);
800
+ };
801
+
802
+
803
+ function MakeBreakEvent(exec_state, break_points_hit) {
804
+ return new BreakEvent(exec_state, break_points_hit);
805
+ }
806
+
807
+
808
+ function BreakEvent(exec_state, break_points_hit) {
809
+ this.exec_state_ = exec_state;
810
+ this.break_points_hit_ = break_points_hit;
811
+ }
812
+
813
+
814
+ BreakEvent.prototype.executionState = function() {
815
+ return this.exec_state_;
816
+ };
817
+
818
+
819
+ BreakEvent.prototype.eventType = function() {
820
+ return Debug.DebugEvent.Break;
821
+ };
822
+
823
+
824
+ BreakEvent.prototype.func = function() {
825
+ return this.exec_state_.frame(0).func();
826
+ };
827
+
828
+
829
+ BreakEvent.prototype.sourceLine = function() {
830
+ return this.exec_state_.frame(0).sourceLine();
831
+ };
832
+
833
+
834
+ BreakEvent.prototype.sourceColumn = function() {
835
+ return this.exec_state_.frame(0).sourceColumn();
836
+ };
837
+
838
+
839
+ BreakEvent.prototype.sourceLineText = function() {
840
+ return this.exec_state_.frame(0).sourceLineText();
841
+ };
842
+
843
+
844
+ BreakEvent.prototype.breakPointsHit = function() {
845
+ return this.break_points_hit_;
846
+ };
847
+
848
+
849
+ BreakEvent.prototype.toJSONProtocol = function() {
850
+ var o = { seq: next_response_seq++,
851
+ type: "event",
852
+ event: "break",
853
+ body: { invocationText: this.exec_state_.frame(0).invocationText(),
854
+ }
855
+ };
856
+
857
+ // Add script related information to the event if available.
858
+ var script = this.func().script();
859
+ if (script) {
860
+ o.body.sourceLine = this.sourceLine(),
861
+ o.body.sourceColumn = this.sourceColumn(),
862
+ o.body.sourceLineText = this.sourceLineText(),
863
+ o.body.script = MakeScriptObject_(script, false);
864
+ }
865
+
866
+ // Add an Array of break points hit if any.
867
+ if (this.breakPointsHit()) {
868
+ o.body.breakpoints = [];
869
+ for (var i = 0; i < this.breakPointsHit().length; i++) {
870
+ // Find the break point number. For break points originating from a
871
+ // script break point supply the script break point number.
872
+ var breakpoint = this.breakPointsHit()[i];
873
+ var script_break_point = breakpoint.script_break_point();
874
+ var number;
875
+ if (script_break_point) {
876
+ number = script_break_point.number();
877
+ } else {
878
+ number = breakpoint.number();
879
+ }
880
+ o.body.breakpoints.push(number);
881
+ }
882
+ }
883
+ return JSON.stringify(ObjectToProtocolObject_(o));
884
+ };
885
+
886
+
887
+ function MakeExceptionEvent(exec_state, exception, uncaught) {
888
+ return new ExceptionEvent(exec_state, exception, uncaught);
889
+ }
890
+
891
+
892
+ function ExceptionEvent(exec_state, exception, uncaught) {
893
+ this.exec_state_ = exec_state;
894
+ this.exception_ = exception;
895
+ this.uncaught_ = uncaught;
896
+ }
897
+
898
+
899
+ ExceptionEvent.prototype.executionState = function() {
900
+ return this.exec_state_;
901
+ };
902
+
903
+
904
+ ExceptionEvent.prototype.eventType = function() {
905
+ return Debug.DebugEvent.Exception;
906
+ };
907
+
908
+
909
+ ExceptionEvent.prototype.exception = function() {
910
+ return this.exception_;
911
+ }
912
+
913
+
914
+ ExceptionEvent.prototype.uncaught = function() {
915
+ return this.uncaught_;
916
+ }
917
+
918
+
919
+ ExceptionEvent.prototype.func = function() {
920
+ return this.exec_state_.frame(0).func();
921
+ };
922
+
923
+
924
+ ExceptionEvent.prototype.sourceLine = function() {
925
+ return this.exec_state_.frame(0).sourceLine();
926
+ };
927
+
928
+
929
+ ExceptionEvent.prototype.sourceColumn = function() {
930
+ return this.exec_state_.frame(0).sourceColumn();
931
+ };
932
+
933
+
934
+ ExceptionEvent.prototype.sourceLineText = function() {
935
+ return this.exec_state_.frame(0).sourceLineText();
936
+ };
937
+
938
+
939
+ ExceptionEvent.prototype.toJSONProtocol = function() {
940
+ var o = new ProtocolMessage();
941
+ o.event = "exception";
942
+ o.body = { uncaught: this.uncaught_,
943
+ exception: MakeMirror(this.exception_)
944
+ };
945
+
946
+ // Exceptions might happen whithout any JavaScript frames.
947
+ if (this.exec_state_.frameCount() > 0) {
948
+ o.body.sourceLine = this.sourceLine();
949
+ o.body.sourceColumn = this.sourceColumn();
950
+ o.body.sourceLineText = this.sourceLineText();
951
+
952
+ // Add script information to the event if available.
953
+ var script = this.func().script();
954
+ if (script) {
955
+ o.body.script = MakeScriptObject_(script, false);
956
+ }
957
+ } else {
958
+ o.body.sourceLine = -1;
959
+ }
960
+
961
+ return o.toJSONProtocol();
962
+ };
963
+
964
+
965
+ function MakeCompileEvent(exec_state, script, before) {
966
+ return new CompileEvent(exec_state, script, before);
967
+ }
968
+
969
+
970
+ function CompileEvent(exec_state, script, before) {
971
+ this.exec_state_ = exec_state;
972
+ this.script_ = MakeMirror(script);
973
+ this.before_ = before;
974
+ }
975
+
976
+
977
+ CompileEvent.prototype.executionState = function() {
978
+ return this.exec_state_;
979
+ };
980
+
981
+
982
+ CompileEvent.prototype.eventType = function() {
983
+ if (this.before_) {
984
+ return Debug.DebugEvent.BeforeCompile;
985
+ } else {
986
+ return Debug.DebugEvent.AfterCompile;
987
+ }
988
+ };
989
+
990
+
991
+ CompileEvent.prototype.script = function() {
992
+ return this.script_;
993
+ };
994
+
995
+
996
+ CompileEvent.prototype.toJSONProtocol = function() {
997
+ var o = new ProtocolMessage();
998
+ o.running = true;
999
+ if (this.before_) {
1000
+ o.event = "beforeCompile";
1001
+ } else {
1002
+ o.event = "afterCompile";
1003
+ }
1004
+ o.body = {};
1005
+ o.body.script = this.script_;
1006
+
1007
+ return o.toJSONProtocol();
1008
+ }
1009
+
1010
+
1011
+ function MakeNewFunctionEvent(func) {
1012
+ return new NewFunctionEvent(func);
1013
+ }
1014
+
1015
+
1016
+ function NewFunctionEvent(func) {
1017
+ this.func = func;
1018
+ }
1019
+
1020
+
1021
+ NewFunctionEvent.prototype.eventType = function() {
1022
+ return Debug.DebugEvent.NewFunction;
1023
+ };
1024
+
1025
+
1026
+ NewFunctionEvent.prototype.name = function() {
1027
+ return this.func.name;
1028
+ };
1029
+
1030
+
1031
+ NewFunctionEvent.prototype.setBreakPoint = function(p) {
1032
+ Debug.setBreakPoint(this.func, p || 0);
1033
+ };
1034
+
1035
+
1036
+ function MakeScriptCollectedEvent(exec_state, id) {
1037
+ return new ScriptCollectedEvent(exec_state, id);
1038
+ }
1039
+
1040
+
1041
+ function ScriptCollectedEvent(exec_state, id) {
1042
+ this.exec_state_ = exec_state;
1043
+ this.id_ = id;
1044
+ }
1045
+
1046
+
1047
+ ScriptCollectedEvent.prototype.id = function() {
1048
+ return this.id_;
1049
+ };
1050
+
1051
+
1052
+ ScriptCollectedEvent.prototype.executionState = function() {
1053
+ return this.exec_state_;
1054
+ };
1055
+
1056
+
1057
+ ScriptCollectedEvent.prototype.toJSONProtocol = function() {
1058
+ var o = new ProtocolMessage();
1059
+ o.running = true;
1060
+ o.event = "scriptCollected";
1061
+ o.body = {};
1062
+ o.body.script = { id: this.id() };
1063
+ return o.toJSONProtocol();
1064
+ }
1065
+
1066
+
1067
+ function MakeScriptObject_(script, include_source) {
1068
+ var o = { id: script.id(),
1069
+ name: script.name(),
1070
+ lineOffset: script.lineOffset(),
1071
+ columnOffset: script.columnOffset(),
1072
+ lineCount: script.lineCount(),
1073
+ };
1074
+ if (!IS_UNDEFINED(script.data())) {
1075
+ o.data = script.data();
1076
+ }
1077
+ if (include_source) {
1078
+ o.source = script.source();
1079
+ }
1080
+ return o;
1081
+ };
1082
+
1083
+
1084
+ function DebugCommandProcessor(exec_state, opt_is_running) {
1085
+ this.exec_state_ = exec_state;
1086
+ this.running_ = opt_is_running || false;
1087
+ };
1088
+
1089
+
1090
+ DebugCommandProcessor.prototype.processDebugRequest = function (request) {
1091
+ return this.processDebugJSONRequest(request);
1092
+ }
1093
+
1094
+
1095
+ function ProtocolMessage(request) {
1096
+ // Update sequence number.
1097
+ this.seq = next_response_seq++;
1098
+
1099
+ if (request) {
1100
+ // If message is based on a request this is a response. Fill the initial
1101
+ // response from the request.
1102
+ this.type = 'response';
1103
+ this.request_seq = request.seq;
1104
+ this.command = request.command;
1105
+ } else {
1106
+ // If message is not based on a request it is a dabugger generated event.
1107
+ this.type = 'event';
1108
+ }
1109
+ this.success = true;
1110
+ // Handler may set this field to control debugger state.
1111
+ this.running = undefined;
1112
+ }
1113
+
1114
+
1115
+ ProtocolMessage.prototype.setOption = function(name, value) {
1116
+ if (!this.options_) {
1117
+ this.options_ = {};
1118
+ }
1119
+ this.options_[name] = value;
1120
+ }
1121
+
1122
+
1123
+ ProtocolMessage.prototype.failed = function(message) {
1124
+ this.success = false;
1125
+ this.message = message;
1126
+ }
1127
+
1128
+
1129
+ ProtocolMessage.prototype.toJSONProtocol = function() {
1130
+ // Encode the protocol header.
1131
+ var json = {};
1132
+ json.seq= this.seq;
1133
+ if (this.request_seq) {
1134
+ json.request_seq = this.request_seq;
1135
+ }
1136
+ json.type = this.type;
1137
+ if (this.event) {
1138
+ json.event = this.event;
1139
+ }
1140
+ if (this.command) {
1141
+ json.command = this.command;
1142
+ }
1143
+ if (this.success) {
1144
+ json.success = this.success;
1145
+ } else {
1146
+ json.success = false;
1147
+ }
1148
+ if (this.body) {
1149
+ // Encode the body part.
1150
+ var bodyJson;
1151
+ var serializer = MakeMirrorSerializer(true, this.options_);
1152
+ if (this.body instanceof Mirror) {
1153
+ bodyJson = serializer.serializeValue(this.body);
1154
+ } else if (this.body instanceof Array) {
1155
+ bodyJson = [];
1156
+ for (var i = 0; i < this.body.length; i++) {
1157
+ if (this.body[i] instanceof Mirror) {
1158
+ bodyJson.push(serializer.serializeValue(this.body[i]));
1159
+ } else {
1160
+ bodyJson.push(ObjectToProtocolObject_(this.body[i], serializer));
1161
+ }
1162
+ }
1163
+ } else {
1164
+ bodyJson = ObjectToProtocolObject_(this.body, serializer);
1165
+ }
1166
+ json.body = bodyJson;
1167
+ json.refs = serializer.serializeReferencedObjects();
1168
+ }
1169
+ if (this.message) {
1170
+ json.message = this.message;
1171
+ }
1172
+ json.running = this.running;
1173
+ return JSON.stringify(json);
1174
+ }
1175
+
1176
+
1177
+ DebugCommandProcessor.prototype.createResponse = function(request) {
1178
+ return new ProtocolMessage(request);
1179
+ };
1180
+
1181
+
1182
+ DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request) {
1183
+ var request; // Current request.
1184
+ var response; // Generated response.
1185
+ try {
1186
+ try {
1187
+ // Convert the JSON string to an object.
1188
+ request = %CompileString('(' + json_request + ')', false)();
1189
+
1190
+ // Create an initial response.
1191
+ response = this.createResponse(request);
1192
+
1193
+ if (!request.type) {
1194
+ throw new Error('Type not specified');
1195
+ }
1196
+
1197
+ if (request.type != 'request') {
1198
+ throw new Error("Illegal type '" + request.type + "' in request");
1199
+ }
1200
+
1201
+ if (!request.command) {
1202
+ throw new Error('Command not specified');
1203
+ }
1204
+
1205
+ // TODO(yurys): remove request.arguments.compactFormat check once
1206
+ // ChromeDevTools are switched to 'inlineRefs'
1207
+ if (request.arguments && (request.arguments.inlineRefs ||
1208
+ request.arguments.compactFormat)) {
1209
+ response.setOption('inlineRefs', true);
1210
+ }
1211
+
1212
+ if (request.command == 'continue') {
1213
+ this.continueRequest_(request, response);
1214
+ } else if (request.command == 'break') {
1215
+ this.breakRequest_(request, response);
1216
+ } else if (request.command == 'setbreakpoint') {
1217
+ this.setBreakPointRequest_(request, response);
1218
+ } else if (request.command == 'changebreakpoint') {
1219
+ this.changeBreakPointRequest_(request, response);
1220
+ } else if (request.command == 'clearbreakpoint') {
1221
+ this.clearBreakPointRequest_(request, response);
1222
+ } else if (request.command == 'clearbreakpointgroup') {
1223
+ this.clearBreakPointGroupRequest_(request, response);
1224
+ } else if (request.command == 'backtrace') {
1225
+ this.backtraceRequest_(request, response);
1226
+ } else if (request.command == 'frame') {
1227
+ this.frameRequest_(request, response);
1228
+ } else if (request.command == 'scopes') {
1229
+ this.scopesRequest_(request, response);
1230
+ } else if (request.command == 'scope') {
1231
+ this.scopeRequest_(request, response);
1232
+ } else if (request.command == 'evaluate') {
1233
+ this.evaluateRequest_(request, response);
1234
+ } else if (request.command == 'lookup') {
1235
+ this.lookupRequest_(request, response);
1236
+ } else if (request.command == 'references') {
1237
+ this.referencesRequest_(request, response);
1238
+ } else if (request.command == 'source') {
1239
+ this.sourceRequest_(request, response);
1240
+ } else if (request.command == 'scripts') {
1241
+ this.scriptsRequest_(request, response);
1242
+ } else if (request.command == 'threads') {
1243
+ this.threadsRequest_(request, response);
1244
+ } else if (request.command == 'suspend') {
1245
+ this.suspendRequest_(request, response);
1246
+ } else if (request.command == 'version') {
1247
+ this.versionRequest_(request, response);
1248
+ } else if (request.command == 'profile') {
1249
+ this.profileRequest_(request, response);
1250
+ } else {
1251
+ throw new Error('Unknown command "' + request.command + '" in request');
1252
+ }
1253
+ } catch (e) {
1254
+ // If there is no response object created one (without command).
1255
+ if (!response) {
1256
+ response = this.createResponse();
1257
+ }
1258
+ response.success = false;
1259
+ response.message = %ToString(e);
1260
+ }
1261
+
1262
+ // Return the response as a JSON encoded string.
1263
+ try {
1264
+ if (!IS_UNDEFINED(response.running)) {
1265
+ // Response controls running state.
1266
+ this.running_ = response.running;
1267
+ }
1268
+ response.running = this.running_;
1269
+ return response.toJSONProtocol();
1270
+ } catch (e) {
1271
+ // Failed to generate response - return generic error.
1272
+ return '{"seq":' + response.seq + ',' +
1273
+ '"request_seq":' + request.seq + ',' +
1274
+ '"type":"response",' +
1275
+ '"success":false,' +
1276
+ '"message":"Internal error: ' + %ToString(e) + '"}';
1277
+ }
1278
+ } catch (e) {
1279
+ // Failed in one of the catch blocks above - most generic error.
1280
+ return '{"seq":0,"type":"response","success":false,"message":"Internal error"}';
1281
+ }
1282
+ };
1283
+
1284
+
1285
+ DebugCommandProcessor.prototype.continueRequest_ = function(request, response) {
1286
+ // Check for arguments for continue.
1287
+ if (request.arguments) {
1288
+ var count = 1;
1289
+ var action = Debug.StepAction.StepIn;
1290
+
1291
+ // Pull out arguments.
1292
+ var stepaction = request.arguments.stepaction;
1293
+ var stepcount = request.arguments.stepcount;
1294
+
1295
+ // Get the stepcount argument if any.
1296
+ if (stepcount) {
1297
+ count = %ToNumber(stepcount);
1298
+ if (count < 0) {
1299
+ throw new Error('Invalid stepcount argument "' + stepcount + '".');
1300
+ }
1301
+ }
1302
+
1303
+ // Get the stepaction argument.
1304
+ if (stepaction) {
1305
+ if (stepaction == 'in') {
1306
+ action = Debug.StepAction.StepIn;
1307
+ } else if (stepaction == 'min') {
1308
+ action = Debug.StepAction.StepMin;
1309
+ } else if (stepaction == 'next') {
1310
+ action = Debug.StepAction.StepNext;
1311
+ } else if (stepaction == 'out') {
1312
+ action = Debug.StepAction.StepOut;
1313
+ } else {
1314
+ throw new Error('Invalid stepaction argument "' + stepaction + '".');
1315
+ }
1316
+ }
1317
+
1318
+ // Setup the VM for stepping.
1319
+ this.exec_state_.prepareStep(action, count);
1320
+ }
1321
+
1322
+ // VM should be running after executing this request.
1323
+ response.running = true;
1324
+ };
1325
+
1326
+
1327
+ DebugCommandProcessor.prototype.breakRequest_ = function(request, response) {
1328
+ // Ignore as break command does not do anything when broken.
1329
+ };
1330
+
1331
+
1332
+ DebugCommandProcessor.prototype.setBreakPointRequest_ =
1333
+ function(request, response) {
1334
+ // Check for legal request.
1335
+ if (!request.arguments) {
1336
+ response.failed('Missing arguments');
1337
+ return;
1338
+ }
1339
+
1340
+ // Pull out arguments.
1341
+ var type = request.arguments.type;
1342
+ var target = request.arguments.target;
1343
+ var line = request.arguments.line;
1344
+ var column = request.arguments.column;
1345
+ var enabled = IS_UNDEFINED(request.arguments.enabled) ?
1346
+ true : request.arguments.enabled;
1347
+ var condition = request.arguments.condition;
1348
+ var ignoreCount = request.arguments.ignoreCount;
1349
+ var groupId = request.arguments.groupId;
1350
+
1351
+ // Check for legal arguments.
1352
+ if (!type || IS_UNDEFINED(target)) {
1353
+ response.failed('Missing argument "type" or "target"');
1354
+ return;
1355
+ }
1356
+ if (type != 'function' && type != 'handle' &&
1357
+ type != 'script' && type != 'scriptId') {
1358
+ response.failed('Illegal type "' + type + '"');
1359
+ return;
1360
+ }
1361
+
1362
+ // Either function or script break point.
1363
+ var break_point_number;
1364
+ if (type == 'function') {
1365
+ // Handle function break point.
1366
+ if (!IS_STRING(target)) {
1367
+ response.failed('Argument "target" is not a string value');
1368
+ return;
1369
+ }
1370
+ var f;
1371
+ try {
1372
+ // Find the function through a global evaluate.
1373
+ f = this.exec_state_.evaluateGlobal(target).value();
1374
+ } catch (e) {
1375
+ response.failed('Error: "' + %ToString(e) +
1376
+ '" evaluating "' + target + '"');
1377
+ return;
1378
+ }
1379
+ if (!IS_FUNCTION(f)) {
1380
+ response.failed('"' + target + '" does not evaluate to a function');
1381
+ return;
1382
+ }
1383
+
1384
+ // Set function break point.
1385
+ break_point_number = Debug.setBreakPoint(f, line, column, condition);
1386
+ } else if (type == 'handle') {
1387
+ // Find the object pointed by the specified handle.
1388
+ var handle = parseInt(target, 10);
1389
+ var mirror = LookupMirror(handle);
1390
+ if (!mirror) {
1391
+ return response.failed('Object #' + handle + '# not found');
1392
+ }
1393
+ if (!mirror.isFunction()) {
1394
+ return response.failed('Object #' + handle + '# is not a function');
1395
+ }
1396
+
1397
+ // Set function break point.
1398
+ break_point_number = Debug.setBreakPoint(mirror.value(),
1399
+ line, column, condition);
1400
+ } else if (type == 'script') {
1401
+ // set script break point.
1402
+ break_point_number =
1403
+ Debug.setScriptBreakPointByName(target, line, column, condition,
1404
+ groupId);
1405
+ } else { // type == 'scriptId.
1406
+ break_point_number =
1407
+ Debug.setScriptBreakPointById(target, line, column, condition, groupId);
1408
+ }
1409
+
1410
+ // Set additional break point properties.
1411
+ var break_point = Debug.findBreakPoint(break_point_number);
1412
+ if (ignoreCount) {
1413
+ Debug.changeBreakPointIgnoreCount(break_point_number, ignoreCount);
1414
+ }
1415
+ if (!enabled) {
1416
+ Debug.disableBreakPoint(break_point_number);
1417
+ }
1418
+
1419
+ // Add the break point number to the response.
1420
+ response.body = { type: type,
1421
+ breakpoint: break_point_number }
1422
+
1423
+ // Add break point information to the response.
1424
+ if (break_point instanceof ScriptBreakPoint) {
1425
+ if (break_point.type() == Debug.ScriptBreakPointType.ScriptId) {
1426
+ response.body.type = 'scriptId';
1427
+ response.body.script_id = break_point.script_id();
1428
+ } else {
1429
+ response.body.type = 'scriptName';
1430
+ response.body.script_name = break_point.script_name();
1431
+ }
1432
+ response.body.line = break_point.line();
1433
+ response.body.column = break_point.column();
1434
+ } else {
1435
+ response.body.type = 'function';
1436
+ }
1437
+ };
1438
+
1439
+
1440
+ DebugCommandProcessor.prototype.changeBreakPointRequest_ = function(request, response) {
1441
+ // Check for legal request.
1442
+ if (!request.arguments) {
1443
+ response.failed('Missing arguments');
1444
+ return;
1445
+ }
1446
+
1447
+ // Pull out arguments.
1448
+ var break_point = %ToNumber(request.arguments.breakpoint);
1449
+ var enabled = request.arguments.enabled;
1450
+ var condition = request.arguments.condition;
1451
+ var ignoreCount = request.arguments.ignoreCount;
1452
+
1453
+ // Check for legal arguments.
1454
+ if (!break_point) {
1455
+ response.failed('Missing argument "breakpoint"');
1456
+ return;
1457
+ }
1458
+
1459
+ // Change enabled state if supplied.
1460
+ if (!IS_UNDEFINED(enabled)) {
1461
+ if (enabled) {
1462
+ Debug.enableBreakPoint(break_point);
1463
+ } else {
1464
+ Debug.disableBreakPoint(break_point);
1465
+ }
1466
+ }
1467
+
1468
+ // Change condition if supplied
1469
+ if (!IS_UNDEFINED(condition)) {
1470
+ Debug.changeBreakPointCondition(break_point, condition);
1471
+ }
1472
+
1473
+ // Change ignore count if supplied
1474
+ if (!IS_UNDEFINED(ignoreCount)) {
1475
+ Debug.changeBreakPointIgnoreCount(break_point, ignoreCount);
1476
+ }
1477
+ }
1478
+
1479
+
1480
+ DebugCommandProcessor.prototype.clearBreakPointGroupRequest_ = function(request, response) {
1481
+ // Check for legal request.
1482
+ if (!request.arguments) {
1483
+ response.failed('Missing arguments');
1484
+ return;
1485
+ }
1486
+
1487
+ // Pull out arguments.
1488
+ var group_id = request.arguments.groupId;
1489
+
1490
+ // Check for legal arguments.
1491
+ if (!group_id) {
1492
+ response.failed('Missing argument "groupId"');
1493
+ return;
1494
+ }
1495
+
1496
+ var cleared_break_points = [];
1497
+ var new_script_break_points = [];
1498
+ for (var i = 0; i < script_break_points.length; i++) {
1499
+ var next_break_point = script_break_points[i];
1500
+ if (next_break_point.groupId() == group_id) {
1501
+ cleared_break_points.push(next_break_point.number());
1502
+ next_break_point.clear();
1503
+ } else {
1504
+ new_script_break_points.push(next_break_point);
1505
+ }
1506
+ }
1507
+ script_break_points = new_script_break_points;
1508
+
1509
+ // Add the cleared break point numbers to the response.
1510
+ response.body = { breakpoints: cleared_break_points };
1511
+ }
1512
+
1513
+
1514
+ DebugCommandProcessor.prototype.clearBreakPointRequest_ = function(request, response) {
1515
+ // Check for legal request.
1516
+ if (!request.arguments) {
1517
+ response.failed('Missing arguments');
1518
+ return;
1519
+ }
1520
+
1521
+ // Pull out arguments.
1522
+ var break_point = %ToNumber(request.arguments.breakpoint);
1523
+
1524
+ // Check for legal arguments.
1525
+ if (!break_point) {
1526
+ response.failed('Missing argument "breakpoint"');
1527
+ return;
1528
+ }
1529
+
1530
+ // Clear break point.
1531
+ Debug.clearBreakPoint(break_point);
1532
+
1533
+ // Add the cleared break point number to the response.
1534
+ response.body = { breakpoint: break_point }
1535
+ }
1536
+
1537
+
1538
+ DebugCommandProcessor.prototype.backtraceRequest_ = function(request, response) {
1539
+ // Get the number of frames.
1540
+ var total_frames = this.exec_state_.frameCount();
1541
+
1542
+ // Create simple response if there are no frames.
1543
+ if (total_frames == 0) {
1544
+ response.body = {
1545
+ totalFrames: total_frames
1546
+ }
1547
+ return;
1548
+ }
1549
+
1550
+ // Default frame range to include in backtrace.
1551
+ var from_index = 0
1552
+ var to_index = kDefaultBacktraceLength;
1553
+
1554
+ // Get the range from the arguments.
1555
+ if (request.arguments) {
1556
+ if (request.arguments.fromFrame) {
1557
+ from_index = request.arguments.fromFrame;
1558
+ }
1559
+ if (request.arguments.toFrame) {
1560
+ to_index = request.arguments.toFrame;
1561
+ }
1562
+ if (request.arguments.bottom) {
1563
+ var tmp_index = total_frames - from_index;
1564
+ from_index = total_frames - to_index
1565
+ to_index = tmp_index;
1566
+ }
1567
+ if (from_index < 0 || to_index < 0) {
1568
+ return response.failed('Invalid frame number');
1569
+ }
1570
+ }
1571
+
1572
+ // Adjust the index.
1573
+ to_index = Math.min(total_frames, to_index);
1574
+
1575
+ if (to_index <= from_index) {
1576
+ var error = 'Invalid frame range';
1577
+ return response.failed(error);
1578
+ }
1579
+
1580
+ // Create the response body.
1581
+ var frames = [];
1582
+ for (var i = from_index; i < to_index; i++) {
1583
+ frames.push(this.exec_state_.frame(i));
1584
+ }
1585
+ response.body = {
1586
+ fromFrame: from_index,
1587
+ toFrame: to_index,
1588
+ totalFrames: total_frames,
1589
+ frames: frames
1590
+ }
1591
+ };
1592
+
1593
+
1594
+ DebugCommandProcessor.prototype.backtracec = function(cmd, args) {
1595
+ return this.exec_state_.cframesValue();
1596
+ };
1597
+
1598
+
1599
+ DebugCommandProcessor.prototype.frameRequest_ = function(request, response) {
1600
+ // No frames no source.
1601
+ if (this.exec_state_.frameCount() == 0) {
1602
+ return response.failed('No frames');
1603
+ }
1604
+
1605
+ // With no arguments just keep the selected frame.
1606
+ if (request.arguments) {
1607
+ var index = request.arguments.number;
1608
+ if (index < 0 || this.exec_state_.frameCount() <= index) {
1609
+ return response.failed('Invalid frame number');
1610
+ }
1611
+
1612
+ this.exec_state_.setSelectedFrame(request.arguments.number);
1613
+ }
1614
+ response.body = this.exec_state_.frame();
1615
+ };
1616
+
1617
+
1618
+ DebugCommandProcessor.prototype.frameForScopeRequest_ = function(request) {
1619
+ // Get the frame for which the scope or scopes are requested. With no frameNumber
1620
+ // argument use the currently selected frame.
1621
+ if (request.arguments && !IS_UNDEFINED(request.arguments.frameNumber)) {
1622
+ frame_index = request.arguments.frameNumber;
1623
+ if (frame_index < 0 || this.exec_state_.frameCount() <= frame_index) {
1624
+ return response.failed('Invalid frame number');
1625
+ }
1626
+ return this.exec_state_.frame(frame_index);
1627
+ } else {
1628
+ return this.exec_state_.frame();
1629
+ }
1630
+ }
1631
+
1632
+
1633
+ DebugCommandProcessor.prototype.scopesRequest_ = function(request, response) {
1634
+ // No frames no scopes.
1635
+ if (this.exec_state_.frameCount() == 0) {
1636
+ return response.failed('No scopes');
1637
+ }
1638
+
1639
+ // Get the frame for which the scopes are requested.
1640
+ var frame = this.frameForScopeRequest_(request);
1641
+
1642
+ // Fill all scopes for this frame.
1643
+ var total_scopes = frame.scopeCount();
1644
+ var scopes = [];
1645
+ for (var i = 0; i < total_scopes; i++) {
1646
+ scopes.push(frame.scope(i));
1647
+ }
1648
+ response.body = {
1649
+ fromScope: 0,
1650
+ toScope: total_scopes,
1651
+ totalScopes: total_scopes,
1652
+ scopes: scopes
1653
+ }
1654
+ };
1655
+
1656
+
1657
+ DebugCommandProcessor.prototype.scopeRequest_ = function(request, response) {
1658
+ // No frames no scopes.
1659
+ if (this.exec_state_.frameCount() == 0) {
1660
+ return response.failed('No scopes');
1661
+ }
1662
+
1663
+ // Get the frame for which the scope is requested.
1664
+ var frame = this.frameForScopeRequest_(request);
1665
+
1666
+ // With no scope argument just return top scope.
1667
+ var scope_index = 0;
1668
+ if (request.arguments && !IS_UNDEFINED(request.arguments.number)) {
1669
+ scope_index = %ToNumber(request.arguments.number);
1670
+ if (scope_index < 0 || frame.scopeCount() <= scope_index) {
1671
+ return response.failed('Invalid scope number');
1672
+ }
1673
+ }
1674
+
1675
+ response.body = frame.scope(scope_index);
1676
+ };
1677
+
1678
+
1679
+ DebugCommandProcessor.prototype.evaluateRequest_ = function(request, response) {
1680
+ if (!request.arguments) {
1681
+ return response.failed('Missing arguments');
1682
+ }
1683
+
1684
+ // Pull out arguments.
1685
+ var expression = request.arguments.expression;
1686
+ var frame = request.arguments.frame;
1687
+ var global = request.arguments.global;
1688
+ var disable_break = request.arguments.disable_break;
1689
+
1690
+ // The expression argument could be an integer so we convert it to a
1691
+ // string.
1692
+ try {
1693
+ expression = String(expression);
1694
+ } catch(e) {
1695
+ return response.failed('Failed to convert expression argument to string');
1696
+ }
1697
+
1698
+ // Check for legal arguments.
1699
+ if (!IS_UNDEFINED(frame) && global) {
1700
+ return response.failed('Arguments "frame" and "global" are exclusive');
1701
+ }
1702
+
1703
+ // Global evaluate.
1704
+ if (global) {
1705
+ // Evaluate in the global context.
1706
+ response.body =
1707
+ this.exec_state_.evaluateGlobal(expression), Boolean(disable_break);
1708
+ return;
1709
+ }
1710
+
1711
+ // Default value for disable_break is true.
1712
+ if (IS_UNDEFINED(disable_break)) {
1713
+ disable_break = true;
1714
+ }
1715
+
1716
+ // No frames no evaluate in frame.
1717
+ if (this.exec_state_.frameCount() == 0) {
1718
+ return response.failed('No frames');
1719
+ }
1720
+
1721
+ // Check whether a frame was specified.
1722
+ if (!IS_UNDEFINED(frame)) {
1723
+ var frame_number = %ToNumber(frame);
1724
+ if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
1725
+ return response.failed('Invalid frame "' + frame + '"');
1726
+ }
1727
+ // Evaluate in the specified frame.
1728
+ response.body = this.exec_state_.frame(frame_number).evaluate(
1729
+ expression, Boolean(disable_break));
1730
+ return;
1731
+ } else {
1732
+ // Evaluate in the selected frame.
1733
+ response.body = this.exec_state_.frame().evaluate(
1734
+ expression, Boolean(disable_break));
1735
+ return;
1736
+ }
1737
+ };
1738
+
1739
+
1740
+ DebugCommandProcessor.prototype.lookupRequest_ = function(request, response) {
1741
+ if (!request.arguments) {
1742
+ return response.failed('Missing arguments');
1743
+ }
1744
+
1745
+ // Pull out arguments.
1746
+ var handles = request.arguments.handles;
1747
+
1748
+ // Check for legal arguments.
1749
+ if (IS_UNDEFINED(handles)) {
1750
+ return response.failed('Argument "handles" missing');
1751
+ }
1752
+
1753
+ // Set 'includeSource' option for script lookup.
1754
+ if (!IS_UNDEFINED(request.arguments.includeSource)) {
1755
+ includeSource = %ToBoolean(request.arguments.includeSource);
1756
+ response.setOption('includeSource', includeSource);
1757
+ }
1758
+
1759
+ // Lookup handles.
1760
+ var mirrors = {};
1761
+ for (var i = 0; i < handles.length; i++) {
1762
+ var handle = handles[i];
1763
+ var mirror = LookupMirror(handle);
1764
+ if (!mirror) {
1765
+ return response.failed('Object #' + handle + '# not found');
1766
+ }
1767
+ mirrors[handle] = mirror;
1768
+ }
1769
+ response.body = mirrors;
1770
+ };
1771
+
1772
+
1773
+ DebugCommandProcessor.prototype.referencesRequest_ =
1774
+ function(request, response) {
1775
+ if (!request.arguments) {
1776
+ return response.failed('Missing arguments');
1777
+ }
1778
+
1779
+ // Pull out arguments.
1780
+ var type = request.arguments.type;
1781
+ var handle = request.arguments.handle;
1782
+
1783
+ // Check for legal arguments.
1784
+ if (IS_UNDEFINED(type)) {
1785
+ return response.failed('Argument "type" missing');
1786
+ }
1787
+ if (IS_UNDEFINED(handle)) {
1788
+ return response.failed('Argument "handle" missing');
1789
+ }
1790
+ if (type != 'referencedBy' && type != 'constructedBy') {
1791
+ return response.failed('Invalid type "' + type + '"');
1792
+ }
1793
+
1794
+ // Lookup handle and return objects with references the object.
1795
+ var mirror = LookupMirror(handle);
1796
+ if (mirror) {
1797
+ if (type == 'referencedBy') {
1798
+ response.body = mirror.referencedBy();
1799
+ } else {
1800
+ response.body = mirror.constructedBy();
1801
+ }
1802
+ } else {
1803
+ return response.failed('Object #' + handle + '# not found');
1804
+ }
1805
+ };
1806
+
1807
+
1808
+ DebugCommandProcessor.prototype.sourceRequest_ = function(request, response) {
1809
+ // No frames no source.
1810
+ if (this.exec_state_.frameCount() == 0) {
1811
+ return response.failed('No source');
1812
+ }
1813
+
1814
+ var from_line;
1815
+ var to_line;
1816
+ var frame = this.exec_state_.frame();
1817
+ if (request.arguments) {
1818
+ // Pull out arguments.
1819
+ from_line = request.arguments.fromLine;
1820
+ to_line = request.arguments.toLine;
1821
+
1822
+ if (!IS_UNDEFINED(request.arguments.frame)) {
1823
+ var frame_number = %ToNumber(request.arguments.frame);
1824
+ if (frame_number < 0 || frame_number >= this.exec_state_.frameCount()) {
1825
+ return response.failed('Invalid frame "' + frame + '"');
1826
+ }
1827
+ frame = this.exec_state_.frame(frame_number);
1828
+ }
1829
+ }
1830
+
1831
+ // Get the script selected.
1832
+ var script = frame.func().script();
1833
+ if (!script) {
1834
+ return response.failed('No source');
1835
+ }
1836
+
1837
+ // Get the source slice and fill it into the response.
1838
+ var slice = script.sourceSlice(from_line, to_line);
1839
+ if (!slice) {
1840
+ return response.failed('Invalid line interval');
1841
+ }
1842
+ response.body = {};
1843
+ response.body.source = slice.sourceText();
1844
+ response.body.fromLine = slice.from_line;
1845
+ response.body.toLine = slice.to_line;
1846
+ response.body.fromPosition = slice.from_position;
1847
+ response.body.toPosition = slice.to_position;
1848
+ response.body.totalLines = script.lineCount();
1849
+ };
1850
+
1851
+
1852
+ DebugCommandProcessor.prototype.scriptsRequest_ = function(request, response) {
1853
+ var types = ScriptTypeFlag(Debug.ScriptType.Normal);
1854
+ var includeSource = false;
1855
+ var idsToInclude = null;
1856
+ if (request.arguments) {
1857
+ // Pull out arguments.
1858
+ if (!IS_UNDEFINED(request.arguments.types)) {
1859
+ types = %ToNumber(request.arguments.types);
1860
+ if (isNaN(types) || types < 0) {
1861
+ return response.failed('Invalid types "' + request.arguments.types + '"');
1862
+ }
1863
+ }
1864
+
1865
+ if (!IS_UNDEFINED(request.arguments.includeSource)) {
1866
+ includeSource = %ToBoolean(request.arguments.includeSource);
1867
+ response.setOption('includeSource', includeSource);
1868
+ }
1869
+
1870
+ if (IS_ARRAY(request.arguments.ids)) {
1871
+ idsToInclude = {};
1872
+ var ids = request.arguments.ids;
1873
+ for (var i = 0; i < ids.length; i++) {
1874
+ idsToInclude[ids[i]] = true;
1875
+ }
1876
+ }
1877
+ }
1878
+
1879
+ // Collect all scripts in the heap.
1880
+ var scripts = %DebugGetLoadedScripts();
1881
+
1882
+ response.body = [];
1883
+
1884
+ for (var i = 0; i < scripts.length; i++) {
1885
+ if (idsToInclude && !idsToInclude[scripts[i].id]) {
1886
+ continue;
1887
+ }
1888
+ if (types & ScriptTypeFlag(scripts[i].type)) {
1889
+ response.body.push(MakeMirror(scripts[i]));
1890
+ }
1891
+ }
1892
+ };
1893
+
1894
+
1895
+ DebugCommandProcessor.prototype.threadsRequest_ = function(request, response) {
1896
+ // Get the number of threads.
1897
+ var total_threads = this.exec_state_.threadCount();
1898
+
1899
+ // Get information for all threads.
1900
+ var threads = [];
1901
+ for (var i = 0; i < total_threads; i++) {
1902
+ var details = %GetThreadDetails(this.exec_state_.break_id, i);
1903
+ var thread_info = { current: details[0],
1904
+ id: details[1]
1905
+ }
1906
+ threads.push(thread_info);
1907
+ }
1908
+
1909
+ // Create the response body.
1910
+ response.body = {
1911
+ totalThreads: total_threads,
1912
+ threads: threads
1913
+ }
1914
+ };
1915
+
1916
+
1917
+ DebugCommandProcessor.prototype.suspendRequest_ = function(request, response) {
1918
+ response.running = false;
1919
+ };
1920
+
1921
+
1922
+ DebugCommandProcessor.prototype.versionRequest_ = function(request, response) {
1923
+ response.body = {
1924
+ V8Version: %GetV8Version()
1925
+ }
1926
+ };
1927
+
1928
+
1929
+ DebugCommandProcessor.prototype.profileRequest_ = function(request, response) {
1930
+ if (!request.arguments) {
1931
+ return response.failed('Missing arguments');
1932
+ }
1933
+ var modules = parseInt(request.arguments.modules);
1934
+ if (isNaN(modules)) {
1935
+ return response.failed('Modules is not an integer');
1936
+ }
1937
+ if (request.arguments.command == 'resume') {
1938
+ %ProfilerResume(modules);
1939
+ } else if (request.arguments.command == 'pause') {
1940
+ %ProfilerPause(modules);
1941
+ } else {
1942
+ return response.failed('Unknown command');
1943
+ }
1944
+ response.body = {};
1945
+ };
1946
+
1947
+
1948
+ // Check whether the previously processed command caused the VM to become
1949
+ // running.
1950
+ DebugCommandProcessor.prototype.isRunning = function() {
1951
+ return this.running_;
1952
+ }
1953
+
1954
+
1955
+ DebugCommandProcessor.prototype.systemBreak = function(cmd, args) {
1956
+ return %SystemBreak();
1957
+ };
1958
+
1959
+
1960
+ function NumberToHex8Str(n) {
1961
+ var r = "";
1962
+ for (var i = 0; i < 8; ++i) {
1963
+ var c = hexCharArray[n & 0x0F]; // hexCharArray is defined in uri.js
1964
+ r = c + r;
1965
+ n = n >>> 4;
1966
+ }
1967
+ return r;
1968
+ };
1969
+
1970
+ DebugCommandProcessor.prototype.formatCFrames = function(cframes_value) {
1971
+ var result = "";
1972
+ if (cframes_value == null || cframes_value.length == 0) {
1973
+ result += "(stack empty)";
1974
+ } else {
1975
+ for (var i = 0; i < cframes_value.length; ++i) {
1976
+ if (i != 0) result += "\n";
1977
+ result += this.formatCFrame(cframes_value[i]);
1978
+ }
1979
+ }
1980
+ return result;
1981
+ };
1982
+
1983
+
1984
+ DebugCommandProcessor.prototype.formatCFrame = function(cframe_value) {
1985
+ var result = "";
1986
+ result += "0x" + NumberToHex8Str(cframe_value.address);
1987
+ if (!IS_UNDEFINED(cframe_value.text)) {
1988
+ result += " " + cframe_value.text;
1989
+ }
1990
+ return result;
1991
+ }
1992
+
1993
+
1994
+ /**
1995
+ * Convert an Object to its debugger protocol representation. The representation
1996
+ * may be serilized to a JSON object using JSON.stringify().
1997
+ * This implementation simply runs through all string property names, converts
1998
+ * each property value to a protocol value and adds the property to the result
1999
+ * object. For type "object" the function will be called recursively. Note that
2000
+ * circular structures will cause infinite recursion.
2001
+ * @param {Object} object The object to format as protocol object.
2002
+ * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2003
+ * mirror objects are encountered.
2004
+ * @return {Object} Protocol object value.
2005
+ */
2006
+ function ObjectToProtocolObject_(object, mirror_serializer) {
2007
+ var content = {};
2008
+ for (var key in object) {
2009
+ // Only consider string keys.
2010
+ if (typeof key == 'string') {
2011
+ // Format the value based on its type.
2012
+ var property_value_json = ValueToProtocolValue_(object[key],
2013
+ mirror_serializer);
2014
+ // Add the property if relevant.
2015
+ if (!IS_UNDEFINED(property_value_json)) {
2016
+ content[key] = property_value_json;
2017
+ }
2018
+ }
2019
+ }
2020
+
2021
+ return content;
2022
+ }
2023
+
2024
+
2025
+ /**
2026
+ * Convert an array to its debugger protocol representation. It will convert
2027
+ * each array element to a protocol value.
2028
+ * @param {Array} array The array to format as protocol array.
2029
+ * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2030
+ * mirror objects are encountered.
2031
+ * @return {Array} Protocol array value.
2032
+ */
2033
+ function ArrayToProtocolArray_(array, mirror_serializer) {
2034
+ var json = [];
2035
+ for (var i = 0; i < array.length; i++) {
2036
+ json.push(ValueToProtocolValue_(array[i], mirror_serializer));
2037
+ }
2038
+ return json;
2039
+ }
2040
+
2041
+
2042
+ /**
2043
+ * Convert a value to its debugger protocol representation.
2044
+ * @param {*} value The value to format as protocol value.
2045
+ * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2046
+ * mirror objects are encountered.
2047
+ * @return {*} Protocol value.
2048
+ */
2049
+ function ValueToProtocolValue_(value, mirror_serializer) {
2050
+ // Format the value based on its type.
2051
+ var json;
2052
+ switch (typeof value) {
2053
+ case 'object':
2054
+ if (value instanceof Mirror) {
2055
+ json = mirror_serializer.serializeValue(value);
2056
+ } else if (IS_ARRAY(value)){
2057
+ json = ArrayToProtocolArray_(value, mirror_serializer);
2058
+ } else {
2059
+ json = ObjectToProtocolObject_(value, mirror_serializer);
2060
+ }
2061
+ break;
2062
+
2063
+ case 'boolean':
2064
+ case 'string':
2065
+ case 'number':
2066
+ json = value;
2067
+ break
2068
+
2069
+ default:
2070
+ json = null;
2071
+ }
2072
+ return json;
2073
+ }