therubyracer 0.9.0beta2 → 0.9.0beta3

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 (920) hide show
  1. data/.gitmodules +3 -0
  2. data/ext/v8/upstream/Makefile +1 -2
  3. data/ext/v8/upstream/v8/.gitignore +33 -0
  4. data/ext/v8/upstream/v8/AUTHORS +42 -0
  5. data/ext/v8/upstream/v8/ChangeLog +2663 -0
  6. data/ext/v8/upstream/{3.1.8 → v8}/LICENSE +0 -0
  7. data/ext/v8/upstream/{3.1.8 → v8}/LICENSE.strongtalk +0 -0
  8. data/ext/v8/upstream/{3.1.8 → v8}/LICENSE.v8 +0 -0
  9. data/ext/v8/upstream/{3.1.8 → v8}/LICENSE.valgrind +0 -0
  10. data/ext/v8/upstream/v8/SConstruct +1473 -0
  11. data/ext/v8/upstream/{3.1.8 → v8}/build/README.txt +0 -0
  12. data/ext/v8/upstream/{3.1.8 → v8}/build/all.gyp +0 -0
  13. data/ext/v8/upstream/{3.1.8 → v8}/build/armu.gypi +0 -0
  14. data/ext/v8/upstream/{3.1.8 → v8}/build/common.gypi +0 -0
  15. data/ext/v8/upstream/{3.1.8 → v8}/build/gyp_v8 +0 -0
  16. data/ext/v8/upstream/v8/include/v8-debug.h +394 -0
  17. data/ext/v8/upstream/v8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/v8/include/v8-profiler.h +505 -0
  19. data/ext/v8/upstream/v8/include/v8-testing.h +104 -0
  20. data/ext/v8/upstream/v8/include/v8.h +4000 -0
  21. data/ext/v8/upstream/{3.1.8 → v8}/include/v8stdint.h +0 -0
  22. data/ext/v8/upstream/v8/preparser/SConscript +38 -0
  23. data/ext/v8/upstream/v8/preparser/preparser-process.cc +169 -0
  24. data/ext/v8/upstream/v8/src/SConscript +380 -0
  25. data/ext/v8/upstream/v8/src/accessors.cc +766 -0
  26. data/ext/v8/upstream/{3.1.8 → v8}/src/accessors.h +0 -0
  27. data/ext/v8/upstream/v8/src/allocation-inl.h +49 -0
  28. data/ext/v8/upstream/v8/src/allocation.cc +122 -0
  29. data/ext/v8/upstream/v8/src/allocation.h +143 -0
  30. data/ext/v8/upstream/v8/src/api.cc +5678 -0
  31. data/ext/v8/upstream/v8/src/api.h +572 -0
  32. data/ext/v8/upstream/{3.1.8 → v8}/src/apinatives.js +0 -0
  33. data/ext/v8/upstream/v8/src/apiutils.h +73 -0
  34. data/ext/v8/upstream/v8/src/arguments.h +116 -0
  35. data/ext/v8/upstream/v8/src/arm/assembler-arm-inl.h +353 -0
  36. data/ext/v8/upstream/v8/src/arm/assembler-arm.cc +2877 -0
  37. data/ext/v8/upstream/v8/src/arm/assembler-arm.h +1382 -0
  38. data/ext/v8/upstream/v8/src/arm/builtins-arm.cc +1634 -0
  39. data/ext/v8/upstream/v8/src/arm/code-stubs-arm.cc +6917 -0
  40. data/ext/v8/upstream/v8/src/arm/code-stubs-arm.h +623 -0
  41. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/codegen-arm-inl.h +0 -0
  42. data/ext/v8/upstream/v8/src/arm/codegen-arm.cc +7437 -0
  43. data/ext/v8/upstream/v8/src/arm/codegen-arm.h +595 -0
  44. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/constants-arm.cc +0 -0
  45. data/ext/v8/upstream/v8/src/arm/constants-arm.h +778 -0
  46. data/ext/v8/upstream/v8/src/arm/cpu-arm.cc +149 -0
  47. data/ext/v8/upstream/v8/src/arm/debug-arm.cc +317 -0
  48. data/ext/v8/upstream/v8/src/arm/deoptimizer-arm.cc +737 -0
  49. data/ext/v8/upstream/v8/src/arm/disasm-arm.cc +1503 -0
  50. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/frames-arm.cc +0 -0
  51. data/ext/v8/upstream/v8/src/arm/frames-arm.h +168 -0
  52. data/ext/v8/upstream/v8/src/arm/full-codegen-arm.cc +4374 -0
  53. data/ext/v8/upstream/v8/src/arm/ic-arm.cc +1793 -0
  54. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/jump-target-arm.cc +0 -0
  55. data/ext/v8/upstream/v8/src/arm/lithium-arm.cc +2120 -0
  56. data/ext/v8/upstream/v8/src/arm/lithium-arm.h +2179 -0
  57. data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.cc +4132 -0
  58. data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.h +329 -0
  59. data/ext/v8/upstream/v8/src/arm/lithium-gap-resolver-arm.cc +305 -0
  60. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/lithium-gap-resolver-arm.h +0 -0
  61. data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.cc +2939 -0
  62. data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.h +1071 -0
  63. data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.cc +1287 -0
  64. data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.h +253 -0
  65. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/register-allocator-arm-inl.h +0 -0
  66. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/register-allocator-arm.cc +0 -0
  67. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/register-allocator-arm.h +0 -0
  68. data/ext/v8/upstream/v8/src/arm/simulator-arm.cc +3288 -0
  69. data/ext/v8/upstream/v8/src/arm/simulator-arm.h +413 -0
  70. data/ext/v8/upstream/v8/src/arm/stub-cache-arm.cc +4034 -0
  71. data/ext/v8/upstream/{3.1.8 → v8}/src/arm/virtual-frame-arm-inl.h +0 -0
  72. data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.cc +843 -0
  73. data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.h +523 -0
  74. data/ext/v8/upstream/v8/src/array.js +1249 -0
  75. data/ext/v8/upstream/v8/src/assembler.cc +1067 -0
  76. data/ext/v8/upstream/v8/src/assembler.h +823 -0
  77. data/ext/v8/upstream/v8/src/ast-inl.h +112 -0
  78. data/ext/v8/upstream/v8/src/ast.cc +1078 -0
  79. data/ext/v8/upstream/v8/src/ast.h +2234 -0
  80. data/ext/v8/upstream/v8/src/atomicops.h +167 -0
  81. data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_arm_gcc.h +0 -0
  82. data/ext/v8/upstream/v8/src/atomicops_internals_mips_gcc.h +169 -0
  83. data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_gcc.cc +0 -0
  84. data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_gcc.h +0 -0
  85. data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_macosx.h +0 -0
  86. data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_msvc.h +0 -0
  87. data/ext/v8/upstream/{3.1.8 → v8}/src/bignum-dtoa.cc +0 -0
  88. data/ext/v8/upstream/{3.1.8 → v8}/src/bignum-dtoa.h +0 -0
  89. data/ext/v8/upstream/{3.1.8 → v8}/src/bignum.cc +0 -0
  90. data/ext/v8/upstream/{3.1.8 → v8}/src/bignum.h +0 -0
  91. data/ext/v8/upstream/v8/src/bootstrapper.cc +2138 -0
  92. data/ext/v8/upstream/v8/src/bootstrapper.h +185 -0
  93. data/ext/v8/upstream/v8/src/builtins.cc +1708 -0
  94. data/ext/v8/upstream/v8/src/builtins.h +368 -0
  95. data/ext/v8/upstream/{3.1.8 → v8}/src/bytecodes-irregexp.h +0 -0
  96. data/ext/v8/upstream/{3.1.8 → v8}/src/cached-powers.cc +0 -0
  97. data/ext/v8/upstream/{3.1.8 → v8}/src/cached-powers.h +0 -0
  98. data/ext/v8/upstream/{3.1.8 → v8}/src/char-predicates-inl.h +0 -0
  99. data/ext/v8/upstream/{3.1.8 → v8}/src/char-predicates.h +0 -0
  100. data/ext/v8/upstream/v8/src/checks.cc +110 -0
  101. data/ext/v8/upstream/v8/src/checks.h +296 -0
  102. data/ext/v8/upstream/{3.1.8 → v8}/src/circular-queue-inl.h +0 -0
  103. data/ext/v8/upstream/{3.1.8 → v8}/src/circular-queue.cc +0 -0
  104. data/ext/v8/upstream/{3.1.8 → v8}/src/circular-queue.h +0 -0
  105. data/ext/v8/upstream/v8/src/code-stubs.cc +240 -0
  106. data/ext/v8/upstream/v8/src/code-stubs.h +971 -0
  107. data/ext/v8/upstream/{3.1.8 → v8}/src/code.h +0 -0
  108. data/ext/v8/upstream/v8/src/codegen-inl.h +68 -0
  109. data/ext/v8/upstream/v8/src/codegen.cc +505 -0
  110. data/ext/v8/upstream/v8/src/codegen.h +245 -0
  111. data/ext/v8/upstream/v8/src/compilation-cache.cc +540 -0
  112. data/ext/v8/upstream/v8/src/compilation-cache.h +287 -0
  113. data/ext/v8/upstream/v8/src/compiler.cc +792 -0
  114. data/ext/v8/upstream/v8/src/compiler.h +307 -0
  115. data/ext/v8/upstream/v8/src/contexts.cc +327 -0
  116. data/ext/v8/upstream/v8/src/contexts.h +382 -0
  117. data/ext/v8/upstream/{3.1.8 → v8}/src/conversions-inl.h +0 -0
  118. data/ext/v8/upstream/v8/src/conversions.cc +1125 -0
  119. data/ext/v8/upstream/{3.1.8 → v8}/src/conversions.h +0 -0
  120. data/ext/v8/upstream/v8/src/counters.cc +93 -0
  121. data/ext/v8/upstream/v8/src/counters.h +254 -0
  122. data/ext/v8/upstream/v8/src/cpu-profiler-inl.h +101 -0
  123. data/ext/v8/upstream/v8/src/cpu-profiler.cc +606 -0
  124. data/ext/v8/upstream/v8/src/cpu-profiler.h +305 -0
  125. data/ext/v8/upstream/v8/src/cpu.h +67 -0
  126. data/ext/v8/upstream/v8/src/d8-debug.cc +367 -0
  127. data/ext/v8/upstream/v8/src/d8-debug.h +158 -0
  128. data/ext/v8/upstream/v8/src/d8-posix.cc +695 -0
  129. data/ext/v8/upstream/{3.1.8 → v8}/src/d8-readline.cc +0 -0
  130. data/ext/v8/upstream/{3.1.8 → v8}/src/d8-windows.cc +0 -0
  131. data/ext/v8/upstream/v8/src/d8.cc +796 -0
  132. data/ext/v8/upstream/v8/src/d8.gyp +88 -0
  133. data/ext/v8/upstream/{3.1.8 → v8}/src/d8.h +0 -0
  134. data/ext/v8/upstream/{3.1.8 → v8}/src/d8.js +0 -0
  135. data/ext/v8/upstream/{3.1.8 → v8}/src/data-flow.cc +0 -0
  136. data/ext/v8/upstream/v8/src/data-flow.h +379 -0
  137. data/ext/v8/upstream/{3.1.8 → v8}/src/date.js +0 -0
  138. data/ext/v8/upstream/{3.1.8 → v8}/src/dateparser-inl.h +0 -0
  139. data/ext/v8/upstream/{3.1.8 → v8}/src/dateparser.cc +0 -0
  140. data/ext/v8/upstream/v8/src/dateparser.h +265 -0
  141. data/ext/v8/upstream/v8/src/debug-agent.cc +447 -0
  142. data/ext/v8/upstream/v8/src/debug-agent.h +129 -0
  143. data/ext/v8/upstream/{3.1.8 → v8}/src/debug-debugger.js +0 -0
  144. data/ext/v8/upstream/v8/src/debug.cc +3188 -0
  145. data/ext/v8/upstream/v8/src/debug.h +1055 -0
  146. data/ext/v8/upstream/v8/src/deoptimizer.cc +1296 -0
  147. data/ext/v8/upstream/v8/src/deoptimizer.h +629 -0
  148. data/ext/v8/upstream/v8/src/disasm.h +80 -0
  149. data/ext/v8/upstream/v8/src/disassembler.cc +339 -0
  150. data/ext/v8/upstream/{3.1.8 → v8}/src/disassembler.h +0 -0
  151. data/ext/v8/upstream/{3.1.8 → v8}/src/diy-fp.cc +0 -0
  152. data/ext/v8/upstream/{3.1.8 → v8}/src/diy-fp.h +0 -0
  153. data/ext/v8/upstream/{3.1.8 → v8}/src/double.h +0 -0
  154. data/ext/v8/upstream/{3.1.8 → v8}/src/dtoa.cc +0 -0
  155. data/ext/v8/upstream/{3.1.8 → v8}/src/dtoa.h +0 -0
  156. data/ext/v8/upstream/v8/src/execution.cc +791 -0
  157. data/ext/v8/upstream/v8/src/execution.h +291 -0
  158. data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.cc +250 -0
  159. data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.h +89 -0
  160. data/ext/v8/upstream/v8/src/extensions/experimental/experimental.gyp +55 -0
  161. data/ext/v8/upstream/v8/src/extensions/experimental/i18n-extension.cc +284 -0
  162. data/ext/v8/upstream/{3.1.8 → v8}/src/extensions/experimental/i18n-extension.h +0 -0
  163. data/ext/v8/upstream/v8/src/extensions/externalize-string-extension.cc +141 -0
  164. data/ext/v8/upstream/{3.1.8 → v8}/src/extensions/externalize-string-extension.h +0 -0
  165. data/ext/v8/upstream/v8/src/extensions/gc-extension.cc +58 -0
  166. data/ext/v8/upstream/{3.1.8 → v8}/src/extensions/gc-extension.h +0 -0
  167. data/ext/v8/upstream/v8/src/factory.cc +1194 -0
  168. data/ext/v8/upstream/v8/src/factory.h +436 -0
  169. data/ext/v8/upstream/{3.1.8 → v8}/src/fast-dtoa.cc +0 -0
  170. data/ext/v8/upstream/{3.1.8 → v8}/src/fast-dtoa.h +0 -0
  171. data/ext/v8/upstream/{3.1.8 → v8}/src/fixed-dtoa.cc +0 -0
  172. data/ext/v8/upstream/{3.1.8 → v8}/src/fixed-dtoa.h +0 -0
  173. data/ext/v8/upstream/v8/src/flag-definitions.h +556 -0
  174. data/ext/v8/upstream/{3.1.8 → v8}/src/flags.cc +0 -0
  175. data/ext/v8/upstream/{3.1.8 → v8}/src/flags.h +0 -0
  176. data/ext/v8/upstream/v8/src/frame-element.cc +37 -0
  177. data/ext/v8/upstream/v8/src/frame-element.h +269 -0
  178. data/ext/v8/upstream/v8/src/frames-inl.h +236 -0
  179. data/ext/v8/upstream/v8/src/frames.cc +1273 -0
  180. data/ext/v8/upstream/v8/src/frames.h +854 -0
  181. data/ext/v8/upstream/v8/src/full-codegen.cc +1385 -0
  182. data/ext/v8/upstream/v8/src/full-codegen.h +753 -0
  183. data/ext/v8/upstream/v8/src/func-name-inferrer.cc +91 -0
  184. data/ext/v8/upstream/v8/src/func-name-inferrer.h +111 -0
  185. data/ext/v8/upstream/v8/src/gdb-jit.cc +1548 -0
  186. data/ext/v8/upstream/{3.1.8 → v8}/src/gdb-jit.h +0 -0
  187. data/ext/v8/upstream/v8/src/global-handles.cc +596 -0
  188. data/ext/v8/upstream/v8/src/global-handles.h +239 -0
  189. data/ext/v8/upstream/v8/src/globals.h +325 -0
  190. data/ext/v8/upstream/v8/src/handles-inl.h +177 -0
  191. data/ext/v8/upstream/v8/src/handles.cc +965 -0
  192. data/ext/v8/upstream/v8/src/handles.h +372 -0
  193. data/ext/v8/upstream/{3.1.8 → v8}/src/hashmap.cc +0 -0
  194. data/ext/v8/upstream/v8/src/hashmap.h +121 -0
  195. data/ext/v8/upstream/v8/src/heap-inl.h +703 -0
  196. data/ext/v8/upstream/v8/src/heap-profiler.cc +1173 -0
  197. data/ext/v8/upstream/v8/src/heap-profiler.h +396 -0
  198. data/ext/v8/upstream/v8/src/heap.cc +5856 -0
  199. data/ext/v8/upstream/v8/src/heap.h +2264 -0
  200. data/ext/v8/upstream/v8/src/hydrogen-instructions.cc +1639 -0
  201. data/ext/v8/upstream/v8/src/hydrogen-instructions.h +3657 -0
  202. data/ext/v8/upstream/v8/src/hydrogen.cc +6011 -0
  203. data/ext/v8/upstream/v8/src/hydrogen.h +1137 -0
  204. data/ext/v8/upstream/v8/src/ia32/assembler-ia32-inl.h +430 -0
  205. data/ext/v8/upstream/v8/src/ia32/assembler-ia32.cc +2846 -0
  206. data/ext/v8/upstream/v8/src/ia32/assembler-ia32.h +1159 -0
  207. data/ext/v8/upstream/v8/src/ia32/builtins-ia32.cc +1596 -0
  208. data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.cc +6549 -0
  209. data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.h +495 -0
  210. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/codegen-ia32-inl.h +0 -0
  211. data/ext/v8/upstream/v8/src/ia32/codegen-ia32.cc +10385 -0
  212. data/ext/v8/upstream/v8/src/ia32/codegen-ia32.h +801 -0
  213. data/ext/v8/upstream/v8/src/ia32/cpu-ia32.cc +88 -0
  214. data/ext/v8/upstream/v8/src/ia32/debug-ia32.cc +312 -0
  215. data/ext/v8/upstream/v8/src/ia32/deoptimizer-ia32.cc +774 -0
  216. data/ext/v8/upstream/v8/src/ia32/disasm-ia32.cc +1620 -0
  217. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/frames-ia32.cc +0 -0
  218. data/ext/v8/upstream/v8/src/ia32/frames-ia32.h +140 -0
  219. data/ext/v8/upstream/v8/src/ia32/full-codegen-ia32.cc +4357 -0
  220. data/ext/v8/upstream/v8/src/ia32/ic-ia32.cc +1779 -0
  221. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/jump-target-ia32.cc +0 -0
  222. data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.cc +4158 -0
  223. data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.h +318 -0
  224. data/ext/v8/upstream/v8/src/ia32/lithium-gap-resolver-ia32.cc +466 -0
  225. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/lithium-gap-resolver-ia32.h +0 -0
  226. data/ext/v8/upstream/v8/src/ia32/lithium-ia32.cc +2181 -0
  227. data/ext/v8/upstream/v8/src/ia32/lithium-ia32.h +2235 -0
  228. data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.cc +2056 -0
  229. data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.h +807 -0
  230. data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.cc +1264 -0
  231. data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.h +216 -0
  232. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  233. data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32.cc +157 -0
  234. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/register-allocator-ia32.h +0 -0
  235. data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/simulator-ia32.cc +0 -0
  236. data/ext/v8/upstream/v8/src/ia32/simulator-ia32.h +72 -0
  237. data/ext/v8/upstream/v8/src/ia32/stub-cache-ia32.cc +3711 -0
  238. data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.cc +1366 -0
  239. data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.h +650 -0
  240. data/ext/v8/upstream/v8/src/ic-inl.h +130 -0
  241. data/ext/v8/upstream/v8/src/ic.cc +2389 -0
  242. data/ext/v8/upstream/v8/src/ic.h +675 -0
  243. data/ext/v8/upstream/{3.1.8 → v8}/src/inspector.cc +0 -0
  244. data/ext/v8/upstream/{3.1.8 → v8}/src/inspector.h +0 -0
  245. data/ext/v8/upstream/v8/src/interpreter-irregexp.cc +659 -0
  246. data/ext/v8/upstream/v8/src/interpreter-irregexp.h +49 -0
  247. data/ext/v8/upstream/v8/src/isolate.cc +883 -0
  248. data/ext/v8/upstream/v8/src/isolate.h +1306 -0
  249. data/ext/v8/upstream/v8/src/json.js +342 -0
  250. data/ext/v8/upstream/v8/src/jsregexp.cc +5371 -0
  251. data/ext/v8/upstream/v8/src/jsregexp.h +1483 -0
  252. data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target-heavy-inl.h +0 -0
  253. data/ext/v8/upstream/v8/src/jump-target-heavy.cc +427 -0
  254. data/ext/v8/upstream/v8/src/jump-target-heavy.h +238 -0
  255. data/ext/v8/upstream/v8/src/jump-target-inl.h +48 -0
  256. data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target-light-inl.h +0 -0
  257. data/ext/v8/upstream/v8/src/jump-target-light.cc +111 -0
  258. data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target-light.h +0 -0
  259. data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target.cc +0 -0
  260. data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target.h +0 -0
  261. data/ext/v8/upstream/{3.1.8 → v8}/src/list-inl.h +0 -0
  262. data/ext/v8/upstream/{3.1.8 → v8}/src/list.h +0 -0
  263. data/ext/v8/upstream/v8/src/lithium-allocator-inl.h +142 -0
  264. data/ext/v8/upstream/v8/src/lithium-allocator.cc +2105 -0
  265. data/ext/v8/upstream/v8/src/lithium-allocator.h +630 -0
  266. data/ext/v8/upstream/v8/src/lithium.cc +169 -0
  267. data/ext/v8/upstream/{3.1.8 → v8}/src/lithium.h +0 -0
  268. data/ext/v8/upstream/{3.1.8 → v8}/src/liveedit-debugger.js +0 -0
  269. data/ext/v8/upstream/v8/src/liveedit.cc +1693 -0
  270. data/ext/v8/upstream/v8/src/liveedit.h +179 -0
  271. data/ext/v8/upstream/{3.1.8 → v8}/src/liveobjectlist-inl.h +0 -0
  272. data/ext/v8/upstream/v8/src/liveobjectlist.cc +2589 -0
  273. data/ext/v8/upstream/v8/src/liveobjectlist.h +322 -0
  274. data/ext/v8/upstream/{3.1.8 → v8}/src/log-inl.h +0 -0
  275. data/ext/v8/upstream/v8/src/log-utils.cc +423 -0
  276. data/ext/v8/upstream/v8/src/log-utils.h +229 -0
  277. data/ext/v8/upstream/v8/src/log.cc +1666 -0
  278. data/ext/v8/upstream/v8/src/log.h +446 -0
  279. data/ext/v8/upstream/{3.1.8 → v8}/src/macro-assembler.h +0 -0
  280. data/ext/v8/upstream/{3.1.8 → v8}/src/macros.py +0 -0
  281. data/ext/v8/upstream/v8/src/mark-compact.cc +3092 -0
  282. data/ext/v8/upstream/v8/src/mark-compact.h +506 -0
  283. data/ext/v8/upstream/{3.1.8 → v8}/src/math.js +0 -0
  284. data/ext/v8/upstream/v8/src/messages.cc +166 -0
  285. data/ext/v8/upstream/{3.1.8 → v8}/src/messages.h +0 -0
  286. data/ext/v8/upstream/v8/src/messages.js +1090 -0
  287. data/ext/v8/upstream/v8/src/mips/assembler-mips-inl.h +335 -0
  288. data/ext/v8/upstream/v8/src/mips/assembler-mips.cc +2093 -0
  289. data/ext/v8/upstream/v8/src/mips/assembler-mips.h +1066 -0
  290. data/ext/v8/upstream/v8/src/mips/builtins-mips.cc +148 -0
  291. data/ext/v8/upstream/v8/src/mips/code-stubs-mips.cc +752 -0
  292. data/ext/v8/upstream/v8/src/mips/code-stubs-mips.h +511 -0
  293. data/ext/v8/upstream/v8/src/mips/codegen-mips-inl.h +64 -0
  294. data/ext/v8/upstream/v8/src/mips/codegen-mips.cc +1213 -0
  295. data/ext/v8/upstream/v8/src/mips/codegen-mips.h +633 -0
  296. data/ext/v8/upstream/v8/src/mips/constants-mips.cc +352 -0
  297. data/ext/v8/upstream/v8/src/mips/constants-mips.h +723 -0
  298. data/ext/v8/upstream/v8/src/mips/cpu-mips.cc +90 -0
  299. data/ext/v8/upstream/v8/src/mips/debug-mips.cc +155 -0
  300. data/ext/v8/upstream/v8/src/mips/deoptimizer-mips.cc +91 -0
  301. data/ext/v8/upstream/v8/src/mips/disasm-mips.cc +1023 -0
  302. data/ext/v8/upstream/v8/src/mips/frames-mips.cc +48 -0
  303. data/ext/v8/upstream/v8/src/mips/frames-mips.h +179 -0
  304. data/ext/v8/upstream/v8/src/mips/full-codegen-mips.cc +727 -0
  305. data/ext/v8/upstream/v8/src/mips/ic-mips.cc +244 -0
  306. data/ext/v8/upstream/v8/src/mips/jump-target-mips.cc +80 -0
  307. data/ext/v8/upstream/v8/src/mips/lithium-codegen-mips.h +65 -0
  308. data/ext/v8/upstream/v8/src/mips/lithium-mips.h +304 -0
  309. data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.cc +3327 -0
  310. data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.h +1058 -0
  311. data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.cc +478 -0
  312. data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.h +250 -0
  313. data/ext/v8/upstream/v8/src/mips/register-allocator-mips-inl.h +134 -0
  314. data/ext/v8/upstream/{3.1.8 → v8}/src/mips/register-allocator-mips.cc +0 -0
  315. data/ext/v8/upstream/v8/src/mips/register-allocator-mips.h +47 -0
  316. data/ext/v8/upstream/v8/src/mips/simulator-mips.cc +2438 -0
  317. data/ext/v8/upstream/v8/src/mips/simulator-mips.h +394 -0
  318. data/ext/v8/upstream/v8/src/mips/stub-cache-mips.cc +601 -0
  319. data/ext/v8/upstream/v8/src/mips/virtual-frame-mips-inl.h +58 -0
  320. data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.cc +307 -0
  321. data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.h +530 -0
  322. data/ext/v8/upstream/v8/src/mirror-debugger.js +2381 -0
  323. data/ext/v8/upstream/v8/src/mksnapshot.cc +256 -0
  324. data/ext/v8/upstream/{3.1.8 → v8}/src/natives.h +0 -0
  325. data/ext/v8/upstream/v8/src/objects-debug.cc +722 -0
  326. data/ext/v8/upstream/v8/src/objects-inl.h +4166 -0
  327. data/ext/v8/upstream/v8/src/objects-printer.cc +801 -0
  328. data/ext/v8/upstream/v8/src/objects-visiting.cc +142 -0
  329. data/ext/v8/upstream/v8/src/objects-visiting.h +422 -0
  330. data/ext/v8/upstream/v8/src/objects.cc +10296 -0
  331. data/ext/v8/upstream/v8/src/objects.h +6662 -0
  332. data/ext/v8/upstream/v8/src/parser.cc +5168 -0
  333. data/ext/v8/upstream/v8/src/parser.h +823 -0
  334. data/ext/v8/upstream/v8/src/platform-cygwin.cc +811 -0
  335. data/ext/v8/upstream/v8/src/platform-freebsd.cc +854 -0
  336. data/ext/v8/upstream/v8/src/platform-linux.cc +1120 -0
  337. data/ext/v8/upstream/v8/src/platform-macos.cc +865 -0
  338. data/ext/v8/upstream/v8/src/platform-nullos.cc +504 -0
  339. data/ext/v8/upstream/v8/src/platform-openbsd.cc +672 -0
  340. data/ext/v8/upstream/v8/src/platform-posix.cc +424 -0
  341. data/ext/v8/upstream/v8/src/platform-solaris.cc +796 -0
  342. data/ext/v8/upstream/v8/src/platform-tls-mac.h +62 -0
  343. data/ext/v8/upstream/v8/src/platform-tls-win32.h +62 -0
  344. data/ext/v8/upstream/v8/src/platform-tls.h +50 -0
  345. data/ext/v8/upstream/v8/src/platform-win32.cc +2072 -0
  346. data/ext/v8/upstream/v8/src/platform.h +693 -0
  347. data/ext/v8/upstream/v8/src/preparse-data.cc +185 -0
  348. data/ext/v8/upstream/{3.1.8 → v8}/src/preparse-data.h +0 -0
  349. data/ext/v8/upstream/v8/src/preparser-api.cc +219 -0
  350. data/ext/v8/upstream/v8/src/preparser.cc +1205 -0
  351. data/ext/v8/upstream/{3.1.8 → v8}/src/preparser.h +0 -0
  352. data/ext/v8/upstream/v8/src/prettyprinter.cc +1530 -0
  353. data/ext/v8/upstream/v8/src/prettyprinter.h +223 -0
  354. data/ext/v8/upstream/{3.1.8 → v8}/src/profile-generator-inl.h +0 -0
  355. data/ext/v8/upstream/v8/src/profile-generator.cc +3095 -0
  356. data/ext/v8/upstream/v8/src/profile-generator.h +1125 -0
  357. data/ext/v8/upstream/v8/src/property.cc +102 -0
  358. data/ext/v8/upstream/v8/src/property.h +348 -0
  359. data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  360. data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp.cc +470 -0
  361. data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-irregexp.h +0 -0
  362. data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-tracer.cc +0 -0
  363. data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-tracer.h +0 -0
  364. data/ext/v8/upstream/v8/src/regexp-macro-assembler.cc +266 -0
  365. data/ext/v8/upstream/v8/src/regexp-macro-assembler.h +236 -0
  366. data/ext/v8/upstream/v8/src/regexp-stack.cc +111 -0
  367. data/ext/v8/upstream/v8/src/regexp-stack.h +147 -0
  368. data/ext/v8/upstream/v8/src/regexp.js +483 -0
  369. data/ext/v8/upstream/v8/src/register-allocator-inl.h +141 -0
  370. data/ext/v8/upstream/v8/src/register-allocator.cc +98 -0
  371. data/ext/v8/upstream/v8/src/register-allocator.h +310 -0
  372. data/ext/v8/upstream/v8/src/rewriter.cc +1024 -0
  373. data/ext/v8/upstream/{3.1.8 → v8}/src/rewriter.h +0 -0
  374. data/ext/v8/upstream/v8/src/runtime-profiler.cc +478 -0
  375. data/ext/v8/upstream/v8/src/runtime-profiler.h +192 -0
  376. data/ext/v8/upstream/v8/src/runtime.cc +11949 -0
  377. data/ext/v8/upstream/v8/src/runtime.h +643 -0
  378. data/ext/v8/upstream/{3.1.8 → v8}/src/runtime.js +0 -0
  379. data/ext/v8/upstream/v8/src/safepoint-table.cc +256 -0
  380. data/ext/v8/upstream/v8/src/safepoint-table.h +269 -0
  381. data/ext/v8/upstream/v8/src/scanner-base.cc +964 -0
  382. data/ext/v8/upstream/v8/src/scanner-base.h +664 -0
  383. data/ext/v8/upstream/v8/src/scanner.cc +584 -0
  384. data/ext/v8/upstream/v8/src/scanner.h +196 -0
  385. data/ext/v8/upstream/v8/src/scopeinfo.cc +631 -0
  386. data/ext/v8/upstream/v8/src/scopeinfo.h +249 -0
  387. data/ext/v8/upstream/v8/src/scopes.cc +1093 -0
  388. data/ext/v8/upstream/v8/src/scopes.h +508 -0
  389. data/ext/v8/upstream/v8/src/serialize.cc +1574 -0
  390. data/ext/v8/upstream/v8/src/serialize.h +589 -0
  391. data/ext/v8/upstream/{3.1.8 → v8}/src/shell.h +0 -0
  392. data/ext/v8/upstream/{3.1.8 → v8}/src/simulator.h +0 -0
  393. data/ext/v8/upstream/v8/src/small-pointer-list.h +163 -0
  394. data/ext/v8/upstream/{3.1.8 → v8}/src/smart-pointer.h +0 -0
  395. data/ext/v8/upstream/v8/src/snapshot-common.cc +82 -0
  396. data/ext/v8/upstream/{3.1.8 → v8}/src/snapshot-empty.cc +0 -0
  397. data/ext/v8/upstream/v8/src/snapshot.h +73 -0
  398. data/ext/v8/upstream/v8/src/spaces-inl.h +529 -0
  399. data/ext/v8/upstream/v8/src/spaces.cc +3147 -0
  400. data/ext/v8/upstream/v8/src/spaces.h +2368 -0
  401. data/ext/v8/upstream/{3.1.8 → v8}/src/splay-tree-inl.h +0 -0
  402. data/ext/v8/upstream/{3.1.8 → v8}/src/splay-tree.h +0 -0
  403. data/ext/v8/upstream/v8/src/string-search.cc +41 -0
  404. data/ext/v8/upstream/v8/src/string-search.h +568 -0
  405. data/ext/v8/upstream/v8/src/string-stream.cc +592 -0
  406. data/ext/v8/upstream/{3.1.8 → v8}/src/string-stream.h +0 -0
  407. data/ext/v8/upstream/v8/src/string.js +915 -0
  408. data/ext/v8/upstream/{3.1.8 → v8}/src/strtod.cc +0 -0
  409. data/ext/v8/upstream/{3.1.8 → v8}/src/strtod.h +0 -0
  410. data/ext/v8/upstream/v8/src/stub-cache.cc +1940 -0
  411. data/ext/v8/upstream/v8/src/stub-cache.h +866 -0
  412. data/ext/v8/upstream/{3.1.8 → v8}/src/third_party/valgrind/valgrind.h +0 -0
  413. data/ext/v8/upstream/v8/src/token.cc +63 -0
  414. data/ext/v8/upstream/v8/src/token.h +288 -0
  415. data/ext/v8/upstream/v8/src/top.cc +983 -0
  416. data/ext/v8/upstream/v8/src/type-info.cc +472 -0
  417. data/ext/v8/upstream/v8/src/type-info.h +290 -0
  418. data/ext/v8/upstream/{3.1.8 → v8}/src/unbound-queue-inl.h +0 -0
  419. data/ext/v8/upstream/{3.1.8 → v8}/src/unbound-queue.h +0 -0
  420. data/ext/v8/upstream/{3.1.8 → v8}/src/unicode-inl.h +0 -0
  421. data/ext/v8/upstream/v8/src/unicode.cc +1624 -0
  422. data/ext/v8/upstream/v8/src/unicode.h +280 -0
  423. data/ext/v8/upstream/{3.1.8 → v8}/src/uri.js +0 -0
  424. data/ext/v8/upstream/{3.1.8 → v8}/src/utils.cc +0 -0
  425. data/ext/v8/upstream/v8/src/utils.h +796 -0
  426. data/ext/v8/upstream/v8/src/v8-counters.cc +62 -0
  427. data/ext/v8/upstream/v8/src/v8-counters.h +311 -0
  428. data/ext/v8/upstream/v8/src/v8.cc +215 -0
  429. data/ext/v8/upstream/v8/src/v8.h +130 -0
  430. data/ext/v8/upstream/{3.1.8 → v8}/src/v8checks.h +0 -0
  431. data/ext/v8/upstream/{3.1.8 → v8}/src/v8dll-main.cc +0 -0
  432. data/ext/v8/upstream/v8/src/v8globals.h +486 -0
  433. data/ext/v8/upstream/{3.1.8/src/memory.h → v8/src/v8memory.h} +0 -0
  434. data/ext/v8/upstream/v8/src/v8natives.js +1293 -0
  435. data/ext/v8/upstream/{3.1.8 → v8}/src/v8preparserdll-main.cc +0 -0
  436. data/ext/v8/upstream/v8/src/v8threads.cc +453 -0
  437. data/ext/v8/upstream/v8/src/v8threads.h +164 -0
  438. data/ext/v8/upstream/v8/src/v8utils.h +317 -0
  439. data/ext/v8/upstream/{3.1.8 → v8}/src/variables.cc +0 -0
  440. data/ext/v8/upstream/v8/src/variables.h +212 -0
  441. data/ext/v8/upstream/v8/src/version.cc +116 -0
  442. data/ext/v8/upstream/v8/src/version.h +68 -0
  443. data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-heavy-inl.h +0 -0
  444. data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-heavy.cc +0 -0
  445. data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-inl.h +0 -0
  446. data/ext/v8/upstream/v8/src/virtual-frame-light-inl.h +171 -0
  447. data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-light.cc +0 -0
  448. data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame.cc +0 -0
  449. data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame.h +0 -0
  450. data/ext/v8/upstream/v8/src/vm-state-inl.h +138 -0
  451. data/ext/v8/upstream/v8/src/vm-state.h +70 -0
  452. data/ext/v8/upstream/v8/src/win32-headers.h +96 -0
  453. data/ext/v8/upstream/v8/src/x64/assembler-x64-inl.h +456 -0
  454. data/ext/v8/upstream/v8/src/x64/assembler-x64.cc +2954 -0
  455. data/ext/v8/upstream/v8/src/x64/assembler-x64.h +1630 -0
  456. data/ext/v8/upstream/v8/src/x64/builtins-x64.cc +1493 -0
  457. data/ext/v8/upstream/v8/src/x64/code-stubs-x64.cc +5132 -0
  458. data/ext/v8/upstream/v8/src/x64/code-stubs-x64.h +477 -0
  459. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/codegen-x64-inl.h +0 -0
  460. data/ext/v8/upstream/v8/src/x64/codegen-x64.cc +8843 -0
  461. data/ext/v8/upstream/v8/src/x64/codegen-x64.h +753 -0
  462. data/ext/v8/upstream/v8/src/x64/cpu-x64.cc +88 -0
  463. data/ext/v8/upstream/v8/src/x64/debug-x64.cc +318 -0
  464. data/ext/v8/upstream/v8/src/x64/deoptimizer-x64.cc +815 -0
  465. data/ext/v8/upstream/v8/src/x64/disasm-x64.cc +1752 -0
  466. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/frames-x64.cc +0 -0
  467. data/ext/v8/upstream/v8/src/x64/frames-x64.h +130 -0
  468. data/ext/v8/upstream/v8/src/x64/full-codegen-x64.cc +4339 -0
  469. data/ext/v8/upstream/v8/src/x64/ic-x64.cc +1752 -0
  470. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/jump-target-x64.cc +0 -0
  471. data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.cc +3970 -0
  472. data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.h +318 -0
  473. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/lithium-gap-resolver-x64.cc +0 -0
  474. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/lithium-gap-resolver-x64.h +0 -0
  475. data/ext/v8/upstream/v8/src/x64/lithium-x64.cc +2115 -0
  476. data/ext/v8/upstream/v8/src/x64/lithium-x64.h +2161 -0
  477. data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.cc +2911 -0
  478. data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.h +1984 -0
  479. data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.cc +1398 -0
  480. data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.h +282 -0
  481. data/ext/v8/upstream/v8/src/x64/register-allocator-x64-inl.h +87 -0
  482. data/ext/v8/upstream/v8/src/x64/register-allocator-x64.cc +95 -0
  483. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/register-allocator-x64.h +0 -0
  484. data/ext/v8/upstream/{3.1.8 → v8}/src/x64/simulator-x64.cc +0 -0
  485. data/ext/v8/upstream/v8/src/x64/simulator-x64.h +71 -0
  486. data/ext/v8/upstream/v8/src/x64/stub-cache-x64.cc +3460 -0
  487. data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.cc +1296 -0
  488. data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.h +597 -0
  489. data/ext/v8/upstream/v8/src/zone-inl.h +129 -0
  490. data/ext/v8/upstream/v8/src/zone.cc +196 -0
  491. data/ext/v8/upstream/v8/src/zone.h +236 -0
  492. data/ext/v8/upstream/{3.1.8 → v8}/tools/codemap.js +0 -0
  493. data/ext/v8/upstream/{3.1.8 → v8}/tools/consarray.js +0 -0
  494. data/ext/v8/upstream/{3.1.8 → v8}/tools/csvparser.js +0 -0
  495. data/ext/v8/upstream/{3.1.8 → v8}/tools/disasm.py +0 -0
  496. data/ext/v8/upstream/v8/tools/freebsd-tick-processor +10 -0
  497. data/ext/v8/upstream/{3.1.8 → v8}/tools/gc-nvp-trace-processor.py +0 -0
  498. data/ext/v8/upstream/{3.1.8 → v8}/tools/generate-ten-powers.scm +0 -0
  499. data/ext/v8/upstream/{3.1.8 → v8}/tools/grokdump.py +0 -0
  500. data/ext/v8/upstream/v8/tools/gyp/v8.gyp +844 -0
  501. data/ext/v8/upstream/{3.1.8 → v8}/tools/js2c.py +0 -0
  502. data/ext/v8/upstream/{3.1.8 → v8}/tools/jsmin.py +0 -0
  503. data/ext/v8/upstream/v8/tools/linux-tick-processor +35 -0
  504. data/ext/v8/upstream/{3.1.8 → v8}/tools/ll_prof.py +0 -0
  505. data/ext/v8/upstream/{3.1.8 → v8}/tools/logreader.js +0 -0
  506. data/ext/v8/upstream/{3.1.8 → v8}/tools/mac-nm +0 -0
  507. data/ext/v8/upstream/{3.1.8 → v8}/tools/mac-tick-processor +0 -0
  508. data/ext/v8/upstream/{3.1.8 → v8}/tools/oom_dump/README +0 -0
  509. data/ext/v8/upstream/{3.1.8 → v8}/tools/oom_dump/SConstruct +0 -0
  510. data/ext/v8/upstream/{3.1.8 → v8}/tools/oom_dump/oom_dump.cc +0 -0
  511. data/ext/v8/upstream/{3.1.8 → v8}/tools/presubmit.py +0 -0
  512. data/ext/v8/upstream/{3.1.8 → v8}/tools/process-heap-prof.py +0 -0
  513. data/ext/v8/upstream/{3.1.8 → v8}/tools/profile.js +0 -0
  514. data/ext/v8/upstream/{3.1.8 → v8}/tools/profile_view.js +0 -0
  515. data/ext/v8/upstream/{3.1.8 → v8}/tools/run-valgrind.py +0 -0
  516. data/ext/v8/upstream/{3.1.8 → v8}/tools/splaytree.js +0 -0
  517. data/ext/v8/upstream/{3.1.8 → v8}/tools/stats-viewer.py +0 -0
  518. data/ext/v8/upstream/v8/tools/test.py +1490 -0
  519. data/ext/v8/upstream/{3.1.8 → v8}/tools/tickprocessor-driver.js +0 -0
  520. data/ext/v8/upstream/v8/tools/tickprocessor.js +877 -0
  521. data/ext/v8/upstream/{3.1.8 → v8}/tools/utils.py +0 -0
  522. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/README.txt +0 -0
  523. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/arm.vsprops +0 -0
  524. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/common.vsprops +0 -0
  525. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8.vcproj +0 -0
  526. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8_arm.vcproj +0 -0
  527. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8_x64.vcproj +0 -0
  528. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8js2c.cmd +0 -0
  529. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/debug.vsprops +0 -0
  530. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/ia32.vsprops +0 -0
  531. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/js2c.cmd +0 -0
  532. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/release.vsprops +0 -0
  533. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8.sln +0 -0
  534. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8.vcproj +0 -0
  535. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_arm.sln +0 -0
  536. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_arm.vcproj +0 -0
  537. data/ext/v8/upstream/v8/tools/visual_studio/v8_base.vcproj +1308 -0
  538. data/ext/v8/upstream/v8/tools/visual_studio/v8_base_arm.vcproj +1238 -0
  539. data/ext/v8/upstream/v8/tools/visual_studio/v8_base_x64.vcproj +1300 -0
  540. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  541. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  542. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  543. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  544. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  545. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  546. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  547. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  548. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_shell_sample.vcproj +0 -0
  549. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -0
  550. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -0
  551. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  552. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  553. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  554. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  555. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_x64.sln +0 -0
  556. data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_x64.vcproj +0 -0
  557. data/ext/v8/upstream/v8/tools/visual_studio/x64.vsprops +18 -0
  558. data/ext/v8/upstream/{3.1.8 → v8}/tools/windows-tick-processor.bat +0 -0
  559. data/ext/v8/v8_callbacks.cpp +52 -92
  560. data/ext/v8/v8_date.cpp +2 -3
  561. data/ext/v8/v8_object.cpp +4 -0
  562. data/ext/v8/v8_template.cpp +2 -2
  563. data/ext/v8/v8_try_catch.cpp +8 -38
  564. data/lib/v8/version.rb +1 -1
  565. data/spec/ext/ext_spec_helper.rb +2 -20
  566. data/spec/ext/object_spec.rb +0 -12
  567. data/spec/ext/try_catch_spec.rb +29 -1
  568. data/spec/spec_helper.rb +1 -0
  569. data/spec/v8/portal/proxies_spec.rb +1 -84
  570. data/specmem/handle_memspec.rb +41 -0
  571. data/specmem/object_memspec.rb +16 -0
  572. data/specmem/proxies_memspec.rb +86 -0
  573. data/specmem/spec_helper.rb +24 -0
  574. data/therubyracer.gemspec +7 -2
  575. metadata +564 -541
  576. data/ext/v8/upstream/3.1.8/.gitignore +0 -31
  577. data/ext/v8/upstream/3.1.8/AUTHORS +0 -40
  578. data/ext/v8/upstream/3.1.8/ChangeLog +0 -2566
  579. data/ext/v8/upstream/3.1.8/SConstruct +0 -1192
  580. data/ext/v8/upstream/3.1.8/include/v8-debug.h +0 -384
  581. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +0 -116
  582. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +0 -426
  583. data/ext/v8/upstream/3.1.8/include/v8-testing.h +0 -99
  584. data/ext/v8/upstream/3.1.8/include/v8.h +0 -3846
  585. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +0 -206
  586. data/ext/v8/upstream/3.1.8/src/SConscript +0 -356
  587. data/ext/v8/upstream/3.1.8/src/accessors.cc +0 -907
  588. data/ext/v8/upstream/3.1.8/src/allocation.cc +0 -204
  589. data/ext/v8/upstream/3.1.8/src/allocation.h +0 -176
  590. data/ext/v8/upstream/3.1.8/src/api.cc +0 -5191
  591. data/ext/v8/upstream/3.1.8/src/api.h +0 -508
  592. data/ext/v8/upstream/3.1.8/src/apiutils.h +0 -80
  593. data/ext/v8/upstream/3.1.8/src/arguments.h +0 -105
  594. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +0 -352
  595. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +0 -2756
  596. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +0 -1294
  597. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +0 -1628
  598. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +0 -6783
  599. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +0 -657
  600. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +0 -7403
  601. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +0 -595
  602. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +0 -769
  603. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +0 -147
  604. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +0 -315
  605. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +0 -700
  606. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +0 -1439
  607. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +0 -168
  608. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +0 -4230
  609. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +0 -1799
  610. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +0 -2041
  611. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +0 -2046
  612. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +0 -3822
  613. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +0 -312
  614. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +0 -303
  615. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +0 -2701
  616. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +0 -1015
  617. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +0 -1280
  618. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +0 -252
  619. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +0 -3165
  620. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +0 -402
  621. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +0 -4077
  622. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +0 -843
  623. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +0 -520
  624. data/ext/v8/upstream/3.1.8/src/array.js +0 -1231
  625. data/ext/v8/upstream/3.1.8/src/assembler.cc +0 -973
  626. data/ext/v8/upstream/3.1.8/src/assembler.h +0 -787
  627. data/ext/v8/upstream/3.1.8/src/ast-inl.h +0 -107
  628. data/ext/v8/upstream/3.1.8/src/ast.cc +0 -1067
  629. data/ext/v8/upstream/3.1.8/src/ast.h +0 -2177
  630. data/ext/v8/upstream/3.1.8/src/atomicops.h +0 -165
  631. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +0 -1888
  632. data/ext/v8/upstream/3.1.8/src/bootstrapper.h +0 -118
  633. data/ext/v8/upstream/3.1.8/src/builtins.cc +0 -1586
  634. data/ext/v8/upstream/3.1.8/src/builtins.h +0 -339
  635. data/ext/v8/upstream/3.1.8/src/checks.cc +0 -110
  636. data/ext/v8/upstream/3.1.8/src/checks.h +0 -292
  637. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +0 -230
  638. data/ext/v8/upstream/3.1.8/src/code-stubs.h +0 -950
  639. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +0 -64
  640. data/ext/v8/upstream/3.1.8/src/codegen.cc +0 -495
  641. data/ext/v8/upstream/3.1.8/src/codegen.h +0 -245
  642. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +0 -654
  643. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +0 -112
  644. data/ext/v8/upstream/3.1.8/src/compiler.cc +0 -806
  645. data/ext/v8/upstream/3.1.8/src/compiler.h +0 -290
  646. data/ext/v8/upstream/3.1.8/src/contexts.cc +0 -320
  647. data/ext/v8/upstream/3.1.8/src/contexts.h +0 -376
  648. data/ext/v8/upstream/3.1.8/src/conversions.cc +0 -1069
  649. data/ext/v8/upstream/3.1.8/src/counters.cc +0 -78
  650. data/ext/v8/upstream/3.1.8/src/counters.h +0 -242
  651. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +0 -100
  652. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +0 -554
  653. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +0 -291
  654. data/ext/v8/upstream/3.1.8/src/cpu.h +0 -65
  655. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +0 -367
  656. data/ext/v8/upstream/3.1.8/src/d8-debug.h +0 -157
  657. data/ext/v8/upstream/3.1.8/src/d8-posix.cc +0 -693
  658. data/ext/v8/upstream/3.1.8/src/d8.cc +0 -792
  659. data/ext/v8/upstream/3.1.8/src/d8.gyp +0 -85
  660. data/ext/v8/upstream/3.1.8/src/data-flow.h +0 -379
  661. data/ext/v8/upstream/3.1.8/src/dateparser.h +0 -263
  662. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +0 -446
  663. data/ext/v8/upstream/3.1.8/src/debug-agent.h +0 -131
  664. data/ext/v8/upstream/3.1.8/src/debug.cc +0 -3085
  665. data/ext/v8/upstream/3.1.8/src/debug.h +0 -1025
  666. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +0 -1185
  667. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +0 -529
  668. data/ext/v8/upstream/3.1.8/src/disasm.h +0 -77
  669. data/ext/v8/upstream/3.1.8/src/disassembler.cc +0 -338
  670. data/ext/v8/upstream/3.1.8/src/execution.cc +0 -735
  671. data/ext/v8/upstream/3.1.8/src/execution.h +0 -322
  672. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +0 -53
  673. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +0 -264
  674. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +0 -141
  675. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +0 -58
  676. data/ext/v8/upstream/3.1.8/src/factory.cc +0 -1087
  677. data/ext/v8/upstream/3.1.8/src/factory.h +0 -432
  678. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +0 -552
  679. data/ext/v8/upstream/3.1.8/src/frame-element.cc +0 -42
  680. data/ext/v8/upstream/3.1.8/src/frame-element.h +0 -277
  681. data/ext/v8/upstream/3.1.8/src/frames-inl.h +0 -210
  682. data/ext/v8/upstream/3.1.8/src/frames.cc +0 -1232
  683. data/ext/v8/upstream/3.1.8/src/frames.h +0 -826
  684. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +0 -1382
  685. data/ext/v8/upstream/3.1.8/src/full-codegen.h +0 -751
  686. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +0 -90
  687. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +0 -111
  688. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +0 -1547
  689. data/ext/v8/upstream/3.1.8/src/global-handles.cc +0 -534
  690. data/ext/v8/upstream/3.1.8/src/global-handles.h +0 -181
  691. data/ext/v8/upstream/3.1.8/src/globals.h +0 -325
  692. data/ext/v8/upstream/3.1.8/src/handles-inl.h +0 -80
  693. data/ext/v8/upstream/3.1.8/src/handles.cc +0 -910
  694. data/ext/v8/upstream/3.1.8/src/handles.h +0 -424
  695. data/ext/v8/upstream/3.1.8/src/hashmap.h +0 -121
  696. data/ext/v8/upstream/3.1.8/src/heap-inl.h +0 -587
  697. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +0 -1128
  698. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +0 -381
  699. data/ext/v8/upstream/3.1.8/src/heap.cc +0 -5610
  700. data/ext/v8/upstream/3.1.8/src/heap.h +0 -2218
  701. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +0 -1490
  702. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +0 -3493
  703. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +0 -6056
  704. data/ext/v8/upstream/3.1.8/src/hydrogen.h +0 -1091
  705. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +0 -429
  706. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +0 -2800
  707. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +0 -1093
  708. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +0 -1590
  709. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +0 -6624
  710. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +0 -536
  711. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +0 -10354
  712. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +0 -798
  713. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +0 -87
  714. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +0 -309
  715. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +0 -664
  716. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +0 -1597
  717. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +0 -140
  718. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +0 -4278
  719. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +0 -1786
  720. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +0 -3880
  721. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +0 -309
  722. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +0 -460
  723. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +0 -2095
  724. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +0 -2127
  725. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +0 -2031
  726. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +0 -798
  727. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +0 -1253
  728. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +0 -215
  729. data/ext/v8/upstream/3.1.8/src/ia32/register-allocator-ia32.cc +0 -157
  730. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +0 -72
  731. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +0 -3732
  732. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +0 -1360
  733. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +0 -646
  734. data/ext/v8/upstream/3.1.8/src/ic-inl.h +0 -129
  735. data/ext/v8/upstream/3.1.8/src/ic.cc +0 -2333
  736. data/ext/v8/upstream/3.1.8/src/ic.h +0 -639
  737. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +0 -655
  738. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.h +0 -48
  739. data/ext/v8/upstream/3.1.8/src/json.js +0 -342
  740. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +0 -5340
  741. data/ext/v8/upstream/3.1.8/src/jsregexp.h +0 -1484
  742. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +0 -430
  743. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +0 -244
  744. data/ext/v8/upstream/3.1.8/src/jump-target-inl.h +0 -48
  745. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +0 -111
  746. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +0 -140
  747. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +0 -2093
  748. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +0 -644
  749. data/ext/v8/upstream/3.1.8/src/lithium.cc +0 -168
  750. data/ext/v8/upstream/3.1.8/src/liveedit.cc +0 -1650
  751. data/ext/v8/upstream/3.1.8/src/liveedit.h +0 -174
  752. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +0 -2527
  753. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +0 -322
  754. data/ext/v8/upstream/3.1.8/src/log-utils.cc +0 -336
  755. data/ext/v8/upstream/3.1.8/src/log-utils.h +0 -232
  756. data/ext/v8/upstream/3.1.8/src/log.cc +0 -1608
  757. data/ext/v8/upstream/3.1.8/src/log.h +0 -379
  758. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +0 -2957
  759. data/ext/v8/upstream/3.1.8/src/mark-compact.h +0 -433
  760. data/ext/v8/upstream/3.1.8/src/messages.cc +0 -164
  761. data/ext/v8/upstream/3.1.8/src/messages.js +0 -1071
  762. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips-inl.h +0 -215
  763. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.cc +0 -1219
  764. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +0 -667
  765. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +0 -205
  766. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips-inl.h +0 -70
  767. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.cc +0 -1437
  768. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +0 -431
  769. data/ext/v8/upstream/3.1.8/src/mips/constants-mips.cc +0 -328
  770. data/ext/v8/upstream/3.1.8/src/mips/constants-mips.h +0 -525
  771. data/ext/v8/upstream/3.1.8/src/mips/cpu-mips.cc +0 -73
  772. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +0 -127
  773. data/ext/v8/upstream/3.1.8/src/mips/disasm-mips.cc +0 -787
  774. data/ext/v8/upstream/3.1.8/src/mips/fast-codegen-mips.cc +0 -77
  775. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +0 -96
  776. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.h +0 -164
  777. data/ext/v8/upstream/3.1.8/src/mips/full-codegen-mips.cc +0 -277
  778. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +0 -208
  779. data/ext/v8/upstream/3.1.8/src/mips/jump-target-mips.cc +0 -175
  780. data/ext/v8/upstream/3.1.8/src/mips/macro-assembler-mips.cc +0 -1326
  781. data/ext/v8/upstream/3.1.8/src/mips/macro-assembler-mips.h +0 -461
  782. data/ext/v8/upstream/3.1.8/src/mips/register-allocator-mips-inl.h +0 -137
  783. data/ext/v8/upstream/3.1.8/src/mips/register-allocator-mips.h +0 -46
  784. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +0 -1650
  785. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +0 -311
  786. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +0 -418
  787. data/ext/v8/upstream/3.1.8/src/mips/virtual-frame-mips.cc +0 -319
  788. data/ext/v8/upstream/3.1.8/src/mips/virtual-frame-mips.h +0 -548
  789. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +0 -2380
  790. data/ext/v8/upstream/3.1.8/src/mksnapshot.cc +0 -256
  791. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +0 -722
  792. data/ext/v8/upstream/3.1.8/src/objects-inl.h +0 -3946
  793. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +0 -801
  794. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +0 -142
  795. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +0 -401
  796. data/ext/v8/upstream/3.1.8/src/objects.cc +0 -10044
  797. data/ext/v8/upstream/3.1.8/src/objects.h +0 -6571
  798. data/ext/v8/upstream/3.1.8/src/parser.cc +0 -5165
  799. data/ext/v8/upstream/3.1.8/src/parser.h +0 -802
  800. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +0 -745
  801. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +0 -702
  802. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +0 -981
  803. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +0 -732
  804. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +0 -498
  805. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +0 -657
  806. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +0 -399
  807. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +0 -714
  808. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +0 -1974
  809. data/ext/v8/upstream/3.1.8/src/platform.h +0 -636
  810. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +0 -183
  811. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +0 -213
  812. data/ext/v8/upstream/3.1.8/src/preparser.cc +0 -1205
  813. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +0 -1539
  814. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +0 -223
  815. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +0 -2899
  816. data/ext/v8/upstream/3.1.8/src/profile-generator.h +0 -1151
  817. data/ext/v8/upstream/3.1.8/src/property.cc +0 -96
  818. data/ext/v8/upstream/3.1.8/src/property.h +0 -337
  819. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +0 -470
  820. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +0 -257
  821. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +0 -231
  822. data/ext/v8/upstream/3.1.8/src/regexp-stack.cc +0 -103
  823. data/ext/v8/upstream/3.1.8/src/regexp-stack.h +0 -123
  824. data/ext/v8/upstream/3.1.8/src/regexp.js +0 -483
  825. data/ext/v8/upstream/3.1.8/src/register-allocator-inl.h +0 -141
  826. data/ext/v8/upstream/3.1.8/src/register-allocator.cc +0 -104
  827. data/ext/v8/upstream/3.1.8/src/register-allocator.h +0 -320
  828. data/ext/v8/upstream/3.1.8/src/rewriter.cc +0 -1023
  829. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +0 -443
  830. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +0 -77
  831. data/ext/v8/upstream/3.1.8/src/runtime.cc +0 -11592
  832. data/ext/v8/upstream/3.1.8/src/runtime.h +0 -582
  833. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +0 -253
  834. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +0 -263
  835. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +0 -971
  836. data/ext/v8/upstream/3.1.8/src/scanner-base.h +0 -653
  837. data/ext/v8/upstream/3.1.8/src/scanner.cc +0 -586
  838. data/ext/v8/upstream/3.1.8/src/scanner.h +0 -194
  839. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +0 -636
  840. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +0 -238
  841. data/ext/v8/upstream/3.1.8/src/scopes.cc +0 -1063
  842. data/ext/v8/upstream/3.1.8/src/scopes.h +0 -494
  843. data/ext/v8/upstream/3.1.8/src/serialize.cc +0 -1535
  844. data/ext/v8/upstream/3.1.8/src/serialize.h +0 -584
  845. data/ext/v8/upstream/3.1.8/src/snapshot-common.cc +0 -82
  846. data/ext/v8/upstream/3.1.8/src/snapshot.h +0 -71
  847. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +0 -524
  848. data/ext/v8/upstream/3.1.8/src/spaces.cc +0 -3254
  849. data/ext/v8/upstream/3.1.8/src/spaces.h +0 -2362
  850. data/ext/v8/upstream/3.1.8/src/string-search.cc +0 -40
  851. data/ext/v8/upstream/3.1.8/src/string-search.h +0 -567
  852. data/ext/v8/upstream/3.1.8/src/string-stream.cc +0 -584
  853. data/ext/v8/upstream/3.1.8/src/string.js +0 -915
  854. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +0 -1878
  855. data/ext/v8/upstream/3.1.8/src/stub-cache.h +0 -849
  856. data/ext/v8/upstream/3.1.8/src/token.cc +0 -63
  857. data/ext/v8/upstream/3.1.8/src/token.h +0 -288
  858. data/ext/v8/upstream/3.1.8/src/top.cc +0 -1152
  859. data/ext/v8/upstream/3.1.8/src/top.h +0 -608
  860. data/ext/v8/upstream/3.1.8/src/type-info.cc +0 -406
  861. data/ext/v8/upstream/3.1.8/src/type-info.h +0 -283
  862. data/ext/v8/upstream/3.1.8/src/unicode.cc +0 -1624
  863. data/ext/v8/upstream/3.1.8/src/unicode.h +0 -280
  864. data/ext/v8/upstream/3.1.8/src/utils.h +0 -793
  865. data/ext/v8/upstream/3.1.8/src/v8-counters.cc +0 -55
  866. data/ext/v8/upstream/3.1.8/src/v8-counters.h +0 -290
  867. data/ext/v8/upstream/3.1.8/src/v8.cc +0 -270
  868. data/ext/v8/upstream/3.1.8/src/v8.h +0 -127
  869. data/ext/v8/upstream/3.1.8/src/v8globals.h +0 -480
  870. data/ext/v8/upstream/3.1.8/src/v8natives.js +0 -1252
  871. data/ext/v8/upstream/3.1.8/src/v8threads.cc +0 -440
  872. data/ext/v8/upstream/3.1.8/src/v8threads.h +0 -157
  873. data/ext/v8/upstream/3.1.8/src/v8utils.h +0 -354
  874. data/ext/v8/upstream/3.1.8/src/variables.h +0 -212
  875. data/ext/v8/upstream/3.1.8/src/version.cc +0 -95
  876. data/ext/v8/upstream/3.1.8/src/version.h +0 -64
  877. data/ext/v8/upstream/3.1.8/src/virtual-frame-light-inl.h +0 -170
  878. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +0 -134
  879. data/ext/v8/upstream/3.1.8/src/vm-state.h +0 -68
  880. data/ext/v8/upstream/3.1.8/src/win32-headers.h +0 -95
  881. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +0 -455
  882. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +0 -3162
  883. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +0 -1584
  884. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +0 -1492
  885. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +0 -5150
  886. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +0 -519
  887. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +0 -8835
  888. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +0 -750
  889. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +0 -86
  890. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +0 -316
  891. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +0 -781
  892. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +0 -1737
  893. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +0 -130
  894. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +0 -3984
  895. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +0 -1761
  896. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +0 -3639
  897. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +0 -305
  898. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +0 -2044
  899. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +0 -2052
  900. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +0 -2660
  901. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +0 -1852
  902. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +0 -1382
  903. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +0 -278
  904. data/ext/v8/upstream/3.1.8/src/x64/register-allocator-x64-inl.h +0 -87
  905. data/ext/v8/upstream/3.1.8/src/x64/register-allocator-x64.cc +0 -91
  906. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +0 -71
  907. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +0 -3509
  908. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +0 -1292
  909. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +0 -593
  910. data/ext/v8/upstream/3.1.8/src/zone-inl.h +0 -83
  911. data/ext/v8/upstream/3.1.8/src/zone.cc +0 -195
  912. data/ext/v8/upstream/3.1.8/src/zone.h +0 -233
  913. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +0 -869
  914. data/ext/v8/upstream/3.1.8/tools/linux-tick-processor +0 -33
  915. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +0 -863
  916. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +0 -1296
  917. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +0 -1234
  918. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +0 -1296
  919. data/ext/v8/upstream/3.1.8/tools/visual_studio/x64.vsprops +0 -17
  920. data/spec/ext/mem_spec.rb +0 -42
@@ -0,0 +1,88 @@
1
+ // Copyright 2006-2008 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ // CPU specific code for ia32 independent of OS goes here.
29
+
30
+ #ifdef __GNUC__
31
+ #include "third_party/valgrind/valgrind.h"
32
+ #endif
33
+
34
+ #include "v8.h"
35
+
36
+ #if defined(V8_TARGET_ARCH_IA32)
37
+
38
+ #include "cpu.h"
39
+ #include "macro-assembler.h"
40
+
41
+ namespace v8 {
42
+ namespace internal {
43
+
44
+ void CPU::Setup() {
45
+ CpuFeatures::Probe();
46
+ }
47
+
48
+
49
+ bool CPU::SupportsCrankshaft() {
50
+ return CpuFeatures::IsSupported(SSE2);
51
+ }
52
+
53
+
54
+ void CPU::FlushICache(void* start, size_t size) {
55
+ // No need to flush the instruction cache on Intel. On Intel instruction
56
+ // cache flushing is only necessary when multiple cores running the same
57
+ // code simultaneously. V8 (and JavaScript) is single threaded and when code
58
+ // is patched on an intel CPU the core performing the patching will have its
59
+ // own instruction cache updated automatically.
60
+
61
+ // If flushing of the instruction cache becomes necessary Windows has the
62
+ // API function FlushInstructionCache.
63
+
64
+ // By default, valgrind only checks the stack for writes that might need to
65
+ // invalidate already cached translated code. This leads to random
66
+ // instability when code patches or moves are sometimes unnoticed. One
67
+ // solution is to run valgrind with --smc-check=all, but this comes at a big
68
+ // performance cost. We can notify valgrind to invalidate its cache.
69
+ #ifdef VALGRIND_DISCARD_TRANSLATIONS
70
+ VALGRIND_DISCARD_TRANSLATIONS(start, size);
71
+ #endif
72
+ }
73
+
74
+
75
+ void CPU::DebugBreak() {
76
+ #ifdef _MSC_VER
77
+ // To avoid Visual Studio runtime support the following code can be used
78
+ // instead
79
+ // __asm { int 3 }
80
+ __debugbreak();
81
+ #else
82
+ asm("int $3");
83
+ #endif
84
+ }
85
+
86
+ } } // namespace v8::internal
87
+
88
+ #endif // V8_TARGET_ARCH_IA32
@@ -0,0 +1,312 @@
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
+ #if defined(V8_TARGET_ARCH_IA32)
31
+
32
+ #include "codegen-inl.h"
33
+ #include "debug.h"
34
+
35
+
36
+ namespace v8 {
37
+ namespace internal {
38
+
39
+ #ifdef ENABLE_DEBUGGER_SUPPORT
40
+
41
+ bool BreakLocationIterator::IsDebugBreakAtReturn() {
42
+ return Debug::IsDebugBreakAtReturn(rinfo());
43
+ }
44
+
45
+
46
+ // Patch the JS frame exit code with a debug break call. See
47
+ // CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc
48
+ // for the precise return instructions sequence.
49
+ void BreakLocationIterator::SetDebugBreakAtReturn() {
50
+ ASSERT(Assembler::kJSReturnSequenceLength >=
51
+ Assembler::kCallInstructionLength);
52
+ Isolate* isolate = Isolate::Current();
53
+ rinfo()->PatchCodeWithCall(isolate->debug()->debug_break_return()->entry(),
54
+ Assembler::kJSReturnSequenceLength - Assembler::kCallInstructionLength);
55
+ }
56
+
57
+
58
+ // Restore the JS frame exit code.
59
+ void BreakLocationIterator::ClearDebugBreakAtReturn() {
60
+ rinfo()->PatchCode(original_rinfo()->pc(),
61
+ Assembler::kJSReturnSequenceLength);
62
+ }
63
+
64
+
65
+ // A debug break in the frame exit code is identified by the JS frame exit code
66
+ // having been patched with a call instruction.
67
+ bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) {
68
+ ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
69
+ return rinfo->IsPatchedReturnSequence();
70
+ }
71
+
72
+
73
+ bool BreakLocationIterator::IsDebugBreakAtSlot() {
74
+ ASSERT(IsDebugBreakSlot());
75
+ // Check whether the debug break slot instructions have been patched.
76
+ return rinfo()->IsPatchedDebugBreakSlotSequence();
77
+ }
78
+
79
+
80
+ void BreakLocationIterator::SetDebugBreakAtSlot() {
81
+ ASSERT(IsDebugBreakSlot());
82
+ Isolate* isolate = Isolate::Current();
83
+ rinfo()->PatchCodeWithCall(
84
+ isolate->debug()->debug_break_slot()->entry(),
85
+ Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength);
86
+ }
87
+
88
+
89
+ void BreakLocationIterator::ClearDebugBreakAtSlot() {
90
+ ASSERT(IsDebugBreakSlot());
91
+ rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
92
+ }
93
+
94
+
95
+ #define __ ACCESS_MASM(masm)
96
+
97
+
98
+ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
99
+ RegList object_regs,
100
+ RegList non_object_regs,
101
+ bool convert_call_to_jmp) {
102
+ // Enter an internal frame.
103
+ __ EnterInternalFrame();
104
+
105
+ // Store the registers containing live values on the expression stack to
106
+ // make sure that these are correctly updated during GC. Non object values
107
+ // are stored as a smi causing it to be untouched by GC.
108
+ ASSERT((object_regs & ~kJSCallerSaved) == 0);
109
+ ASSERT((non_object_regs & ~kJSCallerSaved) == 0);
110
+ ASSERT((object_regs & non_object_regs) == 0);
111
+ for (int i = 0; i < kNumJSCallerSaved; i++) {
112
+ int r = JSCallerSavedCode(i);
113
+ Register reg = { r };
114
+ if ((object_regs & (1 << r)) != 0) {
115
+ __ push(reg);
116
+ }
117
+ if ((non_object_regs & (1 << r)) != 0) {
118
+ if (FLAG_debug_code) {
119
+ __ test(reg, Immediate(0xc0000000));
120
+ __ Assert(zero, "Unable to encode value as smi");
121
+ }
122
+ __ SmiTag(reg);
123
+ __ push(reg);
124
+ }
125
+ }
126
+
127
+ #ifdef DEBUG
128
+ __ RecordComment("// Calling from debug break to runtime - come in - over");
129
+ #endif
130
+ __ Set(eax, Immediate(0)); // No arguments.
131
+ __ mov(ebx, Immediate(ExternalReference::debug_break(masm->isolate())));
132
+
133
+ CEntryStub ceb(1);
134
+ __ CallStub(&ceb);
135
+
136
+ // Restore the register values containing object pointers from the expression
137
+ // stack.
138
+ for (int i = kNumJSCallerSaved; --i >= 0;) {
139
+ int r = JSCallerSavedCode(i);
140
+ Register reg = { r };
141
+ if (FLAG_debug_code) {
142
+ __ Set(reg, Immediate(kDebugZapValue));
143
+ }
144
+ if ((object_regs & (1 << r)) != 0) {
145
+ __ pop(reg);
146
+ }
147
+ if ((non_object_regs & (1 << r)) != 0) {
148
+ __ pop(reg);
149
+ __ SmiUntag(reg);
150
+ }
151
+ }
152
+
153
+ // Get rid of the internal frame.
154
+ __ LeaveInternalFrame();
155
+
156
+ // If this call did not replace a call but patched other code then there will
157
+ // be an unwanted return address left on the stack. Here we get rid of that.
158
+ if (convert_call_to_jmp) {
159
+ __ add(Operand(esp), Immediate(kPointerSize));
160
+ }
161
+
162
+ // Now that the break point has been handled, resume normal execution by
163
+ // jumping to the target address intended by the caller and that was
164
+ // overwritten by the address of DebugBreakXXX.
165
+ ExternalReference after_break_target =
166
+ ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate());
167
+ __ jmp(Operand::StaticVariable(after_break_target));
168
+ }
169
+
170
+
171
+ void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
172
+ // Register state for IC load call (from ic-ia32.cc).
173
+ // ----------- S t a t e -------------
174
+ // -- eax : receiver
175
+ // -- ecx : name
176
+ // -----------------------------------
177
+ Generate_DebugBreakCallHelper(masm, eax.bit() | ecx.bit(), 0, false);
178
+ }
179
+
180
+
181
+ void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) {
182
+ // Register state for IC store call (from ic-ia32.cc).
183
+ // ----------- S t a t e -------------
184
+ // -- eax : value
185
+ // -- ecx : name
186
+ // -- edx : receiver
187
+ // -----------------------------------
188
+ Generate_DebugBreakCallHelper(
189
+ masm, eax.bit() | ecx.bit() | edx.bit(), 0, false);
190
+ }
191
+
192
+
193
+ void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
194
+ // Register state for keyed IC load call (from ic-ia32.cc).
195
+ // ----------- S t a t e -------------
196
+ // -- edx : receiver
197
+ // -- eax : key
198
+ // -----------------------------------
199
+ Generate_DebugBreakCallHelper(masm, eax.bit() | edx.bit(), 0, false);
200
+ }
201
+
202
+
203
+ void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
204
+ // Register state for keyed IC load call (from ic-ia32.cc).
205
+ // ----------- S t a t e -------------
206
+ // -- eax : value
207
+ // -- ecx : key
208
+ // -- edx : receiver
209
+ // -----------------------------------
210
+ Generate_DebugBreakCallHelper(
211
+ masm, eax.bit() | ecx.bit() | edx.bit(), 0, false);
212
+ }
213
+
214
+
215
+ void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
216
+ // Register state for keyed IC call call (from ic-ia32.cc)
217
+ // ----------- S t a t e -------------
218
+ // -- ecx: name
219
+ // -----------------------------------
220
+ Generate_DebugBreakCallHelper(masm, ecx.bit(), 0, false);
221
+ }
222
+
223
+
224
+ void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) {
225
+ // Register state just before return from JS function (from codegen-ia32.cc).
226
+ // eax is the actual number of arguments not encoded as a smi see comment
227
+ // above IC call.
228
+ // ----------- S t a t e -------------
229
+ // -- eax: number of arguments (not smi)
230
+ // -- edi: constructor function
231
+ // -----------------------------------
232
+ // The number of arguments in eax is not smi encoded.
233
+ Generate_DebugBreakCallHelper(masm, edi.bit(), eax.bit(), false);
234
+ }
235
+
236
+
237
+ void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
238
+ // Register state just before return from JS function (from codegen-ia32.cc).
239
+ // ----------- S t a t e -------------
240
+ // -- eax: return value
241
+ // -----------------------------------
242
+ Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true);
243
+ }
244
+
245
+
246
+ void Debug::GenerateStubNoRegistersDebugBreak(MacroAssembler* masm) {
247
+ // Register state for stub CallFunction (from CallFunctionStub in ic-ia32.cc).
248
+ // ----------- S t a t e -------------
249
+ // No registers used on entry.
250
+ // -----------------------------------
251
+ Generate_DebugBreakCallHelper(masm, 0, 0, false);
252
+ }
253
+
254
+
255
+ void Debug::GenerateSlot(MacroAssembler* masm) {
256
+ // Generate enough nop's to make space for a call instruction.
257
+ Label check_codesize;
258
+ __ bind(&check_codesize);
259
+ __ RecordDebugBreakSlot();
260
+ for (int i = 0; i < Assembler::kDebugBreakSlotLength; i++) {
261
+ __ nop();
262
+ }
263
+ ASSERT_EQ(Assembler::kDebugBreakSlotLength,
264
+ masm->SizeOfCodeGeneratedSince(&check_codesize));
265
+ }
266
+
267
+
268
+ void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) {
269
+ // In the places where a debug break slot is inserted no registers can contain
270
+ // object pointers.
271
+ Generate_DebugBreakCallHelper(masm, 0, 0, true);
272
+ }
273
+
274
+
275
+ void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
276
+ masm->ret(0);
277
+ }
278
+
279
+
280
+ void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
281
+ ExternalReference restarter_frame_function_slot =
282
+ ExternalReference(Debug_Address::RestarterFrameFunctionPointer(),
283
+ masm->isolate());
284
+ __ mov(Operand::StaticVariable(restarter_frame_function_slot), Immediate(0));
285
+
286
+ // We do not know our frame height, but set esp based on ebp.
287
+ __ lea(esp, Operand(ebp, -1 * kPointerSize));
288
+
289
+ __ pop(edi); // Function.
290
+ __ pop(ebp);
291
+
292
+ // Load context from the function.
293
+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
294
+
295
+ // Get function code.
296
+ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
297
+ __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset));
298
+ __ lea(edx, FieldOperand(edx, Code::kHeaderSize));
299
+
300
+ // Re-run JSFunction, edi is function, esi is context.
301
+ __ jmp(Operand(edx));
302
+ }
303
+
304
+ const bool Debug::kFrameDropperSupported = true;
305
+
306
+ #undef __
307
+
308
+ #endif // ENABLE_DEBUGGER_SUPPORT
309
+
310
+ } } // namespace v8::internal
311
+
312
+ #endif // V8_TARGET_ARCH_IA32
@@ -0,0 +1,774 @@
1
+ // Copyright 2011 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
+ #if defined(V8_TARGET_ARCH_IA32)
31
+
32
+ #include "codegen.h"
33
+ #include "deoptimizer.h"
34
+ #include "full-codegen.h"
35
+ #include "safepoint-table.h"
36
+
37
+ namespace v8 {
38
+ namespace internal {
39
+
40
+ int Deoptimizer::table_entry_size_ = 10;
41
+
42
+
43
+ int Deoptimizer::patch_size() {
44
+ return Assembler::kCallInstructionLength;
45
+ }
46
+
47
+
48
+ static void ZapCodeRange(Address start, Address end) {
49
+ #ifdef DEBUG
50
+ ASSERT(start <= end);
51
+ int size = end - start;
52
+ CodePatcher destroyer(start, size);
53
+ while (size-- > 0) destroyer.masm()->int3();
54
+ #endif
55
+ }
56
+
57
+
58
+ void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
59
+ Isolate* isolate = code->GetIsolate();
60
+ HandleScope scope(isolate);
61
+
62
+ // Compute the size of relocation information needed for the code
63
+ // patching in Deoptimizer::DeoptimizeFunction.
64
+ int min_reloc_size = 0;
65
+ Address prev_reloc_address = code->instruction_start();
66
+ Address code_start_address = code->instruction_start();
67
+ SafepointTable table(*code);
68
+ for (unsigned i = 0; i < table.length(); ++i) {
69
+ Address curr_reloc_address = code_start_address + table.GetPcOffset(i);
70
+ ASSERT_GE(curr_reloc_address, prev_reloc_address);
71
+ SafepointEntry safepoint_entry = table.GetEntry(i);
72
+ int deoptimization_index = safepoint_entry.deoptimization_index();
73
+ if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
74
+ // The gap code is needed to get to the state expected at the
75
+ // bailout and we need to skip the call opcode to get to the
76
+ // address that needs reloc.
77
+ curr_reloc_address += safepoint_entry.gap_code_size() + 1;
78
+ int pc_delta = curr_reloc_address - prev_reloc_address;
79
+ // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes
80
+ // if encodable with small pc delta encoding and up to 6 bytes
81
+ // otherwise.
82
+ if (pc_delta <= RelocInfo::kMaxSmallPCDelta) {
83
+ min_reloc_size += 2;
84
+ } else {
85
+ min_reloc_size += 6;
86
+ }
87
+ prev_reloc_address = curr_reloc_address;
88
+ }
89
+ }
90
+
91
+ // If the relocation information is not big enough we create a new
92
+ // relocation info object that is padded with comments to make it
93
+ // big enough for lazy doptimization.
94
+ int reloc_length = code->relocation_info()->length();
95
+ if (min_reloc_size > reloc_length) {
96
+ int comment_reloc_size = RelocInfo::kMinRelocCommentSize;
97
+ // Padding needed.
98
+ int min_padding = min_reloc_size - reloc_length;
99
+ // Number of comments needed to take up at least that much space.
100
+ int additional_comments =
101
+ (min_padding + comment_reloc_size - 1) / comment_reloc_size;
102
+ // Actual padding size.
103
+ int padding = additional_comments * comment_reloc_size;
104
+ // Allocate new relocation info and copy old relocation to the end
105
+ // of the new relocation info array because relocation info is
106
+ // written and read backwards.
107
+ Factory* factory = isolate->factory();
108
+ Handle<ByteArray> new_reloc =
109
+ factory->NewByteArray(reloc_length + padding, TENURED);
110
+ memcpy(new_reloc->GetDataStartAddress() + padding,
111
+ code->relocation_info()->GetDataStartAddress(),
112
+ reloc_length);
113
+ // Create a relocation writer to write the comments in the padding
114
+ // space. Use position 0 for everything to ensure short encoding.
115
+ RelocInfoWriter reloc_info_writer(
116
+ new_reloc->GetDataStartAddress() + padding, 0);
117
+ intptr_t comment_string
118
+ = reinterpret_cast<intptr_t>(RelocInfo::kFillerCommentString);
119
+ RelocInfo rinfo(0, RelocInfo::COMMENT, comment_string);
120
+ for (int i = 0; i < additional_comments; ++i) {
121
+ #ifdef DEBUG
122
+ byte* pos_before = reloc_info_writer.pos();
123
+ #endif
124
+ reloc_info_writer.Write(&rinfo);
125
+ ASSERT(RelocInfo::kMinRelocCommentSize ==
126
+ pos_before - reloc_info_writer.pos());
127
+ }
128
+ // Replace relocation information on the code object.
129
+ code->set_relocation_info(*new_reloc);
130
+ }
131
+ }
132
+
133
+
134
+ void Deoptimizer::DeoptimizeFunction(JSFunction* function) {
135
+ if (!function->IsOptimized()) return;
136
+
137
+ Isolate* isolate = function->GetIsolate();
138
+ HandleScope scope(isolate);
139
+ AssertNoAllocation no_allocation;
140
+
141
+ // Get the optimized code.
142
+ Code* code = function->code();
143
+ Address code_start_address = code->instruction_start();
144
+
145
+ // We will overwrite the code's relocation info in-place. Relocation info
146
+ // is written backward. The relocation info is the payload of a byte
147
+ // array. Later on we will slide this to the start of the byte array and
148
+ // create a filler object in the remaining space.
149
+ ByteArray* reloc_info = code->relocation_info();
150
+ Address reloc_end_address = reloc_info->address() + reloc_info->Size();
151
+ RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address);
152
+
153
+ // For each return after a safepoint insert a call to the corresponding
154
+ // deoptimization entry. Since the call is a relative encoding, write new
155
+ // reloc info. We do not need any of the existing reloc info because the
156
+ // existing code will not be used again (we zap it in debug builds).
157
+ SafepointTable table(code);
158
+ Address prev_address = code_start_address;
159
+ for (unsigned i = 0; i < table.length(); ++i) {
160
+ Address curr_address = code_start_address + table.GetPcOffset(i);
161
+ ASSERT_GE(curr_address, prev_address);
162
+ ZapCodeRange(prev_address, curr_address);
163
+
164
+ SafepointEntry safepoint_entry = table.GetEntry(i);
165
+ int deoptimization_index = safepoint_entry.deoptimization_index();
166
+ if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
167
+ // The gap code is needed to get to the state expected at the bailout.
168
+ curr_address += safepoint_entry.gap_code_size();
169
+
170
+ CodePatcher patcher(curr_address, patch_size());
171
+ Address deopt_entry = GetDeoptimizationEntry(deoptimization_index, LAZY);
172
+ patcher.masm()->call(deopt_entry, RelocInfo::NONE);
173
+
174
+ // We use RUNTIME_ENTRY for deoptimization bailouts.
175
+ RelocInfo rinfo(curr_address + 1, // 1 after the call opcode.
176
+ RelocInfo::RUNTIME_ENTRY,
177
+ reinterpret_cast<intptr_t>(deopt_entry));
178
+ reloc_info_writer.Write(&rinfo);
179
+ ASSERT_GE(reloc_info_writer.pos(),
180
+ reloc_info->address() + ByteArray::kHeaderSize);
181
+ curr_address += patch_size();
182
+ }
183
+ prev_address = curr_address;
184
+ }
185
+ ZapCodeRange(prev_address,
186
+ code_start_address + code->safepoint_table_offset());
187
+
188
+ // Move the relocation info to the beginning of the byte array.
189
+ int new_reloc_size = reloc_end_address - reloc_info_writer.pos();
190
+ memmove(code->relocation_start(), reloc_info_writer.pos(), new_reloc_size);
191
+
192
+ // The relocation info is in place, update the size.
193
+ reloc_info->set_length(new_reloc_size);
194
+
195
+ // Handle the junk part after the new relocation info. We will create
196
+ // a non-live object in the extra space at the end of the former reloc info.
197
+ Address junk_address = reloc_info->address() + reloc_info->Size();
198
+ ASSERT(junk_address <= reloc_end_address);
199
+ isolate->heap()->CreateFillerObjectAt(junk_address,
200
+ reloc_end_address - junk_address);
201
+
202
+ // Add the deoptimizing code to the list.
203
+ DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
204
+ DeoptimizerData* data = isolate->deoptimizer_data();
205
+ node->set_next(data->deoptimizing_code_list_);
206
+ data->deoptimizing_code_list_ = node;
207
+
208
+ // Set the code for the function to non-optimized version.
209
+ function->ReplaceCode(function->shared()->code());
210
+
211
+ if (FLAG_trace_deopt) {
212
+ PrintF("[forced deoptimization: ");
213
+ function->PrintName();
214
+ PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function));
215
+ #ifdef DEBUG
216
+ if (FLAG_print_code) {
217
+ code->PrintLn();
218
+ }
219
+ #endif
220
+ }
221
+ }
222
+
223
+
224
+ void Deoptimizer::PatchStackCheckCodeAt(Address pc_after,
225
+ Code* check_code,
226
+ Code* replacement_code) {
227
+ Address call_target_address = pc_after - kIntSize;
228
+ ASSERT(check_code->entry() ==
229
+ Assembler::target_address_at(call_target_address));
230
+ // The stack check code matches the pattern:
231
+ //
232
+ // cmp esp, <limit>
233
+ // jae ok
234
+ // call <stack guard>
235
+ // test eax, <loop nesting depth>
236
+ // ok: ...
237
+ //
238
+ // We will patch away the branch so the code is:
239
+ //
240
+ // cmp esp, <limit> ;; Not changed
241
+ // nop
242
+ // nop
243
+ // call <on-stack replacment>
244
+ // test eax, <loop nesting depth>
245
+ // ok:
246
+ ASSERT(*(call_target_address - 3) == 0x73 && // jae
247
+ *(call_target_address - 2) == 0x07 && // offset
248
+ *(call_target_address - 1) == 0xe8); // call
249
+ *(call_target_address - 3) = 0x90; // nop
250
+ *(call_target_address - 2) = 0x90; // nop
251
+ Assembler::set_target_address_at(call_target_address,
252
+ replacement_code->entry());
253
+ }
254
+
255
+
256
+ void Deoptimizer::RevertStackCheckCodeAt(Address pc_after,
257
+ Code* check_code,
258
+ Code* replacement_code) {
259
+ Address call_target_address = pc_after - kIntSize;
260
+ ASSERT(replacement_code->entry() ==
261
+ Assembler::target_address_at(call_target_address));
262
+ // Replace the nops from patching (Deoptimizer::PatchStackCheckCode) to
263
+ // restore the conditional branch.
264
+ ASSERT(*(call_target_address - 3) == 0x90 && // nop
265
+ *(call_target_address - 2) == 0x90 && // nop
266
+ *(call_target_address - 1) == 0xe8); // call
267
+ *(call_target_address - 3) = 0x73; // jae
268
+ *(call_target_address - 2) = 0x07; // offset
269
+ Assembler::set_target_address_at(call_target_address,
270
+ check_code->entry());
271
+ }
272
+
273
+
274
+ static int LookupBailoutId(DeoptimizationInputData* data, unsigned ast_id) {
275
+ ByteArray* translations = data->TranslationByteArray();
276
+ int length = data->DeoptCount();
277
+ for (int i = 0; i < length; i++) {
278
+ if (static_cast<unsigned>(data->AstId(i)->value()) == ast_id) {
279
+ TranslationIterator it(translations, data->TranslationIndex(i)->value());
280
+ int value = it.Next();
281
+ ASSERT(Translation::BEGIN == static_cast<Translation::Opcode>(value));
282
+ // Read the number of frames.
283
+ value = it.Next();
284
+ if (value == 1) return i;
285
+ }
286
+ }
287
+ UNREACHABLE();
288
+ return -1;
289
+ }
290
+
291
+
292
+ void Deoptimizer::DoComputeOsrOutputFrame() {
293
+ DeoptimizationInputData* data = DeoptimizationInputData::cast(
294
+ optimized_code_->deoptimization_data());
295
+ unsigned ast_id = data->OsrAstId()->value();
296
+ // TODO(kasperl): This should not be the bailout_id_. It should be
297
+ // the ast id. Confusing.
298
+ ASSERT(bailout_id_ == ast_id);
299
+
300
+ int bailout_id = LookupBailoutId(data, ast_id);
301
+ unsigned translation_index = data->TranslationIndex(bailout_id)->value();
302
+ ByteArray* translations = data->TranslationByteArray();
303
+
304
+ TranslationIterator iterator(translations, translation_index);
305
+ Translation::Opcode opcode =
306
+ static_cast<Translation::Opcode>(iterator.Next());
307
+ ASSERT(Translation::BEGIN == opcode);
308
+ USE(opcode);
309
+ int count = iterator.Next();
310
+ ASSERT(count == 1);
311
+ USE(count);
312
+
313
+ opcode = static_cast<Translation::Opcode>(iterator.Next());
314
+ USE(opcode);
315
+ ASSERT(Translation::FRAME == opcode);
316
+ unsigned node_id = iterator.Next();
317
+ USE(node_id);
318
+ ASSERT(node_id == ast_id);
319
+ JSFunction* function = JSFunction::cast(ComputeLiteral(iterator.Next()));
320
+ USE(function);
321
+ ASSERT(function == function_);
322
+ unsigned height = iterator.Next();
323
+ unsigned height_in_bytes = height * kPointerSize;
324
+ USE(height_in_bytes);
325
+
326
+ unsigned fixed_size = ComputeFixedSize(function_);
327
+ unsigned input_frame_size = input_->GetFrameSize();
328
+ ASSERT(fixed_size + height_in_bytes == input_frame_size);
329
+
330
+ unsigned stack_slot_size = optimized_code_->stack_slots() * kPointerSize;
331
+ unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value();
332
+ unsigned outgoing_size = outgoing_height * kPointerSize;
333
+ unsigned output_frame_size = fixed_size + stack_slot_size + outgoing_size;
334
+ ASSERT(outgoing_size == 0); // OSR does not happen in the middle of a call.
335
+
336
+ if (FLAG_trace_osr) {
337
+ PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ",
338
+ reinterpret_cast<intptr_t>(function_));
339
+ function_->PrintName();
340
+ PrintF(" => node=%u, frame=%d->%d]\n",
341
+ ast_id,
342
+ input_frame_size,
343
+ output_frame_size);
344
+ }
345
+
346
+ // There's only one output frame in the OSR case.
347
+ output_count_ = 1;
348
+ output_ = new FrameDescription*[1];
349
+ output_[0] = new(output_frame_size) FrameDescription(
350
+ output_frame_size, function_);
351
+
352
+ // Clear the incoming parameters in the optimized frame to avoid
353
+ // confusing the garbage collector.
354
+ unsigned output_offset = output_frame_size - kPointerSize;
355
+ int parameter_count = function_->shared()->formal_parameter_count() + 1;
356
+ for (int i = 0; i < parameter_count; ++i) {
357
+ output_[0]->SetFrameSlot(output_offset, 0);
358
+ output_offset -= kPointerSize;
359
+ }
360
+
361
+ // Translate the incoming parameters. This may overwrite some of the
362
+ // incoming argument slots we've just cleared.
363
+ int input_offset = input_frame_size - kPointerSize;
364
+ bool ok = true;
365
+ int limit = input_offset - (parameter_count * kPointerSize);
366
+ while (ok && input_offset > limit) {
367
+ ok = DoOsrTranslateCommand(&iterator, &input_offset);
368
+ }
369
+
370
+ // There are no translation commands for the caller's pc and fp, the
371
+ // context, and the function. Set them up explicitly.
372
+ for (int i = StandardFrameConstants::kCallerPCOffset;
373
+ ok && i >= StandardFrameConstants::kMarkerOffset;
374
+ i -= kPointerSize) {
375
+ uint32_t input_value = input_->GetFrameSlot(input_offset);
376
+ if (FLAG_trace_osr) {
377
+ const char* name = "UNKNOWN";
378
+ switch (i) {
379
+ case StandardFrameConstants::kCallerPCOffset:
380
+ name = "caller's pc";
381
+ break;
382
+ case StandardFrameConstants::kCallerFPOffset:
383
+ name = "fp";
384
+ break;
385
+ case StandardFrameConstants::kContextOffset:
386
+ name = "context";
387
+ break;
388
+ case StandardFrameConstants::kMarkerOffset:
389
+ name = "function";
390
+ break;
391
+ }
392
+ PrintF(" [esp + %d] <- 0x%08x ; [esp + %d] (fixed part - %s)\n",
393
+ output_offset,
394
+ input_value,
395
+ input_offset,
396
+ name);
397
+ }
398
+ output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset));
399
+ input_offset -= kPointerSize;
400
+ output_offset -= kPointerSize;
401
+ }
402
+
403
+ // Translate the rest of the frame.
404
+ while (ok && input_offset >= 0) {
405
+ ok = DoOsrTranslateCommand(&iterator, &input_offset);
406
+ }
407
+
408
+ // If translation of any command failed, continue using the input frame.
409
+ if (!ok) {
410
+ delete output_[0];
411
+ output_[0] = input_;
412
+ output_[0]->SetPc(reinterpret_cast<uint32_t>(from_));
413
+ } else {
414
+ // Setup the frame pointer and the context pointer.
415
+ output_[0]->SetRegister(ebp.code(), input_->GetRegister(ebp.code()));
416
+ output_[0]->SetRegister(esi.code(), input_->GetRegister(esi.code()));
417
+
418
+ unsigned pc_offset = data->OsrPcOffset()->value();
419
+ uint32_t pc = reinterpret_cast<uint32_t>(
420
+ optimized_code_->entry() + pc_offset);
421
+ output_[0]->SetPc(pc);
422
+ }
423
+ Code* continuation =
424
+ function->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR);
425
+ output_[0]->SetContinuation(
426
+ reinterpret_cast<uint32_t>(continuation->entry()));
427
+
428
+ if (FLAG_trace_osr) {
429
+ PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ",
430
+ ok ? "finished" : "aborted",
431
+ reinterpret_cast<intptr_t>(function));
432
+ function->PrintName();
433
+ PrintF(" => pc=0x%0x]\n", output_[0]->GetPc());
434
+ }
435
+ }
436
+
437
+
438
+ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator,
439
+ int frame_index) {
440
+ // Read the ast node id, function, and frame height for this output frame.
441
+ Translation::Opcode opcode =
442
+ static_cast<Translation::Opcode>(iterator->Next());
443
+ USE(opcode);
444
+ ASSERT(Translation::FRAME == opcode);
445
+ int node_id = iterator->Next();
446
+ JSFunction* function = JSFunction::cast(ComputeLiteral(iterator->Next()));
447
+ unsigned height = iterator->Next();
448
+ unsigned height_in_bytes = height * kPointerSize;
449
+ if (FLAG_trace_deopt) {
450
+ PrintF(" translating ");
451
+ function->PrintName();
452
+ PrintF(" => node=%d, height=%d\n", node_id, height_in_bytes);
453
+ }
454
+
455
+ // The 'fixed' part of the frame consists of the incoming parameters and
456
+ // the part described by JavaScriptFrameConstants.
457
+ unsigned fixed_frame_size = ComputeFixedSize(function);
458
+ unsigned input_frame_size = input_->GetFrameSize();
459
+ unsigned output_frame_size = height_in_bytes + fixed_frame_size;
460
+
461
+ // Allocate and store the output frame description.
462
+ FrameDescription* output_frame =
463
+ new(output_frame_size) FrameDescription(output_frame_size, function);
464
+
465
+ bool is_bottommost = (0 == frame_index);
466
+ bool is_topmost = (output_count_ - 1 == frame_index);
467
+ ASSERT(frame_index >= 0 && frame_index < output_count_);
468
+ ASSERT(output_[frame_index] == NULL);
469
+ output_[frame_index] = output_frame;
470
+
471
+ // The top address for the bottommost output frame can be computed from
472
+ // the input frame pointer and the output frame's height. For all
473
+ // subsequent output frames, it can be computed from the previous one's
474
+ // top address and the current frame's size.
475
+ uint32_t top_address;
476
+ if (is_bottommost) {
477
+ // 2 = context and function in the frame.
478
+ top_address =
479
+ input_->GetRegister(ebp.code()) - (2 * kPointerSize) - height_in_bytes;
480
+ } else {
481
+ top_address = output_[frame_index - 1]->GetTop() - output_frame_size;
482
+ }
483
+ output_frame->SetTop(top_address);
484
+
485
+ // Compute the incoming parameter translation.
486
+ int parameter_count = function->shared()->formal_parameter_count() + 1;
487
+ unsigned output_offset = output_frame_size;
488
+ unsigned input_offset = input_frame_size;
489
+ for (int i = 0; i < parameter_count; ++i) {
490
+ output_offset -= kPointerSize;
491
+ DoTranslateCommand(iterator, frame_index, output_offset);
492
+ }
493
+ input_offset -= (parameter_count * kPointerSize);
494
+
495
+ // There are no translation commands for the caller's pc and fp, the
496
+ // context, and the function. Synthesize their values and set them up
497
+ // explicitly.
498
+ //
499
+ // The caller's pc for the bottommost output frame is the same as in the
500
+ // input frame. For all subsequent output frames, it can be read from the
501
+ // previous one. This frame's pc can be computed from the non-optimized
502
+ // function code and AST id of the bailout.
503
+ output_offset -= kPointerSize;
504
+ input_offset -= kPointerSize;
505
+ intptr_t value;
506
+ if (is_bottommost) {
507
+ value = input_->GetFrameSlot(input_offset);
508
+ } else {
509
+ value = output_[frame_index - 1]->GetPc();
510
+ }
511
+ output_frame->SetFrameSlot(output_offset, value);
512
+ if (FLAG_trace_deopt) {
513
+ PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's pc\n",
514
+ top_address + output_offset, output_offset, value);
515
+ }
516
+
517
+ // The caller's frame pointer for the bottommost output frame is the same
518
+ // as in the input frame. For all subsequent output frames, it can be
519
+ // read from the previous one. Also compute and set this frame's frame
520
+ // pointer.
521
+ output_offset -= kPointerSize;
522
+ input_offset -= kPointerSize;
523
+ if (is_bottommost) {
524
+ value = input_->GetFrameSlot(input_offset);
525
+ } else {
526
+ value = output_[frame_index - 1]->GetFp();
527
+ }
528
+ output_frame->SetFrameSlot(output_offset, value);
529
+ intptr_t fp_value = top_address + output_offset;
530
+ ASSERT(!is_bottommost || input_->GetRegister(ebp.code()) == fp_value);
531
+ output_frame->SetFp(fp_value);
532
+ if (is_topmost) output_frame->SetRegister(ebp.code(), fp_value);
533
+ if (FLAG_trace_deopt) {
534
+ PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n",
535
+ fp_value, output_offset, value);
536
+ }
537
+
538
+ // For the bottommost output frame the context can be gotten from the input
539
+ // frame. For all subsequent output frames it can be gotten from the function
540
+ // so long as we don't inline functions that need local contexts.
541
+ output_offset -= kPointerSize;
542
+ input_offset -= kPointerSize;
543
+ if (is_bottommost) {
544
+ value = input_->GetFrameSlot(input_offset);
545
+ } else {
546
+ value = reinterpret_cast<uint32_t>(function->context());
547
+ }
548
+ output_frame->SetFrameSlot(output_offset, value);
549
+ if (is_topmost) output_frame->SetRegister(esi.code(), value);
550
+ if (FLAG_trace_deopt) {
551
+ PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n",
552
+ top_address + output_offset, output_offset, value);
553
+ }
554
+
555
+ // The function was mentioned explicitly in the BEGIN_FRAME.
556
+ output_offset -= kPointerSize;
557
+ input_offset -= kPointerSize;
558
+ value = reinterpret_cast<uint32_t>(function);
559
+ // The function for the bottommost output frame should also agree with the
560
+ // input frame.
561
+ ASSERT(!is_bottommost || input_->GetFrameSlot(input_offset) == value);
562
+ output_frame->SetFrameSlot(output_offset, value);
563
+ if (FLAG_trace_deopt) {
564
+ PrintF(" 0x%08x: [top + %d] <- 0x%08x ; function\n",
565
+ top_address + output_offset, output_offset, value);
566
+ }
567
+
568
+ // Translate the rest of the frame.
569
+ for (unsigned i = 0; i < height; ++i) {
570
+ output_offset -= kPointerSize;
571
+ DoTranslateCommand(iterator, frame_index, output_offset);
572
+ }
573
+ ASSERT(0 == output_offset);
574
+
575
+ // Compute this frame's PC, state, and continuation.
576
+ Code* non_optimized_code = function->shared()->code();
577
+ FixedArray* raw_data = non_optimized_code->deoptimization_data();
578
+ DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data);
579
+ Address start = non_optimized_code->instruction_start();
580
+ unsigned pc_and_state = GetOutputInfo(data, node_id, function->shared());
581
+ unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state);
582
+ uint32_t pc_value = reinterpret_cast<uint32_t>(start + pc_offset);
583
+ output_frame->SetPc(pc_value);
584
+
585
+ FullCodeGenerator::State state =
586
+ FullCodeGenerator::StateField::decode(pc_and_state);
587
+ output_frame->SetState(Smi::FromInt(state));
588
+
589
+ // Set the continuation for the topmost frame.
590
+ if (is_topmost) {
591
+ Builtins* builtins = isolate_->builtins();
592
+ Code* continuation = (bailout_type_ == EAGER)
593
+ ? builtins->builtin(Builtins::kNotifyDeoptimized)
594
+ : builtins->builtin(Builtins::kNotifyLazyDeoptimized);
595
+ output_frame->SetContinuation(
596
+ reinterpret_cast<uint32_t>(continuation->entry()));
597
+ }
598
+
599
+ if (output_count_ - 1 == frame_index) iterator->Done();
600
+ }
601
+
602
+
603
+ #define __ masm()->
604
+
605
+ void Deoptimizer::EntryGenerator::Generate() {
606
+ GeneratePrologue();
607
+ CpuFeatures::Scope scope(SSE2);
608
+
609
+ Isolate* isolate = masm()->isolate();
610
+
611
+ // Save all general purpose registers before messing with them.
612
+ const int kNumberOfRegisters = Register::kNumRegisters;
613
+
614
+ const int kDoubleRegsSize = kDoubleSize *
615
+ XMMRegister::kNumAllocatableRegisters;
616
+ __ sub(Operand(esp), Immediate(kDoubleRegsSize));
617
+ for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) {
618
+ XMMRegister xmm_reg = XMMRegister::FromAllocationIndex(i);
619
+ int offset = i * kDoubleSize;
620
+ __ movdbl(Operand(esp, offset), xmm_reg);
621
+ }
622
+
623
+ __ pushad();
624
+
625
+ const int kSavedRegistersAreaSize = kNumberOfRegisters * kPointerSize +
626
+ kDoubleRegsSize;
627
+
628
+ // Get the bailout id from the stack.
629
+ __ mov(ebx, Operand(esp, kSavedRegistersAreaSize));
630
+
631
+ // Get the address of the location in the code object if possible
632
+ // and compute the fp-to-sp delta in register edx.
633
+ if (type() == EAGER) {
634
+ __ Set(ecx, Immediate(0));
635
+ __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize));
636
+ } else {
637
+ __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize));
638
+ __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize));
639
+ }
640
+ __ sub(edx, Operand(ebp));
641
+ __ neg(edx);
642
+
643
+ // Allocate a new deoptimizer object.
644
+ __ PrepareCallCFunction(6, eax);
645
+ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
646
+ __ mov(Operand(esp, 0 * kPointerSize), eax); // Function.
647
+ __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type.
648
+ __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id.
649
+ __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0.
650
+ __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta.
651
+ __ mov(Operand(esp, 5 * kPointerSize),
652
+ Immediate(ExternalReference::isolate_address()));
653
+ __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
654
+
655
+ // Preserve deoptimizer object in register eax and get the input
656
+ // frame descriptor pointer.
657
+ __ mov(ebx, Operand(eax, Deoptimizer::input_offset()));
658
+
659
+ // Fill in the input registers.
660
+ for (int i = kNumberOfRegisters - 1; i >= 0; i--) {
661
+ int offset = (i * kPointerSize) + FrameDescription::registers_offset();
662
+ __ pop(Operand(ebx, offset));
663
+ }
664
+
665
+ // Fill in the double input registers.
666
+ int double_regs_offset = FrameDescription::double_registers_offset();
667
+ for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) {
668
+ int dst_offset = i * kDoubleSize + double_regs_offset;
669
+ int src_offset = i * kDoubleSize;
670
+ __ movdbl(xmm0, Operand(esp, src_offset));
671
+ __ movdbl(Operand(ebx, dst_offset), xmm0);
672
+ }
673
+
674
+ // Remove the bailout id and the double registers from the stack.
675
+ if (type() == EAGER) {
676
+ __ add(Operand(esp), Immediate(kDoubleRegsSize + kPointerSize));
677
+ } else {
678
+ __ add(Operand(esp), Immediate(kDoubleRegsSize + 2 * kPointerSize));
679
+ }
680
+
681
+ // Compute a pointer to the unwinding limit in register ecx; that is
682
+ // the first stack slot not part of the input frame.
683
+ __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset()));
684
+ __ add(ecx, Operand(esp));
685
+
686
+ // Unwind the stack down to - but not including - the unwinding
687
+ // limit and copy the contents of the activation frame to the input
688
+ // frame description.
689
+ __ lea(edx, Operand(ebx, FrameDescription::frame_content_offset()));
690
+ Label pop_loop;
691
+ __ bind(&pop_loop);
692
+ __ pop(Operand(edx, 0));
693
+ __ add(Operand(edx), Immediate(sizeof(uint32_t)));
694
+ __ cmp(ecx, Operand(esp));
695
+ __ j(not_equal, &pop_loop);
696
+
697
+ // Compute the output frame in the deoptimizer.
698
+ __ push(eax);
699
+ __ PrepareCallCFunction(1, ebx);
700
+ __ mov(Operand(esp, 0 * kPointerSize), eax);
701
+ __ CallCFunction(
702
+ ExternalReference::compute_output_frames_function(isolate), 1);
703
+ __ pop(eax);
704
+
705
+ // Replace the current frame with the output frames.
706
+ Label outer_push_loop, inner_push_loop;
707
+ // Outer loop state: eax = current FrameDescription**, edx = one past the
708
+ // last FrameDescription**.
709
+ __ mov(edx, Operand(eax, Deoptimizer::output_count_offset()));
710
+ __ mov(eax, Operand(eax, Deoptimizer::output_offset()));
711
+ __ lea(edx, Operand(eax, edx, times_4, 0));
712
+ __ bind(&outer_push_loop);
713
+ // Inner loop state: ebx = current FrameDescription*, ecx = loop index.
714
+ __ mov(ebx, Operand(eax, 0));
715
+ __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset()));
716
+ __ bind(&inner_push_loop);
717
+ __ sub(Operand(ecx), Immediate(sizeof(uint32_t)));
718
+ __ push(Operand(ebx, ecx, times_1, FrameDescription::frame_content_offset()));
719
+ __ test(ecx, Operand(ecx));
720
+ __ j(not_zero, &inner_push_loop);
721
+ __ add(Operand(eax), Immediate(kPointerSize));
722
+ __ cmp(eax, Operand(edx));
723
+ __ j(below, &outer_push_loop);
724
+
725
+ // In case of OSR, we have to restore the XMM registers.
726
+ if (type() == OSR) {
727
+ for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) {
728
+ XMMRegister xmm_reg = XMMRegister::FromAllocationIndex(i);
729
+ int src_offset = i * kDoubleSize + double_regs_offset;
730
+ __ movdbl(xmm_reg, Operand(ebx, src_offset));
731
+ }
732
+ }
733
+
734
+ // Push state, pc, and continuation from the last output frame.
735
+ if (type() != OSR) {
736
+ __ push(Operand(ebx, FrameDescription::state_offset()));
737
+ }
738
+ __ push(Operand(ebx, FrameDescription::pc_offset()));
739
+ __ push(Operand(ebx, FrameDescription::continuation_offset()));
740
+
741
+
742
+ // Push the registers from the last output frame.
743
+ for (int i = 0; i < kNumberOfRegisters; i++) {
744
+ int offset = (i * kPointerSize) + FrameDescription::registers_offset();
745
+ __ push(Operand(ebx, offset));
746
+ }
747
+
748
+ // Restore the registers from the stack.
749
+ __ popad();
750
+
751
+ // Return to the continuation point.
752
+ __ ret(0);
753
+ }
754
+
755
+
756
+ void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
757
+ // Create a sequence of deoptimization entries.
758
+ Label done;
759
+ for (int i = 0; i < count(); i++) {
760
+ int start = masm()->pc_offset();
761
+ USE(start);
762
+ __ push_imm32(i);
763
+ __ jmp(&done);
764
+ ASSERT(masm()->pc_offset() - start == table_entry_size_);
765
+ }
766
+ __ bind(&done);
767
+ }
768
+
769
+ #undef __
770
+
771
+
772
+ } } // namespace v8::internal
773
+
774
+ #endif // V8_TARGET_ARCH_IA32