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
@@ -0,0 +1,1185 @@
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
+ #include "v8.h"
29
+
30
+ #include "codegen.h"
31
+ #include "deoptimizer.h"
32
+ #include "disasm.h"
33
+ #include "full-codegen.h"
34
+ #include "global-handles.h"
35
+ #include "macro-assembler.h"
36
+ #include "prettyprinter.h"
37
+
38
+
39
+ namespace v8 {
40
+ namespace internal {
41
+
42
+ LargeObjectChunk* Deoptimizer::eager_deoptimization_entry_code_ = NULL;
43
+ LargeObjectChunk* Deoptimizer::lazy_deoptimization_entry_code_ = NULL;
44
+ Deoptimizer* Deoptimizer::current_ = NULL;
45
+ DeoptimizingCodeListNode* Deoptimizer::deoptimizing_code_list_ = NULL;
46
+
47
+
48
+ Deoptimizer* Deoptimizer::New(JSFunction* function,
49
+ BailoutType type,
50
+ unsigned bailout_id,
51
+ Address from,
52
+ int fp_to_sp_delta) {
53
+ Deoptimizer* deoptimizer =
54
+ new Deoptimizer(function, type, bailout_id, from, fp_to_sp_delta);
55
+ ASSERT(current_ == NULL);
56
+ current_ = deoptimizer;
57
+ return deoptimizer;
58
+ }
59
+
60
+
61
+ Deoptimizer* Deoptimizer::Grab() {
62
+ Deoptimizer* result = current_;
63
+ ASSERT(result != NULL);
64
+ result->DeleteFrameDescriptions();
65
+ current_ = NULL;
66
+ return result;
67
+ }
68
+
69
+
70
+ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
71
+ int count,
72
+ BailoutType type) {
73
+ TableEntryGenerator generator(masm, type, count);
74
+ generator.Generate();
75
+ }
76
+
77
+
78
+ class DeoptimizingVisitor : public OptimizedFunctionVisitor {
79
+ public:
80
+ virtual void EnterContext(Context* context) {
81
+ if (FLAG_trace_deopt) {
82
+ PrintF("[deoptimize context: %" V8PRIxPTR "]\n",
83
+ reinterpret_cast<intptr_t>(context));
84
+ }
85
+ }
86
+
87
+ virtual void VisitFunction(JSFunction* function) {
88
+ Deoptimizer::DeoptimizeFunction(function);
89
+ }
90
+
91
+ virtual void LeaveContext(Context* context) {
92
+ context->ClearOptimizedFunctions();
93
+ }
94
+ };
95
+
96
+
97
+ void Deoptimizer::DeoptimizeAll() {
98
+ AssertNoAllocation no_allocation;
99
+
100
+ if (FLAG_trace_deopt) {
101
+ PrintF("[deoptimize all contexts]\n");
102
+ }
103
+
104
+ DeoptimizingVisitor visitor;
105
+ VisitAllOptimizedFunctions(&visitor);
106
+ }
107
+
108
+
109
+ void Deoptimizer::DeoptimizeGlobalObject(JSObject* object) {
110
+ AssertNoAllocation no_allocation;
111
+
112
+ DeoptimizingVisitor visitor;
113
+ VisitAllOptimizedFunctionsForGlobalObject(object, &visitor);
114
+ }
115
+
116
+
117
+ void Deoptimizer::VisitAllOptimizedFunctionsForContext(
118
+ Context* context, OptimizedFunctionVisitor* visitor) {
119
+ AssertNoAllocation no_allocation;
120
+
121
+ ASSERT(context->IsGlobalContext());
122
+
123
+ visitor->EnterContext(context);
124
+ // Run through the list of optimized functions and deoptimize them.
125
+ Object* element = context->OptimizedFunctionsListHead();
126
+ while (!element->IsUndefined()) {
127
+ JSFunction* element_function = JSFunction::cast(element);
128
+ // Get the next link before deoptimizing as deoptimizing will clear the
129
+ // next link.
130
+ element = element_function->next_function_link();
131
+ visitor->VisitFunction(element_function);
132
+ }
133
+ visitor->LeaveContext(context);
134
+ }
135
+
136
+
137
+ void Deoptimizer::VisitAllOptimizedFunctionsForGlobalObject(
138
+ JSObject* object, OptimizedFunctionVisitor* visitor) {
139
+ AssertNoAllocation no_allocation;
140
+
141
+ if (object->IsJSGlobalProxy()) {
142
+ Object* proto = object->GetPrototype();
143
+ ASSERT(proto->IsJSGlobalObject());
144
+ VisitAllOptimizedFunctionsForContext(
145
+ GlobalObject::cast(proto)->global_context(), visitor);
146
+ } else if (object->IsGlobalObject()) {
147
+ VisitAllOptimizedFunctionsForContext(
148
+ GlobalObject::cast(object)->global_context(), visitor);
149
+ }
150
+ }
151
+
152
+
153
+ void Deoptimizer::VisitAllOptimizedFunctions(
154
+ OptimizedFunctionVisitor* visitor) {
155
+ AssertNoAllocation no_allocation;
156
+
157
+ // Run through the list of all global contexts and deoptimize.
158
+ Object* global = Heap::global_contexts_list();
159
+ while (!global->IsUndefined()) {
160
+ VisitAllOptimizedFunctionsForGlobalObject(Context::cast(global)->global(),
161
+ visitor);
162
+ global = Context::cast(global)->get(Context::NEXT_CONTEXT_LINK);
163
+ }
164
+ }
165
+
166
+
167
+ void Deoptimizer::HandleWeakDeoptimizedCode(
168
+ v8::Persistent<v8::Value> obj, void* data) {
169
+ DeoptimizingCodeListNode* node =
170
+ reinterpret_cast<DeoptimizingCodeListNode*>(data);
171
+ RemoveDeoptimizingCode(*node->code());
172
+ #ifdef DEBUG
173
+ node = Deoptimizer::deoptimizing_code_list_;
174
+ while (node != NULL) {
175
+ ASSERT(node != reinterpret_cast<DeoptimizingCodeListNode*>(data));
176
+ node = node->next();
177
+ }
178
+ #endif
179
+ }
180
+
181
+
182
+ void Deoptimizer::ComputeOutputFrames(Deoptimizer* deoptimizer) {
183
+ deoptimizer->DoComputeOutputFrames();
184
+ }
185
+
186
+
187
+ Deoptimizer::Deoptimizer(JSFunction* function,
188
+ BailoutType type,
189
+ unsigned bailout_id,
190
+ Address from,
191
+ int fp_to_sp_delta)
192
+ : function_(function),
193
+ bailout_id_(bailout_id),
194
+ bailout_type_(type),
195
+ from_(from),
196
+ fp_to_sp_delta_(fp_to_sp_delta),
197
+ output_count_(0),
198
+ output_(NULL),
199
+ integer32_values_(NULL),
200
+ double_values_(NULL) {
201
+ if (FLAG_trace_deopt && type != OSR) {
202
+ PrintF("**** DEOPT: ");
203
+ function->PrintName();
204
+ PrintF(" at bailout #%u, address 0x%" V8PRIxPTR ", frame size %d\n",
205
+ bailout_id,
206
+ reinterpret_cast<intptr_t>(from),
207
+ fp_to_sp_delta - (2 * kPointerSize));
208
+ } else if (FLAG_trace_osr && type == OSR) {
209
+ PrintF("**** OSR: ");
210
+ function->PrintName();
211
+ PrintF(" at ast id #%u, address 0x%" V8PRIxPTR ", frame size %d\n",
212
+ bailout_id,
213
+ reinterpret_cast<intptr_t>(from),
214
+ fp_to_sp_delta - (2 * kPointerSize));
215
+ }
216
+ // Find the optimized code.
217
+ if (type == EAGER) {
218
+ ASSERT(from == NULL);
219
+ optimized_code_ = function_->code();
220
+ } else if (type == LAZY) {
221
+ optimized_code_ = FindDeoptimizingCodeFromAddress(from);
222
+ ASSERT(optimized_code_ != NULL);
223
+ } else if (type == OSR) {
224
+ // The function has already been optimized and we're transitioning
225
+ // from the unoptimized shared version to the optimized one in the
226
+ // function. The return address (from) points to unoptimized code.
227
+ optimized_code_ = function_->code();
228
+ ASSERT(optimized_code_->kind() == Code::OPTIMIZED_FUNCTION);
229
+ ASSERT(!optimized_code_->contains(from));
230
+ }
231
+ ASSERT(Heap::allow_allocation(false));
232
+ unsigned size = ComputeInputFrameSize();
233
+ input_ = new(size) FrameDescription(size, function);
234
+ }
235
+
236
+
237
+ Deoptimizer::~Deoptimizer() {
238
+ ASSERT(input_ == NULL && output_ == NULL);
239
+ delete[] integer32_values_;
240
+ delete[] double_values_;
241
+ }
242
+
243
+
244
+ void Deoptimizer::DeleteFrameDescriptions() {
245
+ delete input_;
246
+ for (int i = 0; i < output_count_; ++i) {
247
+ if (output_[i] != input_) delete output_[i];
248
+ }
249
+ delete[] output_;
250
+ input_ = NULL;
251
+ output_ = NULL;
252
+ ASSERT(!Heap::allow_allocation(true));
253
+ }
254
+
255
+
256
+ Address Deoptimizer::GetDeoptimizationEntry(int id, BailoutType type) {
257
+ ASSERT(id >= 0);
258
+ if (id >= kNumberOfEntries) return NULL;
259
+ LargeObjectChunk* base = NULL;
260
+ if (type == EAGER) {
261
+ if (eager_deoptimization_entry_code_ == NULL) {
262
+ eager_deoptimization_entry_code_ = CreateCode(type);
263
+ }
264
+ base = eager_deoptimization_entry_code_;
265
+ } else {
266
+ if (lazy_deoptimization_entry_code_ == NULL) {
267
+ lazy_deoptimization_entry_code_ = CreateCode(type);
268
+ }
269
+ base = lazy_deoptimization_entry_code_;
270
+ }
271
+ return
272
+ static_cast<Address>(base->GetStartAddress()) + (id * table_entry_size_);
273
+ }
274
+
275
+
276
+ int Deoptimizer::GetDeoptimizationId(Address addr, BailoutType type) {
277
+ LargeObjectChunk* base = NULL;
278
+ if (type == EAGER) {
279
+ base = eager_deoptimization_entry_code_;
280
+ } else {
281
+ base = lazy_deoptimization_entry_code_;
282
+ }
283
+ if (base == NULL ||
284
+ addr < base->GetStartAddress() ||
285
+ addr >= base->GetStartAddress() +
286
+ (kNumberOfEntries * table_entry_size_)) {
287
+ return kNotDeoptimizationEntry;
288
+ }
289
+ ASSERT_EQ(0,
290
+ static_cast<int>(addr - base->GetStartAddress()) % table_entry_size_);
291
+ return static_cast<int>(addr - base->GetStartAddress()) / table_entry_size_;
292
+ }
293
+
294
+
295
+ void Deoptimizer::Setup() {
296
+ // Do nothing yet.
297
+ }
298
+
299
+
300
+ void Deoptimizer::TearDown() {
301
+ if (eager_deoptimization_entry_code_ != NULL) {
302
+ eager_deoptimization_entry_code_->Free(EXECUTABLE);
303
+ eager_deoptimization_entry_code_ = NULL;
304
+ }
305
+ if (lazy_deoptimization_entry_code_ != NULL) {
306
+ lazy_deoptimization_entry_code_->Free(EXECUTABLE);
307
+ lazy_deoptimization_entry_code_ = NULL;
308
+ }
309
+ }
310
+
311
+
312
+ int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
313
+ unsigned id,
314
+ SharedFunctionInfo* shared) {
315
+ // TODO(kasperl): For now, we do a simple linear search for the PC
316
+ // offset associated with the given node id. This should probably be
317
+ // changed to a binary search.
318
+ int length = data->DeoptPoints();
319
+ Smi* smi_id = Smi::FromInt(id);
320
+ for (int i = 0; i < length; i++) {
321
+ if (data->AstId(i) == smi_id) {
322
+ return data->PcAndState(i)->value();
323
+ }
324
+ }
325
+ PrintF("[couldn't find pc offset for node=%u]\n", id);
326
+ PrintF("[method: %s]\n", *shared->DebugName()->ToCString());
327
+ // Print the source code if available.
328
+ HeapStringAllocator string_allocator;
329
+ StringStream stream(&string_allocator);
330
+ shared->SourceCodePrint(&stream, -1);
331
+ PrintF("[source:\n%s\n]", *stream.ToCString());
332
+
333
+ UNREACHABLE();
334
+ return -1;
335
+ }
336
+
337
+
338
+ int Deoptimizer::GetDeoptimizedCodeCount() {
339
+ int length = 0;
340
+ DeoptimizingCodeListNode* node = Deoptimizer::deoptimizing_code_list_;
341
+ while (node != NULL) {
342
+ length++;
343
+ node = node->next();
344
+ }
345
+ return length;
346
+ }
347
+
348
+
349
+ void Deoptimizer::DoComputeOutputFrames() {
350
+ if (bailout_type_ == OSR) {
351
+ DoComputeOsrOutputFrame();
352
+ return;
353
+ }
354
+
355
+ // Print some helpful diagnostic information.
356
+ int64_t start = OS::Ticks();
357
+ if (FLAG_trace_deopt) {
358
+ PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ",
359
+ (bailout_type_ == LAZY ? " (lazy)" : ""),
360
+ reinterpret_cast<intptr_t>(function_));
361
+ function_->PrintName();
362
+ PrintF(" @%d]\n", bailout_id_);
363
+ }
364
+
365
+ // Determine basic deoptimization information. The optimized frame is
366
+ // described by the input data.
367
+ DeoptimizationInputData* input_data =
368
+ DeoptimizationInputData::cast(optimized_code_->deoptimization_data());
369
+ unsigned node_id = input_data->AstId(bailout_id_)->value();
370
+ ByteArray* translations = input_data->TranslationByteArray();
371
+ unsigned translation_index =
372
+ input_data->TranslationIndex(bailout_id_)->value();
373
+
374
+ // Do the input frame to output frame(s) translation.
375
+ TranslationIterator iterator(translations, translation_index);
376
+ Translation::Opcode opcode =
377
+ static_cast<Translation::Opcode>(iterator.Next());
378
+ ASSERT(Translation::BEGIN == opcode);
379
+ USE(opcode);
380
+ // Read the number of output frames and allocate an array for their
381
+ // descriptions.
382
+ int count = iterator.Next();
383
+ ASSERT(output_ == NULL);
384
+ output_ = new FrameDescription*[count];
385
+ // Per-frame lists of untagged and unboxed int32 and double values.
386
+ integer32_values_ = new List<ValueDescriptionInteger32>[count];
387
+ double_values_ = new List<ValueDescriptionDouble>[count];
388
+ for (int i = 0; i < count; ++i) {
389
+ output_[i] = NULL;
390
+ integer32_values_[i].Initialize(0);
391
+ double_values_[i].Initialize(0);
392
+ }
393
+ output_count_ = count;
394
+
395
+ // Translate each output frame.
396
+ for (int i = 0; i < count; ++i) {
397
+ DoComputeFrame(&iterator, i);
398
+ }
399
+
400
+ // Print some helpful diagnostic information.
401
+ if (FLAG_trace_deopt) {
402
+ double ms = static_cast<double>(OS::Ticks() - start) / 1000;
403
+ int index = output_count_ - 1; // Index of the topmost frame.
404
+ JSFunction* function = output_[index]->GetFunction();
405
+ PrintF("[deoptimizing: end 0x%08" V8PRIxPTR " ",
406
+ reinterpret_cast<intptr_t>(function));
407
+ function->PrintName();
408
+ PrintF(" => node=%u, pc=0x%08" V8PRIxPTR ", state=%s, took %0.3f ms]\n",
409
+ node_id,
410
+ output_[index]->GetPc(),
411
+ FullCodeGenerator::State2String(
412
+ static_cast<FullCodeGenerator::State>(
413
+ output_[index]->GetState()->value())),
414
+ ms);
415
+ }
416
+ }
417
+
418
+
419
+ void Deoptimizer::InsertHeapNumberValues(int index, JavaScriptFrame* frame) {
420
+ // We need to adjust the stack index by one for the top-most frame.
421
+ int extra_slot_count = (index == output_count() - 1) ? 1 : 0;
422
+ List<ValueDescriptionInteger32>* ints = &integer32_values_[index];
423
+ for (int i = 0; i < ints->length(); i++) {
424
+ ValueDescriptionInteger32 value = ints->at(i);
425
+ double val = static_cast<double>(value.int32_value());
426
+ InsertHeapNumberValue(frame, value.stack_index(), val, extra_slot_count);
427
+ }
428
+
429
+ // Iterate over double values and convert them to a heap number.
430
+ List<ValueDescriptionDouble>* doubles = &double_values_[index];
431
+ for (int i = 0; i < doubles->length(); ++i) {
432
+ ValueDescriptionDouble value = doubles->at(i);
433
+ InsertHeapNumberValue(frame, value.stack_index(), value.double_value(),
434
+ extra_slot_count);
435
+ }
436
+ }
437
+
438
+
439
+ void Deoptimizer::InsertHeapNumberValue(JavaScriptFrame* frame,
440
+ int stack_index,
441
+ double val,
442
+ int extra_slot_count) {
443
+ // Add one to the TOS index to take the 'state' pushed before jumping
444
+ // to the stub that calls Runtime::NotifyDeoptimized into account.
445
+ int tos_index = stack_index + extra_slot_count;
446
+ int index = (frame->ComputeExpressionsCount() - 1) - tos_index;
447
+ if (FLAG_trace_deopt) PrintF("Allocating a new heap number: %e\n", val);
448
+ Handle<Object> num = Factory::NewNumber(val);
449
+ frame->SetExpression(index, *num);
450
+ }
451
+
452
+
453
+ void Deoptimizer::DoTranslateCommand(TranslationIterator* iterator,
454
+ int frame_index,
455
+ unsigned output_offset) {
456
+ disasm::NameConverter converter;
457
+ // A GC-safe temporary placeholder that we can put in the output frame.
458
+ const intptr_t kPlaceholder = reinterpret_cast<intptr_t>(Smi::FromInt(0));
459
+
460
+ // Ignore commands marked as duplicate and act on the first non-duplicate.
461
+ Translation::Opcode opcode =
462
+ static_cast<Translation::Opcode>(iterator->Next());
463
+ while (opcode == Translation::DUPLICATE) {
464
+ opcode = static_cast<Translation::Opcode>(iterator->Next());
465
+ iterator->Skip(Translation::NumberOfOperandsFor(opcode));
466
+ opcode = static_cast<Translation::Opcode>(iterator->Next());
467
+ }
468
+
469
+ switch (opcode) {
470
+ case Translation::BEGIN:
471
+ case Translation::FRAME:
472
+ case Translation::DUPLICATE:
473
+ UNREACHABLE();
474
+ return;
475
+
476
+ case Translation::REGISTER: {
477
+ int input_reg = iterator->Next();
478
+ intptr_t input_value = input_->GetRegister(input_reg);
479
+ if (FLAG_trace_deopt) {
480
+ PrintF(
481
+ " 0x%08" V8PRIxPTR ": [top + %d] <- 0x%08" V8PRIxPTR " ; %s\n",
482
+ output_[frame_index]->GetTop() + output_offset,
483
+ output_offset,
484
+ input_value,
485
+ converter.NameOfCPURegister(input_reg));
486
+ }
487
+ output_[frame_index]->SetFrameSlot(output_offset, input_value);
488
+ return;
489
+ }
490
+
491
+ case Translation::INT32_REGISTER: {
492
+ int input_reg = iterator->Next();
493
+ intptr_t value = input_->GetRegister(input_reg);
494
+ bool is_smi = Smi::IsValid(value);
495
+ unsigned output_index = output_offset / kPointerSize;
496
+ if (FLAG_trace_deopt) {
497
+ PrintF(
498
+ " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIdPTR " ; %s (%s)\n",
499
+ output_[frame_index]->GetTop() + output_offset,
500
+ output_offset,
501
+ value,
502
+ converter.NameOfCPURegister(input_reg),
503
+ is_smi ? "smi" : "heap number");
504
+ }
505
+ if (is_smi) {
506
+ intptr_t tagged_value =
507
+ reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
508
+ output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
509
+ } else {
510
+ // We save the untagged value on the side and store a GC-safe
511
+ // temporary placeholder in the frame.
512
+ AddInteger32Value(frame_index,
513
+ output_index,
514
+ static_cast<int32_t>(value));
515
+ output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
516
+ }
517
+ return;
518
+ }
519
+
520
+ case Translation::DOUBLE_REGISTER: {
521
+ int input_reg = iterator->Next();
522
+ double value = input_->GetDoubleRegister(input_reg);
523
+ unsigned output_index = output_offset / kPointerSize;
524
+ if (FLAG_trace_deopt) {
525
+ PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; %s\n",
526
+ output_[frame_index]->GetTop() + output_offset,
527
+ output_offset,
528
+ value,
529
+ DoubleRegister::AllocationIndexToString(input_reg));
530
+ }
531
+ // We save the untagged value on the side and store a GC-safe
532
+ // temporary placeholder in the frame.
533
+ AddDoubleValue(frame_index, output_index, value);
534
+ output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
535
+ return;
536
+ }
537
+
538
+ case Translation::STACK_SLOT: {
539
+ int input_slot_index = iterator->Next();
540
+ unsigned input_offset =
541
+ input_->GetOffsetFromSlotIndex(this, input_slot_index);
542
+ intptr_t input_value = input_->GetFrameSlot(input_offset);
543
+ if (FLAG_trace_deopt) {
544
+ PrintF(" 0x%08" V8PRIxPTR ": ",
545
+ output_[frame_index]->GetTop() + output_offset);
546
+ PrintF("[top + %d] <- 0x%08" V8PRIxPTR " ; [esp + %d]\n",
547
+ output_offset,
548
+ input_value,
549
+ input_offset);
550
+ }
551
+ output_[frame_index]->SetFrameSlot(output_offset, input_value);
552
+ return;
553
+ }
554
+
555
+ case Translation::INT32_STACK_SLOT: {
556
+ int input_slot_index = iterator->Next();
557
+ unsigned input_offset =
558
+ input_->GetOffsetFromSlotIndex(this, input_slot_index);
559
+ intptr_t value = input_->GetFrameSlot(input_offset);
560
+ bool is_smi = Smi::IsValid(value);
561
+ unsigned output_index = output_offset / kPointerSize;
562
+ if (FLAG_trace_deopt) {
563
+ PrintF(" 0x%08" V8PRIxPTR ": ",
564
+ output_[frame_index]->GetTop() + output_offset);
565
+ PrintF("[top + %d] <- %" V8PRIdPTR " ; [esp + %d] (%s)\n",
566
+ output_offset,
567
+ value,
568
+ input_offset,
569
+ is_smi ? "smi" : "heap number");
570
+ }
571
+ if (is_smi) {
572
+ intptr_t tagged_value =
573
+ reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
574
+ output_[frame_index]->SetFrameSlot(output_offset, tagged_value);
575
+ } else {
576
+ // We save the untagged value on the side and store a GC-safe
577
+ // temporary placeholder in the frame.
578
+ AddInteger32Value(frame_index,
579
+ output_index,
580
+ static_cast<int32_t>(value));
581
+ output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
582
+ }
583
+ return;
584
+ }
585
+
586
+ case Translation::DOUBLE_STACK_SLOT: {
587
+ int input_slot_index = iterator->Next();
588
+ unsigned input_offset =
589
+ input_->GetOffsetFromSlotIndex(this, input_slot_index);
590
+ double value = input_->GetDoubleFrameSlot(input_offset);
591
+ unsigned output_index = output_offset / kPointerSize;
592
+ if (FLAG_trace_deopt) {
593
+ PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; [esp + %d]\n",
594
+ output_[frame_index]->GetTop() + output_offset,
595
+ output_offset,
596
+ value,
597
+ input_offset);
598
+ }
599
+ // We save the untagged value on the side and store a GC-safe
600
+ // temporary placeholder in the frame.
601
+ AddDoubleValue(frame_index, output_index, value);
602
+ output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder);
603
+ return;
604
+ }
605
+
606
+ case Translation::LITERAL: {
607
+ Object* literal = ComputeLiteral(iterator->Next());
608
+ if (FLAG_trace_deopt) {
609
+ PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- ",
610
+ output_[frame_index]->GetTop() + output_offset,
611
+ output_offset);
612
+ literal->ShortPrint();
613
+ PrintF(" ; literal\n");
614
+ }
615
+ intptr_t value = reinterpret_cast<intptr_t>(literal);
616
+ output_[frame_index]->SetFrameSlot(output_offset, value);
617
+ return;
618
+ }
619
+
620
+ case Translation::ARGUMENTS_OBJECT: {
621
+ // Use the arguments marker value as a sentinel and fill in the arguments
622
+ // object after the deoptimized frame is built.
623
+ ASSERT(frame_index == 0); // Only supported for first frame.
624
+ if (FLAG_trace_deopt) {
625
+ PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- ",
626
+ output_[frame_index]->GetTop() + output_offset,
627
+ output_offset);
628
+ Heap::arguments_marker()->ShortPrint();
629
+ PrintF(" ; arguments object\n");
630
+ }
631
+ intptr_t value = reinterpret_cast<intptr_t>(Heap::arguments_marker());
632
+ output_[frame_index]->SetFrameSlot(output_offset, value);
633
+ return;
634
+ }
635
+ }
636
+ }
637
+
638
+
639
+ bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator,
640
+ int* input_offset) {
641
+ disasm::NameConverter converter;
642
+ FrameDescription* output = output_[0];
643
+
644
+ // The input values are all part of the unoptimized frame so they
645
+ // are all tagged pointers.
646
+ uintptr_t input_value = input_->GetFrameSlot(*input_offset);
647
+ Object* input_object = reinterpret_cast<Object*>(input_value);
648
+
649
+ Translation::Opcode opcode =
650
+ static_cast<Translation::Opcode>(iterator->Next());
651
+ bool duplicate = (opcode == Translation::DUPLICATE);
652
+ if (duplicate) {
653
+ opcode = static_cast<Translation::Opcode>(iterator->Next());
654
+ }
655
+
656
+ switch (opcode) {
657
+ case Translation::BEGIN:
658
+ case Translation::FRAME:
659
+ case Translation::DUPLICATE:
660
+ UNREACHABLE(); // Malformed input.
661
+ return false;
662
+
663
+ case Translation::REGISTER: {
664
+ int output_reg = iterator->Next();
665
+ if (FLAG_trace_osr) {
666
+ PrintF(" %s <- 0x%08" V8PRIxPTR " ; [sp + %d]\n",
667
+ converter.NameOfCPURegister(output_reg),
668
+ input_value,
669
+ *input_offset);
670
+ }
671
+ output->SetRegister(output_reg, input_value);
672
+ break;
673
+ }
674
+
675
+ case Translation::INT32_REGISTER: {
676
+ // Abort OSR if we don't have a number.
677
+ if (!input_object->IsNumber()) return false;
678
+
679
+ int output_reg = iterator->Next();
680
+ int int32_value = input_object->IsSmi()
681
+ ? Smi::cast(input_object)->value()
682
+ : FastD2I(input_object->Number());
683
+ // Abort the translation if the conversion lost information.
684
+ if (!input_object->IsSmi() &&
685
+ FastI2D(int32_value) != input_object->Number()) {
686
+ if (FLAG_trace_osr) {
687
+ PrintF("**** %g could not be converted to int32 ****\n",
688
+ input_object->Number());
689
+ }
690
+ return false;
691
+ }
692
+ if (FLAG_trace_osr) {
693
+ PrintF(" %s <- %d (int32) ; [sp + %d]\n",
694
+ converter.NameOfCPURegister(output_reg),
695
+ int32_value,
696
+ *input_offset);
697
+ }
698
+ output->SetRegister(output_reg, int32_value);
699
+ break;
700
+ }
701
+
702
+ case Translation::DOUBLE_REGISTER: {
703
+ // Abort OSR if we don't have a number.
704
+ if (!input_object->IsNumber()) return false;
705
+
706
+ int output_reg = iterator->Next();
707
+ double double_value = input_object->Number();
708
+ if (FLAG_trace_osr) {
709
+ PrintF(" %s <- %g (double) ; [sp + %d]\n",
710
+ DoubleRegister::AllocationIndexToString(output_reg),
711
+ double_value,
712
+ *input_offset);
713
+ }
714
+ output->SetDoubleRegister(output_reg, double_value);
715
+ break;
716
+ }
717
+
718
+ case Translation::STACK_SLOT: {
719
+ int output_index = iterator->Next();
720
+ unsigned output_offset =
721
+ output->GetOffsetFromSlotIndex(this, output_index);
722
+ if (FLAG_trace_osr) {
723
+ PrintF(" [sp + %d] <- 0x%08" V8PRIxPTR " ; [sp + %d]\n",
724
+ output_offset,
725
+ input_value,
726
+ *input_offset);
727
+ }
728
+ output->SetFrameSlot(output_offset, input_value);
729
+ break;
730
+ }
731
+
732
+ case Translation::INT32_STACK_SLOT: {
733
+ // Abort OSR if we don't have a number.
734
+ if (!input_object->IsNumber()) return false;
735
+
736
+ int output_index = iterator->Next();
737
+ unsigned output_offset =
738
+ output->GetOffsetFromSlotIndex(this, output_index);
739
+ int int32_value = input_object->IsSmi()
740
+ ? Smi::cast(input_object)->value()
741
+ : DoubleToInt32(input_object->Number());
742
+ // Abort the translation if the conversion lost information.
743
+ if (!input_object->IsSmi() &&
744
+ FastI2D(int32_value) != input_object->Number()) {
745
+ if (FLAG_trace_osr) {
746
+ PrintF("**** %g could not be converted to int32 ****\n",
747
+ input_object->Number());
748
+ }
749
+ return false;
750
+ }
751
+ if (FLAG_trace_osr) {
752
+ PrintF(" [sp + %d] <- %d (int32) ; [sp + %d]\n",
753
+ output_offset,
754
+ int32_value,
755
+ *input_offset);
756
+ }
757
+ output->SetFrameSlot(output_offset, int32_value);
758
+ break;
759
+ }
760
+
761
+ case Translation::DOUBLE_STACK_SLOT: {
762
+ static const int kLowerOffset = 0 * kPointerSize;
763
+ static const int kUpperOffset = 1 * kPointerSize;
764
+
765
+ // Abort OSR if we don't have a number.
766
+ if (!input_object->IsNumber()) return false;
767
+
768
+ int output_index = iterator->Next();
769
+ unsigned output_offset =
770
+ output->GetOffsetFromSlotIndex(this, output_index);
771
+ double double_value = input_object->Number();
772
+ uint64_t int_value = BitCast<uint64_t, double>(double_value);
773
+ int32_t lower = static_cast<int32_t>(int_value);
774
+ int32_t upper = static_cast<int32_t>(int_value >> kBitsPerInt);
775
+ if (FLAG_trace_osr) {
776
+ PrintF(" [sp + %d] <- 0x%08x (upper bits of %g) ; [sp + %d]\n",
777
+ output_offset + kUpperOffset,
778
+ upper,
779
+ double_value,
780
+ *input_offset);
781
+ PrintF(" [sp + %d] <- 0x%08x (lower bits of %g) ; [sp + %d]\n",
782
+ output_offset + kLowerOffset,
783
+ lower,
784
+ double_value,
785
+ *input_offset);
786
+ }
787
+ output->SetFrameSlot(output_offset + kLowerOffset, lower);
788
+ output->SetFrameSlot(output_offset + kUpperOffset, upper);
789
+ break;
790
+ }
791
+
792
+ case Translation::LITERAL: {
793
+ // Just ignore non-materialized literals.
794
+ iterator->Next();
795
+ break;
796
+ }
797
+
798
+ case Translation::ARGUMENTS_OBJECT: {
799
+ // Optimized code assumes that the argument object has not been
800
+ // materialized and so bypasses it when doing arguments access.
801
+ // We should have bailed out before starting the frame
802
+ // translation.
803
+ UNREACHABLE();
804
+ return false;
805
+ }
806
+ }
807
+
808
+ if (!duplicate) *input_offset -= kPointerSize;
809
+ return true;
810
+ }
811
+
812
+
813
+ void Deoptimizer::PatchStackCheckCode(Code* unoptimized_code,
814
+ Code* check_code,
815
+ Code* replacement_code) {
816
+ // Iterate over the stack check table and patch every stack check
817
+ // call to an unconditional call to the replacement code.
818
+ ASSERT(unoptimized_code->kind() == Code::FUNCTION);
819
+ Address stack_check_cursor = unoptimized_code->instruction_start() +
820
+ unoptimized_code->stack_check_table_offset();
821
+ uint32_t table_length = Memory::uint32_at(stack_check_cursor);
822
+ stack_check_cursor += kIntSize;
823
+ for (uint32_t i = 0; i < table_length; ++i) {
824
+ uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
825
+ Address pc_after = unoptimized_code->instruction_start() + pc_offset;
826
+ PatchStackCheckCodeAt(pc_after, check_code, replacement_code);
827
+ stack_check_cursor += 2 * kIntSize;
828
+ }
829
+ }
830
+
831
+
832
+ void Deoptimizer::RevertStackCheckCode(Code* unoptimized_code,
833
+ Code* check_code,
834
+ Code* replacement_code) {
835
+ // Iterate over the stack check table and revert the patched
836
+ // stack check calls.
837
+ ASSERT(unoptimized_code->kind() == Code::FUNCTION);
838
+ Address stack_check_cursor = unoptimized_code->instruction_start() +
839
+ unoptimized_code->stack_check_table_offset();
840
+ uint32_t table_length = Memory::uint32_at(stack_check_cursor);
841
+ stack_check_cursor += kIntSize;
842
+ for (uint32_t i = 0; i < table_length; ++i) {
843
+ uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
844
+ Address pc_after = unoptimized_code->instruction_start() + pc_offset;
845
+ RevertStackCheckCodeAt(pc_after, check_code, replacement_code);
846
+ stack_check_cursor += 2 * kIntSize;
847
+ }
848
+ }
849
+
850
+
851
+ unsigned Deoptimizer::ComputeInputFrameSize() const {
852
+ unsigned fixed_size = ComputeFixedSize(function_);
853
+ // The fp-to-sp delta already takes the context and the function
854
+ // into account so we have to avoid double counting them (-2).
855
+ unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize);
856
+ #ifdef DEBUG
857
+ if (bailout_type_ == OSR) {
858
+ // TODO(kasperl): It would be nice if we could verify that the
859
+ // size matches with the stack height we can compute based on the
860
+ // environment at the OSR entry. The code for that his built into
861
+ // the DoComputeOsrOutputFrame function for now.
862
+ } else {
863
+ unsigned stack_slots = optimized_code_->stack_slots();
864
+ unsigned outgoing_size = ComputeOutgoingArgumentSize();
865
+ ASSERT(result == fixed_size + (stack_slots * kPointerSize) + outgoing_size);
866
+ }
867
+ #endif
868
+ return result;
869
+ }
870
+
871
+
872
+ unsigned Deoptimizer::ComputeFixedSize(JSFunction* function) const {
873
+ // The fixed part of the frame consists of the return address, frame
874
+ // pointer, function, context, and all the incoming arguments.
875
+ static const unsigned kFixedSlotSize = 4 * kPointerSize;
876
+ return ComputeIncomingArgumentSize(function) + kFixedSlotSize;
877
+ }
878
+
879
+
880
+ unsigned Deoptimizer::ComputeIncomingArgumentSize(JSFunction* function) const {
881
+ // The incoming arguments is the values for formal parameters and
882
+ // the receiver. Every slot contains a pointer.
883
+ unsigned arguments = function->shared()->formal_parameter_count() + 1;
884
+ return arguments * kPointerSize;
885
+ }
886
+
887
+
888
+ unsigned Deoptimizer::ComputeOutgoingArgumentSize() const {
889
+ DeoptimizationInputData* data = DeoptimizationInputData::cast(
890
+ optimized_code_->deoptimization_data());
891
+ unsigned height = data->ArgumentsStackHeight(bailout_id_)->value();
892
+ return height * kPointerSize;
893
+ }
894
+
895
+
896
+ Object* Deoptimizer::ComputeLiteral(int index) const {
897
+ DeoptimizationInputData* data = DeoptimizationInputData::cast(
898
+ optimized_code_->deoptimization_data());
899
+ FixedArray* literals = data->LiteralArray();
900
+ return literals->get(index);
901
+ }
902
+
903
+
904
+ void Deoptimizer::AddInteger32Value(int frame_index,
905
+ int slot_index,
906
+ int32_t value) {
907
+ ValueDescriptionInteger32 value_desc(slot_index, value);
908
+ integer32_values_[frame_index].Add(value_desc);
909
+ }
910
+
911
+
912
+ void Deoptimizer::AddDoubleValue(int frame_index,
913
+ int slot_index,
914
+ double value) {
915
+ ValueDescriptionDouble value_desc(slot_index, value);
916
+ double_values_[frame_index].Add(value_desc);
917
+ }
918
+
919
+
920
+ LargeObjectChunk* Deoptimizer::CreateCode(BailoutType type) {
921
+ // We cannot run this if the serializer is enabled because this will
922
+ // cause us to emit relocation information for the external
923
+ // references. This is fine because the deoptimizer's code section
924
+ // isn't meant to be serialized at all.
925
+ ASSERT(!Serializer::enabled());
926
+ bool old_debug_code = FLAG_debug_code;
927
+ FLAG_debug_code = false;
928
+
929
+ MacroAssembler masm(NULL, 16 * KB);
930
+ GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type);
931
+ CodeDesc desc;
932
+ masm.GetCode(&desc);
933
+ ASSERT(desc.reloc_size == 0);
934
+
935
+ LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE);
936
+ memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
937
+ CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
938
+ FLAG_debug_code = old_debug_code;
939
+ return chunk;
940
+ }
941
+
942
+
943
+ Code* Deoptimizer::FindDeoptimizingCodeFromAddress(Address addr) {
944
+ DeoptimizingCodeListNode* node = Deoptimizer::deoptimizing_code_list_;
945
+ while (node != NULL) {
946
+ if (node->code()->contains(addr)) return *node->code();
947
+ node = node->next();
948
+ }
949
+ return NULL;
950
+ }
951
+
952
+
953
+ void Deoptimizer::RemoveDeoptimizingCode(Code* code) {
954
+ ASSERT(deoptimizing_code_list_ != NULL);
955
+ // Run through the code objects to find this one and remove it.
956
+ DeoptimizingCodeListNode* prev = NULL;
957
+ DeoptimizingCodeListNode* current = deoptimizing_code_list_;
958
+ while (current != NULL) {
959
+ if (*current->code() == code) {
960
+ // Unlink from list. If prev is NULL we are looking at the first element.
961
+ if (prev == NULL) {
962
+ deoptimizing_code_list_ = current->next();
963
+ } else {
964
+ prev->set_next(current->next());
965
+ }
966
+ delete current;
967
+ return;
968
+ }
969
+ // Move to next in list.
970
+ prev = current;
971
+ current = current->next();
972
+ }
973
+ // Deoptimizing code is removed through weak callback. Each object is expected
974
+ // to be removed once and only once.
975
+ UNREACHABLE();
976
+ }
977
+
978
+
979
+ FrameDescription::FrameDescription(uint32_t frame_size,
980
+ JSFunction* function)
981
+ : frame_size_(frame_size),
982
+ function_(function),
983
+ top_(kZapUint32),
984
+ pc_(kZapUint32),
985
+ fp_(kZapUint32) {
986
+ // Zap all the registers.
987
+ for (int r = 0; r < Register::kNumRegisters; r++) {
988
+ SetRegister(r, kZapUint32);
989
+ }
990
+
991
+ // Zap all the slots.
992
+ for (unsigned o = 0; o < frame_size; o += kPointerSize) {
993
+ SetFrameSlot(o, kZapUint32);
994
+ }
995
+ }
996
+
997
+
998
+ unsigned FrameDescription::GetOffsetFromSlotIndex(Deoptimizer* deoptimizer,
999
+ int slot_index) {
1000
+ if (slot_index >= 0) {
1001
+ // Local or spill slots. Skip the fixed part of the frame
1002
+ // including all arguments.
1003
+ unsigned base = static_cast<unsigned>(
1004
+ GetFrameSize() - deoptimizer->ComputeFixedSize(GetFunction()));
1005
+ return base - ((slot_index + 1) * kPointerSize);
1006
+ } else {
1007
+ // Incoming parameter.
1008
+ unsigned base = static_cast<unsigned>(GetFrameSize() -
1009
+ deoptimizer->ComputeIncomingArgumentSize(GetFunction()));
1010
+ return base - ((slot_index + 1) * kPointerSize);
1011
+ }
1012
+ }
1013
+
1014
+
1015
+ void TranslationBuffer::Add(int32_t value) {
1016
+ // Encode the sign bit in the least significant bit.
1017
+ bool is_negative = (value < 0);
1018
+ uint32_t bits = ((is_negative ? -value : value) << 1) |
1019
+ static_cast<int32_t>(is_negative);
1020
+ // Encode the individual bytes using the least significant bit of
1021
+ // each byte to indicate whether or not more bytes follow.
1022
+ do {
1023
+ uint32_t next = bits >> 7;
1024
+ contents_.Add(((bits << 1) & 0xFF) | (next != 0));
1025
+ bits = next;
1026
+ } while (bits != 0);
1027
+ }
1028
+
1029
+
1030
+ int32_t TranslationIterator::Next() {
1031
+ ASSERT(HasNext());
1032
+ // Run through the bytes until we reach one with a least significant
1033
+ // bit of zero (marks the end).
1034
+ uint32_t bits = 0;
1035
+ for (int i = 0; true; i += 7) {
1036
+ uint8_t next = buffer_->get(index_++);
1037
+ bits |= (next >> 1) << i;
1038
+ if ((next & 1) == 0) break;
1039
+ }
1040
+ // The bits encode the sign in the least significant bit.
1041
+ bool is_negative = (bits & 1) == 1;
1042
+ int32_t result = bits >> 1;
1043
+ return is_negative ? -result : result;
1044
+ }
1045
+
1046
+
1047
+ Handle<ByteArray> TranslationBuffer::CreateByteArray() {
1048
+ int length = contents_.length();
1049
+ Handle<ByteArray> result = Factory::NewByteArray(length, TENURED);
1050
+ memcpy(result->GetDataStartAddress(), contents_.ToVector().start(), length);
1051
+ return result;
1052
+ }
1053
+
1054
+
1055
+ void Translation::BeginFrame(int node_id, int literal_id, unsigned height) {
1056
+ buffer_->Add(FRAME);
1057
+ buffer_->Add(node_id);
1058
+ buffer_->Add(literal_id);
1059
+ buffer_->Add(height);
1060
+ }
1061
+
1062
+
1063
+ void Translation::StoreRegister(Register reg) {
1064
+ buffer_->Add(REGISTER);
1065
+ buffer_->Add(reg.code());
1066
+ }
1067
+
1068
+
1069
+ void Translation::StoreInt32Register(Register reg) {
1070
+ buffer_->Add(INT32_REGISTER);
1071
+ buffer_->Add(reg.code());
1072
+ }
1073
+
1074
+
1075
+ void Translation::StoreDoubleRegister(DoubleRegister reg) {
1076
+ buffer_->Add(DOUBLE_REGISTER);
1077
+ buffer_->Add(DoubleRegister::ToAllocationIndex(reg));
1078
+ }
1079
+
1080
+
1081
+ void Translation::StoreStackSlot(int index) {
1082
+ buffer_->Add(STACK_SLOT);
1083
+ buffer_->Add(index);
1084
+ }
1085
+
1086
+
1087
+ void Translation::StoreInt32StackSlot(int index) {
1088
+ buffer_->Add(INT32_STACK_SLOT);
1089
+ buffer_->Add(index);
1090
+ }
1091
+
1092
+
1093
+ void Translation::StoreDoubleStackSlot(int index) {
1094
+ buffer_->Add(DOUBLE_STACK_SLOT);
1095
+ buffer_->Add(index);
1096
+ }
1097
+
1098
+
1099
+ void Translation::StoreLiteral(int literal_id) {
1100
+ buffer_->Add(LITERAL);
1101
+ buffer_->Add(literal_id);
1102
+ }
1103
+
1104
+
1105
+ void Translation::StoreArgumentsObject() {
1106
+ buffer_->Add(ARGUMENTS_OBJECT);
1107
+ }
1108
+
1109
+
1110
+ void Translation::MarkDuplicate() {
1111
+ buffer_->Add(DUPLICATE);
1112
+ }
1113
+
1114
+
1115
+ int Translation::NumberOfOperandsFor(Opcode opcode) {
1116
+ switch (opcode) {
1117
+ case ARGUMENTS_OBJECT:
1118
+ case DUPLICATE:
1119
+ return 0;
1120
+ case BEGIN:
1121
+ case REGISTER:
1122
+ case INT32_REGISTER:
1123
+ case DOUBLE_REGISTER:
1124
+ case STACK_SLOT:
1125
+ case INT32_STACK_SLOT:
1126
+ case DOUBLE_STACK_SLOT:
1127
+ case LITERAL:
1128
+ return 1;
1129
+ case FRAME:
1130
+ return 3;
1131
+ }
1132
+ UNREACHABLE();
1133
+ return -1;
1134
+ }
1135
+
1136
+
1137
+ #ifdef OBJECT_PRINT
1138
+
1139
+ const char* Translation::StringFor(Opcode opcode) {
1140
+ switch (opcode) {
1141
+ case BEGIN:
1142
+ return "BEGIN";
1143
+ case FRAME:
1144
+ return "FRAME";
1145
+ case REGISTER:
1146
+ return "REGISTER";
1147
+ case INT32_REGISTER:
1148
+ return "INT32_REGISTER";
1149
+ case DOUBLE_REGISTER:
1150
+ return "DOUBLE_REGISTER";
1151
+ case STACK_SLOT:
1152
+ return "STACK_SLOT";
1153
+ case INT32_STACK_SLOT:
1154
+ return "INT32_STACK_SLOT";
1155
+ case DOUBLE_STACK_SLOT:
1156
+ return "DOUBLE_STACK_SLOT";
1157
+ case LITERAL:
1158
+ return "LITERAL";
1159
+ case ARGUMENTS_OBJECT:
1160
+ return "ARGUMENTS_OBJECT";
1161
+ case DUPLICATE:
1162
+ return "DUPLICATE";
1163
+ }
1164
+ UNREACHABLE();
1165
+ return "";
1166
+ }
1167
+
1168
+ #endif
1169
+
1170
+
1171
+ DeoptimizingCodeListNode::DeoptimizingCodeListNode(Code* code): next_(NULL) {
1172
+ // Globalize the code object and make it weak.
1173
+ code_ = Handle<Code>::cast((GlobalHandles::Create(code)));
1174
+ GlobalHandles::MakeWeak(reinterpret_cast<Object**>(code_.location()),
1175
+ this,
1176
+ Deoptimizer::HandleWeakDeoptimizedCode);
1177
+ }
1178
+
1179
+
1180
+ DeoptimizingCodeListNode::~DeoptimizingCodeListNode() {
1181
+ GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location()));
1182
+ }
1183
+
1184
+
1185
+ } } // namespace v8::internal