therubyracer 0.8.1.pre2 → 0.8.1

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

Potentially problematic release.


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

Files changed (877) hide show
  1. data/Changelog.md +2 -1
  2. data/README.md +6 -3
  3. data/ext/v8/upstream/3.1.8/.gitignore +31 -0
  4. data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
  5. data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
  6. data/ext/v8/upstream/3.1.8/LICENSE +52 -0
  7. data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
  8. data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
  9. data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
  10. data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
  11. data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
  12. data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
  13. data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
  14. data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
  15. data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
  16. data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
  17. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
  19. data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
  20. data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
  21. data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
  22. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
  23. data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
  24. data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
  25. data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
  26. data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
  27. data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
  28. data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
  29. data/ext/v8/upstream/3.1.8/src/api.h +508 -0
  30. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
  31. data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
  32. data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
  33. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
  34. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
  35. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
  36. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
  37. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
  38. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
  39. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
  40. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
  41. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
  42. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
  43. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
  44. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
  45. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
  46. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
  47. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
  48. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
  49. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
  50. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
  51. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
  52. data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
  53. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
  54. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
  55. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
  56. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
  57. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
  58. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
  59. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
  60. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
  61. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
  62. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
  63. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
  64. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
  65. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
  66. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
  67. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
  68. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
  69. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
  70. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
  71. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
  72. data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
  73. data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
  74. data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
  75. data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
  76. data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
  77. data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
  78. data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
  79. data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
  80. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
  81. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
  82. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
  83. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
  84. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
  85. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
  86. data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
  87. data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
  88. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
  89. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
  90. data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
  91. data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
  92. data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
  93. data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
  94. data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
  95. data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
  96. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
  97. data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
  98. data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
  99. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
  100. data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
  101. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
  102. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
  103. data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
  104. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
  105. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
  106. data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
  107. data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
  108. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
  109. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
  110. data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
  111. data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
  112. data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
  113. data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
  114. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
  115. data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
  116. data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
  117. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
  118. data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
  119. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
  120. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
  121. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
  122. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
  123. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
  124. data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
  125. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
  126. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
  127. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
  128. data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
  129. data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
  130. data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
  131. data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
  132. data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
  133. data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
  134. data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
  135. data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
  136. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
  137. data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
  138. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
  139. data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
  140. data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
  141. data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
  142. data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
  143. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
  144. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
  145. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
  146. data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
  147. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
  148. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
  149. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
  150. data/ext/v8/upstream/3.1.8/src/double.h +238 -0
  151. data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
  152. data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
  153. data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
  154. data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
  155. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
  156. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
  157. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
  158. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
  159. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
  160. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
  161. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
  162. data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
  163. data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
  164. data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
  165. data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
  166. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
  167. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
  168. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
  169. data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
  170. data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
  171. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
  172. data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
  173. data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
  174. data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
  175. data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
  176. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
  177. data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
  178. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
  179. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
  180. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
  181. data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
  182. data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
  183. data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
  184. data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
  185. data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
  186. data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
  187. data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
  188. data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
  189. data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
  190. data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
  191. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
  192. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
  193. data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
  194. data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
  195. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
  196. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
  197. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
  198. data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
  199. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
  200. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
  201. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
  202. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
  203. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
  204. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
  205. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
  206. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
  207. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
  208. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
  209. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
  210. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
  211. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
  212. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
  213. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
  214. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
  215. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
  216. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
  217. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
  218. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
  219. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
  220. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  221. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
  222. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
  223. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
  224. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
  225. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
  226. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
  227. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  228. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
  229. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
  230. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
  231. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
  232. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
  233. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
  234. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
  235. data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
  236. data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
  237. data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
  238. data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
  239. data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
  240. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
  241. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
  242. data/ext/v8/upstream/3.1.8/src/json.js +342 -0
  243. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
  244. data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
  245. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
  246. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
  247. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
  248. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
  249. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
  250. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
  251. data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
  252. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
  253. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
  254. data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
  255. data/ext/v8/upstream/3.1.8/src/list.h +164 -0
  256. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
  257. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
  258. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
  259. data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
  260. data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
  261. data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
  262. data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
  263. data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
  264. data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
  265. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
  266. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
  267. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
  268. data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
  269. data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
  270. data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
  271. data/ext/v8/upstream/3.1.8/src/log.h +379 -0
  272. data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
  273. data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
  274. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
  275. data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
  276. data/ext/v8/upstream/3.1.8/src/math.js +264 -0
  277. data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
  278. data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
  279. data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
  280. data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
  281. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
  282. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
  283. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
  284. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
  285. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
  286. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
  287. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
  288. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
  289. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
  290. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
  291. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
  292. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
  293. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
  294. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
  295. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
  296. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
  297. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
  298. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
  299. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
  300. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
  301. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
  302. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
  303. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
  304. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
  305. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
  306. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
  307. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
  308. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
  309. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
  310. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
  311. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
  312. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
  313. data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
  314. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
  315. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
  316. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
  317. data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
  318. data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
  319. data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
  320. data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
  321. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
  322. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
  323. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
  324. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
  325. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
  326. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
  327. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
  328. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
  329. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
  330. data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
  331. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
  332. data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
  333. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
  334. data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
  335. data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
  336. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
  337. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
  338. data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
  339. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
  340. data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
  341. data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
  342. data/ext/v8/upstream/3.1.8/src/property.h +337 -0
  343. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  344. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
  345. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
  346. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
  347. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
  348. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
  349. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
  350. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
  351. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
  352. data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
  353. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
  354. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
  355. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
  356. data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
  357. data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
  358. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
  359. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
  360. data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
  361. data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
  362. data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
  363. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
  364. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
  365. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
  366. data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
  367. data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
  368. data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
  369. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
  370. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
  371. data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
  372. data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
  373. data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
  374. data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
  375. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
  376. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
  377. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
  378. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
  379. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
  380. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
  381. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
  382. data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
  383. data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
  384. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
  385. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
  386. data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
  387. data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
  388. data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
  389. data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
  390. data/ext/v8/upstream/3.1.8/src/string.js +915 -0
  391. data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
  392. data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
  393. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
  394. data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
  395. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
  396. data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
  397. data/ext/v8/upstream/3.1.8/src/token.h +288 -0
  398. data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
  399. data/ext/v8/upstream/3.1.8/src/top.h +608 -0
  400. data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
  401. data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
  402. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
  403. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
  404. data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
  405. data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
  406. data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
  407. data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
  408. data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
  409. data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
  410. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
  411. data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
  412. data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
  413. data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
  414. data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
  415. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
  416. data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
  417. data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
  418. data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
  419. data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
  420. data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
  421. data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
  422. data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
  423. data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
  424. data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
  425. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
  426. data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
  427. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
  428. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
  429. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
  430. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
  431. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
  432. data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
  433. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
  434. data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
  435. data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
  436. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
  437. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
  438. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
  439. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
  440. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
  441. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
  442. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
  443. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
  444. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
  445. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
  446. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
  447. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
  448. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
  449. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
  450. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
  451. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
  452. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
  453. data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
  454. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
  455. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
  456. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  457. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
  458. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
  459. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
  460. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
  461. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
  462. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
  463. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
  464. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
  465. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
  466. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
  467. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
  468. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
  469. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
  470. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
  471. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
  472. data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
  473. data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
  474. data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
  475. data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
  476. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
  477. data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
  478. data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
  479. data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
  480. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
  481. data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
  482. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
  483. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
  484. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
  485. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
  486. data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
  487. data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
  488. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
  489. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
  490. data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
  491. data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
  492. data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
  493. data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
  494. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
  495. data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
  496. data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
  497. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
  498. data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
  499. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
  500. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
  501. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
  502. data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
  503. data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
  504. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
  505. data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
  506. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
  507. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
  508. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
  509. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
  510. data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
  511. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
  512. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
  513. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
  514. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
  515. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
  516. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
  517. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
  518. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
  519. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
  520. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
  521. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  522. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  523. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  524. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  525. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  526. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  527. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  528. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  529. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
  530. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
  531. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
  532. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  533. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  534. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  535. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  536. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
  537. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
  538. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
  539. data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
  540. data/ext/v8/upstream/Makefile +2 -1
  541. data/ext/v8/v8_template.cpp +2 -2
  542. data/lib/v8/version.rb +1 -1
  543. data/spec/redjs/jsapi_spec.rb +2 -2
  544. metadata +552 -490
  545. data/ext/v8/upstream/2.3.3/.gitignore +0 -26
  546. data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
  547. data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
  548. data/ext/v8/upstream/2.3.3/LICENSE +0 -55
  549. data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
  550. data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
  551. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
  552. data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
  553. data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
  554. data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
  555. data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
  556. data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
  557. data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
  558. data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
  559. data/ext/v8/upstream/2.3.3/src/api.h +0 -485
  560. data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
  561. data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
  562. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
  563. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
  564. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
  565. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
  566. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
  567. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
  568. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
  569. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
  570. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
  571. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
  572. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
  573. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
  574. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
  575. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
  576. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
  577. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
  578. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
  579. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
  580. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
  581. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
  582. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
  583. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
  584. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
  585. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
  586. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
  587. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
  588. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
  589. data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
  590. data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
  591. data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
  592. data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
  593. data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
  594. data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
  595. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
  596. data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
  597. data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
  598. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
  599. data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
  600. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
  601. data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
  602. data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
  603. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
  604. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
  605. data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
  606. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
  607. data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
  608. data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
  609. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
  610. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
  611. data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
  612. data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
  613. data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
  614. data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
  615. data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
  616. data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
  617. data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
  618. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
  619. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
  620. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
  621. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
  622. data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
  623. data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
  624. data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
  625. data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
  626. data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
  627. data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
  628. data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
  629. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
  630. data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
  631. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
  632. data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
  633. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
  634. data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
  635. data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
  636. data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
  637. data/ext/v8/upstream/2.3.3/src/double.h +0 -169
  638. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
  639. data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
  640. data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
  641. data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
  642. data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
  643. data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
  644. data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
  645. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
  646. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
  647. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
  648. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
  649. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
  650. data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
  651. data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
  652. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
  653. data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
  654. data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
  655. data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
  656. data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
  657. data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
  658. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
  659. data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
  660. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
  661. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
  662. data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
  663. data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
  664. data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
  665. data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
  666. data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
  667. data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
  668. data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
  669. data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
  670. data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
  671. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
  672. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
  673. data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
  674. data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
  675. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
  676. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
  677. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
  678. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
  679. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
  680. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
  681. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
  682. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
  683. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
  684. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
  685. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
  686. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
  687. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
  688. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
  689. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
  690. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
  691. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
  692. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
  693. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
  694. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
  695. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
  696. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
  697. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
  698. data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
  699. data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
  700. data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
  701. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
  702. data/ext/v8/upstream/2.3.3/src/json.js +0 -268
  703. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
  704. data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
  705. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
  706. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
  707. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
  708. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
  709. data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
  710. data/ext/v8/upstream/2.3.3/src/list.h +0 -159
  711. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
  712. data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
  713. data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
  714. data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
  715. data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
  716. data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
  717. data/ext/v8/upstream/2.3.3/src/log.h +0 -384
  718. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
  719. data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
  720. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
  721. data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
  722. data/ext/v8/upstream/2.3.3/src/math.js +0 -264
  723. data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
  724. data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
  725. data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
  726. data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
  727. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
  728. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
  729. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
  730. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
  731. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
  732. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
  733. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
  734. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
  735. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
  736. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
  737. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
  738. data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
  739. data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
  740. data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
  741. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
  742. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
  743. data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
  744. data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
  745. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
  746. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
  747. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
  748. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
  749. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
  750. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
  751. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
  752. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
  753. data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
  754. data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
  755. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
  756. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
  757. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
  758. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
  759. data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
  760. data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
  761. data/ext/v8/upstream/2.3.3/src/property.h +0 -315
  762. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
  763. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
  764. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
  765. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
  766. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
  767. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
  768. data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
  769. data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
  770. data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
  771. data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
  772. data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
  773. data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
  774. data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
  775. data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
  776. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
  777. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
  778. data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
  779. data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
  780. data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
  781. data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
  782. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
  783. data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
  784. data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
  785. data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
  786. data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
  787. data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
  788. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
  789. data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
  790. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
  791. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
  792. data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
  793. data/ext/v8/upstream/2.3.3/src/token.h +0 -270
  794. data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
  795. data/ext/v8/upstream/2.3.3/src/top.h +0 -463
  796. data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
  797. data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
  798. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
  799. data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
  800. data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
  801. data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
  802. data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
  803. data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
  804. data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
  805. data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
  806. data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
  807. data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
  808. data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
  809. data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
  810. data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
  811. data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
  812. data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
  813. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
  814. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
  815. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
  816. data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
  817. data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
  818. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
  819. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
  820. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
  821. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
  822. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
  823. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
  824. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
  825. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
  826. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
  827. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
  828. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
  829. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
  830. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
  831. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
  832. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
  833. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
  834. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
  835. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
  836. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
  837. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
  838. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
  839. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
  840. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
  841. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
  842. data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
  843. data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
  844. data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
  845. data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
  846. data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
  847. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
  848. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
  849. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
  850. data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
  851. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
  852. data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
  853. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
  854. data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
  855. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
  856. data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
  857. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
  858. data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
  859. data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
  860. data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
  861. data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
  862. data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
  863. data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
  864. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
  865. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
  866. data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
  867. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
  868. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
  869. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
  870. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
  871. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
  872. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
  873. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
  874. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
  875. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
  876. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
  877. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,1480 +0,0 @@
1
- // Copyright 2010 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
-
29
- #include "v8.h"
30
-
31
- #include "liveedit.h"
32
- #include "compiler.h"
33
- #include "oprofile-agent.h"
34
- #include "scopes.h"
35
- #include "global-handles.h"
36
- #include "debug.h"
37
- #include "memory.h"
38
-
39
- namespace v8 {
40
- namespace internal {
41
-
42
-
43
- #ifdef ENABLE_DEBUGGER_SUPPORT
44
-
45
-
46
- // A simple implementation of dynamic programming algorithm. It solves
47
- // the problem of finding the difference of 2 arrays. It uses a table of results
48
- // of subproblems. Each cell contains a number together with 2-bit flag
49
- // that helps building the chunk list.
50
- class Differencer {
51
- public:
52
- explicit Differencer(Comparator::Input* input)
53
- : input_(input), len1_(input->getLength1()), len2_(input->getLength2()) {
54
- buffer_ = NewArray<int>(len1_ * len2_);
55
- }
56
- ~Differencer() {
57
- DeleteArray(buffer_);
58
- }
59
-
60
- void Initialize() {
61
- int array_size = len1_ * len2_;
62
- for (int i = 0; i < array_size; i++) {
63
- buffer_[i] = kEmptyCellValue;
64
- }
65
- }
66
-
67
- // Makes sure that result for the full problem is calculated and stored
68
- // in the table together with flags showing a path through subproblems.
69
- void FillTable() {
70
- CompareUpToTail(0, 0);
71
- }
72
-
73
- void SaveResult(Comparator::Output* chunk_writer) {
74
- ResultWriter writer(chunk_writer);
75
-
76
- int pos1 = 0;
77
- int pos2 = 0;
78
- while (true) {
79
- if (pos1 < len1_) {
80
- if (pos2 < len2_) {
81
- Direction dir = get_direction(pos1, pos2);
82
- switch (dir) {
83
- case EQ:
84
- writer.eq();
85
- pos1++;
86
- pos2++;
87
- break;
88
- case SKIP1:
89
- writer.skip1(1);
90
- pos1++;
91
- break;
92
- case SKIP2:
93
- case SKIP_ANY:
94
- writer.skip2(1);
95
- pos2++;
96
- break;
97
- default:
98
- UNREACHABLE();
99
- }
100
- } else {
101
- writer.skip1(len1_ - pos1);
102
- break;
103
- }
104
- } else {
105
- if (len2_ != pos2) {
106
- writer.skip2(len2_ - pos2);
107
- }
108
- break;
109
- }
110
- }
111
- writer.close();
112
- }
113
-
114
- private:
115
- Comparator::Input* input_;
116
- int* buffer_;
117
- int len1_;
118
- int len2_;
119
-
120
- enum Direction {
121
- EQ = 0,
122
- SKIP1,
123
- SKIP2,
124
- SKIP_ANY,
125
-
126
- MAX_DIRECTION_FLAG_VALUE = SKIP_ANY
127
- };
128
-
129
- // Computes result for a subtask and optionally caches it in the buffer table.
130
- // All results values are shifted to make space for flags in the lower bits.
131
- int CompareUpToTail(int pos1, int pos2) {
132
- if (pos1 < len1_) {
133
- if (pos2 < len2_) {
134
- int cached_res = get_value4(pos1, pos2);
135
- if (cached_res == kEmptyCellValue) {
136
- Direction dir;
137
- int res;
138
- if (input_->equals(pos1, pos2)) {
139
- res = CompareUpToTail(pos1 + 1, pos2 + 1);
140
- dir = EQ;
141
- } else {
142
- int res1 = CompareUpToTail(pos1 + 1, pos2) +
143
- (1 << kDirectionSizeBits);
144
- int res2 = CompareUpToTail(pos1, pos2 + 1) +
145
- (1 << kDirectionSizeBits);
146
- if (res1 == res2) {
147
- res = res1;
148
- dir = SKIP_ANY;
149
- } else if (res1 < res2) {
150
- res = res1;
151
- dir = SKIP1;
152
- } else {
153
- res = res2;
154
- dir = SKIP2;
155
- }
156
- }
157
- set_value4_and_dir(pos1, pos2, res, dir);
158
- cached_res = res;
159
- }
160
- return cached_res;
161
- } else {
162
- return (len1_ - pos1) << kDirectionSizeBits;
163
- }
164
- } else {
165
- return (len2_ - pos2) << kDirectionSizeBits;
166
- }
167
- }
168
-
169
- inline int& get_cell(int i1, int i2) {
170
- return buffer_[i1 + i2 * len1_];
171
- }
172
-
173
- // Each cell keeps a value plus direction. Value is multiplied by 4.
174
- void set_value4_and_dir(int i1, int i2, int value4, Direction dir) {
175
- ASSERT((value4 & kDirectionMask) == 0);
176
- get_cell(i1, i2) = value4 | dir;
177
- }
178
-
179
- int get_value4(int i1, int i2) {
180
- return get_cell(i1, i2) & (kMaxUInt32 ^ kDirectionMask);
181
- }
182
- Direction get_direction(int i1, int i2) {
183
- return static_cast<Direction>(get_cell(i1, i2) & kDirectionMask);
184
- }
185
-
186
- static const int kDirectionSizeBits = 2;
187
- static const int kDirectionMask = (1 << kDirectionSizeBits) - 1;
188
- static const int kEmptyCellValue = -1 << kDirectionSizeBits;
189
-
190
- // This method only holds static assert statement (unfortunately you cannot
191
- // place one in class scope).
192
- void StaticAssertHolder() {
193
- STATIC_ASSERT(MAX_DIRECTION_FLAG_VALUE < (1 << kDirectionSizeBits));
194
- }
195
-
196
- class ResultWriter {
197
- public:
198
- explicit ResultWriter(Comparator::Output* chunk_writer)
199
- : chunk_writer_(chunk_writer), pos1_(0), pos2_(0),
200
- pos1_begin_(-1), pos2_begin_(-1), has_open_chunk_(false) {
201
- }
202
- void eq() {
203
- FlushChunk();
204
- pos1_++;
205
- pos2_++;
206
- }
207
- void skip1(int len1) {
208
- StartChunk();
209
- pos1_ += len1;
210
- }
211
- void skip2(int len2) {
212
- StartChunk();
213
- pos2_ += len2;
214
- }
215
- void close() {
216
- FlushChunk();
217
- }
218
-
219
- private:
220
- Comparator::Output* chunk_writer_;
221
- int pos1_;
222
- int pos2_;
223
- int pos1_begin_;
224
- int pos2_begin_;
225
- bool has_open_chunk_;
226
-
227
- void StartChunk() {
228
- if (!has_open_chunk_) {
229
- pos1_begin_ = pos1_;
230
- pos2_begin_ = pos2_;
231
- has_open_chunk_ = true;
232
- }
233
- }
234
-
235
- void FlushChunk() {
236
- if (has_open_chunk_) {
237
- chunk_writer_->AddChunk(pos1_begin_, pos2_begin_,
238
- pos1_ - pos1_begin_, pos2_ - pos2_begin_);
239
- has_open_chunk_ = false;
240
- }
241
- }
242
- };
243
- };
244
-
245
-
246
- void Comparator::CalculateDifference(Comparator::Input* input,
247
- Comparator::Output* result_writer) {
248
- Differencer differencer(input);
249
- differencer.Initialize();
250
- differencer.FillTable();
251
- differencer.SaveResult(result_writer);
252
- }
253
-
254
-
255
- static bool CompareSubstrings(Handle<String> s1, int pos1,
256
- Handle<String> s2, int pos2, int len) {
257
- static StringInputBuffer buf1;
258
- static StringInputBuffer buf2;
259
- buf1.Reset(*s1);
260
- buf1.Seek(pos1);
261
- buf2.Reset(*s2);
262
- buf2.Seek(pos2);
263
- for (int i = 0; i < len; i++) {
264
- ASSERT(buf1.has_more() && buf2.has_more());
265
- if (buf1.GetNext() != buf2.GetNext()) {
266
- return false;
267
- }
268
- }
269
- return true;
270
- }
271
-
272
-
273
- // Wraps raw n-elements line_ends array as a list of n+1 lines. The last line
274
- // never has terminating new line character.
275
- class LineEndsWrapper {
276
- public:
277
- explicit LineEndsWrapper(Handle<String> string)
278
- : ends_array_(CalculateLineEnds(string, false)),
279
- string_len_(string->length()) {
280
- }
281
- int length() {
282
- return ends_array_->length() + 1;
283
- }
284
- // Returns start for any line including start of the imaginary line after
285
- // the last line.
286
- int GetLineStart(int index) {
287
- if (index == 0) {
288
- return 0;
289
- } else {
290
- return GetLineEnd(index - 1);
291
- }
292
- }
293
- int GetLineEnd(int index) {
294
- if (index == ends_array_->length()) {
295
- // End of the last line is always an end of the whole string.
296
- // If the string ends with a new line character, the last line is an
297
- // empty string after this character.
298
- return string_len_;
299
- } else {
300
- return GetPosAfterNewLine(index);
301
- }
302
- }
303
-
304
- private:
305
- Handle<FixedArray> ends_array_;
306
- int string_len_;
307
-
308
- int GetPosAfterNewLine(int index) {
309
- return Smi::cast(ends_array_->get(index))->value() + 1;
310
- }
311
- };
312
-
313
-
314
- // Represents 2 strings as 2 arrays of lines.
315
- class LineArrayCompareInput : public Comparator::Input {
316
- public:
317
- LineArrayCompareInput(Handle<String> s1, Handle<String> s2,
318
- LineEndsWrapper line_ends1, LineEndsWrapper line_ends2)
319
- : s1_(s1), s2_(s2), line_ends1_(line_ends1), line_ends2_(line_ends2) {
320
- }
321
- int getLength1() {
322
- return line_ends1_.length();
323
- }
324
- int getLength2() {
325
- return line_ends2_.length();
326
- }
327
- bool equals(int index1, int index2) {
328
- int line_start1 = line_ends1_.GetLineStart(index1);
329
- int line_start2 = line_ends2_.GetLineStart(index2);
330
- int line_end1 = line_ends1_.GetLineEnd(index1);
331
- int line_end2 = line_ends2_.GetLineEnd(index2);
332
- int len1 = line_end1 - line_start1;
333
- int len2 = line_end2 - line_start2;
334
- if (len1 != len2) {
335
- return false;
336
- }
337
- return CompareSubstrings(s1_, line_start1, s2_, line_start2, len1);
338
- }
339
-
340
- private:
341
- Handle<String> s1_;
342
- Handle<String> s2_;
343
- LineEndsWrapper line_ends1_;
344
- LineEndsWrapper line_ends2_;
345
- };
346
-
347
-
348
- // Stores compare result in JSArray. Each chunk is stored as 3 array elements:
349
- // (pos1_begin, pos1_end, pos2_end).
350
- class LineArrayCompareOutput : public Comparator::Output {
351
- public:
352
- LineArrayCompareOutput(LineEndsWrapper line_ends1, LineEndsWrapper line_ends2)
353
- : array_(Factory::NewJSArray(10)), current_size_(0),
354
- line_ends1_(line_ends1), line_ends2_(line_ends2) {
355
- }
356
-
357
- void AddChunk(int line_pos1, int line_pos2, int line_len1, int line_len2) {
358
- int char_pos1 = line_ends1_.GetLineStart(line_pos1);
359
- int char_pos2 = line_ends2_.GetLineStart(line_pos2);
360
- int char_len1 = line_ends1_.GetLineStart(line_pos1 + line_len1) - char_pos1;
361
- int char_len2 = line_ends2_.GetLineStart(line_pos2 + line_len2) - char_pos2;
362
-
363
- SetElement(array_, current_size_, Handle<Object>(Smi::FromInt(char_pos1)));
364
- SetElement(array_, current_size_ + 1,
365
- Handle<Object>(Smi::FromInt(char_pos1 + char_len1)));
366
- SetElement(array_, current_size_ + 2,
367
- Handle<Object>(Smi::FromInt(char_pos2 + char_len2)));
368
- current_size_ += 3;
369
- }
370
-
371
- Handle<JSArray> GetResult() {
372
- return array_;
373
- }
374
-
375
- private:
376
- Handle<JSArray> array_;
377
- int current_size_;
378
- LineEndsWrapper line_ends1_;
379
- LineEndsWrapper line_ends2_;
380
- };
381
-
382
-
383
- Handle<JSArray> LiveEdit::CompareStringsLinewise(Handle<String> s1,
384
- Handle<String> s2) {
385
- LineEndsWrapper line_ends1(s1);
386
- LineEndsWrapper line_ends2(s2);
387
-
388
- LineArrayCompareInput input(s1, s2, line_ends1, line_ends2);
389
- LineArrayCompareOutput output(line_ends1, line_ends2);
390
-
391
- Comparator::CalculateDifference(&input, &output);
392
-
393
- return output.GetResult();
394
- }
395
-
396
-
397
- static void CompileScriptForTracker(Handle<Script> script) {
398
- const bool is_eval = false;
399
- const bool is_global = true;
400
- // TODO(635): support extensions.
401
- Extension* extension = NULL;
402
-
403
- PostponeInterruptsScope postpone;
404
-
405
- // Only allow non-global compiles for eval.
406
- ASSERT(is_eval || is_global);
407
-
408
- // Build AST.
409
- ScriptDataImpl* pre_data = NULL;
410
- FunctionLiteral* lit = MakeAST(is_global, script, extension, pre_data);
411
-
412
- // Check for parse errors.
413
- if (lit == NULL) {
414
- ASSERT(Top::has_pending_exception());
415
- return;
416
- }
417
-
418
- // Compile the code.
419
- CompilationInfo info(lit, script, is_eval);
420
-
421
- LiveEditFunctionTracker tracker(lit);
422
- Handle<Code> code = MakeCodeForLiveEdit(&info);
423
-
424
- // Check for stack-overflow exceptions.
425
- if (code.is_null()) {
426
- Top::StackOverflow();
427
- return;
428
- }
429
- tracker.RecordRootFunctionInfo(code);
430
- }
431
-
432
- // Unwraps JSValue object, returning its field "value"
433
- static Handle<Object> UnwrapJSValue(Handle<JSValue> jsValue) {
434
- return Handle<Object>(jsValue->value());
435
- }
436
-
437
- // Wraps any object into a OpaqueReference, that will hide the object
438
- // from JavaScript.
439
- static Handle<JSValue> WrapInJSValue(Object* object) {
440
- Handle<JSFunction> constructor = Top::opaque_reference_function();
441
- Handle<JSValue> result =
442
- Handle<JSValue>::cast(Factory::NewJSObject(constructor));
443
- result->set_value(object);
444
- return result;
445
- }
446
-
447
- // Simple helper class that creates more or less typed structures over
448
- // JSArray object. This is an adhoc method of passing structures from C++
449
- // to JavaScript.
450
- template<typename S>
451
- class JSArrayBasedStruct {
452
- public:
453
- static S Create() {
454
- Handle<JSArray> array = Factory::NewJSArray(S::kSize_);
455
- return S(array);
456
- }
457
- static S cast(Object* object) {
458
- JSArray* array = JSArray::cast(object);
459
- Handle<JSArray> array_handle(array);
460
- return S(array_handle);
461
- }
462
- explicit JSArrayBasedStruct(Handle<JSArray> array) : array_(array) {
463
- }
464
- Handle<JSArray> GetJSArray() {
465
- return array_;
466
- }
467
- protected:
468
- void SetField(int field_position, Handle<Object> value) {
469
- SetElement(array_, field_position, value);
470
- }
471
- void SetSmiValueField(int field_position, int value) {
472
- SetElement(array_, field_position, Handle<Smi>(Smi::FromInt(value)));
473
- }
474
- Object* GetField(int field_position) {
475
- return array_->GetElement(field_position);
476
- }
477
- int GetSmiValueField(int field_position) {
478
- Object* res = GetField(field_position);
479
- return Smi::cast(res)->value();
480
- }
481
- private:
482
- Handle<JSArray> array_;
483
- };
484
-
485
-
486
- // Represents some function compilation details. This structure will be used
487
- // from JavaScript. It contains Code object, which is kept wrapped
488
- // into a BlindReference for sanitizing reasons.
489
- class FunctionInfoWrapper : public JSArrayBasedStruct<FunctionInfoWrapper> {
490
- public:
491
- explicit FunctionInfoWrapper(Handle<JSArray> array)
492
- : JSArrayBasedStruct<FunctionInfoWrapper>(array) {
493
- }
494
- void SetInitialProperties(Handle<String> name, int start_position,
495
- int end_position, int param_num, int parent_index) {
496
- HandleScope scope;
497
- this->SetField(kFunctionNameOffset_, name);
498
- this->SetSmiValueField(kStartPositionOffset_, start_position);
499
- this->SetSmiValueField(kEndPositionOffset_, end_position);
500
- this->SetSmiValueField(kParamNumOffset_, param_num);
501
- this->SetSmiValueField(kParentIndexOffset_, parent_index);
502
- }
503
- void SetFunctionCode(Handle<Code> function_code) {
504
- Handle<JSValue> wrapper = WrapInJSValue(*function_code);
505
- this->SetField(kCodeOffset_, wrapper);
506
- }
507
- void SetScopeInfo(Handle<Object> scope_info_array) {
508
- this->SetField(kScopeInfoOffset_, scope_info_array);
509
- }
510
- void SetSharedFunctionInfo(Handle<SharedFunctionInfo> info) {
511
- Handle<JSValue> info_holder = WrapInJSValue(*info);
512
- this->SetField(kSharedFunctionInfoOffset_, info_holder);
513
- }
514
- int GetParentIndex() {
515
- return this->GetSmiValueField(kParentIndexOffset_);
516
- }
517
- Handle<Code> GetFunctionCode() {
518
- Handle<Object> raw_result = UnwrapJSValue(Handle<JSValue>(
519
- JSValue::cast(this->GetField(kCodeOffset_))));
520
- return Handle<Code>::cast(raw_result);
521
- }
522
- int GetStartPosition() {
523
- return this->GetSmiValueField(kStartPositionOffset_);
524
- }
525
- int GetEndPosition() {
526
- return this->GetSmiValueField(kEndPositionOffset_);
527
- }
528
-
529
- private:
530
- static const int kFunctionNameOffset_ = 0;
531
- static const int kStartPositionOffset_ = 1;
532
- static const int kEndPositionOffset_ = 2;
533
- static const int kParamNumOffset_ = 3;
534
- static const int kCodeOffset_ = 4;
535
- static const int kScopeInfoOffset_ = 5;
536
- static const int kParentIndexOffset_ = 6;
537
- static const int kSharedFunctionInfoOffset_ = 7;
538
- static const int kSize_ = 8;
539
-
540
- friend class JSArrayBasedStruct<FunctionInfoWrapper>;
541
- };
542
-
543
- // Wraps SharedFunctionInfo along with some of its fields for passing it
544
- // back to JavaScript. SharedFunctionInfo object itself is additionally
545
- // wrapped into BlindReference for sanitizing reasons.
546
- class SharedInfoWrapper : public JSArrayBasedStruct<SharedInfoWrapper> {
547
- public:
548
- static bool IsInstance(Handle<JSArray> array) {
549
- return array->length() == Smi::FromInt(kSize_) &&
550
- array->GetElement(kSharedInfoOffset_)->IsJSValue();
551
- }
552
-
553
- explicit SharedInfoWrapper(Handle<JSArray> array)
554
- : JSArrayBasedStruct<SharedInfoWrapper>(array) {
555
- }
556
-
557
- void SetProperties(Handle<String> name, int start_position, int end_position,
558
- Handle<SharedFunctionInfo> info) {
559
- HandleScope scope;
560
- this->SetField(kFunctionNameOffset_, name);
561
- Handle<JSValue> info_holder = WrapInJSValue(*info);
562
- this->SetField(kSharedInfoOffset_, info_holder);
563
- this->SetSmiValueField(kStartPositionOffset_, start_position);
564
- this->SetSmiValueField(kEndPositionOffset_, end_position);
565
- }
566
- Handle<SharedFunctionInfo> GetInfo() {
567
- Object* element = this->GetField(kSharedInfoOffset_);
568
- Handle<JSValue> value_wrapper(JSValue::cast(element));
569
- Handle<Object> raw_result = UnwrapJSValue(value_wrapper);
570
- return Handle<SharedFunctionInfo>::cast(raw_result);
571
- }
572
-
573
- private:
574
- static const int kFunctionNameOffset_ = 0;
575
- static const int kStartPositionOffset_ = 1;
576
- static const int kEndPositionOffset_ = 2;
577
- static const int kSharedInfoOffset_ = 3;
578
- static const int kSize_ = 4;
579
-
580
- friend class JSArrayBasedStruct<SharedInfoWrapper>;
581
- };
582
-
583
- class FunctionInfoListener {
584
- public:
585
- FunctionInfoListener() {
586
- current_parent_index_ = -1;
587
- len_ = 0;
588
- result_ = Factory::NewJSArray(10);
589
- }
590
-
591
- void FunctionStarted(FunctionLiteral* fun) {
592
- HandleScope scope;
593
- FunctionInfoWrapper info = FunctionInfoWrapper::Create();
594
- info.SetInitialProperties(fun->name(), fun->start_position(),
595
- fun->end_position(), fun->num_parameters(),
596
- current_parent_index_);
597
- current_parent_index_ = len_;
598
- SetElement(result_, len_, info.GetJSArray());
599
- len_++;
600
- }
601
-
602
- void FunctionDone() {
603
- HandleScope scope;
604
- FunctionInfoWrapper info =
605
- FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
606
- current_parent_index_ = info.GetParentIndex();
607
- }
608
-
609
- // TODO(LiveEdit): Move private method below.
610
- // This private section was created here to avoid moving the function
611
- // to keep already complex diff simpler.
612
- private:
613
- Object* SerializeFunctionScope(Scope* scope) {
614
- HandleScope handle_scope;
615
-
616
- Handle<JSArray> scope_info_list = Factory::NewJSArray(10);
617
- int scope_info_length = 0;
618
-
619
- // Saves some description of scope. It stores name and indexes of
620
- // variables in the whole scope chain. Null-named slots delimit
621
- // scopes of this chain.
622
- Scope* outer_scope = scope->outer_scope();
623
- if (outer_scope == NULL) {
624
- return Heap::undefined_value();
625
- }
626
- do {
627
- ZoneList<Variable*> list(10);
628
- outer_scope->CollectUsedVariables(&list);
629
- int j = 0;
630
- for (int i = 0; i < list.length(); i++) {
631
- Variable* var1 = list[i];
632
- Slot* slot = var1->slot();
633
- if (slot != NULL && slot->type() == Slot::CONTEXT) {
634
- if (j != i) {
635
- list[j] = var1;
636
- }
637
- j++;
638
- }
639
- }
640
-
641
- // Sort it.
642
- for (int k = 1; k < j; k++) {
643
- int l = k;
644
- for (int m = k + 1; m < j; m++) {
645
- if (list[l]->slot()->index() > list[m]->slot()->index()) {
646
- l = m;
647
- }
648
- }
649
- list[k] = list[l];
650
- }
651
- for (int i = 0; i < j; i++) {
652
- SetElement(scope_info_list, scope_info_length, list[i]->name());
653
- scope_info_length++;
654
- SetElement(scope_info_list, scope_info_length,
655
- Handle<Smi>(Smi::FromInt(list[i]->slot()->index())));
656
- scope_info_length++;
657
- }
658
- SetElement(scope_info_list, scope_info_length,
659
- Handle<Object>(Heap::null_value()));
660
- scope_info_length++;
661
-
662
- outer_scope = outer_scope->outer_scope();
663
- } while (outer_scope != NULL);
664
-
665
- return *scope_info_list;
666
- }
667
-
668
- public:
669
- // Saves only function code, because for a script function we
670
- // may never create a SharedFunctionInfo object.
671
- void FunctionCode(Handle<Code> function_code) {
672
- FunctionInfoWrapper info =
673
- FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
674
- info.SetFunctionCode(function_code);
675
- }
676
-
677
- // Saves full information about a function: its code, its scope info
678
- // and a SharedFunctionInfo object.
679
- void FunctionInfo(Handle<SharedFunctionInfo> shared, Scope* scope) {
680
- if (!shared->IsSharedFunctionInfo()) {
681
- return;
682
- }
683
- FunctionInfoWrapper info =
684
- FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
685
- info.SetFunctionCode(Handle<Code>(shared->code()));
686
- info.SetSharedFunctionInfo(shared);
687
-
688
- Handle<Object> scope_info_list(SerializeFunctionScope(scope));
689
- info.SetScopeInfo(scope_info_list);
690
- }
691
-
692
- Handle<JSArray> GetResult() {
693
- return result_;
694
- }
695
-
696
- private:
697
- Handle<JSArray> result_;
698
- int len_;
699
- int current_parent_index_;
700
- };
701
-
702
- static FunctionInfoListener* active_function_info_listener = NULL;
703
-
704
- JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
705
- Handle<String> source) {
706
- CompilationZoneScope zone_scope(DELETE_ON_EXIT);
707
-
708
- FunctionInfoListener listener;
709
- Handle<Object> original_source = Handle<Object>(script->source());
710
- script->set_source(*source);
711
- active_function_info_listener = &listener;
712
- CompileScriptForTracker(script);
713
- active_function_info_listener = NULL;
714
- script->set_source(*original_source);
715
-
716
- return *(listener.GetResult());
717
- }
718
-
719
-
720
- void LiveEdit::WrapSharedFunctionInfos(Handle<JSArray> array) {
721
- HandleScope scope;
722
- int len = Smi::cast(array->length())->value();
723
- for (int i = 0; i < len; i++) {
724
- Handle<SharedFunctionInfo> info(
725
- SharedFunctionInfo::cast(array->GetElement(i)));
726
- SharedInfoWrapper info_wrapper = SharedInfoWrapper::Create();
727
- Handle<String> name_handle(String::cast(info->name()));
728
- info_wrapper.SetProperties(name_handle, info->start_position(),
729
- info->end_position(), info);
730
- array->SetElement(i, *(info_wrapper.GetJSArray()));
731
- }
732
- }
733
-
734
-
735
- // Visitor that collects all references to a particular code object,
736
- // including "CODE_TARGET" references in other code objects.
737
- // It works in context of ZoneScope.
738
- class ReferenceCollectorVisitor : public ObjectVisitor {
739
- public:
740
- explicit ReferenceCollectorVisitor(Code* original)
741
- : original_(original), rvalues_(10), reloc_infos_(10) {
742
- }
743
-
744
- virtual void VisitPointers(Object** start, Object** end) {
745
- for (Object** p = start; p < end; p++) {
746
- if (*p == original_) {
747
- rvalues_.Add(p);
748
- }
749
- }
750
- }
751
-
752
- void VisitCodeTarget(RelocInfo* rinfo) {
753
- if (RelocInfo::IsCodeTarget(rinfo->rmode()) &&
754
- Code::GetCodeFromTargetAddress(rinfo->target_address()) == original_) {
755
- reloc_infos_.Add(*rinfo);
756
- }
757
- }
758
-
759
- virtual void VisitDebugTarget(RelocInfo* rinfo) {
760
- VisitCodeTarget(rinfo);
761
- }
762
-
763
- // Post-visiting method that iterates over all collected references and
764
- // modifies them.
765
- void Replace(Code* substitution) {
766
- for (int i = 0; i < rvalues_.length(); i++) {
767
- *(rvalues_[i]) = substitution;
768
- }
769
- for (int i = 0; i < reloc_infos_.length(); i++) {
770
- reloc_infos_[i].set_target_address(substitution->instruction_start());
771
- }
772
- }
773
-
774
- private:
775
- Code* original_;
776
- ZoneList<Object**> rvalues_;
777
- ZoneList<RelocInfo> reloc_infos_;
778
- };
779
-
780
-
781
- class FrameCookingThreadVisitor : public ThreadVisitor {
782
- public:
783
- void VisitThread(ThreadLocalTop* top) {
784
- StackFrame::CookFramesForThread(top);
785
- }
786
- };
787
-
788
- class FrameUncookingThreadVisitor : public ThreadVisitor {
789
- public:
790
- void VisitThread(ThreadLocalTop* top) {
791
- StackFrame::UncookFramesForThread(top);
792
- }
793
- };
794
-
795
- static void IterateAllThreads(ThreadVisitor* visitor) {
796
- Top::IterateThread(visitor);
797
- ThreadManager::IterateArchivedThreads(visitor);
798
- }
799
-
800
- // Finds all references to original and replaces them with substitution.
801
- static void ReplaceCodeObject(Code* original, Code* substitution) {
802
- ASSERT(!Heap::InNewSpace(substitution));
803
-
804
- AssertNoAllocation no_allocations_please;
805
-
806
- // A zone scope for ReferenceCollectorVisitor.
807
- ZoneScope scope(DELETE_ON_EXIT);
808
-
809
- ReferenceCollectorVisitor visitor(original);
810
-
811
- // Iterate over all roots. Stack frames may have pointer into original code,
812
- // so temporary replace the pointers with offset numbers
813
- // in prologue/epilogue.
814
- {
815
- FrameCookingThreadVisitor cooking_visitor;
816
- IterateAllThreads(&cooking_visitor);
817
-
818
- Heap::IterateStrongRoots(&visitor, VISIT_ALL);
819
-
820
- FrameUncookingThreadVisitor uncooking_visitor;
821
- IterateAllThreads(&uncooking_visitor);
822
- }
823
-
824
- // Now iterate over all pointers of all objects, including code_target
825
- // implicit pointers.
826
- HeapIterator iterator;
827
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
828
- obj->Iterate(&visitor);
829
- }
830
-
831
- visitor.Replace(substitution);
832
- }
833
-
834
-
835
- // Check whether the code is natural function code (not a lazy-compile stub
836
- // code).
837
- static bool IsJSFunctionCode(Code* code) {
838
- return code->kind() == Code::FUNCTION;
839
- }
840
-
841
-
842
- Object* LiveEdit::ReplaceFunctionCode(Handle<JSArray> new_compile_info_array,
843
- Handle<JSArray> shared_info_array) {
844
- HandleScope scope;
845
-
846
- if (!SharedInfoWrapper::IsInstance(shared_info_array)) {
847
- return Top::ThrowIllegalOperation();
848
- }
849
-
850
- FunctionInfoWrapper compile_info_wrapper(new_compile_info_array);
851
- SharedInfoWrapper shared_info_wrapper(shared_info_array);
852
-
853
- Handle<SharedFunctionInfo> shared_info = shared_info_wrapper.GetInfo();
854
-
855
- if (IsJSFunctionCode(shared_info->code())) {
856
- ReplaceCodeObject(shared_info->code(),
857
- *(compile_info_wrapper.GetFunctionCode()));
858
- }
859
-
860
- if (shared_info->debug_info()->IsDebugInfo()) {
861
- Handle<DebugInfo> debug_info(DebugInfo::cast(shared_info->debug_info()));
862
- Handle<Code> new_original_code =
863
- Factory::CopyCode(compile_info_wrapper.GetFunctionCode());
864
- debug_info->set_original_code(*new_original_code);
865
- }
866
-
867
- shared_info->set_start_position(compile_info_wrapper.GetStartPosition());
868
- shared_info->set_end_position(compile_info_wrapper.GetEndPosition());
869
-
870
- shared_info->set_construct_stub(
871
- Builtins::builtin(Builtins::JSConstructStubGeneric));
872
-
873
- return Heap::undefined_value();
874
- }
875
-
876
-
877
- // TODO(635): Eval caches its scripts (same text -- same compiled info).
878
- // Make sure we clear such caches.
879
- void LiveEdit::SetFunctionScript(Handle<JSValue> function_wrapper,
880
- Handle<Object> script_handle) {
881
- Handle<SharedFunctionInfo> shared_info =
882
- Handle<SharedFunctionInfo>::cast(UnwrapJSValue(function_wrapper));
883
- shared_info->set_script(*script_handle);
884
- }
885
-
886
-
887
- // For a script text change (defined as position_change_array), translates
888
- // position in unchanged text to position in changed text.
889
- // Text change is a set of non-overlapping regions in text, that have changed
890
- // their contents and length. It is specified as array of groups of 3 numbers:
891
- // (change_begin, change_end, change_end_new_position).
892
- // Each group describes a change in text; groups are sorted by change_begin.
893
- // Only position in text beyond any changes may be successfully translated.
894
- // If a positions is inside some region that changed, result is currently
895
- // undefined.
896
- static int TranslatePosition(int original_position,
897
- Handle<JSArray> position_change_array) {
898
- int position_diff = 0;
899
- int array_len = Smi::cast(position_change_array->length())->value();
900
- // TODO(635): binary search may be used here
901
- for (int i = 0; i < array_len; i += 3) {
902
- int chunk_start =
903
- Smi::cast(position_change_array->GetElement(i))->value();
904
- if (original_position < chunk_start) {
905
- break;
906
- }
907
- int chunk_end =
908
- Smi::cast(position_change_array->GetElement(i + 1))->value();
909
- // Position mustn't be inside a chunk.
910
- ASSERT(original_position >= chunk_end);
911
- int chunk_changed_end =
912
- Smi::cast(position_change_array->GetElement(i + 2))->value();
913
- position_diff = chunk_changed_end - chunk_end;
914
- }
915
-
916
- return original_position + position_diff;
917
- }
918
-
919
-
920
- // Auto-growing buffer for writing relocation info code section. This buffer
921
- // is a simplified version of buffer from Assembler. Unlike Assembler, this
922
- // class is platform-independent and it works without dealing with instructions.
923
- // As specified by RelocInfo format, the buffer is filled in reversed order:
924
- // from upper to lower addresses.
925
- // It uses NewArray/DeleteArray for memory management.
926
- class RelocInfoBuffer {
927
- public:
928
- RelocInfoBuffer(int buffer_initial_capicity, byte* pc) {
929
- buffer_size_ = buffer_initial_capicity + kBufferGap;
930
- buffer_ = NewArray<byte>(buffer_size_);
931
-
932
- reloc_info_writer_.Reposition(buffer_ + buffer_size_, pc);
933
- }
934
- ~RelocInfoBuffer() {
935
- DeleteArray(buffer_);
936
- }
937
-
938
- // As specified by RelocInfo format, the buffer is filled in reversed order:
939
- // from upper to lower addresses.
940
- void Write(const RelocInfo* rinfo) {
941
- if (buffer_ + kBufferGap >= reloc_info_writer_.pos()) {
942
- Grow();
943
- }
944
- reloc_info_writer_.Write(rinfo);
945
- }
946
-
947
- Vector<byte> GetResult() {
948
- // Return the bytes from pos up to end of buffer.
949
- int result_size =
950
- static_cast<int>((buffer_ + buffer_size_) - reloc_info_writer_.pos());
951
- return Vector<byte>(reloc_info_writer_.pos(), result_size);
952
- }
953
-
954
- private:
955
- void Grow() {
956
- // Compute new buffer size.
957
- int new_buffer_size;
958
- if (buffer_size_ < 2 * KB) {
959
- new_buffer_size = 4 * KB;
960
- } else {
961
- new_buffer_size = 2 * buffer_size_;
962
- }
963
- // Some internal data structures overflow for very large buffers,
964
- // they must ensure that kMaximalBufferSize is not too large.
965
- if (new_buffer_size > kMaximalBufferSize) {
966
- V8::FatalProcessOutOfMemory("RelocInfoBuffer::GrowBuffer");
967
- }
968
-
969
- // Setup new buffer.
970
- byte* new_buffer = NewArray<byte>(new_buffer_size);
971
-
972
- // Copy the data.
973
- int curently_used_size =
974
- static_cast<int>(buffer_ + buffer_size_ - reloc_info_writer_.pos());
975
- memmove(new_buffer + new_buffer_size - curently_used_size,
976
- reloc_info_writer_.pos(), curently_used_size);
977
-
978
- reloc_info_writer_.Reposition(
979
- new_buffer + new_buffer_size - curently_used_size,
980
- reloc_info_writer_.last_pc());
981
-
982
- DeleteArray(buffer_);
983
- buffer_ = new_buffer;
984
- buffer_size_ = new_buffer_size;
985
- }
986
-
987
- RelocInfoWriter reloc_info_writer_;
988
- byte* buffer_;
989
- int buffer_size_;
990
-
991
- static const int kBufferGap = RelocInfoWriter::kMaxSize;
992
- static const int kMaximalBufferSize = 512*MB;
993
- };
994
-
995
- // Patch positions in code (changes relocation info section) and possibly
996
- // returns new instance of code.
997
- static Handle<Code> PatchPositionsInCode(Handle<Code> code,
998
- Handle<JSArray> position_change_array) {
999
-
1000
- RelocInfoBuffer buffer_writer(code->relocation_size(),
1001
- code->instruction_start());
1002
-
1003
- {
1004
- AssertNoAllocation no_allocations_please;
1005
- for (RelocIterator it(*code); !it.done(); it.next()) {
1006
- RelocInfo* rinfo = it.rinfo();
1007
- if (RelocInfo::IsPosition(rinfo->rmode())) {
1008
- int position = static_cast<int>(rinfo->data());
1009
- int new_position = TranslatePosition(position,
1010
- position_change_array);
1011
- if (position != new_position) {
1012
- RelocInfo info_copy(rinfo->pc(), rinfo->rmode(), new_position);
1013
- buffer_writer.Write(&info_copy);
1014
- continue;
1015
- }
1016
- }
1017
- buffer_writer.Write(it.rinfo());
1018
- }
1019
- }
1020
-
1021
- Vector<byte> buffer = buffer_writer.GetResult();
1022
-
1023
- if (buffer.length() == code->relocation_size()) {
1024
- // Simply patch relocation area of code.
1025
- memcpy(code->relocation_start(), buffer.start(), buffer.length());
1026
- return code;
1027
- } else {
1028
- // Relocation info section now has different size. We cannot simply
1029
- // rewrite it inside code object. Instead we have to create a new
1030
- // code object.
1031
- Handle<Code> result(Factory::CopyCode(code, buffer));
1032
- return result;
1033
- }
1034
- }
1035
-
1036
-
1037
- Object* LiveEdit::PatchFunctionPositions(
1038
- Handle<JSArray> shared_info_array, Handle<JSArray> position_change_array) {
1039
-
1040
- if (!SharedInfoWrapper::IsInstance(shared_info_array)) {
1041
- return Top::ThrowIllegalOperation();
1042
- }
1043
-
1044
- SharedInfoWrapper shared_info_wrapper(shared_info_array);
1045
- Handle<SharedFunctionInfo> info = shared_info_wrapper.GetInfo();
1046
-
1047
- int old_function_start = info->start_position();
1048
- int new_function_start = TranslatePosition(old_function_start,
1049
- position_change_array);
1050
- info->set_start_position(new_function_start);
1051
- info->set_end_position(TranslatePosition(info->end_position(),
1052
- position_change_array));
1053
-
1054
- info->set_function_token_position(
1055
- TranslatePosition(info->function_token_position(),
1056
- position_change_array));
1057
-
1058
- if (IsJSFunctionCode(info->code())) {
1059
- // Patch relocation info section of the code.
1060
- Handle<Code> patched_code = PatchPositionsInCode(Handle<Code>(info->code()),
1061
- position_change_array);
1062
- if (*patched_code != info->code()) {
1063
- // Replace all references to the code across the heap. In particular,
1064
- // some stubs may refer to this code and this code may be being executed
1065
- // on stack (it is safe to substitute the code object on stack, because
1066
- // we only change the structure of rinfo and leave instructions
1067
- // untouched).
1068
- ReplaceCodeObject(info->code(), *patched_code);
1069
- }
1070
- }
1071
-
1072
- return Heap::undefined_value();
1073
- }
1074
-
1075
-
1076
- static Handle<Script> CreateScriptCopy(Handle<Script> original) {
1077
- Handle<String> original_source(String::cast(original->source()));
1078
-
1079
- Handle<Script> copy = Factory::NewScript(original_source);
1080
-
1081
- copy->set_name(original->name());
1082
- copy->set_line_offset(original->line_offset());
1083
- copy->set_column_offset(original->column_offset());
1084
- copy->set_data(original->data());
1085
- copy->set_type(original->type());
1086
- copy->set_context_data(original->context_data());
1087
- copy->set_compilation_type(original->compilation_type());
1088
- copy->set_eval_from_shared(original->eval_from_shared());
1089
- copy->set_eval_from_instructions_offset(
1090
- original->eval_from_instructions_offset());
1091
-
1092
- return copy;
1093
- }
1094
-
1095
-
1096
- Object* LiveEdit::ChangeScriptSource(Handle<Script> original_script,
1097
- Handle<String> new_source,
1098
- Handle<Object> old_script_name) {
1099
- Handle<Object> old_script_object;
1100
- if (old_script_name->IsString()) {
1101
- Handle<Script> old_script = CreateScriptCopy(original_script);
1102
- old_script->set_name(String::cast(*old_script_name));
1103
- old_script_object = old_script;
1104
- Debugger::OnAfterCompile(old_script, Debugger::SEND_WHEN_DEBUGGING);
1105
- } else {
1106
- old_script_object = Handle<Object>(Heap::null_value());
1107
- }
1108
-
1109
- original_script->set_source(*new_source);
1110
-
1111
- // Drop line ends so that they will be recalculated.
1112
- original_script->set_line_ends(Heap::undefined_value());
1113
-
1114
- return *old_script_object;
1115
- }
1116
-
1117
-
1118
-
1119
- void LiveEdit::ReplaceRefToNestedFunction(
1120
- Handle<JSValue> parent_function_wrapper,
1121
- Handle<JSValue> orig_function_wrapper,
1122
- Handle<JSValue> subst_function_wrapper) {
1123
-
1124
- Handle<SharedFunctionInfo> parent_shared =
1125
- Handle<SharedFunctionInfo>::cast(UnwrapJSValue(parent_function_wrapper));
1126
- Handle<SharedFunctionInfo> orig_shared =
1127
- Handle<SharedFunctionInfo>::cast(UnwrapJSValue(orig_function_wrapper));
1128
- Handle<SharedFunctionInfo> subst_shared =
1129
- Handle<SharedFunctionInfo>::cast(UnwrapJSValue(subst_function_wrapper));
1130
-
1131
- for (RelocIterator it(parent_shared->code()); !it.done(); it.next()) {
1132
- if (it.rinfo()->rmode() == RelocInfo::EMBEDDED_OBJECT) {
1133
- if (it.rinfo()->target_object() == *orig_shared) {
1134
- it.rinfo()->set_target_object(*subst_shared);
1135
- }
1136
- }
1137
- }
1138
- }
1139
-
1140
-
1141
- // Check an activation against list of functions. If there is a function
1142
- // that matches, its status in result array is changed to status argument value.
1143
- static bool CheckActivation(Handle<JSArray> shared_info_array,
1144
- Handle<JSArray> result, StackFrame* frame,
1145
- LiveEdit::FunctionPatchabilityStatus status) {
1146
- if (!frame->is_java_script()) {
1147
- return false;
1148
- }
1149
- int len = Smi::cast(shared_info_array->length())->value();
1150
- for (int i = 0; i < len; i++) {
1151
- JSValue* wrapper = JSValue::cast(shared_info_array->GetElement(i));
1152
- Handle<SharedFunctionInfo> shared(
1153
- SharedFunctionInfo::cast(wrapper->value()));
1154
-
1155
- if (frame->code() == shared->code()) {
1156
- SetElement(result, i, Handle<Smi>(Smi::FromInt(status)));
1157
- return true;
1158
- }
1159
- }
1160
- return false;
1161
- }
1162
-
1163
-
1164
- // Iterates over handler chain and removes all elements that are inside
1165
- // frames being dropped.
1166
- static bool FixTryCatchHandler(StackFrame* top_frame,
1167
- StackFrame* bottom_frame) {
1168
- Address* pointer_address =
1169
- &Memory::Address_at(Top::get_address_from_id(Top::k_handler_address));
1170
-
1171
- while (*pointer_address < top_frame->sp()) {
1172
- pointer_address = &Memory::Address_at(*pointer_address);
1173
- }
1174
- Address* above_frame_address = pointer_address;
1175
- while (*pointer_address < bottom_frame->fp()) {
1176
- pointer_address = &Memory::Address_at(*pointer_address);
1177
- }
1178
- bool change = *above_frame_address != *pointer_address;
1179
- *above_frame_address = *pointer_address;
1180
- return change;
1181
- }
1182
-
1183
-
1184
- // Removes specified range of frames from stack. There may be 1 or more
1185
- // frames in range. Anyway the bottom frame is restarted rather than dropped,
1186
- // and therefore has to be a JavaScript frame.
1187
- // Returns error message or NULL.
1188
- static const char* DropFrames(Vector<StackFrame*> frames,
1189
- int top_frame_index,
1190
- int bottom_js_frame_index,
1191
- Debug::FrameDropMode* mode) {
1192
- if (Debug::kFrameDropperFrameSize < 0) {
1193
- return "Stack manipulations are not supported in this architecture.";
1194
- }
1195
-
1196
- StackFrame* pre_top_frame = frames[top_frame_index - 1];
1197
- StackFrame* top_frame = frames[top_frame_index];
1198
- StackFrame* bottom_js_frame = frames[bottom_js_frame_index];
1199
-
1200
- ASSERT(bottom_js_frame->is_java_script());
1201
-
1202
- // Check the nature of the top frame.
1203
- if (pre_top_frame->code()->is_inline_cache_stub() &&
1204
- pre_top_frame->code()->ic_state() == DEBUG_BREAK) {
1205
- // OK, we can drop inline cache calls.
1206
- *mode = Debug::FRAME_DROPPED_IN_IC_CALL;
1207
- } else if (pre_top_frame->code() == Debug::debug_break_slot()) {
1208
- // OK, we can drop debug break slot.
1209
- *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL;
1210
- } else if (pre_top_frame->code() ==
1211
- Builtins::builtin(Builtins::FrameDropper_LiveEdit)) {
1212
- // OK, we can drop our own code.
1213
- *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL;
1214
- } else if (pre_top_frame->code()->kind() == Code::STUB &&
1215
- pre_top_frame->code()->major_key()) {
1216
- // Entry from our unit tests, it's fine, we support this case.
1217
- *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL;
1218
- } else {
1219
- return "Unknown structure of stack above changing function";
1220
- }
1221
-
1222
- Address unused_stack_top = top_frame->sp();
1223
- Address unused_stack_bottom = bottom_js_frame->fp()
1224
- - Debug::kFrameDropperFrameSize * kPointerSize // Size of the new frame.
1225
- + kPointerSize; // Bigger address end is exclusive.
1226
-
1227
- if (unused_stack_top > unused_stack_bottom) {
1228
- return "Not enough space for frame dropper frame";
1229
- }
1230
-
1231
- // Committing now. After this point we should return only NULL value.
1232
-
1233
- FixTryCatchHandler(pre_top_frame, bottom_js_frame);
1234
- // Make sure FixTryCatchHandler is idempotent.
1235
- ASSERT(!FixTryCatchHandler(pre_top_frame, bottom_js_frame));
1236
-
1237
- Handle<Code> code(Builtins::builtin(Builtins::FrameDropper_LiveEdit));
1238
- top_frame->set_pc(code->entry());
1239
- pre_top_frame->SetCallerFp(bottom_js_frame->fp());
1240
-
1241
- Debug::SetUpFrameDropperFrame(bottom_js_frame, code);
1242
-
1243
- for (Address a = unused_stack_top;
1244
- a < unused_stack_bottom;
1245
- a += kPointerSize) {
1246
- Memory::Object_at(a) = Smi::FromInt(0);
1247
- }
1248
-
1249
- return NULL;
1250
- }
1251
-
1252
-
1253
- static bool IsDropableFrame(StackFrame* frame) {
1254
- return !frame->is_exit();
1255
- }
1256
-
1257
- // Fills result array with statuses of functions. Modifies the stack
1258
- // removing all listed function if possible and if do_drop is true.
1259
- static const char* DropActivationsInActiveThread(
1260
- Handle<JSArray> shared_info_array, Handle<JSArray> result, bool do_drop) {
1261
-
1262
- ZoneScope scope(DELETE_ON_EXIT);
1263
- Vector<StackFrame*> frames = CreateStackMap();
1264
-
1265
- int array_len = Smi::cast(shared_info_array->length())->value();
1266
-
1267
- int top_frame_index = -1;
1268
- int frame_index = 0;
1269
- for (; frame_index < frames.length(); frame_index++) {
1270
- StackFrame* frame = frames[frame_index];
1271
- if (frame->id() == Debug::break_frame_id()) {
1272
- top_frame_index = frame_index;
1273
- break;
1274
- }
1275
- if (CheckActivation(shared_info_array, result, frame,
1276
- LiveEdit::FUNCTION_BLOCKED_UNDER_NATIVE_CODE)) {
1277
- // We are still above break_frame. It is not a target frame,
1278
- // it is a problem.
1279
- return "Debugger mark-up on stack is not found";
1280
- }
1281
- }
1282
-
1283
- if (top_frame_index == -1) {
1284
- // We haven't found break frame, but no function is blocking us anyway.
1285
- return NULL;
1286
- }
1287
-
1288
- bool target_frame_found = false;
1289
- int bottom_js_frame_index = top_frame_index;
1290
- bool c_code_found = false;
1291
-
1292
- for (; frame_index < frames.length(); frame_index++) {
1293
- StackFrame* frame = frames[frame_index];
1294
- if (!IsDropableFrame(frame)) {
1295
- c_code_found = true;
1296
- break;
1297
- }
1298
- if (CheckActivation(shared_info_array, result, frame,
1299
- LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK)) {
1300
- target_frame_found = true;
1301
- bottom_js_frame_index = frame_index;
1302
- }
1303
- }
1304
-
1305
- if (c_code_found) {
1306
- // There is a C frames on stack. Check that there are no target frames
1307
- // below them.
1308
- for (; frame_index < frames.length(); frame_index++) {
1309
- StackFrame* frame = frames[frame_index];
1310
- if (frame->is_java_script()) {
1311
- if (CheckActivation(shared_info_array, result, frame,
1312
- LiveEdit::FUNCTION_BLOCKED_UNDER_NATIVE_CODE)) {
1313
- // Cannot drop frame under C frames.
1314
- return NULL;
1315
- }
1316
- }
1317
- }
1318
- }
1319
-
1320
- if (!do_drop) {
1321
- // We are in check-only mode.
1322
- return NULL;
1323
- }
1324
-
1325
- if (!target_frame_found) {
1326
- // Nothing to drop.
1327
- return NULL;
1328
- }
1329
-
1330
- Debug::FrameDropMode drop_mode = Debug::FRAMES_UNTOUCHED;
1331
- const char* error_message = DropFrames(frames, top_frame_index,
1332
- bottom_js_frame_index, &drop_mode);
1333
-
1334
- if (error_message != NULL) {
1335
- return error_message;
1336
- }
1337
-
1338
- // Adjust break_frame after some frames has been dropped.
1339
- StackFrame::Id new_id = StackFrame::NO_ID;
1340
- for (int i = bottom_js_frame_index + 1; i < frames.length(); i++) {
1341
- if (frames[i]->type() == StackFrame::JAVA_SCRIPT) {
1342
- new_id = frames[i]->id();
1343
- break;
1344
- }
1345
- }
1346
- Debug::FramesHaveBeenDropped(new_id, drop_mode);
1347
-
1348
- // Replace "blocked on active" with "replaced on active" status.
1349
- for (int i = 0; i < array_len; i++) {
1350
- if (result->GetElement(i) ==
1351
- Smi::FromInt(LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK)) {
1352
- result->SetElement(i, Smi::FromInt(
1353
- LiveEdit::FUNCTION_REPLACED_ON_ACTIVE_STACK));
1354
- }
1355
- }
1356
- return NULL;
1357
- }
1358
-
1359
-
1360
- class InactiveThreadActivationsChecker : public ThreadVisitor {
1361
- public:
1362
- InactiveThreadActivationsChecker(Handle<JSArray> shared_info_array,
1363
- Handle<JSArray> result)
1364
- : shared_info_array_(shared_info_array), result_(result),
1365
- has_blocked_functions_(false) {
1366
- }
1367
- void VisitThread(ThreadLocalTop* top) {
1368
- for (StackFrameIterator it(top); !it.done(); it.Advance()) {
1369
- has_blocked_functions_ |= CheckActivation(
1370
- shared_info_array_, result_, it.frame(),
1371
- LiveEdit::FUNCTION_BLOCKED_ON_OTHER_STACK);
1372
- }
1373
- }
1374
- bool HasBlockedFunctions() {
1375
- return has_blocked_functions_;
1376
- }
1377
-
1378
- private:
1379
- Handle<JSArray> shared_info_array_;
1380
- Handle<JSArray> result_;
1381
- bool has_blocked_functions_;
1382
- };
1383
-
1384
-
1385
- Handle<JSArray> LiveEdit::CheckAndDropActivations(
1386
- Handle<JSArray> shared_info_array, bool do_drop) {
1387
- int len = Smi::cast(shared_info_array->length())->value();
1388
-
1389
- Handle<JSArray> result = Factory::NewJSArray(len);
1390
-
1391
- // Fill the default values.
1392
- for (int i = 0; i < len; i++) {
1393
- SetElement(result, i,
1394
- Handle<Smi>(Smi::FromInt(FUNCTION_AVAILABLE_FOR_PATCH)));
1395
- }
1396
-
1397
-
1398
- // First check inactive threads. Fail if some functions are blocked there.
1399
- InactiveThreadActivationsChecker inactive_threads_checker(shared_info_array,
1400
- result);
1401
- ThreadManager::IterateArchivedThreads(&inactive_threads_checker);
1402
- if (inactive_threads_checker.HasBlockedFunctions()) {
1403
- return result;
1404
- }
1405
-
1406
- // Try to drop activations from the current stack.
1407
- const char* error_message =
1408
- DropActivationsInActiveThread(shared_info_array, result, do_drop);
1409
- if (error_message != NULL) {
1410
- // Add error message as an array extra element.
1411
- Vector<const char> vector_message(error_message, StrLength(error_message));
1412
- Handle<String> str = Factory::NewStringFromAscii(vector_message);
1413
- SetElement(result, len, str);
1414
- }
1415
- return result;
1416
- }
1417
-
1418
-
1419
- LiveEditFunctionTracker::LiveEditFunctionTracker(FunctionLiteral* fun) {
1420
- if (active_function_info_listener != NULL) {
1421
- active_function_info_listener->FunctionStarted(fun);
1422
- }
1423
- }
1424
-
1425
-
1426
- LiveEditFunctionTracker::~LiveEditFunctionTracker() {
1427
- if (active_function_info_listener != NULL) {
1428
- active_function_info_listener->FunctionDone();
1429
- }
1430
- }
1431
-
1432
-
1433
- void LiveEditFunctionTracker::RecordFunctionInfo(
1434
- Handle<SharedFunctionInfo> info, FunctionLiteral* lit) {
1435
- if (active_function_info_listener != NULL) {
1436
- active_function_info_listener->FunctionInfo(info, lit->scope());
1437
- }
1438
- }
1439
-
1440
-
1441
- void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) {
1442
- active_function_info_listener->FunctionCode(code);
1443
- }
1444
-
1445
-
1446
- bool LiveEditFunctionTracker::IsActive() {
1447
- return active_function_info_listener != NULL;
1448
- }
1449
-
1450
-
1451
- #else // ENABLE_DEBUGGER_SUPPORT
1452
-
1453
- // This ifdef-else-endif section provides working or stub implementation of
1454
- // LiveEditFunctionTracker.
1455
- LiveEditFunctionTracker::LiveEditFunctionTracker(FunctionLiteral* fun) {
1456
- }
1457
-
1458
-
1459
- LiveEditFunctionTracker::~LiveEditFunctionTracker() {
1460
- }
1461
-
1462
-
1463
- void LiveEditFunctionTracker::RecordFunctionInfo(
1464
- Handle<SharedFunctionInfo> info, FunctionLiteral* lit) {
1465
- }
1466
-
1467
-
1468
- void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) {
1469
- }
1470
-
1471
-
1472
- bool LiveEditFunctionTracker::IsActive() {
1473
- return false;
1474
- }
1475
-
1476
- #endif // ENABLE_DEBUGGER_SUPPORT
1477
-
1478
-
1479
-
1480
- } } // namespace v8::internal