therubyracer 0.8.1.pre2 → 0.8.1

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

Potentially problematic release.


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

Files changed (877) hide show
  1. data/Changelog.md +2 -1
  2. data/README.md +6 -3
  3. data/ext/v8/upstream/3.1.8/.gitignore +31 -0
  4. data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
  5. data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
  6. data/ext/v8/upstream/3.1.8/LICENSE +52 -0
  7. data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
  8. data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
  9. data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
  10. data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
  11. data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
  12. data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
  13. data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
  14. data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
  15. data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
  16. data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
  17. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
  19. data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
  20. data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
  21. data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
  22. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
  23. data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
  24. data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
  25. data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
  26. data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
  27. data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
  28. data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
  29. data/ext/v8/upstream/3.1.8/src/api.h +508 -0
  30. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
  31. data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
  32. data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
  33. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
  34. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
  35. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
  36. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
  37. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
  38. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
  39. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
  40. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
  41. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
  42. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
  43. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
  44. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
  45. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
  46. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
  47. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
  48. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
  49. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
  50. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
  51. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
  52. data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
  53. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
  54. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
  55. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
  56. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
  57. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
  58. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
  59. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
  60. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
  61. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
  62. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
  63. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
  64. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
  65. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
  66. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
  67. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
  68. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
  69. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
  70. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
  71. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
  72. data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
  73. data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
  74. data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
  75. data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
  76. data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
  77. data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
  78. data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
  79. data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
  80. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
  81. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
  82. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
  83. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
  84. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
  85. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
  86. data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
  87. data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
  88. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
  89. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
  90. data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
  91. data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
  92. data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
  93. data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
  94. data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
  95. data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
  96. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
  97. data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
  98. data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
  99. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
  100. data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
  101. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
  102. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
  103. data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
  104. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
  105. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
  106. data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
  107. data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
  108. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
  109. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
  110. data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
  111. data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
  112. data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
  113. data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
  114. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
  115. data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
  116. data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
  117. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
  118. data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
  119. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
  120. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
  121. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
  122. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
  123. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
  124. data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
  125. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
  126. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
  127. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
  128. data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
  129. data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
  130. data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
  131. data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
  132. data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
  133. data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
  134. data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
  135. data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
  136. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
  137. data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
  138. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
  139. data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
  140. data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
  141. data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
  142. data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
  143. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
  144. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
  145. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
  146. data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
  147. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
  148. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
  149. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
  150. data/ext/v8/upstream/3.1.8/src/double.h +238 -0
  151. data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
  152. data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
  153. data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
  154. data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
  155. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
  156. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
  157. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
  158. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
  159. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
  160. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
  161. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
  162. data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
  163. data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
  164. data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
  165. data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
  166. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
  167. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
  168. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
  169. data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
  170. data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
  171. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
  172. data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
  173. data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
  174. data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
  175. data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
  176. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
  177. data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
  178. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
  179. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
  180. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
  181. data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
  182. data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
  183. data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
  184. data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
  185. data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
  186. data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
  187. data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
  188. data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
  189. data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
  190. data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
  191. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
  192. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
  193. data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
  194. data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
  195. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
  196. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
  197. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
  198. data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
  199. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
  200. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
  201. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
  202. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
  203. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
  204. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
  205. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
  206. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
  207. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
  208. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
  209. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
  210. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
  211. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
  212. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
  213. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
  214. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
  215. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
  216. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
  217. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
  218. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
  219. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
  220. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  221. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
  222. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
  223. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
  224. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
  225. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
  226. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
  227. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  228. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
  229. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
  230. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
  231. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
  232. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
  233. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
  234. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
  235. data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
  236. data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
  237. data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
  238. data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
  239. data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
  240. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
  241. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
  242. data/ext/v8/upstream/3.1.8/src/json.js +342 -0
  243. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
  244. data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
  245. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
  246. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
  247. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
  248. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
  249. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
  250. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
  251. data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
  252. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
  253. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
  254. data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
  255. data/ext/v8/upstream/3.1.8/src/list.h +164 -0
  256. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
  257. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
  258. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
  259. data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
  260. data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
  261. data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
  262. data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
  263. data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
  264. data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
  265. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
  266. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
  267. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
  268. data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
  269. data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
  270. data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
  271. data/ext/v8/upstream/3.1.8/src/log.h +379 -0
  272. data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
  273. data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
  274. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
  275. data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
  276. data/ext/v8/upstream/3.1.8/src/math.js +264 -0
  277. data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
  278. data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
  279. data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
  280. data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
  281. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
  282. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
  283. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
  284. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
  285. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
  286. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
  287. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
  288. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
  289. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
  290. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
  291. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
  292. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
  293. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
  294. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
  295. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
  296. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
  297. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
  298. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
  299. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
  300. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
  301. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
  302. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
  303. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
  304. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
  305. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
  306. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
  307. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
  308. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
  309. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
  310. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
  311. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
  312. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
  313. data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
  314. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
  315. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
  316. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
  317. data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
  318. data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
  319. data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
  320. data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
  321. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
  322. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
  323. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
  324. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
  325. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
  326. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
  327. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
  328. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
  329. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
  330. data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
  331. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
  332. data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
  333. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
  334. data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
  335. data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
  336. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
  337. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
  338. data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
  339. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
  340. data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
  341. data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
  342. data/ext/v8/upstream/3.1.8/src/property.h +337 -0
  343. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  344. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
  345. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
  346. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
  347. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
  348. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
  349. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
  350. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
  351. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
  352. data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
  353. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
  354. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
  355. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
  356. data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
  357. data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
  358. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
  359. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
  360. data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
  361. data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
  362. data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
  363. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
  364. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
  365. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
  366. data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
  367. data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
  368. data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
  369. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
  370. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
  371. data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
  372. data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
  373. data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
  374. data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
  375. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
  376. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
  377. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
  378. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
  379. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
  380. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
  381. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
  382. data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
  383. data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
  384. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
  385. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
  386. data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
  387. data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
  388. data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
  389. data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
  390. data/ext/v8/upstream/3.1.8/src/string.js +915 -0
  391. data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
  392. data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
  393. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
  394. data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
  395. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
  396. data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
  397. data/ext/v8/upstream/3.1.8/src/token.h +288 -0
  398. data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
  399. data/ext/v8/upstream/3.1.8/src/top.h +608 -0
  400. data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
  401. data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
  402. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
  403. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
  404. data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
  405. data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
  406. data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
  407. data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
  408. data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
  409. data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
  410. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
  411. data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
  412. data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
  413. data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
  414. data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
  415. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
  416. data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
  417. data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
  418. data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
  419. data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
  420. data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
  421. data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
  422. data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
  423. data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
  424. data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
  425. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
  426. data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
  427. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
  428. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
  429. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
  430. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
  431. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
  432. data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
  433. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
  434. data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
  435. data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
  436. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
  437. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
  438. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
  439. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
  440. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
  441. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
  442. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
  443. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
  444. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
  445. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
  446. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
  447. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
  448. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
  449. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
  450. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
  451. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
  452. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
  453. data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
  454. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
  455. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
  456. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  457. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
  458. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
  459. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
  460. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
  461. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
  462. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
  463. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
  464. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
  465. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
  466. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
  467. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
  468. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
  469. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
  470. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
  471. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
  472. data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
  473. data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
  474. data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
  475. data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
  476. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
  477. data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
  478. data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
  479. data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
  480. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
  481. data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
  482. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
  483. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
  484. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
  485. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
  486. data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
  487. data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
  488. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
  489. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
  490. data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
  491. data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
  492. data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
  493. data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
  494. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
  495. data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
  496. data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
  497. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
  498. data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
  499. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
  500. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
  501. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
  502. data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
  503. data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
  504. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
  505. data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
  506. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
  507. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
  508. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
  509. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
  510. data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
  511. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
  512. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
  513. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
  514. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
  515. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
  516. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
  517. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
  518. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
  519. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
  520. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
  521. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  522. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  523. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  524. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  525. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  526. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  527. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  528. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  529. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
  530. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
  531. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
  532. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  533. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  534. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  535. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  536. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
  537. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
  538. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
  539. data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
  540. data/ext/v8/upstream/Makefile +2 -1
  541. data/ext/v8/v8_template.cpp +2 -2
  542. data/lib/v8/version.rb +1 -1
  543. data/spec/redjs/jsapi_spec.rb +2 -2
  544. metadata +552 -490
  545. data/ext/v8/upstream/2.3.3/.gitignore +0 -26
  546. data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
  547. data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
  548. data/ext/v8/upstream/2.3.3/LICENSE +0 -55
  549. data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
  550. data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
  551. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
  552. data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
  553. data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
  554. data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
  555. data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
  556. data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
  557. data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
  558. data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
  559. data/ext/v8/upstream/2.3.3/src/api.h +0 -485
  560. data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
  561. data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
  562. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
  563. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
  564. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
  565. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
  566. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
  567. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
  568. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
  569. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
  570. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
  571. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
  572. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
  573. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
  574. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
  575. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
  576. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
  577. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
  578. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
  579. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
  580. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
  581. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
  582. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
  583. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
  584. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
  585. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
  586. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
  587. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
  588. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
  589. data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
  590. data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
  591. data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
  592. data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
  593. data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
  594. data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
  595. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
  596. data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
  597. data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
  598. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
  599. data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
  600. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
  601. data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
  602. data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
  603. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
  604. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
  605. data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
  606. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
  607. data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
  608. data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
  609. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
  610. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
  611. data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
  612. data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
  613. data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
  614. data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
  615. data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
  616. data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
  617. data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
  618. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
  619. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
  620. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
  621. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
  622. data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
  623. data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
  624. data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
  625. data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
  626. data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
  627. data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
  628. data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
  629. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
  630. data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
  631. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
  632. data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
  633. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
  634. data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
  635. data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
  636. data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
  637. data/ext/v8/upstream/2.3.3/src/double.h +0 -169
  638. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
  639. data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
  640. data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
  641. data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
  642. data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
  643. data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
  644. data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
  645. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
  646. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
  647. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
  648. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
  649. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
  650. data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
  651. data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
  652. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
  653. data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
  654. data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
  655. data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
  656. data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
  657. data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
  658. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
  659. data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
  660. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
  661. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
  662. data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
  663. data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
  664. data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
  665. data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
  666. data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
  667. data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
  668. data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
  669. data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
  670. data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
  671. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
  672. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
  673. data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
  674. data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
  675. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
  676. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
  677. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
  678. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
  679. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
  680. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
  681. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
  682. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
  683. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
  684. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
  685. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
  686. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
  687. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
  688. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
  689. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
  690. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
  691. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
  692. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
  693. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
  694. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
  695. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
  696. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
  697. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
  698. data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
  699. data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
  700. data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
  701. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
  702. data/ext/v8/upstream/2.3.3/src/json.js +0 -268
  703. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
  704. data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
  705. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
  706. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
  707. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
  708. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
  709. data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
  710. data/ext/v8/upstream/2.3.3/src/list.h +0 -159
  711. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
  712. data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
  713. data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
  714. data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
  715. data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
  716. data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
  717. data/ext/v8/upstream/2.3.3/src/log.h +0 -384
  718. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
  719. data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
  720. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
  721. data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
  722. data/ext/v8/upstream/2.3.3/src/math.js +0 -264
  723. data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
  724. data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
  725. data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
  726. data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
  727. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
  728. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
  729. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
  730. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
  731. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
  732. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
  733. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
  734. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
  735. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
  736. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
  737. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
  738. data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
  739. data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
  740. data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
  741. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
  742. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
  743. data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
  744. data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
  745. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
  746. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
  747. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
  748. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
  749. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
  750. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
  751. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
  752. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
  753. data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
  754. data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
  755. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
  756. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
  757. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
  758. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
  759. data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
  760. data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
  761. data/ext/v8/upstream/2.3.3/src/property.h +0 -315
  762. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
  763. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
  764. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
  765. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
  766. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
  767. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
  768. data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
  769. data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
  770. data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
  771. data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
  772. data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
  773. data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
  774. data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
  775. data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
  776. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
  777. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
  778. data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
  779. data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
  780. data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
  781. data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
  782. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
  783. data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
  784. data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
  785. data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
  786. data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
  787. data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
  788. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
  789. data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
  790. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
  791. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
  792. data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
  793. data/ext/v8/upstream/2.3.3/src/token.h +0 -270
  794. data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
  795. data/ext/v8/upstream/2.3.3/src/top.h +0 -463
  796. data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
  797. data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
  798. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
  799. data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
  800. data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
  801. data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
  802. data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
  803. data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
  804. data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
  805. data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
  806. data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
  807. data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
  808. data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
  809. data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
  810. data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
  811. data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
  812. data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
  813. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
  814. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
  815. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
  816. data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
  817. data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
  818. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
  819. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
  820. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
  821. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
  822. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
  823. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
  824. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
  825. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
  826. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
  827. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
  828. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
  829. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
  830. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
  831. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
  832. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
  833. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
  834. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
  835. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
  836. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
  837. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
  838. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
  839. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
  840. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
  841. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
  842. data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
  843. data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
  844. data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
  845. data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
  846. data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
  847. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
  848. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
  849. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
  850. data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
  851. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
  852. data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
  853. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
  854. data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
  855. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
  856. data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
  857. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
  858. data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
  859. data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
  860. data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
  861. data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
  862. data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
  863. data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
  864. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
  865. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
  866. data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
  867. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
  868. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
  869. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
  870. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
  871. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
  872. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
  873. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
  874. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
  875. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
  876. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
  877. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -0,0 +1,432 @@
1
+ // Copyright 2010 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef V8_FACTORY_H_
29
+ #define V8_FACTORY_H_
30
+
31
+ #include "globals.h"
32
+ #include "heap.h"
33
+
34
+ namespace v8 {
35
+ namespace internal {
36
+
37
+ // Interface for handle based allocation.
38
+
39
+ class Factory : public AllStatic {
40
+ public:
41
+ // Allocate a new fixed array with undefined entries.
42
+ static Handle<FixedArray> NewFixedArray(
43
+ int size,
44
+ PretenureFlag pretenure = NOT_TENURED);
45
+
46
+ // Allocate a new fixed array with non-existing entries (the hole).
47
+ static Handle<FixedArray> NewFixedArrayWithHoles(
48
+ int size,
49
+ PretenureFlag pretenure = NOT_TENURED);
50
+
51
+ static Handle<NumberDictionary> NewNumberDictionary(int at_least_space_for);
52
+
53
+ static Handle<StringDictionary> NewStringDictionary(int at_least_space_for);
54
+
55
+ static Handle<DescriptorArray> NewDescriptorArray(int number_of_descriptors);
56
+ static Handle<DeoptimizationInputData> NewDeoptimizationInputData(
57
+ int deopt_entry_count,
58
+ PretenureFlag pretenure);
59
+ static Handle<DeoptimizationOutputData> NewDeoptimizationOutputData(
60
+ int deopt_entry_count,
61
+ PretenureFlag pretenure);
62
+
63
+ static Handle<String> LookupSymbol(Vector<const char> str);
64
+ static Handle<String> LookupAsciiSymbol(Vector<const char> str);
65
+ static Handle<String> LookupTwoByteSymbol(Vector<const uc16> str);
66
+ static Handle<String> LookupAsciiSymbol(const char* str) {
67
+ return LookupSymbol(CStrVector(str));
68
+ }
69
+
70
+
71
+ // String creation functions. Most of the string creation functions take
72
+ // a Heap::PretenureFlag argument to optionally request that they be
73
+ // allocated in the old generation. The pretenure flag defaults to
74
+ // DONT_TENURE.
75
+ //
76
+ // Creates a new String object. There are two String encodings: ASCII and
77
+ // two byte. One should choose between the three string factory functions
78
+ // based on the encoding of the string buffer that the string is
79
+ // initialized from.
80
+ // - ...FromAscii initializes the string from a buffer that is ASCII
81
+ // encoded (it does not check that the buffer is ASCII encoded) and
82
+ // the result will be ASCII encoded.
83
+ // - ...FromUtf8 initializes the string from a buffer that is UTF-8
84
+ // encoded. If the characters are all single-byte characters, the
85
+ // result will be ASCII encoded, otherwise it will converted to two
86
+ // byte.
87
+ // - ...FromTwoByte initializes the string from a buffer that is two
88
+ // byte encoded. If the characters are all single-byte characters,
89
+ // the result will be converted to ASCII, otherwise it will be left as
90
+ // two byte.
91
+ //
92
+ // ASCII strings are pretenured when used as keys in the SourceCodeCache.
93
+ static Handle<String> NewStringFromAscii(
94
+ Vector<const char> str,
95
+ PretenureFlag pretenure = NOT_TENURED);
96
+
97
+ // UTF8 strings are pretenured when used for regexp literal patterns and
98
+ // flags in the parser.
99
+ static Handle<String> NewStringFromUtf8(
100
+ Vector<const char> str,
101
+ PretenureFlag pretenure = NOT_TENURED);
102
+
103
+ static Handle<String> NewStringFromTwoByte(
104
+ Vector<const uc16> str,
105
+ PretenureFlag pretenure = NOT_TENURED);
106
+
107
+ // Allocates and partially initializes an ASCII or TwoByte String. The
108
+ // characters of the string are uninitialized. Currently used in regexp code
109
+ // only, where they are pretenured.
110
+ static Handle<String> NewRawAsciiString(
111
+ int length,
112
+ PretenureFlag pretenure = NOT_TENURED);
113
+ static Handle<String> NewRawTwoByteString(
114
+ int length,
115
+ PretenureFlag pretenure = NOT_TENURED);
116
+
117
+ // Create a new cons string object which consists of a pair of strings.
118
+ static Handle<String> NewConsString(Handle<String> first,
119
+ Handle<String> second);
120
+
121
+ // Create a new string object which holds a substring of a string.
122
+ static Handle<String> NewSubString(Handle<String> str,
123
+ int begin,
124
+ int end);
125
+
126
+ // Creates a new external String object. There are two String encodings
127
+ // in the system: ASCII and two byte. Unlike other String types, it does
128
+ // not make sense to have a UTF-8 factory function for external strings,
129
+ // because we cannot change the underlying buffer.
130
+ static Handle<String> NewExternalStringFromAscii(
131
+ ExternalAsciiString::Resource* resource);
132
+ static Handle<String> NewExternalStringFromTwoByte(
133
+ ExternalTwoByteString::Resource* resource);
134
+
135
+ // Create a global (but otherwise uninitialized) context.
136
+ static Handle<Context> NewGlobalContext();
137
+
138
+ // Create a function context.
139
+ static Handle<Context> NewFunctionContext(int length,
140
+ Handle<JSFunction> closure);
141
+
142
+ // Create a 'with' context.
143
+ static Handle<Context> NewWithContext(Handle<Context> previous,
144
+ Handle<JSObject> extension,
145
+ bool is_catch_context);
146
+
147
+ // Return the Symbol matching the passed in string.
148
+ static Handle<String> SymbolFromString(Handle<String> value);
149
+
150
+ // Allocate a new struct. The struct is pretenured (allocated directly in
151
+ // the old generation).
152
+ static Handle<Struct> NewStruct(InstanceType type);
153
+
154
+ static Handle<AccessorInfo> NewAccessorInfo();
155
+
156
+ static Handle<Script> NewScript(Handle<String> source);
157
+
158
+ // Proxies are pretenured when allocated by the bootstrapper.
159
+ static Handle<Proxy> NewProxy(Address addr,
160
+ PretenureFlag pretenure = NOT_TENURED);
161
+
162
+ // Allocate a new proxy. The proxy is pretenured (allocated directly in
163
+ // the old generation).
164
+ static Handle<Proxy> NewProxy(const AccessorDescriptor* proxy);
165
+
166
+ static Handle<ByteArray> NewByteArray(int length,
167
+ PretenureFlag pretenure = NOT_TENURED);
168
+
169
+ static Handle<PixelArray> NewPixelArray(
170
+ int length,
171
+ uint8_t* external_pointer,
172
+ PretenureFlag pretenure = NOT_TENURED);
173
+
174
+ static Handle<ExternalArray> NewExternalArray(
175
+ int length,
176
+ ExternalArrayType array_type,
177
+ void* external_pointer,
178
+ PretenureFlag pretenure = NOT_TENURED);
179
+
180
+ static Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell(
181
+ Handle<Object> value);
182
+
183
+ static Handle<Map> NewMap(InstanceType type, int instance_size);
184
+
185
+ static Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function);
186
+
187
+ static Handle<Map> CopyMapDropDescriptors(Handle<Map> map);
188
+
189
+ // Copy the map adding more inobject properties if possible without
190
+ // overflowing the instance size.
191
+ static Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props);
192
+
193
+ static Handle<Map> CopyMapDropTransitions(Handle<Map> map);
194
+
195
+ static Handle<Map> GetFastElementsMap(Handle<Map> map);
196
+
197
+ static Handle<Map> GetSlowElementsMap(Handle<Map> map);
198
+
199
+ static Handle<Map> GetPixelArrayElementsMap(Handle<Map> map);
200
+
201
+ static Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array);
202
+
203
+ // Numbers (eg, literals) are pretenured by the parser.
204
+ static Handle<Object> NewNumber(double value,
205
+ PretenureFlag pretenure = NOT_TENURED);
206
+
207
+ static Handle<Object> NewNumberFromInt(int value);
208
+ static Handle<Object> NewNumberFromUint(uint32_t value);
209
+
210
+ // These objects are used by the api to create env-independent data
211
+ // structures in the heap.
212
+ static Handle<JSObject> NewNeanderObject();
213
+
214
+ static Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length);
215
+
216
+ // JS objects are pretenured when allocated by the bootstrapper and
217
+ // runtime.
218
+ static Handle<JSObject> NewJSObject(Handle<JSFunction> constructor,
219
+ PretenureFlag pretenure = NOT_TENURED);
220
+
221
+ // Global objects are pretenured.
222
+ static Handle<GlobalObject> NewGlobalObject(Handle<JSFunction> constructor);
223
+
224
+ // JS objects are pretenured when allocated by the bootstrapper and
225
+ // runtime.
226
+ static Handle<JSObject> NewJSObjectFromMap(Handle<Map> map);
227
+
228
+ // JS arrays are pretenured when allocated by the parser.
229
+ static Handle<JSArray> NewJSArray(int init_length,
230
+ PretenureFlag pretenure = NOT_TENURED);
231
+
232
+ static Handle<JSArray> NewJSArrayWithElements(
233
+ Handle<FixedArray> elements,
234
+ PretenureFlag pretenure = NOT_TENURED);
235
+
236
+ static Handle<JSFunction> NewFunction(Handle<String> name,
237
+ Handle<Object> prototype);
238
+
239
+ static Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name);
240
+
241
+ static Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global);
242
+
243
+ static Handle<JSFunction> BaseNewFunctionFromSharedFunctionInfo(
244
+ Handle<SharedFunctionInfo> function_info,
245
+ Handle<Map> function_map,
246
+ PretenureFlag pretenure);
247
+
248
+ static Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
249
+ Handle<SharedFunctionInfo> function_info,
250
+ Handle<Context> context,
251
+ PretenureFlag pretenure = TENURED);
252
+
253
+ static Handle<Code> NewCode(const CodeDesc& desc,
254
+ Code::Flags flags,
255
+ Handle<Object> self_reference);
256
+
257
+ static Handle<Code> CopyCode(Handle<Code> code);
258
+
259
+ static Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info);
260
+
261
+ static Handle<Object> ToObject(Handle<Object> object);
262
+ static Handle<Object> ToObject(Handle<Object> object,
263
+ Handle<Context> global_context);
264
+
265
+ // Interface for creating error objects.
266
+
267
+ static Handle<Object> NewError(const char* maker, const char* type,
268
+ Handle<JSArray> args);
269
+ static Handle<Object> NewError(const char* maker, const char* type,
270
+ Vector< Handle<Object> > args);
271
+ static Handle<Object> NewError(const char* type,
272
+ Vector< Handle<Object> > args);
273
+ static Handle<Object> NewError(Handle<String> message);
274
+ static Handle<Object> NewError(const char* constructor,
275
+ Handle<String> message);
276
+
277
+ static Handle<Object> NewTypeError(const char* type,
278
+ Vector< Handle<Object> > args);
279
+ static Handle<Object> NewTypeError(Handle<String> message);
280
+
281
+ static Handle<Object> NewRangeError(const char* type,
282
+ Vector< Handle<Object> > args);
283
+ static Handle<Object> NewRangeError(Handle<String> message);
284
+
285
+ static Handle<Object> NewSyntaxError(const char* type, Handle<JSArray> args);
286
+ static Handle<Object> NewSyntaxError(Handle<String> message);
287
+
288
+ static Handle<Object> NewReferenceError(const char* type,
289
+ Vector< Handle<Object> > args);
290
+ static Handle<Object> NewReferenceError(Handle<String> message);
291
+
292
+ static Handle<Object> NewEvalError(const char* type,
293
+ Vector< Handle<Object> > args);
294
+
295
+
296
+ static Handle<JSFunction> NewFunction(Handle<String> name,
297
+ InstanceType type,
298
+ int instance_size,
299
+ Handle<Code> code,
300
+ bool force_initial_map);
301
+
302
+ static Handle<JSFunction> NewFunction(Handle<Map> function_map,
303
+ Handle<SharedFunctionInfo> shared, Handle<Object> prototype);
304
+
305
+
306
+ static Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name,
307
+ InstanceType type,
308
+ int instance_size,
309
+ Handle<JSObject> prototype,
310
+ Handle<Code> code,
311
+ bool force_initial_map);
312
+
313
+ static Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name,
314
+ Handle<Code> code);
315
+
316
+ static Handle<DescriptorArray> CopyAppendProxyDescriptor(
317
+ Handle<DescriptorArray> array,
318
+ Handle<String> key,
319
+ Handle<Object> value,
320
+ PropertyAttributes attributes);
321
+
322
+ static Handle<String> NumberToString(Handle<Object> number);
323
+
324
+ enum ApiInstanceType {
325
+ JavaScriptObject,
326
+ InnerGlobalObject,
327
+ OuterGlobalObject
328
+ };
329
+
330
+ static Handle<JSFunction> CreateApiFunction(
331
+ Handle<FunctionTemplateInfo> data,
332
+ ApiInstanceType type = JavaScriptObject);
333
+
334
+ static Handle<JSFunction> InstallMembers(Handle<JSFunction> function);
335
+
336
+ // Installs interceptors on the instance. 'desc' is a function template,
337
+ // and instance is an object instance created by the function of this
338
+ // function template.
339
+ static void ConfigureInstance(Handle<FunctionTemplateInfo> desc,
340
+ Handle<JSObject> instance,
341
+ bool* pending_exception);
342
+
343
+ #define ROOT_ACCESSOR(type, name, camel_name) \
344
+ static inline Handle<type> name() { \
345
+ return Handle<type>(BitCast<type**>( \
346
+ &Heap::roots_[Heap::k##camel_name##RootIndex])); \
347
+ }
348
+ ROOT_LIST(ROOT_ACCESSOR)
349
+ #undef ROOT_ACCESSOR_ACCESSOR
350
+
351
+ #define SYMBOL_ACCESSOR(name, str) \
352
+ static inline Handle<String> name() { \
353
+ return Handle<String>(BitCast<String**>( \
354
+ &Heap::roots_[Heap::k##name##RootIndex])); \
355
+ }
356
+ SYMBOL_LIST(SYMBOL_ACCESSOR)
357
+ #undef SYMBOL_ACCESSOR
358
+
359
+ static Handle<String> hidden_symbol() {
360
+ return Handle<String>(&Heap::hidden_symbol_);
361
+ }
362
+
363
+ static Handle<SharedFunctionInfo> NewSharedFunctionInfo(
364
+ Handle<String> name,
365
+ int number_of_literals,
366
+ Handle<Code> code,
367
+ Handle<SerializedScopeInfo> scope_info);
368
+ static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name);
369
+
370
+ static Handle<JSMessageObject> NewJSMessageObject(
371
+ Handle<String> type,
372
+ Handle<JSArray> arguments,
373
+ int start_position,
374
+ int end_position,
375
+ Handle<Object> script,
376
+ Handle<Object> stack_trace,
377
+ Handle<Object> stack_frames);
378
+
379
+ static Handle<NumberDictionary> DictionaryAtNumberPut(
380
+ Handle<NumberDictionary>,
381
+ uint32_t key,
382
+ Handle<Object> value);
383
+
384
+ #ifdef ENABLE_DEBUGGER_SUPPORT
385
+ static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared);
386
+ #endif
387
+
388
+ // Return a map using the map cache in the global context.
389
+ // The key the an ordered set of property names.
390
+ static Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context,
391
+ Handle<FixedArray> keys);
392
+
393
+ // Creates a new FixedArray that holds the data associated with the
394
+ // atom regexp and stores it in the regexp.
395
+ static void SetRegExpAtomData(Handle<JSRegExp> regexp,
396
+ JSRegExp::Type type,
397
+ Handle<String> source,
398
+ JSRegExp::Flags flags,
399
+ Handle<Object> match_pattern);
400
+
401
+ // Creates a new FixedArray that holds the data associated with the
402
+ // irregexp regexp and stores it in the regexp.
403
+ static void SetRegExpIrregexpData(Handle<JSRegExp> regexp,
404
+ JSRegExp::Type type,
405
+ Handle<String> source,
406
+ JSRegExp::Flags flags,
407
+ int capture_count);
408
+
409
+ private:
410
+ static Handle<JSFunction> NewFunctionHelper(Handle<String> name,
411
+ Handle<Object> prototype);
412
+
413
+ static Handle<JSFunction> NewFunctionWithoutPrototypeHelper(
414
+ Handle<String> name);
415
+
416
+ static Handle<DescriptorArray> CopyAppendCallbackDescriptors(
417
+ Handle<DescriptorArray> array,
418
+ Handle<Object> descriptors);
419
+
420
+ // Create a new map cache.
421
+ static Handle<MapCache> NewMapCache(int at_least_space_for);
422
+
423
+ // Update the map cache in the global context with (keys, map)
424
+ static Handle<MapCache> AddToMapCache(Handle<Context> context,
425
+ Handle<FixedArray> keys,
426
+ Handle<Map> map);
427
+ };
428
+
429
+
430
+ } } // namespace v8::internal
431
+
432
+ #endif // V8_FACTORY_H_
@@ -0,0 +1,736 @@
1
+ // Copyright 2010 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #include "v8.h"
29
+
30
+ #include "fast-dtoa.h"
31
+
32
+ #include "cached-powers.h"
33
+ #include "diy-fp.h"
34
+ #include "double.h"
35
+
36
+ namespace v8 {
37
+ namespace internal {
38
+
39
+ // The minimal and maximal target exponent define the range of w's binary
40
+ // exponent, where 'w' is the result of multiplying the input by a cached power
41
+ // of ten.
42
+ //
43
+ // A different range might be chosen on a different platform, to optimize digit
44
+ // generation, but a smaller range requires more powers of ten to be cached.
45
+ static const int kMinimalTargetExponent = -60;
46
+ static const int kMaximalTargetExponent = -32;
47
+
48
+
49
+ // Adjusts the last digit of the generated number, and screens out generated
50
+ // solutions that may be inaccurate. A solution may be inaccurate if it is
51
+ // outside the safe interval, or if we ctannot prove that it is closer to the
52
+ // input than a neighboring representation of the same length.
53
+ //
54
+ // Input: * buffer containing the digits of too_high / 10^kappa
55
+ // * the buffer's length
56
+ // * distance_too_high_w == (too_high - w).f() * unit
57
+ // * unsafe_interval == (too_high - too_low).f() * unit
58
+ // * rest = (too_high - buffer * 10^kappa).f() * unit
59
+ // * ten_kappa = 10^kappa * unit
60
+ // * unit = the common multiplier
61
+ // Output: returns true if the buffer is guaranteed to contain the closest
62
+ // representable number to the input.
63
+ // Modifies the generated digits in the buffer to approach (round towards) w.
64
+ static bool RoundWeed(Vector<char> buffer,
65
+ int length,
66
+ uint64_t distance_too_high_w,
67
+ uint64_t unsafe_interval,
68
+ uint64_t rest,
69
+ uint64_t ten_kappa,
70
+ uint64_t unit) {
71
+ uint64_t small_distance = distance_too_high_w - unit;
72
+ uint64_t big_distance = distance_too_high_w + unit;
73
+ // Let w_low = too_high - big_distance, and
74
+ // w_high = too_high - small_distance.
75
+ // Note: w_low < w < w_high
76
+ //
77
+ // The real w (* unit) must lie somewhere inside the interval
78
+ // ]w_low; w_high[ (often written as "(w_low; w_high)")
79
+
80
+ // Basically the buffer currently contains a number in the unsafe interval
81
+ // ]too_low; too_high[ with too_low < w < too_high
82
+ //
83
+ // too_high - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
84
+ // ^v 1 unit ^ ^ ^ ^
85
+ // boundary_high --------------------- . . . .
86
+ // ^v 1 unit . . . .
87
+ // - - - - - - - - - - - - - - - - - - - + - - + - - - - - - . .
88
+ // . . ^ . .
89
+ // . big_distance . . .
90
+ // . . . . rest
91
+ // small_distance . . . .
92
+ // v . . . .
93
+ // w_high - - - - - - - - - - - - - - - - - - . . . .
94
+ // ^v 1 unit . . . .
95
+ // w ---------------------------------------- . . . .
96
+ // ^v 1 unit v . . .
97
+ // w_low - - - - - - - - - - - - - - - - - - - - - . . .
98
+ // . . v
99
+ // buffer --------------------------------------------------+-------+--------
100
+ // . .
101
+ // safe_interval .
102
+ // v .
103
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .
104
+ // ^v 1 unit .
105
+ // boundary_low ------------------------- unsafe_interval
106
+ // ^v 1 unit v
107
+ // too_low - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
108
+ //
109
+ //
110
+ // Note that the value of buffer could lie anywhere inside the range too_low
111
+ // to too_high.
112
+ //
113
+ // boundary_low, boundary_high and w are approximations of the real boundaries
114
+ // and v (the input number). They are guaranteed to be precise up to one unit.
115
+ // In fact the error is guaranteed to be strictly less than one unit.
116
+ //
117
+ // Anything that lies outside the unsafe interval is guaranteed not to round
118
+ // to v when read again.
119
+ // Anything that lies inside the safe interval is guaranteed to round to v
120
+ // when read again.
121
+ // If the number inside the buffer lies inside the unsafe interval but not
122
+ // inside the safe interval then we simply do not know and bail out (returning
123
+ // false).
124
+ //
125
+ // Similarly we have to take into account the imprecision of 'w' when finding
126
+ // the closest representation of 'w'. If we have two potential
127
+ // representations, and one is closer to both w_low and w_high, then we know
128
+ // it is closer to the actual value v.
129
+ //
130
+ // By generating the digits of too_high we got the largest (closest to
131
+ // too_high) buffer that is still in the unsafe interval. In the case where
132
+ // w_high < buffer < too_high we try to decrement the buffer.
133
+ // This way the buffer approaches (rounds towards) w.
134
+ // There are 3 conditions that stop the decrementation process:
135
+ // 1) the buffer is already below w_high
136
+ // 2) decrementing the buffer would make it leave the unsafe interval
137
+ // 3) decrementing the buffer would yield a number below w_high and farther
138
+ // away than the current number. In other words:
139
+ // (buffer{-1} < w_high) && w_high - buffer{-1} > buffer - w_high
140
+ // Instead of using the buffer directly we use its distance to too_high.
141
+ // Conceptually rest ~= too_high - buffer
142
+ // We need to do the following tests in this order to avoid over- and
143
+ // underflows.
144
+ ASSERT(rest <= unsafe_interval);
145
+ while (rest < small_distance && // Negated condition 1
146
+ unsafe_interval - rest >= ten_kappa && // Negated condition 2
147
+ (rest + ten_kappa < small_distance || // buffer{-1} > w_high
148
+ small_distance - rest >= rest + ten_kappa - small_distance)) {
149
+ buffer[length - 1]--;
150
+ rest += ten_kappa;
151
+ }
152
+
153
+ // We have approached w+ as much as possible. We now test if approaching w-
154
+ // would require changing the buffer. If yes, then we have two possible
155
+ // representations close to w, but we cannot decide which one is closer.
156
+ if (rest < big_distance &&
157
+ unsafe_interval - rest >= ten_kappa &&
158
+ (rest + ten_kappa < big_distance ||
159
+ big_distance - rest > rest + ten_kappa - big_distance)) {
160
+ return false;
161
+ }
162
+
163
+ // Weeding test.
164
+ // The safe interval is [too_low + 2 ulp; too_high - 2 ulp]
165
+ // Since too_low = too_high - unsafe_interval this is equivalent to
166
+ // [too_high - unsafe_interval + 4 ulp; too_high - 2 ulp]
167
+ // Conceptually we have: rest ~= too_high - buffer
168
+ return (2 * unit <= rest) && (rest <= unsafe_interval - 4 * unit);
169
+ }
170
+
171
+
172
+ // Rounds the buffer upwards if the result is closer to v by possibly adding
173
+ // 1 to the buffer. If the precision of the calculation is not sufficient to
174
+ // round correctly, return false.
175
+ // The rounding might shift the whole buffer in which case the kappa is
176
+ // adjusted. For example "99", kappa = 3 might become "10", kappa = 4.
177
+ //
178
+ // If 2*rest > ten_kappa then the buffer needs to be round up.
179
+ // rest can have an error of +/- 1 unit. This function accounts for the
180
+ // imprecision and returns false, if the rounding direction cannot be
181
+ // unambiguously determined.
182
+ //
183
+ // Precondition: rest < ten_kappa.
184
+ static bool RoundWeedCounted(Vector<char> buffer,
185
+ int length,
186
+ uint64_t rest,
187
+ uint64_t ten_kappa,
188
+ uint64_t unit,
189
+ int* kappa) {
190
+ ASSERT(rest < ten_kappa);
191
+ // The following tests are done in a specific order to avoid overflows. They
192
+ // will work correctly with any uint64 values of rest < ten_kappa and unit.
193
+ //
194
+ // If the unit is too big, then we don't know which way to round. For example
195
+ // a unit of 50 means that the real number lies within rest +/- 50. If
196
+ // 10^kappa == 40 then there is no way to tell which way to round.
197
+ if (unit >= ten_kappa) return false;
198
+ // Even if unit is just half the size of 10^kappa we are already completely
199
+ // lost. (And after the previous test we know that the expression will not
200
+ // over/underflow.)
201
+ if (ten_kappa - unit <= unit) return false;
202
+ // If 2 * (rest + unit) <= 10^kappa we can safely round down.
203
+ if ((ten_kappa - rest > rest) && (ten_kappa - 2 * rest >= 2 * unit)) {
204
+ return true;
205
+ }
206
+ // If 2 * (rest - unit) >= 10^kappa, then we can safely round up.
207
+ if ((rest > unit) && (ten_kappa - (rest - unit) <= (rest - unit))) {
208
+ // Increment the last digit recursively until we find a non '9' digit.
209
+ buffer[length - 1]++;
210
+ for (int i = length - 1; i > 0; --i) {
211
+ if (buffer[i] != '0' + 10) break;
212
+ buffer[i] = '0';
213
+ buffer[i - 1]++;
214
+ }
215
+ // If the first digit is now '0'+ 10 we had a buffer with all '9's. With the
216
+ // exception of the first digit all digits are now '0'. Simply switch the
217
+ // first digit to '1' and adjust the kappa. Example: "99" becomes "10" and
218
+ // the power (the kappa) is increased.
219
+ if (buffer[0] == '0' + 10) {
220
+ buffer[0] = '1';
221
+ (*kappa) += 1;
222
+ }
223
+ return true;
224
+ }
225
+ return false;
226
+ }
227
+
228
+
229
+ static const uint32_t kTen4 = 10000;
230
+ static const uint32_t kTen5 = 100000;
231
+ static const uint32_t kTen6 = 1000000;
232
+ static const uint32_t kTen7 = 10000000;
233
+ static const uint32_t kTen8 = 100000000;
234
+ static const uint32_t kTen9 = 1000000000;
235
+
236
+ // Returns the biggest power of ten that is less than or equal than the given
237
+ // number. We furthermore receive the maximum number of bits 'number' has.
238
+ // If number_bits == 0 then 0^-1 is returned
239
+ // The number of bits must be <= 32.
240
+ // Precondition: number < (1 << (number_bits + 1)).
241
+ static void BiggestPowerTen(uint32_t number,
242
+ int number_bits,
243
+ uint32_t* power,
244
+ int* exponent) {
245
+ switch (number_bits) {
246
+ case 32:
247
+ case 31:
248
+ case 30:
249
+ if (kTen9 <= number) {
250
+ *power = kTen9;
251
+ *exponent = 9;
252
+ break;
253
+ } // else fallthrough
254
+ case 29:
255
+ case 28:
256
+ case 27:
257
+ if (kTen8 <= number) {
258
+ *power = kTen8;
259
+ *exponent = 8;
260
+ break;
261
+ } // else fallthrough
262
+ case 26:
263
+ case 25:
264
+ case 24:
265
+ if (kTen7 <= number) {
266
+ *power = kTen7;
267
+ *exponent = 7;
268
+ break;
269
+ } // else fallthrough
270
+ case 23:
271
+ case 22:
272
+ case 21:
273
+ case 20:
274
+ if (kTen6 <= number) {
275
+ *power = kTen6;
276
+ *exponent = 6;
277
+ break;
278
+ } // else fallthrough
279
+ case 19:
280
+ case 18:
281
+ case 17:
282
+ if (kTen5 <= number) {
283
+ *power = kTen5;
284
+ *exponent = 5;
285
+ break;
286
+ } // else fallthrough
287
+ case 16:
288
+ case 15:
289
+ case 14:
290
+ if (kTen4 <= number) {
291
+ *power = kTen4;
292
+ *exponent = 4;
293
+ break;
294
+ } // else fallthrough
295
+ case 13:
296
+ case 12:
297
+ case 11:
298
+ case 10:
299
+ if (1000 <= number) {
300
+ *power = 1000;
301
+ *exponent = 3;
302
+ break;
303
+ } // else fallthrough
304
+ case 9:
305
+ case 8:
306
+ case 7:
307
+ if (100 <= number) {
308
+ *power = 100;
309
+ *exponent = 2;
310
+ break;
311
+ } // else fallthrough
312
+ case 6:
313
+ case 5:
314
+ case 4:
315
+ if (10 <= number) {
316
+ *power = 10;
317
+ *exponent = 1;
318
+ break;
319
+ } // else fallthrough
320
+ case 3:
321
+ case 2:
322
+ case 1:
323
+ if (1 <= number) {
324
+ *power = 1;
325
+ *exponent = 0;
326
+ break;
327
+ } // else fallthrough
328
+ case 0:
329
+ *power = 0;
330
+ *exponent = -1;
331
+ break;
332
+ default:
333
+ // Following assignments are here to silence compiler warnings.
334
+ *power = 0;
335
+ *exponent = 0;
336
+ UNREACHABLE();
337
+ }
338
+ }
339
+
340
+
341
+ // Generates the digits of input number w.
342
+ // w is a floating-point number (DiyFp), consisting of a significand and an
343
+ // exponent. Its exponent is bounded by kMinimalTargetExponent and
344
+ // kMaximalTargetExponent.
345
+ // Hence -60 <= w.e() <= -32.
346
+ //
347
+ // Returns false if it fails, in which case the generated digits in the buffer
348
+ // should not be used.
349
+ // Preconditions:
350
+ // * low, w and high are correct up to 1 ulp (unit in the last place). That
351
+ // is, their error must be less than a unit of their last digits.
352
+ // * low.e() == w.e() == high.e()
353
+ // * low < w < high, and taking into account their error: low~ <= high~
354
+ // * kMinimalTargetExponent <= w.e() <= kMaximalTargetExponent
355
+ // Postconditions: returns false if procedure fails.
356
+ // otherwise:
357
+ // * buffer is not null-terminated, but len contains the number of digits.
358
+ // * buffer contains the shortest possible decimal digit-sequence
359
+ // such that LOW < buffer * 10^kappa < HIGH, where LOW and HIGH are the
360
+ // correct values of low and high (without their error).
361
+ // * if more than one decimal representation gives the minimal number of
362
+ // decimal digits then the one closest to W (where W is the correct value
363
+ // of w) is chosen.
364
+ // Remark: this procedure takes into account the imprecision of its input
365
+ // numbers. If the precision is not enough to guarantee all the postconditions
366
+ // then false is returned. This usually happens rarely (~0.5%).
367
+ //
368
+ // Say, for the sake of example, that
369
+ // w.e() == -48, and w.f() == 0x1234567890abcdef
370
+ // w's value can be computed by w.f() * 2^w.e()
371
+ // We can obtain w's integral digits by simply shifting w.f() by -w.e().
372
+ // -> w's integral part is 0x1234
373
+ // w's fractional part is therefore 0x567890abcdef.
374
+ // Printing w's integral part is easy (simply print 0x1234 in decimal).
375
+ // In order to print its fraction we repeatedly multiply the fraction by 10 and
376
+ // get each digit. Example the first digit after the point would be computed by
377
+ // (0x567890abcdef * 10) >> 48. -> 3
378
+ // The whole thing becomes slightly more complicated because we want to stop
379
+ // once we have enough digits. That is, once the digits inside the buffer
380
+ // represent 'w' we can stop. Everything inside the interval low - high
381
+ // represents w. However we have to pay attention to low, high and w's
382
+ // imprecision.
383
+ static bool DigitGen(DiyFp low,
384
+ DiyFp w,
385
+ DiyFp high,
386
+ Vector<char> buffer,
387
+ int* length,
388
+ int* kappa) {
389
+ ASSERT(low.e() == w.e() && w.e() == high.e());
390
+ ASSERT(low.f() + 1 <= high.f() - 1);
391
+ ASSERT(kMinimalTargetExponent <= w.e() && w.e() <= kMaximalTargetExponent);
392
+ // low, w and high are imprecise, but by less than one ulp (unit in the last
393
+ // place).
394
+ // If we remove (resp. add) 1 ulp from low (resp. high) we are certain that
395
+ // the new numbers are outside of the interval we want the final
396
+ // representation to lie in.
397
+ // Inversely adding (resp. removing) 1 ulp from low (resp. high) would yield
398
+ // numbers that are certain to lie in the interval. We will use this fact
399
+ // later on.
400
+ // We will now start by generating the digits within the uncertain
401
+ // interval. Later we will weed out representations that lie outside the safe
402
+ // interval and thus _might_ lie outside the correct interval.
403
+ uint64_t unit = 1;
404
+ DiyFp too_low = DiyFp(low.f() - unit, low.e());
405
+ DiyFp too_high = DiyFp(high.f() + unit, high.e());
406
+ // too_low and too_high are guaranteed to lie outside the interval we want the
407
+ // generated number in.
408
+ DiyFp unsafe_interval = DiyFp::Minus(too_high, too_low);
409
+ // We now cut the input number into two parts: the integral digits and the
410
+ // fractionals. We will not write any decimal separator though, but adapt
411
+ // kappa instead.
412
+ // Reminder: we are currently computing the digits (stored inside the buffer)
413
+ // such that: too_low < buffer * 10^kappa < too_high
414
+ // We use too_high for the digit_generation and stop as soon as possible.
415
+ // If we stop early we effectively round down.
416
+ DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e());
417
+ // Division by one is a shift.
418
+ uint32_t integrals = static_cast<uint32_t>(too_high.f() >> -one.e());
419
+ // Modulo by one is an and.
420
+ uint64_t fractionals = too_high.f() & (one.f() - 1);
421
+ uint32_t divisor;
422
+ int divisor_exponent;
423
+ BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()),
424
+ &divisor, &divisor_exponent);
425
+ *kappa = divisor_exponent + 1;
426
+ *length = 0;
427
+ // Loop invariant: buffer = too_high / 10^kappa (integer division)
428
+ // The invariant holds for the first iteration: kappa has been initialized
429
+ // with the divisor exponent + 1. And the divisor is the biggest power of ten
430
+ // that is smaller than integrals.
431
+ while (*kappa > 0) {
432
+ int digit = integrals / divisor;
433
+ buffer[*length] = '0' + digit;
434
+ (*length)++;
435
+ integrals %= divisor;
436
+ (*kappa)--;
437
+ // Note that kappa now equals the exponent of the divisor and that the
438
+ // invariant thus holds again.
439
+ uint64_t rest =
440
+ (static_cast<uint64_t>(integrals) << -one.e()) + fractionals;
441
+ // Invariant: too_high = buffer * 10^kappa + DiyFp(rest, one.e())
442
+ // Reminder: unsafe_interval.e() == one.e()
443
+ if (rest < unsafe_interval.f()) {
444
+ // Rounding down (by not emitting the remaining digits) yields a number
445
+ // that lies within the unsafe interval.
446
+ return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f(),
447
+ unsafe_interval.f(), rest,
448
+ static_cast<uint64_t>(divisor) << -one.e(), unit);
449
+ }
450
+ divisor /= 10;
451
+ }
452
+
453
+ // The integrals have been generated. We are at the point of the decimal
454
+ // separator. In the following loop we simply multiply the remaining digits by
455
+ // 10 and divide by one. We just need to pay attention to multiply associated
456
+ // data (like the interval or 'unit'), too.
457
+ // Note that the multiplication by 10 does not overflow, because w.e >= -60
458
+ // and thus one.e >= -60.
459
+ ASSERT(one.e() >= -60);
460
+ ASSERT(fractionals < one.f());
461
+ ASSERT(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f());
462
+ while (true) {
463
+ fractionals *= 10;
464
+ unit *= 10;
465
+ unsafe_interval.set_f(unsafe_interval.f() * 10);
466
+ // Integer division by one.
467
+ int digit = static_cast<int>(fractionals >> -one.e());
468
+ buffer[*length] = '0' + digit;
469
+ (*length)++;
470
+ fractionals &= one.f() - 1; // Modulo by one.
471
+ (*kappa)--;
472
+ if (fractionals < unsafe_interval.f()) {
473
+ return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit,
474
+ unsafe_interval.f(), fractionals, one.f(), unit);
475
+ }
476
+ }
477
+ }
478
+
479
+
480
+
481
+ // Generates (at most) requested_digits of input number w.
482
+ // w is a floating-point number (DiyFp), consisting of a significand and an
483
+ // exponent. Its exponent is bounded by kMinimalTargetExponent and
484
+ // kMaximalTargetExponent.
485
+ // Hence -60 <= w.e() <= -32.
486
+ //
487
+ // Returns false if it fails, in which case the generated digits in the buffer
488
+ // should not be used.
489
+ // Preconditions:
490
+ // * w is correct up to 1 ulp (unit in the last place). That
491
+ // is, its error must be strictly less than a unit of its last digit.
492
+ // * kMinimalTargetExponent <= w.e() <= kMaximalTargetExponent
493
+ //
494
+ // Postconditions: returns false if procedure fails.
495
+ // otherwise:
496
+ // * buffer is not null-terminated, but length contains the number of
497
+ // digits.
498
+ // * the representation in buffer is the most precise representation of
499
+ // requested_digits digits.
500
+ // * buffer contains at most requested_digits digits of w. If there are less
501
+ // than requested_digits digits then some trailing '0's have been removed.
502
+ // * kappa is such that
503
+ // w = buffer * 10^kappa + eps with |eps| < 10^kappa / 2.
504
+ //
505
+ // Remark: This procedure takes into account the imprecision of its input
506
+ // numbers. If the precision is not enough to guarantee all the postconditions
507
+ // then false is returned. This usually happens rarely, but the failure-rate
508
+ // increases with higher requested_digits.
509
+ static bool DigitGenCounted(DiyFp w,
510
+ int requested_digits,
511
+ Vector<char> buffer,
512
+ int* length,
513
+ int* kappa) {
514
+ ASSERT(kMinimalTargetExponent <= w.e() && w.e() <= kMaximalTargetExponent);
515
+ ASSERT(kMinimalTargetExponent >= -60);
516
+ ASSERT(kMaximalTargetExponent <= -32);
517
+ // w is assumed to have an error less than 1 unit. Whenever w is scaled we
518
+ // also scale its error.
519
+ uint64_t w_error = 1;
520
+ // We cut the input number into two parts: the integral digits and the
521
+ // fractional digits. We don't emit any decimal separator, but adapt kappa
522
+ // instead. Example: instead of writing "1.2" we put "12" into the buffer and
523
+ // increase kappa by 1.
524
+ DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e());
525
+ // Division by one is a shift.
526
+ uint32_t integrals = static_cast<uint32_t>(w.f() >> -one.e());
527
+ // Modulo by one is an and.
528
+ uint64_t fractionals = w.f() & (one.f() - 1);
529
+ uint32_t divisor;
530
+ int divisor_exponent;
531
+ BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()),
532
+ &divisor, &divisor_exponent);
533
+ *kappa = divisor_exponent + 1;
534
+ *length = 0;
535
+
536
+ // Loop invariant: buffer = w / 10^kappa (integer division)
537
+ // The invariant holds for the first iteration: kappa has been initialized
538
+ // with the divisor exponent + 1. And the divisor is the biggest power of ten
539
+ // that is smaller than 'integrals'.
540
+ while (*kappa > 0) {
541
+ int digit = integrals / divisor;
542
+ buffer[*length] = '0' + digit;
543
+ (*length)++;
544
+ requested_digits--;
545
+ integrals %= divisor;
546
+ (*kappa)--;
547
+ // Note that kappa now equals the exponent of the divisor and that the
548
+ // invariant thus holds again.
549
+ if (requested_digits == 0) break;
550
+ divisor /= 10;
551
+ }
552
+
553
+ if (requested_digits == 0) {
554
+ uint64_t rest =
555
+ (static_cast<uint64_t>(integrals) << -one.e()) + fractionals;
556
+ return RoundWeedCounted(buffer, *length, rest,
557
+ static_cast<uint64_t>(divisor) << -one.e(), w_error,
558
+ kappa);
559
+ }
560
+
561
+ // The integrals have been generated. We are at the point of the decimal
562
+ // separator. In the following loop we simply multiply the remaining digits by
563
+ // 10 and divide by one. We just need to pay attention to multiply associated
564
+ // data (the 'unit'), too.
565
+ // Note that the multiplication by 10 does not overflow, because w.e >= -60
566
+ // and thus one.e >= -60.
567
+ ASSERT(one.e() >= -60);
568
+ ASSERT(fractionals < one.f());
569
+ ASSERT(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f());
570
+ while (requested_digits > 0 && fractionals > w_error) {
571
+ fractionals *= 10;
572
+ w_error *= 10;
573
+ // Integer division by one.
574
+ int digit = static_cast<int>(fractionals >> -one.e());
575
+ buffer[*length] = '0' + digit;
576
+ (*length)++;
577
+ requested_digits--;
578
+ fractionals &= one.f() - 1; // Modulo by one.
579
+ (*kappa)--;
580
+ }
581
+ if (requested_digits != 0) return false;
582
+ return RoundWeedCounted(buffer, *length, fractionals, one.f(), w_error,
583
+ kappa);
584
+ }
585
+
586
+
587
+ // Provides a decimal representation of v.
588
+ // Returns true if it succeeds, otherwise the result cannot be trusted.
589
+ // There will be *length digits inside the buffer (not null-terminated).
590
+ // If the function returns true then
591
+ // v == (double) (buffer * 10^decimal_exponent).
592
+ // The digits in the buffer are the shortest representation possible: no
593
+ // 0.09999999999999999 instead of 0.1. The shorter representation will even be
594
+ // chosen even if the longer one would be closer to v.
595
+ // The last digit will be closest to the actual v. That is, even if several
596
+ // digits might correctly yield 'v' when read again, the closest will be
597
+ // computed.
598
+ static bool Grisu3(double v,
599
+ Vector<char> buffer,
600
+ int* length,
601
+ int* decimal_exponent) {
602
+ DiyFp w = Double(v).AsNormalizedDiyFp();
603
+ // boundary_minus and boundary_plus are the boundaries between v and its
604
+ // closest floating-point neighbors. Any number strictly between
605
+ // boundary_minus and boundary_plus will round to v when convert to a double.
606
+ // Grisu3 will never output representations that lie exactly on a boundary.
607
+ DiyFp boundary_minus, boundary_plus;
608
+ Double(v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
609
+ ASSERT(boundary_plus.e() == w.e());
610
+ DiyFp ten_mk; // Cached power of ten: 10^-k
611
+ int mk; // -k
612
+ int ten_mk_minimal_binary_exponent =
613
+ kMinimalTargetExponent - (w.e() + DiyFp::kSignificandSize);
614
+ int ten_mk_maximal_binary_exponent =
615
+ kMaximalTargetExponent - (w.e() + DiyFp::kSignificandSize);
616
+ PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
617
+ ten_mk_minimal_binary_exponent,
618
+ ten_mk_maximal_binary_exponent,
619
+ &ten_mk, &mk);
620
+ ASSERT((kMinimalTargetExponent <= w.e() + ten_mk.e() +
621
+ DiyFp::kSignificandSize) &&
622
+ (kMaximalTargetExponent >= w.e() + ten_mk.e() +
623
+ DiyFp::kSignificandSize));
624
+ // Note that ten_mk is only an approximation of 10^-k. A DiyFp only contains a
625
+ // 64 bit significand and ten_mk is thus only precise up to 64 bits.
626
+
627
+ // The DiyFp::Times procedure rounds its result, and ten_mk is approximated
628
+ // too. The variable scaled_w (as well as scaled_boundary_minus/plus) are now
629
+ // off by a small amount.
630
+ // In fact: scaled_w - w*10^k < 1ulp (unit in the last place) of scaled_w.
631
+ // In other words: let f = scaled_w.f() and e = scaled_w.e(), then
632
+ // (f-1) * 2^e < w*10^k < (f+1) * 2^e
633
+ DiyFp scaled_w = DiyFp::Times(w, ten_mk);
634
+ ASSERT(scaled_w.e() ==
635
+ boundary_plus.e() + ten_mk.e() + DiyFp::kSignificandSize);
636
+ // In theory it would be possible to avoid some recomputations by computing
637
+ // the difference between w and boundary_minus/plus (a power of 2) and to
638
+ // compute scaled_boundary_minus/plus by subtracting/adding from
639
+ // scaled_w. However the code becomes much less readable and the speed
640
+ // enhancements are not terriffic.
641
+ DiyFp scaled_boundary_minus = DiyFp::Times(boundary_minus, ten_mk);
642
+ DiyFp scaled_boundary_plus = DiyFp::Times(boundary_plus, ten_mk);
643
+
644
+ // DigitGen will generate the digits of scaled_w. Therefore we have
645
+ // v == (double) (scaled_w * 10^-mk).
646
+ // Set decimal_exponent == -mk and pass it to DigitGen. If scaled_w is not an
647
+ // integer than it will be updated. For instance if scaled_w == 1.23 then
648
+ // the buffer will be filled with "123" und the decimal_exponent will be
649
+ // decreased by 2.
650
+ int kappa;
651
+ bool result = DigitGen(scaled_boundary_minus, scaled_w, scaled_boundary_plus,
652
+ buffer, length, &kappa);
653
+ *decimal_exponent = -mk + kappa;
654
+ return result;
655
+ }
656
+
657
+
658
+ // The "counted" version of grisu3 (see above) only generates requested_digits
659
+ // number of digits. This version does not generate the shortest representation,
660
+ // and with enough requested digits 0.1 will at some point print as 0.9999999...
661
+ // Grisu3 is too imprecise for real halfway cases (1.5 will not work) and
662
+ // therefore the rounding strategy for halfway cases is irrelevant.
663
+ static bool Grisu3Counted(double v,
664
+ int requested_digits,
665
+ Vector<char> buffer,
666
+ int* length,
667
+ int* decimal_exponent) {
668
+ DiyFp w = Double(v).AsNormalizedDiyFp();
669
+ DiyFp ten_mk; // Cached power of ten: 10^-k
670
+ int mk; // -k
671
+ int ten_mk_minimal_binary_exponent =
672
+ kMinimalTargetExponent - (w.e() + DiyFp::kSignificandSize);
673
+ int ten_mk_maximal_binary_exponent =
674
+ kMaximalTargetExponent - (w.e() + DiyFp::kSignificandSize);
675
+ PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
676
+ ten_mk_minimal_binary_exponent,
677
+ ten_mk_maximal_binary_exponent,
678
+ &ten_mk, &mk);
679
+ ASSERT((kMinimalTargetExponent <= w.e() + ten_mk.e() +
680
+ DiyFp::kSignificandSize) &&
681
+ (kMaximalTargetExponent >= w.e() + ten_mk.e() +
682
+ DiyFp::kSignificandSize));
683
+ // Note that ten_mk is only an approximation of 10^-k. A DiyFp only contains a
684
+ // 64 bit significand and ten_mk is thus only precise up to 64 bits.
685
+
686
+ // The DiyFp::Times procedure rounds its result, and ten_mk is approximated
687
+ // too. The variable scaled_w (as well as scaled_boundary_minus/plus) are now
688
+ // off by a small amount.
689
+ // In fact: scaled_w - w*10^k < 1ulp (unit in the last place) of scaled_w.
690
+ // In other words: let f = scaled_w.f() and e = scaled_w.e(), then
691
+ // (f-1) * 2^e < w*10^k < (f+1) * 2^e
692
+ DiyFp scaled_w = DiyFp::Times(w, ten_mk);
693
+
694
+ // We now have (double) (scaled_w * 10^-mk).
695
+ // DigitGen will generate the first requested_digits digits of scaled_w and
696
+ // return together with a kappa such that scaled_w ~= buffer * 10^kappa. (It
697
+ // will not always be exactly the same since DigitGenCounted only produces a
698
+ // limited number of digits.)
699
+ int kappa;
700
+ bool result = DigitGenCounted(scaled_w, requested_digits,
701
+ buffer, length, &kappa);
702
+ *decimal_exponent = -mk + kappa;
703
+ return result;
704
+ }
705
+
706
+
707
+ bool FastDtoa(double v,
708
+ FastDtoaMode mode,
709
+ int requested_digits,
710
+ Vector<char> buffer,
711
+ int* length,
712
+ int* decimal_point) {
713
+ ASSERT(v > 0);
714
+ ASSERT(!Double(v).IsSpecial());
715
+
716
+ bool result = false;
717
+ int decimal_exponent = 0;
718
+ switch (mode) {
719
+ case FAST_DTOA_SHORTEST:
720
+ result = Grisu3(v, buffer, length, &decimal_exponent);
721
+ break;
722
+ case FAST_DTOA_PRECISION:
723
+ result = Grisu3Counted(v, requested_digits,
724
+ buffer, length, &decimal_exponent);
725
+ break;
726
+ default:
727
+ UNREACHABLE();
728
+ }
729
+ if (result) {
730
+ *decimal_point = *length + decimal_exponent;
731
+ buffer[*length] = '\0';
732
+ }
733
+ return result;
734
+ }
735
+
736
+ } } // namespace v8::internal