therubyracer 0.8.1.pre2 → 0.8.1

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

Potentially problematic release.


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

Files changed (877) hide show
  1. data/Changelog.md +2 -1
  2. data/README.md +6 -3
  3. data/ext/v8/upstream/3.1.8/.gitignore +31 -0
  4. data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
  5. data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
  6. data/ext/v8/upstream/3.1.8/LICENSE +52 -0
  7. data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
  8. data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
  9. data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
  10. data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
  11. data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
  12. data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
  13. data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
  14. data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
  15. data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
  16. data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
  17. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
  19. data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
  20. data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
  21. data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
  22. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
  23. data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
  24. data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
  25. data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
  26. data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
  27. data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
  28. data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
  29. data/ext/v8/upstream/3.1.8/src/api.h +508 -0
  30. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
  31. data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
  32. data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
  33. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
  34. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
  35. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
  36. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
  37. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
  38. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
  39. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
  40. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
  41. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
  42. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
  43. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
  44. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
  45. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
  46. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
  47. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
  48. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
  49. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
  50. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
  51. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
  52. data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
  53. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
  54. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
  55. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
  56. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
  57. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
  58. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
  59. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
  60. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
  61. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
  62. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
  63. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
  64. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
  65. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
  66. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
  67. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
  68. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
  69. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
  70. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
  71. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
  72. data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
  73. data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
  74. data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
  75. data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
  76. data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
  77. data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
  78. data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
  79. data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
  80. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
  81. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
  82. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
  83. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
  84. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
  85. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
  86. data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
  87. data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
  88. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
  89. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
  90. data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
  91. data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
  92. data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
  93. data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
  94. data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
  95. data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
  96. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
  97. data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
  98. data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
  99. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
  100. data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
  101. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
  102. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
  103. data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
  104. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
  105. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
  106. data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
  107. data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
  108. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
  109. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
  110. data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
  111. data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
  112. data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
  113. data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
  114. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
  115. data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
  116. data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
  117. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
  118. data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
  119. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
  120. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
  121. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
  122. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
  123. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
  124. data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
  125. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
  126. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
  127. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
  128. data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
  129. data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
  130. data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
  131. data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
  132. data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
  133. data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
  134. data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
  135. data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
  136. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
  137. data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
  138. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
  139. data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
  140. data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
  141. data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
  142. data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
  143. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
  144. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
  145. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
  146. data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
  147. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
  148. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
  149. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
  150. data/ext/v8/upstream/3.1.8/src/double.h +238 -0
  151. data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
  152. data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
  153. data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
  154. data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
  155. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
  156. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
  157. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
  158. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
  159. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
  160. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
  161. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
  162. data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
  163. data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
  164. data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
  165. data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
  166. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
  167. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
  168. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
  169. data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
  170. data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
  171. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
  172. data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
  173. data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
  174. data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
  175. data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
  176. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
  177. data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
  178. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
  179. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
  180. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
  181. data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
  182. data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
  183. data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
  184. data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
  185. data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
  186. data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
  187. data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
  188. data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
  189. data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
  190. data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
  191. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
  192. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
  193. data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
  194. data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
  195. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
  196. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
  197. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
  198. data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
  199. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
  200. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
  201. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
  202. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
  203. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
  204. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
  205. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
  206. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
  207. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
  208. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
  209. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
  210. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
  211. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
  212. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
  213. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
  214. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
  215. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
  216. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
  217. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
  218. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
  219. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
  220. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  221. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
  222. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
  223. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
  224. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
  225. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
  226. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
  227. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  228. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
  229. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
  230. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
  231. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
  232. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
  233. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
  234. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
  235. data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
  236. data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
  237. data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
  238. data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
  239. data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
  240. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
  241. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
  242. data/ext/v8/upstream/3.1.8/src/json.js +342 -0
  243. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
  244. data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
  245. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
  246. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
  247. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
  248. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
  249. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
  250. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
  251. data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
  252. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
  253. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
  254. data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
  255. data/ext/v8/upstream/3.1.8/src/list.h +164 -0
  256. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
  257. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
  258. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
  259. data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
  260. data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
  261. data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
  262. data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
  263. data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
  264. data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
  265. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
  266. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
  267. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
  268. data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
  269. data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
  270. data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
  271. data/ext/v8/upstream/3.1.8/src/log.h +379 -0
  272. data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
  273. data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
  274. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
  275. data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
  276. data/ext/v8/upstream/3.1.8/src/math.js +264 -0
  277. data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
  278. data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
  279. data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
  280. data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
  281. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
  282. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
  283. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
  284. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
  285. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
  286. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
  287. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
  288. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
  289. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
  290. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
  291. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
  292. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
  293. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
  294. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
  295. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
  296. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
  297. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
  298. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
  299. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
  300. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
  301. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
  302. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
  303. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
  304. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
  305. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
  306. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
  307. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
  308. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
  309. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
  310. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
  311. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
  312. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
  313. data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
  314. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
  315. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
  316. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
  317. data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
  318. data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
  319. data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
  320. data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
  321. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
  322. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
  323. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
  324. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
  325. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
  326. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
  327. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
  328. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
  329. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
  330. data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
  331. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
  332. data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
  333. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
  334. data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
  335. data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
  336. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
  337. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
  338. data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
  339. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
  340. data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
  341. data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
  342. data/ext/v8/upstream/3.1.8/src/property.h +337 -0
  343. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  344. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
  345. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
  346. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
  347. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
  348. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
  349. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
  350. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
  351. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
  352. data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
  353. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
  354. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
  355. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
  356. data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
  357. data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
  358. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
  359. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
  360. data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
  361. data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
  362. data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
  363. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
  364. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
  365. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
  366. data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
  367. data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
  368. data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
  369. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
  370. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
  371. data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
  372. data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
  373. data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
  374. data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
  375. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
  376. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
  377. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
  378. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
  379. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
  380. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
  381. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
  382. data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
  383. data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
  384. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
  385. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
  386. data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
  387. data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
  388. data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
  389. data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
  390. data/ext/v8/upstream/3.1.8/src/string.js +915 -0
  391. data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
  392. data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
  393. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
  394. data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
  395. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
  396. data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
  397. data/ext/v8/upstream/3.1.8/src/token.h +288 -0
  398. data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
  399. data/ext/v8/upstream/3.1.8/src/top.h +608 -0
  400. data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
  401. data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
  402. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
  403. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
  404. data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
  405. data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
  406. data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
  407. data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
  408. data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
  409. data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
  410. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
  411. data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
  412. data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
  413. data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
  414. data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
  415. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
  416. data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
  417. data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
  418. data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
  419. data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
  420. data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
  421. data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
  422. data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
  423. data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
  424. data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
  425. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
  426. data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
  427. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
  428. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
  429. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
  430. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
  431. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
  432. data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
  433. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
  434. data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
  435. data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
  436. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
  437. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
  438. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
  439. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
  440. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
  441. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
  442. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
  443. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
  444. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
  445. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
  446. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
  447. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
  448. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
  449. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
  450. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
  451. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
  452. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
  453. data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
  454. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
  455. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
  456. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  457. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
  458. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
  459. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
  460. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
  461. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
  462. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
  463. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
  464. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
  465. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
  466. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
  467. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
  468. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
  469. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
  470. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
  471. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
  472. data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
  473. data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
  474. data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
  475. data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
  476. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
  477. data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
  478. data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
  479. data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
  480. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
  481. data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
  482. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
  483. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
  484. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
  485. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
  486. data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
  487. data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
  488. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
  489. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
  490. data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
  491. data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
  492. data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
  493. data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
  494. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
  495. data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
  496. data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
  497. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
  498. data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
  499. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
  500. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
  501. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
  502. data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
  503. data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
  504. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
  505. data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
  506. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
  507. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
  508. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
  509. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
  510. data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
  511. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
  512. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
  513. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
  514. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
  515. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
  516. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
  517. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
  518. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
  519. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
  520. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
  521. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  522. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  523. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  524. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  525. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  526. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  527. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  528. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  529. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
  530. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
  531. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
  532. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  533. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  534. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  535. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  536. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
  537. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
  538. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
  539. data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
  540. data/ext/v8/upstream/Makefile +2 -1
  541. data/ext/v8/v8_template.cpp +2 -2
  542. data/lib/v8/version.rb +1 -1
  543. data/spec/redjs/jsapi_spec.rb +2 -2
  544. metadata +552 -490
  545. data/ext/v8/upstream/2.3.3/.gitignore +0 -26
  546. data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
  547. data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
  548. data/ext/v8/upstream/2.3.3/LICENSE +0 -55
  549. data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
  550. data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
  551. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
  552. data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
  553. data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
  554. data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
  555. data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
  556. data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
  557. data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
  558. data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
  559. data/ext/v8/upstream/2.3.3/src/api.h +0 -485
  560. data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
  561. data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
  562. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
  563. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
  564. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
  565. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
  566. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
  567. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
  568. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
  569. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
  570. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
  571. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
  572. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
  573. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
  574. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
  575. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
  576. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
  577. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
  578. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
  579. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
  580. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
  581. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
  582. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
  583. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
  584. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
  585. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
  586. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
  587. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
  588. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
  589. data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
  590. data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
  591. data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
  592. data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
  593. data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
  594. data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
  595. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
  596. data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
  597. data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
  598. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
  599. data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
  600. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
  601. data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
  602. data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
  603. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
  604. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
  605. data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
  606. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
  607. data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
  608. data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
  609. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
  610. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
  611. data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
  612. data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
  613. data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
  614. data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
  615. data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
  616. data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
  617. data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
  618. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
  619. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
  620. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
  621. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
  622. data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
  623. data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
  624. data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
  625. data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
  626. data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
  627. data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
  628. data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
  629. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
  630. data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
  631. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
  632. data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
  633. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
  634. data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
  635. data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
  636. data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
  637. data/ext/v8/upstream/2.3.3/src/double.h +0 -169
  638. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
  639. data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
  640. data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
  641. data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
  642. data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
  643. data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
  644. data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
  645. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
  646. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
  647. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
  648. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
  649. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
  650. data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
  651. data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
  652. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
  653. data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
  654. data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
  655. data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
  656. data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
  657. data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
  658. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
  659. data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
  660. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
  661. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
  662. data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
  663. data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
  664. data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
  665. data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
  666. data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
  667. data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
  668. data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
  669. data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
  670. data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
  671. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
  672. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
  673. data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
  674. data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
  675. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
  676. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
  677. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
  678. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
  679. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
  680. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
  681. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
  682. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
  683. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
  684. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
  685. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
  686. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
  687. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
  688. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
  689. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
  690. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
  691. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
  692. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
  693. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
  694. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
  695. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
  696. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
  697. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
  698. data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
  699. data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
  700. data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
  701. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
  702. data/ext/v8/upstream/2.3.3/src/json.js +0 -268
  703. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
  704. data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
  705. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
  706. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
  707. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
  708. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
  709. data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
  710. data/ext/v8/upstream/2.3.3/src/list.h +0 -159
  711. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
  712. data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
  713. data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
  714. data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
  715. data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
  716. data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
  717. data/ext/v8/upstream/2.3.3/src/log.h +0 -384
  718. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
  719. data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
  720. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
  721. data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
  722. data/ext/v8/upstream/2.3.3/src/math.js +0 -264
  723. data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
  724. data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
  725. data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
  726. data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
  727. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
  728. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
  729. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
  730. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
  731. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
  732. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
  733. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
  734. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
  735. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
  736. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
  737. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
  738. data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
  739. data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
  740. data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
  741. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
  742. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
  743. data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
  744. data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
  745. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
  746. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
  747. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
  748. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
  749. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
  750. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
  751. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
  752. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
  753. data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
  754. data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
  755. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
  756. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
  757. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
  758. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
  759. data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
  760. data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
  761. data/ext/v8/upstream/2.3.3/src/property.h +0 -315
  762. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
  763. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
  764. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
  765. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
  766. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
  767. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
  768. data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
  769. data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
  770. data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
  771. data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
  772. data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
  773. data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
  774. data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
  775. data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
  776. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
  777. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
  778. data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
  779. data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
  780. data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
  781. data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
  782. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
  783. data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
  784. data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
  785. data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
  786. data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
  787. data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
  788. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
  789. data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
  790. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
  791. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
  792. data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
  793. data/ext/v8/upstream/2.3.3/src/token.h +0 -270
  794. data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
  795. data/ext/v8/upstream/2.3.3/src/top.h +0 -463
  796. data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
  797. data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
  798. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
  799. data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
  800. data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
  801. data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
  802. data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
  803. data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
  804. data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
  805. data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
  806. data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
  807. data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
  808. data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
  809. data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
  810. data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
  811. data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
  812. data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
  813. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
  814. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
  815. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
  816. data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
  817. data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
  818. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
  819. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
  820. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
  821. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
  822. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
  823. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
  824. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
  825. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
  826. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
  827. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
  828. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
  829. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
  830. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
  831. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
  832. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
  833. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
  834. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
  835. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
  836. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
  837. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
  838. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
  839. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
  840. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
  841. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
  842. data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
  843. data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
  844. data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
  845. data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
  846. data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
  847. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
  848. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
  849. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
  850. data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
  851. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
  852. data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
  853. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
  854. data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
  855. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
  856. data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
  857. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
  858. data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
  859. data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
  860. data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
  861. data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
  862. data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
  863. data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
  864. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
  865. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
  866. data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
  867. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
  868. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
  869. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
  870. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
  871. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
  872. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
  873. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
  874. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
  875. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
  876. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
  877. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,360 +0,0 @@
1
- // Copyright (c) 1994-2006 Sun Microsystems Inc.
2
- // All Rights Reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions are
6
- // met:
7
- //
8
- // - Redistributions of source code must retain the above copyright notice,
9
- // this list of conditions and the following disclaimer.
10
- //
11
- // - Redistribution in binary form must reproduce the above copyright
12
- // notice, this list of conditions and the following disclaimer in the
13
- // documentation and/or other materials provided with the distribution.
14
- //
15
- // - Neither the name of Sun Microsystems or the names of contributors may
16
- // be used to endorse or promote products derived from this software without
17
- // specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20
- // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
- // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
- // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
- // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
- // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
- // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
- // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
- // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
- // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
- // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
-
31
- // The original source code covered by the above license above has been
32
- // modified significantly by Google Inc.
33
- // Copyright 2006-2008 the V8 project authors. All rights reserved.
34
-
35
- // A light-weight IA32 Assembler.
36
-
37
- #ifndef V8_IA32_ASSEMBLER_IA32_INL_H_
38
- #define V8_IA32_ASSEMBLER_IA32_INL_H_
39
-
40
- #include "cpu.h"
41
- #include "debug.h"
42
-
43
- namespace v8 {
44
- namespace internal {
45
-
46
-
47
- // The modes possibly affected by apply must be in kApplyMask.
48
- void RelocInfo::apply(intptr_t delta) {
49
- if (rmode_ == RUNTIME_ENTRY || IsCodeTarget(rmode_)) {
50
- int32_t* p = reinterpret_cast<int32_t*>(pc_);
51
- *p -= delta; // Relocate entry.
52
- } else if (rmode_ == JS_RETURN && IsPatchedReturnSequence()) {
53
- // Special handling of js_return when a break point is set (call
54
- // instruction has been inserted).
55
- int32_t* p = reinterpret_cast<int32_t*>(pc_ + 1);
56
- *p -= delta; // Relocate entry.
57
- } else if (rmode_ == DEBUG_BREAK_SLOT && IsPatchedDebugBreakSlotSequence()) {
58
- // Special handling of a debug break slot when a break point is set (call
59
- // instruction has been inserted).
60
- int32_t* p = reinterpret_cast<int32_t*>(pc_ + 1);
61
- *p -= delta; // Relocate entry.
62
- } else if (IsInternalReference(rmode_)) {
63
- // absolute code pointer inside code object moves with the code object.
64
- int32_t* p = reinterpret_cast<int32_t*>(pc_);
65
- *p += delta; // Relocate entry.
66
- }
67
- }
68
-
69
-
70
- Address RelocInfo::target_address() {
71
- ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
72
- return Assembler::target_address_at(pc_);
73
- }
74
-
75
-
76
- Address RelocInfo::target_address_address() {
77
- ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
78
- return reinterpret_cast<Address>(pc_);
79
- }
80
-
81
-
82
- int RelocInfo::target_address_size() {
83
- return Assembler::kExternalTargetSize;
84
- }
85
-
86
-
87
- void RelocInfo::set_target_address(Address target) {
88
- ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
89
- Assembler::set_target_address_at(pc_, target);
90
- }
91
-
92
-
93
- Object* RelocInfo::target_object() {
94
- ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
95
- return Memory::Object_at(pc_);
96
- }
97
-
98
-
99
- Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
100
- ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
101
- return Memory::Object_Handle_at(pc_);
102
- }
103
-
104
-
105
- Object** RelocInfo::target_object_address() {
106
- ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
107
- return &Memory::Object_at(pc_);
108
- }
109
-
110
-
111
- void RelocInfo::set_target_object(Object* target) {
112
- ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
113
- Memory::Object_at(pc_) = target;
114
- }
115
-
116
-
117
- Address* RelocInfo::target_reference_address() {
118
- ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE);
119
- return reinterpret_cast<Address*>(pc_);
120
- }
121
-
122
-
123
- Address RelocInfo::call_address() {
124
- ASSERT(IsPatchedReturnSequence());
125
- return Assembler::target_address_at(pc_ + 1);
126
- }
127
-
128
-
129
- void RelocInfo::set_call_address(Address target) {
130
- ASSERT(IsPatchedReturnSequence());
131
- Assembler::set_target_address_at(pc_ + 1, target);
132
- }
133
-
134
-
135
- Object* RelocInfo::call_object() {
136
- ASSERT(IsPatchedReturnSequence());
137
- return *call_object_address();
138
- }
139
-
140
-
141
- Object** RelocInfo::call_object_address() {
142
- ASSERT(IsPatchedReturnSequence());
143
- return reinterpret_cast<Object**>(pc_ + 1);
144
- }
145
-
146
-
147
- void RelocInfo::set_call_object(Object* target) {
148
- ASSERT(IsPatchedReturnSequence());
149
- *call_object_address() = target;
150
- }
151
-
152
-
153
- bool RelocInfo::IsPatchedReturnSequence() {
154
- return *pc_ == 0xE8;
155
- }
156
-
157
-
158
- bool RelocInfo::IsPatchedDebugBreakSlotSequence() {
159
- return !Assembler::IsNop(pc());
160
- }
161
-
162
-
163
- void RelocInfo::Visit(ObjectVisitor* visitor) {
164
- RelocInfo::Mode mode = rmode();
165
- if (mode == RelocInfo::EMBEDDED_OBJECT) {
166
- visitor->VisitPointer(target_object_address());
167
- } else if (RelocInfo::IsCodeTarget(mode)) {
168
- visitor->VisitCodeTarget(this);
169
- } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
170
- visitor->VisitExternalReference(target_reference_address());
171
- #ifdef ENABLE_DEBUGGER_SUPPORT
172
- } else if (Debug::has_break_points() &&
173
- ((RelocInfo::IsJSReturn(mode) &&
174
- IsPatchedReturnSequence()) ||
175
- (RelocInfo::IsDebugBreakSlot(mode) &&
176
- IsPatchedDebugBreakSlotSequence()))) {
177
- visitor->VisitDebugTarget(this);
178
- #endif
179
- } else if (mode == RelocInfo::RUNTIME_ENTRY) {
180
- visitor->VisitRuntimeEntry(this);
181
- }
182
- }
183
-
184
-
185
- Immediate::Immediate(int x) {
186
- x_ = x;
187
- rmode_ = RelocInfo::NONE;
188
- }
189
-
190
-
191
- Immediate::Immediate(const ExternalReference& ext) {
192
- x_ = reinterpret_cast<int32_t>(ext.address());
193
- rmode_ = RelocInfo::EXTERNAL_REFERENCE;
194
- }
195
-
196
-
197
- Immediate::Immediate(Label* internal_offset) {
198
- x_ = reinterpret_cast<int32_t>(internal_offset);
199
- rmode_ = RelocInfo::INTERNAL_REFERENCE;
200
- }
201
-
202
-
203
- Immediate::Immediate(Handle<Object> handle) {
204
- // Verify all Objects referred by code are NOT in new space.
205
- Object* obj = *handle;
206
- ASSERT(!Heap::InNewSpace(obj));
207
- if (obj->IsHeapObject()) {
208
- x_ = reinterpret_cast<intptr_t>(handle.location());
209
- rmode_ = RelocInfo::EMBEDDED_OBJECT;
210
- } else {
211
- // no relocation needed
212
- x_ = reinterpret_cast<intptr_t>(obj);
213
- rmode_ = RelocInfo::NONE;
214
- }
215
- }
216
-
217
-
218
- Immediate::Immediate(Smi* value) {
219
- x_ = reinterpret_cast<intptr_t>(value);
220
- rmode_ = RelocInfo::NONE;
221
- }
222
-
223
-
224
- void Assembler::emit(uint32_t x) {
225
- *reinterpret_cast<uint32_t*>(pc_) = x;
226
- pc_ += sizeof(uint32_t);
227
- }
228
-
229
-
230
- void Assembler::emit(Handle<Object> handle) {
231
- // Verify all Objects referred by code are NOT in new space.
232
- Object* obj = *handle;
233
- ASSERT(!Heap::InNewSpace(obj));
234
- if (obj->IsHeapObject()) {
235
- emit(reinterpret_cast<intptr_t>(handle.location()),
236
- RelocInfo::EMBEDDED_OBJECT);
237
- } else {
238
- // no relocation needed
239
- emit(reinterpret_cast<intptr_t>(obj));
240
- }
241
- }
242
-
243
-
244
- void Assembler::emit(uint32_t x, RelocInfo::Mode rmode) {
245
- if (rmode != RelocInfo::NONE) RecordRelocInfo(rmode);
246
- emit(x);
247
- }
248
-
249
-
250
- void Assembler::emit(const Immediate& x) {
251
- if (x.rmode_ == RelocInfo::INTERNAL_REFERENCE) {
252
- Label* label = reinterpret_cast<Label*>(x.x_);
253
- emit_code_relative_offset(label);
254
- return;
255
- }
256
- if (x.rmode_ != RelocInfo::NONE) RecordRelocInfo(x.rmode_);
257
- emit(x.x_);
258
- }
259
-
260
-
261
- void Assembler::emit_code_relative_offset(Label* label) {
262
- if (label->is_bound()) {
263
- int32_t pos;
264
- pos = label->pos() + Code::kHeaderSize - kHeapObjectTag;
265
- emit(pos);
266
- } else {
267
- emit_disp(label, Displacement::CODE_RELATIVE);
268
- }
269
- }
270
-
271
-
272
- void Assembler::emit_w(const Immediate& x) {
273
- ASSERT(x.rmode_ == RelocInfo::NONE);
274
- uint16_t value = static_cast<uint16_t>(x.x_);
275
- reinterpret_cast<uint16_t*>(pc_)[0] = value;
276
- pc_ += sizeof(uint16_t);
277
- }
278
-
279
-
280
- Address Assembler::target_address_at(Address pc) {
281
- return pc + sizeof(int32_t) + *reinterpret_cast<int32_t*>(pc);
282
- }
283
-
284
-
285
- void Assembler::set_target_address_at(Address pc, Address target) {
286
- int32_t* p = reinterpret_cast<int32_t*>(pc);
287
- *p = target - (pc + sizeof(int32_t));
288
- CPU::FlushICache(p, sizeof(int32_t));
289
- }
290
-
291
-
292
- Displacement Assembler::disp_at(Label* L) {
293
- return Displacement(long_at(L->pos()));
294
- }
295
-
296
-
297
- void Assembler::disp_at_put(Label* L, Displacement disp) {
298
- long_at_put(L->pos(), disp.data());
299
- }
300
-
301
-
302
- void Assembler::emit_disp(Label* L, Displacement::Type type) {
303
- Displacement disp(L, type);
304
- L->link_to(pc_offset());
305
- emit(static_cast<int>(disp.data()));
306
- }
307
-
308
-
309
- void Operand::set_modrm(int mod, Register rm) {
310
- ASSERT((mod & -4) == 0);
311
- buf_[0] = mod << 6 | rm.code();
312
- len_ = 1;
313
- }
314
-
315
-
316
- void Operand::set_sib(ScaleFactor scale, Register index, Register base) {
317
- ASSERT(len_ == 1);
318
- ASSERT((scale & -4) == 0);
319
- // Use SIB with no index register only for base esp.
320
- ASSERT(!index.is(esp) || base.is(esp));
321
- buf_[1] = scale << 6 | index.code() << 3 | base.code();
322
- len_ = 2;
323
- }
324
-
325
-
326
- void Operand::set_disp8(int8_t disp) {
327
- ASSERT(len_ == 1 || len_ == 2);
328
- *reinterpret_cast<int8_t*>(&buf_[len_++]) = disp;
329
- }
330
-
331
-
332
- void Operand::set_dispr(int32_t disp, RelocInfo::Mode rmode) {
333
- ASSERT(len_ == 1 || len_ == 2);
334
- int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
335
- *p = disp;
336
- len_ += sizeof(int32_t);
337
- rmode_ = rmode;
338
- }
339
-
340
- Operand::Operand(Register reg) {
341
- // reg
342
- set_modrm(3, reg);
343
- }
344
-
345
-
346
- Operand::Operand(XMMRegister xmm_reg) {
347
- Register reg = { xmm_reg.code() };
348
- set_modrm(3, reg);
349
- }
350
-
351
-
352
- Operand::Operand(int32_t disp, RelocInfo::Mode rmode) {
353
- // [disp/r]
354
- set_modrm(0, ebp);
355
- set_dispr(disp, rmode);
356
- }
357
-
358
- } } // namespace v8::internal
359
-
360
- #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
@@ -1,2600 +0,0 @@
1
- // Copyright (c) 1994-2006 Sun Microsystems Inc.
2
- // All Rights Reserved.
3
- //
4
- // Redistribution and use in source and binary forms, with or without
5
- // modification, are permitted provided that the following conditions
6
- // are met:
7
- //
8
- // - Redistributions of source code must retain the above copyright notice,
9
- // this list of conditions and the following disclaimer.
10
- //
11
- // - Redistribution in binary form must reproduce the above copyright
12
- // notice, this list of conditions and the following disclaimer in the
13
- // documentation and/or other materials provided with the
14
- // distribution.
15
- //
16
- // - Neither the name of Sun Microsystems or the names of contributors may
17
- // be used to endorse or promote products derived from this software without
18
- // specific prior written permission.
19
- //
20
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23
- // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24
- // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25
- // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26
- // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
- // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
- // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29
- // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
- // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31
- // OF THE POSSIBILITY OF SUCH DAMAGE.
32
-
33
- // The original source code covered by the above license above has been modified
34
- // significantly by Google Inc.
35
- // Copyright 2006-2008 the V8 project authors. All rights reserved.
36
-
37
- #include "v8.h"
38
-
39
- #if defined(V8_TARGET_ARCH_IA32)
40
-
41
- #include "disassembler.h"
42
- #include "macro-assembler.h"
43
- #include "serialize.h"
44
-
45
- namespace v8 {
46
- namespace internal {
47
-
48
- // -----------------------------------------------------------------------------
49
- // Implementation of CpuFeatures
50
-
51
- // Safe default is no features.
52
- uint64_t CpuFeatures::supported_ = 0;
53
- uint64_t CpuFeatures::enabled_ = 0;
54
- uint64_t CpuFeatures::found_by_runtime_probing_ = 0;
55
-
56
-
57
- // The Probe method needs executable memory, so it uses Heap::CreateCode.
58
- // Allocation failure is silent and leads to safe default.
59
- void CpuFeatures::Probe() {
60
- ASSERT(Heap::HasBeenSetup());
61
- ASSERT(supported_ == 0);
62
- if (Serializer::enabled()) {
63
- supported_ |= OS::CpuFeaturesImpliedByPlatform();
64
- return; // No features if we might serialize.
65
- }
66
-
67
- Assembler assm(NULL, 0);
68
- Label cpuid, done;
69
- #define __ assm.
70
- // Save old esp, since we are going to modify the stack.
71
- __ push(ebp);
72
- __ pushfd();
73
- __ push(ecx);
74
- __ push(ebx);
75
- __ mov(ebp, Operand(esp));
76
-
77
- // If we can modify bit 21 of the EFLAGS register, then CPUID is supported.
78
- __ pushfd();
79
- __ pop(eax);
80
- __ mov(edx, Operand(eax));
81
- __ xor_(eax, 0x200000); // Flip bit 21.
82
- __ push(eax);
83
- __ popfd();
84
- __ pushfd();
85
- __ pop(eax);
86
- __ xor_(eax, Operand(edx)); // Different if CPUID is supported.
87
- __ j(not_zero, &cpuid);
88
-
89
- // CPUID not supported. Clear the supported features in edx:eax.
90
- __ xor_(eax, Operand(eax));
91
- __ xor_(edx, Operand(edx));
92
- __ jmp(&done);
93
-
94
- // Invoke CPUID with 1 in eax to get feature information in
95
- // ecx:edx. Temporarily enable CPUID support because we know it's
96
- // safe here.
97
- __ bind(&cpuid);
98
- __ mov(eax, 1);
99
- supported_ = (1 << CPUID);
100
- { Scope fscope(CPUID);
101
- __ cpuid();
102
- }
103
- supported_ = 0;
104
-
105
- // Move the result from ecx:edx to edx:eax and make sure to mark the
106
- // CPUID feature as supported.
107
- __ mov(eax, Operand(edx));
108
- __ or_(eax, 1 << CPUID);
109
- __ mov(edx, Operand(ecx));
110
-
111
- // Done.
112
- __ bind(&done);
113
- __ mov(esp, Operand(ebp));
114
- __ pop(ebx);
115
- __ pop(ecx);
116
- __ popfd();
117
- __ pop(ebp);
118
- __ ret(0);
119
- #undef __
120
-
121
- CodeDesc desc;
122
- assm.GetCode(&desc);
123
- Object* code = Heap::CreateCode(desc,
124
- Code::ComputeFlags(Code::STUB),
125
- Handle<Code>::null());
126
- if (!code->IsCode()) return;
127
- PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG,
128
- Code::cast(code), "CpuFeatures::Probe"));
129
- typedef uint64_t (*F0)();
130
- F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry());
131
- supported_ = probe();
132
- found_by_runtime_probing_ = supported_;
133
- uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform();
134
- supported_ |= os_guarantees;
135
- found_by_runtime_probing_ &= ~os_guarantees;
136
- }
137
-
138
-
139
- // -----------------------------------------------------------------------------
140
- // Implementation of Displacement
141
-
142
- void Displacement::init(Label* L, Type type) {
143
- ASSERT(!L->is_bound());
144
- int next = 0;
145
- if (L->is_linked()) {
146
- next = L->pos();
147
- ASSERT(next > 0); // Displacements must be at positions > 0
148
- }
149
- // Ensure that we _never_ overflow the next field.
150
- ASSERT(NextField::is_valid(Assembler::kMaximalBufferSize));
151
- data_ = NextField::encode(next) | TypeField::encode(type);
152
- }
153
-
154
-
155
- // -----------------------------------------------------------------------------
156
- // Implementation of RelocInfo
157
-
158
-
159
- const int RelocInfo::kApplyMask =
160
- RelocInfo::kCodeTargetMask | 1 << RelocInfo::RUNTIME_ENTRY |
161
- 1 << RelocInfo::JS_RETURN | 1 << RelocInfo::INTERNAL_REFERENCE;
162
-
163
-
164
- bool RelocInfo::IsCodedSpecially() {
165
- // The deserializer needs to know whether a pointer is specially coded. Being
166
- // specially coded on IA32 means that it is a relative address, as used by
167
- // branch instructions. These are also the ones that need changing when a
168
- // code object moves.
169
- return (1 << rmode_) & kApplyMask;
170
- }
171
-
172
-
173
- void RelocInfo::PatchCode(byte* instructions, int instruction_count) {
174
- // Patch the code at the current address with the supplied instructions.
175
- for (int i = 0; i < instruction_count; i++) {
176
- *(pc_ + i) = *(instructions + i);
177
- }
178
-
179
- // Indicate that code has changed.
180
- CPU::FlushICache(pc_, instruction_count);
181
- }
182
-
183
-
184
- // Patch the code at the current PC with a call to the target address.
185
- // Additional guard int3 instructions can be added if required.
186
- void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) {
187
- // Call instruction takes up 5 bytes and int3 takes up one byte.
188
- static const int kCallCodeSize = 5;
189
- int code_size = kCallCodeSize + guard_bytes;
190
-
191
- // Create a code patcher.
192
- CodePatcher patcher(pc_, code_size);
193
-
194
- // Add a label for checking the size of the code used for returning.
195
- #ifdef DEBUG
196
- Label check_codesize;
197
- patcher.masm()->bind(&check_codesize);
198
- #endif
199
-
200
- // Patch the code.
201
- patcher.masm()->call(target, RelocInfo::NONE);
202
-
203
- // Check that the size of the code generated is as expected.
204
- ASSERT_EQ(kCallCodeSize,
205
- patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize));
206
-
207
- // Add the requested number of int3 instructions after the call.
208
- ASSERT_GE(guard_bytes, 0);
209
- for (int i = 0; i < guard_bytes; i++) {
210
- patcher.masm()->int3();
211
- }
212
- }
213
-
214
-
215
- // -----------------------------------------------------------------------------
216
- // Implementation of Operand
217
-
218
- Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) {
219
- // [base + disp/r]
220
- if (disp == 0 && rmode == RelocInfo::NONE && !base.is(ebp)) {
221
- // [base]
222
- set_modrm(0, base);
223
- if (base.is(esp)) set_sib(times_1, esp, base);
224
- } else if (is_int8(disp) && rmode == RelocInfo::NONE) {
225
- // [base + disp8]
226
- set_modrm(1, base);
227
- if (base.is(esp)) set_sib(times_1, esp, base);
228
- set_disp8(disp);
229
- } else {
230
- // [base + disp/r]
231
- set_modrm(2, base);
232
- if (base.is(esp)) set_sib(times_1, esp, base);
233
- set_dispr(disp, rmode);
234
- }
235
- }
236
-
237
-
238
- Operand::Operand(Register base,
239
- Register index,
240
- ScaleFactor scale,
241
- int32_t disp,
242
- RelocInfo::Mode rmode) {
243
- ASSERT(!index.is(esp)); // illegal addressing mode
244
- // [base + index*scale + disp/r]
245
- if (disp == 0 && rmode == RelocInfo::NONE && !base.is(ebp)) {
246
- // [base + index*scale]
247
- set_modrm(0, esp);
248
- set_sib(scale, index, base);
249
- } else if (is_int8(disp) && rmode == RelocInfo::NONE) {
250
- // [base + index*scale + disp8]
251
- set_modrm(1, esp);
252
- set_sib(scale, index, base);
253
- set_disp8(disp);
254
- } else {
255
- // [base + index*scale + disp/r]
256
- set_modrm(2, esp);
257
- set_sib(scale, index, base);
258
- set_dispr(disp, rmode);
259
- }
260
- }
261
-
262
-
263
- Operand::Operand(Register index,
264
- ScaleFactor scale,
265
- int32_t disp,
266
- RelocInfo::Mode rmode) {
267
- ASSERT(!index.is(esp)); // illegal addressing mode
268
- // [index*scale + disp/r]
269
- set_modrm(0, esp);
270
- set_sib(scale, index, ebp);
271
- set_dispr(disp, rmode);
272
- }
273
-
274
-
275
- bool Operand::is_reg(Register reg) const {
276
- return ((buf_[0] & 0xF8) == 0xC0) // addressing mode is register only.
277
- && ((buf_[0] & 0x07) == reg.code()); // register codes match.
278
- }
279
-
280
- // -----------------------------------------------------------------------------
281
- // Implementation of Assembler.
282
-
283
- // Emit a single byte. Must always be inlined.
284
- #define EMIT(x) \
285
- *pc_++ = (x)
286
-
287
-
288
- #ifdef GENERATED_CODE_COVERAGE
289
- static void InitCoverageLog();
290
- #endif
291
-
292
- // Spare buffer.
293
- byte* Assembler::spare_buffer_ = NULL;
294
-
295
- Assembler::Assembler(void* buffer, int buffer_size) {
296
- if (buffer == NULL) {
297
- // Do our own buffer management.
298
- if (buffer_size <= kMinimalBufferSize) {
299
- buffer_size = kMinimalBufferSize;
300
-
301
- if (spare_buffer_ != NULL) {
302
- buffer = spare_buffer_;
303
- spare_buffer_ = NULL;
304
- }
305
- }
306
- if (buffer == NULL) {
307
- buffer_ = NewArray<byte>(buffer_size);
308
- } else {
309
- buffer_ = static_cast<byte*>(buffer);
310
- }
311
- buffer_size_ = buffer_size;
312
- own_buffer_ = true;
313
- } else {
314
- // Use externally provided buffer instead.
315
- ASSERT(buffer_size > 0);
316
- buffer_ = static_cast<byte*>(buffer);
317
- buffer_size_ = buffer_size;
318
- own_buffer_ = false;
319
- }
320
-
321
- // Clear the buffer in debug mode unless it was provided by the
322
- // caller in which case we can't be sure it's okay to overwrite
323
- // existing code in it; see CodePatcher::CodePatcher(...).
324
- #ifdef DEBUG
325
- if (own_buffer_) {
326
- memset(buffer_, 0xCC, buffer_size); // int3
327
- }
328
- #endif
329
-
330
- // Setup buffer pointers.
331
- ASSERT(buffer_ != NULL);
332
- pc_ = buffer_;
333
- reloc_info_writer.Reposition(buffer_ + buffer_size, pc_);
334
-
335
- last_pc_ = NULL;
336
- current_statement_position_ = RelocInfo::kNoPosition;
337
- current_position_ = RelocInfo::kNoPosition;
338
- written_statement_position_ = current_statement_position_;
339
- written_position_ = current_position_;
340
- #ifdef GENERATED_CODE_COVERAGE
341
- InitCoverageLog();
342
- #endif
343
- }
344
-
345
-
346
- Assembler::~Assembler() {
347
- if (own_buffer_) {
348
- if (spare_buffer_ == NULL && buffer_size_ == kMinimalBufferSize) {
349
- spare_buffer_ = buffer_;
350
- } else {
351
- DeleteArray(buffer_);
352
- }
353
- }
354
- }
355
-
356
-
357
- void Assembler::GetCode(CodeDesc* desc) {
358
- // Finalize code (at this point overflow() may be true, but the gap ensures
359
- // that we are still not overlapping instructions and relocation info).
360
- ASSERT(pc_ <= reloc_info_writer.pos()); // No overlap.
361
- // Setup code descriptor.
362
- desc->buffer = buffer_;
363
- desc->buffer_size = buffer_size_;
364
- desc->instr_size = pc_offset();
365
- desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
366
- desc->origin = this;
367
-
368
- Counters::reloc_info_size.Increment(desc->reloc_size);
369
- }
370
-
371
-
372
- void Assembler::Align(int m) {
373
- ASSERT(IsPowerOf2(m));
374
- while ((pc_offset() & (m - 1)) != 0) {
375
- nop();
376
- }
377
- }
378
-
379
-
380
- void Assembler::CodeTargetAlign() {
381
- Align(16); // Preferred alignment of jump targets on ia32.
382
- }
383
-
384
-
385
- void Assembler::cpuid() {
386
- ASSERT(CpuFeatures::IsEnabled(CPUID));
387
- EnsureSpace ensure_space(this);
388
- last_pc_ = pc_;
389
- EMIT(0x0F);
390
- EMIT(0xA2);
391
- }
392
-
393
-
394
- void Assembler::pushad() {
395
- EnsureSpace ensure_space(this);
396
- last_pc_ = pc_;
397
- EMIT(0x60);
398
- }
399
-
400
-
401
- void Assembler::popad() {
402
- EnsureSpace ensure_space(this);
403
- last_pc_ = pc_;
404
- EMIT(0x61);
405
- }
406
-
407
-
408
- void Assembler::pushfd() {
409
- EnsureSpace ensure_space(this);
410
- last_pc_ = pc_;
411
- EMIT(0x9C);
412
- }
413
-
414
-
415
- void Assembler::popfd() {
416
- EnsureSpace ensure_space(this);
417
- last_pc_ = pc_;
418
- EMIT(0x9D);
419
- }
420
-
421
-
422
- void Assembler::push(const Immediate& x) {
423
- EnsureSpace ensure_space(this);
424
- last_pc_ = pc_;
425
- if (x.is_int8()) {
426
- EMIT(0x6a);
427
- EMIT(x.x_);
428
- } else {
429
- EMIT(0x68);
430
- emit(x);
431
- }
432
- }
433
-
434
-
435
- void Assembler::push(Register src) {
436
- EnsureSpace ensure_space(this);
437
- last_pc_ = pc_;
438
- EMIT(0x50 | src.code());
439
- }
440
-
441
-
442
- void Assembler::push(const Operand& src) {
443
- EnsureSpace ensure_space(this);
444
- last_pc_ = pc_;
445
- EMIT(0xFF);
446
- emit_operand(esi, src);
447
- }
448
-
449
-
450
- void Assembler::pop(Register dst) {
451
- ASSERT(reloc_info_writer.last_pc() != NULL);
452
- if (FLAG_peephole_optimization && (reloc_info_writer.last_pc() <= last_pc_)) {
453
- // (last_pc_ != NULL) is rolled into the above check.
454
- // If a last_pc_ is set, we need to make sure that there has not been any
455
- // relocation information generated between the last instruction and this
456
- // pop instruction.
457
- byte instr = last_pc_[0];
458
- if ((instr & ~0x7) == 0x50) {
459
- int push_reg_code = instr & 0x7;
460
- if (push_reg_code == dst.code()) {
461
- pc_ = last_pc_;
462
- if (FLAG_print_peephole_optimization) {
463
- PrintF("%d push/pop (same reg) eliminated\n", pc_offset());
464
- }
465
- } else {
466
- // Convert 'push src; pop dst' to 'mov dst, src'.
467
- last_pc_[0] = 0x8b;
468
- Register src = { push_reg_code };
469
- EnsureSpace ensure_space(this);
470
- emit_operand(dst, Operand(src));
471
- if (FLAG_print_peephole_optimization) {
472
- PrintF("%d push/pop (reg->reg) eliminated\n", pc_offset());
473
- }
474
- }
475
- last_pc_ = NULL;
476
- return;
477
- } else if (instr == 0xff) { // push of an operand, convert to a move
478
- byte op1 = last_pc_[1];
479
- // Check if the operation is really a push.
480
- if ((op1 & 0x38) == (6 << 3)) {
481
- op1 = (op1 & ~0x38) | static_cast<byte>(dst.code() << 3);
482
- last_pc_[0] = 0x8b;
483
- last_pc_[1] = op1;
484
- last_pc_ = NULL;
485
- if (FLAG_print_peephole_optimization) {
486
- PrintF("%d push/pop (op->reg) eliminated\n", pc_offset());
487
- }
488
- return;
489
- }
490
- } else if ((instr == 0x89) &&
491
- (last_pc_[1] == 0x04) &&
492
- (last_pc_[2] == 0x24)) {
493
- // 0x71283c 396 890424 mov [esp],eax
494
- // 0x71283f 399 58 pop eax
495
- if (dst.is(eax)) {
496
- // change to
497
- // 0x710fac 216 83c404 add esp,0x4
498
- last_pc_[0] = 0x83;
499
- last_pc_[1] = 0xc4;
500
- last_pc_[2] = 0x04;
501
- last_pc_ = NULL;
502
- if (FLAG_print_peephole_optimization) {
503
- PrintF("%d push/pop (mov-pop) eliminated\n", pc_offset());
504
- }
505
- return;
506
- }
507
- } else if (instr == 0x6a && dst.is(eax)) { // push of immediate 8 bit
508
- byte imm8 = last_pc_[1];
509
- if (imm8 == 0) {
510
- // 6a00 push 0x0
511
- // 58 pop eax
512
- last_pc_[0] = 0x31;
513
- last_pc_[1] = 0xc0;
514
- // change to
515
- // 31c0 xor eax,eax
516
- last_pc_ = NULL;
517
- if (FLAG_print_peephole_optimization) {
518
- PrintF("%d push/pop (imm->reg) eliminated\n", pc_offset());
519
- }
520
- return;
521
- } else {
522
- // 6a00 push 0xXX
523
- // 58 pop eax
524
- last_pc_[0] = 0xb8;
525
- EnsureSpace ensure_space(this);
526
- if ((imm8 & 0x80) != 0) {
527
- EMIT(0xff);
528
- EMIT(0xff);
529
- EMIT(0xff);
530
- // change to
531
- // b8XXffffff mov eax,0xffffffXX
532
- } else {
533
- EMIT(0x00);
534
- EMIT(0x00);
535
- EMIT(0x00);
536
- // change to
537
- // b8XX000000 mov eax,0x000000XX
538
- }
539
- last_pc_ = NULL;
540
- if (FLAG_print_peephole_optimization) {
541
- PrintF("%d push/pop (imm->reg) eliminated\n", pc_offset());
542
- }
543
- return;
544
- }
545
- } else if (instr == 0x68 && dst.is(eax)) { // push of immediate 32 bit
546
- // 68XXXXXXXX push 0xXXXXXXXX
547
- // 58 pop eax
548
- last_pc_[0] = 0xb8;
549
- last_pc_ = NULL;
550
- // change to
551
- // b8XXXXXXXX mov eax,0xXXXXXXXX
552
- if (FLAG_print_peephole_optimization) {
553
- PrintF("%d push/pop (imm->reg) eliminated\n", pc_offset());
554
- }
555
- return;
556
- }
557
-
558
- // Other potential patterns for peephole:
559
- // 0x712716 102 890424 mov [esp], eax
560
- // 0x712719 105 8b1424 mov edx, [esp]
561
- }
562
- EnsureSpace ensure_space(this);
563
- last_pc_ = pc_;
564
- EMIT(0x58 | dst.code());
565
- }
566
-
567
-
568
- void Assembler::pop(const Operand& dst) {
569
- EnsureSpace ensure_space(this);
570
- last_pc_ = pc_;
571
- EMIT(0x8F);
572
- emit_operand(eax, dst);
573
- }
574
-
575
-
576
- void Assembler::enter(const Immediate& size) {
577
- EnsureSpace ensure_space(this);
578
- last_pc_ = pc_;
579
- EMIT(0xC8);
580
- emit_w(size);
581
- EMIT(0);
582
- }
583
-
584
-
585
- void Assembler::leave() {
586
- EnsureSpace ensure_space(this);
587
- last_pc_ = pc_;
588
- EMIT(0xC9);
589
- }
590
-
591
-
592
- void Assembler::mov_b(Register dst, const Operand& src) {
593
- ASSERT(dst.code() < 4);
594
- EnsureSpace ensure_space(this);
595
- last_pc_ = pc_;
596
- EMIT(0x8A);
597
- emit_operand(dst, src);
598
- }
599
-
600
-
601
- void Assembler::mov_b(const Operand& dst, int8_t imm8) {
602
- EnsureSpace ensure_space(this);
603
- last_pc_ = pc_;
604
- EMIT(0xC6);
605
- emit_operand(eax, dst);
606
- EMIT(imm8);
607
- }
608
-
609
-
610
- void Assembler::mov_b(const Operand& dst, Register src) {
611
- ASSERT(src.code() < 4);
612
- EnsureSpace ensure_space(this);
613
- last_pc_ = pc_;
614
- EMIT(0x88);
615
- emit_operand(src, dst);
616
- }
617
-
618
-
619
- void Assembler::mov_w(Register dst, const Operand& src) {
620
- EnsureSpace ensure_space(this);
621
- last_pc_ = pc_;
622
- EMIT(0x66);
623
- EMIT(0x8B);
624
- emit_operand(dst, src);
625
- }
626
-
627
-
628
- void Assembler::mov_w(const Operand& dst, Register src) {
629
- EnsureSpace ensure_space(this);
630
- last_pc_ = pc_;
631
- EMIT(0x66);
632
- EMIT(0x89);
633
- emit_operand(src, dst);
634
- }
635
-
636
-
637
- void Assembler::mov(Register dst, int32_t imm32) {
638
- EnsureSpace ensure_space(this);
639
- last_pc_ = pc_;
640
- EMIT(0xB8 | dst.code());
641
- emit(imm32);
642
- }
643
-
644
-
645
- void Assembler::mov(Register dst, const Immediate& x) {
646
- EnsureSpace ensure_space(this);
647
- last_pc_ = pc_;
648
- EMIT(0xB8 | dst.code());
649
- emit(x);
650
- }
651
-
652
-
653
- void Assembler::mov(Register dst, Handle<Object> handle) {
654
- EnsureSpace ensure_space(this);
655
- last_pc_ = pc_;
656
- EMIT(0xB8 | dst.code());
657
- emit(handle);
658
- }
659
-
660
-
661
- void Assembler::mov(Register dst, const Operand& src) {
662
- EnsureSpace ensure_space(this);
663
- last_pc_ = pc_;
664
- EMIT(0x8B);
665
- emit_operand(dst, src);
666
- }
667
-
668
-
669
- void Assembler::mov(Register dst, Register src) {
670
- EnsureSpace ensure_space(this);
671
- last_pc_ = pc_;
672
- EMIT(0x89);
673
- EMIT(0xC0 | src.code() << 3 | dst.code());
674
- }
675
-
676
-
677
- void Assembler::mov(const Operand& dst, const Immediate& x) {
678
- EnsureSpace ensure_space(this);
679
- last_pc_ = pc_;
680
- EMIT(0xC7);
681
- emit_operand(eax, dst);
682
- emit(x);
683
- }
684
-
685
-
686
- void Assembler::mov(const Operand& dst, Handle<Object> handle) {
687
- EnsureSpace ensure_space(this);
688
- last_pc_ = pc_;
689
- EMIT(0xC7);
690
- emit_operand(eax, dst);
691
- emit(handle);
692
- }
693
-
694
-
695
- void Assembler::mov(const Operand& dst, Register src) {
696
- EnsureSpace ensure_space(this);
697
- last_pc_ = pc_;
698
- EMIT(0x89);
699
- emit_operand(src, dst);
700
- }
701
-
702
-
703
- void Assembler::movsx_b(Register dst, const Operand& src) {
704
- EnsureSpace ensure_space(this);
705
- last_pc_ = pc_;
706
- EMIT(0x0F);
707
- EMIT(0xBE);
708
- emit_operand(dst, src);
709
- }
710
-
711
-
712
- void Assembler::movsx_w(Register dst, const Operand& src) {
713
- EnsureSpace ensure_space(this);
714
- last_pc_ = pc_;
715
- EMIT(0x0F);
716
- EMIT(0xBF);
717
- emit_operand(dst, src);
718
- }
719
-
720
-
721
- void Assembler::movzx_b(Register dst, const Operand& src) {
722
- EnsureSpace ensure_space(this);
723
- last_pc_ = pc_;
724
- EMIT(0x0F);
725
- EMIT(0xB6);
726
- emit_operand(dst, src);
727
- }
728
-
729
-
730
- void Assembler::movzx_w(Register dst, const Operand& src) {
731
- EnsureSpace ensure_space(this);
732
- last_pc_ = pc_;
733
- EMIT(0x0F);
734
- EMIT(0xB7);
735
- emit_operand(dst, src);
736
- }
737
-
738
-
739
- void Assembler::cmov(Condition cc, Register dst, int32_t imm32) {
740
- ASSERT(CpuFeatures::IsEnabled(CMOV));
741
- EnsureSpace ensure_space(this);
742
- last_pc_ = pc_;
743
- UNIMPLEMENTED();
744
- USE(cc);
745
- USE(dst);
746
- USE(imm32);
747
- }
748
-
749
-
750
- void Assembler::cmov(Condition cc, Register dst, Handle<Object> handle) {
751
- ASSERT(CpuFeatures::IsEnabled(CMOV));
752
- EnsureSpace ensure_space(this);
753
- last_pc_ = pc_;
754
- UNIMPLEMENTED();
755
- USE(cc);
756
- USE(dst);
757
- USE(handle);
758
- }
759
-
760
-
761
- void Assembler::cmov(Condition cc, Register dst, const Operand& src) {
762
- ASSERT(CpuFeatures::IsEnabled(CMOV));
763
- EnsureSpace ensure_space(this);
764
- last_pc_ = pc_;
765
- // Opcode: 0f 40 + cc /r.
766
- EMIT(0x0F);
767
- EMIT(0x40 + cc);
768
- emit_operand(dst, src);
769
- }
770
-
771
-
772
- void Assembler::cld() {
773
- EnsureSpace ensure_space(this);
774
- last_pc_ = pc_;
775
- EMIT(0xFC);
776
- }
777
-
778
-
779
- void Assembler::rep_movs() {
780
- EnsureSpace ensure_space(this);
781
- last_pc_ = pc_;
782
- EMIT(0xF3);
783
- EMIT(0xA5);
784
- }
785
-
786
-
787
- void Assembler::rep_stos() {
788
- EnsureSpace ensure_space(this);
789
- last_pc_ = pc_;
790
- EMIT(0xF3);
791
- EMIT(0xAB);
792
- }
793
-
794
-
795
- void Assembler::stos() {
796
- EnsureSpace ensure_space(this);
797
- last_pc_ = pc_;
798
- EMIT(0xAB);
799
- }
800
-
801
-
802
- void Assembler::xchg(Register dst, Register src) {
803
- EnsureSpace ensure_space(this);
804
- last_pc_ = pc_;
805
- if (src.is(eax) || dst.is(eax)) { // Single-byte encoding.
806
- EMIT(0x90 | (src.is(eax) ? dst.code() : src.code()));
807
- } else {
808
- EMIT(0x87);
809
- EMIT(0xC0 | src.code() << 3 | dst.code());
810
- }
811
- }
812
-
813
-
814
- void Assembler::adc(Register dst, int32_t imm32) {
815
- EnsureSpace ensure_space(this);
816
- last_pc_ = pc_;
817
- emit_arith(2, Operand(dst), Immediate(imm32));
818
- }
819
-
820
-
821
- void Assembler::adc(Register dst, const Operand& src) {
822
- EnsureSpace ensure_space(this);
823
- last_pc_ = pc_;
824
- EMIT(0x13);
825
- emit_operand(dst, src);
826
- }
827
-
828
-
829
- void Assembler::add(Register dst, const Operand& src) {
830
- EnsureSpace ensure_space(this);
831
- last_pc_ = pc_;
832
- EMIT(0x03);
833
- emit_operand(dst, src);
834
- }
835
-
836
-
837
- void Assembler::add(const Operand& dst, const Immediate& x) {
838
- ASSERT(reloc_info_writer.last_pc() != NULL);
839
- if (FLAG_peephole_optimization && (reloc_info_writer.last_pc() <= last_pc_)) {
840
- byte instr = last_pc_[0];
841
- if ((instr & 0xf8) == 0x50) {
842
- // Last instruction was a push. Check whether this is a pop without a
843
- // result.
844
- if ((dst.is_reg(esp)) &&
845
- (x.x_ == kPointerSize) && (x.rmode_ == RelocInfo::NONE)) {
846
- pc_ = last_pc_;
847
- last_pc_ = NULL;
848
- if (FLAG_print_peephole_optimization) {
849
- PrintF("%d push/pop(noreg) eliminated\n", pc_offset());
850
- }
851
- return;
852
- }
853
- }
854
- }
855
- EnsureSpace ensure_space(this);
856
- last_pc_ = pc_;
857
- emit_arith(0, dst, x);
858
- }
859
-
860
-
861
- void Assembler::and_(Register dst, int32_t imm32) {
862
- EnsureSpace ensure_space(this);
863
- last_pc_ = pc_;
864
- emit_arith(4, Operand(dst), Immediate(imm32));
865
- }
866
-
867
-
868
- void Assembler::and_(Register dst, const Operand& src) {
869
- EnsureSpace ensure_space(this);
870
- last_pc_ = pc_;
871
- EMIT(0x23);
872
- emit_operand(dst, src);
873
- }
874
-
875
-
876
- void Assembler::and_(const Operand& dst, const Immediate& x) {
877
- EnsureSpace ensure_space(this);
878
- last_pc_ = pc_;
879
- emit_arith(4, dst, x);
880
- }
881
-
882
-
883
- void Assembler::and_(const Operand& dst, Register src) {
884
- EnsureSpace ensure_space(this);
885
- last_pc_ = pc_;
886
- EMIT(0x21);
887
- emit_operand(src, dst);
888
- }
889
-
890
-
891
- void Assembler::cmpb(const Operand& op, int8_t imm8) {
892
- EnsureSpace ensure_space(this);
893
- last_pc_ = pc_;
894
- EMIT(0x80);
895
- emit_operand(edi, op); // edi == 7
896
- EMIT(imm8);
897
- }
898
-
899
-
900
- void Assembler::cmpb(const Operand& dst, Register src) {
901
- ASSERT(src.is_byte_register());
902
- EnsureSpace ensure_space(this);
903
- last_pc_ = pc_;
904
- EMIT(0x38);
905
- emit_operand(src, dst);
906
- }
907
-
908
-
909
- void Assembler::cmpb(Register dst, const Operand& src) {
910
- ASSERT(dst.is_byte_register());
911
- EnsureSpace ensure_space(this);
912
- last_pc_ = pc_;
913
- EMIT(0x3A);
914
- emit_operand(dst, src);
915
- }
916
-
917
-
918
- void Assembler::cmpw(const Operand& op, Immediate imm16) {
919
- ASSERT(imm16.is_int16());
920
- EnsureSpace ensure_space(this);
921
- last_pc_ = pc_;
922
- EMIT(0x66);
923
- EMIT(0x81);
924
- emit_operand(edi, op);
925
- emit_w(imm16);
926
- }
927
-
928
-
929
- void Assembler::cmp(Register reg, int32_t imm32) {
930
- EnsureSpace ensure_space(this);
931
- last_pc_ = pc_;
932
- emit_arith(7, Operand(reg), Immediate(imm32));
933
- }
934
-
935
-
936
- void Assembler::cmp(Register reg, Handle<Object> handle) {
937
- EnsureSpace ensure_space(this);
938
- last_pc_ = pc_;
939
- emit_arith(7, Operand(reg), Immediate(handle));
940
- }
941
-
942
-
943
- void Assembler::cmp(Register reg, const Operand& op) {
944
- EnsureSpace ensure_space(this);
945
- last_pc_ = pc_;
946
- EMIT(0x3B);
947
- emit_operand(reg, op);
948
- }
949
-
950
-
951
- void Assembler::cmp(const Operand& op, const Immediate& imm) {
952
- EnsureSpace ensure_space(this);
953
- last_pc_ = pc_;
954
- emit_arith(7, op, imm);
955
- }
956
-
957
-
958
- void Assembler::cmp(const Operand& op, Handle<Object> handle) {
959
- EnsureSpace ensure_space(this);
960
- last_pc_ = pc_;
961
- emit_arith(7, op, Immediate(handle));
962
- }
963
-
964
-
965
- void Assembler::cmpb_al(const Operand& op) {
966
- EnsureSpace ensure_space(this);
967
- last_pc_ = pc_;
968
- EMIT(0x38); // CMP r/m8, r8
969
- emit_operand(eax, op); // eax has same code as register al.
970
- }
971
-
972
-
973
- void Assembler::cmpw_ax(const Operand& op) {
974
- EnsureSpace ensure_space(this);
975
- last_pc_ = pc_;
976
- EMIT(0x66);
977
- EMIT(0x39); // CMP r/m16, r16
978
- emit_operand(eax, op); // eax has same code as register ax.
979
- }
980
-
981
-
982
- void Assembler::dec_b(Register dst) {
983
- EnsureSpace ensure_space(this);
984
- last_pc_ = pc_;
985
- EMIT(0xFE);
986
- EMIT(0xC8 | dst.code());
987
- }
988
-
989
-
990
- void Assembler::dec(Register dst) {
991
- EnsureSpace ensure_space(this);
992
- last_pc_ = pc_;
993
- EMIT(0x48 | dst.code());
994
- }
995
-
996
-
997
- void Assembler::dec(const Operand& dst) {
998
- EnsureSpace ensure_space(this);
999
- last_pc_ = pc_;
1000
- EMIT(0xFF);
1001
- emit_operand(ecx, dst);
1002
- }
1003
-
1004
-
1005
- void Assembler::cdq() {
1006
- EnsureSpace ensure_space(this);
1007
- last_pc_ = pc_;
1008
- EMIT(0x99);
1009
- }
1010
-
1011
-
1012
- void Assembler::idiv(Register src) {
1013
- EnsureSpace ensure_space(this);
1014
- last_pc_ = pc_;
1015
- EMIT(0xF7);
1016
- EMIT(0xF8 | src.code());
1017
- }
1018
-
1019
-
1020
- void Assembler::imul(Register reg) {
1021
- EnsureSpace ensure_space(this);
1022
- last_pc_ = pc_;
1023
- EMIT(0xF7);
1024
- EMIT(0xE8 | reg.code());
1025
- }
1026
-
1027
-
1028
- void Assembler::imul(Register dst, const Operand& src) {
1029
- EnsureSpace ensure_space(this);
1030
- last_pc_ = pc_;
1031
- EMIT(0x0F);
1032
- EMIT(0xAF);
1033
- emit_operand(dst, src);
1034
- }
1035
-
1036
-
1037
- void Assembler::imul(Register dst, Register src, int32_t imm32) {
1038
- EnsureSpace ensure_space(this);
1039
- last_pc_ = pc_;
1040
- if (is_int8(imm32)) {
1041
- EMIT(0x6B);
1042
- EMIT(0xC0 | dst.code() << 3 | src.code());
1043
- EMIT(imm32);
1044
- } else {
1045
- EMIT(0x69);
1046
- EMIT(0xC0 | dst.code() << 3 | src.code());
1047
- emit(imm32);
1048
- }
1049
- }
1050
-
1051
-
1052
- void Assembler::inc(Register dst) {
1053
- EnsureSpace ensure_space(this);
1054
- last_pc_ = pc_;
1055
- EMIT(0x40 | dst.code());
1056
- }
1057
-
1058
-
1059
- void Assembler::inc(const Operand& dst) {
1060
- EnsureSpace ensure_space(this);
1061
- last_pc_ = pc_;
1062
- EMIT(0xFF);
1063
- emit_operand(eax, dst);
1064
- }
1065
-
1066
-
1067
- void Assembler::lea(Register dst, const Operand& src) {
1068
- EnsureSpace ensure_space(this);
1069
- last_pc_ = pc_;
1070
- EMIT(0x8D);
1071
- emit_operand(dst, src);
1072
- }
1073
-
1074
-
1075
- void Assembler::mul(Register src) {
1076
- EnsureSpace ensure_space(this);
1077
- last_pc_ = pc_;
1078
- EMIT(0xF7);
1079
- EMIT(0xE0 | src.code());
1080
- }
1081
-
1082
-
1083
- void Assembler::neg(Register dst) {
1084
- EnsureSpace ensure_space(this);
1085
- last_pc_ = pc_;
1086
- EMIT(0xF7);
1087
- EMIT(0xD8 | dst.code());
1088
- }
1089
-
1090
-
1091
- void Assembler::not_(Register dst) {
1092
- EnsureSpace ensure_space(this);
1093
- last_pc_ = pc_;
1094
- EMIT(0xF7);
1095
- EMIT(0xD0 | dst.code());
1096
- }
1097
-
1098
-
1099
- void Assembler::or_(Register dst, int32_t imm32) {
1100
- EnsureSpace ensure_space(this);
1101
- last_pc_ = pc_;
1102
- emit_arith(1, Operand(dst), Immediate(imm32));
1103
- }
1104
-
1105
-
1106
- void Assembler::or_(Register dst, const Operand& src) {
1107
- EnsureSpace ensure_space(this);
1108
- last_pc_ = pc_;
1109
- EMIT(0x0B);
1110
- emit_operand(dst, src);
1111
- }
1112
-
1113
-
1114
- void Assembler::or_(const Operand& dst, const Immediate& x) {
1115
- EnsureSpace ensure_space(this);
1116
- last_pc_ = pc_;
1117
- emit_arith(1, dst, x);
1118
- }
1119
-
1120
-
1121
- void Assembler::or_(const Operand& dst, Register src) {
1122
- EnsureSpace ensure_space(this);
1123
- last_pc_ = pc_;
1124
- EMIT(0x09);
1125
- emit_operand(src, dst);
1126
- }
1127
-
1128
-
1129
- void Assembler::rcl(Register dst, uint8_t imm8) {
1130
- EnsureSpace ensure_space(this);
1131
- last_pc_ = pc_;
1132
- ASSERT(is_uint5(imm8)); // illegal shift count
1133
- if (imm8 == 1) {
1134
- EMIT(0xD1);
1135
- EMIT(0xD0 | dst.code());
1136
- } else {
1137
- EMIT(0xC1);
1138
- EMIT(0xD0 | dst.code());
1139
- EMIT(imm8);
1140
- }
1141
- }
1142
-
1143
-
1144
- void Assembler::sar(Register dst, uint8_t imm8) {
1145
- EnsureSpace ensure_space(this);
1146
- last_pc_ = pc_;
1147
- ASSERT(is_uint5(imm8)); // illegal shift count
1148
- if (imm8 == 1) {
1149
- EMIT(0xD1);
1150
- EMIT(0xF8 | dst.code());
1151
- } else {
1152
- EMIT(0xC1);
1153
- EMIT(0xF8 | dst.code());
1154
- EMIT(imm8);
1155
- }
1156
- }
1157
-
1158
-
1159
- void Assembler::sar_cl(Register dst) {
1160
- EnsureSpace ensure_space(this);
1161
- last_pc_ = pc_;
1162
- EMIT(0xD3);
1163
- EMIT(0xF8 | dst.code());
1164
- }
1165
-
1166
-
1167
- void Assembler::sbb(Register dst, const Operand& src) {
1168
- EnsureSpace ensure_space(this);
1169
- last_pc_ = pc_;
1170
- EMIT(0x1B);
1171
- emit_operand(dst, src);
1172
- }
1173
-
1174
-
1175
- void Assembler::shld(Register dst, const Operand& src) {
1176
- EnsureSpace ensure_space(this);
1177
- last_pc_ = pc_;
1178
- EMIT(0x0F);
1179
- EMIT(0xA5);
1180
- emit_operand(dst, src);
1181
- }
1182
-
1183
-
1184
- void Assembler::shl(Register dst, uint8_t imm8) {
1185
- EnsureSpace ensure_space(this);
1186
- last_pc_ = pc_;
1187
- ASSERT(is_uint5(imm8)); // illegal shift count
1188
- if (imm8 == 1) {
1189
- EMIT(0xD1);
1190
- EMIT(0xE0 | dst.code());
1191
- } else {
1192
- EMIT(0xC1);
1193
- EMIT(0xE0 | dst.code());
1194
- EMIT(imm8);
1195
- }
1196
- }
1197
-
1198
-
1199
- void Assembler::shl_cl(Register dst) {
1200
- EnsureSpace ensure_space(this);
1201
- last_pc_ = pc_;
1202
- EMIT(0xD3);
1203
- EMIT(0xE0 | dst.code());
1204
- }
1205
-
1206
-
1207
- void Assembler::shrd(Register dst, const Operand& src) {
1208
- EnsureSpace ensure_space(this);
1209
- last_pc_ = pc_;
1210
- EMIT(0x0F);
1211
- EMIT(0xAD);
1212
- emit_operand(dst, src);
1213
- }
1214
-
1215
-
1216
- void Assembler::shr(Register dst, uint8_t imm8) {
1217
- EnsureSpace ensure_space(this);
1218
- last_pc_ = pc_;
1219
- ASSERT(is_uint5(imm8)); // illegal shift count
1220
- if (imm8 == 1) {
1221
- EMIT(0xD1);
1222
- EMIT(0xE8 | dst.code());
1223
- } else {
1224
- EMIT(0xC1);
1225
- EMIT(0xE8 | dst.code());
1226
- EMIT(imm8);
1227
- }
1228
- }
1229
-
1230
-
1231
- void Assembler::shr_cl(Register dst) {
1232
- EnsureSpace ensure_space(this);
1233
- last_pc_ = pc_;
1234
- EMIT(0xD3);
1235
- EMIT(0xE8 | dst.code());
1236
- }
1237
-
1238
-
1239
- void Assembler::subb(const Operand& op, int8_t imm8) {
1240
- EnsureSpace ensure_space(this);
1241
- last_pc_ = pc_;
1242
- if (op.is_reg(eax)) {
1243
- EMIT(0x2c);
1244
- } else {
1245
- EMIT(0x80);
1246
- emit_operand(ebp, op); // ebp == 5
1247
- }
1248
- EMIT(imm8);
1249
- }
1250
-
1251
-
1252
- void Assembler::sub(const Operand& dst, const Immediate& x) {
1253
- EnsureSpace ensure_space(this);
1254
- last_pc_ = pc_;
1255
- emit_arith(5, dst, x);
1256
- }
1257
-
1258
-
1259
- void Assembler::sub(Register dst, const Operand& src) {
1260
- EnsureSpace ensure_space(this);
1261
- last_pc_ = pc_;
1262
- EMIT(0x2B);
1263
- emit_operand(dst, src);
1264
- }
1265
-
1266
-
1267
- void Assembler::subb(Register dst, const Operand& src) {
1268
- ASSERT(dst.code() < 4);
1269
- EnsureSpace ensure_space(this);
1270
- last_pc_ = pc_;
1271
- EMIT(0x2A);
1272
- emit_operand(dst, src);
1273
- }
1274
-
1275
-
1276
- void Assembler::sub(const Operand& dst, Register src) {
1277
- EnsureSpace ensure_space(this);
1278
- last_pc_ = pc_;
1279
- EMIT(0x29);
1280
- emit_operand(src, dst);
1281
- }
1282
-
1283
-
1284
- void Assembler::test(Register reg, const Immediate& imm) {
1285
- EnsureSpace ensure_space(this);
1286
- last_pc_ = pc_;
1287
- // Only use test against byte for registers that have a byte
1288
- // variant: eax, ebx, ecx, and edx.
1289
- if (imm.rmode_ == RelocInfo::NONE && is_uint8(imm.x_) && reg.code() < 4) {
1290
- uint8_t imm8 = imm.x_;
1291
- if (reg.is(eax)) {
1292
- EMIT(0xA8);
1293
- EMIT(imm8);
1294
- } else {
1295
- emit_arith_b(0xF6, 0xC0, reg, imm8);
1296
- }
1297
- } else {
1298
- // This is not using emit_arith because test doesn't support
1299
- // sign-extension of 8-bit operands.
1300
- if (reg.is(eax)) {
1301
- EMIT(0xA9);
1302
- } else {
1303
- EMIT(0xF7);
1304
- EMIT(0xC0 | reg.code());
1305
- }
1306
- emit(imm);
1307
- }
1308
- }
1309
-
1310
-
1311
- void Assembler::test(Register reg, const Operand& op) {
1312
- EnsureSpace ensure_space(this);
1313
- last_pc_ = pc_;
1314
- EMIT(0x85);
1315
- emit_operand(reg, op);
1316
- }
1317
-
1318
-
1319
- void Assembler::test_b(Register reg, const Operand& op) {
1320
- EnsureSpace ensure_space(this);
1321
- last_pc_ = pc_;
1322
- EMIT(0x84);
1323
- emit_operand(reg, op);
1324
- }
1325
-
1326
-
1327
- void Assembler::test(const Operand& op, const Immediate& imm) {
1328
- EnsureSpace ensure_space(this);
1329
- last_pc_ = pc_;
1330
- EMIT(0xF7);
1331
- emit_operand(eax, op);
1332
- emit(imm);
1333
- }
1334
-
1335
-
1336
- void Assembler::test_b(const Operand& op, uint8_t imm8) {
1337
- EnsureSpace ensure_space(this);
1338
- last_pc_ = pc_;
1339
- EMIT(0xF6);
1340
- emit_operand(eax, op);
1341
- EMIT(imm8);
1342
- }
1343
-
1344
-
1345
- void Assembler::xor_(Register dst, int32_t imm32) {
1346
- EnsureSpace ensure_space(this);
1347
- last_pc_ = pc_;
1348
- emit_arith(6, Operand(dst), Immediate(imm32));
1349
- }
1350
-
1351
-
1352
- void Assembler::xor_(Register dst, const Operand& src) {
1353
- EnsureSpace ensure_space(this);
1354
- last_pc_ = pc_;
1355
- EMIT(0x33);
1356
- emit_operand(dst, src);
1357
- }
1358
-
1359
-
1360
- void Assembler::xor_(const Operand& src, Register dst) {
1361
- EnsureSpace ensure_space(this);
1362
- last_pc_ = pc_;
1363
- EMIT(0x31);
1364
- emit_operand(dst, src);
1365
- }
1366
-
1367
-
1368
- void Assembler::xor_(const Operand& dst, const Immediate& x) {
1369
- EnsureSpace ensure_space(this);
1370
- last_pc_ = pc_;
1371
- emit_arith(6, dst, x);
1372
- }
1373
-
1374
-
1375
- void Assembler::bt(const Operand& dst, Register src) {
1376
- EnsureSpace ensure_space(this);
1377
- last_pc_ = pc_;
1378
- EMIT(0x0F);
1379
- EMIT(0xA3);
1380
- emit_operand(src, dst);
1381
- }
1382
-
1383
-
1384
- void Assembler::bts(const Operand& dst, Register src) {
1385
- EnsureSpace ensure_space(this);
1386
- last_pc_ = pc_;
1387
- EMIT(0x0F);
1388
- EMIT(0xAB);
1389
- emit_operand(src, dst);
1390
- }
1391
-
1392
-
1393
- void Assembler::hlt() {
1394
- EnsureSpace ensure_space(this);
1395
- last_pc_ = pc_;
1396
- EMIT(0xF4);
1397
- }
1398
-
1399
-
1400
- void Assembler::int3() {
1401
- EnsureSpace ensure_space(this);
1402
- last_pc_ = pc_;
1403
- EMIT(0xCC);
1404
- }
1405
-
1406
-
1407
- void Assembler::nop() {
1408
- EnsureSpace ensure_space(this);
1409
- last_pc_ = pc_;
1410
- EMIT(0x90);
1411
- }
1412
-
1413
-
1414
- void Assembler::rdtsc() {
1415
- ASSERT(CpuFeatures::IsEnabled(RDTSC));
1416
- EnsureSpace ensure_space(this);
1417
- last_pc_ = pc_;
1418
- EMIT(0x0F);
1419
- EMIT(0x31);
1420
- }
1421
-
1422
-
1423
- void Assembler::ret(int imm16) {
1424
- EnsureSpace ensure_space(this);
1425
- last_pc_ = pc_;
1426
- ASSERT(is_uint16(imm16));
1427
- if (imm16 == 0) {
1428
- EMIT(0xC3);
1429
- } else {
1430
- EMIT(0xC2);
1431
- EMIT(imm16 & 0xFF);
1432
- EMIT((imm16 >> 8) & 0xFF);
1433
- }
1434
- }
1435
-
1436
-
1437
- // Labels refer to positions in the (to be) generated code.
1438
- // There are bound, linked, and unused labels.
1439
- //
1440
- // Bound labels refer to known positions in the already
1441
- // generated code. pos() is the position the label refers to.
1442
- //
1443
- // Linked labels refer to unknown positions in the code
1444
- // to be generated; pos() is the position of the 32bit
1445
- // Displacement of the last instruction using the label.
1446
-
1447
-
1448
- void Assembler::print(Label* L) {
1449
- if (L->is_unused()) {
1450
- PrintF("unused label\n");
1451
- } else if (L->is_bound()) {
1452
- PrintF("bound label to %d\n", L->pos());
1453
- } else if (L->is_linked()) {
1454
- Label l = *L;
1455
- PrintF("unbound label");
1456
- while (l.is_linked()) {
1457
- Displacement disp = disp_at(&l);
1458
- PrintF("@ %d ", l.pos());
1459
- disp.print();
1460
- PrintF("\n");
1461
- disp.next(&l);
1462
- }
1463
- } else {
1464
- PrintF("label in inconsistent state (pos = %d)\n", L->pos_);
1465
- }
1466
- }
1467
-
1468
-
1469
- void Assembler::bind_to(Label* L, int pos) {
1470
- EnsureSpace ensure_space(this);
1471
- last_pc_ = NULL;
1472
- ASSERT(0 <= pos && pos <= pc_offset()); // must have a valid binding position
1473
- while (L->is_linked()) {
1474
- Displacement disp = disp_at(L);
1475
- int fixup_pos = L->pos();
1476
- if (disp.type() == Displacement::CODE_RELATIVE) {
1477
- // Relative to Code* heap object pointer.
1478
- long_at_put(fixup_pos, pos + Code::kHeaderSize - kHeapObjectTag);
1479
- } else {
1480
- if (disp.type() == Displacement::UNCONDITIONAL_JUMP) {
1481
- ASSERT(byte_at(fixup_pos - 1) == 0xE9); // jmp expected
1482
- }
1483
- // Relative address, relative to point after address.
1484
- int imm32 = pos - (fixup_pos + sizeof(int32_t));
1485
- long_at_put(fixup_pos, imm32);
1486
- }
1487
- disp.next(L);
1488
- }
1489
- L->bind_to(pos);
1490
- }
1491
-
1492
-
1493
- void Assembler::link_to(Label* L, Label* appendix) {
1494
- EnsureSpace ensure_space(this);
1495
- last_pc_ = NULL;
1496
- if (appendix->is_linked()) {
1497
- if (L->is_linked()) {
1498
- // Append appendix to L's list.
1499
- Label p;
1500
- Label q = *L;
1501
- do {
1502
- p = q;
1503
- Displacement disp = disp_at(&q);
1504
- disp.next(&q);
1505
- } while (q.is_linked());
1506
- Displacement disp = disp_at(&p);
1507
- disp.link_to(appendix);
1508
- disp_at_put(&p, disp);
1509
- p.Unuse(); // to avoid assertion failure in ~Label
1510
- } else {
1511
- // L is empty, simply use appendix.
1512
- *L = *appendix;
1513
- }
1514
- }
1515
- appendix->Unuse(); // appendix should not be used anymore
1516
- }
1517
-
1518
-
1519
- void Assembler::bind(Label* L) {
1520
- EnsureSpace ensure_space(this);
1521
- last_pc_ = NULL;
1522
- ASSERT(!L->is_bound()); // label can only be bound once
1523
- bind_to(L, pc_offset());
1524
- }
1525
-
1526
-
1527
- void Assembler::call(Label* L) {
1528
- EnsureSpace ensure_space(this);
1529
- last_pc_ = pc_;
1530
- if (L->is_bound()) {
1531
- const int long_size = 5;
1532
- int offs = L->pos() - pc_offset();
1533
- ASSERT(offs <= 0);
1534
- // 1110 1000 #32-bit disp.
1535
- EMIT(0xE8);
1536
- emit(offs - long_size);
1537
- } else {
1538
- // 1110 1000 #32-bit disp.
1539
- EMIT(0xE8);
1540
- emit_disp(L, Displacement::OTHER);
1541
- }
1542
- }
1543
-
1544
-
1545
- void Assembler::call(byte* entry, RelocInfo::Mode rmode) {
1546
- EnsureSpace ensure_space(this);
1547
- last_pc_ = pc_;
1548
- ASSERT(!RelocInfo::IsCodeTarget(rmode));
1549
- EMIT(0xE8);
1550
- emit(entry - (pc_ + sizeof(int32_t)), rmode);
1551
- }
1552
-
1553
-
1554
- void Assembler::call(const Operand& adr) {
1555
- EnsureSpace ensure_space(this);
1556
- last_pc_ = pc_;
1557
- EMIT(0xFF);
1558
- emit_operand(edx, adr);
1559
- }
1560
-
1561
-
1562
- void Assembler::call(Handle<Code> code, RelocInfo::Mode rmode) {
1563
- WriteRecordedPositions();
1564
- EnsureSpace ensure_space(this);
1565
- last_pc_ = pc_;
1566
- ASSERT(RelocInfo::IsCodeTarget(rmode));
1567
- EMIT(0xE8);
1568
- emit(reinterpret_cast<intptr_t>(code.location()), rmode);
1569
- }
1570
-
1571
-
1572
- void Assembler::jmp(Label* L) {
1573
- EnsureSpace ensure_space(this);
1574
- last_pc_ = pc_;
1575
- if (L->is_bound()) {
1576
- const int short_size = 2;
1577
- const int long_size = 5;
1578
- int offs = L->pos() - pc_offset();
1579
- ASSERT(offs <= 0);
1580
- if (is_int8(offs - short_size)) {
1581
- // 1110 1011 #8-bit disp.
1582
- EMIT(0xEB);
1583
- EMIT((offs - short_size) & 0xFF);
1584
- } else {
1585
- // 1110 1001 #32-bit disp.
1586
- EMIT(0xE9);
1587
- emit(offs - long_size);
1588
- }
1589
- } else {
1590
- // 1110 1001 #32-bit disp.
1591
- EMIT(0xE9);
1592
- emit_disp(L, Displacement::UNCONDITIONAL_JUMP);
1593
- }
1594
- }
1595
-
1596
-
1597
- void Assembler::jmp(byte* entry, RelocInfo::Mode rmode) {
1598
- EnsureSpace ensure_space(this);
1599
- last_pc_ = pc_;
1600
- ASSERT(!RelocInfo::IsCodeTarget(rmode));
1601
- EMIT(0xE9);
1602
- emit(entry - (pc_ + sizeof(int32_t)), rmode);
1603
- }
1604
-
1605
-
1606
- void Assembler::jmp(const Operand& adr) {
1607
- EnsureSpace ensure_space(this);
1608
- last_pc_ = pc_;
1609
- EMIT(0xFF);
1610
- emit_operand(esp, adr);
1611
- }
1612
-
1613
-
1614
- void Assembler::jmp(Handle<Code> code, RelocInfo::Mode rmode) {
1615
- EnsureSpace ensure_space(this);
1616
- last_pc_ = pc_;
1617
- ASSERT(RelocInfo::IsCodeTarget(rmode));
1618
- EMIT(0xE9);
1619
- emit(reinterpret_cast<intptr_t>(code.location()), rmode);
1620
- }
1621
-
1622
-
1623
-
1624
- void Assembler::j(Condition cc, Label* L, Hint hint) {
1625
- EnsureSpace ensure_space(this);
1626
- last_pc_ = pc_;
1627
- ASSERT(0 <= cc && cc < 16);
1628
- if (FLAG_emit_branch_hints && hint != no_hint) EMIT(hint);
1629
- if (L->is_bound()) {
1630
- const int short_size = 2;
1631
- const int long_size = 6;
1632
- int offs = L->pos() - pc_offset();
1633
- ASSERT(offs <= 0);
1634
- if (is_int8(offs - short_size)) {
1635
- // 0111 tttn #8-bit disp
1636
- EMIT(0x70 | cc);
1637
- EMIT((offs - short_size) & 0xFF);
1638
- } else {
1639
- // 0000 1111 1000 tttn #32-bit disp
1640
- EMIT(0x0F);
1641
- EMIT(0x80 | cc);
1642
- emit(offs - long_size);
1643
- }
1644
- } else {
1645
- // 0000 1111 1000 tttn #32-bit disp
1646
- // Note: could eliminate cond. jumps to this jump if condition
1647
- // is the same however, seems to be rather unlikely case.
1648
- EMIT(0x0F);
1649
- EMIT(0x80 | cc);
1650
- emit_disp(L, Displacement::OTHER);
1651
- }
1652
- }
1653
-
1654
-
1655
- void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode, Hint hint) {
1656
- EnsureSpace ensure_space(this);
1657
- last_pc_ = pc_;
1658
- ASSERT((0 <= cc) && (cc < 16));
1659
- if (FLAG_emit_branch_hints && hint != no_hint) EMIT(hint);
1660
- // 0000 1111 1000 tttn #32-bit disp.
1661
- EMIT(0x0F);
1662
- EMIT(0x80 | cc);
1663
- emit(entry - (pc_ + sizeof(int32_t)), rmode);
1664
- }
1665
-
1666
-
1667
- void Assembler::j(Condition cc, Handle<Code> code, Hint hint) {
1668
- EnsureSpace ensure_space(this);
1669
- last_pc_ = pc_;
1670
- if (FLAG_emit_branch_hints && hint != no_hint) EMIT(hint);
1671
- // 0000 1111 1000 tttn #32-bit disp
1672
- EMIT(0x0F);
1673
- EMIT(0x80 | cc);
1674
- emit(reinterpret_cast<intptr_t>(code.location()), RelocInfo::CODE_TARGET);
1675
- }
1676
-
1677
-
1678
- // FPU instructions.
1679
-
1680
- void Assembler::fld(int i) {
1681
- EnsureSpace ensure_space(this);
1682
- last_pc_ = pc_;
1683
- emit_farith(0xD9, 0xC0, i);
1684
- }
1685
-
1686
-
1687
- void Assembler::fstp(int i) {
1688
- EnsureSpace ensure_space(this);
1689
- last_pc_ = pc_;
1690
- emit_farith(0xDD, 0xD8, i);
1691
- }
1692
-
1693
-
1694
- void Assembler::fld1() {
1695
- EnsureSpace ensure_space(this);
1696
- last_pc_ = pc_;
1697
- EMIT(0xD9);
1698
- EMIT(0xE8);
1699
- }
1700
-
1701
-
1702
- void Assembler::fldpi() {
1703
- EnsureSpace ensure_space(this);
1704
- last_pc_ = pc_;
1705
- EMIT(0xD9);
1706
- EMIT(0xEB);
1707
- }
1708
-
1709
-
1710
- void Assembler::fldz() {
1711
- EnsureSpace ensure_space(this);
1712
- last_pc_ = pc_;
1713
- EMIT(0xD9);
1714
- EMIT(0xEE);
1715
- }
1716
-
1717
-
1718
- void Assembler::fld_s(const Operand& adr) {
1719
- EnsureSpace ensure_space(this);
1720
- last_pc_ = pc_;
1721
- EMIT(0xD9);
1722
- emit_operand(eax, adr);
1723
- }
1724
-
1725
-
1726
- void Assembler::fld_d(const Operand& adr) {
1727
- EnsureSpace ensure_space(this);
1728
- last_pc_ = pc_;
1729
- EMIT(0xDD);
1730
- emit_operand(eax, adr);
1731
- }
1732
-
1733
-
1734
- void Assembler::fstp_s(const Operand& adr) {
1735
- EnsureSpace ensure_space(this);
1736
- last_pc_ = pc_;
1737
- EMIT(0xD9);
1738
- emit_operand(ebx, adr);
1739
- }
1740
-
1741
-
1742
- void Assembler::fstp_d(const Operand& adr) {
1743
- EnsureSpace ensure_space(this);
1744
- last_pc_ = pc_;
1745
- EMIT(0xDD);
1746
- emit_operand(ebx, adr);
1747
- }
1748
-
1749
-
1750
- void Assembler::fst_d(const Operand& adr) {
1751
- EnsureSpace ensure_space(this);
1752
- last_pc_ = pc_;
1753
- EMIT(0xDD);
1754
- emit_operand(edx, adr);
1755
- }
1756
-
1757
-
1758
- void Assembler::fild_s(const Operand& adr) {
1759
- EnsureSpace ensure_space(this);
1760
- last_pc_ = pc_;
1761
- EMIT(0xDB);
1762
- emit_operand(eax, adr);
1763
- }
1764
-
1765
-
1766
- void Assembler::fild_d(const Operand& adr) {
1767
- EnsureSpace ensure_space(this);
1768
- last_pc_ = pc_;
1769
- EMIT(0xDF);
1770
- emit_operand(ebp, adr);
1771
- }
1772
-
1773
-
1774
- void Assembler::fistp_s(const Operand& adr) {
1775
- EnsureSpace ensure_space(this);
1776
- last_pc_ = pc_;
1777
- EMIT(0xDB);
1778
- emit_operand(ebx, adr);
1779
- }
1780
-
1781
-
1782
- void Assembler::fisttp_s(const Operand& adr) {
1783
- ASSERT(CpuFeatures::IsEnabled(SSE3));
1784
- EnsureSpace ensure_space(this);
1785
- last_pc_ = pc_;
1786
- EMIT(0xDB);
1787
- emit_operand(ecx, adr);
1788
- }
1789
-
1790
-
1791
- void Assembler::fisttp_d(const Operand& adr) {
1792
- ASSERT(CpuFeatures::IsEnabled(SSE3));
1793
- EnsureSpace ensure_space(this);
1794
- last_pc_ = pc_;
1795
- EMIT(0xDD);
1796
- emit_operand(ecx, adr);
1797
- }
1798
-
1799
-
1800
- void Assembler::fist_s(const Operand& adr) {
1801
- EnsureSpace ensure_space(this);
1802
- last_pc_ = pc_;
1803
- EMIT(0xDB);
1804
- emit_operand(edx, adr);
1805
- }
1806
-
1807
-
1808
- void Assembler::fistp_d(const Operand& adr) {
1809
- EnsureSpace ensure_space(this);
1810
- last_pc_ = pc_;
1811
- EMIT(0xDF);
1812
- emit_operand(edi, adr);
1813
- }
1814
-
1815
-
1816
- void Assembler::fabs() {
1817
- EnsureSpace ensure_space(this);
1818
- last_pc_ = pc_;
1819
- EMIT(0xD9);
1820
- EMIT(0xE1);
1821
- }
1822
-
1823
-
1824
- void Assembler::fchs() {
1825
- EnsureSpace ensure_space(this);
1826
- last_pc_ = pc_;
1827
- EMIT(0xD9);
1828
- EMIT(0xE0);
1829
- }
1830
-
1831
-
1832
- void Assembler::fcos() {
1833
- EnsureSpace ensure_space(this);
1834
- last_pc_ = pc_;
1835
- EMIT(0xD9);
1836
- EMIT(0xFF);
1837
- }
1838
-
1839
-
1840
- void Assembler::fsin() {
1841
- EnsureSpace ensure_space(this);
1842
- last_pc_ = pc_;
1843
- EMIT(0xD9);
1844
- EMIT(0xFE);
1845
- }
1846
-
1847
-
1848
- void Assembler::fadd(int i) {
1849
- EnsureSpace ensure_space(this);
1850
- last_pc_ = pc_;
1851
- emit_farith(0xDC, 0xC0, i);
1852
- }
1853
-
1854
-
1855
- void Assembler::fsub(int i) {
1856
- EnsureSpace ensure_space(this);
1857
- last_pc_ = pc_;
1858
- emit_farith(0xDC, 0xE8, i);
1859
- }
1860
-
1861
-
1862
- void Assembler::fisub_s(const Operand& adr) {
1863
- EnsureSpace ensure_space(this);
1864
- last_pc_ = pc_;
1865
- EMIT(0xDA);
1866
- emit_operand(esp, adr);
1867
- }
1868
-
1869
-
1870
- void Assembler::fmul(int i) {
1871
- EnsureSpace ensure_space(this);
1872
- last_pc_ = pc_;
1873
- emit_farith(0xDC, 0xC8, i);
1874
- }
1875
-
1876
-
1877
- void Assembler::fdiv(int i) {
1878
- EnsureSpace ensure_space(this);
1879
- last_pc_ = pc_;
1880
- emit_farith(0xDC, 0xF8, i);
1881
- }
1882
-
1883
-
1884
- void Assembler::faddp(int i) {
1885
- EnsureSpace ensure_space(this);
1886
- last_pc_ = pc_;
1887
- emit_farith(0xDE, 0xC0, i);
1888
- }
1889
-
1890
-
1891
- void Assembler::fsubp(int i) {
1892
- EnsureSpace ensure_space(this);
1893
- last_pc_ = pc_;
1894
- emit_farith(0xDE, 0xE8, i);
1895
- }
1896
-
1897
-
1898
- void Assembler::fsubrp(int i) {
1899
- EnsureSpace ensure_space(this);
1900
- last_pc_ = pc_;
1901
- emit_farith(0xDE, 0xE0, i);
1902
- }
1903
-
1904
-
1905
- void Assembler::fmulp(int i) {
1906
- EnsureSpace ensure_space(this);
1907
- last_pc_ = pc_;
1908
- emit_farith(0xDE, 0xC8, i);
1909
- }
1910
-
1911
-
1912
- void Assembler::fdivp(int i) {
1913
- EnsureSpace ensure_space(this);
1914
- last_pc_ = pc_;
1915
- emit_farith(0xDE, 0xF8, i);
1916
- }
1917
-
1918
-
1919
- void Assembler::fprem() {
1920
- EnsureSpace ensure_space(this);
1921
- last_pc_ = pc_;
1922
- EMIT(0xD9);
1923
- EMIT(0xF8);
1924
- }
1925
-
1926
-
1927
- void Assembler::fprem1() {
1928
- EnsureSpace ensure_space(this);
1929
- last_pc_ = pc_;
1930
- EMIT(0xD9);
1931
- EMIT(0xF5);
1932
- }
1933
-
1934
-
1935
- void Assembler::fxch(int i) {
1936
- EnsureSpace ensure_space(this);
1937
- last_pc_ = pc_;
1938
- emit_farith(0xD9, 0xC8, i);
1939
- }
1940
-
1941
-
1942
- void Assembler::fincstp() {
1943
- EnsureSpace ensure_space(this);
1944
- last_pc_ = pc_;
1945
- EMIT(0xD9);
1946
- EMIT(0xF7);
1947
- }
1948
-
1949
-
1950
- void Assembler::ffree(int i) {
1951
- EnsureSpace ensure_space(this);
1952
- last_pc_ = pc_;
1953
- emit_farith(0xDD, 0xC0, i);
1954
- }
1955
-
1956
-
1957
- void Assembler::ftst() {
1958
- EnsureSpace ensure_space(this);
1959
- last_pc_ = pc_;
1960
- EMIT(0xD9);
1961
- EMIT(0xE4);
1962
- }
1963
-
1964
-
1965
- void Assembler::fucomp(int i) {
1966
- EnsureSpace ensure_space(this);
1967
- last_pc_ = pc_;
1968
- emit_farith(0xDD, 0xE8, i);
1969
- }
1970
-
1971
-
1972
- void Assembler::fucompp() {
1973
- EnsureSpace ensure_space(this);
1974
- last_pc_ = pc_;
1975
- EMIT(0xDA);
1976
- EMIT(0xE9);
1977
- }
1978
-
1979
-
1980
- void Assembler::fucomi(int i) {
1981
- EnsureSpace ensure_space(this);
1982
- last_pc_ = pc_;
1983
- EMIT(0xDB);
1984
- EMIT(0xE8 + i);
1985
- }
1986
-
1987
-
1988
- void Assembler::fucomip() {
1989
- EnsureSpace ensure_space(this);
1990
- last_pc_ = pc_;
1991
- EMIT(0xDF);
1992
- EMIT(0xE9);
1993
- }
1994
-
1995
-
1996
- void Assembler::fcompp() {
1997
- EnsureSpace ensure_space(this);
1998
- last_pc_ = pc_;
1999
- EMIT(0xDE);
2000
- EMIT(0xD9);
2001
- }
2002
-
2003
-
2004
- void Assembler::fnstsw_ax() {
2005
- EnsureSpace ensure_space(this);
2006
- last_pc_ = pc_;
2007
- EMIT(0xDF);
2008
- EMIT(0xE0);
2009
- }
2010
-
2011
-
2012
- void Assembler::fwait() {
2013
- EnsureSpace ensure_space(this);
2014
- last_pc_ = pc_;
2015
- EMIT(0x9B);
2016
- }
2017
-
2018
-
2019
- void Assembler::frndint() {
2020
- EnsureSpace ensure_space(this);
2021
- last_pc_ = pc_;
2022
- EMIT(0xD9);
2023
- EMIT(0xFC);
2024
- }
2025
-
2026
-
2027
- void Assembler::fnclex() {
2028
- EnsureSpace ensure_space(this);
2029
- last_pc_ = pc_;
2030
- EMIT(0xDB);
2031
- EMIT(0xE2);
2032
- }
2033
-
2034
-
2035
- void Assembler::sahf() {
2036
- EnsureSpace ensure_space(this);
2037
- last_pc_ = pc_;
2038
- EMIT(0x9E);
2039
- }
2040
-
2041
-
2042
- void Assembler::setcc(Condition cc, Register reg) {
2043
- ASSERT(reg.is_byte_register());
2044
- EnsureSpace ensure_space(this);
2045
- last_pc_ = pc_;
2046
- EMIT(0x0F);
2047
- EMIT(0x90 | cc);
2048
- EMIT(0xC0 | reg.code());
2049
- }
2050
-
2051
-
2052
- void Assembler::cvttss2si(Register dst, const Operand& src) {
2053
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2054
- EnsureSpace ensure_space(this);
2055
- last_pc_ = pc_;
2056
- EMIT(0xF3);
2057
- EMIT(0x0F);
2058
- EMIT(0x2C);
2059
- emit_operand(dst, src);
2060
- }
2061
-
2062
-
2063
- void Assembler::cvttsd2si(Register dst, const Operand& src) {
2064
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2065
- EnsureSpace ensure_space(this);
2066
- last_pc_ = pc_;
2067
- EMIT(0xF2);
2068
- EMIT(0x0F);
2069
- EMIT(0x2C);
2070
- emit_operand(dst, src);
2071
- }
2072
-
2073
-
2074
- void Assembler::cvtsi2sd(XMMRegister dst, const Operand& src) {
2075
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2076
- EnsureSpace ensure_space(this);
2077
- last_pc_ = pc_;
2078
- EMIT(0xF2);
2079
- EMIT(0x0F);
2080
- EMIT(0x2A);
2081
- emit_sse_operand(dst, src);
2082
- }
2083
-
2084
-
2085
- void Assembler::cvtss2sd(XMMRegister dst, XMMRegister src) {
2086
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2087
- EnsureSpace ensure_space(this);
2088
- last_pc_ = pc_;
2089
- EMIT(0xF3);
2090
- EMIT(0x0F);
2091
- EMIT(0x5A);
2092
- emit_sse_operand(dst, src);
2093
- }
2094
-
2095
-
2096
- void Assembler::addsd(XMMRegister dst, XMMRegister src) {
2097
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2098
- EnsureSpace ensure_space(this);
2099
- last_pc_ = pc_;
2100
- EMIT(0xF2);
2101
- EMIT(0x0F);
2102
- EMIT(0x58);
2103
- emit_sse_operand(dst, src);
2104
- }
2105
-
2106
-
2107
- void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
2108
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2109
- EnsureSpace ensure_space(this);
2110
- last_pc_ = pc_;
2111
- EMIT(0xF2);
2112
- EMIT(0x0F);
2113
- EMIT(0x59);
2114
- emit_sse_operand(dst, src);
2115
- }
2116
-
2117
-
2118
- void Assembler::subsd(XMMRegister dst, XMMRegister src) {
2119
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2120
- EnsureSpace ensure_space(this);
2121
- last_pc_ = pc_;
2122
- EMIT(0xF2);
2123
- EMIT(0x0F);
2124
- EMIT(0x5C);
2125
- emit_sse_operand(dst, src);
2126
- }
2127
-
2128
-
2129
- void Assembler::divsd(XMMRegister dst, XMMRegister src) {
2130
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2131
- EnsureSpace ensure_space(this);
2132
- last_pc_ = pc_;
2133
- EMIT(0xF2);
2134
- EMIT(0x0F);
2135
- EMIT(0x5E);
2136
- emit_sse_operand(dst, src);
2137
- }
2138
-
2139
-
2140
- void Assembler::xorpd(XMMRegister dst, XMMRegister src) {
2141
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2142
- EnsureSpace ensure_space(this);
2143
- last_pc_ = pc_;
2144
- EMIT(0x66);
2145
- EMIT(0x0F);
2146
- EMIT(0x57);
2147
- emit_sse_operand(dst, src);
2148
- }
2149
-
2150
-
2151
- void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
2152
- EnsureSpace ensure_space(this);
2153
- last_pc_ = pc_;
2154
- EMIT(0xF2);
2155
- EMIT(0x0F);
2156
- EMIT(0x51);
2157
- emit_sse_operand(dst, src);
2158
- }
2159
-
2160
-
2161
- void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
2162
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2163
- EnsureSpace ensure_space(this);
2164
- last_pc_ = pc_;
2165
- EMIT(0x66);
2166
- EMIT(0x0F);
2167
- EMIT(0x2E);
2168
- emit_sse_operand(dst, src);
2169
- }
2170
-
2171
-
2172
- void Assembler::movmskpd(Register dst, XMMRegister src) {
2173
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2174
- EnsureSpace ensure_space(this);
2175
- last_pc_ = pc_;
2176
- EMIT(0x66);
2177
- EMIT(0x0F);
2178
- EMIT(0x50);
2179
- emit_sse_operand(dst, src);
2180
- }
2181
-
2182
-
2183
- void Assembler::movdqa(const Operand& dst, XMMRegister src ) {
2184
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2185
- EnsureSpace ensure_space(this);
2186
- last_pc_ = pc_;
2187
- EMIT(0x66);
2188
- EMIT(0x0F);
2189
- EMIT(0x7F);
2190
- emit_sse_operand(src, dst);
2191
- }
2192
-
2193
-
2194
- void Assembler::movdqa(XMMRegister dst, const Operand& src) {
2195
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2196
- EnsureSpace ensure_space(this);
2197
- last_pc_ = pc_;
2198
- EMIT(0x66);
2199
- EMIT(0x0F);
2200
- EMIT(0x6F);
2201
- emit_sse_operand(dst, src);
2202
- }
2203
-
2204
-
2205
- void Assembler::movdqu(const Operand& dst, XMMRegister src ) {
2206
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2207
- EnsureSpace ensure_space(this);
2208
- last_pc_ = pc_;
2209
- EMIT(0xF3);
2210
- EMIT(0x0F);
2211
- EMIT(0x7F);
2212
- emit_sse_operand(src, dst);
2213
- }
2214
-
2215
-
2216
- void Assembler::movdqu(XMMRegister dst, const Operand& src) {
2217
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2218
- EnsureSpace ensure_space(this);
2219
- last_pc_ = pc_;
2220
- EMIT(0xF3);
2221
- EMIT(0x0F);
2222
- EMIT(0x6F);
2223
- emit_sse_operand(dst, src);
2224
- }
2225
-
2226
-
2227
- void Assembler::movntdqa(XMMRegister dst, const Operand& src) {
2228
- ASSERT(CpuFeatures::IsEnabled(SSE4_1));
2229
- EnsureSpace ensure_space(this);
2230
- last_pc_ = pc_;
2231
- EMIT(0x66);
2232
- EMIT(0x0F);
2233
- EMIT(0x38);
2234
- EMIT(0x2A);
2235
- emit_sse_operand(dst, src);
2236
- }
2237
-
2238
-
2239
- void Assembler::movntdq(const Operand& dst, XMMRegister src) {
2240
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2241
- EnsureSpace ensure_space(this);
2242
- last_pc_ = pc_;
2243
- EMIT(0x66);
2244
- EMIT(0x0F);
2245
- EMIT(0xE7);
2246
- emit_sse_operand(src, dst);
2247
- }
2248
-
2249
-
2250
- void Assembler::prefetch(const Operand& src, int level) {
2251
- ASSERT(is_uint2(level));
2252
- EnsureSpace ensure_space(this);
2253
- last_pc_ = pc_;
2254
- EMIT(0x0F);
2255
- EMIT(0x18);
2256
- XMMRegister code = { level }; // Emit hint number in Reg position of RegR/M.
2257
- emit_sse_operand(code, src);
2258
- }
2259
-
2260
-
2261
- void Assembler::movdbl(XMMRegister dst, const Operand& src) {
2262
- EnsureSpace ensure_space(this);
2263
- last_pc_ = pc_;
2264
- movsd(dst, src);
2265
- }
2266
-
2267
-
2268
- void Assembler::movdbl(const Operand& dst, XMMRegister src) {
2269
- EnsureSpace ensure_space(this);
2270
- last_pc_ = pc_;
2271
- movsd(dst, src);
2272
- }
2273
-
2274
-
2275
- void Assembler::movsd(const Operand& dst, XMMRegister src ) {
2276
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2277
- EnsureSpace ensure_space(this);
2278
- last_pc_ = pc_;
2279
- EMIT(0xF2); // double
2280
- EMIT(0x0F);
2281
- EMIT(0x11); // store
2282
- emit_sse_operand(src, dst);
2283
- }
2284
-
2285
-
2286
- void Assembler::movsd(XMMRegister dst, const Operand& src) {
2287
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2288
- EnsureSpace ensure_space(this);
2289
- last_pc_ = pc_;
2290
- EMIT(0xF2); // double
2291
- EMIT(0x0F);
2292
- EMIT(0x10); // load
2293
- emit_sse_operand(dst, src);
2294
- }
2295
-
2296
- void Assembler::movsd(XMMRegister dst, XMMRegister src) {
2297
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2298
- EnsureSpace ensure_space(this);
2299
- last_pc_ = pc_;
2300
- EMIT(0xF2);
2301
- EMIT(0x0F);
2302
- EMIT(0x10);
2303
- emit_sse_operand(dst, src);
2304
- }
2305
-
2306
-
2307
- void Assembler::movd(XMMRegister dst, const Operand& src) {
2308
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2309
- EnsureSpace ensure_space(this);
2310
- last_pc_ = pc_;
2311
- EMIT(0x66);
2312
- EMIT(0x0F);
2313
- EMIT(0x6E);
2314
- emit_sse_operand(dst, src);
2315
- }
2316
-
2317
-
2318
- void Assembler::pxor(XMMRegister dst, XMMRegister src) {
2319
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2320
- EnsureSpace ensure_space(this);
2321
- last_pc_ = pc_;
2322
- EMIT(0x66);
2323
- EMIT(0x0F);
2324
- EMIT(0xEF);
2325
- emit_sse_operand(dst, src);
2326
- }
2327
-
2328
-
2329
- void Assembler::ptest(XMMRegister dst, XMMRegister src) {
2330
- ASSERT(CpuFeatures::IsEnabled(SSE2));
2331
- EnsureSpace ensure_space(this);
2332
- last_pc_ = pc_;
2333
- EMIT(0x66);
2334
- EMIT(0x0F);
2335
- EMIT(0x38);
2336
- EMIT(0x17);
2337
- emit_sse_operand(dst, src);
2338
- }
2339
-
2340
- void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) {
2341
- Register ireg = { reg.code() };
2342
- emit_operand(ireg, adr);
2343
- }
2344
-
2345
-
2346
- void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
2347
- EMIT(0xC0 | dst.code() << 3 | src.code());
2348
- }
2349
-
2350
-
2351
- void Assembler::emit_sse_operand(Register dst, XMMRegister src) {
2352
- EMIT(0xC0 | dst.code() << 3 | src.code());
2353
- }
2354
-
2355
-
2356
- void Assembler::Print() {
2357
- Disassembler::Decode(stdout, buffer_, pc_);
2358
- }
2359
-
2360
-
2361
- void Assembler::RecordJSReturn() {
2362
- WriteRecordedPositions();
2363
- EnsureSpace ensure_space(this);
2364
- RecordRelocInfo(RelocInfo::JS_RETURN);
2365
- }
2366
-
2367
-
2368
- void Assembler::RecordDebugBreakSlot() {
2369
- WriteRecordedPositions();
2370
- EnsureSpace ensure_space(this);
2371
- RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
2372
- }
2373
-
2374
-
2375
- void Assembler::RecordComment(const char* msg) {
2376
- if (FLAG_debug_code) {
2377
- EnsureSpace ensure_space(this);
2378
- RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
2379
- }
2380
- }
2381
-
2382
-
2383
- void Assembler::RecordPosition(int pos) {
2384
- ASSERT(pos != RelocInfo::kNoPosition);
2385
- ASSERT(pos >= 0);
2386
- current_position_ = pos;
2387
- }
2388
-
2389
-
2390
- void Assembler::RecordStatementPosition(int pos) {
2391
- ASSERT(pos != RelocInfo::kNoPosition);
2392
- ASSERT(pos >= 0);
2393
- current_statement_position_ = pos;
2394
- }
2395
-
2396
-
2397
- bool Assembler::WriteRecordedPositions() {
2398
- bool written = false;
2399
-
2400
- // Write the statement position if it is different from what was written last
2401
- // time.
2402
- if (current_statement_position_ != written_statement_position_) {
2403
- EnsureSpace ensure_space(this);
2404
- RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_);
2405
- written_statement_position_ = current_statement_position_;
2406
- written = true;
2407
- }
2408
-
2409
- // Write the position if it is different from what was written last time and
2410
- // also different from the written statement position.
2411
- if (current_position_ != written_position_ &&
2412
- current_position_ != written_statement_position_) {
2413
- EnsureSpace ensure_space(this);
2414
- RecordRelocInfo(RelocInfo::POSITION, current_position_);
2415
- written_position_ = current_position_;
2416
- written = true;
2417
- }
2418
-
2419
- // Return whether something was written.
2420
- return written;
2421
- }
2422
-
2423
-
2424
- void Assembler::GrowBuffer() {
2425
- ASSERT(overflow());
2426
- if (!own_buffer_) FATAL("external code buffer is too small");
2427
-
2428
- // Compute new buffer size.
2429
- CodeDesc desc; // the new buffer
2430
- if (buffer_size_ < 4*KB) {
2431
- desc.buffer_size = 4*KB;
2432
- } else {
2433
- desc.buffer_size = 2*buffer_size_;
2434
- }
2435
- // Some internal data structures overflow for very large buffers,
2436
- // they must ensure that kMaximalBufferSize is not too large.
2437
- if ((desc.buffer_size > kMaximalBufferSize) ||
2438
- (desc.buffer_size > Heap::MaxOldGenerationSize())) {
2439
- V8::FatalProcessOutOfMemory("Assembler::GrowBuffer");
2440
- }
2441
-
2442
- // Setup new buffer.
2443
- desc.buffer = NewArray<byte>(desc.buffer_size);
2444
- desc.instr_size = pc_offset();
2445
- desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos());
2446
-
2447
- // Clear the buffer in debug mode. Use 'int3' instructions to make
2448
- // sure to get into problems if we ever run uninitialized code.
2449
- #ifdef DEBUG
2450
- memset(desc.buffer, 0xCC, desc.buffer_size);
2451
- #endif
2452
-
2453
- // Copy the data.
2454
- int pc_delta = desc.buffer - buffer_;
2455
- int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_);
2456
- memmove(desc.buffer, buffer_, desc.instr_size);
2457
- memmove(rc_delta + reloc_info_writer.pos(),
2458
- reloc_info_writer.pos(), desc.reloc_size);
2459
-
2460
- // Switch buffers.
2461
- if (spare_buffer_ == NULL && buffer_size_ == kMinimalBufferSize) {
2462
- spare_buffer_ = buffer_;
2463
- } else {
2464
- DeleteArray(buffer_);
2465
- }
2466
- buffer_ = desc.buffer;
2467
- buffer_size_ = desc.buffer_size;
2468
- pc_ += pc_delta;
2469
- if (last_pc_ != NULL) {
2470
- last_pc_ += pc_delta;
2471
- }
2472
- reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
2473
- reloc_info_writer.last_pc() + pc_delta);
2474
-
2475
- // Relocate runtime entries.
2476
- for (RelocIterator it(desc); !it.done(); it.next()) {
2477
- RelocInfo::Mode rmode = it.rinfo()->rmode();
2478
- if (rmode == RelocInfo::RUNTIME_ENTRY) {
2479
- int32_t* p = reinterpret_cast<int32_t*>(it.rinfo()->pc());
2480
- *p -= pc_delta; // relocate entry
2481
- } else if (rmode == RelocInfo::INTERNAL_REFERENCE) {
2482
- int32_t* p = reinterpret_cast<int32_t*>(it.rinfo()->pc());
2483
- if (*p != 0) { // 0 means uninitialized.
2484
- *p += pc_delta;
2485
- }
2486
- }
2487
- }
2488
-
2489
- ASSERT(!overflow());
2490
- }
2491
-
2492
-
2493
- void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) {
2494
- ASSERT(is_uint8(op1) && is_uint8(op2)); // wrong opcode
2495
- ASSERT(is_uint8(imm8));
2496
- ASSERT((op1 & 0x01) == 0); // should be 8bit operation
2497
- EMIT(op1);
2498
- EMIT(op2 | dst.code());
2499
- EMIT(imm8);
2500
- }
2501
-
2502
-
2503
- void Assembler::emit_arith(int sel, Operand dst, const Immediate& x) {
2504
- ASSERT((0 <= sel) && (sel <= 7));
2505
- Register ireg = { sel };
2506
- if (x.is_int8()) {
2507
- EMIT(0x83); // using a sign-extended 8-bit immediate.
2508
- emit_operand(ireg, dst);
2509
- EMIT(x.x_ & 0xFF);
2510
- } else if (dst.is_reg(eax)) {
2511
- EMIT((sel << 3) | 0x05); // short form if the destination is eax.
2512
- emit(x);
2513
- } else {
2514
- EMIT(0x81); // using a literal 32-bit immediate.
2515
- emit_operand(ireg, dst);
2516
- emit(x);
2517
- }
2518
- }
2519
-
2520
-
2521
- void Assembler::emit_operand(Register reg, const Operand& adr) {
2522
- const unsigned length = adr.len_;
2523
- ASSERT(length > 0);
2524
-
2525
- // Emit updated ModRM byte containing the given register.
2526
- pc_[0] = (adr.buf_[0] & ~0x38) | (reg.code() << 3);
2527
-
2528
- // Emit the rest of the encoded operand.
2529
- for (unsigned i = 1; i < length; i++) pc_[i] = adr.buf_[i];
2530
- pc_ += length;
2531
-
2532
- // Emit relocation information if necessary.
2533
- if (length >= sizeof(int32_t) && adr.rmode_ != RelocInfo::NONE) {
2534
- pc_ -= sizeof(int32_t); // pc_ must be *at* disp32
2535
- RecordRelocInfo(adr.rmode_);
2536
- pc_ += sizeof(int32_t);
2537
- }
2538
- }
2539
-
2540
-
2541
- void Assembler::emit_farith(int b1, int b2, int i) {
2542
- ASSERT(is_uint8(b1) && is_uint8(b2)); // wrong opcode
2543
- ASSERT(0 <= i && i < 8); // illegal stack offset
2544
- EMIT(b1);
2545
- EMIT(b2 + i);
2546
- }
2547
-
2548
-
2549
- void Assembler::dd(uint32_t data, RelocInfo::Mode reloc_info) {
2550
- EnsureSpace ensure_space(this);
2551
- emit(data, reloc_info);
2552
- }
2553
-
2554
-
2555
- void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
2556
- ASSERT(rmode != RelocInfo::NONE);
2557
- // Don't record external references unless the heap will be serialized.
2558
- if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
2559
- #ifdef DEBUG
2560
- if (!Serializer::enabled()) {
2561
- Serializer::TooLateToEnableNow();
2562
- }
2563
- #endif
2564
- if (!Serializer::enabled() && !FLAG_debug_code) {
2565
- return;
2566
- }
2567
- }
2568
- RelocInfo rinfo(pc_, rmode, data);
2569
- reloc_info_writer.Write(&rinfo);
2570
- }
2571
-
2572
-
2573
- #ifdef GENERATED_CODE_COVERAGE
2574
- static FILE* coverage_log = NULL;
2575
-
2576
-
2577
- static void InitCoverageLog() {
2578
- char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG");
2579
- if (file_name != NULL) {
2580
- coverage_log = fopen(file_name, "aw+");
2581
- }
2582
- }
2583
-
2584
-
2585
- void LogGeneratedCodeCoverage(const char* file_line) {
2586
- const char* return_address = (&file_line)[-1];
2587
- char* push_insn = const_cast<char*>(return_address - 12);
2588
- push_insn[0] = 0xeb; // Relative branch insn.
2589
- push_insn[1] = 13; // Skip over coverage insns.
2590
- if (coverage_log != NULL) {
2591
- fprintf(coverage_log, "%s\n", file_line);
2592
- fflush(coverage_log);
2593
- }
2594
- }
2595
-
2596
- #endif
2597
-
2598
- } } // namespace v8::internal
2599
-
2600
- #endif // V8_TARGET_ARCH_IA32