therubyracer 0.8.1.pre2 → 0.8.1

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

Potentially problematic release.


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

Files changed (877) hide show
  1. data/Changelog.md +2 -1
  2. data/README.md +6 -3
  3. data/ext/v8/upstream/3.1.8/.gitignore +31 -0
  4. data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
  5. data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
  6. data/ext/v8/upstream/3.1.8/LICENSE +52 -0
  7. data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
  8. data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
  9. data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
  10. data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
  11. data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
  12. data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
  13. data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
  14. data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
  15. data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
  16. data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
  17. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
  19. data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
  20. data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
  21. data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
  22. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
  23. data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
  24. data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
  25. data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
  26. data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
  27. data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
  28. data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
  29. data/ext/v8/upstream/3.1.8/src/api.h +508 -0
  30. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
  31. data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
  32. data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
  33. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
  34. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
  35. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
  36. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
  37. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
  38. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
  39. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
  40. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
  41. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
  42. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
  43. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
  44. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
  45. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
  46. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
  47. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
  48. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
  49. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
  50. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
  51. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
  52. data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
  53. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
  54. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
  55. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
  56. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
  57. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
  58. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
  59. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
  60. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
  61. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
  62. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
  63. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
  64. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
  65. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
  66. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
  67. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
  68. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
  69. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
  70. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
  71. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
  72. data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
  73. data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
  74. data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
  75. data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
  76. data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
  77. data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
  78. data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
  79. data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
  80. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
  81. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
  82. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
  83. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
  84. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
  85. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
  86. data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
  87. data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
  88. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
  89. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
  90. data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
  91. data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
  92. data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
  93. data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
  94. data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
  95. data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
  96. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
  97. data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
  98. data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
  99. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
  100. data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
  101. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
  102. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
  103. data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
  104. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
  105. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
  106. data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
  107. data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
  108. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
  109. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
  110. data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
  111. data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
  112. data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
  113. data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
  114. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
  115. data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
  116. data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
  117. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
  118. data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
  119. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
  120. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
  121. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
  122. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
  123. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
  124. data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
  125. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
  126. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
  127. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
  128. data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
  129. data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
  130. data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
  131. data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
  132. data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
  133. data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
  134. data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
  135. data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
  136. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
  137. data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
  138. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
  139. data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
  140. data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
  141. data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
  142. data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
  143. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
  144. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
  145. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
  146. data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
  147. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
  148. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
  149. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
  150. data/ext/v8/upstream/3.1.8/src/double.h +238 -0
  151. data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
  152. data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
  153. data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
  154. data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
  155. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
  156. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
  157. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
  158. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
  159. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
  160. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
  161. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
  162. data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
  163. data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
  164. data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
  165. data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
  166. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
  167. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
  168. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
  169. data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
  170. data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
  171. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
  172. data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
  173. data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
  174. data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
  175. data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
  176. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
  177. data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
  178. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
  179. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
  180. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
  181. data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
  182. data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
  183. data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
  184. data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
  185. data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
  186. data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
  187. data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
  188. data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
  189. data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
  190. data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
  191. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
  192. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
  193. data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
  194. data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
  195. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
  196. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
  197. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
  198. data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
  199. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
  200. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
  201. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
  202. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
  203. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
  204. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
  205. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
  206. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
  207. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
  208. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
  209. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
  210. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
  211. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
  212. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
  213. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
  214. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
  215. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
  216. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
  217. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
  218. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
  219. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
  220. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  221. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
  222. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
  223. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
  224. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
  225. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
  226. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
  227. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  228. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
  229. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
  230. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
  231. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
  232. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
  233. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
  234. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
  235. data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
  236. data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
  237. data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
  238. data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
  239. data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
  240. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
  241. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
  242. data/ext/v8/upstream/3.1.8/src/json.js +342 -0
  243. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
  244. data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
  245. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
  246. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
  247. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
  248. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
  249. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
  250. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
  251. data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
  252. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
  253. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
  254. data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
  255. data/ext/v8/upstream/3.1.8/src/list.h +164 -0
  256. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
  257. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
  258. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
  259. data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
  260. data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
  261. data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
  262. data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
  263. data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
  264. data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
  265. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
  266. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
  267. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
  268. data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
  269. data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
  270. data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
  271. data/ext/v8/upstream/3.1.8/src/log.h +379 -0
  272. data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
  273. data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
  274. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
  275. data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
  276. data/ext/v8/upstream/3.1.8/src/math.js +264 -0
  277. data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
  278. data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
  279. data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
  280. data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
  281. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
  282. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
  283. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
  284. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
  285. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
  286. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
  287. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
  288. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
  289. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
  290. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
  291. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
  292. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
  293. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
  294. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
  295. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
  296. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
  297. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
  298. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
  299. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
  300. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
  301. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
  302. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
  303. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
  304. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
  305. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
  306. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
  307. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
  308. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
  309. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
  310. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
  311. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
  312. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
  313. data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
  314. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
  315. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
  316. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
  317. data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
  318. data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
  319. data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
  320. data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
  321. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
  322. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
  323. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
  324. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
  325. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
  326. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
  327. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
  328. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
  329. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
  330. data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
  331. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
  332. data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
  333. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
  334. data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
  335. data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
  336. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
  337. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
  338. data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
  339. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
  340. data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
  341. data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
  342. data/ext/v8/upstream/3.1.8/src/property.h +337 -0
  343. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  344. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
  345. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
  346. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
  347. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
  348. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
  349. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
  350. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
  351. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
  352. data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
  353. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
  354. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
  355. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
  356. data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
  357. data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
  358. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
  359. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
  360. data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
  361. data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
  362. data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
  363. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
  364. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
  365. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
  366. data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
  367. data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
  368. data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
  369. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
  370. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
  371. data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
  372. data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
  373. data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
  374. data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
  375. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
  376. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
  377. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
  378. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
  379. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
  380. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
  381. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
  382. data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
  383. data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
  384. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
  385. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
  386. data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
  387. data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
  388. data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
  389. data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
  390. data/ext/v8/upstream/3.1.8/src/string.js +915 -0
  391. data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
  392. data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
  393. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
  394. data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
  395. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
  396. data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
  397. data/ext/v8/upstream/3.1.8/src/token.h +288 -0
  398. data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
  399. data/ext/v8/upstream/3.1.8/src/top.h +608 -0
  400. data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
  401. data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
  402. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
  403. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
  404. data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
  405. data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
  406. data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
  407. data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
  408. data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
  409. data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
  410. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
  411. data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
  412. data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
  413. data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
  414. data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
  415. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
  416. data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
  417. data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
  418. data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
  419. data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
  420. data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
  421. data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
  422. data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
  423. data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
  424. data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
  425. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
  426. data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
  427. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
  428. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
  429. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
  430. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
  431. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
  432. data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
  433. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
  434. data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
  435. data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
  436. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
  437. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
  438. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
  439. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
  440. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
  441. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
  442. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
  443. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
  444. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
  445. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
  446. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
  447. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
  448. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
  449. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
  450. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
  451. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
  452. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
  453. data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
  454. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
  455. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
  456. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  457. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
  458. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
  459. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
  460. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
  461. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
  462. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
  463. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
  464. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
  465. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
  466. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
  467. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
  468. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
  469. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
  470. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
  471. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
  472. data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
  473. data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
  474. data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
  475. data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
  476. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
  477. data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
  478. data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
  479. data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
  480. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
  481. data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
  482. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
  483. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
  484. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
  485. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
  486. data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
  487. data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
  488. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
  489. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
  490. data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
  491. data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
  492. data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
  493. data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
  494. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
  495. data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
  496. data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
  497. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
  498. data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
  499. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
  500. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
  501. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
  502. data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
  503. data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
  504. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
  505. data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
  506. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
  507. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
  508. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
  509. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
  510. data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
  511. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
  512. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
  513. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
  514. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
  515. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
  516. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
  517. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
  518. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
  519. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
  520. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
  521. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  522. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  523. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  524. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  525. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  526. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  527. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  528. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  529. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
  530. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
  531. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
  532. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  533. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  534. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  535. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  536. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
  537. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
  538. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
  539. data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
  540. data/ext/v8/upstream/Makefile +2 -1
  541. data/ext/v8/v8_template.cpp +2 -2
  542. data/lib/v8/version.rb +1 -1
  543. data/spec/redjs/jsapi_spec.rb +2 -2
  544. metadata +552 -490
  545. data/ext/v8/upstream/2.3.3/.gitignore +0 -26
  546. data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
  547. data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
  548. data/ext/v8/upstream/2.3.3/LICENSE +0 -55
  549. data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
  550. data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
  551. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
  552. data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
  553. data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
  554. data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
  555. data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
  556. data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
  557. data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
  558. data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
  559. data/ext/v8/upstream/2.3.3/src/api.h +0 -485
  560. data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
  561. data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
  562. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
  563. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
  564. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
  565. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
  566. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
  567. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
  568. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
  569. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
  570. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
  571. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
  572. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
  573. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
  574. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
  575. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
  576. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
  577. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
  578. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
  579. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
  580. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
  581. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
  582. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
  583. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
  584. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
  585. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
  586. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
  587. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
  588. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
  589. data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
  590. data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
  591. data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
  592. data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
  593. data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
  594. data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
  595. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
  596. data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
  597. data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
  598. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
  599. data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
  600. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
  601. data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
  602. data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
  603. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
  604. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
  605. data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
  606. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
  607. data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
  608. data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
  609. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
  610. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
  611. data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
  612. data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
  613. data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
  614. data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
  615. data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
  616. data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
  617. data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
  618. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
  619. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
  620. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
  621. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
  622. data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
  623. data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
  624. data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
  625. data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
  626. data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
  627. data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
  628. data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
  629. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
  630. data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
  631. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
  632. data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
  633. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
  634. data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
  635. data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
  636. data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
  637. data/ext/v8/upstream/2.3.3/src/double.h +0 -169
  638. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
  639. data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
  640. data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
  641. data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
  642. data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
  643. data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
  644. data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
  645. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
  646. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
  647. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
  648. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
  649. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
  650. data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
  651. data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
  652. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
  653. data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
  654. data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
  655. data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
  656. data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
  657. data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
  658. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
  659. data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
  660. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
  661. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
  662. data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
  663. data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
  664. data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
  665. data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
  666. data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
  667. data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
  668. data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
  669. data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
  670. data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
  671. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
  672. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
  673. data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
  674. data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
  675. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
  676. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
  677. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
  678. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
  679. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
  680. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
  681. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
  682. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
  683. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
  684. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
  685. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
  686. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
  687. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
  688. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
  689. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
  690. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
  691. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
  692. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
  693. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
  694. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
  695. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
  696. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
  697. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
  698. data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
  699. data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
  700. data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
  701. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
  702. data/ext/v8/upstream/2.3.3/src/json.js +0 -268
  703. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
  704. data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
  705. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
  706. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
  707. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
  708. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
  709. data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
  710. data/ext/v8/upstream/2.3.3/src/list.h +0 -159
  711. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
  712. data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
  713. data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
  714. data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
  715. data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
  716. data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
  717. data/ext/v8/upstream/2.3.3/src/log.h +0 -384
  718. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
  719. data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
  720. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
  721. data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
  722. data/ext/v8/upstream/2.3.3/src/math.js +0 -264
  723. data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
  724. data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
  725. data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
  726. data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
  727. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
  728. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
  729. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
  730. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
  731. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
  732. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
  733. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
  734. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
  735. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
  736. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
  737. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
  738. data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
  739. data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
  740. data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
  741. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
  742. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
  743. data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
  744. data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
  745. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
  746. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
  747. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
  748. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
  749. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
  750. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
  751. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
  752. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
  753. data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
  754. data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
  755. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
  756. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
  757. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
  758. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
  759. data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
  760. data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
  761. data/ext/v8/upstream/2.3.3/src/property.h +0 -315
  762. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
  763. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
  764. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
  765. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
  766. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
  767. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
  768. data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
  769. data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
  770. data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
  771. data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
  772. data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
  773. data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
  774. data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
  775. data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
  776. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
  777. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
  778. data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
  779. data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
  780. data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
  781. data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
  782. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
  783. data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
  784. data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
  785. data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
  786. data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
  787. data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
  788. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
  789. data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
  790. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
  791. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
  792. data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
  793. data/ext/v8/upstream/2.3.3/src/token.h +0 -270
  794. data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
  795. data/ext/v8/upstream/2.3.3/src/top.h +0 -463
  796. data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
  797. data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
  798. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
  799. data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
  800. data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
  801. data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
  802. data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
  803. data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
  804. data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
  805. data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
  806. data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
  807. data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
  808. data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
  809. data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
  810. data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
  811. data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
  812. data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
  813. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
  814. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
  815. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
  816. data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
  817. data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
  818. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
  819. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
  820. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
  821. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
  822. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
  823. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
  824. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
  825. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
  826. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
  827. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
  828. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
  829. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
  830. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
  831. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
  832. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
  833. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
  834. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
  835. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
  836. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
  837. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
  838. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
  839. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
  840. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
  841. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
  842. data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
  843. data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
  844. data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
  845. data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
  846. data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
  847. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
  848. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
  849. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
  850. data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
  851. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
  852. data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
  853. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
  854. data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
  855. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
  856. data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
  857. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
  858. data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
  859. data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
  860. data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
  861. data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
  862. data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
  863. data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
  864. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
  865. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
  866. data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
  867. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
  868. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
  869. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
  870. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
  871. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
  872. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
  873. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
  874. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
  875. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
  876. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
  877. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -0,0 +1,74 @@
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
+ #ifndef V8_X64_LITHIUM_GAP_RESOLVER_X64_H_
29
+ #define V8_X64_LITHIUM_GAP_RESOLVER_X64_H_
30
+
31
+ #include "v8.h"
32
+
33
+ #include "lithium.h"
34
+
35
+ namespace v8 {
36
+ namespace internal {
37
+
38
+ class LCodeGen;
39
+ class LGapResolver;
40
+
41
+ class LGapResolver BASE_EMBEDDED {
42
+ public:
43
+ explicit LGapResolver(LCodeGen* owner);
44
+
45
+ // Resolve a set of parallel moves, emitting assembler instructions.
46
+ void Resolve(LParallelMove* parallel_move);
47
+
48
+ private:
49
+ // Build the initial list of moves.
50
+ void BuildInitialMoveList(LParallelMove* parallel_move);
51
+
52
+ // Perform the move at the moves_ index in question (possibly requiring
53
+ // other moves to satisfy dependencies).
54
+ void PerformMove(int index);
55
+
56
+ // Emit a move and remove it from the move graph.
57
+ void EmitMove(int index);
58
+
59
+ // Execute a move by emitting a swap of two operands. The move from
60
+ // source to destination is removed from the move graph.
61
+ void EmitSwap(int index);
62
+
63
+ // Verify the move list before performing moves.
64
+ void Verify();
65
+
66
+ LCodeGen* cgen_;
67
+
68
+ // List of moves not yet resolved.
69
+ ZoneList<LMoveOperands> moves_;
70
+ };
71
+
72
+ } } // namespace v8::internal
73
+
74
+ #endif // V8_X64_LITHIUM_GAP_RESOLVER_X64_H_
@@ -0,0 +1,2044 @@
1
+ // Copyright 2011 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #include "v8.h"
29
+
30
+ #if defined(V8_TARGET_ARCH_X64)
31
+
32
+ #include "lithium-allocator-inl.h"
33
+ #include "x64/lithium-x64.h"
34
+ #include "x64/lithium-codegen-x64.h"
35
+
36
+ namespace v8 {
37
+ namespace internal {
38
+
39
+ #define DEFINE_COMPILE(type) \
40
+ void L##type::CompileToNative(LCodeGen* generator) { \
41
+ generator->Do##type(this); \
42
+ }
43
+ LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
44
+ #undef DEFINE_COMPILE
45
+
46
+ LOsrEntry::LOsrEntry() {
47
+ for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) {
48
+ register_spills_[i] = NULL;
49
+ }
50
+ for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) {
51
+ double_register_spills_[i] = NULL;
52
+ }
53
+ }
54
+
55
+
56
+ void LOsrEntry::MarkSpilledRegister(int allocation_index,
57
+ LOperand* spill_operand) {
58
+ ASSERT(spill_operand->IsStackSlot());
59
+ ASSERT(register_spills_[allocation_index] == NULL);
60
+ register_spills_[allocation_index] = spill_operand;
61
+ }
62
+
63
+
64
+ void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index,
65
+ LOperand* spill_operand) {
66
+ ASSERT(spill_operand->IsDoubleStackSlot());
67
+ ASSERT(double_register_spills_[allocation_index] == NULL);
68
+ double_register_spills_[allocation_index] = spill_operand;
69
+ }
70
+
71
+
72
+ #ifdef DEBUG
73
+ void LInstruction::VerifyCall() {
74
+ // Call instructions can use only fixed registers as
75
+ // temporaries and outputs because all registers
76
+ // are blocked by the calling convention.
77
+ // Inputs must use a fixed register.
78
+ ASSERT(Output() == NULL ||
79
+ LUnallocated::cast(Output())->HasFixedPolicy() ||
80
+ !LUnallocated::cast(Output())->HasRegisterPolicy());
81
+ for (UseIterator it(this); it.HasNext(); it.Advance()) {
82
+ LOperand* operand = it.Next();
83
+ ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
84
+ !LUnallocated::cast(operand)->HasRegisterPolicy());
85
+ }
86
+ for (TempIterator it(this); it.HasNext(); it.Advance()) {
87
+ LOperand* operand = it.Next();
88
+ ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
89
+ !LUnallocated::cast(operand)->HasRegisterPolicy());
90
+ }
91
+ }
92
+ #endif
93
+
94
+
95
+ void LInstruction::PrintTo(StringStream* stream) {
96
+ stream->Add("%s ", this->Mnemonic());
97
+
98
+ PrintOutputOperandTo(stream);
99
+
100
+ PrintDataTo(stream);
101
+
102
+ if (HasEnvironment()) {
103
+ stream->Add(" ");
104
+ environment()->PrintTo(stream);
105
+ }
106
+
107
+ if (HasPointerMap()) {
108
+ stream->Add(" ");
109
+ pointer_map()->PrintTo(stream);
110
+ }
111
+ }
112
+
113
+
114
+ template<int R, int I, int T>
115
+ void LTemplateInstruction<R, I, T>::PrintDataTo(StringStream* stream) {
116
+ stream->Add("= ");
117
+ inputs_.PrintOperandsTo(stream);
118
+ }
119
+
120
+
121
+ template<int R, int I, int T>
122
+ void LTemplateInstruction<R, I, T>::PrintOutputOperandTo(StringStream* stream) {
123
+ results_.PrintOperandsTo(stream);
124
+ }
125
+
126
+
127
+ template<typename T, int N>
128
+ void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
129
+ for (int i = 0; i < N; i++) {
130
+ if (i > 0) stream->Add(" ");
131
+ elems_[i]->PrintTo(stream);
132
+ }
133
+ }
134
+
135
+
136
+ void LLabel::PrintDataTo(StringStream* stream) {
137
+ LGap::PrintDataTo(stream);
138
+ LLabel* rep = replacement();
139
+ if (rep != NULL) {
140
+ stream->Add(" Dead block replaced with B%d", rep->block_id());
141
+ }
142
+ }
143
+
144
+
145
+ bool LGap::IsRedundant() const {
146
+ for (int i = 0; i < 4; i++) {
147
+ if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
148
+ return false;
149
+ }
150
+ }
151
+
152
+ return true;
153
+ }
154
+
155
+
156
+ void LGap::PrintDataTo(StringStream* stream) {
157
+ for (int i = 0; i < 4; i++) {
158
+ stream->Add("(");
159
+ if (parallel_moves_[i] != NULL) {
160
+ parallel_moves_[i]->PrintDataTo(stream);
161
+ }
162
+ stream->Add(") ");
163
+ }
164
+ }
165
+
166
+
167
+ const char* LArithmeticD::Mnemonic() const {
168
+ switch (op()) {
169
+ case Token::ADD: return "add-d";
170
+ case Token::SUB: return "sub-d";
171
+ case Token::MUL: return "mul-d";
172
+ case Token::DIV: return "div-d";
173
+ case Token::MOD: return "mod-d";
174
+ default:
175
+ UNREACHABLE();
176
+ return NULL;
177
+ }
178
+ }
179
+
180
+
181
+ const char* LArithmeticT::Mnemonic() const {
182
+ switch (op()) {
183
+ case Token::ADD: return "add-t";
184
+ case Token::SUB: return "sub-t";
185
+ case Token::MUL: return "mul-t";
186
+ case Token::MOD: return "mod-t";
187
+ case Token::DIV: return "div-t";
188
+ case Token::BIT_AND: return "bit-and-t";
189
+ case Token::BIT_OR: return "bit-or-t";
190
+ case Token::BIT_XOR: return "bit-xor-t";
191
+ case Token::SHL: return "sal-t";
192
+ case Token::SAR: return "sar-t";
193
+ case Token::SHR: return "shr-t";
194
+ default:
195
+ UNREACHABLE();
196
+ return NULL;
197
+ }
198
+ }
199
+
200
+
201
+ void LGoto::PrintDataTo(StringStream* stream) {
202
+ stream->Add("B%d", block_id());
203
+ }
204
+
205
+
206
+ void LBranch::PrintDataTo(StringStream* stream) {
207
+ stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
208
+ InputAt(0)->PrintTo(stream);
209
+ }
210
+
211
+
212
+ void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
213
+ stream->Add("if ");
214
+ InputAt(0)->PrintTo(stream);
215
+ stream->Add(" %s ", Token::String(op()));
216
+ InputAt(1)->PrintTo(stream);
217
+ stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
218
+ }
219
+
220
+
221
+ void LIsNullAndBranch::PrintDataTo(StringStream* stream) {
222
+ stream->Add("if ");
223
+ InputAt(0)->PrintTo(stream);
224
+ stream->Add(is_strict() ? " === null" : " == null");
225
+ stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
226
+ }
227
+
228
+
229
+ void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
230
+ stream->Add("if is_object(");
231
+ InputAt(0)->PrintTo(stream);
232
+ stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
233
+ }
234
+
235
+
236
+ void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
237
+ stream->Add("if is_smi(");
238
+ InputAt(0)->PrintTo(stream);
239
+ stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
240
+ }
241
+
242
+
243
+ void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
244
+ stream->Add("if has_instance_type(");
245
+ InputAt(0)->PrintTo(stream);
246
+ stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
247
+ }
248
+
249
+
250
+ void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
251
+ stream->Add("if has_cached_array_index(");
252
+ InputAt(0)->PrintTo(stream);
253
+ stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
254
+ }
255
+
256
+
257
+ void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
258
+ stream->Add("if class_of_test(");
259
+ InputAt(0)->PrintTo(stream);
260
+ stream->Add(", \"%o\") then B%d else B%d",
261
+ *hydrogen()->class_name(),
262
+ true_block_id(),
263
+ false_block_id());
264
+ }
265
+
266
+
267
+ void LTypeofIs::PrintDataTo(StringStream* stream) {
268
+ InputAt(0)->PrintTo(stream);
269
+ stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
270
+ }
271
+
272
+
273
+ void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
274
+ stream->Add("if typeof ");
275
+ InputAt(0)->PrintTo(stream);
276
+ stream->Add(" == \"%s\" then B%d else B%d",
277
+ *hydrogen()->type_literal()->ToCString(),
278
+ true_block_id(), false_block_id());
279
+ }
280
+
281
+
282
+ void LCallConstantFunction::PrintDataTo(StringStream* stream) {
283
+ stream->Add("#%d / ", arity());
284
+ }
285
+
286
+
287
+ void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
288
+ stream->Add("/%s ", hydrogen()->OpName());
289
+ InputAt(0)->PrintTo(stream);
290
+ }
291
+
292
+
293
+ void LLoadContextSlot::PrintDataTo(StringStream* stream) {
294
+ InputAt(0)->PrintTo(stream);
295
+ stream->Add("[%d]", slot_index());
296
+ }
297
+
298
+
299
+ void LStoreContextSlot::PrintDataTo(StringStream* stream) {
300
+ InputAt(0)->PrintTo(stream);
301
+ stream->Add("[%d] <- ", slot_index());
302
+ InputAt(1)->PrintTo(stream);
303
+ }
304
+
305
+
306
+ void LCallKeyed::PrintDataTo(StringStream* stream) {
307
+ stream->Add("[rcx] #%d / ", arity());
308
+ }
309
+
310
+
311
+ void LCallNamed::PrintDataTo(StringStream* stream) {
312
+ SmartPointer<char> name_string = name()->ToCString();
313
+ stream->Add("%s #%d / ", *name_string, arity());
314
+ }
315
+
316
+
317
+ void LCallGlobal::PrintDataTo(StringStream* stream) {
318
+ SmartPointer<char> name_string = name()->ToCString();
319
+ stream->Add("%s #%d / ", *name_string, arity());
320
+ }
321
+
322
+
323
+ void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
324
+ stream->Add("#%d / ", arity());
325
+ }
326
+
327
+
328
+ void LCallNew::PrintDataTo(StringStream* stream) {
329
+ stream->Add("= ");
330
+ InputAt(0)->PrintTo(stream);
331
+ stream->Add(" #%d / ", arity());
332
+ }
333
+
334
+
335
+ void LClassOfTest::PrintDataTo(StringStream* stream) {
336
+ stream->Add("= class_of_test(");
337
+ InputAt(0)->PrintTo(stream);
338
+ stream->Add(", \"%o\")", *hydrogen()->class_name());
339
+ }
340
+
341
+
342
+ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
343
+ arguments()->PrintTo(stream);
344
+
345
+ stream->Add(" length ");
346
+ length()->PrintTo(stream);
347
+
348
+ stream->Add(" index ");
349
+ index()->PrintTo(stream);
350
+ }
351
+
352
+
353
+ int LChunk::GetNextSpillIndex(bool is_double) {
354
+ return spill_slot_count_++;
355
+ }
356
+
357
+
358
+ LOperand* LChunk::GetNextSpillSlot(bool is_double) {
359
+ // All stack slots are Double stack slots on x64.
360
+ // Alternatively, at some point, start using half-size
361
+ // stack slots for int32 values.
362
+ int index = GetNextSpillIndex(is_double);
363
+ if (is_double) {
364
+ return LDoubleStackSlot::Create(index);
365
+ } else {
366
+ return LStackSlot::Create(index);
367
+ }
368
+ }
369
+
370
+
371
+ void LChunk::MarkEmptyBlocks() {
372
+ HPhase phase("Mark empty blocks", this);
373
+ for (int i = 0; i < graph()->blocks()->length(); ++i) {
374
+ HBasicBlock* block = graph()->blocks()->at(i);
375
+ int first = block->first_instruction_index();
376
+ int last = block->last_instruction_index();
377
+ LInstruction* first_instr = instructions()->at(first);
378
+ LInstruction* last_instr = instructions()->at(last);
379
+
380
+ LLabel* label = LLabel::cast(first_instr);
381
+ if (last_instr->IsGoto()) {
382
+ LGoto* goto_instr = LGoto::cast(last_instr);
383
+ if (!goto_instr->include_stack_check() &&
384
+ label->IsRedundant() &&
385
+ !label->is_loop_header()) {
386
+ bool can_eliminate = true;
387
+ for (int i = first + 1; i < last && can_eliminate; ++i) {
388
+ LInstruction* cur = instructions()->at(i);
389
+ if (cur->IsGap()) {
390
+ LGap* gap = LGap::cast(cur);
391
+ if (!gap->IsRedundant()) {
392
+ can_eliminate = false;
393
+ }
394
+ } else {
395
+ can_eliminate = false;
396
+ }
397
+ }
398
+
399
+ if (can_eliminate) {
400
+ label->set_replacement(GetLabel(goto_instr->block_id()));
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+
407
+
408
+ void LStoreNamedField::PrintDataTo(StringStream* stream) {
409
+ object()->PrintTo(stream);
410
+ stream->Add(".");
411
+ stream->Add(*String::cast(*name())->ToCString());
412
+ stream->Add(" <- ");
413
+ value()->PrintTo(stream);
414
+ }
415
+
416
+
417
+ void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
418
+ object()->PrintTo(stream);
419
+ stream->Add(".");
420
+ stream->Add(*String::cast(*name())->ToCString());
421
+ stream->Add(" <- ");
422
+ value()->PrintTo(stream);
423
+ }
424
+
425
+
426
+ void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
427
+ object()->PrintTo(stream);
428
+ stream->Add("[");
429
+ key()->PrintTo(stream);
430
+ stream->Add("] <- ");
431
+ value()->PrintTo(stream);
432
+ }
433
+
434
+
435
+ void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
436
+ object()->PrintTo(stream);
437
+ stream->Add("[");
438
+ key()->PrintTo(stream);
439
+ stream->Add("] <- ");
440
+ value()->PrintTo(stream);
441
+ }
442
+
443
+
444
+ void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
445
+ LGap* gap = new LGap(block);
446
+ int index = -1;
447
+ if (instr->IsControl()) {
448
+ instructions_.Add(gap);
449
+ index = instructions_.length();
450
+ instructions_.Add(instr);
451
+ } else {
452
+ index = instructions_.length();
453
+ instructions_.Add(instr);
454
+ instructions_.Add(gap);
455
+ }
456
+ if (instr->HasPointerMap()) {
457
+ pointer_maps_.Add(instr->pointer_map());
458
+ instr->pointer_map()->set_lithium_position(index);
459
+ }
460
+ }
461
+
462
+
463
+ LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
464
+ return LConstantOperand::Create(constant->id());
465
+ }
466
+
467
+
468
+ int LChunk::GetParameterStackSlot(int index) const {
469
+ // The receiver is at index 0, the first parameter at index 1, so we
470
+ // shift all parameter indexes down by the number of parameters, and
471
+ // make sure they end up negative so they are distinguishable from
472
+ // spill slots.
473
+ int result = index - graph()->info()->scope()->num_parameters() - 1;
474
+ ASSERT(result < 0);
475
+ return result;
476
+ }
477
+
478
+ // A parameter relative to ebp in the arguments stub.
479
+ int LChunk::ParameterAt(int index) {
480
+ ASSERT(-1 <= index); // -1 is the receiver.
481
+ return (1 + graph()->info()->scope()->num_parameters() - index) *
482
+ kPointerSize;
483
+ }
484
+
485
+
486
+ LGap* LChunk::GetGapAt(int index) const {
487
+ return LGap::cast(instructions_[index]);
488
+ }
489
+
490
+
491
+ bool LChunk::IsGapAt(int index) const {
492
+ return instructions_[index]->IsGap();
493
+ }
494
+
495
+
496
+ int LChunk::NearestGapPos(int index) const {
497
+ while (!IsGapAt(index)) index--;
498
+ return index;
499
+ }
500
+
501
+
502
+ void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
503
+ GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to);
504
+ }
505
+
506
+
507
+ Handle<Object> LChunk::LookupLiteral(LConstantOperand* operand) const {
508
+ return HConstant::cast(graph_->LookupValue(operand->index()))->handle();
509
+ }
510
+
511
+
512
+ Representation LChunk::LookupLiteralRepresentation(
513
+ LConstantOperand* operand) const {
514
+ return graph_->LookupValue(operand->index())->representation();
515
+ }
516
+
517
+
518
+ LChunk* LChunkBuilder::Build() {
519
+ ASSERT(is_unused());
520
+ chunk_ = new LChunk(graph());
521
+ HPhase phase("Building chunk", chunk_);
522
+ status_ = BUILDING;
523
+ const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
524
+ for (int i = 0; i < blocks->length(); i++) {
525
+ HBasicBlock* next = NULL;
526
+ if (i < blocks->length() - 1) next = blocks->at(i + 1);
527
+ DoBasicBlock(blocks->at(i), next);
528
+ if (is_aborted()) return NULL;
529
+ }
530
+ status_ = DONE;
531
+ return chunk_;
532
+ }
533
+
534
+
535
+ void LChunkBuilder::Abort(const char* format, ...) {
536
+ if (FLAG_trace_bailout) {
537
+ SmartPointer<char> debug_name = graph()->debug_name()->ToCString();
538
+ PrintF("Aborting LChunk building in @\"%s\": ", *debug_name);
539
+ va_list arguments;
540
+ va_start(arguments, format);
541
+ OS::VPrint(format, arguments);
542
+ va_end(arguments);
543
+ PrintF("\n");
544
+ }
545
+ status_ = ABORTED;
546
+ }
547
+
548
+
549
+ LRegister* LChunkBuilder::ToOperand(Register reg) {
550
+ return LRegister::Create(Register::ToAllocationIndex(reg));
551
+ }
552
+
553
+
554
+ LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
555
+ return new LUnallocated(LUnallocated::FIXED_REGISTER,
556
+ Register::ToAllocationIndex(reg));
557
+ }
558
+
559
+
560
+ LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) {
561
+ return new LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
562
+ XMMRegister::ToAllocationIndex(reg));
563
+ }
564
+
565
+
566
+ LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) {
567
+ return Use(value, ToUnallocated(fixed_register));
568
+ }
569
+
570
+
571
+ LOperand* LChunkBuilder::UseFixedDouble(HValue* value, XMMRegister reg) {
572
+ return Use(value, ToUnallocated(reg));
573
+ }
574
+
575
+
576
+ LOperand* LChunkBuilder::UseRegister(HValue* value) {
577
+ return Use(value, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
578
+ }
579
+
580
+
581
+ LOperand* LChunkBuilder::UseRegisterAtStart(HValue* value) {
582
+ return Use(value,
583
+ new LUnallocated(LUnallocated::MUST_HAVE_REGISTER,
584
+ LUnallocated::USED_AT_START));
585
+ }
586
+
587
+
588
+ LOperand* LChunkBuilder::UseTempRegister(HValue* value) {
589
+ return Use(value, new LUnallocated(LUnallocated::WRITABLE_REGISTER));
590
+ }
591
+
592
+
593
+ LOperand* LChunkBuilder::Use(HValue* value) {
594
+ return Use(value, new LUnallocated(LUnallocated::NONE));
595
+ }
596
+
597
+
598
+ LOperand* LChunkBuilder::UseAtStart(HValue* value) {
599
+ return Use(value, new LUnallocated(LUnallocated::NONE,
600
+ LUnallocated::USED_AT_START));
601
+ }
602
+
603
+
604
+ LOperand* LChunkBuilder::UseOrConstant(HValue* value) {
605
+ return value->IsConstant()
606
+ ? chunk_->DefineConstantOperand(HConstant::cast(value))
607
+ : Use(value);
608
+ }
609
+
610
+
611
+ LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
612
+ return value->IsConstant()
613
+ ? chunk_->DefineConstantOperand(HConstant::cast(value))
614
+ : UseAtStart(value);
615
+ }
616
+
617
+
618
+ LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
619
+ return value->IsConstant()
620
+ ? chunk_->DefineConstantOperand(HConstant::cast(value))
621
+ : UseRegister(value);
622
+ }
623
+
624
+
625
+ LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
626
+ return value->IsConstant()
627
+ ? chunk_->DefineConstantOperand(HConstant::cast(value))
628
+ : UseRegisterAtStart(value);
629
+ }
630
+
631
+
632
+ LOperand* LChunkBuilder::UseAny(HValue* value) {
633
+ return value->IsConstant()
634
+ ? chunk_->DefineConstantOperand(HConstant::cast(value))
635
+ : Use(value, new LUnallocated(LUnallocated::ANY));
636
+ }
637
+
638
+
639
+ LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
640
+ if (value->EmitAtUses()) {
641
+ HInstruction* instr = HInstruction::cast(value);
642
+ VisitInstruction(instr);
643
+ }
644
+ allocator_->RecordUse(value, operand);
645
+ return operand;
646
+ }
647
+
648
+
649
+ template<int I, int T>
650
+ LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr,
651
+ LUnallocated* result) {
652
+ allocator_->RecordDefinition(current_instruction_, result);
653
+ instr->set_result(result);
654
+ return instr;
655
+ }
656
+
657
+
658
+ template<int I, int T>
659
+ LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr) {
660
+ return Define(instr, new LUnallocated(LUnallocated::NONE));
661
+ }
662
+
663
+
664
+ template<int I, int T>
665
+ LInstruction* LChunkBuilder::DefineAsRegister(
666
+ LTemplateInstruction<1, I, T>* instr) {
667
+ return Define(instr, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
668
+ }
669
+
670
+
671
+ template<int I, int T>
672
+ LInstruction* LChunkBuilder::DefineAsSpilled(
673
+ LTemplateInstruction<1, I, T>* instr,
674
+ int index) {
675
+ return Define(instr, new LUnallocated(LUnallocated::FIXED_SLOT, index));
676
+ }
677
+
678
+
679
+ template<int I, int T>
680
+ LInstruction* LChunkBuilder::DefineSameAsFirst(
681
+ LTemplateInstruction<1, I, T>* instr) {
682
+ return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
683
+ }
684
+
685
+
686
+ template<int I, int T>
687
+ LInstruction* LChunkBuilder::DefineFixed(LTemplateInstruction<1, I, T>* instr,
688
+ Register reg) {
689
+ return Define(instr, ToUnallocated(reg));
690
+ }
691
+
692
+
693
+ template<int I, int T>
694
+ LInstruction* LChunkBuilder::DefineFixedDouble(
695
+ LTemplateInstruction<1, I, T>* instr,
696
+ XMMRegister reg) {
697
+ return Define(instr, ToUnallocated(reg));
698
+ }
699
+
700
+
701
+ LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
702
+ HEnvironment* hydrogen_env = current_block_->last_environment();
703
+ instr->set_environment(CreateEnvironment(hydrogen_env));
704
+ return instr;
705
+ }
706
+
707
+
708
+ LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment(
709
+ LInstruction* instr, int ast_id) {
710
+ ASSERT(instruction_pending_deoptimization_environment_ == NULL);
711
+ ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber);
712
+ instruction_pending_deoptimization_environment_ = instr;
713
+ pending_deoptimization_ast_id_ = ast_id;
714
+ return instr;
715
+ }
716
+
717
+
718
+ void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() {
719
+ instruction_pending_deoptimization_environment_ = NULL;
720
+ pending_deoptimization_ast_id_ = AstNode::kNoNumber;
721
+ }
722
+
723
+
724
+ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
725
+ HInstruction* hinstr,
726
+ CanDeoptimize can_deoptimize) {
727
+ #ifdef DEBUG
728
+ instr->VerifyCall();
729
+ #endif
730
+ instr->MarkAsCall();
731
+ instr = AssignPointerMap(instr);
732
+
733
+ if (hinstr->HasSideEffects()) {
734
+ ASSERT(hinstr->next()->IsSimulate());
735
+ HSimulate* sim = HSimulate::cast(hinstr->next());
736
+ instr = SetInstructionPendingDeoptimizationEnvironment(
737
+ instr, sim->ast_id());
738
+ }
739
+
740
+ // If instruction does not have side-effects lazy deoptimization
741
+ // after the call will try to deoptimize to the point before the call.
742
+ // Thus we still need to attach environment to this call even if
743
+ // call sequence can not deoptimize eagerly.
744
+ bool needs_environment =
745
+ (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || !hinstr->HasSideEffects();
746
+ if (needs_environment && !instr->HasEnvironment()) {
747
+ instr = AssignEnvironment(instr);
748
+ }
749
+
750
+ return instr;
751
+ }
752
+
753
+
754
+ LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) {
755
+ instr->MarkAsSaveDoubles();
756
+ return instr;
757
+ }
758
+
759
+
760
+ LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
761
+ ASSERT(!instr->HasPointerMap());
762
+ instr->set_pointer_map(new LPointerMap(position_));
763
+ return instr;
764
+ }
765
+
766
+
767
+ LUnallocated* LChunkBuilder::TempRegister() {
768
+ LUnallocated* operand = new LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
769
+ allocator_->RecordTemporary(operand);
770
+ return operand;
771
+ }
772
+
773
+
774
+ LOperand* LChunkBuilder::FixedTemp(Register reg) {
775
+ LUnallocated* operand = ToUnallocated(reg);
776
+ allocator_->RecordTemporary(operand);
777
+ return operand;
778
+ }
779
+
780
+
781
+ LOperand* LChunkBuilder::FixedTemp(XMMRegister reg) {
782
+ LUnallocated* operand = ToUnallocated(reg);
783
+ allocator_->RecordTemporary(operand);
784
+ return operand;
785
+ }
786
+
787
+
788
+ LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
789
+ return new LLabel(instr->block());
790
+ }
791
+
792
+
793
+ LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
794
+ return AssignEnvironment(new LDeoptimize);
795
+ }
796
+
797
+
798
+ LInstruction* LChunkBuilder::DoBit(Token::Value op,
799
+ HBitwiseBinaryOperation* instr) {
800
+ if (instr->representation().IsInteger32()) {
801
+ ASSERT(instr->left()->representation().IsInteger32());
802
+ ASSERT(instr->right()->representation().IsInteger32());
803
+
804
+ LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
805
+ LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
806
+ return DefineSameAsFirst(new LBitI(op, left, right));
807
+ } else {
808
+ ASSERT(instr->representation().IsTagged());
809
+ ASSERT(instr->left()->representation().IsTagged());
810
+ ASSERT(instr->right()->representation().IsTagged());
811
+
812
+ LOperand* left = UseFixed(instr->left(), rdx);
813
+ LOperand* right = UseFixed(instr->right(), rax);
814
+ LArithmeticT* result = new LArithmeticT(op, left, right);
815
+ return MarkAsCall(DefineFixed(result, rax), instr);
816
+ }
817
+ }
818
+
819
+
820
+ LInstruction* LChunkBuilder::DoShift(Token::Value op,
821
+ HBitwiseBinaryOperation* instr) {
822
+ if (instr->representation().IsTagged()) {
823
+ ASSERT(instr->left()->representation().IsTagged());
824
+ ASSERT(instr->right()->representation().IsTagged());
825
+
826
+ LOperand* left = UseFixed(instr->left(), rdx);
827
+ LOperand* right = UseFixed(instr->right(), rax);
828
+ LArithmeticT* result = new LArithmeticT(op, left, right);
829
+ return MarkAsCall(DefineFixed(result, rax), instr);
830
+ }
831
+
832
+ ASSERT(instr->representation().IsInteger32());
833
+ ASSERT(instr->OperandAt(0)->representation().IsInteger32());
834
+ ASSERT(instr->OperandAt(1)->representation().IsInteger32());
835
+ LOperand* left = UseRegisterAtStart(instr->OperandAt(0));
836
+
837
+ HValue* right_value = instr->OperandAt(1);
838
+ LOperand* right = NULL;
839
+ int constant_value = 0;
840
+ if (right_value->IsConstant()) {
841
+ HConstant* constant = HConstant::cast(right_value);
842
+ right = chunk_->DefineConstantOperand(constant);
843
+ constant_value = constant->Integer32Value() & 0x1f;
844
+ } else {
845
+ right = UseFixed(right_value, rcx);
846
+ }
847
+
848
+ // Shift operations can only deoptimize if we do a logical shift
849
+ // by 0 and the result cannot be truncated to int32.
850
+ bool can_deopt = (op == Token::SHR && constant_value == 0);
851
+ if (can_deopt) {
852
+ bool can_truncate = true;
853
+ for (int i = 0; i < instr->uses()->length(); i++) {
854
+ if (!instr->uses()->at(i)->CheckFlag(HValue::kTruncatingToInt32)) {
855
+ can_truncate = false;
856
+ break;
857
+ }
858
+ }
859
+ can_deopt = !can_truncate;
860
+ }
861
+
862
+ LShiftI* result = new LShiftI(op, left, right, can_deopt);
863
+ return can_deopt
864
+ ? AssignEnvironment(DefineSameAsFirst(result))
865
+ : DefineSameAsFirst(result);
866
+ }
867
+
868
+
869
+ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
870
+ HArithmeticBinaryOperation* instr) {
871
+ ASSERT(instr->representation().IsDouble());
872
+ ASSERT(instr->left()->representation().IsDouble());
873
+ ASSERT(instr->right()->representation().IsDouble());
874
+ if (op == Token::MOD) {
875
+ Abort("Unimplemented: %s", "DoArithmeticD MOD");
876
+ }
877
+ LOperand* left = UseRegisterAtStart(instr->left());
878
+ LOperand* right = UseRegisterAtStart(instr->right());
879
+ LArithmeticD* result = new LArithmeticD(op, left, right);
880
+ return DefineSameAsFirst(result);
881
+ }
882
+
883
+
884
+ LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
885
+ HArithmeticBinaryOperation* instr) {
886
+ ASSERT(op == Token::ADD ||
887
+ op == Token::DIV ||
888
+ op == Token::MOD ||
889
+ op == Token::MUL ||
890
+ op == Token::SUB);
891
+ HValue* left = instr->left();
892
+ HValue* right = instr->right();
893
+ ASSERT(left->representation().IsTagged());
894
+ ASSERT(right->representation().IsTagged());
895
+ LOperand* left_operand = UseFixed(left, rdx);
896
+ LOperand* right_operand = UseFixed(right, rax);
897
+ LArithmeticT* result = new LArithmeticT(op, left_operand, right_operand);
898
+ return MarkAsCall(DefineFixed(result, rax), instr);
899
+ }
900
+
901
+
902
+ void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
903
+ ASSERT(is_building());
904
+ current_block_ = block;
905
+ next_block_ = next_block;
906
+ if (block->IsStartBlock()) {
907
+ block->UpdateEnvironment(graph_->start_environment());
908
+ argument_count_ = 0;
909
+ } else if (block->predecessors()->length() == 1) {
910
+ // We have a single predecessor => copy environment and outgoing
911
+ // argument count from the predecessor.
912
+ ASSERT(block->phis()->length() == 0);
913
+ HBasicBlock* pred = block->predecessors()->at(0);
914
+ HEnvironment* last_environment = pred->last_environment();
915
+ ASSERT(last_environment != NULL);
916
+ // Only copy the environment, if it is later used again.
917
+ if (pred->end()->SecondSuccessor() == NULL) {
918
+ ASSERT(pred->end()->FirstSuccessor() == block);
919
+ } else {
920
+ if (pred->end()->FirstSuccessor()->block_id() > block->block_id() ||
921
+ pred->end()->SecondSuccessor()->block_id() > block->block_id()) {
922
+ last_environment = last_environment->Copy();
923
+ }
924
+ }
925
+ block->UpdateEnvironment(last_environment);
926
+ ASSERT(pred->argument_count() >= 0);
927
+ argument_count_ = pred->argument_count();
928
+ } else {
929
+ // We are at a state join => process phis.
930
+ HBasicBlock* pred = block->predecessors()->at(0);
931
+ // No need to copy the environment, it cannot be used later.
932
+ HEnvironment* last_environment = pred->last_environment();
933
+ for (int i = 0; i < block->phis()->length(); ++i) {
934
+ HPhi* phi = block->phis()->at(i);
935
+ last_environment->SetValueAt(phi->merged_index(), phi);
936
+ }
937
+ for (int i = 0; i < block->deleted_phis()->length(); ++i) {
938
+ last_environment->SetValueAt(block->deleted_phis()->at(i),
939
+ graph_->GetConstantUndefined());
940
+ }
941
+ block->UpdateEnvironment(last_environment);
942
+ // Pick up the outgoing argument count of one of the predecessors.
943
+ argument_count_ = pred->argument_count();
944
+ }
945
+ HInstruction* current = block->first();
946
+ int start = chunk_->instructions()->length();
947
+ while (current != NULL && !is_aborted()) {
948
+ // Code for constants in registers is generated lazily.
949
+ if (!current->EmitAtUses()) {
950
+ VisitInstruction(current);
951
+ }
952
+ current = current->next();
953
+ }
954
+ int end = chunk_->instructions()->length() - 1;
955
+ if (end >= start) {
956
+ block->set_first_instruction_index(start);
957
+ block->set_last_instruction_index(end);
958
+ }
959
+ block->set_argument_count(argument_count_);
960
+ next_block_ = NULL;
961
+ current_block_ = NULL;
962
+ }
963
+
964
+
965
+ void LChunkBuilder::VisitInstruction(HInstruction* current) {
966
+ HInstruction* old_current = current_instruction_;
967
+ current_instruction_ = current;
968
+ if (current->has_position()) position_ = current->position();
969
+ LInstruction* instr = current->CompileToLithium(this);
970
+
971
+ if (instr != NULL) {
972
+ if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
973
+ instr = AssignPointerMap(instr);
974
+ }
975
+ if (FLAG_stress_environments && !instr->HasEnvironment()) {
976
+ instr = AssignEnvironment(instr);
977
+ }
978
+ if (current->IsTest() && !instr->IsGoto()) {
979
+ ASSERT(instr->IsControl());
980
+ HTest* test = HTest::cast(current);
981
+ instr->set_hydrogen_value(test->value());
982
+ HBasicBlock* first = test->FirstSuccessor();
983
+ HBasicBlock* second = test->SecondSuccessor();
984
+ ASSERT(first != NULL && second != NULL);
985
+ instr->SetBranchTargets(first->block_id(), second->block_id());
986
+ } else {
987
+ instr->set_hydrogen_value(current);
988
+ }
989
+
990
+ chunk_->AddInstruction(instr, current_block_);
991
+ }
992
+ current_instruction_ = old_current;
993
+ }
994
+
995
+
996
+ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
997
+ if (hydrogen_env == NULL) return NULL;
998
+
999
+ LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
1000
+ int ast_id = hydrogen_env->ast_id();
1001
+ ASSERT(ast_id != AstNode::kNoNumber);
1002
+ int value_count = hydrogen_env->length();
1003
+ LEnvironment* result = new LEnvironment(hydrogen_env->closure(),
1004
+ ast_id,
1005
+ hydrogen_env->parameter_count(),
1006
+ argument_count_,
1007
+ value_count,
1008
+ outer);
1009
+ int argument_index = 0;
1010
+ for (int i = 0; i < value_count; ++i) {
1011
+ HValue* value = hydrogen_env->values()->at(i);
1012
+ LOperand* op = NULL;
1013
+ if (value->IsArgumentsObject()) {
1014
+ op = NULL;
1015
+ } else if (value->IsPushArgument()) {
1016
+ op = new LArgument(argument_index++);
1017
+ } else {
1018
+ op = UseAny(value);
1019
+ }
1020
+ result->AddValue(op, value->representation());
1021
+ }
1022
+
1023
+ return result;
1024
+ }
1025
+
1026
+
1027
+ LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
1028
+ LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(),
1029
+ instr->include_stack_check());
1030
+ return (instr->include_stack_check())
1031
+ ? AssignPointerMap(result)
1032
+ : result;
1033
+ }
1034
+
1035
+
1036
+ LInstruction* LChunkBuilder::DoTest(HTest* instr) {
1037
+ HValue* v = instr->value();
1038
+ if (v->EmitAtUses()) {
1039
+ if (v->IsClassOfTest()) {
1040
+ HClassOfTest* compare = HClassOfTest::cast(v);
1041
+ ASSERT(compare->value()->representation().IsTagged());
1042
+
1043
+ return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
1044
+ TempRegister());
1045
+ } else if (v->IsCompare()) {
1046
+ HCompare* compare = HCompare::cast(v);
1047
+ Token::Value op = compare->token();
1048
+ HValue* left = compare->left();
1049
+ HValue* right = compare->right();
1050
+ Representation r = compare->GetInputRepresentation();
1051
+ if (r.IsInteger32()) {
1052
+ ASSERT(left->representation().IsInteger32());
1053
+ ASSERT(right->representation().IsInteger32());
1054
+
1055
+ return new LCmpIDAndBranch(UseRegisterAtStart(left),
1056
+ UseOrConstantAtStart(right));
1057
+ } else if (r.IsDouble()) {
1058
+ ASSERT(left->representation().IsDouble());
1059
+ ASSERT(right->representation().IsDouble());
1060
+
1061
+ return new LCmpIDAndBranch(UseRegisterAtStart(left),
1062
+ UseRegisterAtStart(right));
1063
+ } else {
1064
+ ASSERT(left->representation().IsTagged());
1065
+ ASSERT(right->representation().IsTagged());
1066
+ bool reversed = op == Token::GT || op == Token::LTE;
1067
+ LOperand* left_operand = UseFixed(left, reversed ? rax : rdx);
1068
+ LOperand* right_operand = UseFixed(right, reversed ? rdx : rax);
1069
+ LCmpTAndBranch* result = new LCmpTAndBranch(left_operand,
1070
+ right_operand);
1071
+ return MarkAsCall(result, instr);
1072
+ }
1073
+ } else if (v->IsIsSmi()) {
1074
+ HIsSmi* compare = HIsSmi::cast(v);
1075
+ ASSERT(compare->value()->representation().IsTagged());
1076
+
1077
+ return new LIsSmiAndBranch(Use(compare->value()));
1078
+ } else if (v->IsHasInstanceType()) {
1079
+ HHasInstanceType* compare = HHasInstanceType::cast(v);
1080
+ ASSERT(compare->value()->representation().IsTagged());
1081
+
1082
+ return new LHasInstanceTypeAndBranch(
1083
+ UseRegisterAtStart(compare->value()));
1084
+ } else if (v->IsHasCachedArrayIndex()) {
1085
+ HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v);
1086
+ ASSERT(compare->value()->representation().IsTagged());
1087
+
1088
+ return new LHasCachedArrayIndexAndBranch(
1089
+ UseRegisterAtStart(compare->value()));
1090
+ } else if (v->IsIsNull()) {
1091
+ HIsNull* compare = HIsNull::cast(v);
1092
+ ASSERT(compare->value()->representation().IsTagged());
1093
+
1094
+ // We only need a temp register for non-strict compare.
1095
+ LOperand* temp = compare->is_strict() ? NULL : TempRegister();
1096
+ return new LIsNullAndBranch(UseRegisterAtStart(compare->value()),
1097
+ temp);
1098
+ } else if (v->IsIsObject()) {
1099
+ HIsObject* compare = HIsObject::cast(v);
1100
+ ASSERT(compare->value()->representation().IsTagged());
1101
+ return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()));
1102
+ } else if (v->IsCompareJSObjectEq()) {
1103
+ HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1104
+ return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1105
+ UseRegisterAtStart(compare->right()));
1106
+ } else if (v->IsInstanceOf()) {
1107
+ HInstanceOf* instance_of = HInstanceOf::cast(v);
1108
+ LInstanceOfAndBranch* result =
1109
+ new LInstanceOfAndBranch(UseFixed(instance_of->left(), rax),
1110
+ UseFixed(instance_of->right(), rdx));
1111
+ return MarkAsCall(result, instr);
1112
+ } else if (v->IsTypeofIs()) {
1113
+ HTypeofIs* typeof_is = HTypeofIs::cast(v);
1114
+ return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1115
+ } else if (v->IsIsConstructCall()) {
1116
+ return new LIsConstructCallAndBranch(TempRegister());
1117
+ } else {
1118
+ if (v->IsConstant()) {
1119
+ if (HConstant::cast(v)->handle()->IsTrue()) {
1120
+ return new LGoto(instr->FirstSuccessor()->block_id());
1121
+ } else if (HConstant::cast(v)->handle()->IsFalse()) {
1122
+ return new LGoto(instr->SecondSuccessor()->block_id());
1123
+ }
1124
+ }
1125
+ Abort("Undefined compare before branch");
1126
+ return NULL;
1127
+ }
1128
+ }
1129
+ return new LBranch(UseRegisterAtStart(v));
1130
+ }
1131
+
1132
+
1133
+ LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
1134
+ ASSERT(instr->value()->representation().IsTagged());
1135
+ LOperand* value = UseRegisterAtStart(instr->value());
1136
+ return new LCmpMapAndBranch(value);
1137
+ }
1138
+
1139
+
1140
+ LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
1141
+ return DefineAsRegister(new LArgumentsLength(Use(length->value())));
1142
+ }
1143
+
1144
+
1145
+ LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) {
1146
+ return DefineAsRegister(new LArgumentsElements);
1147
+ }
1148
+
1149
+
1150
+ LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
1151
+ LOperand* left = UseFixed(instr->left(), rax);
1152
+ LOperand* right = UseFixed(instr->right(), rdx);
1153
+ LInstanceOf* result = new LInstanceOf(left, right);
1154
+ return MarkAsCall(DefineFixed(result, rax), instr);
1155
+ }
1156
+
1157
+
1158
+ LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
1159
+ HInstanceOfKnownGlobal* instr) {
1160
+ LInstanceOfKnownGlobal* result =
1161
+ new LInstanceOfKnownGlobal(UseFixed(instr->value(), rax));
1162
+ return MarkAsCall(DefineFixed(result, rax), instr);
1163
+ }
1164
+
1165
+
1166
+ LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) {
1167
+ LOperand* function = UseFixed(instr->function(), rdi);
1168
+ LOperand* receiver = UseFixed(instr->receiver(), rax);
1169
+ LOperand* length = UseFixed(instr->length(), rbx);
1170
+ LOperand* elements = UseFixed(instr->elements(), rcx);
1171
+ LApplyArguments* result = new LApplyArguments(function,
1172
+ receiver,
1173
+ length,
1174
+ elements);
1175
+ return MarkAsCall(DefineFixed(result, rax), instr, CAN_DEOPTIMIZE_EAGERLY);
1176
+ }
1177
+
1178
+
1179
+ LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1180
+ ++argument_count_;
1181
+ LOperand* argument = UseOrConstant(instr->argument());
1182
+ return new LPushArgument(argument);
1183
+ }
1184
+
1185
+
1186
+ LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1187
+ return DefineAsRegister(new LContext);
1188
+ }
1189
+
1190
+
1191
+ LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
1192
+ LOperand* context = UseRegisterAtStart(instr->value());
1193
+ return DefineAsRegister(new LOuterContext(context));
1194
+ }
1195
+
1196
+
1197
+ LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
1198
+ return DefineAsRegister(new LGlobalObject);
1199
+ }
1200
+
1201
+
1202
+ LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
1203
+ return DefineAsRegister(new LGlobalReceiver);
1204
+ }
1205
+
1206
+
1207
+ LInstruction* LChunkBuilder::DoCallConstantFunction(
1208
+ HCallConstantFunction* instr) {
1209
+ argument_count_ -= instr->argument_count();
1210
+ return MarkAsCall(DefineFixed(new LCallConstantFunction, rax), instr);
1211
+ }
1212
+
1213
+
1214
+ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1215
+ BuiltinFunctionId op = instr->op();
1216
+ if (op == kMathLog || op == kMathSin || op == kMathCos) {
1217
+ LOperand* input = UseFixedDouble(instr->value(), xmm1);
1218
+ LUnaryMathOperation* result = new LUnaryMathOperation(input);
1219
+ return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1220
+ } else {
1221
+ LOperand* input = UseRegisterAtStart(instr->value());
1222
+ LUnaryMathOperation* result = new LUnaryMathOperation(input);
1223
+ switch (op) {
1224
+ case kMathAbs:
1225
+ return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
1226
+ case kMathFloor:
1227
+ return AssignEnvironment(DefineAsRegister(result));
1228
+ case kMathRound:
1229
+ return AssignEnvironment(DefineAsRegister(result));
1230
+ case kMathSqrt:
1231
+ return DefineSameAsFirst(result);
1232
+ case kMathPowHalf:
1233
+ return DefineSameAsFirst(result);
1234
+ default:
1235
+ UNREACHABLE();
1236
+ return NULL;
1237
+ }
1238
+ }
1239
+ }
1240
+
1241
+
1242
+ LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
1243
+ ASSERT(instr->key()->representation().IsTagged());
1244
+ LOperand* key = UseFixed(instr->key(), rcx);
1245
+ argument_count_ -= instr->argument_count();
1246
+ LCallKeyed* result = new LCallKeyed(key);
1247
+ return MarkAsCall(DefineFixed(result, rax), instr);
1248
+ }
1249
+
1250
+
1251
+ LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
1252
+ argument_count_ -= instr->argument_count();
1253
+ return MarkAsCall(DefineFixed(new LCallNamed, rax), instr);
1254
+ }
1255
+
1256
+
1257
+ LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
1258
+ argument_count_ -= instr->argument_count();
1259
+ return MarkAsCall(DefineFixed(new LCallGlobal, rax), instr);
1260
+ }
1261
+
1262
+
1263
+ LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) {
1264
+ argument_count_ -= instr->argument_count();
1265
+ return MarkAsCall(DefineFixed(new LCallKnownGlobal, rax), instr);
1266
+ }
1267
+
1268
+
1269
+ LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
1270
+ LOperand* constructor = UseFixed(instr->constructor(), rdi);
1271
+ argument_count_ -= instr->argument_count();
1272
+ LCallNew* result = new LCallNew(constructor);
1273
+ return MarkAsCall(DefineFixed(result, rax), instr);
1274
+ }
1275
+
1276
+
1277
+ LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
1278
+ argument_count_ -= instr->argument_count();
1279
+ LCallFunction* result = new LCallFunction();
1280
+ return MarkAsCall(DefineFixed(result, rax), instr);
1281
+ }
1282
+
1283
+
1284
+ LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
1285
+ argument_count_ -= instr->argument_count();
1286
+ return MarkAsCall(DefineFixed(new LCallRuntime, rax), instr);
1287
+ }
1288
+
1289
+
1290
+ LInstruction* LChunkBuilder::DoShr(HShr* instr) {
1291
+ return DoShift(Token::SHR, instr);
1292
+ }
1293
+
1294
+
1295
+ LInstruction* LChunkBuilder::DoSar(HSar* instr) {
1296
+ return DoShift(Token::SAR, instr);
1297
+ }
1298
+
1299
+
1300
+ LInstruction* LChunkBuilder::DoShl(HShl* instr) {
1301
+ return DoShift(Token::SHL, instr);
1302
+ }
1303
+
1304
+
1305
+ LInstruction* LChunkBuilder::DoBitAnd(HBitAnd* instr) {
1306
+ return DoBit(Token::BIT_AND, instr);
1307
+ }
1308
+
1309
+
1310
+ LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
1311
+ ASSERT(instr->value()->representation().IsInteger32());
1312
+ ASSERT(instr->representation().IsInteger32());
1313
+ LOperand* input = UseRegisterAtStart(instr->value());
1314
+ LBitNotI* result = new LBitNotI(input);
1315
+ return DefineSameAsFirst(result);
1316
+ }
1317
+
1318
+
1319
+ LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) {
1320
+ return DoBit(Token::BIT_OR, instr);
1321
+ }
1322
+
1323
+
1324
+ LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) {
1325
+ return DoBit(Token::BIT_XOR, instr);
1326
+ }
1327
+
1328
+
1329
+ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
1330
+ if (instr->representation().IsDouble()) {
1331
+ return DoArithmeticD(Token::DIV, instr);
1332
+ } else if (instr->representation().IsInteger32()) {
1333
+ // The temporary operand is necessary to ensure that right is not allocated
1334
+ // into rdx.
1335
+ LOperand* temp = FixedTemp(rdx);
1336
+ LOperand* dividend = UseFixed(instr->left(), rax);
1337
+ LOperand* divisor = UseRegister(instr->right());
1338
+ LDivI* result = new LDivI(dividend, divisor, temp);
1339
+ return AssignEnvironment(DefineFixed(result, rax));
1340
+ } else {
1341
+ ASSERT(instr->representation().IsTagged());
1342
+ return DoArithmeticT(Token::DIV, instr);
1343
+ }
1344
+ }
1345
+
1346
+
1347
+ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
1348
+ if (instr->representation().IsInteger32()) {
1349
+ ASSERT(instr->left()->representation().IsInteger32());
1350
+ ASSERT(instr->right()->representation().IsInteger32());
1351
+ // The temporary operand is necessary to ensure that right is not allocated
1352
+ // into edx.
1353
+ LOperand* temp = FixedTemp(rdx);
1354
+ LOperand* value = UseFixed(instr->left(), rax);
1355
+ LOperand* divisor = UseRegister(instr->right());
1356
+ LModI* mod = new LModI(value, divisor, temp);
1357
+ LInstruction* result = DefineFixed(mod, rdx);
1358
+ return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
1359
+ instr->CheckFlag(HValue::kCanBeDivByZero))
1360
+ ? AssignEnvironment(result)
1361
+ : result;
1362
+ } else if (instr->representation().IsTagged()) {
1363
+ return DoArithmeticT(Token::MOD, instr);
1364
+ } else {
1365
+ ASSERT(instr->representation().IsDouble());
1366
+ // We call a C function for double modulo. It can't trigger a GC.
1367
+ // We need to use fixed result register for the call.
1368
+ // TODO(fschneider): Allow any register as input registers.
1369
+ LOperand* left = UseFixedDouble(instr->left(), xmm1);
1370
+ LOperand* right = UseFixedDouble(instr->right(), xmm2);
1371
+ LArithmeticD* result = new LArithmeticD(Token::MOD, left, right);
1372
+ return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1373
+ }
1374
+ }
1375
+
1376
+
1377
+ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
1378
+ if (instr->representation().IsInteger32()) {
1379
+ ASSERT(instr->left()->representation().IsInteger32());
1380
+ ASSERT(instr->right()->representation().IsInteger32());
1381
+ LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
1382
+ LOperand* right = UseOrConstant(instr->MostConstantOperand());
1383
+ LMulI* mul = new LMulI(left, right);
1384
+ return AssignEnvironment(DefineSameAsFirst(mul));
1385
+ } else if (instr->representation().IsDouble()) {
1386
+ return DoArithmeticD(Token::MUL, instr);
1387
+ } else {
1388
+ ASSERT(instr->representation().IsTagged());
1389
+ return DoArithmeticT(Token::MUL, instr);
1390
+ }
1391
+ }
1392
+
1393
+
1394
+ LInstruction* LChunkBuilder::DoSub(HSub* instr) {
1395
+ if (instr->representation().IsInteger32()) {
1396
+ ASSERT(instr->left()->representation().IsInteger32());
1397
+ ASSERT(instr->right()->representation().IsInteger32());
1398
+ LOperand* left = UseRegisterAtStart(instr->left());
1399
+ LOperand* right = UseOrConstantAtStart(instr->right());
1400
+ LSubI* sub = new LSubI(left, right);
1401
+ LInstruction* result = DefineSameAsFirst(sub);
1402
+ if (instr->CheckFlag(HValue::kCanOverflow)) {
1403
+ result = AssignEnvironment(result);
1404
+ }
1405
+ return result;
1406
+ } else if (instr->representation().IsDouble()) {
1407
+ return DoArithmeticD(Token::SUB, instr);
1408
+ } else {
1409
+ ASSERT(instr->representation().IsTagged());
1410
+ return DoArithmeticT(Token::SUB, instr);
1411
+ }
1412
+ }
1413
+
1414
+
1415
+ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
1416
+ if (instr->representation().IsInteger32()) {
1417
+ ASSERT(instr->left()->representation().IsInteger32());
1418
+ ASSERT(instr->right()->representation().IsInteger32());
1419
+ LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
1420
+ LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
1421
+ LAddI* add = new LAddI(left, right);
1422
+ LInstruction* result = DefineSameAsFirst(add);
1423
+ if (instr->CheckFlag(HValue::kCanOverflow)) {
1424
+ result = AssignEnvironment(result);
1425
+ }
1426
+ return result;
1427
+ } else if (instr->representation().IsDouble()) {
1428
+ return DoArithmeticD(Token::ADD, instr);
1429
+ } else {
1430
+ ASSERT(instr->representation().IsTagged());
1431
+ return DoArithmeticT(Token::ADD, instr);
1432
+ }
1433
+ return NULL;
1434
+ }
1435
+
1436
+
1437
+ LInstruction* LChunkBuilder::DoPower(HPower* instr) {
1438
+ ASSERT(instr->representation().IsDouble());
1439
+ // We call a C function for double power. It can't trigger a GC.
1440
+ // We need to use fixed result register for the call.
1441
+ Representation exponent_type = instr->right()->representation();
1442
+ ASSERT(instr->left()->representation().IsDouble());
1443
+ LOperand* left = UseFixedDouble(instr->left(), xmm2);
1444
+ LOperand* right = exponent_type.IsDouble() ?
1445
+ UseFixedDouble(instr->right(), xmm1) :
1446
+ #ifdef _WIN64
1447
+ UseFixed(instr->right(), rdx);
1448
+ #else
1449
+ UseFixed(instr->right(), rdi);
1450
+ #endif
1451
+ LPower* result = new LPower(left, right);
1452
+ return MarkAsCall(DefineFixedDouble(result, xmm1), instr,
1453
+ CAN_DEOPTIMIZE_EAGERLY);
1454
+ }
1455
+
1456
+
1457
+ LInstruction* LChunkBuilder::DoCompare(HCompare* instr) {
1458
+ Token::Value op = instr->token();
1459
+ Representation r = instr->GetInputRepresentation();
1460
+ if (r.IsInteger32()) {
1461
+ ASSERT(instr->left()->representation().IsInteger32());
1462
+ ASSERT(instr->right()->representation().IsInteger32());
1463
+ LOperand* left = UseRegisterAtStart(instr->left());
1464
+ LOperand* right = UseOrConstantAtStart(instr->right());
1465
+ return DefineAsRegister(new LCmpID(left, right));
1466
+ } else if (r.IsDouble()) {
1467
+ ASSERT(instr->left()->representation().IsDouble());
1468
+ ASSERT(instr->right()->representation().IsDouble());
1469
+ LOperand* left = UseRegisterAtStart(instr->left());
1470
+ LOperand* right = UseRegisterAtStart(instr->right());
1471
+ return DefineAsRegister(new LCmpID(left, right));
1472
+ } else {
1473
+ ASSERT(instr->left()->representation().IsTagged());
1474
+ ASSERT(instr->right()->representation().IsTagged());
1475
+ bool reversed = (op == Token::GT || op == Token::LTE);
1476
+ LOperand* left = UseFixed(instr->left(), reversed ? rax : rdx);
1477
+ LOperand* right = UseFixed(instr->right(), reversed ? rdx : rax);
1478
+ LCmpT* result = new LCmpT(left, right);
1479
+ return MarkAsCall(DefineFixed(result, rax), instr);
1480
+ }
1481
+ }
1482
+
1483
+
1484
+ LInstruction* LChunkBuilder::DoCompareJSObjectEq(
1485
+ HCompareJSObjectEq* instr) {
1486
+ LOperand* left = UseRegisterAtStart(instr->left());
1487
+ LOperand* right = UseRegisterAtStart(instr->right());
1488
+ LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right);
1489
+ return DefineAsRegister(result);
1490
+ }
1491
+
1492
+
1493
+ LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
1494
+ ASSERT(instr->value()->representation().IsTagged());
1495
+ LOperand* value = UseRegisterAtStart(instr->value());
1496
+
1497
+ return DefineAsRegister(new LIsNull(value));
1498
+ }
1499
+
1500
+
1501
+ LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1502
+ ASSERT(instr->value()->representation().IsTagged());
1503
+ LOperand* value = UseRegister(instr->value());
1504
+
1505
+ return DefineAsRegister(new LIsObject(value));
1506
+ }
1507
+
1508
+
1509
+ LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) {
1510
+ ASSERT(instr->value()->representation().IsTagged());
1511
+ LOperand* value = UseAtStart(instr->value());
1512
+
1513
+ return DefineAsRegister(new LIsSmi(value));
1514
+ }
1515
+
1516
+
1517
+ LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) {
1518
+ ASSERT(instr->value()->representation().IsTagged());
1519
+ LOperand* value = UseRegisterAtStart(instr->value());
1520
+
1521
+ return DefineAsRegister(new LHasInstanceType(value));
1522
+ }
1523
+
1524
+
1525
+ LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1526
+ HGetCachedArrayIndex* instr) {
1527
+ Abort("Unimplemented: %s", "DoGetCachedArrayIndex");
1528
+ return NULL;
1529
+ }
1530
+
1531
+
1532
+ LInstruction* LChunkBuilder::DoHasCachedArrayIndex(
1533
+ HHasCachedArrayIndex* instr) {
1534
+ ASSERT(instr->value()->representation().IsTagged());
1535
+ LOperand* value = UseRegister(instr->value());
1536
+ return DefineAsRegister(new LHasCachedArrayIndex(value));
1537
+ }
1538
+
1539
+
1540
+ LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) {
1541
+ Abort("Unimplemented: %s", "DoClassOfTest");
1542
+ return NULL;
1543
+ }
1544
+
1545
+
1546
+ LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1547
+ LOperand* array = UseRegisterAtStart(instr->value());
1548
+ return DefineAsRegister(new LJSArrayLength(array));
1549
+ }
1550
+
1551
+
1552
+ LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1553
+ LOperand* array = UseRegisterAtStart(instr->value());
1554
+ return DefineAsRegister(new LFixedArrayLength(array));
1555
+ }
1556
+
1557
+
1558
+ LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) {
1559
+ LOperand* array = UseRegisterAtStart(instr->value());
1560
+ return DefineAsRegister(new LPixelArrayLength(array));
1561
+ }
1562
+
1563
+
1564
+ LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1565
+ LOperand* object = UseRegister(instr->value());
1566
+ LValueOf* result = new LValueOf(object);
1567
+ return AssignEnvironment(DefineSameAsFirst(result));
1568
+ }
1569
+
1570
+
1571
+ LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1572
+ return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1573
+ Use(instr->length())));
1574
+ }
1575
+
1576
+
1577
+ LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) {
1578
+ // The control instruction marking the end of a block that completed
1579
+ // abruptly (e.g., threw an exception). There is nothing specific to do.
1580
+ return NULL;
1581
+ }
1582
+
1583
+
1584
+ LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
1585
+ LOperand* value = UseFixed(instr->value(), rax);
1586
+ return MarkAsCall(new LThrow(value), instr);
1587
+ }
1588
+
1589
+
1590
+ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1591
+ Representation from = instr->from();
1592
+ Representation to = instr->to();
1593
+ if (from.IsTagged()) {
1594
+ if (to.IsDouble()) {
1595
+ LOperand* value = UseRegister(instr->value());
1596
+ LNumberUntagD* res = new LNumberUntagD(value);
1597
+ return AssignEnvironment(DefineAsRegister(res));
1598
+ } else {
1599
+ ASSERT(to.IsInteger32());
1600
+ LOperand* value = UseRegister(instr->value());
1601
+ bool needs_check = !instr->value()->type().IsSmi();
1602
+ if (needs_check) {
1603
+ LOperand* xmm_temp =
1604
+ (instr->CanTruncateToInt32() && CpuFeatures::IsSupported(SSE3))
1605
+ ? NULL
1606
+ : FixedTemp(xmm1);
1607
+ LTaggedToI* res = new LTaggedToI(value, xmm_temp);
1608
+ return AssignEnvironment(DefineSameAsFirst(res));
1609
+ } else {
1610
+ return DefineSameAsFirst(new LSmiUntag(value, needs_check));
1611
+ }
1612
+ }
1613
+ } else if (from.IsDouble()) {
1614
+ if (to.IsTagged()) {
1615
+ LOperand* value = UseRegister(instr->value());
1616
+ LOperand* temp = TempRegister();
1617
+
1618
+ // Make sure that temp and result_temp are different registers.
1619
+ LUnallocated* result_temp = TempRegister();
1620
+ LNumberTagD* result = new LNumberTagD(value, temp);
1621
+ return AssignPointerMap(Define(result, result_temp));
1622
+ } else {
1623
+ ASSERT(to.IsInteger32());
1624
+ LOperand* value = UseRegister(instr->value());
1625
+ return AssignEnvironment(DefineAsRegister(new LDoubleToI(value)));
1626
+ }
1627
+ } else if (from.IsInteger32()) {
1628
+ if (to.IsTagged()) {
1629
+ HValue* val = instr->value();
1630
+ LOperand* value = UseRegister(val);
1631
+ if (val->HasRange() && val->range()->IsInSmiRange()) {
1632
+ return DefineSameAsFirst(new LSmiTag(value));
1633
+ } else {
1634
+ LNumberTagI* result = new LNumberTagI(value);
1635
+ return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
1636
+ }
1637
+ } else {
1638
+ ASSERT(to.IsDouble());
1639
+ return DefineAsRegister(new LInteger32ToDouble(Use(instr->value())));
1640
+ }
1641
+ }
1642
+ UNREACHABLE();
1643
+ return NULL;
1644
+ }
1645
+
1646
+
1647
+ LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) {
1648
+ LOperand* value = UseRegisterAtStart(instr->value());
1649
+ return AssignEnvironment(new LCheckSmi(value, zero));
1650
+ }
1651
+
1652
+
1653
+ LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
1654
+ LOperand* value = UseRegisterAtStart(instr->value());
1655
+ LCheckInstanceType* result = new LCheckInstanceType(value);
1656
+ return AssignEnvironment(result);
1657
+ }
1658
+
1659
+
1660
+ LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
1661
+ LOperand* temp = TempRegister();
1662
+ LCheckPrototypeMaps* result = new LCheckPrototypeMaps(temp);
1663
+ return AssignEnvironment(result);
1664
+ }
1665
+
1666
+
1667
+ LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
1668
+ LOperand* value = UseRegisterAtStart(instr->value());
1669
+ return AssignEnvironment(new LCheckSmi(value, not_zero));
1670
+ }
1671
+
1672
+
1673
+ LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
1674
+ LOperand* value = UseRegisterAtStart(instr->value());
1675
+ return AssignEnvironment(new LCheckFunction(value));
1676
+ }
1677
+
1678
+
1679
+ LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) {
1680
+ LOperand* value = UseRegisterAtStart(instr->value());
1681
+ LCheckMap* result = new LCheckMap(value);
1682
+ return AssignEnvironment(result);
1683
+ }
1684
+
1685
+
1686
+ LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1687
+ return new LReturn(UseFixed(instr->value(), rax));
1688
+ }
1689
+
1690
+
1691
+ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1692
+ Representation r = instr->representation();
1693
+ if (r.IsInteger32()) {
1694
+ return DefineAsRegister(new LConstantI);
1695
+ } else if (r.IsDouble()) {
1696
+ LOperand* temp = TempRegister();
1697
+ return DefineAsRegister(new LConstantD(temp));
1698
+ } else if (r.IsTagged()) {
1699
+ return DefineAsRegister(new LConstantT);
1700
+ } else {
1701
+ UNREACHABLE();
1702
+ return NULL;
1703
+ }
1704
+ }
1705
+
1706
+
1707
+ LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) {
1708
+ LLoadGlobal* result = new LLoadGlobal;
1709
+ return instr->check_hole_value()
1710
+ ? AssignEnvironment(DefineAsRegister(result))
1711
+ : DefineAsRegister(result);
1712
+ }
1713
+
1714
+
1715
+ LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) {
1716
+ LStoreGlobal* result = new LStoreGlobal(UseRegister(instr->value()),
1717
+ TempRegister());
1718
+ return instr->check_hole_value() ? AssignEnvironment(result) : result;
1719
+ }
1720
+
1721
+
1722
+ LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1723
+ LOperand* context = UseRegisterAtStart(instr->value());
1724
+ return DefineAsRegister(new LLoadContextSlot(context));
1725
+ }
1726
+
1727
+
1728
+ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
1729
+ Abort("Unimplemented: DoStoreContextSlot"); // Temporarily disabled (whesse).
1730
+ LOperand* context;
1731
+ LOperand* value;
1732
+ if (instr->NeedsWriteBarrier()) {
1733
+ context = UseTempRegister(instr->context());
1734
+ value = UseTempRegister(instr->value());
1735
+ } else {
1736
+ context = UseRegister(instr->context());
1737
+ value = UseRegister(instr->value());
1738
+ }
1739
+ return new LStoreContextSlot(context, value);
1740
+ }
1741
+
1742
+
1743
+ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1744
+ ASSERT(instr->representation().IsTagged());
1745
+ LOperand* obj = UseRegisterAtStart(instr->object());
1746
+ return DefineAsRegister(new LLoadNamedField(obj));
1747
+ }
1748
+
1749
+
1750
+ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
1751
+ LOperand* object = UseFixed(instr->object(), rax);
1752
+ LLoadNamedGeneric* result = new LLoadNamedGeneric(object);
1753
+ return MarkAsCall(DefineFixed(result, rax), instr);
1754
+ }
1755
+
1756
+
1757
+ LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1758
+ HLoadFunctionPrototype* instr) {
1759
+ return AssignEnvironment(DefineAsRegister(
1760
+ new LLoadFunctionPrototype(UseRegister(instr->function()))));
1761
+ }
1762
+
1763
+
1764
+ LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
1765
+ LOperand* input = UseRegisterAtStart(instr->value());
1766
+ return DefineAsRegister(new LLoadElements(input));
1767
+ }
1768
+
1769
+
1770
+ LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer(
1771
+ HLoadPixelArrayExternalPointer* instr) {
1772
+ LOperand* input = UseRegisterAtStart(instr->value());
1773
+ return DefineAsRegister(new LLoadPixelArrayExternalPointer(input));
1774
+ }
1775
+
1776
+
1777
+ LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1778
+ HLoadKeyedFastElement* instr) {
1779
+ ASSERT(instr->representation().IsTagged());
1780
+ ASSERT(instr->key()->representation().IsInteger32());
1781
+ LOperand* obj = UseRegisterAtStart(instr->object());
1782
+ LOperand* key = UseRegisterAtStart(instr->key());
1783
+ LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1784
+ return AssignEnvironment(DefineSameAsFirst(result));
1785
+ }
1786
+
1787
+
1788
+ LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
1789
+ HLoadPixelArrayElement* instr) {
1790
+ ASSERT(instr->representation().IsInteger32());
1791
+ ASSERT(instr->key()->representation().IsInteger32());
1792
+ LOperand* external_pointer =
1793
+ UseRegisterAtStart(instr->external_pointer());
1794
+ LOperand* key = UseRegisterAtStart(instr->key());
1795
+ LLoadPixelArrayElement* result =
1796
+ new LLoadPixelArrayElement(external_pointer, key);
1797
+ return DefineSameAsFirst(result);
1798
+ }
1799
+
1800
+
1801
+ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1802
+ LOperand* object = UseFixed(instr->object(), rdx);
1803
+ LOperand* key = UseFixed(instr->key(), rax);
1804
+
1805
+ LLoadKeyedGeneric* result = new LLoadKeyedGeneric(object, key);
1806
+ return MarkAsCall(DefineFixed(result, rax), instr);
1807
+ }
1808
+
1809
+
1810
+ LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
1811
+ HStoreKeyedFastElement* instr) {
1812
+ bool needs_write_barrier = instr->NeedsWriteBarrier();
1813
+ ASSERT(instr->value()->representation().IsTagged());
1814
+ ASSERT(instr->object()->representation().IsTagged());
1815
+ ASSERT(instr->key()->representation().IsInteger32());
1816
+
1817
+ LOperand* obj = UseTempRegister(instr->object());
1818
+ LOperand* val = needs_write_barrier
1819
+ ? UseTempRegister(instr->value())
1820
+ : UseRegisterAtStart(instr->value());
1821
+ LOperand* key = needs_write_barrier
1822
+ ? UseTempRegister(instr->key())
1823
+ : UseRegisterOrConstantAtStart(instr->key());
1824
+
1825
+ return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1826
+ }
1827
+
1828
+
1829
+ LInstruction* LChunkBuilder::DoStorePixelArrayElement(
1830
+ HStorePixelArrayElement* instr) {
1831
+ ASSERT(instr->value()->representation().IsInteger32());
1832
+ ASSERT(instr->external_pointer()->representation().IsExternal());
1833
+ ASSERT(instr->key()->representation().IsInteger32());
1834
+
1835
+ LOperand* external_pointer = UseRegister(instr->external_pointer());
1836
+ LOperand* val = UseTempRegister(instr->value());
1837
+ LOperand* key = UseRegister(instr->key());
1838
+
1839
+ return new LStorePixelArrayElement(external_pointer, key, val);
1840
+ }
1841
+
1842
+
1843
+ LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
1844
+ LOperand* object = UseFixed(instr->object(), rdx);
1845
+ LOperand* key = UseFixed(instr->key(), rcx);
1846
+ LOperand* value = UseFixed(instr->value(), rax);
1847
+
1848
+ ASSERT(instr->object()->representation().IsTagged());
1849
+ ASSERT(instr->key()->representation().IsTagged());
1850
+ ASSERT(instr->value()->representation().IsTagged());
1851
+
1852
+ LStoreKeyedGeneric* result = new LStoreKeyedGeneric(object, key, value);
1853
+ return MarkAsCall(result, instr);
1854
+ }
1855
+
1856
+
1857
+ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
1858
+ bool needs_write_barrier = instr->NeedsWriteBarrier();
1859
+
1860
+ LOperand* obj = needs_write_barrier
1861
+ ? UseTempRegister(instr->object())
1862
+ : UseRegisterAtStart(instr->object());
1863
+
1864
+ LOperand* val = needs_write_barrier
1865
+ ? UseTempRegister(instr->value())
1866
+ : UseRegister(instr->value());
1867
+
1868
+ // We only need a scratch register if we have a write barrier or we
1869
+ // have a store into the properties array (not in-object-property).
1870
+ LOperand* temp = (!instr->is_in_object() || needs_write_barrier)
1871
+ ? TempRegister() : NULL;
1872
+
1873
+ return new LStoreNamedField(obj, val, temp);
1874
+ }
1875
+
1876
+
1877
+ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
1878
+ LOperand* object = UseFixed(instr->object(), rdx);
1879
+ LOperand* value = UseFixed(instr->value(), rax);
1880
+
1881
+ LStoreNamedGeneric* result = new LStoreNamedGeneric(object, value);
1882
+ return MarkAsCall(result, instr);
1883
+ }
1884
+
1885
+
1886
+ LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
1887
+ LOperand* string = UseRegister(instr->string());
1888
+ LOperand* index = UseRegisterOrConstant(instr->index());
1889
+ LStringCharCodeAt* result = new LStringCharCodeAt(string, index);
1890
+ return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1891
+ }
1892
+
1893
+
1894
+ LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
1895
+ LOperand* string = UseRegisterAtStart(instr->value());
1896
+ return DefineAsRegister(new LStringLength(string));
1897
+ }
1898
+
1899
+
1900
+ LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
1901
+ return MarkAsCall(DefineFixed(new LArrayLiteral, rax), instr);
1902
+ }
1903
+
1904
+
1905
+ LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) {
1906
+ return MarkAsCall(DefineFixed(new LObjectLiteral, rax), instr);
1907
+ }
1908
+
1909
+
1910
+ LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) {
1911
+ return MarkAsCall(DefineFixed(new LRegExpLiteral, rax), instr);
1912
+ }
1913
+
1914
+
1915
+ LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
1916
+ return MarkAsCall(DefineFixed(new LFunctionLiteral, rax), instr);
1917
+ }
1918
+
1919
+
1920
+ LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
1921
+ LDeleteProperty* result =
1922
+ new LDeleteProperty(Use(instr->object()), UseOrConstant(instr->key()));
1923
+ return MarkAsCall(DefineFixed(result, rax), instr);
1924
+ }
1925
+
1926
+
1927
+ LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
1928
+ allocator_->MarkAsOsrEntry();
1929
+ current_block_->last_environment()->set_ast_id(instr->ast_id());
1930
+ return AssignEnvironment(new LOsrEntry);
1931
+ }
1932
+
1933
+
1934
+ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
1935
+ int spill_index = chunk()->GetParameterStackSlot(instr->index());
1936
+ return DefineAsSpilled(new LParameter, spill_index);
1937
+ }
1938
+
1939
+
1940
+ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
1941
+ int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
1942
+ return DefineAsSpilled(new LUnknownOSRValue, spill_index);
1943
+ }
1944
+
1945
+
1946
+ LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
1947
+ argument_count_ -= instr->argument_count();
1948
+ return MarkAsCall(DefineFixed(new LCallStub, rax), instr);
1949
+ }
1950
+
1951
+
1952
+ LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
1953
+ // There are no real uses of the arguments object.
1954
+ // arguments.length and element access are supported directly on
1955
+ // stack arguments, and any real arguments object use causes a bailout.
1956
+ // So this value is never used.
1957
+ return NULL;
1958
+ }
1959
+
1960
+
1961
+ LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
1962
+ LOperand* arguments = UseRegister(instr->arguments());
1963
+ LOperand* length = UseTempRegister(instr->length());
1964
+ LOperand* index = Use(instr->index());
1965
+ LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index);
1966
+ return AssignEnvironment(DefineAsRegister(result));
1967
+ }
1968
+
1969
+
1970
+ LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
1971
+ LTypeof* result = new LTypeof(UseAtStart(instr->value()));
1972
+ return MarkAsCall(DefineFixed(result, rax), instr);
1973
+ }
1974
+
1975
+
1976
+ LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
1977
+ return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value())));
1978
+ }
1979
+
1980
+
1981
+ LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
1982
+ return DefineAsRegister(new LIsConstructCall);
1983
+ }
1984
+
1985
+
1986
+ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
1987
+ HEnvironment* env = current_block_->last_environment();
1988
+ ASSERT(env != NULL);
1989
+
1990
+ env->set_ast_id(instr->ast_id());
1991
+
1992
+ env->Drop(instr->pop_count());
1993
+ for (int i = 0; i < instr->values()->length(); ++i) {
1994
+ HValue* value = instr->values()->at(i);
1995
+ if (instr->HasAssignedIndexAt(i)) {
1996
+ env->Bind(instr->GetAssignedIndexAt(i), value);
1997
+ } else {
1998
+ env->Push(value);
1999
+ }
2000
+ }
2001
+ ASSERT(env->length() == instr->environment_length());
2002
+
2003
+ // If there is an instruction pending deoptimization environment create a
2004
+ // lazy bailout instruction to capture the environment.
2005
+ if (pending_deoptimization_ast_id_ == instr->ast_id()) {
2006
+ LLazyBailout* lazy_bailout = new LLazyBailout;
2007
+ LInstruction* result = AssignEnvironment(lazy_bailout);
2008
+ instruction_pending_deoptimization_environment_->
2009
+ set_deoptimization_environment(result->environment());
2010
+ ClearInstructionPendingDeoptimizationEnvironment();
2011
+ return result;
2012
+ }
2013
+
2014
+ return NULL;
2015
+ }
2016
+
2017
+
2018
+ LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
2019
+ return MarkAsCall(new LStackCheck, instr);
2020
+ }
2021
+
2022
+
2023
+ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2024
+ HEnvironment* outer = current_block_->last_environment();
2025
+ HConstant* undefined = graph()->GetConstantUndefined();
2026
+ HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2027
+ instr->function(),
2028
+ false,
2029
+ undefined);
2030
+ current_block_->UpdateEnvironment(inner);
2031
+ chunk_->AddInlinedClosure(instr->closure());
2032
+ return NULL;
2033
+ }
2034
+
2035
+
2036
+ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2037
+ HEnvironment* outer = current_block_->last_environment()->outer();
2038
+ current_block_->UpdateEnvironment(outer);
2039
+ return NULL;
2040
+ }
2041
+
2042
+ } } // namespace v8::internal
2043
+
2044
+ #endif // V8_TARGET_ARCH_X64