therubyracer 0.4.7-x86-darwin-9

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