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
@@ -1,1490 +0,0 @@
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
- #include "factory.h"
31
- #include "hydrogen.h"
32
-
33
- #if V8_TARGET_ARCH_IA32
34
- #include "ia32/lithium-ia32.h"
35
- #elif V8_TARGET_ARCH_X64
36
- #include "x64/lithium-x64.h"
37
- #elif V8_TARGET_ARCH_ARM
38
- #include "arm/lithium-arm.h"
39
- #else
40
- #error Unsupported target architecture.
41
- #endif
42
-
43
- namespace v8 {
44
- namespace internal {
45
-
46
- #define DEFINE_COMPILE(type) \
47
- LInstruction* H##type::CompileToLithium(LChunkBuilder* builder) { \
48
- return builder->Do##type(this); \
49
- }
50
- HYDROGEN_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
51
- #undef DEFINE_COMPILE
52
-
53
-
54
- const char* Representation::Mnemonic() const {
55
- switch (kind_) {
56
- case kNone: return "v";
57
- case kTagged: return "t";
58
- case kDouble: return "d";
59
- case kInteger32: return "i";
60
- case kExternal: return "x";
61
- case kNumRepresentations:
62
- UNREACHABLE();
63
- return NULL;
64
- }
65
- UNREACHABLE();
66
- return NULL;
67
- }
68
-
69
-
70
- static int32_t ConvertAndSetOverflow(int64_t result, bool* overflow) {
71
- if (result > kMaxInt) {
72
- *overflow = true;
73
- return kMaxInt;
74
- }
75
- if (result < kMinInt) {
76
- *overflow = true;
77
- return kMinInt;
78
- }
79
- return static_cast<int32_t>(result);
80
- }
81
-
82
-
83
- static int32_t AddWithoutOverflow(int32_t a, int32_t b, bool* overflow) {
84
- int64_t result = static_cast<int64_t>(a) + static_cast<int64_t>(b);
85
- return ConvertAndSetOverflow(result, overflow);
86
- }
87
-
88
-
89
- static int32_t SubWithoutOverflow(int32_t a, int32_t b, bool* overflow) {
90
- int64_t result = static_cast<int64_t>(a) - static_cast<int64_t>(b);
91
- return ConvertAndSetOverflow(result, overflow);
92
- }
93
-
94
-
95
- static int32_t MulWithoutOverflow(int32_t a, int32_t b, bool* overflow) {
96
- int64_t result = static_cast<int64_t>(a) * static_cast<int64_t>(b);
97
- return ConvertAndSetOverflow(result, overflow);
98
- }
99
-
100
-
101
- int32_t Range::Mask() const {
102
- if (lower_ == upper_) return lower_;
103
- if (lower_ >= 0) {
104
- int32_t res = 1;
105
- while (res < upper_) {
106
- res = (res << 1) | 1;
107
- }
108
- return res;
109
- }
110
- return 0xffffffff;
111
- }
112
-
113
-
114
- void Range::AddConstant(int32_t value) {
115
- if (value == 0) return;
116
- bool may_overflow = false; // Overflow is ignored here.
117
- lower_ = AddWithoutOverflow(lower_, value, &may_overflow);
118
- upper_ = AddWithoutOverflow(upper_, value, &may_overflow);
119
- Verify();
120
- }
121
-
122
-
123
- bool Range::AddAndCheckOverflow(Range* other) {
124
- bool may_overflow = false;
125
- lower_ = AddWithoutOverflow(lower_, other->lower(), &may_overflow);
126
- upper_ = AddWithoutOverflow(upper_, other->upper(), &may_overflow);
127
- KeepOrder();
128
- Verify();
129
- return may_overflow;
130
- }
131
-
132
-
133
- bool Range::SubAndCheckOverflow(Range* other) {
134
- bool may_overflow = false;
135
- lower_ = SubWithoutOverflow(lower_, other->upper(), &may_overflow);
136
- upper_ = SubWithoutOverflow(upper_, other->lower(), &may_overflow);
137
- KeepOrder();
138
- Verify();
139
- return may_overflow;
140
- }
141
-
142
-
143
- void Range::KeepOrder() {
144
- if (lower_ > upper_) {
145
- int32_t tmp = lower_;
146
- lower_ = upper_;
147
- upper_ = tmp;
148
- }
149
- }
150
-
151
-
152
- void Range::Verify() const {
153
- ASSERT(lower_ <= upper_);
154
- }
155
-
156
-
157
- bool Range::MulAndCheckOverflow(Range* other) {
158
- bool may_overflow = false;
159
- int v1 = MulWithoutOverflow(lower_, other->lower(), &may_overflow);
160
- int v2 = MulWithoutOverflow(lower_, other->upper(), &may_overflow);
161
- int v3 = MulWithoutOverflow(upper_, other->lower(), &may_overflow);
162
- int v4 = MulWithoutOverflow(upper_, other->upper(), &may_overflow);
163
- lower_ = Min(Min(v1, v2), Min(v3, v4));
164
- upper_ = Max(Max(v1, v2), Max(v3, v4));
165
- Verify();
166
- return may_overflow;
167
- }
168
-
169
-
170
- const char* HType::ToString() {
171
- switch (type_) {
172
- case kTagged: return "tagged";
173
- case kTaggedPrimitive: return "primitive";
174
- case kTaggedNumber: return "number";
175
- case kSmi: return "smi";
176
- case kHeapNumber: return "heap-number";
177
- case kString: return "string";
178
- case kBoolean: return "boolean";
179
- case kNonPrimitive: return "non-primitive";
180
- case kJSArray: return "array";
181
- case kJSObject: return "object";
182
- case kUninitialized: return "uninitialized";
183
- }
184
- UNREACHABLE();
185
- return "Unreachable code";
186
- }
187
-
188
-
189
- const char* HType::ToShortString() {
190
- switch (type_) {
191
- case kTagged: return "t";
192
- case kTaggedPrimitive: return "p";
193
- case kTaggedNumber: return "n";
194
- case kSmi: return "m";
195
- case kHeapNumber: return "h";
196
- case kString: return "s";
197
- case kBoolean: return "b";
198
- case kNonPrimitive: return "r";
199
- case kJSArray: return "a";
200
- case kJSObject: return "o";
201
- case kUninitialized: return "z";
202
- }
203
- UNREACHABLE();
204
- return "Unreachable code";
205
- }
206
-
207
-
208
- HType HType::TypeFromValue(Handle<Object> value) {
209
- HType result = HType::Tagged();
210
- if (value->IsSmi()) {
211
- result = HType::Smi();
212
- } else if (value->IsHeapNumber()) {
213
- result = HType::HeapNumber();
214
- } else if (value->IsString()) {
215
- result = HType::String();
216
- } else if (value->IsBoolean()) {
217
- result = HType::Boolean();
218
- } else if (value->IsJSObject()) {
219
- result = HType::JSObject();
220
- } else if (value->IsJSArray()) {
221
- result = HType::JSArray();
222
- }
223
- return result;
224
- }
225
-
226
-
227
- int HValue::LookupOperandIndex(int occurrence_index, HValue* op) {
228
- for (int i = 0; i < OperandCount(); ++i) {
229
- if (OperandAt(i) == op) {
230
- if (occurrence_index == 0) return i;
231
- --occurrence_index;
232
- }
233
- }
234
- return -1;
235
- }
236
-
237
-
238
- bool HValue::IsDefinedAfter(HBasicBlock* other) const {
239
- return block()->block_id() > other->block_id();
240
- }
241
-
242
-
243
- bool HValue::UsesMultipleTimes(HValue* op) {
244
- bool seen = false;
245
- for (int i = 0; i < OperandCount(); ++i) {
246
- if (OperandAt(i) == op) {
247
- if (seen) return true;
248
- seen = true;
249
- }
250
- }
251
- return false;
252
- }
253
-
254
-
255
- bool HValue::Equals(HValue* other) {
256
- if (other->opcode() != opcode()) return false;
257
- if (!other->representation().Equals(representation())) return false;
258
- if (!other->type_.Equals(type_)) return false;
259
- if (other->flags() != flags()) return false;
260
- if (OperandCount() != other->OperandCount()) return false;
261
- for (int i = 0; i < OperandCount(); ++i) {
262
- if (OperandAt(i)->id() != other->OperandAt(i)->id()) return false;
263
- }
264
- bool result = DataEquals(other);
265
- ASSERT(!result || Hashcode() == other->Hashcode());
266
- return result;
267
- }
268
-
269
-
270
- intptr_t HValue::Hashcode() {
271
- intptr_t result = opcode();
272
- int count = OperandCount();
273
- for (int i = 0; i < count; ++i) {
274
- result = result * 19 + OperandAt(i)->id() + (result >> 7);
275
- }
276
- return result;
277
- }
278
-
279
-
280
- void HValue::SetOperandAt(int index, HValue* value) {
281
- ASSERT(value == NULL || !value->representation().IsNone());
282
- RegisterUse(index, value);
283
- InternalSetOperandAt(index, value);
284
- }
285
-
286
-
287
- void HValue::ReplaceAndDelete(HValue* other) {
288
- ReplaceValue(other);
289
- Delete();
290
- }
291
-
292
-
293
- void HValue::ReplaceValue(HValue* other) {
294
- ZoneList<HValue*> start_uses(2);
295
- for (int i = 0; i < uses_.length(); ++i) {
296
- HValue* use = uses_.at(i);
297
- if (!use->block()->IsStartBlock()) {
298
- InternalReplaceAtUse(use, other);
299
- other->uses_.Add(use);
300
- } else {
301
- start_uses.Add(use);
302
- }
303
- }
304
- uses_.Clear();
305
- uses_.AddAll(start_uses);
306
- }
307
-
308
-
309
- void HValue::ClearOperands() {
310
- for (int i = 0; i < OperandCount(); ++i) {
311
- SetOperandAt(i, NULL);
312
- }
313
- }
314
-
315
-
316
- void HValue::Delete() {
317
- ASSERT(HasNoUses());
318
- ClearOperands();
319
- DeleteFromGraph();
320
- }
321
-
322
-
323
- void HValue::ReplaceAtUse(HValue* use, HValue* other) {
324
- for (int i = 0; i < use->OperandCount(); ++i) {
325
- if (use->OperandAt(i) == this) {
326
- use->SetOperandAt(i, other);
327
- }
328
- }
329
- }
330
-
331
-
332
- void HValue::ReplaceFirstAtUse(HValue* use, HValue* other, Representation r) {
333
- for (int i = 0; i < use->OperandCount(); ++i) {
334
- if (use->RequiredInputRepresentation(i).Equals(r) &&
335
- use->OperandAt(i) == this) {
336
- use->SetOperandAt(i, other);
337
- return;
338
- }
339
- }
340
- }
341
-
342
-
343
- void HValue::InternalReplaceAtUse(HValue* use, HValue* other) {
344
- for (int i = 0; i < use->OperandCount(); ++i) {
345
- if (use->OperandAt(i) == this) {
346
- // Call internal method that does not update use lists. The caller is
347
- // responsible for doing so.
348
- use->InternalSetOperandAt(i, other);
349
- }
350
- }
351
- }
352
-
353
-
354
- void HValue::SetBlock(HBasicBlock* block) {
355
- ASSERT(block_ == NULL || block == NULL);
356
- block_ = block;
357
- if (id_ == kNoNumber && block != NULL) {
358
- id_ = block->graph()->GetNextValueID(this);
359
- }
360
- }
361
-
362
-
363
- void HValue::PrintTypeTo(HType type, StringStream* stream) {
364
- stream->Add(type.ToShortString());
365
- }
366
-
367
-
368
- void HValue::PrintNameTo(StringStream* stream) {
369
- stream->Add("%s%d", representation_.Mnemonic(), id());
370
- }
371
-
372
-
373
- bool HValue::UpdateInferredType() {
374
- HType type = CalculateInferredType();
375
- bool result = (!type.Equals(type_));
376
- type_ = type;
377
- return result;
378
- }
379
-
380
-
381
- void HValue::RegisterUse(int index, HValue* new_value) {
382
- HValue* old_value = OperandAt(index);
383
- if (old_value == new_value) return;
384
- if (old_value != NULL) {
385
- ASSERT(old_value->uses_.Contains(this));
386
- old_value->uses_.RemoveElement(this);
387
- }
388
- if (new_value != NULL) {
389
- new_value->uses_.Add(this);
390
- }
391
- }
392
-
393
-
394
- void HValue::AddNewRange(Range* r) {
395
- if (!HasRange()) ComputeInitialRange();
396
- if (!HasRange()) range_ = new Range();
397
- ASSERT(HasRange());
398
- r->StackUpon(range_);
399
- range_ = r;
400
- }
401
-
402
-
403
- void HValue::RemoveLastAddedRange() {
404
- ASSERT(HasRange());
405
- ASSERT(range_->next() != NULL);
406
- range_ = range_->next();
407
- }
408
-
409
-
410
- void HValue::ComputeInitialRange() {
411
- ASSERT(!HasRange());
412
- range_ = InferRange();
413
- ASSERT(HasRange());
414
- }
415
-
416
-
417
- void HInstruction::PrintTo(StringStream* stream) {
418
- stream->Add("%s", Mnemonic());
419
- if (HasSideEffects()) stream->Add("*");
420
- stream->Add(" ");
421
- PrintDataTo(stream);
422
-
423
- if (range() != NULL) {
424
- stream->Add(" range[%d,%d,m0=%d]",
425
- range()->lower(),
426
- range()->upper(),
427
- static_cast<int>(range()->CanBeMinusZero()));
428
- }
429
-
430
- int changes_flags = (flags() & HValue::ChangesFlagsMask());
431
- if (changes_flags != 0) {
432
- stream->Add(" changes[0x%x]", changes_flags);
433
- }
434
-
435
- if (representation().IsTagged() && !type().Equals(HType::Tagged())) {
436
- stream->Add(" type[%s]", type().ToString());
437
- }
438
- }
439
-
440
-
441
- void HInstruction::Unlink() {
442
- ASSERT(IsLinked());
443
- ASSERT(!IsControlInstruction()); // Must never move control instructions.
444
- ASSERT(!IsBlockEntry()); // Doesn't make sense to delete these.
445
- ASSERT(previous_ != NULL);
446
- previous_->next_ = next_;
447
- if (next_ == NULL) {
448
- ASSERT(block()->last() == this);
449
- block()->set_last(previous_);
450
- } else {
451
- next_->previous_ = previous_;
452
- }
453
- clear_block();
454
- }
455
-
456
-
457
- void HInstruction::InsertBefore(HInstruction* next) {
458
- ASSERT(!IsLinked());
459
- ASSERT(!next->IsBlockEntry());
460
- ASSERT(!IsControlInstruction());
461
- ASSERT(!next->block()->IsStartBlock());
462
- ASSERT(next->previous_ != NULL);
463
- HInstruction* prev = next->previous();
464
- prev->next_ = this;
465
- next->previous_ = this;
466
- next_ = next;
467
- previous_ = prev;
468
- SetBlock(next->block());
469
- }
470
-
471
-
472
- void HInstruction::InsertAfter(HInstruction* previous) {
473
- ASSERT(!IsLinked());
474
- ASSERT(!previous->IsControlInstruction());
475
- ASSERT(!IsControlInstruction() || previous->next_ == NULL);
476
- HBasicBlock* block = previous->block();
477
- // Never insert anything except constants into the start block after finishing
478
- // it.
479
- if (block->IsStartBlock() && block->IsFinished() && !IsConstant()) {
480
- ASSERT(block->end()->SecondSuccessor() == NULL);
481
- InsertAfter(block->end()->FirstSuccessor()->first());
482
- return;
483
- }
484
-
485
- // If we're inserting after an instruction with side-effects that is
486
- // followed by a simulate instruction, we need to insert after the
487
- // simulate instruction instead.
488
- HInstruction* next = previous->next_;
489
- if (previous->HasSideEffects() && next != NULL) {
490
- ASSERT(next->IsSimulate());
491
- previous = next;
492
- next = previous->next_;
493
- }
494
-
495
- previous_ = previous;
496
- next_ = next;
497
- SetBlock(block);
498
- previous->next_ = this;
499
- if (next != NULL) next->previous_ = this;
500
- }
501
-
502
-
503
- #ifdef DEBUG
504
- void HInstruction::Verify() {
505
- // Verify that input operands are defined before use.
506
- HBasicBlock* cur_block = block();
507
- for (int i = 0; i < OperandCount(); ++i) {
508
- HValue* other_operand = OperandAt(i);
509
- HBasicBlock* other_block = other_operand->block();
510
- if (cur_block == other_block) {
511
- if (!other_operand->IsPhi()) {
512
- HInstruction* cur = cur_block->first();
513
- while (cur != NULL) {
514
- ASSERT(cur != this); // We should reach other_operand before!
515
- if (cur == other_operand) break;
516
- cur = cur->next();
517
- }
518
- // Must reach other operand in the same block!
519
- ASSERT(cur == other_operand);
520
- }
521
- } else {
522
- ASSERT(other_block->Dominates(cur_block));
523
- }
524
- }
525
-
526
- // Verify that instructions that may have side-effects are followed
527
- // by a simulate instruction.
528
- if (HasSideEffects() && !IsOsrEntry()) {
529
- ASSERT(next()->IsSimulate());
530
- }
531
-
532
- // Verify that instructions that can be eliminated by GVN have overridden
533
- // HValue::DataEquals. The default implementation is UNREACHABLE. We
534
- // don't actually care whether DataEquals returns true or false here.
535
- if (CheckFlag(kUseGVN)) DataEquals(this);
536
- }
537
- #endif
538
-
539
-
540
- void HUnaryCall::PrintDataTo(StringStream* stream) {
541
- value()->PrintNameTo(stream);
542
- stream->Add(" ");
543
- stream->Add("#%d", argument_count());
544
- }
545
-
546
-
547
- void HBinaryCall::PrintDataTo(StringStream* stream) {
548
- first()->PrintNameTo(stream);
549
- stream->Add(" ");
550
- second()->PrintNameTo(stream);
551
- stream->Add(" ");
552
- stream->Add("#%d", argument_count());
553
- }
554
-
555
-
556
- void HCallConstantFunction::PrintDataTo(StringStream* stream) {
557
- if (IsApplyFunction()) {
558
- stream->Add("optimized apply ");
559
- } else {
560
- stream->Add("%o ", function()->shared()->DebugName());
561
- }
562
- stream->Add("#%d", argument_count());
563
- }
564
-
565
-
566
- void HCallNamed::PrintDataTo(StringStream* stream) {
567
- stream->Add("%o ", *name());
568
- HUnaryCall::PrintDataTo(stream);
569
- }
570
-
571
-
572
- void HCallGlobal::PrintDataTo(StringStream* stream) {
573
- stream->Add("%o ", *name());
574
- HUnaryCall::PrintDataTo(stream);
575
- }
576
-
577
-
578
- void HCallKnownGlobal::PrintDataTo(StringStream* stream) {
579
- stream->Add("o ", target()->shared()->DebugName());
580
- stream->Add("#%d", argument_count());
581
- }
582
-
583
-
584
- void HCallRuntime::PrintDataTo(StringStream* stream) {
585
- stream->Add("%o ", *name());
586
- stream->Add("#%d", argument_count());
587
- }
588
-
589
-
590
- void HClassOfTest::PrintDataTo(StringStream* stream) {
591
- stream->Add("class_of_test(");
592
- value()->PrintNameTo(stream);
593
- stream->Add(", \"%o\")", *class_name());
594
- }
595
-
596
-
597
- void HAccessArgumentsAt::PrintDataTo(StringStream* stream) {
598
- arguments()->PrintNameTo(stream);
599
- stream->Add("[");
600
- index()->PrintNameTo(stream);
601
- stream->Add("], length ");
602
- length()->PrintNameTo(stream);
603
- }
604
-
605
-
606
- void HControlInstruction::PrintDataTo(StringStream* stream) {
607
- if (FirstSuccessor() != NULL) {
608
- int first_id = FirstSuccessor()->block_id();
609
- if (SecondSuccessor() == NULL) {
610
- stream->Add(" B%d", first_id);
611
- } else {
612
- int second_id = SecondSuccessor()->block_id();
613
- stream->Add(" goto (B%d, B%d)", first_id, second_id);
614
- }
615
- }
616
- }
617
-
618
-
619
- void HUnaryControlInstruction::PrintDataTo(StringStream* stream) {
620
- value()->PrintNameTo(stream);
621
- HControlInstruction::PrintDataTo(stream);
622
- }
623
-
624
-
625
- void HCompareMap::PrintDataTo(StringStream* stream) {
626
- value()->PrintNameTo(stream);
627
- stream->Add(" (%p)", *map());
628
- HControlInstruction::PrintDataTo(stream);
629
- }
630
-
631
-
632
- const char* HUnaryMathOperation::OpName() const {
633
- switch (op()) {
634
- case kMathFloor: return "floor";
635
- case kMathRound: return "round";
636
- case kMathCeil: return "ceil";
637
- case kMathAbs: return "abs";
638
- case kMathLog: return "log";
639
- case kMathSin: return "sin";
640
- case kMathCos: return "cos";
641
- case kMathTan: return "tan";
642
- case kMathASin: return "asin";
643
- case kMathACos: return "acos";
644
- case kMathATan: return "atan";
645
- case kMathExp: return "exp";
646
- case kMathSqrt: return "sqrt";
647
- default: break;
648
- }
649
- return "(unknown operation)";
650
- }
651
-
652
-
653
- void HUnaryMathOperation::PrintDataTo(StringStream* stream) {
654
- const char* name = OpName();
655
- stream->Add("%s ", name);
656
- value()->PrintNameTo(stream);
657
- }
658
-
659
-
660
- void HUnaryOperation::PrintDataTo(StringStream* stream) {
661
- value()->PrintNameTo(stream);
662
- }
663
-
664
-
665
- void HHasInstanceType::PrintDataTo(StringStream* stream) {
666
- value()->PrintNameTo(stream);
667
- switch (from_) {
668
- case FIRST_JS_OBJECT_TYPE:
669
- if (to_ == LAST_TYPE) stream->Add(" spec_object");
670
- break;
671
- case JS_REGEXP_TYPE:
672
- if (to_ == JS_REGEXP_TYPE) stream->Add(" reg_exp");
673
- break;
674
- case JS_ARRAY_TYPE:
675
- if (to_ == JS_ARRAY_TYPE) stream->Add(" array");
676
- break;
677
- case JS_FUNCTION_TYPE:
678
- if (to_ == JS_FUNCTION_TYPE) stream->Add(" function");
679
- break;
680
- default:
681
- break;
682
- }
683
- }
684
-
685
-
686
- void HTypeofIs::PrintDataTo(StringStream* stream) {
687
- value()->PrintNameTo(stream);
688
- stream->Add(" == ");
689
- stream->Add(type_literal_->ToAsciiVector());
690
- }
691
-
692
-
693
- void HChange::PrintDataTo(StringStream* stream) {
694
- HUnaryOperation::PrintDataTo(stream);
695
- stream->Add(" %s to %s", from_.Mnemonic(), to_.Mnemonic());
696
-
697
- if (CanTruncateToInt32()) stream->Add(" truncating-int32");
698
- if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
699
- }
700
-
701
-
702
- HCheckInstanceType* HCheckInstanceType::NewIsJSObjectOrJSFunction(
703
- HValue* value) {
704
- STATIC_ASSERT((LAST_JS_OBJECT_TYPE + 1) == JS_FUNCTION_TYPE);
705
- return new HCheckInstanceType(value, FIRST_JS_OBJECT_TYPE, JS_FUNCTION_TYPE);
706
- }
707
-
708
-
709
- void HCheckMap::PrintDataTo(StringStream* stream) {
710
- value()->PrintNameTo(stream);
711
- stream->Add(" %p", *map());
712
- }
713
-
714
-
715
- void HCheckFunction::PrintDataTo(StringStream* stream) {
716
- value()->PrintNameTo(stream);
717
- stream->Add(" %p", *target());
718
- }
719
-
720
-
721
- void HCallStub::PrintDataTo(StringStream* stream) {
722
- stream->Add("%s ",
723
- CodeStub::MajorName(major_key_, false));
724
- HUnaryCall::PrintDataTo(stream);
725
- }
726
-
727
-
728
- void HInstanceOf::PrintDataTo(StringStream* stream) {
729
- left()->PrintNameTo(stream);
730
- stream->Add(" ");
731
- right()->PrintNameTo(stream);
732
- stream->Add(" ");
733
- context()->PrintNameTo(stream);
734
- }
735
-
736
-
737
- Range* HValue::InferRange() {
738
- if (representation().IsTagged()) {
739
- // Tagged values are always in int32 range when converted to integer,
740
- // but they can contain -0.
741
- Range* result = new Range();
742
- result->set_can_be_minus_zero(true);
743
- return result;
744
- } else if (representation().IsNone()) {
745
- return NULL;
746
- } else {
747
- return new Range();
748
- }
749
- }
750
-
751
-
752
- Range* HConstant::InferRange() {
753
- if (has_int32_value_) {
754
- Range* result = new Range(int32_value_, int32_value_);
755
- result->set_can_be_minus_zero(false);
756
- return result;
757
- }
758
- return HInstruction::InferRange();
759
- }
760
-
761
-
762
- Range* HPhi::InferRange() {
763
- if (representation().IsInteger32()) {
764
- if (block()->IsLoopHeader()) {
765
- Range* range = new Range(kMinInt, kMaxInt);
766
- return range;
767
- } else {
768
- Range* range = OperandAt(0)->range()->Copy();
769
- for (int i = 1; i < OperandCount(); ++i) {
770
- range->Union(OperandAt(i)->range());
771
- }
772
- return range;
773
- }
774
- } else {
775
- return HValue::InferRange();
776
- }
777
- }
778
-
779
-
780
- Range* HAdd::InferRange() {
781
- if (representation().IsInteger32()) {
782
- Range* a = left()->range();
783
- Range* b = right()->range();
784
- Range* res = a->Copy();
785
- if (!res->AddAndCheckOverflow(b)) {
786
- ClearFlag(kCanOverflow);
787
- }
788
- bool m0 = a->CanBeMinusZero() && b->CanBeMinusZero();
789
- res->set_can_be_minus_zero(m0);
790
- return res;
791
- } else {
792
- return HArithmeticBinaryOperation::InferRange();
793
- }
794
- }
795
-
796
-
797
- Range* HSub::InferRange() {
798
- if (representation().IsInteger32()) {
799
- Range* a = left()->range();
800
- Range* b = right()->range();
801
- Range* res = a->Copy();
802
- if (!res->SubAndCheckOverflow(b)) {
803
- ClearFlag(kCanOverflow);
804
- }
805
- res->set_can_be_minus_zero(a->CanBeMinusZero() && b->CanBeZero());
806
- return res;
807
- } else {
808
- return HArithmeticBinaryOperation::InferRange();
809
- }
810
- }
811
-
812
-
813
- Range* HMul::InferRange() {
814
- if (representation().IsInteger32()) {
815
- Range* a = left()->range();
816
- Range* b = right()->range();
817
- Range* res = a->Copy();
818
- if (!res->MulAndCheckOverflow(b)) {
819
- ClearFlag(kCanOverflow);
820
- }
821
- bool m0 = (a->CanBeZero() && b->CanBeNegative()) ||
822
- (a->CanBeNegative() && b->CanBeZero());
823
- res->set_can_be_minus_zero(m0);
824
- return res;
825
- } else {
826
- return HArithmeticBinaryOperation::InferRange();
827
- }
828
- }
829
-
830
-
831
- Range* HDiv::InferRange() {
832
- if (representation().IsInteger32()) {
833
- Range* result = new Range();
834
- if (left()->range()->CanBeMinusZero()) {
835
- result->set_can_be_minus_zero(true);
836
- }
837
-
838
- if (left()->range()->CanBeZero() && right()->range()->CanBeNegative()) {
839
- result->set_can_be_minus_zero(true);
840
- }
841
-
842
- if (right()->range()->Includes(-1) && left()->range()->Includes(kMinInt)) {
843
- SetFlag(HValue::kCanOverflow);
844
- }
845
-
846
- if (!right()->range()->CanBeZero()) {
847
- ClearFlag(HValue::kCanBeDivByZero);
848
- }
849
- return result;
850
- } else {
851
- return HArithmeticBinaryOperation::InferRange();
852
- }
853
- }
854
-
855
-
856
- Range* HMod::InferRange() {
857
- if (representation().IsInteger32()) {
858
- Range* a = left()->range();
859
- Range* result = new Range();
860
- if (a->CanBeMinusZero() || a->CanBeNegative()) {
861
- result->set_can_be_minus_zero(true);
862
- }
863
- if (!right()->range()->CanBeZero()) {
864
- ClearFlag(HValue::kCanBeDivByZero);
865
- }
866
- return result;
867
- } else {
868
- return HArithmeticBinaryOperation::InferRange();
869
- }
870
- }
871
-
872
-
873
- void HPhi::PrintTo(StringStream* stream) {
874
- stream->Add("[");
875
- for (int i = 0; i < OperandCount(); ++i) {
876
- HValue* value = OperandAt(i);
877
- stream->Add(" ");
878
- value->PrintNameTo(stream);
879
- stream->Add(" ");
880
- }
881
- stream->Add(" uses%d_%di_%dd_%dt]",
882
- uses()->length(),
883
- int32_non_phi_uses() + int32_indirect_uses(),
884
- double_non_phi_uses() + double_indirect_uses(),
885
- tagged_non_phi_uses() + tagged_indirect_uses());
886
- }
887
-
888
-
889
- void HPhi::AddInput(HValue* value) {
890
- inputs_.Add(NULL);
891
- SetOperandAt(OperandCount() - 1, value);
892
- // Mark phis that may have 'arguments' directly or indirectly as an operand.
893
- if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) {
894
- SetFlag(kIsArguments);
895
- }
896
- }
897
-
898
-
899
- HValue* HPhi::GetRedundantReplacement() {
900
- HValue* candidate = NULL;
901
- int count = OperandCount();
902
- int position = 0;
903
- while (position < count && candidate == NULL) {
904
- HValue* current = OperandAt(position++);
905
- if (current != this) candidate = current;
906
- }
907
- while (position < count) {
908
- HValue* current = OperandAt(position++);
909
- if (current != this && current != candidate) return NULL;
910
- }
911
- ASSERT(candidate != this);
912
- return candidate;
913
- }
914
-
915
-
916
- void HPhi::DeleteFromGraph() {
917
- ASSERT(block() != NULL);
918
- block()->RemovePhi(this);
919
- ASSERT(block() == NULL);
920
- }
921
-
922
-
923
- void HPhi::InitRealUses(int phi_id) {
924
- // Initialize real uses.
925
- phi_id_ = phi_id;
926
- for (int j = 0; j < uses()->length(); j++) {
927
- HValue* use = uses()->at(j);
928
- if (!use->IsPhi()) {
929
- int index = use->LookupOperandIndex(0, this);
930
- Representation req_rep = use->RequiredInputRepresentation(index);
931
- non_phi_uses_[req_rep.kind()]++;
932
- }
933
- }
934
- }
935
-
936
-
937
- void HPhi::AddNonPhiUsesFrom(HPhi* other) {
938
- for (int i = 0; i < Representation::kNumRepresentations; i++) {
939
- indirect_uses_[i] += other->non_phi_uses_[i];
940
- }
941
- }
942
-
943
-
944
- void HPhi::AddIndirectUsesTo(int* dest) {
945
- for (int i = 0; i < Representation::kNumRepresentations; i++) {
946
- dest[i] += indirect_uses_[i];
947
- }
948
- }
949
-
950
-
951
- void HSimulate::PrintDataTo(StringStream* stream) {
952
- stream->Add("id=%d ", ast_id());
953
- if (pop_count_ > 0) stream->Add("pop %d", pop_count_);
954
- if (values_.length() > 0) {
955
- if (pop_count_ > 0) stream->Add(" /");
956
- for (int i = 0; i < values_.length(); ++i) {
957
- if (!HasAssignedIndexAt(i)) {
958
- stream->Add(" push ");
959
- } else {
960
- stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
961
- }
962
- values_[i]->PrintNameTo(stream);
963
- }
964
- }
965
- }
966
-
967
-
968
- void HEnterInlined::PrintDataTo(StringStream* stream) {
969
- SmartPointer<char> name = function()->debug_name()->ToCString();
970
- stream->Add("%s, id=%d", *name, function()->id());
971
- }
972
-
973
-
974
- HConstant::HConstant(Handle<Object> handle, Representation r)
975
- : handle_(handle),
976
- constant_type_(HType::TypeFromValue(handle)),
977
- has_int32_value_(false),
978
- int32_value_(0),
979
- has_double_value_(false),
980
- double_value_(0) {
981
- set_representation(r);
982
- SetFlag(kUseGVN);
983
- if (handle_->IsNumber()) {
984
- double n = handle_->Number();
985
- double roundtrip_value = static_cast<double>(static_cast<int32_t>(n));
986
- has_int32_value_ = BitCast<int64_t>(roundtrip_value) == BitCast<int64_t>(n);
987
- if (has_int32_value_) int32_value_ = static_cast<int32_t>(n);
988
- double_value_ = n;
989
- has_double_value_ = true;
990
- }
991
- }
992
-
993
-
994
- HConstant* HConstant::CopyToRepresentation(Representation r) const {
995
- if (r.IsInteger32() && !has_int32_value_) return NULL;
996
- if (r.IsDouble() && !has_double_value_) return NULL;
997
- return new HConstant(handle_, r);
998
- }
999
-
1000
-
1001
- HConstant* HConstant::CopyToTruncatedInt32() const {
1002
- if (!has_double_value_) return NULL;
1003
- int32_t truncated = NumberToInt32(*handle_);
1004
- return new HConstant(Factory::NewNumberFromInt(truncated),
1005
- Representation::Integer32());
1006
- }
1007
-
1008
-
1009
- void HConstant::PrintDataTo(StringStream* stream) {
1010
- handle()->ShortPrint(stream);
1011
- }
1012
-
1013
-
1014
- bool HArrayLiteral::IsCopyOnWrite() const {
1015
- return constant_elements()->map() == Heap::fixed_cow_array_map();
1016
- }
1017
-
1018
-
1019
- void HBinaryOperation::PrintDataTo(StringStream* stream) {
1020
- left()->PrintNameTo(stream);
1021
- stream->Add(" ");
1022
- right()->PrintNameTo(stream);
1023
- if (CheckFlag(kCanOverflow)) stream->Add(" !");
1024
- if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
1025
- }
1026
-
1027
-
1028
- Range* HBitAnd::InferRange() {
1029
- Range* a = left()->range();
1030
- Range* b = right()->range();
1031
- int32_t a_mask = 0xffffffff;
1032
- int32_t b_mask = 0xffffffff;
1033
- if (a != NULL) a_mask = a->Mask();
1034
- if (b != NULL) b_mask = b->Mask();
1035
- int32_t result_mask = a_mask & b_mask;
1036
- if (result_mask >= 0) {
1037
- return new Range(0, result_mask);
1038
- } else {
1039
- return HBinaryOperation::InferRange();
1040
- }
1041
- }
1042
-
1043
-
1044
- Range* HBitOr::InferRange() {
1045
- Range* a = left()->range();
1046
- Range* b = right()->range();
1047
- int32_t a_mask = 0xffffffff;
1048
- int32_t b_mask = 0xffffffff;
1049
- if (a != NULL) a_mask = a->Mask();
1050
- if (b != NULL) b_mask = b->Mask();
1051
- int32_t result_mask = a_mask | b_mask;
1052
- if (result_mask >= 0) {
1053
- return new Range(0, result_mask);
1054
- } else {
1055
- return HBinaryOperation::InferRange();
1056
- }
1057
- }
1058
-
1059
-
1060
- Range* HSar::InferRange() {
1061
- if (right()->IsConstant()) {
1062
- HConstant* c = HConstant::cast(right());
1063
- if (c->HasInteger32Value()) {
1064
- int32_t val = c->Integer32Value();
1065
- Range* result = NULL;
1066
- Range* left_range = left()->range();
1067
- if (left_range == NULL) {
1068
- result = new Range();
1069
- } else {
1070
- result = left_range->Copy();
1071
- }
1072
- result->Sar(val);
1073
- return result;
1074
- }
1075
- }
1076
-
1077
- return HBinaryOperation::InferRange();
1078
- }
1079
-
1080
-
1081
- Range* HShl::InferRange() {
1082
- if (right()->IsConstant()) {
1083
- HConstant* c = HConstant::cast(right());
1084
- if (c->HasInteger32Value()) {
1085
- int32_t val = c->Integer32Value();
1086
- Range* result = NULL;
1087
- Range* left_range = left()->range();
1088
- if (left_range == NULL) {
1089
- result = new Range();
1090
- } else {
1091
- result = left_range->Copy();
1092
- }
1093
- result->Shl(val);
1094
- return result;
1095
- }
1096
- }
1097
-
1098
- return HBinaryOperation::InferRange();
1099
- }
1100
-
1101
-
1102
-
1103
- void HCompare::PrintDataTo(StringStream* stream) {
1104
- stream->Add(Token::Name(token()));
1105
- stream->Add(" ");
1106
- HBinaryOperation::PrintDataTo(stream);
1107
- }
1108
-
1109
-
1110
- void HCompare::SetInputRepresentation(Representation r) {
1111
- input_representation_ = r;
1112
- if (r.IsTagged()) {
1113
- SetAllSideEffects();
1114
- ClearFlag(kUseGVN);
1115
- } else {
1116
- ClearAllSideEffects();
1117
- SetFlag(kUseGVN);
1118
- }
1119
- }
1120
-
1121
-
1122
- void HParameter::PrintDataTo(StringStream* stream) {
1123
- stream->Add("%u", index());
1124
- }
1125
-
1126
-
1127
- void HLoadNamedField::PrintDataTo(StringStream* stream) {
1128
- object()->PrintNameTo(stream);
1129
- stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : "");
1130
- }
1131
-
1132
-
1133
- void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) {
1134
- object()->PrintNameTo(stream);
1135
- stream->Add("[");
1136
- key()->PrintNameTo(stream);
1137
- stream->Add("]");
1138
- }
1139
-
1140
-
1141
- void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) {
1142
- object()->PrintNameTo(stream);
1143
- stream->Add("[");
1144
- key()->PrintNameTo(stream);
1145
- stream->Add("]");
1146
- }
1147
-
1148
-
1149
- void HLoadPixelArrayElement::PrintDataTo(StringStream* stream) {
1150
- external_pointer()->PrintNameTo(stream);
1151
- stream->Add("[");
1152
- key()->PrintNameTo(stream);
1153
- stream->Add("]");
1154
- }
1155
-
1156
-
1157
- void HStoreNamedGeneric::PrintDataTo(StringStream* stream) {
1158
- object()->PrintNameTo(stream);
1159
- stream->Add(".");
1160
- ASSERT(name()->IsString());
1161
- stream->Add(*String::cast(*name())->ToCString());
1162
- stream->Add(" = ");
1163
- value()->PrintNameTo(stream);
1164
- }
1165
-
1166
-
1167
- void HStoreNamedField::PrintDataTo(StringStream* stream) {
1168
- object()->PrintNameTo(stream);
1169
- stream->Add(".");
1170
- ASSERT(name()->IsString());
1171
- stream->Add(*String::cast(*name())->ToCString());
1172
- stream->Add(" = ");
1173
- value()->PrintNameTo(stream);
1174
- if (!transition().is_null()) {
1175
- stream->Add(" (transition map %p)", *transition());
1176
- }
1177
- }
1178
-
1179
-
1180
- void HStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
1181
- object()->PrintNameTo(stream);
1182
- stream->Add("[");
1183
- key()->PrintNameTo(stream);
1184
- stream->Add("] = ");
1185
- value()->PrintNameTo(stream);
1186
- }
1187
-
1188
-
1189
- void HStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
1190
- object()->PrintNameTo(stream);
1191
- stream->Add("[");
1192
- key()->PrintNameTo(stream);
1193
- stream->Add("] = ");
1194
- value()->PrintNameTo(stream);
1195
- }
1196
-
1197
-
1198
- void HStorePixelArrayElement::PrintDataTo(StringStream* stream) {
1199
- external_pointer()->PrintNameTo(stream);
1200
- stream->Add("[");
1201
- key()->PrintNameTo(stream);
1202
- stream->Add("] = ");
1203
- value()->PrintNameTo(stream);
1204
- }
1205
-
1206
-
1207
- void HLoadGlobal::PrintDataTo(StringStream* stream) {
1208
- stream->Add("[%p]", *cell());
1209
- if (check_hole_value()) stream->Add(" (deleteable/read-only)");
1210
- }
1211
-
1212
-
1213
- void HStoreGlobal::PrintDataTo(StringStream* stream) {
1214
- stream->Add("[%p] = ", *cell());
1215
- value()->PrintNameTo(stream);
1216
- }
1217
-
1218
-
1219
- void HLoadContextSlot::PrintDataTo(StringStream* stream) {
1220
- value()->PrintNameTo(stream);
1221
- stream->Add("[%d]", slot_index());
1222
- }
1223
-
1224
-
1225
- void HStoreContextSlot::PrintDataTo(StringStream* stream) {
1226
- context()->PrintNameTo(stream);
1227
- stream->Add("[%d] = ", slot_index());
1228
- value()->PrintNameTo(stream);
1229
- }
1230
-
1231
-
1232
- // Implementation of type inference and type conversions. Calculates
1233
- // the inferred type of this instruction based on the input operands.
1234
-
1235
- HType HValue::CalculateInferredType() {
1236
- return type_;
1237
- }
1238
-
1239
-
1240
- HType HCheckMap::CalculateInferredType() {
1241
- return value()->type();
1242
- }
1243
-
1244
-
1245
- HType HCheckFunction::CalculateInferredType() {
1246
- return value()->type();
1247
- }
1248
-
1249
-
1250
- HType HCheckNonSmi::CalculateInferredType() {
1251
- // TODO(kasperl): Is there any way to signal that this isn't a smi?
1252
- return HType::Tagged();
1253
- }
1254
-
1255
-
1256
- HType HCheckSmi::CalculateInferredType() {
1257
- return HType::Smi();
1258
- }
1259
-
1260
-
1261
- HType HPhi::CalculateInferredType() {
1262
- HType result = HType::Uninitialized();
1263
- for (int i = 0; i < OperandCount(); ++i) {
1264
- HType current = OperandAt(i)->type();
1265
- result = result.Combine(current);
1266
- }
1267
- return result;
1268
- }
1269
-
1270
-
1271
- HType HConstant::CalculateInferredType() {
1272
- return constant_type_;
1273
- }
1274
-
1275
-
1276
- HType HCompare::CalculateInferredType() {
1277
- return HType::Boolean();
1278
- }
1279
-
1280
-
1281
- HType HCompareJSObjectEq::CalculateInferredType() {
1282
- return HType::Boolean();
1283
- }
1284
-
1285
-
1286
- HType HUnaryPredicate::CalculateInferredType() {
1287
- return HType::Boolean();
1288
- }
1289
-
1290
-
1291
- HType HBitwiseBinaryOperation::CalculateInferredType() {
1292
- return HType::TaggedNumber();
1293
- }
1294
-
1295
-
1296
- HType HArithmeticBinaryOperation::CalculateInferredType() {
1297
- return HType::TaggedNumber();
1298
- }
1299
-
1300
-
1301
- HType HAdd::CalculateInferredType() {
1302
- return HType::Tagged();
1303
- }
1304
-
1305
-
1306
- HType HBitAnd::CalculateInferredType() {
1307
- return HType::TaggedNumber();
1308
- }
1309
-
1310
-
1311
- HType HBitXor::CalculateInferredType() {
1312
- return HType::TaggedNumber();
1313
- }
1314
-
1315
-
1316
- HType HBitOr::CalculateInferredType() {
1317
- return HType::TaggedNumber();
1318
- }
1319
-
1320
-
1321
- HType HBitNot::CalculateInferredType() {
1322
- return HType::TaggedNumber();
1323
- }
1324
-
1325
-
1326
- HType HUnaryMathOperation::CalculateInferredType() {
1327
- return HType::TaggedNumber();
1328
- }
1329
-
1330
-
1331
- HType HShl::CalculateInferredType() {
1332
- return HType::TaggedNumber();
1333
- }
1334
-
1335
-
1336
- HType HShr::CalculateInferredType() {
1337
- return HType::TaggedNumber();
1338
- }
1339
-
1340
-
1341
- HType HSar::CalculateInferredType() {
1342
- return HType::TaggedNumber();
1343
- }
1344
-
1345
-
1346
- HValue* HUnaryMathOperation::EnsureAndPropagateNotMinusZero(
1347
- BitVector* visited) {
1348
- visited->Add(id());
1349
- if (representation().IsInteger32() &&
1350
- !value()->representation().IsInteger32()) {
1351
- if (value()->range() == NULL || value()->range()->CanBeMinusZero()) {
1352
- SetFlag(kBailoutOnMinusZero);
1353
- }
1354
- }
1355
- if (RequiredInputRepresentation(0).IsInteger32() &&
1356
- representation().IsInteger32()) {
1357
- return value();
1358
- }
1359
- return NULL;
1360
- }
1361
-
1362
-
1363
-
1364
- HValue* HChange::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1365
- visited->Add(id());
1366
- if (from().IsInteger32()) return NULL;
1367
- if (CanTruncateToInt32()) return NULL;
1368
- if (value()->range() == NULL || value()->range()->CanBeMinusZero()) {
1369
- SetFlag(kBailoutOnMinusZero);
1370
- }
1371
- ASSERT(!from().IsInteger32() || !to().IsInteger32());
1372
- return NULL;
1373
- }
1374
-
1375
-
1376
- HValue* HMod::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1377
- visited->Add(id());
1378
- if (range() == NULL || range()->CanBeMinusZero()) {
1379
- SetFlag(kBailoutOnMinusZero);
1380
- return left();
1381
- }
1382
- return NULL;
1383
- }
1384
-
1385
-
1386
- HValue* HDiv::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1387
- visited->Add(id());
1388
- if (range() == NULL || range()->CanBeMinusZero()) {
1389
- SetFlag(kBailoutOnMinusZero);
1390
- }
1391
- return NULL;
1392
- }
1393
-
1394
-
1395
- HValue* HMul::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1396
- visited->Add(id());
1397
- if (range() == NULL || range()->CanBeMinusZero()) {
1398
- SetFlag(kBailoutOnMinusZero);
1399
- }
1400
- return NULL;
1401
- }
1402
-
1403
-
1404
- HValue* HSub::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1405
- visited->Add(id());
1406
- // Propagate to the left argument. If the left argument cannot be -0, then
1407
- // the result of the add operation cannot be either.
1408
- if (range() == NULL || range()->CanBeMinusZero()) {
1409
- return left();
1410
- }
1411
- return NULL;
1412
- }
1413
-
1414
-
1415
- HValue* HAdd::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1416
- visited->Add(id());
1417
- // Propagate to the left argument. If the left argument cannot be -0, then
1418
- // the result of the sub operation cannot be either.
1419
- if (range() == NULL || range()->CanBeMinusZero()) {
1420
- return left();
1421
- }
1422
- return NULL;
1423
- }
1424
-
1425
-
1426
- // Node-specific verification code is only included in debug mode.
1427
- #ifdef DEBUG
1428
-
1429
- void HPhi::Verify() {
1430
- ASSERT(OperandCount() == block()->predecessors()->length());
1431
- for (int i = 0; i < OperandCount(); ++i) {
1432
- HValue* value = OperandAt(i);
1433
- HBasicBlock* defining_block = value->block();
1434
- HBasicBlock* predecessor_block = block()->predecessors()->at(i);
1435
- ASSERT(defining_block == predecessor_block ||
1436
- defining_block->Dominates(predecessor_block));
1437
- }
1438
- }
1439
-
1440
-
1441
- void HSimulate::Verify() {
1442
- HInstruction::Verify();
1443
- ASSERT(HasAstId());
1444
- }
1445
-
1446
-
1447
- void HBoundsCheck::Verify() {
1448
- HInstruction::Verify();
1449
- ASSERT(HasNoUses());
1450
- }
1451
-
1452
-
1453
- void HCheckSmi::Verify() {
1454
- HInstruction::Verify();
1455
- ASSERT(HasNoUses());
1456
- }
1457
-
1458
-
1459
- void HCheckNonSmi::Verify() {
1460
- HInstruction::Verify();
1461
- ASSERT(HasNoUses());
1462
- }
1463
-
1464
-
1465
- void HCheckInstanceType::Verify() {
1466
- HInstruction::Verify();
1467
- ASSERT(HasNoUses());
1468
- }
1469
-
1470
-
1471
- void HCheckMap::Verify() {
1472
- HInstruction::Verify();
1473
- ASSERT(HasNoUses());
1474
- }
1475
-
1476
-
1477
- void HCheckFunction::Verify() {
1478
- HInstruction::Verify();
1479
- ASSERT(HasNoUses());
1480
- }
1481
-
1482
-
1483
- void HCheckPrototypeMaps::Verify() {
1484
- HInstruction::Verify();
1485
- ASSERT(HasNoUses());
1486
- }
1487
-
1488
- #endif
1489
-
1490
- } } // namespace v8::internal