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,376 @@
1
+ // Copyright 2006-2008 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_CONTEXTS_H_
29
+ #define V8_CONTEXTS_H_
30
+
31
+ #include "heap.h"
32
+ #include "objects.h"
33
+
34
+ namespace v8 {
35
+ namespace internal {
36
+
37
+
38
+ enum ContextLookupFlags {
39
+ FOLLOW_CONTEXT_CHAIN = 1,
40
+ FOLLOW_PROTOTYPE_CHAIN = 2,
41
+
42
+ DONT_FOLLOW_CHAINS = 0,
43
+ FOLLOW_CHAINS = FOLLOW_CONTEXT_CHAIN | FOLLOW_PROTOTYPE_CHAIN
44
+ };
45
+
46
+
47
+ // Heap-allocated activation contexts.
48
+ //
49
+ // Contexts are implemented as FixedArray objects; the Context
50
+ // class is a convenience interface casted on a FixedArray object.
51
+ //
52
+ // Note: Context must have no virtual functions and Context objects
53
+ // must always be allocated via Heap::AllocateContext() or
54
+ // Factory::NewContext.
55
+
56
+ #define GLOBAL_CONTEXT_FIELDS(V) \
57
+ V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \
58
+ V(SECURITY_TOKEN_INDEX, Object, security_token) \
59
+ V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \
60
+ V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \
61
+ V(STRING_FUNCTION_INDEX, JSFunction, string_function) \
62
+ V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \
63
+ V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \
64
+ V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \
65
+ V(DATE_FUNCTION_INDEX, JSFunction, date_function) \
66
+ V(JSON_OBJECT_INDEX, JSObject, json_object) \
67
+ V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
68
+ V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
69
+ V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \
70
+ V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \
71
+ V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \
72
+ V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \
73
+ V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \
74
+ V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \
75
+ V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \
76
+ V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \
77
+ V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \
78
+ V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \
79
+ V(CONFIGURE_INSTANCE_FUN_INDEX, JSFunction, configure_instance_fun) \
80
+ V(FUNCTION_MAP_INDEX, Map, function_map) \
81
+ V(FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, function_without_prototype_map) \
82
+ V(FUNCTION_INSTANCE_MAP_INDEX, Map, function_instance_map) \
83
+ V(JS_ARRAY_MAP_INDEX, Map, js_array_map)\
84
+ V(REGEXP_RESULT_MAP_INDEX, Map, regexp_result_map)\
85
+ V(ARGUMENTS_BOILERPLATE_INDEX, JSObject, arguments_boilerplate) \
86
+ V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \
87
+ V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \
88
+ V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \
89
+ V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \
90
+ V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \
91
+ V(JSFUNCTION_RESULT_CACHES_INDEX, FixedArray, jsfunction_result_caches) \
92
+ V(NORMALIZED_MAP_CACHE_INDEX, NormalizedMapCache, normalized_map_cache) \
93
+ V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \
94
+ V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
95
+ V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
96
+ call_as_constructor_delegate) \
97
+ V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
98
+ V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
99
+ V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
100
+ V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \
101
+ V(MAP_CACHE_INDEX, Object, map_cache) \
102
+ V(CONTEXT_DATA_INDEX, Object, data)
103
+
104
+ // JSFunctions are pairs (context, function code), sometimes also called
105
+ // closures. A Context object is used to represent function contexts and
106
+ // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
107
+ //
108
+ // At runtime, the contexts build a stack in parallel to the execution
109
+ // stack, with the top-most context being the current context. All contexts
110
+ // have the following slots:
111
+ //
112
+ // [ closure ] This is the current function. It is the same for all
113
+ // contexts inside a function. It provides access to the
114
+ // incoming context (i.e., the outer context, which may
115
+ // or may not become the current function's context), and
116
+ // it provides access to the functions code and thus it's
117
+ // scope information, which in turn contains the names of
118
+ // statically allocated context slots. The names are needed
119
+ // for dynamic lookups in the presence of 'with' or 'eval'.
120
+ //
121
+ // [ fcontext ] A pointer to the innermost enclosing function context.
122
+ // It is the same for all contexts *allocated* inside a
123
+ // function, and the function context's fcontext points
124
+ // to itself. It is only needed for fast access of the
125
+ // function context (used for declarations, and static
126
+ // context slot access).
127
+ //
128
+ // [ previous ] A pointer to the previous context. It is NULL for
129
+ // function contexts, and non-NULL for 'with' contexts.
130
+ // Used to implement the 'with' statement.
131
+ //
132
+ // [ extension ] A pointer to an extension JSObject, or NULL. Used to
133
+ // implement 'with' statements and dynamic declarations
134
+ // (through 'eval'). The object in a 'with' statement is
135
+ // stored in the extension slot of a 'with' context.
136
+ // Dynamically declared variables/functions are also added
137
+ // to lazily allocated extension object. Context::Lookup
138
+ // searches the extension object for properties.
139
+ //
140
+ // [ global ] A pointer to the global object. Provided for quick
141
+ // access to the global object from inside the code (since
142
+ // we always have a context pointer).
143
+ //
144
+ // In addition, function contexts may have statically allocated context slots
145
+ // to store local variables/functions that are accessed from inner functions
146
+ // (via static context addresses) or through 'eval' (dynamic context lookups).
147
+ // Finally, the global context contains additional slots for fast access to
148
+ // global properties.
149
+ //
150
+ // We may be able to simplify the implementation:
151
+ //
152
+ // - We may be able to get rid of 'fcontext': We can always use the fact that
153
+ // previous == NULL for function contexts and so we can search for them. They
154
+ // are only needed when doing dynamic declarations, and the context chains
155
+ // tend to be very very short (depth of nesting of 'with' statements). At
156
+ // the moment we also use it in generated code for context slot accesses -
157
+ // and there we don't want a loop because of code bloat - but we may not
158
+ // need it there after all (see comment in codegen_*.cc).
159
+ //
160
+ // - If we cannot get rid of fcontext, consider making 'previous' never NULL
161
+ // except for the global context. This could simplify Context::Lookup.
162
+
163
+ class Context: public FixedArray {
164
+ public:
165
+ // Conversions.
166
+ static Context* cast(Object* context) {
167
+ ASSERT(context->IsContext());
168
+ return reinterpret_cast<Context*>(context);
169
+ }
170
+
171
+ // The default context slot layout; indices are FixedArray slot indices.
172
+ enum {
173
+ // These slots are in all contexts.
174
+ CLOSURE_INDEX,
175
+ FCONTEXT_INDEX,
176
+ PREVIOUS_INDEX,
177
+ EXTENSION_INDEX,
178
+ GLOBAL_INDEX,
179
+ MIN_CONTEXT_SLOTS,
180
+
181
+ // These slots are only in global contexts.
182
+ GLOBAL_PROXY_INDEX = MIN_CONTEXT_SLOTS,
183
+ SECURITY_TOKEN_INDEX,
184
+ ARGUMENTS_BOILERPLATE_INDEX,
185
+ JS_ARRAY_MAP_INDEX,
186
+ REGEXP_RESULT_MAP_INDEX,
187
+ FUNCTION_MAP_INDEX,
188
+ FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
189
+ FUNCTION_INSTANCE_MAP_INDEX,
190
+ INITIAL_OBJECT_PROTOTYPE_INDEX,
191
+ BOOLEAN_FUNCTION_INDEX,
192
+ NUMBER_FUNCTION_INDEX,
193
+ STRING_FUNCTION_INDEX,
194
+ STRING_FUNCTION_PROTOTYPE_MAP_INDEX,
195
+ OBJECT_FUNCTION_INDEX,
196
+ ARRAY_FUNCTION_INDEX,
197
+ DATE_FUNCTION_INDEX,
198
+ JSON_OBJECT_INDEX,
199
+ REGEXP_FUNCTION_INDEX,
200
+ CREATE_DATE_FUN_INDEX,
201
+ TO_NUMBER_FUN_INDEX,
202
+ TO_STRING_FUN_INDEX,
203
+ TO_DETAIL_STRING_FUN_INDEX,
204
+ TO_OBJECT_FUN_INDEX,
205
+ TO_INTEGER_FUN_INDEX,
206
+ TO_UINT32_FUN_INDEX,
207
+ TO_INT32_FUN_INDEX,
208
+ TO_BOOLEAN_FUN_INDEX,
209
+ GLOBAL_EVAL_FUN_INDEX,
210
+ INSTANTIATE_FUN_INDEX,
211
+ CONFIGURE_INSTANCE_FUN_INDEX,
212
+ MESSAGE_LISTENERS_INDEX,
213
+ MAKE_MESSAGE_FUN_INDEX,
214
+ GET_STACK_TRACE_LINE_INDEX,
215
+ CONFIGURE_GLOBAL_INDEX,
216
+ FUNCTION_CACHE_INDEX,
217
+ JSFUNCTION_RESULT_CACHES_INDEX,
218
+ NORMALIZED_MAP_CACHE_INDEX,
219
+ RUNTIME_CONTEXT_INDEX,
220
+ CALL_AS_FUNCTION_DELEGATE_INDEX,
221
+ CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
222
+ SCRIPT_FUNCTION_INDEX,
223
+ OPAQUE_REFERENCE_FUNCTION_INDEX,
224
+ CONTEXT_EXTENSION_FUNCTION_INDEX,
225
+ OUT_OF_MEMORY_INDEX,
226
+ MAP_CACHE_INDEX,
227
+ CONTEXT_DATA_INDEX,
228
+
229
+ // Properties from here are treated as weak references by the full GC.
230
+ // Scavenge treats them as strong references.
231
+ OPTIMIZED_FUNCTIONS_LIST, // Weak.
232
+ NEXT_CONTEXT_LINK, // Weak.
233
+
234
+ // Total number of slots.
235
+ GLOBAL_CONTEXT_SLOTS,
236
+
237
+ FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST
238
+ };
239
+
240
+ // Direct slot access.
241
+ JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); }
242
+ void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); }
243
+
244
+ Context* fcontext() { return Context::cast(get(FCONTEXT_INDEX)); }
245
+ void set_fcontext(Context* context) { set(FCONTEXT_INDEX, context); }
246
+
247
+ Context* previous() {
248
+ Object* result = unchecked_previous();
249
+ ASSERT(IsBootstrappingOrContext(result));
250
+ return reinterpret_cast<Context*>(result);
251
+ }
252
+ void set_previous(Context* context) { set(PREVIOUS_INDEX, context); }
253
+
254
+ bool has_extension() { return unchecked_extension() != NULL; }
255
+ JSObject* extension() { return JSObject::cast(unchecked_extension()); }
256
+ void set_extension(JSObject* object) { set(EXTENSION_INDEX, object); }
257
+
258
+ GlobalObject* global() {
259
+ Object* result = get(GLOBAL_INDEX);
260
+ ASSERT(Heap::gc_state() != Heap::NOT_IN_GC ||
261
+ IsBootstrappingOrGlobalObject(result));
262
+ return reinterpret_cast<GlobalObject*>(result);
263
+ }
264
+ void set_global(GlobalObject* global) { set(GLOBAL_INDEX, global); }
265
+
266
+ // Returns a JSGlobalProxy object or null.
267
+ JSObject* global_proxy();
268
+ void set_global_proxy(JSObject* global);
269
+
270
+ // The builtins object.
271
+ JSBuiltinsObject* builtins();
272
+
273
+ // Compute the global context by traversing the context chain.
274
+ Context* global_context();
275
+
276
+ // Tells if this is a function context (as opposed to a 'with' context).
277
+ bool is_function_context() { return unchecked_previous() == NULL; }
278
+
279
+ // Tells whether the global context is marked with out of memory.
280
+ bool has_out_of_memory() {
281
+ return global_context()->out_of_memory() == Heap::true_value();
282
+ }
283
+
284
+ // Mark the global context with out of memory.
285
+ void mark_out_of_memory() {
286
+ global_context()->set_out_of_memory(Heap::true_value());
287
+ }
288
+
289
+ // The exception holder is the object used as a with object in
290
+ // the implementation of a catch block.
291
+ bool is_exception_holder(Object* object) {
292
+ return IsCatchContext() && extension() == object;
293
+ }
294
+
295
+ // A global context hold a list of all functions which have been optimized.
296
+ void AddOptimizedFunction(JSFunction* function);
297
+ void RemoveOptimizedFunction(JSFunction* function);
298
+ Object* OptimizedFunctionsListHead();
299
+ void ClearOptimizedFunctions();
300
+
301
+ #define GLOBAL_CONTEXT_FIELD_ACCESSORS(index, type, name) \
302
+ void set_##name(type* value) { \
303
+ ASSERT(IsGlobalContext()); \
304
+ set(index, value); \
305
+ } \
306
+ type* name() { \
307
+ ASSERT(IsGlobalContext()); \
308
+ return type::cast(get(index)); \
309
+ }
310
+ GLOBAL_CONTEXT_FIELDS(GLOBAL_CONTEXT_FIELD_ACCESSORS)
311
+ #undef GLOBAL_CONTEXT_FIELD_ACCESSORS
312
+
313
+ // Lookup the the slot called name, starting with the current context.
314
+ // There are 4 possible outcomes:
315
+ //
316
+ // 1) index_ >= 0 && result->IsContext():
317
+ // most common case, the result is a Context, and index is the
318
+ // context slot index, and the slot exists.
319
+ // attributes == READ_ONLY for the function name variable, NONE otherwise.
320
+ //
321
+ // 2) index_ >= 0 && result->IsJSObject():
322
+ // the result is the JSObject arguments object, the index is the parameter
323
+ // index, i.e., key into the arguments object, and the property exists.
324
+ // attributes != ABSENT.
325
+ //
326
+ // 3) index_ < 0 && result->IsJSObject():
327
+ // the result is the JSObject extension context or the global object,
328
+ // and the name is the property name, and the property exists.
329
+ // attributes != ABSENT.
330
+ //
331
+ // 4) index_ < 0 && result.is_null():
332
+ // there was no context found with the corresponding property.
333
+ // attributes == ABSENT.
334
+ Handle<Object> Lookup(Handle<String> name, ContextLookupFlags flags,
335
+ int* index_, PropertyAttributes* attributes);
336
+
337
+ // Determine if a local variable with the given name exists in a
338
+ // context. Do not consider context extension objects. This is
339
+ // used for compiling code using eval. If the context surrounding
340
+ // the eval call does not have a local variable with this name and
341
+ // does not contain a with statement the property is global unless
342
+ // it is shadowed by a property in an extension object introduced by
343
+ // eval.
344
+ bool GlobalIfNotShadowedByEval(Handle<String> name);
345
+
346
+ // Code generation support.
347
+ static int SlotOffset(int index) {
348
+ return kHeaderSize + index * kPointerSize - kHeapObjectTag;
349
+ }
350
+
351
+ static const int kSize = kHeaderSize + GLOBAL_CONTEXT_SLOTS * kPointerSize;
352
+
353
+ // GC support.
354
+ typedef FixedBodyDescriptor<
355
+ kHeaderSize, kSize, kSize> ScavengeBodyDescriptor;
356
+
357
+ typedef FixedBodyDescriptor<
358
+ kHeaderSize,
359
+ kHeaderSize + FIRST_WEAK_SLOT * kPointerSize,
360
+ kSize> MarkCompactBodyDescriptor;
361
+
362
+ private:
363
+ // Unchecked access to the slots.
364
+ Object* unchecked_previous() { return get(PREVIOUS_INDEX); }
365
+ Object* unchecked_extension() { return get(EXTENSION_INDEX); }
366
+
367
+ #ifdef DEBUG
368
+ // Bootstrapping-aware type checks.
369
+ static bool IsBootstrappingOrContext(Object* object);
370
+ static bool IsBootstrappingOrGlobalObject(Object* object);
371
+ #endif
372
+ };
373
+
374
+ } } // namespace v8::internal
375
+
376
+ #endif // V8_CONTEXTS_H_
@@ -0,0 +1,1069 @@
1
+ // Copyright 2006-2008 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 <stdarg.h>
29
+ #include <limits.h>
30
+
31
+ #include "v8.h"
32
+
33
+ #include "conversions-inl.h"
34
+ #include "dtoa.h"
35
+ #include "factory.h"
36
+ #include "scanner-base.h"
37
+ #include "strtod.h"
38
+
39
+ namespace v8 {
40
+ namespace internal {
41
+
42
+ namespace {
43
+
44
+ // C++-style iterator adaptor for StringInputBuffer
45
+ // (unlike C++ iterators the end-marker has different type).
46
+ class StringInputBufferIterator {
47
+ public:
48
+ class EndMarker {};
49
+
50
+ explicit StringInputBufferIterator(StringInputBuffer* buffer);
51
+
52
+ int operator*() const;
53
+ void operator++();
54
+ bool operator==(EndMarker const&) const { return end_; }
55
+ bool operator!=(EndMarker const& m) const { return !end_; }
56
+
57
+ private:
58
+ StringInputBuffer* const buffer_;
59
+ int current_;
60
+ bool end_;
61
+ };
62
+
63
+
64
+ StringInputBufferIterator::StringInputBufferIterator(
65
+ StringInputBuffer* buffer) : buffer_(buffer) {
66
+ ++(*this);
67
+ }
68
+
69
+ int StringInputBufferIterator::operator*() const {
70
+ return current_;
71
+ }
72
+
73
+
74
+ void StringInputBufferIterator::operator++() {
75
+ end_ = !buffer_->has_more();
76
+ if (!end_) {
77
+ current_ = buffer_->GetNext();
78
+ }
79
+ }
80
+ }
81
+
82
+
83
+ template <class Iterator, class EndMark>
84
+ static bool SubStringEquals(Iterator* current,
85
+ EndMark end,
86
+ const char* substring) {
87
+ ASSERT(**current == *substring);
88
+ for (substring++; *substring != '\0'; substring++) {
89
+ ++*current;
90
+ if (*current == end || **current != *substring) return false;
91
+ }
92
+ ++*current;
93
+ return true;
94
+ }
95
+
96
+
97
+ // Maximum number of significant digits in decimal representation.
98
+ // The longest possible double in decimal representation is
99
+ // (2^53 - 1) * 2 ^ -1074 that is (2 ^ 53 - 1) * 5 ^ 1074 / 10 ^ 1074
100
+ // (768 digits). If we parse a number whose first digits are equal to a
101
+ // mean of 2 adjacent doubles (that could have up to 769 digits) the result
102
+ // must be rounded to the bigger one unless the tail consists of zeros, so
103
+ // we don't need to preserve all the digits.
104
+ const int kMaxSignificantDigits = 772;
105
+
106
+
107
+ static const double JUNK_STRING_VALUE = OS::nan_value();
108
+
109
+
110
+ // Returns true if a nonspace found and false if the end has reached.
111
+ template <class Iterator, class EndMark>
112
+ static inline bool AdvanceToNonspace(Iterator* current, EndMark end) {
113
+ while (*current != end) {
114
+ if (!ScannerConstants::kIsWhiteSpace.get(**current)) return true;
115
+ ++*current;
116
+ }
117
+ return false;
118
+ }
119
+
120
+
121
+ static bool isDigit(int x, int radix) {
122
+ return (x >= '0' && x <= '9' && x < '0' + radix)
123
+ || (radix > 10 && x >= 'a' && x < 'a' + radix - 10)
124
+ || (radix > 10 && x >= 'A' && x < 'A' + radix - 10);
125
+ }
126
+
127
+
128
+ static double SignedZero(bool negative) {
129
+ return negative ? -0.0 : 0.0;
130
+ }
131
+
132
+
133
+ // Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end.
134
+ template <int radix_log_2, class Iterator, class EndMark>
135
+ static double InternalStringToIntDouble(Iterator current,
136
+ EndMark end,
137
+ bool negative,
138
+ bool allow_trailing_junk) {
139
+ ASSERT(current != end);
140
+
141
+ // Skip leading 0s.
142
+ while (*current == '0') {
143
+ ++current;
144
+ if (current == end) return SignedZero(negative);
145
+ }
146
+
147
+ int64_t number = 0;
148
+ int exponent = 0;
149
+ const int radix = (1 << radix_log_2);
150
+
151
+ do {
152
+ int digit;
153
+ if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
154
+ digit = static_cast<char>(*current) - '0';
155
+ } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) {
156
+ digit = static_cast<char>(*current) - 'a' + 10;
157
+ } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) {
158
+ digit = static_cast<char>(*current) - 'A' + 10;
159
+ } else {
160
+ if (allow_trailing_junk || !AdvanceToNonspace(&current, end)) {
161
+ break;
162
+ } else {
163
+ return JUNK_STRING_VALUE;
164
+ }
165
+ }
166
+
167
+ number = number * radix + digit;
168
+ int overflow = static_cast<int>(number >> 53);
169
+ if (overflow != 0) {
170
+ // Overflow occurred. Need to determine which direction to round the
171
+ // result.
172
+ int overflow_bits_count = 1;
173
+ while (overflow > 1) {
174
+ overflow_bits_count++;
175
+ overflow >>= 1;
176
+ }
177
+
178
+ int dropped_bits_mask = ((1 << overflow_bits_count) - 1);
179
+ int dropped_bits = static_cast<int>(number) & dropped_bits_mask;
180
+ number >>= overflow_bits_count;
181
+ exponent = overflow_bits_count;
182
+
183
+ bool zero_tail = true;
184
+ while (true) {
185
+ ++current;
186
+ if (current == end || !isDigit(*current, radix)) break;
187
+ zero_tail = zero_tail && *current == '0';
188
+ exponent += radix_log_2;
189
+ }
190
+
191
+ if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
192
+ return JUNK_STRING_VALUE;
193
+ }
194
+
195
+ int middle_value = (1 << (overflow_bits_count - 1));
196
+ if (dropped_bits > middle_value) {
197
+ number++; // Rounding up.
198
+ } else if (dropped_bits == middle_value) {
199
+ // Rounding to even to consistency with decimals: half-way case rounds
200
+ // up if significant part is odd and down otherwise.
201
+ if ((number & 1) != 0 || !zero_tail) {
202
+ number++; // Rounding up.
203
+ }
204
+ }
205
+
206
+ // Rounding up may cause overflow.
207
+ if ((number & ((int64_t)1 << 53)) != 0) {
208
+ exponent++;
209
+ number >>= 1;
210
+ }
211
+ break;
212
+ }
213
+ ++current;
214
+ } while (current != end);
215
+
216
+ ASSERT(number < ((int64_t)1 << 53));
217
+ ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
218
+
219
+ if (exponent == 0) {
220
+ if (negative) {
221
+ if (number == 0) return -0.0;
222
+ number = -number;
223
+ }
224
+ return static_cast<double>(number);
225
+ }
226
+
227
+ ASSERT(number != 0);
228
+ // The double could be constructed faster from number (mantissa), exponent
229
+ // and sign. Assuming it's a rare case more simple code is used.
230
+ return static_cast<double>(negative ? -number : number) * pow(2.0, exponent);
231
+ }
232
+
233
+
234
+ template <class Iterator, class EndMark>
235
+ static double InternalStringToInt(Iterator current, EndMark end, int radix) {
236
+ const bool allow_trailing_junk = true;
237
+ const double empty_string_val = JUNK_STRING_VALUE;
238
+
239
+ if (!AdvanceToNonspace(&current, end)) return empty_string_val;
240
+
241
+ bool negative = false;
242
+ bool leading_zero = false;
243
+
244
+ if (*current == '+') {
245
+ // Ignore leading sign; skip following spaces.
246
+ ++current;
247
+ if (!AdvanceToNonspace(&current, end)) return JUNK_STRING_VALUE;
248
+ } else if (*current == '-') {
249
+ ++current;
250
+ if (!AdvanceToNonspace(&current, end)) return JUNK_STRING_VALUE;
251
+ negative = true;
252
+ }
253
+
254
+ if (radix == 0) {
255
+ // Radix detection.
256
+ if (*current == '0') {
257
+ ++current;
258
+ if (current == end) return SignedZero(negative);
259
+ if (*current == 'x' || *current == 'X') {
260
+ radix = 16;
261
+ ++current;
262
+ if (current == end) return JUNK_STRING_VALUE;
263
+ } else {
264
+ radix = 8;
265
+ leading_zero = true;
266
+ }
267
+ } else {
268
+ radix = 10;
269
+ }
270
+ } else if (radix == 16) {
271
+ if (*current == '0') {
272
+ // Allow "0x" prefix.
273
+ ++current;
274
+ if (current == end) return SignedZero(negative);
275
+ if (*current == 'x' || *current == 'X') {
276
+ ++current;
277
+ if (current == end) return JUNK_STRING_VALUE;
278
+ } else {
279
+ leading_zero = true;
280
+ }
281
+ }
282
+ }
283
+
284
+ if (radix < 2 || radix > 36) return JUNK_STRING_VALUE;
285
+
286
+ // Skip leading zeros.
287
+ while (*current == '0') {
288
+ leading_zero = true;
289
+ ++current;
290
+ if (current == end) return SignedZero(negative);
291
+ }
292
+
293
+ if (!leading_zero && !isDigit(*current, radix)) {
294
+ return JUNK_STRING_VALUE;
295
+ }
296
+
297
+ if (IsPowerOf2(radix)) {
298
+ switch (radix) {
299
+ case 2:
300
+ return InternalStringToIntDouble<1>(
301
+ current, end, negative, allow_trailing_junk);
302
+ case 4:
303
+ return InternalStringToIntDouble<2>(
304
+ current, end, negative, allow_trailing_junk);
305
+ case 8:
306
+ return InternalStringToIntDouble<3>(
307
+ current, end, negative, allow_trailing_junk);
308
+
309
+ case 16:
310
+ return InternalStringToIntDouble<4>(
311
+ current, end, negative, allow_trailing_junk);
312
+
313
+ case 32:
314
+ return InternalStringToIntDouble<5>(
315
+ current, end, negative, allow_trailing_junk);
316
+ default:
317
+ UNREACHABLE();
318
+ }
319
+ }
320
+
321
+ if (radix == 10) {
322
+ // Parsing with strtod.
323
+ const int kMaxSignificantDigits = 309; // Doubles are less than 1.8e308.
324
+ // The buffer may contain up to kMaxSignificantDigits + 1 digits and a zero
325
+ // end.
326
+ const int kBufferSize = kMaxSignificantDigits + 2;
327
+ char buffer[kBufferSize];
328
+ int buffer_pos = 0;
329
+ while (*current >= '0' && *current <= '9') {
330
+ if (buffer_pos <= kMaxSignificantDigits) {
331
+ // If the number has more than kMaxSignificantDigits it will be parsed
332
+ // as infinity.
333
+ ASSERT(buffer_pos < kBufferSize);
334
+ buffer[buffer_pos++] = static_cast<char>(*current);
335
+ }
336
+ ++current;
337
+ if (current == end) break;
338
+ }
339
+
340
+ if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
341
+ return JUNK_STRING_VALUE;
342
+ }
343
+
344
+ ASSERT(buffer_pos < kBufferSize);
345
+ buffer[buffer_pos] = '\0';
346
+ Vector<const char> buffer_vector(buffer, buffer_pos);
347
+ return negative ? -Strtod(buffer_vector, 0) : Strtod(buffer_vector, 0);
348
+ }
349
+
350
+ // The following code causes accumulating rounding error for numbers greater
351
+ // than ~2^56. It's explicitly allowed in the spec: "if R is not 2, 4, 8, 10,
352
+ // 16, or 32, then mathInt may be an implementation-dependent approximation to
353
+ // the mathematical integer value" (15.1.2.2).
354
+
355
+ int lim_0 = '0' + (radix < 10 ? radix : 10);
356
+ int lim_a = 'a' + (radix - 10);
357
+ int lim_A = 'A' + (radix - 10);
358
+
359
+ // NOTE: The code for computing the value may seem a bit complex at
360
+ // first glance. It is structured to use 32-bit multiply-and-add
361
+ // loops as long as possible to avoid loosing precision.
362
+
363
+ double v = 0.0;
364
+ bool done = false;
365
+ do {
366
+ // Parse the longest part of the string starting at index j
367
+ // possible while keeping the multiplier, and thus the part
368
+ // itself, within 32 bits.
369
+ unsigned int part = 0, multiplier = 1;
370
+ while (true) {
371
+ int d;
372
+ if (*current >= '0' && *current < lim_0) {
373
+ d = *current - '0';
374
+ } else if (*current >= 'a' && *current < lim_a) {
375
+ d = *current - 'a' + 10;
376
+ } else if (*current >= 'A' && *current < lim_A) {
377
+ d = *current - 'A' + 10;
378
+ } else {
379
+ done = true;
380
+ break;
381
+ }
382
+
383
+ // Update the value of the part as long as the multiplier fits
384
+ // in 32 bits. When we can't guarantee that the next iteration
385
+ // will not overflow the multiplier, we stop parsing the part
386
+ // by leaving the loop.
387
+ const unsigned int kMaximumMultiplier = 0xffffffffU / 36;
388
+ uint32_t m = multiplier * radix;
389
+ if (m > kMaximumMultiplier) break;
390
+ part = part * radix + d;
391
+ multiplier = m;
392
+ ASSERT(multiplier > part);
393
+
394
+ ++current;
395
+ if (current == end) {
396
+ done = true;
397
+ break;
398
+ }
399
+ }
400
+
401
+ // Update the value and skip the part in the string.
402
+ v = v * multiplier + part;
403
+ } while (!done);
404
+
405
+ if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
406
+ return JUNK_STRING_VALUE;
407
+ }
408
+
409
+ return negative ? -v : v;
410
+ }
411
+
412
+
413
+ // Converts a string to a double value. Assumes the Iterator supports
414
+ // the following operations:
415
+ // 1. current == end (other ops are not allowed), current != end.
416
+ // 2. *current - gets the current character in the sequence.
417
+ // 3. ++current (advances the position).
418
+ template <class Iterator, class EndMark>
419
+ static double InternalStringToDouble(Iterator current,
420
+ EndMark end,
421
+ int flags,
422
+ double empty_string_val) {
423
+ // To make sure that iterator dereferencing is valid the following
424
+ // convention is used:
425
+ // 1. Each '++current' statement is followed by check for equality to 'end'.
426
+ // 2. If AdvanceToNonspace returned false then current == end.
427
+ // 3. If 'current' becomes be equal to 'end' the function returns or goes to
428
+ // 'parsing_done'.
429
+ // 4. 'current' is not dereferenced after the 'parsing_done' label.
430
+ // 5. Code before 'parsing_done' may rely on 'current != end'.
431
+ if (!AdvanceToNonspace(&current, end)) return empty_string_val;
432
+
433
+ const bool allow_trailing_junk = (flags & ALLOW_TRAILING_JUNK) != 0;
434
+
435
+ // The longest form of simplified number is: "-<significant digits>'.1eXXX\0".
436
+ const int kBufferSize = kMaxSignificantDigits + 10;
437
+ char buffer[kBufferSize]; // NOLINT: size is known at compile time.
438
+ int buffer_pos = 0;
439
+
440
+ // Exponent will be adjusted if insignificant digits of the integer part
441
+ // or insignificant leading zeros of the fractional part are dropped.
442
+ int exponent = 0;
443
+ int significant_digits = 0;
444
+ int insignificant_digits = 0;
445
+ bool nonzero_digit_dropped = false;
446
+ bool fractional_part = false;
447
+
448
+ bool negative = false;
449
+
450
+ if (*current == '+') {
451
+ // Ignore leading sign.
452
+ ++current;
453
+ if (current == end) return JUNK_STRING_VALUE;
454
+ } else if (*current == '-') {
455
+ ++current;
456
+ if (current == end) return JUNK_STRING_VALUE;
457
+ negative = true;
458
+ }
459
+
460
+ static const char kInfinitySymbol[] = "Infinity";
461
+ if (*current == kInfinitySymbol[0]) {
462
+ if (!SubStringEquals(&current, end, kInfinitySymbol)) {
463
+ return JUNK_STRING_VALUE;
464
+ }
465
+
466
+ if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
467
+ return JUNK_STRING_VALUE;
468
+ }
469
+
470
+ ASSERT(buffer_pos == 0);
471
+ return negative ? -V8_INFINITY : V8_INFINITY;
472
+ }
473
+
474
+ bool leading_zero = false;
475
+ if (*current == '0') {
476
+ ++current;
477
+ if (current == end) return SignedZero(negative);
478
+
479
+ leading_zero = true;
480
+
481
+ // It could be hexadecimal value.
482
+ if ((flags & ALLOW_HEX) && (*current == 'x' || *current == 'X')) {
483
+ ++current;
484
+ if (current == end || !isDigit(*current, 16)) {
485
+ return JUNK_STRING_VALUE; // "0x".
486
+ }
487
+
488
+ return InternalStringToIntDouble<4>(current,
489
+ end,
490
+ negative,
491
+ allow_trailing_junk);
492
+ }
493
+
494
+ // Ignore leading zeros in the integer part.
495
+ while (*current == '0') {
496
+ ++current;
497
+ if (current == end) return SignedZero(negative);
498
+ }
499
+ }
500
+
501
+ bool octal = leading_zero && (flags & ALLOW_OCTALS) != 0;
502
+
503
+ // Copy significant digits of the integer part (if any) to the buffer.
504
+ while (*current >= '0' && *current <= '9') {
505
+ if (significant_digits < kMaxSignificantDigits) {
506
+ ASSERT(buffer_pos < kBufferSize);
507
+ buffer[buffer_pos++] = static_cast<char>(*current);
508
+ significant_digits++;
509
+ // Will later check if it's an octal in the buffer.
510
+ } else {
511
+ insignificant_digits++; // Move the digit into the exponential part.
512
+ nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
513
+ }
514
+ octal = octal && *current < '8';
515
+ ++current;
516
+ if (current == end) goto parsing_done;
517
+ }
518
+
519
+ if (significant_digits == 0) {
520
+ octal = false;
521
+ }
522
+
523
+ if (*current == '.') {
524
+ if (octal && !allow_trailing_junk) return JUNK_STRING_VALUE;
525
+ if (octal) goto parsing_done;
526
+
527
+ ++current;
528
+ if (current == end) {
529
+ if (significant_digits == 0 && !leading_zero) {
530
+ return JUNK_STRING_VALUE;
531
+ } else {
532
+ goto parsing_done;
533
+ }
534
+ }
535
+
536
+ if (significant_digits == 0) {
537
+ // octal = false;
538
+ // Integer part consists of 0 or is absent. Significant digits start after
539
+ // leading zeros (if any).
540
+ while (*current == '0') {
541
+ ++current;
542
+ if (current == end) return SignedZero(negative);
543
+ exponent--; // Move this 0 into the exponent.
544
+ }
545
+ }
546
+
547
+ // We don't emit a '.', but adjust the exponent instead.
548
+ fractional_part = true;
549
+
550
+ // There is a fractional part.
551
+ while (*current >= '0' && *current <= '9') {
552
+ if (significant_digits < kMaxSignificantDigits) {
553
+ ASSERT(buffer_pos < kBufferSize);
554
+ buffer[buffer_pos++] = static_cast<char>(*current);
555
+ significant_digits++;
556
+ exponent--;
557
+ } else {
558
+ // Ignore insignificant digits in the fractional part.
559
+ nonzero_digit_dropped = nonzero_digit_dropped || *current != '0';
560
+ }
561
+ ++current;
562
+ if (current == end) goto parsing_done;
563
+ }
564
+ }
565
+
566
+ if (!leading_zero && exponent == 0 && significant_digits == 0) {
567
+ // If leading_zeros is true then the string contains zeros.
568
+ // If exponent < 0 then string was [+-]\.0*...
569
+ // If significant_digits != 0 the string is not equal to 0.
570
+ // Otherwise there are no digits in the string.
571
+ return JUNK_STRING_VALUE;
572
+ }
573
+
574
+ // Parse exponential part.
575
+ if (*current == 'e' || *current == 'E') {
576
+ if (octal) return JUNK_STRING_VALUE;
577
+ ++current;
578
+ if (current == end) {
579
+ if (allow_trailing_junk) {
580
+ goto parsing_done;
581
+ } else {
582
+ return JUNK_STRING_VALUE;
583
+ }
584
+ }
585
+ char sign = '+';
586
+ if (*current == '+' || *current == '-') {
587
+ sign = static_cast<char>(*current);
588
+ ++current;
589
+ if (current == end) {
590
+ if (allow_trailing_junk) {
591
+ goto parsing_done;
592
+ } else {
593
+ return JUNK_STRING_VALUE;
594
+ }
595
+ }
596
+ }
597
+
598
+ if (current == end || *current < '0' || *current > '9') {
599
+ if (allow_trailing_junk) {
600
+ goto parsing_done;
601
+ } else {
602
+ return JUNK_STRING_VALUE;
603
+ }
604
+ }
605
+
606
+ const int max_exponent = INT_MAX / 2;
607
+ ASSERT(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
608
+ int num = 0;
609
+ do {
610
+ // Check overflow.
611
+ int digit = *current - '0';
612
+ if (num >= max_exponent / 10
613
+ && !(num == max_exponent / 10 && digit <= max_exponent % 10)) {
614
+ num = max_exponent;
615
+ } else {
616
+ num = num * 10 + digit;
617
+ }
618
+ ++current;
619
+ } while (current != end && *current >= '0' && *current <= '9');
620
+
621
+ exponent += (sign == '-' ? -num : num);
622
+ }
623
+
624
+ if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
625
+ return JUNK_STRING_VALUE;
626
+ }
627
+
628
+ parsing_done:
629
+ exponent += insignificant_digits;
630
+
631
+ if (octal) {
632
+ return InternalStringToIntDouble<3>(buffer,
633
+ buffer + buffer_pos,
634
+ negative,
635
+ allow_trailing_junk);
636
+ }
637
+
638
+ if (nonzero_digit_dropped) {
639
+ buffer[buffer_pos++] = '1';
640
+ exponent--;
641
+ }
642
+
643
+ ASSERT(buffer_pos < kBufferSize);
644
+ buffer[buffer_pos] = '\0';
645
+
646
+ double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
647
+ return negative ? -converted : converted;
648
+ }
649
+
650
+
651
+ double StringToDouble(String* str, int flags, double empty_string_val) {
652
+ StringShape shape(str);
653
+ if (shape.IsSequentialAscii()) {
654
+ const char* begin = SeqAsciiString::cast(str)->GetChars();
655
+ const char* end = begin + str->length();
656
+ return InternalStringToDouble(begin, end, flags, empty_string_val);
657
+ } else if (shape.IsSequentialTwoByte()) {
658
+ const uc16* begin = SeqTwoByteString::cast(str)->GetChars();
659
+ const uc16* end = begin + str->length();
660
+ return InternalStringToDouble(begin, end, flags, empty_string_val);
661
+ } else {
662
+ StringInputBuffer buffer(str);
663
+ return InternalStringToDouble(StringInputBufferIterator(&buffer),
664
+ StringInputBufferIterator::EndMarker(),
665
+ flags,
666
+ empty_string_val);
667
+ }
668
+ }
669
+
670
+
671
+ double StringToInt(String* str, int radix) {
672
+ StringShape shape(str);
673
+ if (shape.IsSequentialAscii()) {
674
+ const char* begin = SeqAsciiString::cast(str)->GetChars();
675
+ const char* end = begin + str->length();
676
+ return InternalStringToInt(begin, end, radix);
677
+ } else if (shape.IsSequentialTwoByte()) {
678
+ const uc16* begin = SeqTwoByteString::cast(str)->GetChars();
679
+ const uc16* end = begin + str->length();
680
+ return InternalStringToInt(begin, end, radix);
681
+ } else {
682
+ StringInputBuffer buffer(str);
683
+ return InternalStringToInt(StringInputBufferIterator(&buffer),
684
+ StringInputBufferIterator::EndMarker(),
685
+ radix);
686
+ }
687
+ }
688
+
689
+
690
+ double StringToDouble(const char* str, int flags, double empty_string_val) {
691
+ const char* end = str + StrLength(str);
692
+ return InternalStringToDouble(str, end, flags, empty_string_val);
693
+ }
694
+
695
+
696
+ double StringToDouble(Vector<const char> str,
697
+ int flags,
698
+ double empty_string_val) {
699
+ const char* end = str.start() + str.length();
700
+ return InternalStringToDouble(str.start(), end, flags, empty_string_val);
701
+ }
702
+
703
+
704
+ const char* DoubleToCString(double v, Vector<char> buffer) {
705
+ switch (fpclassify(v)) {
706
+ case FP_NAN: return "NaN";
707
+ case FP_INFINITE: return (v < 0.0 ? "-Infinity" : "Infinity");
708
+ case FP_ZERO: return "0";
709
+ default: {
710
+ StringBuilder builder(buffer.start(), buffer.length());
711
+ int decimal_point;
712
+ int sign;
713
+ const int kV8DtoaBufferCapacity = kBase10MaximalLength + 1;
714
+ char decimal_rep[kV8DtoaBufferCapacity];
715
+ int length;
716
+
717
+ DoubleToAscii(v, DTOA_SHORTEST, 0,
718
+ Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
719
+ &sign, &length, &decimal_point);
720
+
721
+ if (sign) builder.AddCharacter('-');
722
+
723
+ if (length <= decimal_point && decimal_point <= 21) {
724
+ // ECMA-262 section 9.8.1 step 6.
725
+ builder.AddString(decimal_rep);
726
+ builder.AddPadding('0', decimal_point - length);
727
+
728
+ } else if (0 < decimal_point && decimal_point <= 21) {
729
+ // ECMA-262 section 9.8.1 step 7.
730
+ builder.AddSubstring(decimal_rep, decimal_point);
731
+ builder.AddCharacter('.');
732
+ builder.AddString(decimal_rep + decimal_point);
733
+
734
+ } else if (decimal_point <= 0 && decimal_point > -6) {
735
+ // ECMA-262 section 9.8.1 step 8.
736
+ builder.AddString("0.");
737
+ builder.AddPadding('0', -decimal_point);
738
+ builder.AddString(decimal_rep);
739
+
740
+ } else {
741
+ // ECMA-262 section 9.8.1 step 9 and 10 combined.
742
+ builder.AddCharacter(decimal_rep[0]);
743
+ if (length != 1) {
744
+ builder.AddCharacter('.');
745
+ builder.AddString(decimal_rep + 1);
746
+ }
747
+ builder.AddCharacter('e');
748
+ builder.AddCharacter((decimal_point >= 0) ? '+' : '-');
749
+ int exponent = decimal_point - 1;
750
+ if (exponent < 0) exponent = -exponent;
751
+ builder.AddFormatted("%d", exponent);
752
+ }
753
+ return builder.Finalize();
754
+ }
755
+ }
756
+ }
757
+
758
+
759
+ const char* IntToCString(int n, Vector<char> buffer) {
760
+ bool negative = false;
761
+ if (n < 0) {
762
+ // We must not negate the most negative int.
763
+ if (n == kMinInt) return DoubleToCString(n, buffer);
764
+ negative = true;
765
+ n = -n;
766
+ }
767
+ // Build the string backwards from the least significant digit.
768
+ int i = buffer.length();
769
+ buffer[--i] = '\0';
770
+ do {
771
+ buffer[--i] = '0' + (n % 10);
772
+ n /= 10;
773
+ } while (n);
774
+ if (negative) buffer[--i] = '-';
775
+ return buffer.start() + i;
776
+ }
777
+
778
+
779
+ char* DoubleToFixedCString(double value, int f) {
780
+ const int kMaxDigitsBeforePoint = 21;
781
+ const double kFirstNonFixed = 1e21;
782
+ const int kMaxDigitsAfterPoint = 20;
783
+ ASSERT(f >= 0);
784
+ ASSERT(f <= kMaxDigitsAfterPoint);
785
+
786
+ bool negative = false;
787
+ double abs_value = value;
788
+ if (value < 0) {
789
+ abs_value = -value;
790
+ negative = true;
791
+ }
792
+
793
+ // If abs_value has more than kMaxDigitsBeforePoint digits before the point
794
+ // use the non-fixed conversion routine.
795
+ if (abs_value >= kFirstNonFixed) {
796
+ char arr[100];
797
+ Vector<char> buffer(arr, ARRAY_SIZE(arr));
798
+ return StrDup(DoubleToCString(value, buffer));
799
+ }
800
+
801
+ // Find a sufficiently precise decimal representation of n.
802
+ int decimal_point;
803
+ int sign;
804
+ // Add space for the '\0' byte.
805
+ const int kDecimalRepCapacity =
806
+ kMaxDigitsBeforePoint + kMaxDigitsAfterPoint + 1;
807
+ char decimal_rep[kDecimalRepCapacity];
808
+ int decimal_rep_length;
809
+ DoubleToAscii(value, DTOA_FIXED, f,
810
+ Vector<char>(decimal_rep, kDecimalRepCapacity),
811
+ &sign, &decimal_rep_length, &decimal_point);
812
+
813
+ // Create a representation that is padded with zeros if needed.
814
+ int zero_prefix_length = 0;
815
+ int zero_postfix_length = 0;
816
+
817
+ if (decimal_point <= 0) {
818
+ zero_prefix_length = -decimal_point + 1;
819
+ decimal_point = 1;
820
+ }
821
+
822
+ if (zero_prefix_length + decimal_rep_length < decimal_point + f) {
823
+ zero_postfix_length = decimal_point + f - decimal_rep_length -
824
+ zero_prefix_length;
825
+ }
826
+
827
+ unsigned rep_length =
828
+ zero_prefix_length + decimal_rep_length + zero_postfix_length;
829
+ StringBuilder rep_builder(rep_length + 1);
830
+ rep_builder.AddPadding('0', zero_prefix_length);
831
+ rep_builder.AddString(decimal_rep);
832
+ rep_builder.AddPadding('0', zero_postfix_length);
833
+ char* rep = rep_builder.Finalize();
834
+
835
+ // Create the result string by appending a minus and putting in a
836
+ // decimal point if needed.
837
+ unsigned result_size = decimal_point + f + 2;
838
+ StringBuilder builder(result_size + 1);
839
+ if (negative) builder.AddCharacter('-');
840
+ builder.AddSubstring(rep, decimal_point);
841
+ if (f > 0) {
842
+ builder.AddCharacter('.');
843
+ builder.AddSubstring(rep + decimal_point, f);
844
+ }
845
+ DeleteArray(rep);
846
+ return builder.Finalize();
847
+ }
848
+
849
+
850
+ static char* CreateExponentialRepresentation(char* decimal_rep,
851
+ int exponent,
852
+ bool negative,
853
+ int significant_digits) {
854
+ bool negative_exponent = false;
855
+ if (exponent < 0) {
856
+ negative_exponent = true;
857
+ exponent = -exponent;
858
+ }
859
+
860
+ // Leave room in the result for appending a minus, for a period, the
861
+ // letter 'e', a minus or a plus depending on the exponent, and a
862
+ // three digit exponent.
863
+ unsigned result_size = significant_digits + 7;
864
+ StringBuilder builder(result_size + 1);
865
+
866
+ if (negative) builder.AddCharacter('-');
867
+ builder.AddCharacter(decimal_rep[0]);
868
+ if (significant_digits != 1) {
869
+ builder.AddCharacter('.');
870
+ builder.AddString(decimal_rep + 1);
871
+ int rep_length = StrLength(decimal_rep);
872
+ builder.AddPadding('0', significant_digits - rep_length);
873
+ }
874
+
875
+ builder.AddCharacter('e');
876
+ builder.AddCharacter(negative_exponent ? '-' : '+');
877
+ builder.AddFormatted("%d", exponent);
878
+ return builder.Finalize();
879
+ }
880
+
881
+
882
+
883
+ char* DoubleToExponentialCString(double value, int f) {
884
+ const int kMaxDigitsAfterPoint = 20;
885
+ // f might be -1 to signal that f was undefined in JavaScript.
886
+ ASSERT(f >= -1 && f <= kMaxDigitsAfterPoint);
887
+
888
+ bool negative = false;
889
+ if (value < 0) {
890
+ value = -value;
891
+ negative = true;
892
+ }
893
+
894
+ // Find a sufficiently precise decimal representation of n.
895
+ int decimal_point;
896
+ int sign;
897
+ // f corresponds to the digits after the point. There is always one digit
898
+ // before the point. The number of requested_digits equals hence f + 1.
899
+ // And we have to add one character for the null-terminator.
900
+ const int kV8DtoaBufferCapacity = kMaxDigitsAfterPoint + 1 + 1;
901
+ // Make sure that the buffer is big enough, even if we fall back to the
902
+ // shortest representation (which happens when f equals -1).
903
+ ASSERT(kBase10MaximalLength <= kMaxDigitsAfterPoint + 1);
904
+ char decimal_rep[kV8DtoaBufferCapacity];
905
+ int decimal_rep_length;
906
+
907
+ if (f == -1) {
908
+ DoubleToAscii(value, DTOA_SHORTEST, 0,
909
+ Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
910
+ &sign, &decimal_rep_length, &decimal_point);
911
+ f = decimal_rep_length - 1;
912
+ } else {
913
+ DoubleToAscii(value, DTOA_PRECISION, f + 1,
914
+ Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
915
+ &sign, &decimal_rep_length, &decimal_point);
916
+ }
917
+ ASSERT(decimal_rep_length > 0);
918
+ ASSERT(decimal_rep_length <= f + 1);
919
+
920
+ int exponent = decimal_point - 1;
921
+ char* result =
922
+ CreateExponentialRepresentation(decimal_rep, exponent, negative, f+1);
923
+
924
+ return result;
925
+ }
926
+
927
+
928
+ char* DoubleToPrecisionCString(double value, int p) {
929
+ const int kMinimalDigits = 1;
930
+ const int kMaximalDigits = 21;
931
+ ASSERT(p >= kMinimalDigits && p <= kMaximalDigits);
932
+ USE(kMinimalDigits);
933
+
934
+ bool negative = false;
935
+ if (value < 0) {
936
+ value = -value;
937
+ negative = true;
938
+ }
939
+
940
+ // Find a sufficiently precise decimal representation of n.
941
+ int decimal_point;
942
+ int sign;
943
+ // Add one for the terminating null character.
944
+ const int kV8DtoaBufferCapacity = kMaximalDigits + 1;
945
+ char decimal_rep[kV8DtoaBufferCapacity];
946
+ int decimal_rep_length;
947
+
948
+ DoubleToAscii(value, DTOA_PRECISION, p,
949
+ Vector<char>(decimal_rep, kV8DtoaBufferCapacity),
950
+ &sign, &decimal_rep_length, &decimal_point);
951
+ ASSERT(decimal_rep_length <= p);
952
+
953
+ int exponent = decimal_point - 1;
954
+
955
+ char* result = NULL;
956
+
957
+ if (exponent < -6 || exponent >= p) {
958
+ result =
959
+ CreateExponentialRepresentation(decimal_rep, exponent, negative, p);
960
+ } else {
961
+ // Use fixed notation.
962
+ //
963
+ // Leave room in the result for appending a minus, a period and in
964
+ // the case where decimal_point is not positive for a zero in
965
+ // front of the period.
966
+ unsigned result_size = (decimal_point <= 0)
967
+ ? -decimal_point + p + 3
968
+ : p + 2;
969
+ StringBuilder builder(result_size + 1);
970
+ if (negative) builder.AddCharacter('-');
971
+ if (decimal_point <= 0) {
972
+ builder.AddString("0.");
973
+ builder.AddPadding('0', -decimal_point);
974
+ builder.AddString(decimal_rep);
975
+ builder.AddPadding('0', p - decimal_rep_length);
976
+ } else {
977
+ const int m = Min(decimal_rep_length, decimal_point);
978
+ builder.AddSubstring(decimal_rep, m);
979
+ builder.AddPadding('0', decimal_point - decimal_rep_length);
980
+ if (decimal_point < p) {
981
+ builder.AddCharacter('.');
982
+ const int extra = negative ? 2 : 1;
983
+ if (decimal_rep_length > decimal_point) {
984
+ const int len = StrLength(decimal_rep + decimal_point);
985
+ const int n = Min(len, p - (builder.position() - extra));
986
+ builder.AddSubstring(decimal_rep + decimal_point, n);
987
+ }
988
+ builder.AddPadding('0', extra + (p - builder.position()));
989
+ }
990
+ }
991
+ result = builder.Finalize();
992
+ }
993
+
994
+ return result;
995
+ }
996
+
997
+
998
+ char* DoubleToRadixCString(double value, int radix) {
999
+ ASSERT(radix >= 2 && radix <= 36);
1000
+
1001
+ // Character array used for conversion.
1002
+ static const char chars[] = "0123456789abcdefghijklmnopqrstuvwxyz";
1003
+
1004
+ // Buffer for the integer part of the result. 1024 chars is enough
1005
+ // for max integer value in radix 2. We need room for a sign too.
1006
+ static const int kBufferSize = 1100;
1007
+ char integer_buffer[kBufferSize];
1008
+ integer_buffer[kBufferSize - 1] = '\0';
1009
+
1010
+ // Buffer for the decimal part of the result. We only generate up
1011
+ // to kBufferSize - 1 chars for the decimal part.
1012
+ char decimal_buffer[kBufferSize];
1013
+ decimal_buffer[kBufferSize - 1] = '\0';
1014
+
1015
+ // Make sure the value is positive.
1016
+ bool is_negative = value < 0.0;
1017
+ if (is_negative) value = -value;
1018
+
1019
+ // Get the integer part and the decimal part.
1020
+ double integer_part = floor(value);
1021
+ double decimal_part = value - integer_part;
1022
+
1023
+ // Convert the integer part starting from the back. Always generate
1024
+ // at least one digit.
1025
+ int integer_pos = kBufferSize - 2;
1026
+ do {
1027
+ integer_buffer[integer_pos--] =
1028
+ chars[static_cast<int>(modulo(integer_part, radix))];
1029
+ integer_part /= radix;
1030
+ } while (integer_part >= 1.0);
1031
+ // Sanity check.
1032
+ ASSERT(integer_pos > 0);
1033
+ // Add sign if needed.
1034
+ if (is_negative) integer_buffer[integer_pos--] = '-';
1035
+
1036
+ // Convert the decimal part. Repeatedly multiply by the radix to
1037
+ // generate the next char. Never generate more than kBufferSize - 1
1038
+ // chars.
1039
+ //
1040
+ // TODO(1093998): We will often generate a full decimal_buffer of
1041
+ // chars because hitting zero will often not happen. The right
1042
+ // solution would be to continue until the string representation can
1043
+ // be read back and yield the original value. To implement this
1044
+ // efficiently, we probably have to modify dtoa.
1045
+ int decimal_pos = 0;
1046
+ while ((decimal_part > 0.0) && (decimal_pos < kBufferSize - 1)) {
1047
+ decimal_part *= radix;
1048
+ decimal_buffer[decimal_pos++] =
1049
+ chars[static_cast<int>(floor(decimal_part))];
1050
+ decimal_part -= floor(decimal_part);
1051
+ }
1052
+ decimal_buffer[decimal_pos] = '\0';
1053
+
1054
+ // Compute the result size.
1055
+ int integer_part_size = kBufferSize - 2 - integer_pos;
1056
+ // Make room for zero termination.
1057
+ unsigned result_size = integer_part_size + decimal_pos;
1058
+ // If the number has a decimal part, leave room for the period.
1059
+ if (decimal_pos > 0) result_size++;
1060
+ // Allocate result and fill in the parts.
1061
+ StringBuilder builder(result_size + 1);
1062
+ builder.AddSubstring(integer_buffer + integer_pos + 1, integer_part_size);
1063
+ if (decimal_pos > 0) builder.AddCharacter('.');
1064
+ builder.AddSubstring(decimal_buffer, decimal_pos);
1065
+ return builder.Finalize();
1066
+ }
1067
+
1068
+
1069
+ } } // namespace v8::internal