therubyracer 0.4.7-x86-darwin-10

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 (1194) hide show
  1. data/Doxyfile +1514 -0
  2. data/History.txt +39 -0
  3. data/Manifest.txt +1192 -0
  4. data/README.rdoc +157 -0
  5. data/Rakefile +49 -0
  6. data/docs/data_conversion.txt +18 -0
  7. data/ext/v8/Makefile +169 -0
  8. data/ext/v8/callbacks.cpp +160 -0
  9. data/ext/v8/callbacks.h +14 -0
  10. data/ext/v8/convert_ruby.cpp +8 -0
  11. data/ext/v8/convert_ruby.h +99 -0
  12. data/ext/v8/convert_string.cpp +10 -0
  13. data/ext/v8/convert_string.h +73 -0
  14. data/ext/v8/convert_v8.cpp +9 -0
  15. data/ext/v8/convert_v8.h +121 -0
  16. data/ext/v8/converters.cpp +83 -0
  17. data/ext/v8/converters.h +23 -0
  18. data/ext/v8/extconf.rb +44 -0
  19. data/ext/v8/upstream/2.0.6/.sconsign.dblite +0 -0
  20. data/ext/v8/upstream/2.0.6/AUTHORS +23 -0
  21. data/ext/v8/upstream/2.0.6/ChangeLog +1479 -0
  22. data/ext/v8/upstream/2.0.6/LICENSE +55 -0
  23. data/ext/v8/upstream/2.0.6/SConstruct +1028 -0
  24. data/ext/v8/upstream/2.0.6/benchmarks/README.txt +63 -0
  25. data/ext/v8/upstream/2.0.6/benchmarks/base.js +264 -0
  26. data/ext/v8/upstream/2.0.6/benchmarks/crypto.js +1698 -0
  27. data/ext/v8/upstream/2.0.6/benchmarks/deltablue.js +880 -0
  28. data/ext/v8/upstream/2.0.6/benchmarks/earley-boyer.js +4684 -0
  29. data/ext/v8/upstream/2.0.6/benchmarks/raytrace.js +935 -0
  30. data/ext/v8/upstream/2.0.6/benchmarks/regexp.js +1614 -0
  31. data/ext/v8/upstream/2.0.6/benchmarks/revisions.html +86 -0
  32. data/ext/v8/upstream/2.0.6/benchmarks/richards.js +539 -0
  33. data/ext/v8/upstream/2.0.6/benchmarks/run.html +141 -0
  34. data/ext/v8/upstream/2.0.6/benchmarks/run.js +61 -0
  35. data/ext/v8/upstream/2.0.6/benchmarks/splay.js +378 -0
  36. data/ext/v8/upstream/2.0.6/benchmarks/style.css +77 -0
  37. data/ext/v8/upstream/2.0.6/benchmarks/v8-logo.png +0 -0
  38. data/ext/v8/upstream/2.0.6/include/v8-debug.h +275 -0
  39. data/ext/v8/upstream/2.0.6/include/v8.h +3236 -0
  40. data/ext/v8/upstream/2.0.6/samples/SConscript +38 -0
  41. data/ext/v8/upstream/2.0.6/samples/count-hosts.js +42 -0
  42. data/ext/v8/upstream/2.0.6/samples/process.cc +622 -0
  43. data/ext/v8/upstream/2.0.6/samples/shell.cc +303 -0
  44. data/ext/v8/upstream/2.0.6/src/SConscript +283 -0
  45. data/ext/v8/upstream/2.0.6/src/accessors.cc +695 -0
  46. data/ext/v8/upstream/2.0.6/src/accessors.h +114 -0
  47. data/ext/v8/upstream/2.0.6/src/allocation.cc +198 -0
  48. data/ext/v8/upstream/2.0.6/src/allocation.h +169 -0
  49. data/ext/v8/upstream/2.0.6/src/api.cc +3831 -0
  50. data/ext/v8/upstream/2.0.6/src/api.h +479 -0
  51. data/ext/v8/upstream/2.0.6/src/apinatives.js +110 -0
  52. data/ext/v8/upstream/2.0.6/src/apiutils.h +69 -0
  53. data/ext/v8/upstream/2.0.6/src/arguments.h +97 -0
  54. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +277 -0
  55. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +1821 -0
  56. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +1027 -0
  57. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +267 -0
  58. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +1821 -0
  59. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +1027 -0
  60. data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +1271 -0
  61. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +74 -0
  62. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +6682 -0
  63. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +535 -0
  64. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +112 -0
  65. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +347 -0
  66. data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +132 -0
  67. data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +213 -0
  68. data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +1166 -0
  69. data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +1698 -0
  70. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +123 -0
  71. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +162 -0
  72. data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +849 -0
  73. data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +238 -0
  74. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +1259 -0
  75. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +423 -0
  76. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +1266 -0
  77. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +282 -0
  78. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +103 -0
  79. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +59 -0
  80. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +43 -0
  81. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +2264 -0
  82. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +306 -0
  83. data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +1516 -0
  84. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +412 -0
  85. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +532 -0
  86. data/ext/v8/upstream/2.0.6/src/array.js +1154 -0
  87. data/ext/v8/upstream/2.0.6/src/assembler.cc +772 -0
  88. data/ext/v8/upstream/2.0.6/src/assembler.h +525 -0
  89. data/ext/v8/upstream/2.0.6/src/ast.cc +512 -0
  90. data/ext/v8/upstream/2.0.6/src/ast.h +1820 -0
  91. data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +1680 -0
  92. data/ext/v8/upstream/2.0.6/src/bootstrapper.h +103 -0
  93. data/ext/v8/upstream/2.0.6/src/builtins.cc +851 -0
  94. data/ext/v8/upstream/2.0.6/src/builtins.h +245 -0
  95. data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +104 -0
  96. data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +86 -0
  97. data/ext/v8/upstream/2.0.6/src/char-predicates.h +65 -0
  98. data/ext/v8/upstream/2.0.6/src/checks.cc +100 -0
  99. data/ext/v8/upstream/2.0.6/src/checks.h +284 -0
  100. data/ext/v8/upstream/2.0.6/src/code-stubs.cc +164 -0
  101. data/ext/v8/upstream/2.0.6/src/code-stubs.h +164 -0
  102. data/ext/v8/upstream/2.0.6/src/code.h +68 -0
  103. data/ext/v8/upstream/2.0.6/src/codegen-inl.h +88 -0
  104. data/ext/v8/upstream/2.0.6/src/codegen.cc +504 -0
  105. data/ext/v8/upstream/2.0.6/src/codegen.h +522 -0
  106. data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +490 -0
  107. data/ext/v8/upstream/2.0.6/src/compilation-cache.h +98 -0
  108. data/ext/v8/upstream/2.0.6/src/compiler.cc +1132 -0
  109. data/ext/v8/upstream/2.0.6/src/compiler.h +107 -0
  110. data/ext/v8/upstream/2.0.6/src/contexts.cc +256 -0
  111. data/ext/v8/upstream/2.0.6/src/contexts.h +345 -0
  112. data/ext/v8/upstream/2.0.6/src/conversions-inl.h +95 -0
  113. data/ext/v8/upstream/2.0.6/src/conversions.cc +709 -0
  114. data/ext/v8/upstream/2.0.6/src/conversions.h +118 -0
  115. data/ext/v8/upstream/2.0.6/src/counters.cc +78 -0
  116. data/ext/v8/upstream/2.0.6/src/counters.h +239 -0
  117. data/ext/v8/upstream/2.0.6/src/cpu.h +65 -0
  118. data/ext/v8/upstream/2.0.6/src/d8-debug.cc +345 -0
  119. data/ext/v8/upstream/2.0.6/src/d8-debug.h +155 -0
  120. data/ext/v8/upstream/2.0.6/src/d8-posix.cc +675 -0
  121. data/ext/v8/upstream/2.0.6/src/d8-readline.cc +128 -0
  122. data/ext/v8/upstream/2.0.6/src/d8-windows.cc +42 -0
  123. data/ext/v8/upstream/2.0.6/src/d8.cc +776 -0
  124. data/ext/v8/upstream/2.0.6/src/d8.h +225 -0
  125. data/ext/v8/upstream/2.0.6/src/d8.js +1625 -0
  126. data/ext/v8/upstream/2.0.6/src/date-delay.js +1138 -0
  127. data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +114 -0
  128. data/ext/v8/upstream/2.0.6/src/dateparser.cc +186 -0
  129. data/ext/v8/upstream/2.0.6/src/dateparser.h +240 -0
  130. data/ext/v8/upstream/2.0.6/src/debug-agent.cc +425 -0
  131. data/ext/v8/upstream/2.0.6/src/debug-agent.h +129 -0
  132. data/ext/v8/upstream/2.0.6/src/debug-delay.js +2073 -0
  133. data/ext/v8/upstream/2.0.6/src/debug.cc +2751 -0
  134. data/ext/v8/upstream/2.0.6/src/debug.h +866 -0
  135. data/ext/v8/upstream/2.0.6/src/disasm.h +77 -0
  136. data/ext/v8/upstream/2.0.6/src/disassembler.cc +318 -0
  137. data/ext/v8/upstream/2.0.6/src/disassembler.h +56 -0
  138. data/ext/v8/upstream/2.0.6/src/dtoa-config.c +91 -0
  139. data/ext/v8/upstream/2.0.6/src/execution.cc +701 -0
  140. data/ext/v8/upstream/2.0.6/src/execution.h +312 -0
  141. data/ext/v8/upstream/2.0.6/src/factory.cc +957 -0
  142. data/ext/v8/upstream/2.0.6/src/factory.h +393 -0
  143. data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +725 -0
  144. data/ext/v8/upstream/2.0.6/src/fast-codegen.h +371 -0
  145. data/ext/v8/upstream/2.0.6/src/flag-definitions.h +426 -0
  146. data/ext/v8/upstream/2.0.6/src/flags.cc +555 -0
  147. data/ext/v8/upstream/2.0.6/src/flags.h +81 -0
  148. data/ext/v8/upstream/2.0.6/src/frame-element.cc +45 -0
  149. data/ext/v8/upstream/2.0.6/src/frame-element.h +235 -0
  150. data/ext/v8/upstream/2.0.6/src/frames-inl.h +215 -0
  151. data/ext/v8/upstream/2.0.6/src/frames.cc +749 -0
  152. data/ext/v8/upstream/2.0.6/src/frames.h +659 -0
  153. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +76 -0
  154. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +135 -0
  155. data/ext/v8/upstream/2.0.6/src/global-handles.cc +516 -0
  156. data/ext/v8/upstream/2.0.6/src/global-handles.h +180 -0
  157. data/ext/v8/upstream/2.0.6/src/globals.h +608 -0
  158. data/ext/v8/upstream/2.0.6/src/handles-inl.h +76 -0
  159. data/ext/v8/upstream/2.0.6/src/handles.cc +811 -0
  160. data/ext/v8/upstream/2.0.6/src/handles.h +367 -0
  161. data/ext/v8/upstream/2.0.6/src/hashmap.cc +226 -0
  162. data/ext/v8/upstream/2.0.6/src/hashmap.h +120 -0
  163. data/ext/v8/upstream/2.0.6/src/heap-inl.h +407 -0
  164. data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +695 -0
  165. data/ext/v8/upstream/2.0.6/src/heap-profiler.h +277 -0
  166. data/ext/v8/upstream/2.0.6/src/heap.cc +4204 -0
  167. data/ext/v8/upstream/2.0.6/src/heap.h +1704 -0
  168. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +325 -0
  169. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +2375 -0
  170. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +914 -0
  171. data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +1222 -0
  172. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +46 -0
  173. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +9770 -0
  174. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +834 -0
  175. data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +79 -0
  176. data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +208 -0
  177. data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +1357 -0
  178. data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +1813 -0
  179. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +111 -0
  180. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +135 -0
  181. data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +1490 -0
  182. data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +432 -0
  183. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +1517 -0
  184. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +528 -0
  185. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +1219 -0
  186. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +230 -0
  187. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +82 -0
  188. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +99 -0
  189. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +43 -0
  190. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +30 -0
  191. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +62 -0
  192. data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +1961 -0
  193. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +1105 -0
  194. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +580 -0
  195. data/ext/v8/upstream/2.0.6/src/ic-inl.h +93 -0
  196. data/ext/v8/upstream/2.0.6/src/ic.cc +1426 -0
  197. data/ext/v8/upstream/2.0.6/src/ic.h +443 -0
  198. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +646 -0
  199. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +48 -0
  200. data/ext/v8/upstream/2.0.6/src/json-delay.js +254 -0
  201. data/ext/v8/upstream/2.0.6/src/jsregexp.cc +5234 -0
  202. data/ext/v8/upstream/2.0.6/src/jsregexp.h +1439 -0
  203. data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +49 -0
  204. data/ext/v8/upstream/2.0.6/src/jump-target.cc +383 -0
  205. data/ext/v8/upstream/2.0.6/src/jump-target.h +280 -0
  206. data/ext/v8/upstream/2.0.6/src/list-inl.h +166 -0
  207. data/ext/v8/upstream/2.0.6/src/list.h +158 -0
  208. data/ext/v8/upstream/2.0.6/src/log-inl.h +126 -0
  209. data/ext/v8/upstream/2.0.6/src/log-utils.cc +503 -0
  210. data/ext/v8/upstream/2.0.6/src/log-utils.h +292 -0
  211. data/ext/v8/upstream/2.0.6/src/log.cc +1457 -0
  212. data/ext/v8/upstream/2.0.6/src/log.h +371 -0
  213. data/ext/v8/upstream/2.0.6/src/macro-assembler.h +93 -0
  214. data/ext/v8/upstream/2.0.6/src/macros.py +137 -0
  215. data/ext/v8/upstream/2.0.6/src/mark-compact.cc +2007 -0
  216. data/ext/v8/upstream/2.0.6/src/mark-compact.h +442 -0
  217. data/ext/v8/upstream/2.0.6/src/math.js +263 -0
  218. data/ext/v8/upstream/2.0.6/src/memory.h +74 -0
  219. data/ext/v8/upstream/2.0.6/src/messages.cc +177 -0
  220. data/ext/v8/upstream/2.0.6/src/messages.h +112 -0
  221. data/ext/v8/upstream/2.0.6/src/messages.js +937 -0
  222. data/ext/v8/upstream/2.0.6/src/mirror-delay.js +2332 -0
  223. data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +169 -0
  224. data/ext/v8/upstream/2.0.6/src/natives.h +63 -0
  225. data/ext/v8/upstream/2.0.6/src/objects-debug.cc +1317 -0
  226. data/ext/v8/upstream/2.0.6/src/objects-inl.h +3044 -0
  227. data/ext/v8/upstream/2.0.6/src/objects.cc +8306 -0
  228. data/ext/v8/upstream/2.0.6/src/objects.h +4960 -0
  229. data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +116 -0
  230. data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +69 -0
  231. data/ext/v8/upstream/2.0.6/src/parser.cc +4810 -0
  232. data/ext/v8/upstream/2.0.6/src/parser.h +195 -0
  233. data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +645 -0
  234. data/ext/v8/upstream/2.0.6/src/platform-linux.cc +808 -0
  235. data/ext/v8/upstream/2.0.6/src/platform-macos.cc +643 -0
  236. data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +454 -0
  237. data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +597 -0
  238. data/ext/v8/upstream/2.0.6/src/platform-posix.cc +380 -0
  239. data/ext/v8/upstream/2.0.6/src/platform-win32.cc +1908 -0
  240. data/ext/v8/upstream/2.0.6/src/platform.h +556 -0
  241. data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +1511 -0
  242. data/ext/v8/upstream/2.0.6/src/prettyprinter.h +219 -0
  243. data/ext/v8/upstream/2.0.6/src/property.cc +96 -0
  244. data/ext/v8/upstream/2.0.6/src/property.h +327 -0
  245. data/ext/v8/upstream/2.0.6/src/regexp-delay.js +406 -0
  246. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  247. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +464 -0
  248. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +141 -0
  249. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +356 -0
  250. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +103 -0
  251. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +240 -0
  252. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +220 -0
  253. data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +103 -0
  254. data/ext/v8/upstream/2.0.6/src/regexp-stack.h +123 -0
  255. data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +74 -0
  256. data/ext/v8/upstream/2.0.6/src/register-allocator.cc +100 -0
  257. data/ext/v8/upstream/2.0.6/src/register-allocator.h +295 -0
  258. data/ext/v8/upstream/2.0.6/src/rewriter.cc +855 -0
  259. data/ext/v8/upstream/2.0.6/src/rewriter.h +54 -0
  260. data/ext/v8/upstream/2.0.6/src/runtime.cc +8163 -0
  261. data/ext/v8/upstream/2.0.6/src/runtime.h +432 -0
  262. data/ext/v8/upstream/2.0.6/src/runtime.js +626 -0
  263. data/ext/v8/upstream/2.0.6/src/scanner.cc +1098 -0
  264. data/ext/v8/upstream/2.0.6/src/scanner.h +425 -0
  265. data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +649 -0
  266. data/ext/v8/upstream/2.0.6/src/scopeinfo.h +236 -0
  267. data/ext/v8/upstream/2.0.6/src/scopes.cc +963 -0
  268. data/ext/v8/upstream/2.0.6/src/scopes.h +401 -0
  269. data/ext/v8/upstream/2.0.6/src/serialize.cc +1260 -0
  270. data/ext/v8/upstream/2.0.6/src/serialize.h +404 -0
  271. data/ext/v8/upstream/2.0.6/src/shell.h +55 -0
  272. data/ext/v8/upstream/2.0.6/src/simulator.h +41 -0
  273. data/ext/v8/upstream/2.0.6/src/smart-pointer.h +109 -0
  274. data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +97 -0
  275. data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +40 -0
  276. data/ext/v8/upstream/2.0.6/src/snapshot.h +59 -0
  277. data/ext/v8/upstream/2.0.6/src/spaces-inl.h +372 -0
  278. data/ext/v8/upstream/2.0.6/src/spaces.cc +2864 -0
  279. data/ext/v8/upstream/2.0.6/src/spaces.h +2072 -0
  280. data/ext/v8/upstream/2.0.6/src/string-stream.cc +584 -0
  281. data/ext/v8/upstream/2.0.6/src/string-stream.h +189 -0
  282. data/ext/v8/upstream/2.0.6/src/string.js +901 -0
  283. data/ext/v8/upstream/2.0.6/src/stub-cache.cc +1108 -0
  284. data/ext/v8/upstream/2.0.6/src/stub-cache.h +578 -0
  285. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +15 -0
  286. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +3330 -0
  287. data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +3925 -0
  288. data/ext/v8/upstream/2.0.6/src/token.cc +56 -0
  289. data/ext/v8/upstream/2.0.6/src/token.h +270 -0
  290. data/ext/v8/upstream/2.0.6/src/top.cc +991 -0
  291. data/ext/v8/upstream/2.0.6/src/top.h +459 -0
  292. data/ext/v8/upstream/2.0.6/src/unicode-inl.h +238 -0
  293. data/ext/v8/upstream/2.0.6/src/unicode.cc +749 -0
  294. data/ext/v8/upstream/2.0.6/src/unicode.h +279 -0
  295. data/ext/v8/upstream/2.0.6/src/uri.js +415 -0
  296. data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +426 -0
  297. data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +40 -0
  298. data/ext/v8/upstream/2.0.6/src/utils.cc +322 -0
  299. data/ext/v8/upstream/2.0.6/src/utils.h +592 -0
  300. data/ext/v8/upstream/2.0.6/src/v8-counters.cc +55 -0
  301. data/ext/v8/upstream/2.0.6/src/v8-counters.h +198 -0
  302. data/ext/v8/upstream/2.0.6/src/v8.cc +193 -0
  303. data/ext/v8/upstream/2.0.6/src/v8.h +119 -0
  304. data/ext/v8/upstream/2.0.6/src/v8natives.js +846 -0
  305. data/ext/v8/upstream/2.0.6/src/v8threads.cc +450 -0
  306. data/ext/v8/upstream/2.0.6/src/v8threads.h +144 -0
  307. data/ext/v8/upstream/2.0.6/src/variables.cc +163 -0
  308. data/ext/v8/upstream/2.0.6/src/variables.h +235 -0
  309. data/ext/v8/upstream/2.0.6/src/version.cc +88 -0
  310. data/ext/v8/upstream/2.0.6/src/version.h +64 -0
  311. data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +381 -0
  312. data/ext/v8/upstream/2.0.6/src/virtual-frame.h +44 -0
  313. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +352 -0
  314. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +2539 -0
  315. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +1399 -0
  316. data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +1255 -0
  317. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +46 -0
  318. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +8223 -0
  319. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +785 -0
  320. data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +79 -0
  321. data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +202 -0
  322. data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +1596 -0
  323. data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +1820 -0
  324. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +109 -0
  325. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +121 -0
  326. data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +1392 -0
  327. data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +432 -0
  328. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +2409 -0
  329. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +765 -0
  330. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +1337 -0
  331. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +295 -0
  332. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +86 -0
  333. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +84 -0
  334. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +43 -0
  335. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +27 -0
  336. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +63 -0
  337. data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +1884 -0
  338. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +1089 -0
  339. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +560 -0
  340. data/ext/v8/upstream/2.0.6/src/zone-inl.h +297 -0
  341. data/ext/v8/upstream/2.0.6/src/zone.cc +193 -0
  342. data/ext/v8/upstream/2.0.6/src/zone.h +305 -0
  343. data/ext/v8/upstream/2.0.6/test/cctest/SConscript +95 -0
  344. data/ext/v8/upstream/2.0.6/test/cctest/cctest.cc +126 -0
  345. data/ext/v8/upstream/2.0.6/test/cctest/cctest.h +211 -0
  346. data/ext/v8/upstream/2.0.6/test/cctest/cctest.status +54 -0
  347. data/ext/v8/upstream/2.0.6/test/cctest/test-accessors.cc +450 -0
  348. data/ext/v8/upstream/2.0.6/test/cctest/test-alloc.cc +215 -0
  349. data/ext/v8/upstream/2.0.6/test/cctest/test-api.cc +8699 -0
  350. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-arm.cc +227 -0
  351. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-ia32.cc +395 -0
  352. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-x64.cc +292 -0
  353. data/ext/v8/upstream/2.0.6/test/cctest/test-ast.cc +97 -0
  354. data/ext/v8/upstream/2.0.6/test/cctest/test-compiler.cc +318 -0
  355. data/ext/v8/upstream/2.0.6/test/cctest/test-conversions.cc +130 -0
  356. data/ext/v8/upstream/2.0.6/test/cctest/test-debug.cc +5788 -0
  357. data/ext/v8/upstream/2.0.6/test/cctest/test-decls.cc +593 -0
  358. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-arm.cc +281 -0
  359. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-ia32.cc +418 -0
  360. data/ext/v8/upstream/2.0.6/test/cctest/test-flags.cc +234 -0
  361. data/ext/v8/upstream/2.0.6/test/cctest/test-func-name-inference.cc +267 -0
  362. data/ext/v8/upstream/2.0.6/test/cctest/test-hashmap.cc +176 -0
  363. data/ext/v8/upstream/2.0.6/test/cctest/test-heap-profiler.cc +396 -0
  364. data/ext/v8/upstream/2.0.6/test/cctest/test-heap.cc +796 -0
  365. data/ext/v8/upstream/2.0.6/test/cctest/test-list.cc +101 -0
  366. data/ext/v8/upstream/2.0.6/test/cctest/test-lock.cc +63 -0
  367. data/ext/v8/upstream/2.0.6/test/cctest/test-log-stack-tracer.cc +372 -0
  368. data/ext/v8/upstream/2.0.6/test/cctest/test-log-utils.cc +310 -0
  369. data/ext/v8/upstream/2.0.6/test/cctest/test-log.cc +1081 -0
  370. data/ext/v8/upstream/2.0.6/test/cctest/test-macro-assembler-x64.cc +2104 -0
  371. data/ext/v8/upstream/2.0.6/test/cctest/test-mark-compact.cc +341 -0
  372. data/ext/v8/upstream/2.0.6/test/cctest/test-parsing.cc +129 -0
  373. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-linux.cc +80 -0
  374. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-macos.cc +10 -0
  375. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-nullos.cc +80 -0
  376. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-win32.cc +26 -0
  377. data/ext/v8/upstream/2.0.6/test/cctest/test-regexp.cc +1815 -0
  378. data/ext/v8/upstream/2.0.6/test/cctest/test-serialize.cc +438 -0
  379. data/ext/v8/upstream/2.0.6/test/cctest/test-sockets.cc +162 -0
  380. data/ext/v8/upstream/2.0.6/test/cctest/test-spaces.cc +248 -0
  381. data/ext/v8/upstream/2.0.6/test/cctest/test-strings.cc +432 -0
  382. data/ext/v8/upstream/2.0.6/test/cctest/test-thread-termination.cc +290 -0
  383. data/ext/v8/upstream/2.0.6/test/cctest/test-threads.cc +52 -0
  384. data/ext/v8/upstream/2.0.6/test/cctest/test-utils.cc +186 -0
  385. data/ext/v8/upstream/2.0.6/test/cctest/test-version.cc +89 -0
  386. data/ext/v8/upstream/2.0.6/test/cctest/testcfg.py +108 -0
  387. data/ext/v8/upstream/2.0.6/test/es5conform/README +14 -0
  388. data/ext/v8/upstream/2.0.6/test/es5conform/es5conform.status +226 -0
  389. data/ext/v8/upstream/2.0.6/test/es5conform/harness-adapt.js +74 -0
  390. data/ext/v8/upstream/2.0.6/test/es5conform/testcfg.py +108 -0
  391. data/ext/v8/upstream/2.0.6/test/message/message.status +31 -0
  392. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.js +31 -0
  393. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.out +30 -0
  394. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.js +33 -0
  395. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.out +30 -0
  396. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.js +32 -0
  397. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.out +30 -0
  398. data/ext/v8/upstream/2.0.6/test/message/simple-throw.js +28 -0
  399. data/ext/v8/upstream/2.0.6/test/message/simple-throw.out +30 -0
  400. data/ext/v8/upstream/2.0.6/test/message/testcfg.py +135 -0
  401. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.js +51 -0
  402. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.out +26 -0
  403. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.js +39 -0
  404. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.out +28 -0
  405. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.js +34 -0
  406. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.out +30 -0
  407. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.js +34 -0
  408. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.out +30 -0
  409. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.js +34 -0
  410. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.out +30 -0
  411. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.js +37 -0
  412. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.out +28 -0
  413. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.js +32 -0
  414. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.out +30 -0
  415. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.js +32 -0
  416. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.out +30 -0
  417. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.js +32 -0
  418. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.out +30 -0
  419. data/ext/v8/upstream/2.0.6/test/mjsunit/api-call-after-bypassed-exception.js +39 -0
  420. data/ext/v8/upstream/2.0.6/test/mjsunit/apply.js +196 -0
  421. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-apply.js +134 -0
  422. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-call-apply.js +41 -0
  423. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-enum.js +52 -0
  424. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-indirect.js +47 -0
  425. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-lazy.js +47 -0
  426. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-opt.js +130 -0
  427. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-read-and-assignment.js +164 -0
  428. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments.js +97 -0
  429. data/ext/v8/upstream/2.0.6/test/mjsunit/array-concat.js +120 -0
  430. data/ext/v8/upstream/2.0.6/test/mjsunit/array-constructor.js +119 -0
  431. data/ext/v8/upstream/2.0.6/test/mjsunit/array-functions-prototype.js +159 -0
  432. data/ext/v8/upstream/2.0.6/test/mjsunit/array-indexing.js +66 -0
  433. data/ext/v8/upstream/2.0.6/test/mjsunit/array-iteration.js +228 -0
  434. data/ext/v8/upstream/2.0.6/test/mjsunit/array-join.js +45 -0
  435. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length-number-conversion.js +53 -0
  436. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length.js +111 -0
  437. data/ext/v8/upstream/2.0.6/test/mjsunit/array-reduce.js +514 -0
  438. data/ext/v8/upstream/2.0.6/test/mjsunit/array-sort.js +362 -0
  439. data/ext/v8/upstream/2.0.6/test/mjsunit/array-splice.js +314 -0
  440. data/ext/v8/upstream/2.0.6/test/mjsunit/ascii-regexp-subject.js +49 -0
  441. data/ext/v8/upstream/2.0.6/test/mjsunit/big-array-literal.js +111 -0
  442. data/ext/v8/upstream/2.0.6/test/mjsunit/big-object-literal.js +114 -0
  443. data/ext/v8/upstream/2.0.6/test/mjsunit/binary-operation-overwrite.js +36 -0
  444. data/ext/v8/upstream/2.0.6/test/mjsunit/bit-not.js +75 -0
  445. data/ext/v8/upstream/2.0.6/test/mjsunit/bitwise-operations-undefined.js +49 -0
  446. data/ext/v8/upstream/2.0.6/test/mjsunit/body-not-visible.js +39 -0
  447. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-1344252.js +79 -0
  448. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-222.js +42 -0
  449. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-223.js +39 -0
  450. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-900066.js +38 -0
  451. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-941049.js +100 -0
  452. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function-call.js +38 -0
  453. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function.js +63 -0
  454. data/ext/v8/upstream/2.0.6/test/mjsunit/call.js +87 -0
  455. data/ext/v8/upstream/2.0.6/test/mjsunit/char-escape.js +53 -0
  456. data/ext/v8/upstream/2.0.6/test/mjsunit/class-of-builtins.js +50 -0
  457. data/ext/v8/upstream/2.0.6/test/mjsunit/closure.js +37 -0
  458. data/ext/v8/upstream/2.0.6/test/mjsunit/codegen-coverage.js +91 -0
  459. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-character.js +50 -0
  460. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-nan.js +66 -0
  461. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/countoperation.js +111 -0
  462. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/function-call.js +52 -0
  463. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/globals.js +65 -0
  464. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/jsnatives.js +33 -0
  465. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals-assignment.js +104 -0
  466. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals.js +52 -0
  467. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/loops.js +35 -0
  468. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/objectliterals.js +57 -0
  469. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/property-simple.js +39 -0
  470. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/short-circuit.js +102 -0
  471. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/thisfunction.js +35 -0
  472. data/ext/v8/upstream/2.0.6/test/mjsunit/const-declaration.js +172 -0
  473. data/ext/v8/upstream/2.0.6/test/mjsunit/const-eval-init.js +111 -0
  474. data/ext/v8/upstream/2.0.6/test/mjsunit/const-redecl.js +220 -0
  475. data/ext/v8/upstream/2.0.6/test/mjsunit/const.js +70 -0
  476. data/ext/v8/upstream/2.0.6/test/mjsunit/constant-folding.js +232 -0
  477. data/ext/v8/upstream/2.0.6/test/mjsunit/context-variable-assignments.js +37 -0
  478. data/ext/v8/upstream/2.0.6/test/mjsunit/cyclic-array-to-string.js +65 -0
  479. data/ext/v8/upstream/2.0.6/test/mjsunit/cyrillic.js +199 -0
  480. data/ext/v8/upstream/2.0.6/test/mjsunit/d8-os.js +180 -0
  481. data/ext/v8/upstream/2.0.6/test/mjsunit/date-parse.js +268 -0
  482. data/ext/v8/upstream/2.0.6/test/mjsunit/date.js +149 -0
  483. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace-text.js +122 -0
  484. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace.js +272 -0
  485. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-breakpoints.js +120 -0
  486. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-changebreakpoint.js +108 -0
  487. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpoint.js +101 -0
  488. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpointgroup.js +117 -0
  489. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-compile-event.js +126 -0
  490. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-conditional-breakpoints.js +171 -0
  491. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructed-by.js +60 -0
  492. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructor.js +78 -0
  493. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-continue.js +114 -0
  494. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-enable-disable-breakpoints.js +90 -0
  495. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-arguments.js +93 -0
  496. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-bool-constructor.js +80 -0
  497. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-locals.js +132 -0
  498. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-recursive.js +167 -0
  499. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-with.js +77 -0
  500. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate.js +118 -0
  501. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-event-listener.js +73 -0
  502. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-handle.js +252 -0
  503. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-ignore-breakpoints.js +89 -0
  504. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-mirror-cache.js +85 -0
  505. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-multiple-breakpoints.js +105 -0
  506. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-referenced-by.js +112 -0
  507. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-references.js +118 -0
  508. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scopes.js +761 -0
  509. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script-breakpoints.js +112 -0
  510. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script.js +92 -0
  511. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scripts-request.js +108 -0
  512. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-setbreakpoint.js +165 -0
  513. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceinfo.js +352 -0
  514. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceslice.js +74 -0
  515. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step-stub-callfunction.js +87 -0
  516. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step.js +82 -0
  517. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-accessor.js +248 -0
  518. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-builtin.js +78 -0
  519. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-call-function-stub.js +115 -0
  520. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-constructor.js +78 -0
  521. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-function-call.js +149 -0
  522. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepnext-do-while.js +79 -0
  523. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-recursive-function.js +106 -0
  524. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-to-builtin.js +84 -0
  525. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-suspend.js +96 -0
  526. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-version.js +90 -0
  527. data/ext/v8/upstream/2.0.6/test/mjsunit/declare-locally.js +43 -0
  528. data/ext/v8/upstream/2.0.6/test/mjsunit/deep-recursion.js +66 -0
  529. data/ext/v8/upstream/2.0.6/test/mjsunit/delay-syntax-error.js +41 -0
  530. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-global-properties.js +37 -0
  531. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-eval.js +32 -0
  532. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-with.js +34 -0
  533. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-vars-from-eval.js +40 -0
  534. data/ext/v8/upstream/2.0.6/test/mjsunit/delete.js +163 -0
  535. data/ext/v8/upstream/2.0.6/test/mjsunit/div-mod.js +157 -0
  536. data/ext/v8/upstream/2.0.6/test/mjsunit/do-not-strip-fc.js +31 -0
  537. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-enum-array-holes.js +35 -0
  538. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-reinit-global-var.js +47 -0
  539. data/ext/v8/upstream/2.0.6/test/mjsunit/double-equals.js +114 -0
  540. data/ext/v8/upstream/2.0.6/test/mjsunit/dtoa.js +32 -0
  541. data/ext/v8/upstream/2.0.6/test/mjsunit/enumeration-order.js +109 -0
  542. data/ext/v8/upstream/2.0.6/test/mjsunit/error-constructors.js +32 -0
  543. data/ext/v8/upstream/2.0.6/test/mjsunit/escape.js +118 -0
  544. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-enclosing-function-name.js +76 -0
  545. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-typeof-non-existing.js +35 -0
  546. data/ext/v8/upstream/2.0.6/test/mjsunit/eval.js +157 -0
  547. data/ext/v8/upstream/2.0.6/test/mjsunit/execScript-case-insensitive.js +34 -0
  548. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-arguments.js +54 -0
  549. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-commas.js +46 -0
  550. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-null-or-undefined.js +33 -0
  551. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-special-cases.js +64 -0
  552. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in.js +86 -0
  553. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-as-prototype.js +36 -0
  554. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-name.js +34 -0
  555. data/ext/v8/upstream/2.0.6/test/mjsunit/function-arguments-null.js +30 -0
  556. data/ext/v8/upstream/2.0.6/test/mjsunit/function-caller.js +48 -0
  557. data/ext/v8/upstream/2.0.6/test/mjsunit/function-names.js +133 -0
  558. data/ext/v8/upstream/2.0.6/test/mjsunit/function-property.js +29 -0
  559. data/ext/v8/upstream/2.0.6/test/mjsunit/function-prototype.js +98 -0
  560. data/ext/v8/upstream/2.0.6/test/mjsunit/function-source.js +49 -0
  561. data/ext/v8/upstream/2.0.6/test/mjsunit/function.js +83 -0
  562. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-accessors.js +85 -0
  563. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-natives.js +159 -0
  564. data/ext/v8/upstream/2.0.6/test/mjsunit/get-own-property-descriptor.js +51 -0
  565. data/ext/v8/upstream/2.0.6/test/mjsunit/get-prototype-of.js +68 -0
  566. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-prototype.js +50 -0
  567. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-value-prototype.js +35 -0
  568. data/ext/v8/upstream/2.0.6/test/mjsunit/global-const-var-conflicts.js +57 -0
  569. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-ic.js +45 -0
  570. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-keyed.js +38 -0
  571. data/ext/v8/upstream/2.0.6/test/mjsunit/global-ic.js +48 -0
  572. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval-in-with.js +59 -0
  573. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval.js +85 -0
  574. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-nested-eval.js +66 -0
  575. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-eval.js +34 -0
  576. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-with.js +43 -0
  577. data/ext/v8/upstream/2.0.6/test/mjsunit/greedy.js +60 -0
  578. data/ext/v8/upstream/2.0.6/test/mjsunit/has-own-property.js +38 -0
  579. data/ext/v8/upstream/2.0.6/test/mjsunit/html-comments.js +57 -0
  580. data/ext/v8/upstream/2.0.6/test/mjsunit/html-string-funcs.js +47 -0
  581. data/ext/v8/upstream/2.0.6/test/mjsunit/if-in-undefined.js +36 -0
  582. data/ext/v8/upstream/2.0.6/test/mjsunit/in.js +159 -0
  583. data/ext/v8/upstream/2.0.6/test/mjsunit/indexed-accessors.js +120 -0
  584. data/ext/v8/upstream/2.0.6/test/mjsunit/instanceof.js +93 -0
  585. data/ext/v8/upstream/2.0.6/test/mjsunit/integer-to-string.js +35 -0
  586. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-lhs.js +65 -0
  587. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-source-element.js +31 -0
  588. data/ext/v8/upstream/2.0.6/test/mjsunit/json.js +207 -0
  589. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-ic.js +236 -0
  590. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-storage-extend.js +55 -0
  591. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-allocation.js +300 -0
  592. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-literal.js +56 -0
  593. data/ext/v8/upstream/2.0.6/test/mjsunit/lazy-load.js +34 -0
  594. data/ext/v8/upstream/2.0.6/test/mjsunit/leakcheck.js +53 -0
  595. data/ext/v8/upstream/2.0.6/test/mjsunit/length.js +78 -0
  596. data/ext/v8/upstream/2.0.6/test/mjsunit/local-load-from-eval.js +39 -0
  597. data/ext/v8/upstream/2.0.6/test/mjsunit/math-min-max.js +105 -0
  598. data/ext/v8/upstream/2.0.6/test/mjsunit/megamorphic-callbacks.js +70 -0
  599. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-array.js +138 -0
  600. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-boolean.js +59 -0
  601. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-date.js +77 -0
  602. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-error.js +94 -0
  603. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-function.js +90 -0
  604. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-null.js +50 -0
  605. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-number.js +77 -0
  606. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-object.js +227 -0
  607. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-regexp.js +110 -0
  608. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-script.js +100 -0
  609. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-string.js +89 -0
  610. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-undefined.js +50 -0
  611. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-unresolved-function.js +81 -0
  612. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.js +203 -0
  613. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.status +66 -0
  614. data/ext/v8/upstream/2.0.6/test/mjsunit/mul-exhaustive.js +4511 -0
  615. data/ext/v8/upstream/2.0.6/test/mjsunit/multiple-return.js +62 -0
  616. data/ext/v8/upstream/2.0.6/test/mjsunit/negate-zero.js +42 -0
  617. data/ext/v8/upstream/2.0.6/test/mjsunit/negate.js +59 -0
  618. data/ext/v8/upstream/2.0.6/test/mjsunit/new.js +56 -0
  619. data/ext/v8/upstream/2.0.6/test/mjsunit/newline-in-string.js +46 -0
  620. data/ext/v8/upstream/2.0.6/test/mjsunit/no-branch-elimination.js +36 -0
  621. data/ext/v8/upstream/2.0.6/test/mjsunit/no-octal-constants-above-256.js +32 -0
  622. data/ext/v8/upstream/2.0.6/test/mjsunit/no-semicolon.js +45 -0
  623. data/ext/v8/upstream/2.0.6/test/mjsunit/non-ascii-replace.js +30 -0
  624. data/ext/v8/upstream/2.0.6/test/mjsunit/nul-characters.js +38 -0
  625. data/ext/v8/upstream/2.0.6/test/mjsunit/number-limits.js +47 -0
  626. data/ext/v8/upstream/2.0.6/test/mjsunit/number-string-index-call.js +32 -0
  627. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring-small.js +395 -0
  628. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring.js +338 -0
  629. data/ext/v8/upstream/2.0.6/test/mjsunit/obj-construct.js +46 -0
  630. data/ext/v8/upstream/2.0.6/test/mjsunit/object-create.js +250 -0
  631. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal-gc.js +66 -0
  632. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal.js +105 -0
  633. data/ext/v8/upstream/2.0.6/test/mjsunit/override-read-only-property.js +64 -0
  634. data/ext/v8/upstream/2.0.6/test/mjsunit/parse-int-float.js +85 -0
  635. data/ext/v8/upstream/2.0.6/test/mjsunit/property-load-across-eval.js +85 -0
  636. data/ext/v8/upstream/2.0.6/test/mjsunit/property-object-key.js +36 -0
  637. data/ext/v8/upstream/2.0.6/test/mjsunit/proto.js +33 -0
  638. data/ext/v8/upstream/2.0.6/test/mjsunit/prototype.js +93 -0
  639. data/ext/v8/upstream/2.0.6/test/mjsunit/receiver-in-with-calls.js +47 -0
  640. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-UC16.js +47 -0
  641. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-call-as-function.js +36 -0
  642. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-capture.js +57 -0
  643. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-captures.js +31 -0
  644. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-indexof.js +77 -0
  645. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-lookahead.js +166 -0
  646. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-loop-capture.js +29 -0
  647. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline-stack-trace.js +116 -0
  648. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline.js +112 -0
  649. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-standalones.js +78 -0
  650. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-static.js +167 -0
  651. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-string-methods.js +51 -0
  652. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp.js +390 -0
  653. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1030466.js +45 -0
  654. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1036894.js +38 -0
  655. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1039610.js +29 -0
  656. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1050043.js +51 -0
  657. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1062422.js +30 -0
  658. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1066899.js +37 -0
  659. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1081309.js +110 -0
  660. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1102760.js +35 -0
  661. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1110164.js +46 -0
  662. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1112051.js +33 -0
  663. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1114040.js +58 -0
  664. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1134697.js +31 -0
  665. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-114.js +43 -0
  666. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-116.js +40 -0
  667. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1170187.js +80 -0
  668. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1173979.js +48 -0
  669. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1175390.js +30 -0
  670. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177518.js +39 -0
  671. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177809.js +31 -0
  672. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1178598.js +90 -0
  673. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1182832.js +38 -0
  674. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1187524.js +34 -0
  675. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199401.js +75 -0
  676. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199637.js +78 -0
  677. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1200351.js +2032 -0
  678. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1201933.js +40 -0
  679. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1203459.js +29 -0
  680. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1207276.js +36 -0
  681. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213516.js +40 -0
  682. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213575.js +41 -0
  683. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1215653.js +365 -0
  684. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-124.js +57 -0
  685. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1254366.js +38 -0
  686. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1327557.js +36 -0
  687. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1341167.js +33 -0
  688. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1346700.js +29 -0
  689. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-137.js +46 -0
  690. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1439135.js +40 -0
  691. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-149.js +28 -0
  692. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1493017.js +52 -0
  693. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-155924.js +46 -0
  694. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-171.js +41 -0
  695. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-176.js +50 -0
  696. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-186.js +72 -0
  697. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-187.js +30 -0
  698. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-189.js +36 -0
  699. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-191.js +42 -0
  700. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1919169.js +40 -0
  701. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-192.js +38 -0
  702. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-193.js +44 -0
  703. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-20070207.js +42 -0
  704. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-201.js +37 -0
  705. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-219.js +176 -0
  706. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-220.js +31 -0
  707. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-221.js +34 -0
  708. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-2249423.js +40 -0
  709. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-225.js +32 -0
  710. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-227.js +33 -0
  711. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-231.js +92 -0
  712. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-233.js +39 -0
  713. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-244.js +67 -0
  714. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-246.js +31 -0
  715. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-253.js +31 -0
  716. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-254.js +58 -0
  717. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-259.js +33 -0
  718. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-260.js +33 -0
  719. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-263.js +38 -0
  720. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-265.js +64 -0
  721. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-267.js +35 -0
  722. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-269.js +49 -0
  723. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-279.js +62 -0
  724. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-284.js +50 -0
  725. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-286.js +36 -0
  726. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-294.js +43 -0
  727. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-312.js +31 -0
  728. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-317.js +31 -0
  729. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-318.js +35 -0
  730. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-326.js +40 -0
  731. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-334.js +90 -0
  732. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-341.js +36 -0
  733. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-345.js +51 -0
  734. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-349.js +32 -0
  735. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-35.js +33 -0
  736. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-351.js +31 -0
  737. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-386.js +47 -0
  738. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-392.js +34 -0
  739. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-394.js +47 -0
  740. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-396.js +39 -0
  741. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-397.js +34 -0
  742. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-399.js +32 -0
  743. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-406.js +69 -0
  744. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-416.js +38 -0
  745. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-475.js +28 -0
  746. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-483.js +35 -0
  747. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-485.js +64 -0
  748. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-486.js +30 -0
  749. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-490.js +48 -0
  750. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-491.js +47 -0
  751. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-492.js +52 -0
  752. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-496.js +39 -0
  753. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-502.js +38 -0
  754. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-503.js +63 -0
  755. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-515.js +40 -0
  756. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-524.js +32 -0
  757. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-526.js +32 -0
  758. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-540.js +47 -0
  759. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-545.js +47 -0
  760. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-57.js +32 -0
  761. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-580.js +55 -0
  762. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-588599.js +31 -0
  763. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-6-9-regexp.js +30 -0
  764. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-662254.js +40 -0
  765. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-666721.js +53 -0
  766. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-667061.js +90 -0
  767. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-670147.js +34 -0
  768. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-674753.js +87 -0
  769. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-676025.js +31 -0
  770. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-678525.js +59 -0
  771. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-682649.js +30 -0
  772. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-69.js +43 -0
  773. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-734862.js +37 -0
  774. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-737588.js +34 -0
  775. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-74.js +41 -0
  776. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-780423.js +39 -0
  777. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-799761.js +92 -0
  778. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-806473.js +60 -0
  779. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-842017.js +60 -0
  780. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-86.js +46 -0
  781. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-87.js +58 -0
  782. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-874178.js +32 -0
  783. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-875031.js +37 -0
  784. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-877615.js +37 -0
  785. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-892742.js +50 -0
  786. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900055.js +42 -0
  787. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900966.js +38 -0
  788. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-91.js +38 -0
  789. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-925537.js +42 -0
  790. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-937896.js +50 -0
  791. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-990205.js +35 -0
  792. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-992733.js +35 -0
  793. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-996542.js +40 -0
  794. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-998565.js +51 -0
  795. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-crbug-18639.js +34 -0
  796. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-r3391.js +77 -0
  797. data/ext/v8/upstream/2.0.6/test/mjsunit/scanner.js +30 -0
  798. data/ext/v8/upstream/2.0.6/test/mjsunit/short-circuit-boolean.js +46 -0
  799. data/ext/v8/upstream/2.0.6/test/mjsunit/simple-constructor.js +140 -0
  800. data/ext/v8/upstream/2.0.6/test/mjsunit/sin-cos.js +45 -0
  801. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-negative-zero.js +100 -0
  802. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-ops.js +671 -0
  803. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array-reverse.js +131 -0
  804. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array.js +41 -0
  805. data/ext/v8/upstream/2.0.6/test/mjsunit/stack-traces.js +204 -0
  806. data/ext/v8/upstream/2.0.6/test/mjsunit/str-to-num.js +158 -0
  807. data/ext/v8/upstream/2.0.6/test/mjsunit/stress-array-push.js +34 -0
  808. data/ext/v8/upstream/2.0.6/test/mjsunit/strict-equals.js +90 -0
  809. data/ext/v8/upstream/2.0.6/test/mjsunit/string-add.js +195 -0
  810. data/ext/v8/upstream/2.0.6/test/mjsunit/string-case.js +28 -0
  811. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charat.js +53 -0
  812. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charcodeat.js +192 -0
  813. data/ext/v8/upstream/2.0.6/test/mjsunit/string-compare-alignment.js +47 -0
  814. data/ext/v8/upstream/2.0.6/test/mjsunit/string-flatten.js +37 -0
  815. data/ext/v8/upstream/2.0.6/test/mjsunit/string-index.js +154 -0
  816. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-1.js +99 -0
  817. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-2.js +68 -0
  818. data/ext/v8/upstream/2.0.6/test/mjsunit/string-lastindexof.js +88 -0
  819. data/ext/v8/upstream/2.0.6/test/mjsunit/string-localecompare.js +40 -0
  820. data/ext/v8/upstream/2.0.6/test/mjsunit/string-match.js +149 -0
  821. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace-gc.js +57 -0
  822. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace.js +182 -0
  823. data/ext/v8/upstream/2.0.6/test/mjsunit/string-search.js +30 -0
  824. data/ext/v8/upstream/2.0.6/test/mjsunit/string-split.js +126 -0
  825. data/ext/v8/upstream/2.0.6/test/mjsunit/substr.js +65 -0
  826. data/ext/v8/upstream/2.0.6/test/mjsunit/switch.js +289 -0
  827. data/ext/v8/upstream/2.0.6/test/mjsunit/testcfg.py +137 -0
  828. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-isarray.js +48 -0
  829. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-splice-webkit.js +62 -0
  830. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/object-keys.js +68 -0
  831. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/regexp-pcre.js +6603 -0
  832. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/string-trim.js +107 -0
  833. data/ext/v8/upstream/2.0.6/test/mjsunit/this-in-callbacks.js +47 -0
  834. data/ext/v8/upstream/2.0.6/test/mjsunit/this.js +46 -0
  835. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-and-catch-function.js +50 -0
  836. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-exception-for-null-access.js +37 -0
  837. data/ext/v8/upstream/2.0.6/test/mjsunit/to-precision.js +82 -0
  838. data/ext/v8/upstream/2.0.6/test/mjsunit/to_number_order.js +129 -0
  839. data/ext/v8/upstream/2.0.6/test/mjsunit/tobool.js +36 -0
  840. data/ext/v8/upstream/2.0.6/test/mjsunit/toint32.js +129 -0
  841. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/codemap.js +180 -0
  842. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/consarray.js +60 -0
  843. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/csvparser.js +79 -0
  844. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/logreader.js +98 -0
  845. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile.js +348 -0
  846. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile_view.js +95 -0
  847. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/splaytree.js +166 -0
  848. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.default +55 -0
  849. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.gc-state +21 -0
  850. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.ignore-unknown +51 -0
  851. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.separate-ic +61 -0
  852. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor.js +409 -0
  853. data/ext/v8/upstream/2.0.6/test/mjsunit/top-level-assignments.js +107 -0
  854. data/ext/v8/upstream/2.0.6/test/mjsunit/touint32.js +72 -0
  855. data/ext/v8/upstream/2.0.6/test/mjsunit/transcendentals.js +49 -0
  856. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-extension-object.js +58 -0
  857. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-scopes.js +42 -0
  858. data/ext/v8/upstream/2.0.6/test/mjsunit/try-finally-nested.js +46 -0
  859. data/ext/v8/upstream/2.0.6/test/mjsunit/try.js +394 -0
  860. data/ext/v8/upstream/2.0.6/test/mjsunit/typeof.js +40 -0
  861. data/ext/v8/upstream/2.0.6/test/mjsunit/undeletable-functions.js +181 -0
  862. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-case-overoptimization.js +35 -0
  863. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-string-to-number.js +46 -0
  864. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-test.js +9169 -0
  865. data/ext/v8/upstream/2.0.6/test/mjsunit/unusual-constructor.js +38 -0
  866. data/ext/v8/upstream/2.0.6/test/mjsunit/uri.js +78 -0
  867. data/ext/v8/upstream/2.0.6/test/mjsunit/value-callic-prototype-change.js +94 -0
  868. data/ext/v8/upstream/2.0.6/test/mjsunit/var.js +37 -0
  869. data/ext/v8/upstream/2.0.6/test/mjsunit/with-function-expression.js +36 -0
  870. data/ext/v8/upstream/2.0.6/test/mjsunit/with-leave.js +61 -0
  871. data/ext/v8/upstream/2.0.6/test/mjsunit/with-parameter-access.js +47 -0
  872. data/ext/v8/upstream/2.0.6/test/mjsunit/with-prototype.js +44 -0
  873. data/ext/v8/upstream/2.0.6/test/mjsunit/with-value.js +38 -0
  874. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla-shell-emulation.js +37 -0
  875. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla.status +815 -0
  876. data/ext/v8/upstream/2.0.6/test/mozilla/testcfg.py +138 -0
  877. data/ext/v8/upstream/2.0.6/test/sputnik/README +6 -0
  878. data/ext/v8/upstream/2.0.6/test/sputnik/sputnik.status +318 -0
  879. data/ext/v8/upstream/2.0.6/test/sputnik/testcfg.py +112 -0
  880. data/ext/v8/upstream/2.0.6/tools/codemap.js +258 -0
  881. data/ext/v8/upstream/2.0.6/tools/consarray.js +93 -0
  882. data/ext/v8/upstream/2.0.6/tools/csvparser.js +98 -0
  883. data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +620 -0
  884. data/ext/v8/upstream/2.0.6/tools/js2c.py +376 -0
  885. data/ext/v8/upstream/2.0.6/tools/js2c.pyc +0 -0
  886. data/ext/v8/upstream/2.0.6/tools/jsmin.py +280 -0
  887. data/ext/v8/upstream/2.0.6/tools/jsmin.pyc +0 -0
  888. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +24 -0
  889. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +78 -0
  890. data/ext/v8/upstream/2.0.6/tools/logreader.js +320 -0
  891. data/ext/v8/upstream/2.0.6/tools/mac-nm +18 -0
  892. data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +6 -0
  893. data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +7 -0
  894. data/ext/v8/upstream/2.0.6/tools/oprofile/common +19 -0
  895. data/ext/v8/upstream/2.0.6/tools/oprofile/dump +7 -0
  896. data/ext/v8/upstream/2.0.6/tools/oprofile/report +7 -0
  897. data/ext/v8/upstream/2.0.6/tools/oprofile/reset +7 -0
  898. data/ext/v8/upstream/2.0.6/tools/oprofile/run +14 -0
  899. data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +7 -0
  900. data/ext/v8/upstream/2.0.6/tools/oprofile/start +7 -0
  901. data/ext/v8/upstream/2.0.6/tools/presubmit.py +299 -0
  902. data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +120 -0
  903. data/ext/v8/upstream/2.0.6/tools/profile.js +621 -0
  904. data/ext/v8/upstream/2.0.6/tools/profile_view.js +224 -0
  905. data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +77 -0
  906. data/ext/v8/upstream/2.0.6/tools/splaytree.js +322 -0
  907. data/ext/v8/upstream/2.0.6/tools/splaytree.py +226 -0
  908. data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +456 -0
  909. data/ext/v8/upstream/2.0.6/tools/test.py +1370 -0
  910. data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +53 -0
  911. data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +731 -0
  912. data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +535 -0
  913. data/ext/v8/upstream/2.0.6/tools/utils.py +82 -0
  914. data/ext/v8/upstream/2.0.6/tools/utils.pyc +0 -0
  915. data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +71 -0
  916. data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +14 -0
  917. data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +35 -0
  918. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +199 -0
  919. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +199 -0
  920. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +201 -0
  921. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +6 -0
  922. data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +17 -0
  923. data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +13 -0
  924. data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +6 -0
  925. data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +24 -0
  926. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +101 -0
  927. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +223 -0
  928. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +74 -0
  929. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +223 -0
  930. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +971 -0
  931. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +983 -0
  932. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +959 -0
  933. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +255 -0
  934. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +243 -0
  935. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
  936. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +151 -0
  937. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +151 -0
  938. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +151 -0
  939. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +151 -0
  940. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +151 -0
  941. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +151 -0
  942. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +151 -0
  943. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +153 -0
  944. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +142 -0
  945. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
  946. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
  947. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
  948. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +101 -0
  949. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +223 -0
  950. data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +13 -0
  951. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +5 -0
  952. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +137 -0
  953. data/ext/v8/upstream/scons/CHANGES.txt +5183 -0
  954. data/ext/v8/upstream/scons/LICENSE.txt +20 -0
  955. data/ext/v8/upstream/scons/MANIFEST +202 -0
  956. data/ext/v8/upstream/scons/PKG-INFO +13 -0
  957. data/ext/v8/upstream/scons/README.txt +273 -0
  958. data/ext/v8/upstream/scons/RELEASE.txt +1040 -0
  959. data/ext/v8/upstream/scons/engine/SCons/Action.py +1256 -0
  960. data/ext/v8/upstream/scons/engine/SCons/Builder.py +868 -0
  961. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +217 -0
  962. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +794 -0
  963. data/ext/v8/upstream/scons/engine/SCons/Debug.py +237 -0
  964. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +485 -0
  965. data/ext/v8/upstream/scons/engine/SCons/Environment.py +2327 -0
  966. data/ext/v8/upstream/scons/engine/SCons/Errors.py +207 -0
  967. data/ext/v8/upstream/scons/engine/SCons/Executor.py +636 -0
  968. data/ext/v8/upstream/scons/engine/SCons/Job.py +435 -0
  969. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +292 -0
  970. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +153 -0
  971. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +3220 -0
  972. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +128 -0
  973. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +1341 -0
  974. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +50 -0
  975. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +50 -0
  976. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +50 -0
  977. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +50 -0
  978. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +76 -0
  979. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +74 -0
  980. data/ext/v8/upstream/scons/engine/SCons/PathList.py +232 -0
  981. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +236 -0
  982. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +70 -0
  983. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +55 -0
  984. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +46 -0
  985. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +46 -0
  986. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +44 -0
  987. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +58 -0
  988. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +264 -0
  989. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +50 -0
  990. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +386 -0
  991. data/ext/v8/upstream/scons/engine/SCons/SConf.py +1038 -0
  992. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +381 -0
  993. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +132 -0
  994. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +74 -0
  995. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +111 -0
  996. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +320 -0
  997. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +48 -0
  998. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +378 -0
  999. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +103 -0
  1000. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +55 -0
  1001. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +415 -0
  1002. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +386 -0
  1003. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +1360 -0
  1004. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +944 -0
  1005. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +642 -0
  1006. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +414 -0
  1007. data/ext/v8/upstream/scons/engine/SCons/Sig.py +63 -0
  1008. data/ext/v8/upstream/scons/engine/SCons/Subst.py +911 -0
  1009. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +1030 -0
  1010. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +61 -0
  1011. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +65 -0
  1012. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +73 -0
  1013. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +247 -0
  1014. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +324 -0
  1015. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  1016. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  1017. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
  1018. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
  1019. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
  1020. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
  1021. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
  1022. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +104 -0
  1023. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
  1024. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +64 -0
  1025. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +64 -0
  1026. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +71 -0
  1027. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +675 -0
  1028. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +82 -0
  1029. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +74 -0
  1030. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +80 -0
  1031. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +76 -0
  1032. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +71 -0
  1033. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +63 -0
  1034. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +78 -0
  1035. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +82 -0
  1036. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +99 -0
  1037. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +114 -0
  1038. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +58 -0
  1039. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +50 -0
  1040. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +224 -0
  1041. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +64 -0
  1042. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +125 -0
  1043. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +94 -0
  1044. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +62 -0
  1045. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +62 -0
  1046. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +63 -0
  1047. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +98 -0
  1048. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +63 -0
  1049. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +90 -0
  1050. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +73 -0
  1051. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +53 -0
  1052. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +80 -0
  1053. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +64 -0
  1054. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +63 -0
  1055. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +81 -0
  1056. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +85 -0
  1057. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +53 -0
  1058. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +77 -0
  1059. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +59 -0
  1060. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +52 -0
  1061. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +72 -0
  1062. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +90 -0
  1063. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +59 -0
  1064. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +60 -0
  1065. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +229 -0
  1066. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +490 -0
  1067. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +71 -0
  1068. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +110 -0
  1069. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +234 -0
  1070. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +138 -0
  1071. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +79 -0
  1072. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +99 -0
  1073. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +121 -0
  1074. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +112 -0
  1075. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +63 -0
  1076. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +77 -0
  1077. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +90 -0
  1078. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +159 -0
  1079. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +64 -0
  1080. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +266 -0
  1081. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +50 -0
  1082. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +269 -0
  1083. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +1439 -0
  1084. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +208 -0
  1085. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +107 -0
  1086. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +72 -0
  1087. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
  1088. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  1089. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +526 -0
  1090. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
  1091. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  1092. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  1093. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  1094. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  1095. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  1096. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  1097. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +78 -0
  1098. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +83 -0
  1099. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +108 -0
  1100. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +336 -0
  1101. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +121 -0
  1102. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +70 -0
  1103. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +132 -0
  1104. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +68 -0
  1105. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +58 -0
  1106. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +53 -0
  1107. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +63 -0
  1108. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +67 -0
  1109. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +142 -0
  1110. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +58 -0
  1111. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +63 -0
  1112. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +64 -0
  1113. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +64 -0
  1114. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +77 -0
  1115. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +186 -0
  1116. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +73 -0
  1117. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +805 -0
  1118. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +175 -0
  1119. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +53 -0
  1120. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +100 -0
  1121. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +131 -0
  1122. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +100 -0
  1123. data/ext/v8/upstream/scons/engine/SCons/Util.py +1645 -0
  1124. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +91 -0
  1125. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +107 -0
  1126. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +139 -0
  1127. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +109 -0
  1128. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +147 -0
  1129. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +317 -0
  1130. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +228 -0
  1131. data/ext/v8/upstream/scons/engine/SCons/__init__.py +49 -0
  1132. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +302 -0
  1133. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +98 -0
  1134. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
  1135. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +124 -0
  1136. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
  1137. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +583 -0
  1138. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +176 -0
  1139. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +325 -0
  1140. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
  1141. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
  1142. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +187 -0
  1143. data/ext/v8/upstream/scons/engine/SCons/cpp.py +598 -0
  1144. data/ext/v8/upstream/scons/engine/SCons/dblite.py +248 -0
  1145. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +77 -0
  1146. data/ext/v8/upstream/scons/os_spawnv_fix.diff +83 -0
  1147. data/ext/v8/upstream/scons/scons-time.1 +1017 -0
  1148. data/ext/v8/upstream/scons/scons.1 +15179 -0
  1149. data/ext/v8/upstream/scons/sconsign.1 +208 -0
  1150. data/ext/v8/upstream/scons/script/scons +184 -0
  1151. data/ext/v8/upstream/scons/script/scons-time +1529 -0
  1152. data/ext/v8/upstream/scons/script/scons.bat +31 -0
  1153. data/ext/v8/upstream/scons/script/sconsign +508 -0
  1154. data/ext/v8/upstream/scons/setup.cfg +6 -0
  1155. data/ext/v8/upstream/scons/setup.py +427 -0
  1156. data/ext/v8/v8.cpp +81 -0
  1157. data/ext/v8/v8_cxt.cpp +92 -0
  1158. data/ext/v8/v8_cxt.h +20 -0
  1159. data/ext/v8/v8_func.cpp +10 -0
  1160. data/ext/v8/v8_func.h +11 -0
  1161. data/ext/v8/v8_msg.cpp +17 -0
  1162. data/ext/v8/v8_msg.h +10 -0
  1163. data/ext/v8/v8_obj.cpp +52 -0
  1164. data/ext/v8/v8_obj.h +13 -0
  1165. data/ext/v8/v8_ref.cpp +26 -0
  1166. data/ext/v8/v8_ref.h +31 -0
  1167. data/ext/v8/v8_script.cpp +20 -0
  1168. data/ext/v8/v8_script.h +8 -0
  1169. data/ext/v8/v8_standalone.cpp +69 -0
  1170. data/ext/v8/v8_standalone.h +31 -0
  1171. data/ext/v8/v8_str.cpp +17 -0
  1172. data/ext/v8/v8_str.h +9 -0
  1173. data/ext/v8/v8_template.cpp +53 -0
  1174. data/ext/v8/v8_template.h +13 -0
  1175. data/lib/v8.rb +10 -0
  1176. data/lib/v8/context.rb +87 -0
  1177. data/lib/v8/object.rb +38 -0
  1178. data/lib/v8/to.rb +33 -0
  1179. data/lib/v8/v8.bundle +0 -0
  1180. data/script/console +10 -0
  1181. data/script/destroy +14 -0
  1182. data/script/generate +14 -0
  1183. data/spec/ext/cxt_spec.rb +25 -0
  1184. data/spec/ext/obj_spec.rb +13 -0
  1185. data/spec/redjs/README.txt +8 -0
  1186. data/spec/redjs/jsapi_spec.rb +394 -0
  1187. data/spec/redjs/tap.rb +8 -0
  1188. data/spec/redjs_helper.rb +3 -0
  1189. data/spec/spec.opts +1 -0
  1190. data/spec/spec_helper.rb +14 -0
  1191. data/spec/v8/to_spec.rb +15 -0
  1192. data/tasks/rspec.rake +21 -0
  1193. data/therubyracer.gemspec +34 -0
  1194. metadata +1269 -0
@@ -0,0 +1,352 @@
1
+ // Copyright 2009 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef V8_X64_ASSEMBLER_X64_INL_H_
29
+ #define V8_X64_ASSEMBLER_X64_INL_H_
30
+
31
+ #include "cpu.h"
32
+ #include "memory.h"
33
+
34
+ namespace v8 {
35
+ namespace internal {
36
+
37
+ Condition NegateCondition(Condition cc) {
38
+ return static_cast<Condition>(cc ^ 1);
39
+ }
40
+
41
+
42
+ // -----------------------------------------------------------------------------
43
+ // Implementation of Assembler
44
+
45
+
46
+
47
+ void Assembler::emitl(uint32_t x) {
48
+ Memory::uint32_at(pc_) = x;
49
+ pc_ += sizeof(uint32_t);
50
+ }
51
+
52
+
53
+ void Assembler::emitq(uint64_t x, RelocInfo::Mode rmode) {
54
+ Memory::uint64_at(pc_) = x;
55
+ if (rmode != RelocInfo::NONE) {
56
+ RecordRelocInfo(rmode, x);
57
+ }
58
+ pc_ += sizeof(uint64_t);
59
+ }
60
+
61
+
62
+ void Assembler::emitw(uint16_t x) {
63
+ Memory::uint16_at(pc_) = x;
64
+ pc_ += sizeof(uint16_t);
65
+ }
66
+
67
+
68
+ void Assembler::emit_code_target(Handle<Code> target, RelocInfo::Mode rmode) {
69
+ ASSERT(RelocInfo::IsCodeTarget(rmode));
70
+ RecordRelocInfo(rmode);
71
+ int current = code_targets_.length();
72
+ if (current > 0 && code_targets_.last().is_identical_to(target)) {
73
+ // Optimization if we keep jumping to the same code target.
74
+ emitl(current - 1);
75
+ } else {
76
+ code_targets_.Add(target);
77
+ emitl(current);
78
+ }
79
+ }
80
+
81
+
82
+ void Assembler::emit_rex_64(Register reg, Register rm_reg) {
83
+ emit(0x48 | reg.high_bit() << 2 | rm_reg.high_bit());
84
+ }
85
+
86
+
87
+ void Assembler::emit_rex_64(XMMRegister reg, Register rm_reg) {
88
+ emit(0x48 | (reg.code() & 0x8) >> 1 | rm_reg.code() >> 3);
89
+ }
90
+
91
+
92
+ void Assembler::emit_rex_64(Register reg, const Operand& op) {
93
+ emit(0x48 | reg.high_bit() << 2 | op.rex_);
94
+ }
95
+
96
+
97
+ void Assembler::emit_rex_64(XMMRegister reg, const Operand& op) {
98
+ emit(0x48 | (reg.code() & 0x8) >> 1 | op.rex_);
99
+ }
100
+
101
+
102
+ void Assembler::emit_rex_64(Register rm_reg) {
103
+ ASSERT_EQ(rm_reg.code() & 0xf, rm_reg.code());
104
+ emit(0x48 | rm_reg.high_bit());
105
+ }
106
+
107
+
108
+ void Assembler::emit_rex_64(const Operand& op) {
109
+ emit(0x48 | op.rex_);
110
+ }
111
+
112
+
113
+ void Assembler::emit_rex_32(Register reg, Register rm_reg) {
114
+ emit(0x40 | reg.high_bit() << 2 | rm_reg.high_bit());
115
+ }
116
+
117
+
118
+ void Assembler::emit_rex_32(Register reg, const Operand& op) {
119
+ emit(0x40 | reg.high_bit() << 2 | op.rex_);
120
+ }
121
+
122
+
123
+ void Assembler::emit_rex_32(Register rm_reg) {
124
+ emit(0x40 | rm_reg.high_bit());
125
+ }
126
+
127
+
128
+ void Assembler::emit_rex_32(const Operand& op) {
129
+ emit(0x40 | op.rex_);
130
+ }
131
+
132
+
133
+ void Assembler::emit_optional_rex_32(Register reg, Register rm_reg) {
134
+ byte rex_bits = reg.high_bit() << 2 | rm_reg.high_bit();
135
+ if (rex_bits != 0) emit(0x40 | rex_bits);
136
+ }
137
+
138
+
139
+ void Assembler::emit_optional_rex_32(Register reg, const Operand& op) {
140
+ byte rex_bits = reg.high_bit() << 2 | op.rex_;
141
+ if (rex_bits != 0) emit(0x40 | rex_bits);
142
+ }
143
+
144
+
145
+ void Assembler::emit_optional_rex_32(XMMRegister reg, const Operand& op) {
146
+ byte rex_bits = (reg.code() & 0x8) >> 1 | op.rex_;
147
+ if (rex_bits != 0) emit(0x40 | rex_bits);
148
+ }
149
+
150
+
151
+ void Assembler::emit_optional_rex_32(XMMRegister reg, XMMRegister base) {
152
+ byte rex_bits = (reg.code() & 0x8) >> 1 | (base.code() & 0x8) >> 3;
153
+ if (rex_bits != 0) emit(0x40 | rex_bits);
154
+ }
155
+
156
+
157
+ void Assembler::emit_optional_rex_32(XMMRegister reg, Register base) {
158
+ byte rex_bits = (reg.code() & 0x8) >> 1 | (base.code() & 0x8) >> 3;
159
+ if (rex_bits != 0) emit(0x40 | rex_bits);
160
+ }
161
+
162
+
163
+ void Assembler::emit_optional_rex_32(Register rm_reg) {
164
+ if (rm_reg.high_bit()) emit(0x41);
165
+ }
166
+
167
+
168
+ void Assembler::emit_optional_rex_32(const Operand& op) {
169
+ if (op.rex_ != 0) emit(0x40 | op.rex_);
170
+ }
171
+
172
+
173
+ Address Assembler::target_address_at(Address pc) {
174
+ return Memory::int32_at(pc) + pc + 4;
175
+ }
176
+
177
+
178
+ void Assembler::set_target_address_at(Address pc, Address target) {
179
+ Memory::int32_at(pc) = static_cast<int32_t>(target - pc - 4);
180
+ CPU::FlushICache(pc, sizeof(int32_t));
181
+ }
182
+
183
+ Handle<Object> Assembler::code_target_object_handle_at(Address pc) {
184
+ return code_targets_[Memory::int32_at(pc)];
185
+ }
186
+
187
+ // -----------------------------------------------------------------------------
188
+ // Implementation of RelocInfo
189
+
190
+ // The modes possibly affected by apply must be in kApplyMask.
191
+ void RelocInfo::apply(intptr_t delta) {
192
+ if (IsInternalReference(rmode_)) {
193
+ // absolute code pointer inside code object moves with the code object.
194
+ Memory::Address_at(pc_) += static_cast<int32_t>(delta);
195
+ } else if (IsCodeTarget(rmode_)) {
196
+ Memory::int32_at(pc_) -= static_cast<int32_t>(delta);
197
+ } else if (rmode_ == JS_RETURN && IsPatchedReturnSequence()) {
198
+ // Special handling of js_return when a break point is set (call
199
+ // instruction has been inserted).
200
+ Memory::int32_at(pc_ + 1) -= static_cast<int32_t>(delta); // relocate entry
201
+ }
202
+ }
203
+
204
+
205
+ Address RelocInfo::target_address() {
206
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
207
+ if (IsCodeTarget(rmode_)) {
208
+ return Assembler::target_address_at(pc_);
209
+ } else {
210
+ return Memory::Address_at(pc_);
211
+ }
212
+ }
213
+
214
+
215
+ Address RelocInfo::target_address_address() {
216
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
217
+ return reinterpret_cast<Address>(pc_);
218
+ }
219
+
220
+
221
+ void RelocInfo::set_target_address(Address target) {
222
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
223
+ if (IsCodeTarget(rmode_)) {
224
+ Assembler::set_target_address_at(pc_, target);
225
+ } else {
226
+ Memory::Address_at(pc_) = target;
227
+ }
228
+ }
229
+
230
+
231
+ Object* RelocInfo::target_object() {
232
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
233
+ return Memory::Object_at(pc_);
234
+ }
235
+
236
+
237
+ Handle<Object> RelocInfo::target_object_handle(Assembler *origin) {
238
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
239
+ if (rmode_ == EMBEDDED_OBJECT) {
240
+ return Memory::Object_Handle_at(pc_);
241
+ } else {
242
+ return origin->code_target_object_handle_at(pc_);
243
+ }
244
+ }
245
+
246
+
247
+ Object** RelocInfo::target_object_address() {
248
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
249
+ return reinterpret_cast<Object**>(pc_);
250
+ }
251
+
252
+
253
+ Address* RelocInfo::target_reference_address() {
254
+ ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE);
255
+ return reinterpret_cast<Address*>(pc_);
256
+ }
257
+
258
+
259
+ void RelocInfo::set_target_object(Object* target) {
260
+ ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
261
+ *reinterpret_cast<Object**>(pc_) = target;
262
+ }
263
+
264
+
265
+ bool RelocInfo::IsPatchedReturnSequence() {
266
+ // The recognized call sequence is:
267
+ // movq(kScratchRegister, immediate64); call(kScratchRegister);
268
+ // It only needs to be distinguished from a return sequence
269
+ // movq(rsp, rbp); pop(rbp); ret(n); int3 *6
270
+ // The 11th byte is int3 (0xCC) in the return sequence and
271
+ // REX.WB (0x48+register bit) for the call sequence.
272
+ #ifdef ENABLE_DEBUGGER_SUPPORT
273
+ return pc_[10] != 0xCC;
274
+ #else
275
+ return false;
276
+ #endif
277
+ }
278
+
279
+
280
+ Address RelocInfo::call_address() {
281
+ ASSERT(IsPatchedReturnSequence());
282
+ return Memory::Address_at(
283
+ pc_ + Assembler::kRealPatchReturnSequenceAddressOffset);
284
+ }
285
+
286
+
287
+ void RelocInfo::set_call_address(Address target) {
288
+ ASSERT(IsPatchedReturnSequence());
289
+ Memory::Address_at(pc_ + Assembler::kRealPatchReturnSequenceAddressOffset) =
290
+ target;
291
+ }
292
+
293
+
294
+ Object* RelocInfo::call_object() {
295
+ ASSERT(IsPatchedReturnSequence());
296
+ return *call_object_address();
297
+ }
298
+
299
+
300
+ void RelocInfo::set_call_object(Object* target) {
301
+ ASSERT(IsPatchedReturnSequence());
302
+ *call_object_address() = target;
303
+ }
304
+
305
+
306
+ Object** RelocInfo::call_object_address() {
307
+ ASSERT(IsPatchedReturnSequence());
308
+ return reinterpret_cast<Object**>(
309
+ pc_ + Assembler::kPatchReturnSequenceAddressOffset);
310
+ }
311
+
312
+ // -----------------------------------------------------------------------------
313
+ // Implementation of Operand
314
+
315
+ void Operand::set_modrm(int mod, Register rm_reg) {
316
+ ASSERT(is_uint2(mod));
317
+ buf_[0] = mod << 6 | rm_reg.low_bits();
318
+ // Set REX.B to the high bit of rm.code().
319
+ rex_ |= rm_reg.high_bit();
320
+ }
321
+
322
+
323
+ void Operand::set_sib(ScaleFactor scale, Register index, Register base) {
324
+ ASSERT(len_ == 1);
325
+ ASSERT(is_uint2(scale));
326
+ // Use SIB with no index register only for base rsp or r12. Otherwise we
327
+ // would skip the SIB byte entirely.
328
+ ASSERT(!index.is(rsp) || base.is(rsp) || base.is(r12));
329
+ buf_[1] = scale << 6 | index.low_bits() << 3 | base.low_bits();
330
+ rex_ |= index.high_bit() << 1 | base.high_bit();
331
+ len_ = 2;
332
+ }
333
+
334
+ void Operand::set_disp8(int disp) {
335
+ ASSERT(is_int8(disp));
336
+ ASSERT(len_ == 1 || len_ == 2);
337
+ int8_t* p = reinterpret_cast<int8_t*>(&buf_[len_]);
338
+ *p = disp;
339
+ len_ += sizeof(int8_t);
340
+ }
341
+
342
+ void Operand::set_disp32(int disp) {
343
+ ASSERT(len_ == 1 || len_ == 2);
344
+ int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
345
+ *p = disp;
346
+ len_ += sizeof(int32_t);
347
+ }
348
+
349
+
350
+ } } // namespace v8::internal
351
+
352
+ #endif // V8_X64_ASSEMBLER_X64_INL_H_
@@ -0,0 +1,2539 @@
1
+ // Copyright 2009 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #include "v8.h"
29
+
30
+ #include "macro-assembler.h"
31
+ #include "serialize.h"
32
+
33
+ namespace v8 {
34
+ namespace internal {
35
+
36
+ // -----------------------------------------------------------------------------
37
+ // Implementation of Register
38
+
39
+ Register rax = { 0 };
40
+ Register rcx = { 1 };
41
+ Register rdx = { 2 };
42
+ Register rbx = { 3 };
43
+ Register rsp = { 4 };
44
+ Register rbp = { 5 };
45
+ Register rsi = { 6 };
46
+ Register rdi = { 7 };
47
+ Register r8 = { 8 };
48
+ Register r9 = { 9 };
49
+ Register r10 = { 10 };
50
+ Register r11 = { 11 };
51
+ Register r12 = { 12 };
52
+ Register r13 = { 13 };
53
+ Register r14 = { 14 };
54
+ Register r15 = { 15 };
55
+
56
+ Register no_reg = { -1 };
57
+
58
+ XMMRegister xmm0 = { 0 };
59
+ XMMRegister xmm1 = { 1 };
60
+ XMMRegister xmm2 = { 2 };
61
+ XMMRegister xmm3 = { 3 };
62
+ XMMRegister xmm4 = { 4 };
63
+ XMMRegister xmm5 = { 5 };
64
+ XMMRegister xmm6 = { 6 };
65
+ XMMRegister xmm7 = { 7 };
66
+ XMMRegister xmm8 = { 8 };
67
+ XMMRegister xmm9 = { 9 };
68
+ XMMRegister xmm10 = { 10 };
69
+ XMMRegister xmm11 = { 11 };
70
+ XMMRegister xmm12 = { 12 };
71
+ XMMRegister xmm13 = { 13 };
72
+ XMMRegister xmm14 = { 14 };
73
+ XMMRegister xmm15 = { 15 };
74
+
75
+
76
+ // -----------------------------------------------------------------------------
77
+ // Implementation of CpuFeatures
78
+
79
+ // The required user mode extensions in X64 are (from AMD64 ABI Table A.1):
80
+ // fpu, tsc, cx8, cmov, mmx, sse, sse2, fxsr, syscall
81
+ uint64_t CpuFeatures::supported_ = kDefaultCpuFeatures;
82
+ uint64_t CpuFeatures::enabled_ = 0;
83
+ uint64_t CpuFeatures::found_by_runtime_probing_ = 0;
84
+
85
+ void CpuFeatures::Probe() {
86
+ ASSERT(Heap::HasBeenSetup());
87
+ ASSERT(supported_ == kDefaultCpuFeatures);
88
+ if (Serializer::enabled()) {
89
+ supported_ |= OS::CpuFeaturesImpliedByPlatform();
90
+ return; // No features if we might serialize.
91
+ }
92
+
93
+ Assembler assm(NULL, 0);
94
+ Label cpuid, done;
95
+ #define __ assm.
96
+ // Save old rsp, since we are going to modify the stack.
97
+ __ push(rbp);
98
+ __ pushfq();
99
+ __ push(rcx);
100
+ __ push(rbx);
101
+ __ movq(rbp, rsp);
102
+
103
+ // If we can modify bit 21 of the EFLAGS register, then CPUID is supported.
104
+ __ pushfq();
105
+ __ pop(rax);
106
+ __ movq(rdx, rax);
107
+ __ xor_(rax, Immediate(0x200000)); // Flip bit 21.
108
+ __ push(rax);
109
+ __ popfq();
110
+ __ pushfq();
111
+ __ pop(rax);
112
+ __ xor_(rax, rdx); // Different if CPUID is supported.
113
+ __ j(not_zero, &cpuid);
114
+
115
+ // CPUID not supported. Clear the supported features in edx:eax.
116
+ __ xor_(rax, rax);
117
+ __ jmp(&done);
118
+
119
+ // Invoke CPUID with 1 in eax to get feature information in
120
+ // ecx:edx. Temporarily enable CPUID support because we know it's
121
+ // safe here.
122
+ __ bind(&cpuid);
123
+ __ movq(rax, Immediate(1));
124
+ supported_ = kDefaultCpuFeatures | (1 << CPUID);
125
+ { Scope fscope(CPUID);
126
+ __ cpuid();
127
+ // Move the result from ecx:edx to rdi.
128
+ __ movl(rdi, rdx); // Zero-extended to 64 bits.
129
+ __ shl(rcx, Immediate(32));
130
+ __ or_(rdi, rcx);
131
+
132
+ // Get the sahf supported flag, from CPUID(0x80000001)
133
+ __ movq(rax, 0x80000001, RelocInfo::NONE);
134
+ __ cpuid();
135
+ }
136
+ supported_ = kDefaultCpuFeatures;
137
+
138
+ // Put the CPU flags in rax.
139
+ // rax = (rcx & 1) | (rdi & ~1) | (1 << CPUID).
140
+ __ movl(rax, Immediate(1));
141
+ __ and_(rcx, rax); // Bit 0 is set if SAHF instruction supported.
142
+ __ not_(rax);
143
+ __ and_(rax, rdi);
144
+ __ or_(rax, rcx);
145
+ __ or_(rax, Immediate(1 << CPUID));
146
+
147
+ // Done.
148
+ __ bind(&done);
149
+ __ movq(rsp, rbp);
150
+ __ pop(rbx);
151
+ __ pop(rcx);
152
+ __ popfq();
153
+ __ pop(rbp);
154
+ __ ret(0);
155
+ #undef __
156
+
157
+ CodeDesc desc;
158
+ assm.GetCode(&desc);
159
+ Object* code =
160
+ Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB), NULL);
161
+ if (!code->IsCode()) return;
162
+ LOG(CodeCreateEvent(Logger::BUILTIN_TAG,
163
+ Code::cast(code), "CpuFeatures::Probe"));
164
+ typedef uint64_t (*F0)();
165
+ F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry());
166
+ supported_ = probe();
167
+ found_by_runtime_probing_ = supported_;
168
+ found_by_runtime_probing_ &= ~kDefaultCpuFeatures;
169
+ uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform();
170
+ supported_ |= os_guarantees;
171
+ found_by_runtime_probing_ &= ~os_guarantees;
172
+ // SSE2 and CMOV must be available on an X64 CPU.
173
+ ASSERT(IsSupported(CPUID));
174
+ ASSERT(IsSupported(SSE2));
175
+ ASSERT(IsSupported(CMOV));
176
+ }
177
+
178
+
179
+ // -----------------------------------------------------------------------------
180
+ // Implementation of RelocInfo
181
+
182
+ // Patch the code at the current PC with a call to the target address.
183
+ // Additional guard int3 instructions can be added if required.
184
+ void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) {
185
+ // Load register with immediate 64 and call through a register instructions
186
+ // takes up 13 bytes and int3 takes up one byte.
187
+ static const int kCallCodeSize = 13;
188
+ int code_size = kCallCodeSize + guard_bytes;
189
+
190
+ // Create a code patcher.
191
+ CodePatcher patcher(pc_, code_size);
192
+
193
+ // Add a label for checking the size of the code used for returning.
194
+ #ifdef DEBUG
195
+ Label check_codesize;
196
+ patcher.masm()->bind(&check_codesize);
197
+ #endif
198
+
199
+ // Patch the code.
200
+ patcher.masm()->movq(r10, target, RelocInfo::NONE);
201
+ patcher.masm()->call(r10);
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
+ for (int i = 0; i < guard_bytes; i++) {
209
+ patcher.masm()->int3();
210
+ }
211
+ }
212
+
213
+
214
+ void RelocInfo::PatchCode(byte* instructions, int instruction_count) {
215
+ // Patch the code at the current address with the supplied instructions.
216
+ for (int i = 0; i < instruction_count; i++) {
217
+ *(pc_ + i) = *(instructions + i);
218
+ }
219
+
220
+ // Indicate that code has changed.
221
+ CPU::FlushICache(pc_, instruction_count);
222
+ }
223
+
224
+ // -----------------------------------------------------------------------------
225
+ // Implementation of Operand
226
+
227
+ Operand::Operand(Register base, int32_t disp): rex_(0) {
228
+ len_ = 1;
229
+ if (base.is(rsp) || base.is(r12)) {
230
+ // SIB byte is needed to encode (rsp + offset) or (r12 + offset).
231
+ set_sib(times_1, rsp, base);
232
+ }
233
+
234
+ if (disp == 0 && !base.is(rbp) && !base.is(r13)) {
235
+ set_modrm(0, base);
236
+ } else if (is_int8(disp)) {
237
+ set_modrm(1, base);
238
+ set_disp8(disp);
239
+ } else {
240
+ set_modrm(2, base);
241
+ set_disp32(disp);
242
+ }
243
+ }
244
+
245
+
246
+ Operand::Operand(Register base,
247
+ Register index,
248
+ ScaleFactor scale,
249
+ int32_t disp): rex_(0) {
250
+ ASSERT(!index.is(rsp));
251
+ len_ = 1;
252
+ set_sib(scale, index, base);
253
+ if (disp == 0 && !base.is(rbp) && !base.is(r13)) {
254
+ // This call to set_modrm doesn't overwrite the REX.B (or REX.X) bits
255
+ // possibly set by set_sib.
256
+ set_modrm(0, rsp);
257
+ } else if (is_int8(disp)) {
258
+ set_modrm(1, rsp);
259
+ set_disp8(disp);
260
+ } else {
261
+ set_modrm(2, rsp);
262
+ set_disp32(disp);
263
+ }
264
+ }
265
+
266
+
267
+ // -----------------------------------------------------------------------------
268
+ // Implementation of Assembler
269
+
270
+ #ifdef GENERATED_CODE_COVERAGE
271
+ static void InitCoverageLog();
272
+ #endif
273
+
274
+ byte* Assembler::spare_buffer_ = NULL;
275
+
276
+ Assembler::Assembler(void* buffer, int buffer_size)
277
+ : code_targets_(100) {
278
+ if (buffer == NULL) {
279
+ // do our own buffer management
280
+ if (buffer_size <= kMinimalBufferSize) {
281
+ buffer_size = kMinimalBufferSize;
282
+
283
+ if (spare_buffer_ != NULL) {
284
+ buffer = spare_buffer_;
285
+ spare_buffer_ = NULL;
286
+ }
287
+ }
288
+ if (buffer == NULL) {
289
+ buffer_ = NewArray<byte>(buffer_size);
290
+ } else {
291
+ buffer_ = static_cast<byte*>(buffer);
292
+ }
293
+ buffer_size_ = buffer_size;
294
+ own_buffer_ = true;
295
+ } else {
296
+ // use externally provided buffer instead
297
+ ASSERT(buffer_size > 0);
298
+ buffer_ = static_cast<byte*>(buffer);
299
+ buffer_size_ = buffer_size;
300
+ own_buffer_ = false;
301
+ }
302
+
303
+ // Clear the buffer in debug mode unless it was provided by the
304
+ // caller in which case we can't be sure it's okay to overwrite
305
+ // existing code in it.
306
+ #ifdef DEBUG
307
+ if (own_buffer_) {
308
+ memset(buffer_, 0xCC, buffer_size); // int3
309
+ }
310
+ #endif
311
+
312
+ // setup buffer pointers
313
+ ASSERT(buffer_ != NULL);
314
+ pc_ = buffer_;
315
+ reloc_info_writer.Reposition(buffer_ + buffer_size, pc_);
316
+
317
+ last_pc_ = NULL;
318
+ current_statement_position_ = RelocInfo::kNoPosition;
319
+ current_position_ = RelocInfo::kNoPosition;
320
+ written_statement_position_ = current_statement_position_;
321
+ written_position_ = current_position_;
322
+ #ifdef GENERATED_CODE_COVERAGE
323
+ InitCoverageLog();
324
+ #endif
325
+ }
326
+
327
+
328
+ Assembler::~Assembler() {
329
+ if (own_buffer_) {
330
+ if (spare_buffer_ == NULL && buffer_size_ == kMinimalBufferSize) {
331
+ spare_buffer_ = buffer_;
332
+ } else {
333
+ DeleteArray(buffer_);
334
+ }
335
+ }
336
+ }
337
+
338
+
339
+ void Assembler::GetCode(CodeDesc* desc) {
340
+ // finalize code
341
+ // (at this point overflow() may be true, but the gap ensures that
342
+ // we are still not overlapping instructions and relocation info)
343
+ ASSERT(pc_ <= reloc_info_writer.pos()); // no overlap
344
+ // setup desc
345
+ desc->buffer = buffer_;
346
+ desc->buffer_size = buffer_size_;
347
+ desc->instr_size = pc_offset();
348
+ ASSERT(desc->instr_size > 0); // Zero-size code objects upset the system.
349
+ desc->reloc_size =
350
+ static_cast<int>((buffer_ + buffer_size_) - reloc_info_writer.pos());
351
+ desc->origin = this;
352
+
353
+ Counters::reloc_info_size.Increment(desc->reloc_size);
354
+ }
355
+
356
+
357
+ void Assembler::Align(int m) {
358
+ ASSERT(IsPowerOf2(m));
359
+ while ((pc_offset() & (m - 1)) != 0) {
360
+ nop();
361
+ }
362
+ }
363
+
364
+
365
+ void Assembler::bind_to(Label* L, int pos) {
366
+ ASSERT(!L->is_bound()); // Label may only be bound once.
367
+ last_pc_ = NULL;
368
+ ASSERT(0 <= pos && pos <= pc_offset()); // Position must be valid.
369
+ if (L->is_linked()) {
370
+ int current = L->pos();
371
+ int next = long_at(current);
372
+ while (next != current) {
373
+ // relative address, relative to point after address
374
+ int imm32 = pos - (current + sizeof(int32_t));
375
+ long_at_put(current, imm32);
376
+ current = next;
377
+ next = long_at(next);
378
+ }
379
+ // Fix up last fixup on linked list.
380
+ int last_imm32 = pos - (current + sizeof(int32_t));
381
+ long_at_put(current, last_imm32);
382
+ }
383
+ L->bind_to(pos);
384
+ }
385
+
386
+
387
+ void Assembler::bind(Label* L) {
388
+ bind_to(L, pc_offset());
389
+ }
390
+
391
+
392
+ void Assembler::GrowBuffer() {
393
+ ASSERT(buffer_overflow()); // should not call this otherwise
394
+ if (!own_buffer_) FATAL("external code buffer is too small");
395
+
396
+ // compute new buffer size
397
+ CodeDesc desc; // the new buffer
398
+ if (buffer_size_ < 4*KB) {
399
+ desc.buffer_size = 4*KB;
400
+ } else {
401
+ desc.buffer_size = 2*buffer_size_;
402
+ }
403
+ // Some internal data structures overflow for very large buffers,
404
+ // they must ensure that kMaximalBufferSize is not too large.
405
+ if ((desc.buffer_size > kMaximalBufferSize) ||
406
+ (desc.buffer_size > Heap::MaxOldGenerationSize())) {
407
+ V8::FatalProcessOutOfMemory("Assembler::GrowBuffer");
408
+ }
409
+
410
+ // setup new buffer
411
+ desc.buffer = NewArray<byte>(desc.buffer_size);
412
+ desc.instr_size = pc_offset();
413
+ desc.reloc_size =
414
+ static_cast<int>((buffer_ + buffer_size_) - (reloc_info_writer.pos()));
415
+
416
+ // Clear the buffer in debug mode. Use 'int3' instructions to make
417
+ // sure to get into problems if we ever run uninitialized code.
418
+ #ifdef DEBUG
419
+ memset(desc.buffer, 0xCC, desc.buffer_size);
420
+ #endif
421
+
422
+ // copy the data
423
+ intptr_t pc_delta = desc.buffer - buffer_;
424
+ intptr_t rc_delta = (desc.buffer + desc.buffer_size) -
425
+ (buffer_ + buffer_size_);
426
+ memmove(desc.buffer, buffer_, desc.instr_size);
427
+ memmove(rc_delta + reloc_info_writer.pos(),
428
+ reloc_info_writer.pos(), desc.reloc_size);
429
+
430
+ // switch buffers
431
+ if (spare_buffer_ == NULL && buffer_size_ == kMinimalBufferSize) {
432
+ spare_buffer_ = buffer_;
433
+ } else {
434
+ DeleteArray(buffer_);
435
+ }
436
+ buffer_ = desc.buffer;
437
+ buffer_size_ = desc.buffer_size;
438
+ pc_ += pc_delta;
439
+ if (last_pc_ != NULL) {
440
+ last_pc_ += pc_delta;
441
+ }
442
+ reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
443
+ reloc_info_writer.last_pc() + pc_delta);
444
+
445
+ // relocate runtime entries
446
+ for (RelocIterator it(desc); !it.done(); it.next()) {
447
+ RelocInfo::Mode rmode = it.rinfo()->rmode();
448
+ if (rmode == RelocInfo::INTERNAL_REFERENCE) {
449
+ intptr_t* p = reinterpret_cast<intptr_t*>(it.rinfo()->pc());
450
+ if (*p != 0) { // 0 means uninitialized.
451
+ *p += pc_delta;
452
+ }
453
+ }
454
+ }
455
+
456
+ ASSERT(!buffer_overflow());
457
+ }
458
+
459
+
460
+ void Assembler::emit_operand(int code, const Operand& adr) {
461
+ ASSERT(is_uint3(code));
462
+ const unsigned length = adr.len_;
463
+ ASSERT(length > 0);
464
+
465
+ // Emit updated ModR/M byte containing the given register.
466
+ ASSERT((adr.buf_[0] & 0x38) == 0);
467
+ pc_[0] = adr.buf_[0] | code << 3;
468
+
469
+ // Emit the rest of the encoded operand.
470
+ for (unsigned i = 1; i < length; i++) pc_[i] = adr.buf_[i];
471
+ pc_ += length;
472
+ }
473
+
474
+
475
+ // Assembler Instruction implementations
476
+
477
+ void Assembler::arithmetic_op(byte opcode, Register reg, const Operand& op) {
478
+ EnsureSpace ensure_space(this);
479
+ last_pc_ = pc_;
480
+ emit_rex_64(reg, op);
481
+ emit(opcode);
482
+ emit_operand(reg, op);
483
+ }
484
+
485
+
486
+ void Assembler::arithmetic_op(byte opcode, Register reg, Register rm_reg) {
487
+ EnsureSpace ensure_space(this);
488
+ last_pc_ = pc_;
489
+ emit_rex_64(reg, rm_reg);
490
+ emit(opcode);
491
+ emit_modrm(reg, rm_reg);
492
+ }
493
+
494
+
495
+ void Assembler::arithmetic_op_16(byte opcode, Register reg, Register rm_reg) {
496
+ EnsureSpace ensure_space(this);
497
+ last_pc_ = pc_;
498
+ emit(0x66);
499
+ emit_optional_rex_32(reg, rm_reg);
500
+ emit(opcode);
501
+ emit_modrm(reg, rm_reg);
502
+ }
503
+
504
+
505
+ void Assembler::arithmetic_op_16(byte opcode,
506
+ Register reg,
507
+ const Operand& rm_reg) {
508
+ EnsureSpace ensure_space(this);
509
+ last_pc_ = pc_;
510
+ emit(0x66);
511
+ emit_optional_rex_32(reg, rm_reg);
512
+ emit(opcode);
513
+ emit_operand(reg, rm_reg);
514
+ }
515
+
516
+
517
+ void Assembler::arithmetic_op_32(byte opcode, Register reg, Register rm_reg) {
518
+ EnsureSpace ensure_space(this);
519
+ last_pc_ = pc_;
520
+ emit_optional_rex_32(reg, rm_reg);
521
+ emit(opcode);
522
+ emit_modrm(reg, rm_reg);
523
+ }
524
+
525
+
526
+ void Assembler::arithmetic_op_32(byte opcode,
527
+ Register reg,
528
+ const Operand& rm_reg) {
529
+ EnsureSpace ensure_space(this);
530
+ last_pc_ = pc_;
531
+ emit_optional_rex_32(reg, rm_reg);
532
+ emit(opcode);
533
+ emit_operand(reg, rm_reg);
534
+ }
535
+
536
+
537
+ void Assembler::immediate_arithmetic_op(byte subcode,
538
+ Register dst,
539
+ Immediate src) {
540
+ EnsureSpace ensure_space(this);
541
+ last_pc_ = pc_;
542
+ emit_rex_64(dst);
543
+ if (is_int8(src.value_)) {
544
+ emit(0x83);
545
+ emit_modrm(subcode, dst);
546
+ emit(src.value_);
547
+ } else if (dst.is(rax)) {
548
+ emit(0x05 | (subcode << 3));
549
+ emitl(src.value_);
550
+ } else {
551
+ emit(0x81);
552
+ emit_modrm(subcode, dst);
553
+ emitl(src.value_);
554
+ }
555
+ }
556
+
557
+ void Assembler::immediate_arithmetic_op(byte subcode,
558
+ const Operand& dst,
559
+ Immediate src) {
560
+ EnsureSpace ensure_space(this);
561
+ last_pc_ = pc_;
562
+ emit_rex_64(dst);
563
+ if (is_int8(src.value_)) {
564
+ emit(0x83);
565
+ emit_operand(subcode, dst);
566
+ emit(src.value_);
567
+ } else {
568
+ emit(0x81);
569
+ emit_operand(subcode, dst);
570
+ emitl(src.value_);
571
+ }
572
+ }
573
+
574
+
575
+ void Assembler::immediate_arithmetic_op_16(byte subcode,
576
+ Register dst,
577
+ Immediate src) {
578
+ EnsureSpace ensure_space(this);
579
+ last_pc_ = pc_;
580
+ emit(0x66); // Operand size override prefix.
581
+ emit_optional_rex_32(dst);
582
+ if (is_int8(src.value_)) {
583
+ emit(0x83);
584
+ emit_modrm(subcode, dst);
585
+ emit(src.value_);
586
+ } else if (dst.is(rax)) {
587
+ emit(0x05 | (subcode << 3));
588
+ emitw(src.value_);
589
+ } else {
590
+ emit(0x81);
591
+ emit_modrm(subcode, dst);
592
+ emitw(src.value_);
593
+ }
594
+ }
595
+
596
+
597
+ void Assembler::immediate_arithmetic_op_16(byte subcode,
598
+ const Operand& dst,
599
+ Immediate src) {
600
+ EnsureSpace ensure_space(this);
601
+ last_pc_ = pc_;
602
+ emit(0x66); // Operand size override prefix.
603
+ emit_optional_rex_32(dst);
604
+ if (is_int8(src.value_)) {
605
+ emit(0x83);
606
+ emit_operand(subcode, dst);
607
+ emit(src.value_);
608
+ } else {
609
+ emit(0x81);
610
+ emit_operand(subcode, dst);
611
+ emitw(src.value_);
612
+ }
613
+ }
614
+
615
+
616
+ void Assembler::immediate_arithmetic_op_32(byte subcode,
617
+ Register dst,
618
+ Immediate src) {
619
+ EnsureSpace ensure_space(this);
620
+ last_pc_ = pc_;
621
+ emit_optional_rex_32(dst);
622
+ if (is_int8(src.value_)) {
623
+ emit(0x83);
624
+ emit_modrm(subcode, dst);
625
+ emit(src.value_);
626
+ } else if (dst.is(rax)) {
627
+ emit(0x05 | (subcode << 3));
628
+ emitl(src.value_);
629
+ } else {
630
+ emit(0x81);
631
+ emit_modrm(subcode, dst);
632
+ emitl(src.value_);
633
+ }
634
+ }
635
+
636
+
637
+ void Assembler::immediate_arithmetic_op_32(byte subcode,
638
+ const Operand& dst,
639
+ Immediate src) {
640
+ EnsureSpace ensure_space(this);
641
+ last_pc_ = pc_;
642
+ emit_optional_rex_32(dst);
643
+ if (is_int8(src.value_)) {
644
+ emit(0x83);
645
+ emit_operand(subcode, dst);
646
+ emit(src.value_);
647
+ } else {
648
+ emit(0x81);
649
+ emit_operand(subcode, dst);
650
+ emitl(src.value_);
651
+ }
652
+ }
653
+
654
+
655
+ void Assembler::immediate_arithmetic_op_8(byte subcode,
656
+ const Operand& dst,
657
+ Immediate src) {
658
+ EnsureSpace ensure_space(this);
659
+ last_pc_ = pc_;
660
+ emit_optional_rex_32(dst);
661
+ ASSERT(is_int8(src.value_) || is_uint8(src.value_));
662
+ emit(0x80);
663
+ emit_operand(subcode, dst);
664
+ emit(src.value_);
665
+ }
666
+
667
+
668
+ void Assembler::immediate_arithmetic_op_8(byte subcode,
669
+ Register dst,
670
+ Immediate src) {
671
+ EnsureSpace ensure_space(this);
672
+ last_pc_ = pc_;
673
+ if (dst.code() > 3) {
674
+ // Use 64-bit mode byte registers.
675
+ emit_rex_64(dst);
676
+ }
677
+ ASSERT(is_int8(src.value_) || is_uint8(src.value_));
678
+ emit(0x80);
679
+ emit_modrm(subcode, dst);
680
+ emit(src.value_);
681
+ }
682
+
683
+
684
+ void Assembler::shift(Register dst, Immediate shift_amount, int subcode) {
685
+ EnsureSpace ensure_space(this);
686
+ last_pc_ = pc_;
687
+ ASSERT(is_uint6(shift_amount.value_)); // illegal shift count
688
+ if (shift_amount.value_ == 1) {
689
+ emit_rex_64(dst);
690
+ emit(0xD1);
691
+ emit_modrm(subcode, dst);
692
+ } else {
693
+ emit_rex_64(dst);
694
+ emit(0xC1);
695
+ emit_modrm(subcode, dst);
696
+ emit(shift_amount.value_);
697
+ }
698
+ }
699
+
700
+
701
+ void Assembler::shift(Register dst, int subcode) {
702
+ EnsureSpace ensure_space(this);
703
+ last_pc_ = pc_;
704
+ emit_rex_64(dst);
705
+ emit(0xD3);
706
+ emit_modrm(subcode, dst);
707
+ }
708
+
709
+
710
+ void Assembler::shift_32(Register dst, int subcode) {
711
+ EnsureSpace ensure_space(this);
712
+ last_pc_ = pc_;
713
+ emit_optional_rex_32(dst);
714
+ emit(0xD3);
715
+ emit_modrm(subcode, dst);
716
+ }
717
+
718
+
719
+ void Assembler::shift_32(Register dst, Immediate shift_amount, int subcode) {
720
+ EnsureSpace ensure_space(this);
721
+ last_pc_ = pc_;
722
+ ASSERT(is_uint5(shift_amount.value_)); // illegal shift count
723
+ if (shift_amount.value_ == 1) {
724
+ emit_optional_rex_32(dst);
725
+ emit(0xD1);
726
+ emit_modrm(subcode, dst);
727
+ } else {
728
+ emit_optional_rex_32(dst);
729
+ emit(0xC1);
730
+ emit_modrm(subcode, dst);
731
+ emit(shift_amount.value_);
732
+ }
733
+ }
734
+
735
+
736
+ void Assembler::bt(const Operand& dst, Register src) {
737
+ EnsureSpace ensure_space(this);
738
+ last_pc_ = pc_;
739
+ emit_rex_64(src, dst);
740
+ emit(0x0F);
741
+ emit(0xA3);
742
+ emit_operand(src, dst);
743
+ }
744
+
745
+
746
+ void Assembler::bts(const Operand& dst, Register src) {
747
+ EnsureSpace ensure_space(this);
748
+ last_pc_ = pc_;
749
+ emit_rex_64(src, dst);
750
+ emit(0x0F);
751
+ emit(0xAB);
752
+ emit_operand(src, dst);
753
+ }
754
+
755
+
756
+ void Assembler::call(Label* L) {
757
+ EnsureSpace ensure_space(this);
758
+ last_pc_ = pc_;
759
+ // 1110 1000 #32-bit disp
760
+ emit(0xE8);
761
+ if (L->is_bound()) {
762
+ int offset = L->pos() - pc_offset() - sizeof(int32_t);
763
+ ASSERT(offset <= 0);
764
+ emitl(offset);
765
+ } else if (L->is_linked()) {
766
+ emitl(L->pos());
767
+ L->link_to(pc_offset() - sizeof(int32_t));
768
+ } else {
769
+ ASSERT(L->is_unused());
770
+ int32_t current = pc_offset();
771
+ emitl(current);
772
+ L->link_to(current);
773
+ }
774
+ }
775
+
776
+
777
+ void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
778
+ EnsureSpace ensure_space(this);
779
+ last_pc_ = pc_;
780
+ // 1110 1000 #32-bit disp
781
+ emit(0xE8);
782
+ emit_code_target(target, rmode);
783
+ }
784
+
785
+
786
+ void Assembler::call(Register adr) {
787
+ EnsureSpace ensure_space(this);
788
+ last_pc_ = pc_;
789
+ // Opcode: FF /2 r64
790
+ if (adr.high_bit()) {
791
+ emit_rex_64(adr);
792
+ }
793
+ emit(0xFF);
794
+ emit_modrm(0x2, adr);
795
+ }
796
+
797
+
798
+ void Assembler::call(const Operand& op) {
799
+ EnsureSpace ensure_space(this);
800
+ last_pc_ = pc_;
801
+ // Opcode: FF /2 m64
802
+ emit_rex_64(op);
803
+ emit(0xFF);
804
+ emit_operand(2, op);
805
+ }
806
+
807
+
808
+ void Assembler::clc() {
809
+ EnsureSpace ensure_space(this);
810
+ last_pc_ = pc_;
811
+ emit(0xF8);
812
+ }
813
+
814
+ void Assembler::cdq() {
815
+ EnsureSpace ensure_space(this);
816
+ last_pc_ = pc_;
817
+ emit(0x99);
818
+ }
819
+
820
+
821
+ void Assembler::cmovq(Condition cc, Register dst, Register src) {
822
+ if (cc == always) {
823
+ movq(dst, src);
824
+ } else if (cc == never) {
825
+ return;
826
+ }
827
+ // No need to check CpuInfo for CMOV support, it's a required part of the
828
+ // 64-bit architecture.
829
+ ASSERT(cc >= 0); // Use mov for unconditional moves.
830
+ EnsureSpace ensure_space(this);
831
+ last_pc_ = pc_;
832
+ // Opcode: REX.W 0f 40 + cc /r
833
+ emit_rex_64(dst, src);
834
+ emit(0x0f);
835
+ emit(0x40 + cc);
836
+ emit_modrm(dst, src);
837
+ }
838
+
839
+
840
+ void Assembler::cmovq(Condition cc, Register dst, const Operand& src) {
841
+ if (cc == always) {
842
+ movq(dst, src);
843
+ } else if (cc == never) {
844
+ return;
845
+ }
846
+ ASSERT(cc >= 0);
847
+ EnsureSpace ensure_space(this);
848
+ last_pc_ = pc_;
849
+ // Opcode: REX.W 0f 40 + cc /r
850
+ emit_rex_64(dst, src);
851
+ emit(0x0f);
852
+ emit(0x40 + cc);
853
+ emit_operand(dst, src);
854
+ }
855
+
856
+
857
+ void Assembler::cmovl(Condition cc, Register dst, Register src) {
858
+ if (cc == always) {
859
+ movl(dst, src);
860
+ } else if (cc == never) {
861
+ return;
862
+ }
863
+ ASSERT(cc >= 0);
864
+ EnsureSpace ensure_space(this);
865
+ last_pc_ = pc_;
866
+ // Opcode: 0f 40 + cc /r
867
+ emit_optional_rex_32(dst, src);
868
+ emit(0x0f);
869
+ emit(0x40 + cc);
870
+ emit_modrm(dst, src);
871
+ }
872
+
873
+
874
+ void Assembler::cmovl(Condition cc, Register dst, const Operand& src) {
875
+ if (cc == always) {
876
+ movl(dst, src);
877
+ } else if (cc == never) {
878
+ return;
879
+ }
880
+ ASSERT(cc >= 0);
881
+ EnsureSpace ensure_space(this);
882
+ last_pc_ = pc_;
883
+ // Opcode: 0f 40 + cc /r
884
+ emit_optional_rex_32(dst, src);
885
+ emit(0x0f);
886
+ emit(0x40 + cc);
887
+ emit_operand(dst, src);
888
+ }
889
+
890
+
891
+ void Assembler::cmpb_al(Immediate imm8) {
892
+ ASSERT(is_int8(imm8.value_) || is_uint8(imm8.value_));
893
+ EnsureSpace ensure_space(this);
894
+ last_pc_ = pc_;
895
+ emit(0x3c);
896
+ emit(imm8.value_);
897
+ }
898
+
899
+
900
+ void Assembler::cpuid() {
901
+ ASSERT(CpuFeatures::IsEnabled(CPUID));
902
+ EnsureSpace ensure_space(this);
903
+ last_pc_ = pc_;
904
+ emit(0x0F);
905
+ emit(0xA2);
906
+ }
907
+
908
+
909
+ void Assembler::cqo() {
910
+ EnsureSpace ensure_space(this);
911
+ last_pc_ = pc_;
912
+ emit_rex_64();
913
+ emit(0x99);
914
+ }
915
+
916
+
917
+ void Assembler::decq(Register dst) {
918
+ EnsureSpace ensure_space(this);
919
+ last_pc_ = pc_;
920
+ emit_rex_64(dst);
921
+ emit(0xFF);
922
+ emit_modrm(0x1, dst);
923
+ }
924
+
925
+
926
+ void Assembler::decq(const Operand& dst) {
927
+ EnsureSpace ensure_space(this);
928
+ last_pc_ = pc_;
929
+ emit_rex_64(dst);
930
+ emit(0xFF);
931
+ emit_operand(1, dst);
932
+ }
933
+
934
+
935
+ void Assembler::decl(Register dst) {
936
+ EnsureSpace ensure_space(this);
937
+ last_pc_ = pc_;
938
+ emit_optional_rex_32(dst);
939
+ emit(0xFF);
940
+ emit_modrm(0x1, dst);
941
+ }
942
+
943
+
944
+ void Assembler::decl(const Operand& dst) {
945
+ EnsureSpace ensure_space(this);
946
+ last_pc_ = pc_;
947
+ emit_optional_rex_32(dst);
948
+ emit(0xFF);
949
+ emit_operand(1, dst);
950
+ }
951
+
952
+
953
+ void Assembler::decb(Register dst) {
954
+ EnsureSpace ensure_space(this);
955
+ last_pc_ = pc_;
956
+ if (dst.code() > 3) {
957
+ // Register is not one of al, bl, cl, dl. Its encoding needs REX.
958
+ emit_rex_32(dst);
959
+ }
960
+ emit(0xFE);
961
+ emit_modrm(0x1, dst);
962
+ }
963
+
964
+
965
+ void Assembler::decb(const Operand& dst) {
966
+ EnsureSpace ensure_space(this);
967
+ last_pc_ = pc_;
968
+ emit_optional_rex_32(dst);
969
+ emit(0xFE);
970
+ emit_operand(1, dst);
971
+ }
972
+
973
+
974
+ void Assembler::enter(Immediate size) {
975
+ EnsureSpace ensure_space(this);
976
+ last_pc_ = pc_;
977
+ emit(0xC8);
978
+ emitw(size.value_); // 16 bit operand, always.
979
+ emit(0);
980
+ }
981
+
982
+
983
+ void Assembler::hlt() {
984
+ EnsureSpace ensure_space(this);
985
+ last_pc_ = pc_;
986
+ emit(0xF4);
987
+ }
988
+
989
+
990
+ void Assembler::idivq(Register src) {
991
+ EnsureSpace ensure_space(this);
992
+ last_pc_ = pc_;
993
+ emit_rex_64(src);
994
+ emit(0xF7);
995
+ emit_modrm(0x7, src);
996
+ }
997
+
998
+
999
+ void Assembler::idivl(Register src) {
1000
+ EnsureSpace ensure_space(this);
1001
+ last_pc_ = pc_;
1002
+ emit_optional_rex_32(src);
1003
+ emit(0xF7);
1004
+ emit_modrm(0x7, src);
1005
+ }
1006
+
1007
+
1008
+ void Assembler::imul(Register src) {
1009
+ EnsureSpace ensure_space(this);
1010
+ last_pc_ = pc_;
1011
+ emit_rex_64(src);
1012
+ emit(0xF7);
1013
+ emit_modrm(0x5, src);
1014
+ }
1015
+
1016
+
1017
+ void Assembler::imul(Register dst, Register src) {
1018
+ EnsureSpace ensure_space(this);
1019
+ last_pc_ = pc_;
1020
+ emit_rex_64(dst, src);
1021
+ emit(0x0F);
1022
+ emit(0xAF);
1023
+ emit_modrm(dst, src);
1024
+ }
1025
+
1026
+
1027
+ void Assembler::imul(Register dst, const Operand& src) {
1028
+ EnsureSpace ensure_space(this);
1029
+ last_pc_ = pc_;
1030
+ emit_rex_64(dst, src);
1031
+ emit(0x0F);
1032
+ emit(0xAF);
1033
+ emit_operand(dst, src);
1034
+ }
1035
+
1036
+
1037
+ void Assembler::imul(Register dst, Register src, Immediate imm) {
1038
+ EnsureSpace ensure_space(this);
1039
+ last_pc_ = pc_;
1040
+ emit_rex_64(dst, src);
1041
+ if (is_int8(imm.value_)) {
1042
+ emit(0x6B);
1043
+ emit_modrm(dst, src);
1044
+ emit(imm.value_);
1045
+ } else {
1046
+ emit(0x69);
1047
+ emit_modrm(dst, src);
1048
+ emitl(imm.value_);
1049
+ }
1050
+ }
1051
+
1052
+
1053
+ void Assembler::imull(Register dst, Register src) {
1054
+ EnsureSpace ensure_space(this);
1055
+ last_pc_ = pc_;
1056
+ emit_optional_rex_32(dst, src);
1057
+ emit(0x0F);
1058
+ emit(0xAF);
1059
+ emit_modrm(dst, src);
1060
+ }
1061
+
1062
+
1063
+ void Assembler::incq(Register dst) {
1064
+ EnsureSpace ensure_space(this);
1065
+ last_pc_ = pc_;
1066
+ emit_rex_64(dst);
1067
+ emit(0xFF);
1068
+ emit_modrm(0x0, dst);
1069
+ }
1070
+
1071
+
1072
+ void Assembler::incq(const Operand& dst) {
1073
+ EnsureSpace ensure_space(this);
1074
+ last_pc_ = pc_;
1075
+ emit_rex_64(dst);
1076
+ emit(0xFF);
1077
+ emit_operand(0, dst);
1078
+ }
1079
+
1080
+
1081
+ void Assembler::incl(const Operand& dst) {
1082
+ EnsureSpace ensure_space(this);
1083
+ last_pc_ = pc_;
1084
+ emit_optional_rex_32(dst);
1085
+ emit(0xFF);
1086
+ emit_operand(0, dst);
1087
+ }
1088
+
1089
+
1090
+ void Assembler::int3() {
1091
+ EnsureSpace ensure_space(this);
1092
+ last_pc_ = pc_;
1093
+ emit(0xCC);
1094
+ }
1095
+
1096
+
1097
+ void Assembler::j(Condition cc, Label* L) {
1098
+ if (cc == always) {
1099
+ jmp(L);
1100
+ return;
1101
+ } else if (cc == never) {
1102
+ return;
1103
+ }
1104
+ EnsureSpace ensure_space(this);
1105
+ last_pc_ = pc_;
1106
+ ASSERT(is_uint4(cc));
1107
+ if (L->is_bound()) {
1108
+ const int short_size = 2;
1109
+ const int long_size = 6;
1110
+ int offs = L->pos() - pc_offset();
1111
+ ASSERT(offs <= 0);
1112
+ if (is_int8(offs - short_size)) {
1113
+ // 0111 tttn #8-bit disp
1114
+ emit(0x70 | cc);
1115
+ emit((offs - short_size) & 0xFF);
1116
+ } else {
1117
+ // 0000 1111 1000 tttn #32-bit disp
1118
+ emit(0x0F);
1119
+ emit(0x80 | cc);
1120
+ emitl(offs - long_size);
1121
+ }
1122
+ } else if (L->is_linked()) {
1123
+ // 0000 1111 1000 tttn #32-bit disp
1124
+ emit(0x0F);
1125
+ emit(0x80 | cc);
1126
+ emitl(L->pos());
1127
+ L->link_to(pc_offset() - sizeof(int32_t));
1128
+ } else {
1129
+ ASSERT(L->is_unused());
1130
+ emit(0x0F);
1131
+ emit(0x80 | cc);
1132
+ int32_t current = pc_offset();
1133
+ emitl(current);
1134
+ L->link_to(current);
1135
+ }
1136
+ }
1137
+
1138
+
1139
+ void Assembler::j(Condition cc,
1140
+ Handle<Code> target,
1141
+ RelocInfo::Mode rmode) {
1142
+ EnsureSpace ensure_space(this);
1143
+ last_pc_ = pc_;
1144
+ ASSERT(is_uint4(cc));
1145
+ // 0000 1111 1000 tttn #32-bit disp
1146
+ emit(0x0F);
1147
+ emit(0x80 | cc);
1148
+ emit_code_target(target, rmode);
1149
+ }
1150
+
1151
+
1152
+ void Assembler::jmp(Label* L) {
1153
+ EnsureSpace ensure_space(this);
1154
+ last_pc_ = pc_;
1155
+ if (L->is_bound()) {
1156
+ int offs = L->pos() - pc_offset() - 1;
1157
+ ASSERT(offs <= 0);
1158
+ if (is_int8(offs - sizeof(int8_t))) {
1159
+ // 1110 1011 #8-bit disp
1160
+ emit(0xEB);
1161
+ emit((offs - sizeof(int8_t)) & 0xFF);
1162
+ } else {
1163
+ // 1110 1001 #32-bit disp
1164
+ emit(0xE9);
1165
+ emitl(offs - sizeof(int32_t));
1166
+ }
1167
+ } else if (L->is_linked()) {
1168
+ // 1110 1001 #32-bit disp
1169
+ emit(0xE9);
1170
+ emitl(L->pos());
1171
+ L->link_to(pc_offset() - sizeof(int32_t));
1172
+ } else {
1173
+ // 1110 1001 #32-bit disp
1174
+ ASSERT(L->is_unused());
1175
+ emit(0xE9);
1176
+ int32_t current = pc_offset();
1177
+ emitl(current);
1178
+ L->link_to(current);
1179
+ }
1180
+ }
1181
+
1182
+
1183
+ void Assembler::jmp(Handle<Code> target, RelocInfo::Mode rmode) {
1184
+ EnsureSpace ensure_space(this);
1185
+ last_pc_ = pc_;
1186
+ // 1110 1001 #32-bit disp
1187
+ emit(0xE9);
1188
+ emit_code_target(target, rmode);
1189
+ }
1190
+
1191
+
1192
+ void Assembler::jmp(Register target) {
1193
+ EnsureSpace ensure_space(this);
1194
+ last_pc_ = pc_;
1195
+ // Opcode FF/4 r64
1196
+ if (target.high_bit()) {
1197
+ emit_rex_64(target);
1198
+ }
1199
+ emit(0xFF);
1200
+ emit_modrm(0x4, target);
1201
+ }
1202
+
1203
+
1204
+ void Assembler::jmp(const Operand& src) {
1205
+ EnsureSpace ensure_space(this);
1206
+ last_pc_ = pc_;
1207
+ // Opcode FF/4 m64
1208
+ emit_optional_rex_32(src);
1209
+ emit(0xFF);
1210
+ emit_operand(0x4, src);
1211
+ }
1212
+
1213
+
1214
+ void Assembler::lea(Register dst, const Operand& src) {
1215
+ EnsureSpace ensure_space(this);
1216
+ last_pc_ = pc_;
1217
+ emit_rex_64(dst, src);
1218
+ emit(0x8D);
1219
+ emit_operand(dst, src);
1220
+ }
1221
+
1222
+
1223
+ void Assembler::load_rax(void* value, RelocInfo::Mode mode) {
1224
+ EnsureSpace ensure_space(this);
1225
+ last_pc_ = pc_;
1226
+ emit(0x48); // REX.W
1227
+ emit(0xA1);
1228
+ emitq(reinterpret_cast<uintptr_t>(value), mode);
1229
+ }
1230
+
1231
+
1232
+ void Assembler::load_rax(ExternalReference ref) {
1233
+ load_rax(ref.address(), RelocInfo::EXTERNAL_REFERENCE);
1234
+ }
1235
+
1236
+
1237
+ void Assembler::leave() {
1238
+ EnsureSpace ensure_space(this);
1239
+ last_pc_ = pc_;
1240
+ emit(0xC9);
1241
+ }
1242
+
1243
+
1244
+ void Assembler::movb(Register dst, const Operand& src) {
1245
+ EnsureSpace ensure_space(this);
1246
+ last_pc_ = pc_;
1247
+ emit_rex_32(dst, src);
1248
+ emit(0x8A);
1249
+ emit_operand(dst, src);
1250
+ }
1251
+
1252
+ void Assembler::movb(Register dst, Immediate imm) {
1253
+ EnsureSpace ensure_space(this);
1254
+ last_pc_ = pc_;
1255
+ emit_rex_32(dst);
1256
+ emit(0xC6);
1257
+ emit_modrm(0x0, dst);
1258
+ emit(imm.value_);
1259
+ }
1260
+
1261
+ void Assembler::movb(const Operand& dst, Register src) {
1262
+ EnsureSpace ensure_space(this);
1263
+ last_pc_ = pc_;
1264
+ emit_rex_32(src, dst);
1265
+ emit(0x88);
1266
+ emit_operand(src, dst);
1267
+ }
1268
+
1269
+ void Assembler::movw(const Operand& dst, Register src) {
1270
+ EnsureSpace ensure_space(this);
1271
+ last_pc_ = pc_;
1272
+ emit(0x66);
1273
+ emit_optional_rex_32(src, dst);
1274
+ emit(0x89);
1275
+ emit_operand(src, dst);
1276
+ }
1277
+
1278
+ void Assembler::movl(Register dst, const Operand& src) {
1279
+ EnsureSpace ensure_space(this);
1280
+ last_pc_ = pc_;
1281
+ emit_optional_rex_32(dst, src);
1282
+ emit(0x8B);
1283
+ emit_operand(dst, src);
1284
+ }
1285
+
1286
+
1287
+ void Assembler::movl(Register dst, Register src) {
1288
+ EnsureSpace ensure_space(this);
1289
+ last_pc_ = pc_;
1290
+ emit_optional_rex_32(dst, src);
1291
+ emit(0x8B);
1292
+ emit_modrm(dst, src);
1293
+ }
1294
+
1295
+
1296
+ void Assembler::movl(const Operand& dst, Register src) {
1297
+ EnsureSpace ensure_space(this);
1298
+ last_pc_ = pc_;
1299
+ emit_optional_rex_32(src, dst);
1300
+ emit(0x89);
1301
+ emit_operand(src, dst);
1302
+ }
1303
+
1304
+
1305
+ void Assembler::movl(const Operand& dst, Immediate value) {
1306
+ EnsureSpace ensure_space(this);
1307
+ last_pc_ = pc_;
1308
+ emit_optional_rex_32(dst);
1309
+ emit(0xC7);
1310
+ emit_operand(0x0, dst);
1311
+ emit(value); // Only 32-bit immediates are possible, not 8-bit immediates.
1312
+ }
1313
+
1314
+
1315
+ void Assembler::movl(Register dst, Immediate value) {
1316
+ EnsureSpace ensure_space(this);
1317
+ last_pc_ = pc_;
1318
+ emit_optional_rex_32(dst);
1319
+ emit(0xC7);
1320
+ emit_modrm(0x0, dst);
1321
+ emit(value); // Only 32-bit immediates are possible, not 8-bit immediates.
1322
+ }
1323
+
1324
+
1325
+ void Assembler::movq(Register dst, const Operand& src) {
1326
+ EnsureSpace ensure_space(this);
1327
+ last_pc_ = pc_;
1328
+ emit_rex_64(dst, src);
1329
+ emit(0x8B);
1330
+ emit_operand(dst, src);
1331
+ }
1332
+
1333
+
1334
+ void Assembler::movq(Register dst, Register src) {
1335
+ EnsureSpace ensure_space(this);
1336
+ last_pc_ = pc_;
1337
+ emit_rex_64(dst, src);
1338
+ emit(0x8B);
1339
+ emit_modrm(dst, src);
1340
+ }
1341
+
1342
+
1343
+ void Assembler::movq(Register dst, Immediate value) {
1344
+ EnsureSpace ensure_space(this);
1345
+ last_pc_ = pc_;
1346
+ emit_rex_64(dst);
1347
+ emit(0xC7);
1348
+ emit_modrm(0x0, dst);
1349
+ emit(value); // Only 32-bit immediates are possible, not 8-bit immediates.
1350
+ }
1351
+
1352
+
1353
+ void Assembler::movq(const Operand& dst, Register src) {
1354
+ EnsureSpace ensure_space(this);
1355
+ last_pc_ = pc_;
1356
+ emit_rex_64(src, dst);
1357
+ emit(0x89);
1358
+ emit_operand(src, dst);
1359
+ }
1360
+
1361
+
1362
+ void Assembler::movq(Register dst, void* value, RelocInfo::Mode rmode) {
1363
+ // This method must not be used with heap object references. The stored
1364
+ // address is not GC safe. Use the handle version instead.
1365
+ ASSERT(rmode > RelocInfo::LAST_GCED_ENUM);
1366
+ EnsureSpace ensure_space(this);
1367
+ last_pc_ = pc_;
1368
+ emit_rex_64(dst);
1369
+ emit(0xB8 | dst.low_bits());
1370
+ emitq(reinterpret_cast<uintptr_t>(value), rmode);
1371
+ }
1372
+
1373
+
1374
+ void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
1375
+ // Non-relocatable values might not need a 64-bit representation.
1376
+ if (rmode == RelocInfo::NONE) {
1377
+ // Sadly, there is no zero or sign extending move for 8-bit immediates.
1378
+ if (is_int32(value)) {
1379
+ movq(dst, Immediate(static_cast<int32_t>(value)));
1380
+ return;
1381
+ } else if (is_uint32(value)) {
1382
+ movl(dst, Immediate(static_cast<int32_t>(value)));
1383
+ return;
1384
+ }
1385
+ // Value cannot be represented by 32 bits, so do a full 64 bit immediate
1386
+ // value.
1387
+ }
1388
+ EnsureSpace ensure_space(this);
1389
+ last_pc_ = pc_;
1390
+ emit_rex_64(dst);
1391
+ emit(0xB8 | dst.low_bits());
1392
+ emitq(value, rmode);
1393
+ }
1394
+
1395
+
1396
+ void Assembler::movq(Register dst, ExternalReference ref) {
1397
+ EnsureSpace ensure_space(this);
1398
+ last_pc_ = pc_;
1399
+ emit_rex_64(dst);
1400
+ emit(0xB8 | dst.low_bits());
1401
+ emitq(reinterpret_cast<uintptr_t>(ref.address()),
1402
+ RelocInfo::EXTERNAL_REFERENCE);
1403
+ }
1404
+
1405
+
1406
+ void Assembler::movq(const Operand& dst, Immediate value) {
1407
+ EnsureSpace ensure_space(this);
1408
+ last_pc_ = pc_;
1409
+ emit_rex_64(dst);
1410
+ emit(0xC7);
1411
+ emit_operand(0, dst);
1412
+ emit(value);
1413
+ }
1414
+
1415
+
1416
+ /*
1417
+ * Loads the ip-relative location of the src label into the target
1418
+ * location (as a 32-bit offset sign extended to 64-bit).
1419
+ */
1420
+ void Assembler::movl(const Operand& dst, Label* src) {
1421
+ EnsureSpace ensure_space(this);
1422
+ last_pc_ = pc_;
1423
+ emit_optional_rex_32(dst);
1424
+ emit(0xC7);
1425
+ emit_operand(0, dst);
1426
+ if (src->is_bound()) {
1427
+ int offset = src->pos() - pc_offset() - sizeof(int32_t);
1428
+ ASSERT(offset <= 0);
1429
+ emitl(offset);
1430
+ } else if (src->is_linked()) {
1431
+ emitl(src->pos());
1432
+ src->link_to(pc_offset() - sizeof(int32_t));
1433
+ } else {
1434
+ ASSERT(src->is_unused());
1435
+ int32_t current = pc_offset();
1436
+ emitl(current);
1437
+ src->link_to(current);
1438
+ }
1439
+ }
1440
+
1441
+
1442
+ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) {
1443
+ // If there is no relocation info, emit the value of the handle efficiently
1444
+ // (possibly using less that 8 bytes for the value).
1445
+ if (mode == RelocInfo::NONE) {
1446
+ // There is no possible reason to store a heap pointer without relocation
1447
+ // info, so it must be a smi.
1448
+ ASSERT(value->IsSmi());
1449
+ movq(dst, reinterpret_cast<int64_t>(*value), RelocInfo::NONE);
1450
+ } else {
1451
+ EnsureSpace ensure_space(this);
1452
+ last_pc_ = pc_;
1453
+ ASSERT(value->IsHeapObject());
1454
+ ASSERT(!Heap::InNewSpace(*value));
1455
+ emit_rex_64(dst);
1456
+ emit(0xB8 | dst.low_bits());
1457
+ emitq(reinterpret_cast<uintptr_t>(value.location()), mode);
1458
+ }
1459
+ }
1460
+
1461
+
1462
+ void Assembler::movsxbq(Register dst, const Operand& src) {
1463
+ EnsureSpace ensure_space(this);
1464
+ last_pc_ = pc_;
1465
+ emit_rex_32(dst, src);
1466
+ emit(0x0F);
1467
+ emit(0xBE);
1468
+ emit_operand(dst, src);
1469
+ }
1470
+
1471
+
1472
+ void Assembler::movsxwq(Register dst, const Operand& src) {
1473
+ EnsureSpace ensure_space(this);
1474
+ last_pc_ = pc_;
1475
+ emit_rex_64(dst, src);
1476
+ emit(0x0F);
1477
+ emit(0xBF);
1478
+ emit_operand(dst, src);
1479
+ }
1480
+
1481
+
1482
+ void Assembler::movsxlq(Register dst, Register src) {
1483
+ EnsureSpace ensure_space(this);
1484
+ last_pc_ = pc_;
1485
+ emit_rex_64(dst, src);
1486
+ emit(0x63);
1487
+ emit_modrm(dst, src);
1488
+ }
1489
+
1490
+
1491
+ void Assembler::movsxlq(Register dst, const Operand& src) {
1492
+ EnsureSpace ensure_space(this);
1493
+ last_pc_ = pc_;
1494
+ emit_rex_64(dst, src);
1495
+ emit(0x63);
1496
+ emit_operand(dst, src);
1497
+ }
1498
+
1499
+
1500
+ void Assembler::movzxbq(Register dst, const Operand& src) {
1501
+ EnsureSpace ensure_space(this);
1502
+ last_pc_ = pc_;
1503
+ emit_rex_64(dst, src);
1504
+ emit(0x0F);
1505
+ emit(0xB6);
1506
+ emit_operand(dst, src);
1507
+ }
1508
+
1509
+
1510
+ void Assembler::movzxbl(Register dst, const Operand& src) {
1511
+ EnsureSpace ensure_space(this);
1512
+ last_pc_ = pc_;
1513
+ emit_optional_rex_32(dst, src);
1514
+ emit(0x0F);
1515
+ emit(0xB6);
1516
+ emit_operand(dst, src);
1517
+ }
1518
+
1519
+
1520
+ void Assembler::movzxwq(Register dst, const Operand& src) {
1521
+ EnsureSpace ensure_space(this);
1522
+ last_pc_ = pc_;
1523
+ emit_rex_64(dst, src);
1524
+ emit(0x0F);
1525
+ emit(0xB7);
1526
+ emit_operand(dst, src);
1527
+ }
1528
+
1529
+
1530
+ void Assembler::movzxwl(Register dst, const Operand& src) {
1531
+ EnsureSpace ensure_space(this);
1532
+ last_pc_ = pc_;
1533
+ emit_optional_rex_32(dst, src);
1534
+ emit(0x0F);
1535
+ emit(0xB7);
1536
+ emit_operand(dst, src);
1537
+ }
1538
+
1539
+
1540
+ void Assembler::mul(Register src) {
1541
+ EnsureSpace ensure_space(this);
1542
+ last_pc_ = pc_;
1543
+ emit_rex_64(src);
1544
+ emit(0xF7);
1545
+ emit_modrm(0x4, src);
1546
+ }
1547
+
1548
+
1549
+ void Assembler::neg(Register dst) {
1550
+ EnsureSpace ensure_space(this);
1551
+ last_pc_ = pc_;
1552
+ emit_rex_64(dst);
1553
+ emit(0xF7);
1554
+ emit_modrm(0x3, dst);
1555
+ }
1556
+
1557
+
1558
+ void Assembler::negl(Register dst) {
1559
+ EnsureSpace ensure_space(this);
1560
+ last_pc_ = pc_;
1561
+ emit_optional_rex_32(dst);
1562
+ emit(0xF7);
1563
+ emit_modrm(0x3, dst);
1564
+ }
1565
+
1566
+
1567
+ void Assembler::neg(const Operand& dst) {
1568
+ EnsureSpace ensure_space(this);
1569
+ last_pc_ = pc_;
1570
+ emit_rex_64(dst);
1571
+ emit(0xF7);
1572
+ emit_operand(3, dst);
1573
+ }
1574
+
1575
+
1576
+ void Assembler::nop() {
1577
+ EnsureSpace ensure_space(this);
1578
+ last_pc_ = pc_;
1579
+ emit(0x90);
1580
+ }
1581
+
1582
+
1583
+ void Assembler::not_(Register dst) {
1584
+ EnsureSpace ensure_space(this);
1585
+ last_pc_ = pc_;
1586
+ emit_rex_64(dst);
1587
+ emit(0xF7);
1588
+ emit_modrm(0x2, dst);
1589
+ }
1590
+
1591
+
1592
+ void Assembler::not_(const Operand& dst) {
1593
+ EnsureSpace ensure_space(this);
1594
+ last_pc_ = pc_;
1595
+ emit_rex_64(dst);
1596
+ emit(0xF7);
1597
+ emit_operand(2, dst);
1598
+ }
1599
+
1600
+
1601
+ void Assembler::nop(int n) {
1602
+ // The recommended muti-byte sequences of NOP instructions from the Intel 64
1603
+ // and IA-32 Architectures Software Developer's Manual.
1604
+ //
1605
+ // Length Assembly Byte Sequence
1606
+ // 2 bytes 66 NOP 66 90H
1607
+ // 3 bytes NOP DWORD ptr [EAX] 0F 1F 00H
1608
+ // 4 bytes NOP DWORD ptr [EAX + 00H] 0F 1F 40 00H
1609
+ // 5 bytes NOP DWORD ptr [EAX + EAX*1 + 00H] 0F 1F 44 00 00H
1610
+ // 6 bytes 66 NOP DWORD ptr [EAX + EAX*1 + 00H] 66 0F 1F 44 00 00H
1611
+ // 7 bytes NOP DWORD ptr [EAX + 00000000H] 0F 1F 80 00 00 00 00H
1612
+ // 8 bytes NOP DWORD ptr [EAX + EAX*1 + 00000000H] 0F 1F 84 00 00 00 00 00H
1613
+ // 9 bytes 66 NOP DWORD ptr [EAX + EAX*1 + 66 0F 1F 84 00 00 00 00
1614
+ // 00000000H] 00H
1615
+
1616
+ ASSERT(1 <= n);
1617
+ ASSERT(n <= 9);
1618
+ EnsureSpace ensure_space(this);
1619
+ last_pc_ = pc_;
1620
+ switch (n) {
1621
+ case 1:
1622
+ emit(0x90);
1623
+ return;
1624
+ case 2:
1625
+ emit(0x66);
1626
+ emit(0x90);
1627
+ return;
1628
+ case 3:
1629
+ emit(0x0f);
1630
+ emit(0x1f);
1631
+ emit(0x00);
1632
+ return;
1633
+ case 4:
1634
+ emit(0x0f);
1635
+ emit(0x1f);
1636
+ emit(0x40);
1637
+ emit(0x00);
1638
+ return;
1639
+ case 5:
1640
+ emit(0x0f);
1641
+ emit(0x1f);
1642
+ emit(0x44);
1643
+ emit(0x00);
1644
+ emit(0x00);
1645
+ return;
1646
+ case 6:
1647
+ emit(0x66);
1648
+ emit(0x0f);
1649
+ emit(0x1f);
1650
+ emit(0x44);
1651
+ emit(0x00);
1652
+ emit(0x00);
1653
+ return;
1654
+ case 7:
1655
+ emit(0x0f);
1656
+ emit(0x1f);
1657
+ emit(0x80);
1658
+ emit(0x00);
1659
+ emit(0x00);
1660
+ emit(0x00);
1661
+ emit(0x00);
1662
+ return;
1663
+ case 8:
1664
+ emit(0x0f);
1665
+ emit(0x1f);
1666
+ emit(0x84);
1667
+ emit(0x00);
1668
+ emit(0x00);
1669
+ emit(0x00);
1670
+ emit(0x00);
1671
+ emit(0x00);
1672
+ return;
1673
+ case 9:
1674
+ emit(0x66);
1675
+ emit(0x0f);
1676
+ emit(0x1f);
1677
+ emit(0x84);
1678
+ emit(0x00);
1679
+ emit(0x00);
1680
+ emit(0x00);
1681
+ emit(0x00);
1682
+ emit(0x00);
1683
+ return;
1684
+ }
1685
+ }
1686
+
1687
+
1688
+ void Assembler::pop(Register dst) {
1689
+ EnsureSpace ensure_space(this);
1690
+ last_pc_ = pc_;
1691
+ if (dst.high_bit()) {
1692
+ emit_rex_64(dst);
1693
+ }
1694
+ emit(0x58 | dst.low_bits());
1695
+ }
1696
+
1697
+
1698
+ void Assembler::pop(const Operand& dst) {
1699
+ EnsureSpace ensure_space(this);
1700
+ last_pc_ = pc_;
1701
+ emit_rex_64(dst); // Could be omitted in some cases.
1702
+ emit(0x8F);
1703
+ emit_operand(0, dst);
1704
+ }
1705
+
1706
+
1707
+ void Assembler::popfq() {
1708
+ EnsureSpace ensure_space(this);
1709
+ last_pc_ = pc_;
1710
+ emit(0x9D);
1711
+ }
1712
+
1713
+
1714
+ void Assembler::push(Register src) {
1715
+ EnsureSpace ensure_space(this);
1716
+ last_pc_ = pc_;
1717
+ if (src.high_bit()) {
1718
+ emit_rex_64(src);
1719
+ }
1720
+ emit(0x50 | src.low_bits());
1721
+ }
1722
+
1723
+
1724
+ void Assembler::push(const Operand& src) {
1725
+ EnsureSpace ensure_space(this);
1726
+ last_pc_ = pc_;
1727
+ emit_rex_64(src); // Could be omitted in some cases.
1728
+ emit(0xFF);
1729
+ emit_operand(6, src);
1730
+ }
1731
+
1732
+
1733
+ void Assembler::push(Immediate value) {
1734
+ EnsureSpace ensure_space(this);
1735
+ last_pc_ = pc_;
1736
+ if (is_int8(value.value_)) {
1737
+ emit(0x6A);
1738
+ emit(value.value_); // Emit low byte of value.
1739
+ } else {
1740
+ emit(0x68);
1741
+ emitl(value.value_);
1742
+ }
1743
+ }
1744
+
1745
+
1746
+ void Assembler::pushfq() {
1747
+ EnsureSpace ensure_space(this);
1748
+ last_pc_ = pc_;
1749
+ emit(0x9C);
1750
+ }
1751
+
1752
+
1753
+ void Assembler::rdtsc() {
1754
+ EnsureSpace ensure_space(this);
1755
+ last_pc_ = pc_;
1756
+ emit(0x0F);
1757
+ emit(0x31);
1758
+ }
1759
+
1760
+
1761
+ void Assembler::ret(int imm16) {
1762
+ EnsureSpace ensure_space(this);
1763
+ last_pc_ = pc_;
1764
+ ASSERT(is_uint16(imm16));
1765
+ if (imm16 == 0) {
1766
+ emit(0xC3);
1767
+ } else {
1768
+ emit(0xC2);
1769
+ emit(imm16 & 0xFF);
1770
+ emit((imm16 >> 8) & 0xFF);
1771
+ }
1772
+ }
1773
+
1774
+
1775
+ void Assembler::setcc(Condition cc, Register reg) {
1776
+ if (cc > last_condition) {
1777
+ movb(reg, Immediate(cc == always ? 1 : 0));
1778
+ return;
1779
+ }
1780
+ EnsureSpace ensure_space(this);
1781
+ last_pc_ = pc_;
1782
+ ASSERT(is_uint4(cc));
1783
+ if (reg.code() > 3) { // Use x64 byte registers, where different.
1784
+ emit_rex_32(reg);
1785
+ }
1786
+ emit(0x0F);
1787
+ emit(0x90 | cc);
1788
+ emit_modrm(0x0, reg);
1789
+ }
1790
+
1791
+
1792
+ void Assembler::shld(Register dst, Register src) {
1793
+ EnsureSpace ensure_space(this);
1794
+ last_pc_ = pc_;
1795
+ emit_rex_64(src, dst);
1796
+ emit(0x0F);
1797
+ emit(0xA5);
1798
+ emit_modrm(src, dst);
1799
+ }
1800
+
1801
+
1802
+ void Assembler::shrd(Register dst, Register src) {
1803
+ EnsureSpace ensure_space(this);
1804
+ last_pc_ = pc_;
1805
+ emit_rex_64(src, dst);
1806
+ emit(0x0F);
1807
+ emit(0xAD);
1808
+ emit_modrm(src, dst);
1809
+ }
1810
+
1811
+
1812
+ void Assembler::xchg(Register dst, Register src) {
1813
+ EnsureSpace ensure_space(this);
1814
+ last_pc_ = pc_;
1815
+ if (src.is(rax) || dst.is(rax)) { // Single-byte encoding
1816
+ Register other = src.is(rax) ? dst : src;
1817
+ emit_rex_64(other);
1818
+ emit(0x90 | other.low_bits());
1819
+ } else {
1820
+ emit_rex_64(src, dst);
1821
+ emit(0x87);
1822
+ emit_modrm(src, dst);
1823
+ }
1824
+ }
1825
+
1826
+
1827
+ void Assembler::store_rax(void* dst, RelocInfo::Mode mode) {
1828
+ EnsureSpace ensure_space(this);
1829
+ last_pc_ = pc_;
1830
+ emit(0x48); // REX.W
1831
+ emit(0xA3);
1832
+ emitq(reinterpret_cast<uintptr_t>(dst), mode);
1833
+ }
1834
+
1835
+
1836
+ void Assembler::store_rax(ExternalReference ref) {
1837
+ store_rax(ref.address(), RelocInfo::EXTERNAL_REFERENCE);
1838
+ }
1839
+
1840
+
1841
+ void Assembler::testb(Register dst, Register src) {
1842
+ EnsureSpace ensure_space(this);
1843
+ last_pc_ = pc_;
1844
+ if (dst.code() > 3 || src.code() > 3) {
1845
+ // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1846
+ emit_rex_32(dst, src);
1847
+ }
1848
+ emit(0x84);
1849
+ emit_modrm(dst, src);
1850
+ }
1851
+
1852
+
1853
+ void Assembler::testb(Register reg, Immediate mask) {
1854
+ ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
1855
+ EnsureSpace ensure_space(this);
1856
+ last_pc_ = pc_;
1857
+ if (reg.is(rax)) {
1858
+ emit(0xA8);
1859
+ emit(mask.value_); // Low byte emitted.
1860
+ } else {
1861
+ if (reg.code() > 3) {
1862
+ // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1863
+ emit_rex_32(reg);
1864
+ }
1865
+ emit(0xF6);
1866
+ emit_modrm(0x0, reg);
1867
+ emit(mask.value_); // Low byte emitted.
1868
+ }
1869
+ }
1870
+
1871
+
1872
+ void Assembler::testb(const Operand& op, Immediate mask) {
1873
+ ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
1874
+ EnsureSpace ensure_space(this);
1875
+ last_pc_ = pc_;
1876
+ emit_optional_rex_32(rax, op);
1877
+ emit(0xF6);
1878
+ emit_operand(rax, op); // Operation code 0
1879
+ emit(mask.value_); // Low byte emitted.
1880
+ }
1881
+
1882
+
1883
+ void Assembler::testl(Register dst, Register src) {
1884
+ EnsureSpace ensure_space(this);
1885
+ last_pc_ = pc_;
1886
+ emit_optional_rex_32(dst, src);
1887
+ emit(0x85);
1888
+ emit_modrm(dst, src);
1889
+ }
1890
+
1891
+
1892
+ void Assembler::testl(Register reg, Immediate mask) {
1893
+ // testl with a mask that fits in the low byte is exactly testb.
1894
+ if (is_uint8(mask.value_)) {
1895
+ testb(reg, mask);
1896
+ return;
1897
+ }
1898
+ EnsureSpace ensure_space(this);
1899
+ last_pc_ = pc_;
1900
+ if (reg.is(rax)) {
1901
+ emit(0xA9);
1902
+ emit(mask);
1903
+ } else {
1904
+ emit_optional_rex_32(rax, reg);
1905
+ emit(0xF7);
1906
+ emit_modrm(0x0, reg);
1907
+ emit(mask);
1908
+ }
1909
+ }
1910
+
1911
+
1912
+ void Assembler::testl(const Operand& op, Immediate mask) {
1913
+ // testl with a mask that fits in the low byte is exactly testb.
1914
+ if (is_uint8(mask.value_)) {
1915
+ testb(op, mask);
1916
+ return;
1917
+ }
1918
+ EnsureSpace ensure_space(this);
1919
+ last_pc_ = pc_;
1920
+ emit_optional_rex_32(rax, op);
1921
+ emit(0xF7);
1922
+ emit_operand(rax, op); // Operation code 0
1923
+ emit(mask);
1924
+ }
1925
+
1926
+
1927
+ void Assembler::testq(const Operand& op, Register reg) {
1928
+ EnsureSpace ensure_space(this);
1929
+ last_pc_ = pc_;
1930
+ emit_rex_64(reg, op);
1931
+ emit(0x85);
1932
+ emit_operand(reg, op);
1933
+ }
1934
+
1935
+
1936
+ void Assembler::testq(Register dst, Register src) {
1937
+ EnsureSpace ensure_space(this);
1938
+ last_pc_ = pc_;
1939
+ emit_rex_64(dst, src);
1940
+ emit(0x85);
1941
+ emit_modrm(dst, src);
1942
+ }
1943
+
1944
+
1945
+ void Assembler::testq(Register dst, Immediate mask) {
1946
+ EnsureSpace ensure_space(this);
1947
+ last_pc_ = pc_;
1948
+ if (dst.is(rax)) {
1949
+ emit_rex_64();
1950
+ emit(0xA9);
1951
+ emit(mask);
1952
+ } else {
1953
+ emit_rex_64(dst);
1954
+ emit(0xF7);
1955
+ emit_modrm(0, dst);
1956
+ emit(mask);
1957
+ }
1958
+ }
1959
+
1960
+
1961
+ // FPU instructions
1962
+
1963
+
1964
+ void Assembler::fld(int i) {
1965
+ EnsureSpace ensure_space(this);
1966
+ last_pc_ = pc_;
1967
+ emit_farith(0xD9, 0xC0, i);
1968
+ }
1969
+
1970
+
1971
+ void Assembler::fld1() {
1972
+ EnsureSpace ensure_space(this);
1973
+ last_pc_ = pc_;
1974
+ emit(0xD9);
1975
+ emit(0xE8);
1976
+ }
1977
+
1978
+
1979
+ void Assembler::fldz() {
1980
+ EnsureSpace ensure_space(this);
1981
+ last_pc_ = pc_;
1982
+ emit(0xD9);
1983
+ emit(0xEE);
1984
+ }
1985
+
1986
+
1987
+ void Assembler::fld_s(const Operand& adr) {
1988
+ EnsureSpace ensure_space(this);
1989
+ last_pc_ = pc_;
1990
+ emit_optional_rex_32(adr);
1991
+ emit(0xD9);
1992
+ emit_operand(0, adr);
1993
+ }
1994
+
1995
+
1996
+ void Assembler::fld_d(const Operand& adr) {
1997
+ EnsureSpace ensure_space(this);
1998
+ last_pc_ = pc_;
1999
+ emit_optional_rex_32(adr);
2000
+ emit(0xDD);
2001
+ emit_operand(0, adr);
2002
+ }
2003
+
2004
+
2005
+ void Assembler::fstp_s(const Operand& adr) {
2006
+ EnsureSpace ensure_space(this);
2007
+ last_pc_ = pc_;
2008
+ emit_optional_rex_32(adr);
2009
+ emit(0xD9);
2010
+ emit_operand(3, adr);
2011
+ }
2012
+
2013
+
2014
+ void Assembler::fstp_d(const Operand& adr) {
2015
+ EnsureSpace ensure_space(this);
2016
+ last_pc_ = pc_;
2017
+ emit_optional_rex_32(adr);
2018
+ emit(0xDD);
2019
+ emit_operand(3, adr);
2020
+ }
2021
+
2022
+
2023
+ void Assembler::fstp(int index) {
2024
+ ASSERT(is_uint3(index));
2025
+ EnsureSpace ensure_space(this);
2026
+ last_pc_ = pc_;
2027
+ emit_farith(0xDD, 0xD8, index);
2028
+ }
2029
+
2030
+
2031
+ void Assembler::fild_s(const Operand& adr) {
2032
+ EnsureSpace ensure_space(this);
2033
+ last_pc_ = pc_;
2034
+ emit_optional_rex_32(adr);
2035
+ emit(0xDB);
2036
+ emit_operand(0, adr);
2037
+ }
2038
+
2039
+
2040
+ void Assembler::fild_d(const Operand& adr) {
2041
+ EnsureSpace ensure_space(this);
2042
+ last_pc_ = pc_;
2043
+ emit_optional_rex_32(adr);
2044
+ emit(0xDF);
2045
+ emit_operand(5, adr);
2046
+ }
2047
+
2048
+
2049
+ void Assembler::fistp_s(const Operand& adr) {
2050
+ EnsureSpace ensure_space(this);
2051
+ last_pc_ = pc_;
2052
+ emit_optional_rex_32(adr);
2053
+ emit(0xDB);
2054
+ emit_operand(3, adr);
2055
+ }
2056
+
2057
+
2058
+ void Assembler::fisttp_s(const Operand& adr) {
2059
+ ASSERT(CpuFeatures::IsEnabled(SSE3));
2060
+ EnsureSpace ensure_space(this);
2061
+ last_pc_ = pc_;
2062
+ emit_optional_rex_32(adr);
2063
+ emit(0xDB);
2064
+ emit_operand(1, adr);
2065
+ }
2066
+
2067
+
2068
+ void Assembler::fist_s(const Operand& adr) {
2069
+ EnsureSpace ensure_space(this);
2070
+ last_pc_ = pc_;
2071
+ emit_optional_rex_32(adr);
2072
+ emit(0xDB);
2073
+ emit_operand(2, adr);
2074
+ }
2075
+
2076
+
2077
+ void Assembler::fistp_d(const Operand& adr) {
2078
+ EnsureSpace ensure_space(this);
2079
+ last_pc_ = pc_;
2080
+ emit_optional_rex_32(adr);
2081
+ emit(0xDF);
2082
+ emit_operand(7, adr);
2083
+ }
2084
+
2085
+
2086
+ void Assembler::fabs() {
2087
+ EnsureSpace ensure_space(this);
2088
+ last_pc_ = pc_;
2089
+ emit(0xD9);
2090
+ emit(0xE1);
2091
+ }
2092
+
2093
+
2094
+ void Assembler::fchs() {
2095
+ EnsureSpace ensure_space(this);
2096
+ last_pc_ = pc_;
2097
+ emit(0xD9);
2098
+ emit(0xE0);
2099
+ }
2100
+
2101
+
2102
+ void Assembler::fcos() {
2103
+ EnsureSpace ensure_space(this);
2104
+ last_pc_ = pc_;
2105
+ emit(0xD9);
2106
+ emit(0xFF);
2107
+ }
2108
+
2109
+
2110
+ void Assembler::fsin() {
2111
+ EnsureSpace ensure_space(this);
2112
+ last_pc_ = pc_;
2113
+ emit(0xD9);
2114
+ emit(0xFE);
2115
+ }
2116
+
2117
+
2118
+ void Assembler::fadd(int i) {
2119
+ EnsureSpace ensure_space(this);
2120
+ last_pc_ = pc_;
2121
+ emit_farith(0xDC, 0xC0, i);
2122
+ }
2123
+
2124
+
2125
+ void Assembler::fsub(int i) {
2126
+ EnsureSpace ensure_space(this);
2127
+ last_pc_ = pc_;
2128
+ emit_farith(0xDC, 0xE8, i);
2129
+ }
2130
+
2131
+
2132
+ void Assembler::fisub_s(const Operand& adr) {
2133
+ EnsureSpace ensure_space(this);
2134
+ last_pc_ = pc_;
2135
+ emit_optional_rex_32(adr);
2136
+ emit(0xDA);
2137
+ emit_operand(4, adr);
2138
+ }
2139
+
2140
+
2141
+ void Assembler::fmul(int i) {
2142
+ EnsureSpace ensure_space(this);
2143
+ last_pc_ = pc_;
2144
+ emit_farith(0xDC, 0xC8, i);
2145
+ }
2146
+
2147
+
2148
+ void Assembler::fdiv(int i) {
2149
+ EnsureSpace ensure_space(this);
2150
+ last_pc_ = pc_;
2151
+ emit_farith(0xDC, 0xF8, i);
2152
+ }
2153
+
2154
+
2155
+ void Assembler::faddp(int i) {
2156
+ EnsureSpace ensure_space(this);
2157
+ last_pc_ = pc_;
2158
+ emit_farith(0xDE, 0xC0, i);
2159
+ }
2160
+
2161
+
2162
+ void Assembler::fsubp(int i) {
2163
+ EnsureSpace ensure_space(this);
2164
+ last_pc_ = pc_;
2165
+ emit_farith(0xDE, 0xE8, i);
2166
+ }
2167
+
2168
+
2169
+ void Assembler::fsubrp(int i) {
2170
+ EnsureSpace ensure_space(this);
2171
+ last_pc_ = pc_;
2172
+ emit_farith(0xDE, 0xE0, i);
2173
+ }
2174
+
2175
+
2176
+ void Assembler::fmulp(int i) {
2177
+ EnsureSpace ensure_space(this);
2178
+ last_pc_ = pc_;
2179
+ emit_farith(0xDE, 0xC8, i);
2180
+ }
2181
+
2182
+
2183
+ void Assembler::fdivp(int i) {
2184
+ EnsureSpace ensure_space(this);
2185
+ last_pc_ = pc_;
2186
+ emit_farith(0xDE, 0xF8, i);
2187
+ }
2188
+
2189
+
2190
+ void Assembler::fprem() {
2191
+ EnsureSpace ensure_space(this);
2192
+ last_pc_ = pc_;
2193
+ emit(0xD9);
2194
+ emit(0xF8);
2195
+ }
2196
+
2197
+
2198
+ void Assembler::fprem1() {
2199
+ EnsureSpace ensure_space(this);
2200
+ last_pc_ = pc_;
2201
+ emit(0xD9);
2202
+ emit(0xF5);
2203
+ }
2204
+
2205
+
2206
+ void Assembler::fxch(int i) {
2207
+ EnsureSpace ensure_space(this);
2208
+ last_pc_ = pc_;
2209
+ emit_farith(0xD9, 0xC8, i);
2210
+ }
2211
+
2212
+
2213
+ void Assembler::fincstp() {
2214
+ EnsureSpace ensure_space(this);
2215
+ last_pc_ = pc_;
2216
+ emit(0xD9);
2217
+ emit(0xF7);
2218
+ }
2219
+
2220
+
2221
+ void Assembler::ffree(int i) {
2222
+ EnsureSpace ensure_space(this);
2223
+ last_pc_ = pc_;
2224
+ emit_farith(0xDD, 0xC0, i);
2225
+ }
2226
+
2227
+
2228
+ void Assembler::ftst() {
2229
+ EnsureSpace ensure_space(this);
2230
+ last_pc_ = pc_;
2231
+ emit(0xD9);
2232
+ emit(0xE4);
2233
+ }
2234
+
2235
+
2236
+ void Assembler::fucomp(int i) {
2237
+ EnsureSpace ensure_space(this);
2238
+ last_pc_ = pc_;
2239
+ emit_farith(0xDD, 0xE8, i);
2240
+ }
2241
+
2242
+
2243
+ void Assembler::fucompp() {
2244
+ EnsureSpace ensure_space(this);
2245
+ last_pc_ = pc_;
2246
+ emit(0xDA);
2247
+ emit(0xE9);
2248
+ }
2249
+
2250
+
2251
+ void Assembler::fucomi(int i) {
2252
+ EnsureSpace ensure_space(this);
2253
+ last_pc_ = pc_;
2254
+ emit(0xDB);
2255
+ emit(0xE8 + i);
2256
+ }
2257
+
2258
+
2259
+ void Assembler::fucomip() {
2260
+ EnsureSpace ensure_space(this);
2261
+ last_pc_ = pc_;
2262
+ emit(0xDF);
2263
+ emit(0xE9);
2264
+ }
2265
+
2266
+
2267
+ void Assembler::fcompp() {
2268
+ EnsureSpace ensure_space(this);
2269
+ last_pc_ = pc_;
2270
+ emit(0xDE);
2271
+ emit(0xD9);
2272
+ }
2273
+
2274
+
2275
+ void Assembler::fnstsw_ax() {
2276
+ EnsureSpace ensure_space(this);
2277
+ last_pc_ = pc_;
2278
+ emit(0xDF);
2279
+ emit(0xE0);
2280
+ }
2281
+
2282
+
2283
+ void Assembler::fwait() {
2284
+ EnsureSpace ensure_space(this);
2285
+ last_pc_ = pc_;
2286
+ emit(0x9B);
2287
+ }
2288
+
2289
+
2290
+ void Assembler::frndint() {
2291
+ EnsureSpace ensure_space(this);
2292
+ last_pc_ = pc_;
2293
+ emit(0xD9);
2294
+ emit(0xFC);
2295
+ }
2296
+
2297
+
2298
+ void Assembler::fnclex() {
2299
+ EnsureSpace ensure_space(this);
2300
+ last_pc_ = pc_;
2301
+ emit(0xDB);
2302
+ emit(0xE2);
2303
+ }
2304
+
2305
+
2306
+ void Assembler::sahf() {
2307
+ // TODO(X64): Test for presence. Not all 64-bit intel CPU's have sahf
2308
+ // in 64-bit mode. Test CpuID.
2309
+ EnsureSpace ensure_space(this);
2310
+ last_pc_ = pc_;
2311
+ emit(0x9E);
2312
+ }
2313
+
2314
+
2315
+ void Assembler::emit_farith(int b1, int b2, int i) {
2316
+ ASSERT(is_uint8(b1) && is_uint8(b2)); // wrong opcode
2317
+ ASSERT(is_uint3(i)); // illegal stack offset
2318
+ emit(b1);
2319
+ emit(b2 + i);
2320
+ }
2321
+
2322
+ // SSE 2 operations
2323
+
2324
+ void Assembler::movsd(const Operand& dst, XMMRegister src) {
2325
+ EnsureSpace ensure_space(this);
2326
+ last_pc_ = pc_;
2327
+ emit(0xF2); // double
2328
+ emit_optional_rex_32(src, dst);
2329
+ emit(0x0F);
2330
+ emit(0x11); // store
2331
+ emit_sse_operand(src, dst);
2332
+ }
2333
+
2334
+
2335
+ void Assembler::movsd(XMMRegister dst, XMMRegister src) {
2336
+ EnsureSpace ensure_space(this);
2337
+ last_pc_ = pc_;
2338
+ emit(0xF2); // double
2339
+ emit_optional_rex_32(dst, src);
2340
+ emit(0x0F);
2341
+ emit(0x10); // load
2342
+ emit_sse_operand(dst, src);
2343
+ }
2344
+
2345
+
2346
+ void Assembler::movsd(XMMRegister dst, const Operand& src) {
2347
+ EnsureSpace ensure_space(this);
2348
+ last_pc_ = pc_;
2349
+ emit(0xF2); // double
2350
+ emit_optional_rex_32(dst, src);
2351
+ emit(0x0F);
2352
+ emit(0x10); // load
2353
+ emit_sse_operand(dst, src);
2354
+ }
2355
+
2356
+
2357
+ void Assembler::cvttss2si(Register dst, const Operand& src) {
2358
+ EnsureSpace ensure_space(this);
2359
+ last_pc_ = pc_;
2360
+ emit(0xF3);
2361
+ emit_optional_rex_32(dst, src);
2362
+ emit(0x0F);
2363
+ emit(0x2C);
2364
+ emit_operand(dst, src);
2365
+ }
2366
+
2367
+
2368
+ void Assembler::cvttsd2si(Register dst, const Operand& src) {
2369
+ EnsureSpace ensure_space(this);
2370
+ last_pc_ = pc_;
2371
+ emit(0xF2);
2372
+ emit_optional_rex_32(dst, src);
2373
+ emit(0x0F);
2374
+ emit(0x2C);
2375
+ emit_operand(dst, src);
2376
+ }
2377
+
2378
+
2379
+ void Assembler::cvtlsi2sd(XMMRegister dst, const Operand& src) {
2380
+ EnsureSpace ensure_space(this);
2381
+ last_pc_ = pc_;
2382
+ emit(0xF2);
2383
+ emit_optional_rex_32(dst, src);
2384
+ emit(0x0F);
2385
+ emit(0x2A);
2386
+ emit_sse_operand(dst, src);
2387
+ }
2388
+
2389
+
2390
+ void Assembler::cvtlsi2sd(XMMRegister dst, Register src) {
2391
+ EnsureSpace ensure_space(this);
2392
+ last_pc_ = pc_;
2393
+ emit(0xF2);
2394
+ emit_optional_rex_32(dst, src);
2395
+ emit(0x0F);
2396
+ emit(0x2A);
2397
+ emit_sse_operand(dst, src);
2398
+ }
2399
+
2400
+
2401
+ void Assembler::cvtqsi2sd(XMMRegister dst, Register src) {
2402
+ EnsureSpace ensure_space(this);
2403
+ last_pc_ = pc_;
2404
+ emit(0xF2);
2405
+ emit_rex_64(dst, src);
2406
+ emit(0x0F);
2407
+ emit(0x2A);
2408
+ emit_sse_operand(dst, src);
2409
+ }
2410
+
2411
+
2412
+ void Assembler::addsd(XMMRegister dst, XMMRegister src) {
2413
+ EnsureSpace ensure_space(this);
2414
+ last_pc_ = pc_;
2415
+ emit(0xF2);
2416
+ emit_optional_rex_32(dst, src);
2417
+ emit(0x0F);
2418
+ emit(0x58);
2419
+ emit_sse_operand(dst, src);
2420
+ }
2421
+
2422
+
2423
+ void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
2424
+ EnsureSpace ensure_space(this);
2425
+ last_pc_ = pc_;
2426
+ emit(0xF2);
2427
+ emit_optional_rex_32(dst, src);
2428
+ emit(0x0F);
2429
+ emit(0x59);
2430
+ emit_sse_operand(dst, src);
2431
+ }
2432
+
2433
+
2434
+ void Assembler::subsd(XMMRegister dst, XMMRegister src) {
2435
+ EnsureSpace ensure_space(this);
2436
+ last_pc_ = pc_;
2437
+ emit(0xF2);
2438
+ emit_optional_rex_32(dst, src);
2439
+ emit(0x0F);
2440
+ emit(0x5C);
2441
+ emit_sse_operand(dst, src);
2442
+ }
2443
+
2444
+
2445
+ void Assembler::divsd(XMMRegister dst, XMMRegister src) {
2446
+ EnsureSpace ensure_space(this);
2447
+ last_pc_ = pc_;
2448
+ emit(0xF2);
2449
+ emit_optional_rex_32(dst, src);
2450
+ emit(0x0F);
2451
+ emit(0x5E);
2452
+ emit_sse_operand(dst, src);
2453
+ }
2454
+
2455
+
2456
+
2457
+ void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) {
2458
+ Register ireg = { reg.code() };
2459
+ emit_operand(ireg, adr);
2460
+ }
2461
+
2462
+
2463
+ void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
2464
+ emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
2465
+ }
2466
+
2467
+ void Assembler::emit_sse_operand(XMMRegister dst, Register src) {
2468
+ emit(0xC0 | (dst.low_bits() << 3) | src.low_bits());
2469
+ }
2470
+
2471
+
2472
+ // Relocation information implementations
2473
+
2474
+ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
2475
+ ASSERT(rmode != RelocInfo::NONE);
2476
+ // Don't record external references unless the heap will be serialized.
2477
+ if (rmode == RelocInfo::EXTERNAL_REFERENCE &&
2478
+ !Serializer::enabled() &&
2479
+ !FLAG_debug_code) {
2480
+ return;
2481
+ }
2482
+ RelocInfo rinfo(pc_, rmode, data);
2483
+ reloc_info_writer.Write(&rinfo);
2484
+ }
2485
+
2486
+ void Assembler::RecordJSReturn() {
2487
+ WriteRecordedPositions();
2488
+ EnsureSpace ensure_space(this);
2489
+ RecordRelocInfo(RelocInfo::JS_RETURN);
2490
+ }
2491
+
2492
+
2493
+ void Assembler::RecordComment(const char* msg) {
2494
+ if (FLAG_debug_code) {
2495
+ EnsureSpace ensure_space(this);
2496
+ RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
2497
+ }
2498
+ }
2499
+
2500
+
2501
+ void Assembler::RecordPosition(int pos) {
2502
+ ASSERT(pos != RelocInfo::kNoPosition);
2503
+ ASSERT(pos >= 0);
2504
+ current_position_ = pos;
2505
+ }
2506
+
2507
+
2508
+ void Assembler::RecordStatementPosition(int pos) {
2509
+ ASSERT(pos != RelocInfo::kNoPosition);
2510
+ ASSERT(pos >= 0);
2511
+ current_statement_position_ = pos;
2512
+ }
2513
+
2514
+
2515
+ void Assembler::WriteRecordedPositions() {
2516
+ // Write the statement position if it is different from what was written last
2517
+ // time.
2518
+ if (current_statement_position_ != written_statement_position_) {
2519
+ EnsureSpace ensure_space(this);
2520
+ RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_);
2521
+ written_statement_position_ = current_statement_position_;
2522
+ }
2523
+
2524
+ // Write the position if it is different from what was written last time and
2525
+ // also different from the written statement position.
2526
+ if (current_position_ != written_position_ &&
2527
+ current_position_ != written_statement_position_) {
2528
+ EnsureSpace ensure_space(this);
2529
+ RecordRelocInfo(RelocInfo::POSITION, current_position_);
2530
+ written_position_ = current_position_;
2531
+ }
2532
+ }
2533
+
2534
+
2535
+ const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
2536
+ 1 << RelocInfo::INTERNAL_REFERENCE |
2537
+ 1 << RelocInfo::JS_RETURN;
2538
+
2539
+ } } // namespace v8::internal