therubyracer-heroku 0.8.1.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1966) hide show
  1. data/.gitignore +13 -0
  2. data/.gitmodules +3 -0
  3. data/.rspec +1 -0
  4. data/Changelog.md +165 -0
  5. data/Gemfile +1 -0
  6. data/README.md +155 -0
  7. data/Rakefile +34 -0
  8. data/bin/therubyracer +13 -0
  9. data/bin/v8 +8 -0
  10. data/ext/v8/extconf.rb +25 -0
  11. data/ext/v8/rr.cpp +175 -0
  12. data/ext/v8/rr.h +36 -0
  13. data/ext/v8/upstream/2.3.3/.gitignore +26 -0
  14. data/ext/v8/upstream/2.3.3/AUTHORS +31 -0
  15. data/ext/v8/upstream/2.3.3/ChangeLog +1916 -0
  16. data/ext/v8/upstream/2.3.3/LICENSE +55 -0
  17. data/ext/v8/upstream/2.3.3/SConstruct +1154 -0
  18. data/ext/v8/upstream/2.3.3/include/v8-debug.h +381 -0
  19. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +353 -0
  20. data/ext/v8/upstream/2.3.3/include/v8.h +3616 -0
  21. data/ext/v8/upstream/2.3.3/src/SConscript +330 -0
  22. data/ext/v8/upstream/2.3.3/src/accessors.cc +661 -0
  23. data/ext/v8/upstream/2.3.3/src/accessors.h +114 -0
  24. data/ext/v8/upstream/2.3.3/src/allocation.cc +198 -0
  25. data/ext/v8/upstream/2.3.3/src/allocation.h +169 -0
  26. data/ext/v8/upstream/2.3.3/src/api.cc +4795 -0
  27. data/ext/v8/upstream/2.3.3/src/api.h +485 -0
  28. data/ext/v8/upstream/2.3.3/src/apinatives.js +110 -0
  29. data/ext/v8/upstream/2.3.3/src/apiutils.h +69 -0
  30. data/ext/v8/upstream/2.3.3/src/arguments.h +96 -0
  31. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +305 -0
  32. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +2580 -0
  33. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +1275 -0
  34. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +1320 -0
  35. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +48 -0
  36. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +11398 -0
  37. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +1102 -0
  38. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +154 -0
  39. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +388 -0
  40. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +142 -0
  41. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +309 -0
  42. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +1459 -0
  43. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +241 -0
  44. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +123 -0
  45. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +162 -0
  46. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +3178 -0
  47. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +2258 -0
  48. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +164 -0
  49. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +1892 -0
  50. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +727 -0
  51. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +1261 -0
  52. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +266 -0
  53. data/ext/v8/upstream/2.3.3/src/arm/register-allocator-arm-inl.h +100 -0
  54. data/ext/v8/upstream/2.3.3/src/arm/register-allocator-arm.cc +63 -0
  55. data/ext/v8/upstream/2.3.3/src/arm/register-allocator-arm.h +44 -0
  56. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +2822 -0
  57. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +361 -0
  58. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +2387 -0
  59. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm-inl.h +59 -0
  60. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +834 -0
  61. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +519 -0
  62. data/ext/v8/upstream/2.3.3/src/array.js +1127 -0
  63. data/ext/v8/upstream/2.3.3/src/assembler.cc +801 -0
  64. data/ext/v8/upstream/2.3.3/src/assembler.h +573 -0
  65. data/ext/v8/upstream/2.3.3/src/ast-inl.h +81 -0
  66. data/ext/v8/upstream/2.3.3/src/ast.cc +1152 -0
  67. data/ext/v8/upstream/2.3.3/src/ast.h +2106 -0
  68. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +1819 -0
  69. data/ext/v8/upstream/2.3.3/src/bootstrapper.h +118 -0
  70. data/ext/v8/upstream/2.3.3/src/builtins.cc +1529 -0
  71. data/ext/v8/upstream/2.3.3/src/builtins.h +263 -0
  72. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +104 -0
  73. data/ext/v8/upstream/2.3.3/src/cached-powers.h +119 -0
  74. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +86 -0
  75. data/ext/v8/upstream/2.3.3/src/char-predicates.h +65 -0
  76. data/ext/v8/upstream/2.3.3/src/checks.cc +100 -0
  77. data/ext/v8/upstream/2.3.3/src/checks.h +310 -0
  78. data/ext/v8/upstream/2.3.3/src/circular-queue-inl.h +53 -0
  79. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +121 -0
  80. data/ext/v8/upstream/2.3.3/src/circular-queue.h +103 -0
  81. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +177 -0
  82. data/ext/v8/upstream/2.3.3/src/code-stubs.h +177 -0
  83. data/ext/v8/upstream/2.3.3/src/code.h +68 -0
  84. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +60 -0
  85. data/ext/v8/upstream/2.3.3/src/codegen.cc +516 -0
  86. data/ext/v8/upstream/2.3.3/src/codegen.h +897 -0
  87. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +562 -0
  88. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +102 -0
  89. data/ext/v8/upstream/2.3.3/src/compiler.cc +654 -0
  90. data/ext/v8/upstream/2.3.3/src/compiler.h +299 -0
  91. data/ext/v8/upstream/2.3.3/src/contexts.cc +256 -0
  92. data/ext/v8/upstream/2.3.3/src/contexts.h +342 -0
  93. data/ext/v8/upstream/2.3.3/src/conversions-inl.h +110 -0
  94. data/ext/v8/upstream/2.3.3/src/conversions.cc +1119 -0
  95. data/ext/v8/upstream/2.3.3/src/conversions.h +123 -0
  96. data/ext/v8/upstream/2.3.3/src/counters.cc +78 -0
  97. data/ext/v8/upstream/2.3.3/src/counters.h +239 -0
  98. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +100 -0
  99. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +538 -0
  100. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +285 -0
  101. data/ext/v8/upstream/2.3.3/src/cpu.h +65 -0
  102. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +356 -0
  103. data/ext/v8/upstream/2.3.3/src/d8-debug.h +155 -0
  104. data/ext/v8/upstream/2.3.3/src/d8-posix.cc +693 -0
  105. data/ext/v8/upstream/2.3.3/src/d8-readline.cc +128 -0
  106. data/ext/v8/upstream/2.3.3/src/d8-windows.cc +42 -0
  107. data/ext/v8/upstream/2.3.3/src/d8.cc +783 -0
  108. data/ext/v8/upstream/2.3.3/src/d8.h +227 -0
  109. data/ext/v8/upstream/2.3.3/src/d8.js +1683 -0
  110. data/ext/v8/upstream/2.3.3/src/data-flow.cc +758 -0
  111. data/ext/v8/upstream/2.3.3/src/data-flow.h +278 -0
  112. data/ext/v8/upstream/2.3.3/src/date.js +1059 -0
  113. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +123 -0
  114. data/ext/v8/upstream/2.3.3/src/dateparser.cc +178 -0
  115. data/ext/v8/upstream/2.3.3/src/dateparser.h +244 -0
  116. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +427 -0
  117. data/ext/v8/upstream/2.3.3/src/debug-agent.h +129 -0
  118. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +2227 -0
  119. data/ext/v8/upstream/2.3.3/src/debug.cc +3005 -0
  120. data/ext/v8/upstream/2.3.3/src/debug.h +993 -0
  121. data/ext/v8/upstream/2.3.3/src/disasm.h +77 -0
  122. data/ext/v8/upstream/2.3.3/src/disassembler.cc +312 -0
  123. data/ext/v8/upstream/2.3.3/src/disassembler.h +56 -0
  124. data/ext/v8/upstream/2.3.3/src/diy-fp.cc +58 -0
  125. data/ext/v8/upstream/2.3.3/src/diy-fp.h +117 -0
  126. data/ext/v8/upstream/2.3.3/src/double.h +169 -0
  127. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +92 -0
  128. data/ext/v8/upstream/2.3.3/src/dtoa.cc +77 -0
  129. data/ext/v8/upstream/2.3.3/src/dtoa.h +81 -0
  130. data/ext/v8/upstream/2.3.3/src/execution.cc +809 -0
  131. data/ext/v8/upstream/2.3.3/src/execution.h +336 -0
  132. data/ext/v8/upstream/2.3.3/src/factory.cc +1003 -0
  133. data/ext/v8/upstream/2.3.3/src/factory.h +410 -0
  134. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +746 -0
  135. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +161 -0
  136. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +505 -0
  137. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +58 -0
  138. data/ext/v8/upstream/2.3.3/src/fixed-dtoa.cc +405 -0
  139. data/ext/v8/upstream/2.3.3/src/fixed-dtoa.h +55 -0
  140. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +455 -0
  141. data/ext/v8/upstream/2.3.3/src/flags.cc +551 -0
  142. data/ext/v8/upstream/2.3.3/src/flags.h +81 -0
  143. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +763 -0
  144. data/ext/v8/upstream/2.3.3/src/flow-graph.h +180 -0
  145. data/ext/v8/upstream/2.3.3/src/frame-element.cc +42 -0
  146. data/ext/v8/upstream/2.3.3/src/frame-element.h +273 -0
  147. data/ext/v8/upstream/2.3.3/src/frames-inl.h +217 -0
  148. data/ext/v8/upstream/2.3.3/src/frames.cc +826 -0
  149. data/ext/v8/upstream/2.3.3/src/frames.h +682 -0
  150. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +1443 -0
  151. data/ext/v8/upstream/2.3.3/src/full-codegen.h +548 -0
  152. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +76 -0
  153. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +135 -0
  154. data/ext/v8/upstream/2.3.3/src/global-handles.cc +520 -0
  155. data/ext/v8/upstream/2.3.3/src/global-handles.h +180 -0
  156. data/ext/v8/upstream/2.3.3/src/globals.h +669 -0
  157. data/ext/v8/upstream/2.3.3/src/handles-inl.h +76 -0
  158. data/ext/v8/upstream/2.3.3/src/handles.cc +825 -0
  159. data/ext/v8/upstream/2.3.3/src/handles.h +393 -0
  160. data/ext/v8/upstream/2.3.3/src/hashmap.cc +226 -0
  161. data/ext/v8/upstream/2.3.3/src/hashmap.h +120 -0
  162. data/ext/v8/upstream/2.3.3/src/heap-inl.h +493 -0
  163. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +779 -0
  164. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +323 -0
  165. data/ext/v8/upstream/2.3.3/src/heap.cc +4994 -0
  166. data/ext/v8/upstream/2.3.3/src/heap.h +1984 -0
  167. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +360 -0
  168. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +2600 -0
  169. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +969 -0
  170. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +1261 -0
  171. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32-inl.h +46 -0
  172. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +13968 -0
  173. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +1097 -0
  174. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +83 -0
  175. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +309 -0
  176. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +1471 -0
  177. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +954 -0
  178. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +155 -0
  179. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +115 -0
  180. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +135 -0
  181. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +3281 -0
  182. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +1966 -0
  183. data/ext/v8/upstream/2.3.3/src/ia32/jump-target-ia32.cc +437 -0
  184. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +1610 -0
  185. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +610 -0
  186. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +1247 -0
  187. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +214 -0
  188. data/ext/v8/upstream/2.3.3/src/ia32/register-allocator-ia32-inl.h +82 -0
  189. data/ext/v8/upstream/2.3.3/src/ia32/register-allocator-ia32.cc +157 -0
  190. data/ext/v8/upstream/2.3.3/src/ia32/register-allocator-ia32.h +43 -0
  191. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.cc +30 -0
  192. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +62 -0
  193. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +2750 -0
  194. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +1334 -0
  195. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +627 -0
  196. data/ext/v8/upstream/2.3.3/src/ic-inl.h +120 -0
  197. data/ext/v8/upstream/2.3.3/src/ic.cc +1827 -0
  198. data/ext/v8/upstream/2.3.3/src/ic.h +515 -0
  199. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +646 -0
  200. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.h +48 -0
  201. data/ext/v8/upstream/2.3.3/src/json.js +268 -0
  202. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +5283 -0
  203. data/ext/v8/upstream/2.3.3/src/jsregexp.h +1463 -0
  204. data/ext/v8/upstream/2.3.3/src/jump-target-heavy-inl.h +51 -0
  205. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +429 -0
  206. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +244 -0
  207. data/ext/v8/upstream/2.3.3/src/jump-target-inl.h +48 -0
  208. data/ext/v8/upstream/2.3.3/src/jump-target-light-inl.h +56 -0
  209. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +110 -0
  210. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +192 -0
  211. data/ext/v8/upstream/2.3.3/src/jump-target.cc +91 -0
  212. data/ext/v8/upstream/2.3.3/src/jump-target.h +90 -0
  213. data/ext/v8/upstream/2.3.3/src/list-inl.h +166 -0
  214. data/ext/v8/upstream/2.3.3/src/list.h +159 -0
  215. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +1057 -0
  216. data/ext/v8/upstream/2.3.3/src/liveedit.cc +1480 -0
  217. data/ext/v8/upstream/2.3.3/src/liveedit.h +170 -0
  218. data/ext/v8/upstream/2.3.3/src/log-inl.h +59 -0
  219. data/ext/v8/upstream/2.3.3/src/log-utils.cc +497 -0
  220. data/ext/v8/upstream/2.3.3/src/log-utils.h +289 -0
  221. data/ext/v8/upstream/2.3.3/src/log.cc +1561 -0
  222. data/ext/v8/upstream/2.3.3/src/log.h +384 -0
  223. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +86 -0
  224. data/ext/v8/upstream/2.3.3/src/macros.py +177 -0
  225. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +2330 -0
  226. data/ext/v8/upstream/2.3.3/src/mark-compact.h +451 -0
  227. data/ext/v8/upstream/2.3.3/src/math.js +264 -0
  228. data/ext/v8/upstream/2.3.3/src/memory.h +74 -0
  229. data/ext/v8/upstream/2.3.3/src/messages.cc +183 -0
  230. data/ext/v8/upstream/2.3.3/src/messages.h +113 -0
  231. data/ext/v8/upstream/2.3.3/src/messages.js +982 -0
  232. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips-inl.h +215 -0
  233. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.cc +1219 -0
  234. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +668 -0
  235. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +205 -0
  236. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips-inl.h +70 -0
  237. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.cc +1437 -0
  238. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +434 -0
  239. data/ext/v8/upstream/2.3.3/src/mips/constants-mips.cc +328 -0
  240. data/ext/v8/upstream/2.3.3/src/mips/constants-mips.h +525 -0
  241. data/ext/v8/upstream/2.3.3/src/mips/cpu-mips.cc +73 -0
  242. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +131 -0
  243. data/ext/v8/upstream/2.3.3/src/mips/disasm-mips.cc +787 -0
  244. data/ext/v8/upstream/2.3.3/src/mips/fast-codegen-mips.cc +77 -0
  245. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +102 -0
  246. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.h +164 -0
  247. data/ext/v8/upstream/2.3.3/src/mips/full-codegen-mips.cc +277 -0
  248. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +220 -0
  249. data/ext/v8/upstream/2.3.3/src/mips/jump-target-mips.cc +175 -0
  250. data/ext/v8/upstream/2.3.3/src/mips/macro-assembler-mips.cc +1326 -0
  251. data/ext/v8/upstream/2.3.3/src/mips/macro-assembler-mips.h +461 -0
  252. data/ext/v8/upstream/2.3.3/src/mips/register-allocator-mips-inl.h +137 -0
  253. data/ext/v8/upstream/2.3.3/src/mips/register-allocator-mips.cc +63 -0
  254. data/ext/v8/upstream/2.3.3/src/mips/register-allocator-mips.h +46 -0
  255. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +1651 -0
  256. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +311 -0
  257. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +403 -0
  258. data/ext/v8/upstream/2.3.3/src/mips/virtual-frame-mips.cc +319 -0
  259. data/ext/v8/upstream/2.3.3/src/mips/virtual-frame-mips.h +548 -0
  260. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +2380 -0
  261. data/ext/v8/upstream/2.3.3/src/mksnapshot.cc +256 -0
  262. data/ext/v8/upstream/2.3.3/src/natives.h +63 -0
  263. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +1366 -0
  264. data/ext/v8/upstream/2.3.3/src/objects-inl.h +3333 -0
  265. data/ext/v8/upstream/2.3.3/src/objects.cc +8820 -0
  266. data/ext/v8/upstream/2.3.3/src/objects.h +5373 -0
  267. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +108 -0
  268. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +77 -0
  269. data/ext/v8/upstream/2.3.3/src/parser.cc +5207 -0
  270. data/ext/v8/upstream/2.3.3/src/parser.h +197 -0
  271. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +667 -0
  272. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +862 -0
  273. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +665 -0
  274. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +454 -0
  275. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +622 -0
  276. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +362 -0
  277. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +653 -0
  278. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +1911 -0
  279. data/ext/v8/upstream/2.3.3/src/platform.h +577 -0
  280. data/ext/v8/upstream/2.3.3/src/powers-ten.h +2461 -0
  281. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +1531 -0
  282. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +221 -0
  283. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +148 -0
  284. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +1830 -0
  285. data/ext/v8/upstream/2.3.3/src/profile-generator.h +853 -0
  286. data/ext/v8/upstream/2.3.3/src/property.cc +96 -0
  287. data/ext/v8/upstream/2.3.3/src/property.h +315 -0
  288. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  289. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +464 -0
  290. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +141 -0
  291. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +356 -0
  292. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +103 -0
  293. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +261 -0
  294. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +228 -0
  295. data/ext/v8/upstream/2.3.3/src/regexp-stack.cc +103 -0
  296. data/ext/v8/upstream/2.3.3/src/regexp-stack.h +123 -0
  297. data/ext/v8/upstream/2.3.3/src/regexp.js +549 -0
  298. data/ext/v8/upstream/2.3.3/src/register-allocator-inl.h +141 -0
  299. data/ext/v8/upstream/2.3.3/src/register-allocator.cc +104 -0
  300. data/ext/v8/upstream/2.3.3/src/register-allocator.h +320 -0
  301. data/ext/v8/upstream/2.3.3/src/rewriter.cc +1038 -0
  302. data/ext/v8/upstream/2.3.3/src/rewriter.h +54 -0
  303. data/ext/v8/upstream/2.3.3/src/runtime.cc +10599 -0
  304. data/ext/v8/upstream/2.3.3/src/runtime.h +459 -0
  305. data/ext/v8/upstream/2.3.3/src/runtime.js +629 -0
  306. data/ext/v8/upstream/2.3.3/src/scanner.cc +1346 -0
  307. data/ext/v8/upstream/2.3.3/src/scanner.h +503 -0
  308. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +637 -0
  309. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +233 -0
  310. data/ext/v8/upstream/2.3.3/src/scopes.cc +962 -0
  311. data/ext/v8/upstream/2.3.3/src/scopes.h +400 -0
  312. data/ext/v8/upstream/2.3.3/src/serialize.cc +1461 -0
  313. data/ext/v8/upstream/2.3.3/src/serialize.h +581 -0
  314. data/ext/v8/upstream/2.3.3/src/shell.h +55 -0
  315. data/ext/v8/upstream/2.3.3/src/simulator.h +43 -0
  316. data/ext/v8/upstream/2.3.3/src/smart-pointer.h +109 -0
  317. data/ext/v8/upstream/2.3.3/src/snapshot-common.cc +82 -0
  318. data/ext/v8/upstream/2.3.3/src/snapshot-empty.cc +50 -0
  319. data/ext/v8/upstream/2.3.3/src/snapshot.h +71 -0
  320. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +483 -0
  321. data/ext/v8/upstream/2.3.3/src/spaces.cc +2901 -0
  322. data/ext/v8/upstream/2.3.3/src/spaces.h +2197 -0
  323. data/ext/v8/upstream/2.3.3/src/splay-tree-inl.h +310 -0
  324. data/ext/v8/upstream/2.3.3/src/splay-tree.h +203 -0
  325. data/ext/v8/upstream/2.3.3/src/string-stream.cc +584 -0
  326. data/ext/v8/upstream/2.3.3/src/string-stream.h +189 -0
  327. data/ext/v8/upstream/2.3.3/src/string.js +1006 -0
  328. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +1379 -0
  329. data/ext/v8/upstream/2.3.3/src/stub-cache.h +756 -0
  330. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +15 -0
  331. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +3334 -0
  332. data/ext/v8/upstream/2.3.3/src/third_party/valgrind/valgrind.h +3925 -0
  333. data/ext/v8/upstream/2.3.3/src/token.cc +56 -0
  334. data/ext/v8/upstream/2.3.3/src/token.h +270 -0
  335. data/ext/v8/upstream/2.3.3/src/top.cc +1067 -0
  336. data/ext/v8/upstream/2.3.3/src/top.h +463 -0
  337. data/ext/v8/upstream/2.3.3/src/type-info.cc +53 -0
  338. data/ext/v8/upstream/2.3.3/src/type-info.h +244 -0
  339. data/ext/v8/upstream/2.3.3/src/unbound-queue-inl.h +95 -0
  340. data/ext/v8/upstream/2.3.3/src/unbound-queue.h +67 -0
  341. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +238 -0
  342. data/ext/v8/upstream/2.3.3/src/unicode.cc +749 -0
  343. data/ext/v8/upstream/2.3.3/src/unicode.h +279 -0
  344. data/ext/v8/upstream/2.3.3/src/uri.js +415 -0
  345. data/ext/v8/upstream/2.3.3/src/utils.cc +285 -0
  346. data/ext/v8/upstream/2.3.3/src/utils.h +745 -0
  347. data/ext/v8/upstream/2.3.3/src/v8-counters.cc +55 -0
  348. data/ext/v8/upstream/2.3.3/src/v8-counters.h +250 -0
  349. data/ext/v8/upstream/2.3.3/src/v8.cc +228 -0
  350. data/ext/v8/upstream/2.3.3/src/v8.h +121 -0
  351. data/ext/v8/upstream/2.3.3/src/v8dll-main.cc +39 -0
  352. data/ext/v8/upstream/2.3.3/src/v8natives.js +1188 -0
  353. data/ext/v8/upstream/2.3.3/src/v8threads.cc +461 -0
  354. data/ext/v8/upstream/2.3.3/src/v8threads.h +159 -0
  355. data/ext/v8/upstream/2.3.3/src/variables.cc +119 -0
  356. data/ext/v8/upstream/2.3.3/src/variables.h +205 -0
  357. data/ext/v8/upstream/2.3.3/src/version.cc +88 -0
  358. data/ext/v8/upstream/2.3.3/src/version.h +64 -0
  359. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +192 -0
  360. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy.cc +312 -0
  361. data/ext/v8/upstream/2.3.3/src/virtual-frame-inl.h +39 -0
  362. data/ext/v8/upstream/2.3.3/src/virtual-frame-light-inl.h +170 -0
  363. data/ext/v8/upstream/2.3.3/src/virtual-frame-light.cc +52 -0
  364. data/ext/v8/upstream/2.3.3/src/virtual-frame.cc +49 -0
  365. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +46 -0
  366. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +137 -0
  367. data/ext/v8/upstream/2.3.3/src/vm-state.cc +39 -0
  368. data/ext/v8/upstream/2.3.3/src/vm-state.h +77 -0
  369. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +400 -0
  370. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +2963 -0
  371. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +1438 -0
  372. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +1296 -0
  373. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +46 -0
  374. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +12491 -0
  375. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +1090 -0
  376. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +83 -0
  377. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +267 -0
  378. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +1696 -0
  379. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +250 -0
  380. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +113 -0
  381. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +125 -0
  382. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +3270 -0
  383. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +1907 -0
  384. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +437 -0
  385. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +2793 -0
  386. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +916 -0
  387. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +1374 -0
  388. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +277 -0
  389. data/ext/v8/upstream/2.3.3/src/x64/register-allocator-x64-inl.h +87 -0
  390. data/ext/v8/upstream/2.3.3/src/x64/register-allocator-x64.cc +91 -0
  391. data/ext/v8/upstream/2.3.3/src/x64/register-allocator-x64.h +43 -0
  392. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.cc +27 -0
  393. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +63 -0
  394. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +2560 -0
  395. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +1264 -0
  396. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +590 -0
  397. data/ext/v8/upstream/2.3.3/src/zone-inl.h +82 -0
  398. data/ext/v8/upstream/2.3.3/src/zone.cc +194 -0
  399. data/ext/v8/upstream/2.3.3/src/zone.h +221 -0
  400. data/ext/v8/upstream/2.3.3/tools/codemap.js +270 -0
  401. data/ext/v8/upstream/2.3.3/tools/consarray.js +93 -0
  402. data/ext/v8/upstream/2.3.3/tools/csvparser.js +83 -0
  403. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +317 -0
  404. data/ext/v8/upstream/2.3.3/tools/generate-ten-powers.scm +286 -0
  405. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +749 -0
  406. data/ext/v8/upstream/2.3.3/tools/js2c.py +380 -0
  407. data/ext/v8/upstream/2.3.3/tools/jsmin.py +280 -0
  408. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor +33 -0
  409. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +78 -0
  410. data/ext/v8/upstream/2.3.3/tools/logreader.js +338 -0
  411. data/ext/v8/upstream/2.3.3/tools/mac-nm +18 -0
  412. data/ext/v8/upstream/2.3.3/tools/mac-tick-processor +6 -0
  413. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +7 -0
  414. data/ext/v8/upstream/2.3.3/tools/oprofile/common +19 -0
  415. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +7 -0
  416. data/ext/v8/upstream/2.3.3/tools/oprofile/report +7 -0
  417. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +7 -0
  418. data/ext/v8/upstream/2.3.3/tools/oprofile/run +14 -0
  419. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +7 -0
  420. data/ext/v8/upstream/2.3.3/tools/oprofile/start +7 -0
  421. data/ext/v8/upstream/2.3.3/tools/presubmit.py +299 -0
  422. data/ext/v8/upstream/2.3.3/tools/process-heap-prof.py +120 -0
  423. data/ext/v8/upstream/2.3.3/tools/profile.js +691 -0
  424. data/ext/v8/upstream/2.3.3/tools/profile_view.js +224 -0
  425. data/ext/v8/upstream/2.3.3/tools/run-valgrind.py +77 -0
  426. data/ext/v8/upstream/2.3.3/tools/splaytree.js +322 -0
  427. data/ext/v8/upstream/2.3.3/tools/splaytree.py +226 -0
  428. data/ext/v8/upstream/2.3.3/tools/stats-viewer.py +468 -0
  429. data/ext/v8/upstream/2.3.3/tools/tickprocessor-driver.js +59 -0
  430. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +862 -0
  431. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +571 -0
  432. data/ext/v8/upstream/2.3.3/tools/utils.py +88 -0
  433. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +71 -0
  434. data/ext/v8/upstream/2.3.3/tools/visual_studio/arm.vsprops +14 -0
  435. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +34 -0
  436. data/ext/v8/upstream/2.3.3/tools/visual_studio/d8.vcproj +193 -0
  437. data/ext/v8/upstream/2.3.3/tools/visual_studio/d8_arm.vcproj +193 -0
  438. data/ext/v8/upstream/2.3.3/tools/visual_studio/d8_x64.vcproj +209 -0
  439. data/ext/v8/upstream/2.3.3/tools/visual_studio/d8js2c.cmd +6 -0
  440. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +17 -0
  441. data/ext/v8/upstream/2.3.3/tools/visual_studio/ia32.vsprops +17 -0
  442. data/ext/v8/upstream/2.3.3/tools/visual_studio/js2c.cmd +6 -0
  443. data/ext/v8/upstream/2.3.3/tools/visual_studio/release.vsprops +24 -0
  444. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8.sln +101 -0
  445. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8.vcproj +227 -0
  446. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_arm.sln +74 -0
  447. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_arm.vcproj +227 -0
  448. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +1143 -0
  449. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +1115 -0
  450. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +1096 -0
  451. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_cctest.vcproj +265 -0
  452. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_cctest_arm.vcproj +249 -0
  453. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
  454. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_mksnapshot.vcproj +145 -0
  455. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_mksnapshot_x64.vcproj +145 -0
  456. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_process_sample.vcproj +145 -0
  457. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_process_sample_arm.vcproj +145 -0
  458. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_process_sample_x64.vcproj +161 -0
  459. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +145 -0
  460. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +145 -0
  461. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +161 -0
  462. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_snapshot.vcproj +142 -0
  463. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
  464. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
  465. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
  466. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_x64.sln +101 -0
  467. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_x64.vcproj +227 -0
  468. data/ext/v8/upstream/2.3.3/tools/visual_studio/x64.vsprops +17 -0
  469. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +29 -0
  470. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +137 -0
  471. data/ext/v8/upstream/Makefile +38 -0
  472. data/ext/v8/upstream/build/scons/CHANGES.txt +5183 -0
  473. data/ext/v8/upstream/build/scons/LICENSE.txt +20 -0
  474. data/ext/v8/upstream/build/scons/MANIFEST +202 -0
  475. data/ext/v8/upstream/build/scons/PKG-INFO +13 -0
  476. data/ext/v8/upstream/build/scons/README.txt +273 -0
  477. data/ext/v8/upstream/build/scons/RELEASE.txt +1040 -0
  478. data/ext/v8/upstream/build/scons/build/lib/SCons/Action.py +1256 -0
  479. data/ext/v8/upstream/build/scons/build/lib/SCons/Builder.py +868 -0
  480. data/ext/v8/upstream/build/scons/build/lib/SCons/CacheDir.py +217 -0
  481. data/ext/v8/upstream/build/scons/build/lib/SCons/Conftest.py +794 -0
  482. data/ext/v8/upstream/build/scons/build/lib/SCons/Debug.py +237 -0
  483. data/ext/v8/upstream/build/scons/build/lib/SCons/Defaults.py +485 -0
  484. data/ext/v8/upstream/build/scons/build/lib/SCons/Environment.py +2327 -0
  485. data/ext/v8/upstream/build/scons/build/lib/SCons/Errors.py +207 -0
  486. data/ext/v8/upstream/build/scons/build/lib/SCons/Executor.py +636 -0
  487. data/ext/v8/upstream/build/scons/build/lib/SCons/Job.py +435 -0
  488. data/ext/v8/upstream/build/scons/build/lib/SCons/Memoize.py +292 -0
  489. data/ext/v8/upstream/build/scons/build/lib/SCons/Node/Alias.py +153 -0
  490. data/ext/v8/upstream/build/scons/build/lib/SCons/Node/FS.py +3220 -0
  491. data/ext/v8/upstream/build/scons/build/lib/SCons/Node/Python.py +128 -0
  492. data/ext/v8/upstream/build/scons/build/lib/SCons/Node/__init__.py +1341 -0
  493. data/ext/v8/upstream/build/scons/build/lib/SCons/Options/BoolOption.py +50 -0
  494. data/ext/v8/upstream/build/scons/build/lib/SCons/Options/EnumOption.py +50 -0
  495. data/ext/v8/upstream/build/scons/build/lib/SCons/Options/ListOption.py +50 -0
  496. data/ext/v8/upstream/build/scons/build/lib/SCons/Options/PackageOption.py +50 -0
  497. data/ext/v8/upstream/build/scons/build/lib/SCons/Options/PathOption.py +76 -0
  498. data/ext/v8/upstream/build/scons/build/lib/SCons/Options/__init__.py +74 -0
  499. data/ext/v8/upstream/build/scons/build/lib/SCons/PathList.py +232 -0
  500. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/__init__.py +236 -0
  501. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/aix.py +70 -0
  502. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/cygwin.py +55 -0
  503. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/darwin.py +46 -0
  504. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/hpux.py +46 -0
  505. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/irix.py +44 -0
  506. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/os2.py +58 -0
  507. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/posix.py +264 -0
  508. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/sunos.py +50 -0
  509. data/ext/v8/upstream/build/scons/build/lib/SCons/Platform/win32.py +386 -0
  510. data/ext/v8/upstream/build/scons/build/lib/SCons/SConf.py +1038 -0
  511. data/ext/v8/upstream/build/scons/build/lib/SCons/SConsign.py +381 -0
  512. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/C.py +132 -0
  513. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/D.py +74 -0
  514. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/Dir.py +111 -0
  515. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/Fortran.py +320 -0
  516. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/IDL.py +48 -0
  517. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/LaTeX.py +378 -0
  518. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/Prog.py +103 -0
  519. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/RC.py +55 -0
  520. data/ext/v8/upstream/build/scons/build/lib/SCons/Scanner/__init__.py +415 -0
  521. data/ext/v8/upstream/build/scons/build/lib/SCons/Script/Interactive.py +386 -0
  522. data/ext/v8/upstream/build/scons/build/lib/SCons/Script/Main.py +1360 -0
  523. data/ext/v8/upstream/build/scons/build/lib/SCons/Script/SConsOptions.py +944 -0
  524. data/ext/v8/upstream/build/scons/build/lib/SCons/Script/SConscript.py +642 -0
  525. data/ext/v8/upstream/build/scons/build/lib/SCons/Script/__init__.py +414 -0
  526. data/ext/v8/upstream/build/scons/build/lib/SCons/Sig.py +63 -0
  527. data/ext/v8/upstream/build/scons/build/lib/SCons/Subst.py +911 -0
  528. data/ext/v8/upstream/build/scons/build/lib/SCons/Taskmaster.py +1030 -0
  529. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/386asm.py +61 -0
  530. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/BitKeeper.py +65 -0
  531. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/CVS.py +73 -0
  532. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/FortranCommon.py +247 -0
  533. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/JavaCommon.py +324 -0
  534. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/__init__.py +56 -0
  535. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/arch.py +61 -0
  536. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/common.py +210 -0
  537. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/netframework.py +84 -0
  538. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/sdk.py +321 -0
  539. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/vc.py +367 -0
  540. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/MSCommon/vs.py +497 -0
  541. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/Perforce.py +104 -0
  542. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/PharLapCommon.py +138 -0
  543. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/RCS.py +64 -0
  544. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/SCCS.py +64 -0
  545. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/Subversion.py +71 -0
  546. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/__init__.py +675 -0
  547. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/aixc++.py +82 -0
  548. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/aixcc.py +74 -0
  549. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/aixf77.py +80 -0
  550. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/aixlink.py +76 -0
  551. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/applelink.py +71 -0
  552. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/ar.py +63 -0
  553. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/as.py +78 -0
  554. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/bcc32.py +82 -0
  555. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/c++.py +99 -0
  556. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/cc.py +114 -0
  557. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/cvf.py +58 -0
  558. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/default.py +50 -0
  559. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/dmd.py +224 -0
  560. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/dvi.py +64 -0
  561. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/dvipdf.py +125 -0
  562. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/dvips.py +94 -0
  563. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/f77.py +62 -0
  564. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/f90.py +62 -0
  565. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/f95.py +63 -0
  566. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/filesystem.py +98 -0
  567. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/fortran.py +63 -0
  568. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/g++.py +90 -0
  569. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/g77.py +73 -0
  570. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/gas.py +53 -0
  571. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/gcc.py +80 -0
  572. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/gfortran.py +64 -0
  573. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/gnulink.py +63 -0
  574. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/gs.py +81 -0
  575. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/hpc++.py +85 -0
  576. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/hpcc.py +53 -0
  577. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/hplink.py +77 -0
  578. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/icc.py +59 -0
  579. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/icl.py +52 -0
  580. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/ifl.py +72 -0
  581. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/ifort.py +90 -0
  582. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/ilink.py +59 -0
  583. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/ilink32.py +60 -0
  584. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/install.py +229 -0
  585. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/intelc.py +490 -0
  586. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/ipkg.py +71 -0
  587. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/jar.py +110 -0
  588. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/javac.py +234 -0
  589. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/javah.py +138 -0
  590. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/latex.py +79 -0
  591. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/lex.py +99 -0
  592. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/link.py +121 -0
  593. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/linkloc.py +112 -0
  594. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/m4.py +63 -0
  595. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/masm.py +77 -0
  596. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/midl.py +90 -0
  597. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/mingw.py +159 -0
  598. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/mslib.py +64 -0
  599. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/mslink.py +266 -0
  600. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/mssdk.py +50 -0
  601. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/msvc.py +269 -0
  602. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/msvs.py +1439 -0
  603. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/mwcc.py +208 -0
  604. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/mwld.py +107 -0
  605. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/nasm.py +72 -0
  606. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/__init__.py +314 -0
  607. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/ipk.py +185 -0
  608. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/msi.py +526 -0
  609. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/rpm.py +367 -0
  610. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/src_tarbz2.py +43 -0
  611. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/src_targz.py +43 -0
  612. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/src_zip.py +43 -0
  613. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/tarbz2.py +44 -0
  614. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/targz.py +44 -0
  615. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/packaging/zip.py +44 -0
  616. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/pdf.py +78 -0
  617. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/pdflatex.py +83 -0
  618. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/pdftex.py +108 -0
  619. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/qt.py +336 -0
  620. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/rmic.py +121 -0
  621. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/rpcgen.py +70 -0
  622. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/rpm.py +132 -0
  623. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sgiar.py +68 -0
  624. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sgic++.py +58 -0
  625. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sgicc.py +53 -0
  626. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sgilink.py +63 -0
  627. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sunar.py +67 -0
  628. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sunc++.py +142 -0
  629. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/suncc.py +58 -0
  630. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sunf77.py +63 -0
  631. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sunf90.py +64 -0
  632. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sunf95.py +64 -0
  633. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/sunlink.py +77 -0
  634. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/swig.py +186 -0
  635. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/tar.py +73 -0
  636. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/tex.py +805 -0
  637. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/textfile.py +175 -0
  638. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/tlib.py +53 -0
  639. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/wix.py +100 -0
  640. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/yacc.py +131 -0
  641. data/ext/v8/upstream/build/scons/build/lib/SCons/Tool/zip.py +100 -0
  642. data/ext/v8/upstream/build/scons/build/lib/SCons/Util.py +1645 -0
  643. data/ext/v8/upstream/build/scons/build/lib/SCons/Variables/BoolVariable.py +91 -0
  644. data/ext/v8/upstream/build/scons/build/lib/SCons/Variables/EnumVariable.py +107 -0
  645. data/ext/v8/upstream/build/scons/build/lib/SCons/Variables/ListVariable.py +139 -0
  646. data/ext/v8/upstream/build/scons/build/lib/SCons/Variables/PackageVariable.py +109 -0
  647. data/ext/v8/upstream/build/scons/build/lib/SCons/Variables/PathVariable.py +147 -0
  648. data/ext/v8/upstream/build/scons/build/lib/SCons/Variables/__init__.py +317 -0
  649. data/ext/v8/upstream/build/scons/build/lib/SCons/Warnings.py +228 -0
  650. data/ext/v8/upstream/build/scons/build/lib/SCons/__init__.py +49 -0
  651. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/__init__.py +302 -0
  652. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_UserString.py +98 -0
  653. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_hashlib.py +91 -0
  654. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_itertools.py +124 -0
  655. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_optparse.py +1725 -0
  656. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_sets.py +583 -0
  657. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_sets15.py +176 -0
  658. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_shlex.py +325 -0
  659. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_subprocess.py +1296 -0
  660. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/_scons_textwrap.py +382 -0
  661. data/ext/v8/upstream/build/scons/build/lib/SCons/compat/builtins.py +187 -0
  662. data/ext/v8/upstream/build/scons/build/lib/SCons/cpp.py +598 -0
  663. data/ext/v8/upstream/build/scons/build/lib/SCons/dblite.py +248 -0
  664. data/ext/v8/upstream/build/scons/build/lib/SCons/exitfuncs.py +77 -0
  665. data/ext/v8/upstream/build/scons/build/scripts/scons +184 -0
  666. data/ext/v8/upstream/build/scons/build/scripts/scons-time +1529 -0
  667. data/ext/v8/upstream/build/scons/build/scripts/scons.bat +31 -0
  668. data/ext/v8/upstream/build/scons/build/scripts/sconsign +508 -0
  669. data/ext/v8/upstream/build/scons/engine/SCons/Action.py +1256 -0
  670. data/ext/v8/upstream/build/scons/engine/SCons/Builder.py +868 -0
  671. data/ext/v8/upstream/build/scons/engine/SCons/CacheDir.py +217 -0
  672. data/ext/v8/upstream/build/scons/engine/SCons/Conftest.py +794 -0
  673. data/ext/v8/upstream/build/scons/engine/SCons/Debug.py +237 -0
  674. data/ext/v8/upstream/build/scons/engine/SCons/Defaults.py +485 -0
  675. data/ext/v8/upstream/build/scons/engine/SCons/Environment.py +2327 -0
  676. data/ext/v8/upstream/build/scons/engine/SCons/Errors.py +207 -0
  677. data/ext/v8/upstream/build/scons/engine/SCons/Executor.py +636 -0
  678. data/ext/v8/upstream/build/scons/engine/SCons/Job.py +435 -0
  679. data/ext/v8/upstream/build/scons/engine/SCons/Memoize.py +292 -0
  680. data/ext/v8/upstream/build/scons/engine/SCons/Node/Alias.py +153 -0
  681. data/ext/v8/upstream/build/scons/engine/SCons/Node/FS.py +3220 -0
  682. data/ext/v8/upstream/build/scons/engine/SCons/Node/Python.py +128 -0
  683. data/ext/v8/upstream/build/scons/engine/SCons/Node/__init__.py +1341 -0
  684. data/ext/v8/upstream/build/scons/engine/SCons/Options/BoolOption.py +50 -0
  685. data/ext/v8/upstream/build/scons/engine/SCons/Options/EnumOption.py +50 -0
  686. data/ext/v8/upstream/build/scons/engine/SCons/Options/ListOption.py +50 -0
  687. data/ext/v8/upstream/build/scons/engine/SCons/Options/PackageOption.py +50 -0
  688. data/ext/v8/upstream/build/scons/engine/SCons/Options/PathOption.py +76 -0
  689. data/ext/v8/upstream/build/scons/engine/SCons/Options/__init__.py +74 -0
  690. data/ext/v8/upstream/build/scons/engine/SCons/PathList.py +232 -0
  691. data/ext/v8/upstream/build/scons/engine/SCons/Platform/__init__.py +236 -0
  692. data/ext/v8/upstream/build/scons/engine/SCons/Platform/aix.py +70 -0
  693. data/ext/v8/upstream/build/scons/engine/SCons/Platform/cygwin.py +55 -0
  694. data/ext/v8/upstream/build/scons/engine/SCons/Platform/darwin.py +46 -0
  695. data/ext/v8/upstream/build/scons/engine/SCons/Platform/hpux.py +46 -0
  696. data/ext/v8/upstream/build/scons/engine/SCons/Platform/irix.py +44 -0
  697. data/ext/v8/upstream/build/scons/engine/SCons/Platform/os2.py +58 -0
  698. data/ext/v8/upstream/build/scons/engine/SCons/Platform/posix.py +264 -0
  699. data/ext/v8/upstream/build/scons/engine/SCons/Platform/sunos.py +50 -0
  700. data/ext/v8/upstream/build/scons/engine/SCons/Platform/win32.py +386 -0
  701. data/ext/v8/upstream/build/scons/engine/SCons/SConf.py +1038 -0
  702. data/ext/v8/upstream/build/scons/engine/SCons/SConsign.py +381 -0
  703. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/C.py +132 -0
  704. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/D.py +74 -0
  705. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/Dir.py +111 -0
  706. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/Fortran.py +320 -0
  707. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/IDL.py +48 -0
  708. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/LaTeX.py +378 -0
  709. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/Prog.py +103 -0
  710. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/RC.py +55 -0
  711. data/ext/v8/upstream/build/scons/engine/SCons/Scanner/__init__.py +415 -0
  712. data/ext/v8/upstream/build/scons/engine/SCons/Script/Interactive.py +386 -0
  713. data/ext/v8/upstream/build/scons/engine/SCons/Script/Main.py +1360 -0
  714. data/ext/v8/upstream/build/scons/engine/SCons/Script/SConsOptions.py +944 -0
  715. data/ext/v8/upstream/build/scons/engine/SCons/Script/SConscript.py +642 -0
  716. data/ext/v8/upstream/build/scons/engine/SCons/Script/__init__.py +414 -0
  717. data/ext/v8/upstream/build/scons/engine/SCons/Sig.py +63 -0
  718. data/ext/v8/upstream/build/scons/engine/SCons/Subst.py +911 -0
  719. data/ext/v8/upstream/build/scons/engine/SCons/Taskmaster.py +1030 -0
  720. data/ext/v8/upstream/build/scons/engine/SCons/Tool/386asm.py +61 -0
  721. data/ext/v8/upstream/build/scons/engine/SCons/Tool/BitKeeper.py +65 -0
  722. data/ext/v8/upstream/build/scons/engine/SCons/Tool/CVS.py +73 -0
  723. data/ext/v8/upstream/build/scons/engine/SCons/Tool/FortranCommon.py +247 -0
  724. data/ext/v8/upstream/build/scons/engine/SCons/Tool/JavaCommon.py +324 -0
  725. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  726. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  727. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
  728. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
  729. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
  730. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
  731. data/ext/v8/upstream/build/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
  732. data/ext/v8/upstream/build/scons/engine/SCons/Tool/Perforce.py +104 -0
  733. data/ext/v8/upstream/build/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
  734. data/ext/v8/upstream/build/scons/engine/SCons/Tool/RCS.py +64 -0
  735. data/ext/v8/upstream/build/scons/engine/SCons/Tool/SCCS.py +64 -0
  736. data/ext/v8/upstream/build/scons/engine/SCons/Tool/Subversion.py +71 -0
  737. data/ext/v8/upstream/build/scons/engine/SCons/Tool/__init__.py +675 -0
  738. data/ext/v8/upstream/build/scons/engine/SCons/Tool/aixc++.py +82 -0
  739. data/ext/v8/upstream/build/scons/engine/SCons/Tool/aixcc.py +74 -0
  740. data/ext/v8/upstream/build/scons/engine/SCons/Tool/aixf77.py +80 -0
  741. data/ext/v8/upstream/build/scons/engine/SCons/Tool/aixlink.py +76 -0
  742. data/ext/v8/upstream/build/scons/engine/SCons/Tool/applelink.py +71 -0
  743. data/ext/v8/upstream/build/scons/engine/SCons/Tool/ar.py +63 -0
  744. data/ext/v8/upstream/build/scons/engine/SCons/Tool/as.py +78 -0
  745. data/ext/v8/upstream/build/scons/engine/SCons/Tool/bcc32.py +82 -0
  746. data/ext/v8/upstream/build/scons/engine/SCons/Tool/c++.py +99 -0
  747. data/ext/v8/upstream/build/scons/engine/SCons/Tool/cc.py +114 -0
  748. data/ext/v8/upstream/build/scons/engine/SCons/Tool/cvf.py +58 -0
  749. data/ext/v8/upstream/build/scons/engine/SCons/Tool/default.py +50 -0
  750. data/ext/v8/upstream/build/scons/engine/SCons/Tool/dmd.py +224 -0
  751. data/ext/v8/upstream/build/scons/engine/SCons/Tool/dvi.py +64 -0
  752. data/ext/v8/upstream/build/scons/engine/SCons/Tool/dvipdf.py +125 -0
  753. data/ext/v8/upstream/build/scons/engine/SCons/Tool/dvips.py +94 -0
  754. data/ext/v8/upstream/build/scons/engine/SCons/Tool/f77.py +62 -0
  755. data/ext/v8/upstream/build/scons/engine/SCons/Tool/f90.py +62 -0
  756. data/ext/v8/upstream/build/scons/engine/SCons/Tool/f95.py +63 -0
  757. data/ext/v8/upstream/build/scons/engine/SCons/Tool/filesystem.py +98 -0
  758. data/ext/v8/upstream/build/scons/engine/SCons/Tool/fortran.py +63 -0
  759. data/ext/v8/upstream/build/scons/engine/SCons/Tool/g++.py +90 -0
  760. data/ext/v8/upstream/build/scons/engine/SCons/Tool/g77.py +73 -0
  761. data/ext/v8/upstream/build/scons/engine/SCons/Tool/gas.py +53 -0
  762. data/ext/v8/upstream/build/scons/engine/SCons/Tool/gcc.py +80 -0
  763. data/ext/v8/upstream/build/scons/engine/SCons/Tool/gfortran.py +64 -0
  764. data/ext/v8/upstream/build/scons/engine/SCons/Tool/gnulink.py +63 -0
  765. data/ext/v8/upstream/build/scons/engine/SCons/Tool/gs.py +81 -0
  766. data/ext/v8/upstream/build/scons/engine/SCons/Tool/hpc++.py +85 -0
  767. data/ext/v8/upstream/build/scons/engine/SCons/Tool/hpcc.py +53 -0
  768. data/ext/v8/upstream/build/scons/engine/SCons/Tool/hplink.py +77 -0
  769. data/ext/v8/upstream/build/scons/engine/SCons/Tool/icc.py +59 -0
  770. data/ext/v8/upstream/build/scons/engine/SCons/Tool/icl.py +52 -0
  771. data/ext/v8/upstream/build/scons/engine/SCons/Tool/ifl.py +72 -0
  772. data/ext/v8/upstream/build/scons/engine/SCons/Tool/ifort.py +90 -0
  773. data/ext/v8/upstream/build/scons/engine/SCons/Tool/ilink.py +59 -0
  774. data/ext/v8/upstream/build/scons/engine/SCons/Tool/ilink32.py +60 -0
  775. data/ext/v8/upstream/build/scons/engine/SCons/Tool/install.py +229 -0
  776. data/ext/v8/upstream/build/scons/engine/SCons/Tool/intelc.py +490 -0
  777. data/ext/v8/upstream/build/scons/engine/SCons/Tool/ipkg.py +71 -0
  778. data/ext/v8/upstream/build/scons/engine/SCons/Tool/jar.py +110 -0
  779. data/ext/v8/upstream/build/scons/engine/SCons/Tool/javac.py +234 -0
  780. data/ext/v8/upstream/build/scons/engine/SCons/Tool/javah.py +138 -0
  781. data/ext/v8/upstream/build/scons/engine/SCons/Tool/latex.py +79 -0
  782. data/ext/v8/upstream/build/scons/engine/SCons/Tool/lex.py +99 -0
  783. data/ext/v8/upstream/build/scons/engine/SCons/Tool/link.py +121 -0
  784. data/ext/v8/upstream/build/scons/engine/SCons/Tool/linkloc.py +112 -0
  785. data/ext/v8/upstream/build/scons/engine/SCons/Tool/m4.py +63 -0
  786. data/ext/v8/upstream/build/scons/engine/SCons/Tool/masm.py +77 -0
  787. data/ext/v8/upstream/build/scons/engine/SCons/Tool/midl.py +90 -0
  788. data/ext/v8/upstream/build/scons/engine/SCons/Tool/mingw.py +159 -0
  789. data/ext/v8/upstream/build/scons/engine/SCons/Tool/mslib.py +64 -0
  790. data/ext/v8/upstream/build/scons/engine/SCons/Tool/mslink.py +266 -0
  791. data/ext/v8/upstream/build/scons/engine/SCons/Tool/mssdk.py +50 -0
  792. data/ext/v8/upstream/build/scons/engine/SCons/Tool/msvc.py +269 -0
  793. data/ext/v8/upstream/build/scons/engine/SCons/Tool/msvs.py +1439 -0
  794. data/ext/v8/upstream/build/scons/engine/SCons/Tool/mwcc.py +208 -0
  795. data/ext/v8/upstream/build/scons/engine/SCons/Tool/mwld.py +107 -0
  796. data/ext/v8/upstream/build/scons/engine/SCons/Tool/nasm.py +72 -0
  797. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
  798. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  799. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/msi.py +526 -0
  800. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
  801. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  802. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  803. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  804. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  805. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  806. data/ext/v8/upstream/build/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  807. data/ext/v8/upstream/build/scons/engine/SCons/Tool/pdf.py +78 -0
  808. data/ext/v8/upstream/build/scons/engine/SCons/Tool/pdflatex.py +83 -0
  809. data/ext/v8/upstream/build/scons/engine/SCons/Tool/pdftex.py +108 -0
  810. data/ext/v8/upstream/build/scons/engine/SCons/Tool/qt.py +336 -0
  811. data/ext/v8/upstream/build/scons/engine/SCons/Tool/rmic.py +121 -0
  812. data/ext/v8/upstream/build/scons/engine/SCons/Tool/rpcgen.py +70 -0
  813. data/ext/v8/upstream/build/scons/engine/SCons/Tool/rpm.py +132 -0
  814. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sgiar.py +68 -0
  815. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sgic++.py +58 -0
  816. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sgicc.py +53 -0
  817. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sgilink.py +63 -0
  818. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sunar.py +67 -0
  819. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sunc++.py +142 -0
  820. data/ext/v8/upstream/build/scons/engine/SCons/Tool/suncc.py +58 -0
  821. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sunf77.py +63 -0
  822. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sunf90.py +64 -0
  823. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sunf95.py +64 -0
  824. data/ext/v8/upstream/build/scons/engine/SCons/Tool/sunlink.py +77 -0
  825. data/ext/v8/upstream/build/scons/engine/SCons/Tool/swig.py +186 -0
  826. data/ext/v8/upstream/build/scons/engine/SCons/Tool/tar.py +73 -0
  827. data/ext/v8/upstream/build/scons/engine/SCons/Tool/tex.py +805 -0
  828. data/ext/v8/upstream/build/scons/engine/SCons/Tool/textfile.py +175 -0
  829. data/ext/v8/upstream/build/scons/engine/SCons/Tool/tlib.py +53 -0
  830. data/ext/v8/upstream/build/scons/engine/SCons/Tool/wix.py +100 -0
  831. data/ext/v8/upstream/build/scons/engine/SCons/Tool/yacc.py +131 -0
  832. data/ext/v8/upstream/build/scons/engine/SCons/Tool/zip.py +100 -0
  833. data/ext/v8/upstream/build/scons/engine/SCons/Util.py +1645 -0
  834. data/ext/v8/upstream/build/scons/engine/SCons/Variables/BoolVariable.py +91 -0
  835. data/ext/v8/upstream/build/scons/engine/SCons/Variables/EnumVariable.py +107 -0
  836. data/ext/v8/upstream/build/scons/engine/SCons/Variables/ListVariable.py +139 -0
  837. data/ext/v8/upstream/build/scons/engine/SCons/Variables/PackageVariable.py +109 -0
  838. data/ext/v8/upstream/build/scons/engine/SCons/Variables/PathVariable.py +147 -0
  839. data/ext/v8/upstream/build/scons/engine/SCons/Variables/__init__.py +317 -0
  840. data/ext/v8/upstream/build/scons/engine/SCons/Warnings.py +228 -0
  841. data/ext/v8/upstream/build/scons/engine/SCons/__init__.py +49 -0
  842. data/ext/v8/upstream/build/scons/engine/SCons/compat/__init__.py +302 -0
  843. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_UserString.py +98 -0
  844. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
  845. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_itertools.py +124 -0
  846. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
  847. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_sets.py +583 -0
  848. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_sets15.py +176 -0
  849. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_shlex.py +325 -0
  850. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
  851. data/ext/v8/upstream/build/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
  852. data/ext/v8/upstream/build/scons/engine/SCons/compat/builtins.py +187 -0
  853. data/ext/v8/upstream/build/scons/engine/SCons/cpp.py +598 -0
  854. data/ext/v8/upstream/build/scons/engine/SCons/dblite.py +248 -0
  855. data/ext/v8/upstream/build/scons/engine/SCons/exitfuncs.py +77 -0
  856. data/ext/v8/upstream/build/scons/install/bin/scons +184 -0
  857. data/ext/v8/upstream/build/scons/install/bin/scons-1.2.0.d20100117 +184 -0
  858. data/ext/v8/upstream/build/scons/install/bin/scons-time +1529 -0
  859. data/ext/v8/upstream/build/scons/install/bin/scons-time-1.2.0.d20100117 +1529 -0
  860. data/ext/v8/upstream/build/scons/install/bin/sconsign +508 -0
  861. data/ext/v8/upstream/build/scons/install/bin/sconsign-1.2.0.d20100117 +508 -0
  862. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Action.py +1256 -0
  863. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Action.pyc +0 -0
  864. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Builder.py +868 -0
  865. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Builder.pyc +0 -0
  866. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/CacheDir.py +217 -0
  867. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/CacheDir.pyc +0 -0
  868. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Conftest.py +794 -0
  869. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Conftest.pyc +0 -0
  870. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Debug.py +237 -0
  871. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Debug.pyc +0 -0
  872. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Defaults.py +485 -0
  873. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Defaults.pyc +0 -0
  874. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Environment.py +2327 -0
  875. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Environment.pyc +0 -0
  876. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Errors.py +207 -0
  877. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Errors.pyc +0 -0
  878. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Executor.py +636 -0
  879. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Executor.pyc +0 -0
  880. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Job.py +435 -0
  881. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Job.pyc +0 -0
  882. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Memoize.py +292 -0
  883. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Memoize.pyc +0 -0
  884. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/Alias.py +153 -0
  885. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/Alias.pyc +0 -0
  886. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/FS.py +3220 -0
  887. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/FS.pyc +0 -0
  888. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/Python.py +128 -0
  889. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/Python.pyc +0 -0
  890. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/__init__.py +1341 -0
  891. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Node/__init__.pyc +0 -0
  892. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/BoolOption.py +50 -0
  893. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/BoolOption.pyc +0 -0
  894. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/EnumOption.py +50 -0
  895. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/EnumOption.pyc +0 -0
  896. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/ListOption.py +50 -0
  897. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/ListOption.pyc +0 -0
  898. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/PackageOption.py +50 -0
  899. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/PackageOption.pyc +0 -0
  900. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/PathOption.py +76 -0
  901. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/PathOption.pyc +0 -0
  902. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/__init__.py +74 -0
  903. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Options/__init__.pyc +0 -0
  904. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/PathList.py +232 -0
  905. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/PathList.pyc +0 -0
  906. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/__init__.py +236 -0
  907. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/__init__.pyc +0 -0
  908. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/aix.py +70 -0
  909. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/aix.pyc +0 -0
  910. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/cygwin.py +55 -0
  911. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/cygwin.pyc +0 -0
  912. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/darwin.py +46 -0
  913. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/darwin.pyc +0 -0
  914. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/hpux.py +46 -0
  915. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/hpux.pyc +0 -0
  916. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/irix.py +44 -0
  917. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/irix.pyc +0 -0
  918. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/os2.py +58 -0
  919. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/os2.pyc +0 -0
  920. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/posix.py +264 -0
  921. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/posix.pyc +0 -0
  922. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/sunos.py +50 -0
  923. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/sunos.pyc +0 -0
  924. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/win32.py +386 -0
  925. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Platform/win32.pyc +0 -0
  926. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/SConf.py +1038 -0
  927. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/SConf.pyc +0 -0
  928. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/SConsign.py +381 -0
  929. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/SConsign.pyc +0 -0
  930. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/C.py +132 -0
  931. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/C.pyc +0 -0
  932. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/D.py +74 -0
  933. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/D.pyc +0 -0
  934. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/Dir.py +111 -0
  935. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/Dir.pyc +0 -0
  936. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/Fortran.py +320 -0
  937. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/Fortran.pyc +0 -0
  938. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/IDL.py +48 -0
  939. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/IDL.pyc +0 -0
  940. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/LaTeX.py +378 -0
  941. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/LaTeX.pyc +0 -0
  942. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/Prog.py +103 -0
  943. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/Prog.pyc +0 -0
  944. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/RC.py +55 -0
  945. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/RC.pyc +0 -0
  946. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/__init__.py +415 -0
  947. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Scanner/__init__.pyc +0 -0
  948. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/Interactive.py +386 -0
  949. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/Interactive.pyc +0 -0
  950. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/Main.py +1360 -0
  951. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/Main.pyc +0 -0
  952. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/SConsOptions.py +944 -0
  953. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/SConsOptions.pyc +0 -0
  954. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/SConscript.py +642 -0
  955. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/SConscript.pyc +0 -0
  956. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/__init__.py +414 -0
  957. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Script/__init__.pyc +0 -0
  958. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Sig.py +63 -0
  959. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Sig.pyc +0 -0
  960. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Subst.py +911 -0
  961. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Subst.pyc +0 -0
  962. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Taskmaster.py +1030 -0
  963. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Taskmaster.pyc +0 -0
  964. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/386asm.py +61 -0
  965. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/386asm.pyc +0 -0
  966. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/BitKeeper.py +65 -0
  967. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/BitKeeper.pyc +0 -0
  968. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/CVS.py +73 -0
  969. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/CVS.pyc +0 -0
  970. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/FortranCommon.py +247 -0
  971. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/FortranCommon.pyc +0 -0
  972. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/JavaCommon.py +324 -0
  973. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/JavaCommon.pyc +0 -0
  974. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/__init__.py +56 -0
  975. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/__init__.pyc +0 -0
  976. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/arch.py +61 -0
  977. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/arch.pyc +0 -0
  978. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/common.py +210 -0
  979. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/common.pyc +0 -0
  980. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/netframework.py +84 -0
  981. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/netframework.pyc +0 -0
  982. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/sdk.py +321 -0
  983. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/sdk.pyc +0 -0
  984. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/vc.py +367 -0
  985. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/vc.pyc +0 -0
  986. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/vs.py +497 -0
  987. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/MSCommon/vs.pyc +0 -0
  988. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/Perforce.py +104 -0
  989. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/Perforce.pyc +0 -0
  990. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/PharLapCommon.py +138 -0
  991. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/PharLapCommon.pyc +0 -0
  992. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/RCS.py +64 -0
  993. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/RCS.pyc +0 -0
  994. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/SCCS.py +64 -0
  995. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/SCCS.pyc +0 -0
  996. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/Subversion.py +71 -0
  997. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/Subversion.pyc +0 -0
  998. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/__init__.py +675 -0
  999. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/__init__.pyc +0 -0
  1000. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixc++.py +82 -0
  1001. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixc++.pyc +0 -0
  1002. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixcc.py +74 -0
  1003. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixcc.pyc +0 -0
  1004. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixf77.py +80 -0
  1005. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixf77.pyc +0 -0
  1006. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixlink.py +76 -0
  1007. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/aixlink.pyc +0 -0
  1008. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/applelink.py +71 -0
  1009. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/applelink.pyc +0 -0
  1010. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ar.py +63 -0
  1011. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ar.pyc +0 -0
  1012. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/as.py +78 -0
  1013. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/as.pyc +0 -0
  1014. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/bcc32.py +82 -0
  1015. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/bcc32.pyc +0 -0
  1016. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/c++.py +99 -0
  1017. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/c++.pyc +0 -0
  1018. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/cc.py +114 -0
  1019. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/cc.pyc +0 -0
  1020. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/cvf.py +58 -0
  1021. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/cvf.pyc +0 -0
  1022. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/default.py +50 -0
  1023. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/default.pyc +0 -0
  1024. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dmd.py +224 -0
  1025. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dmd.pyc +0 -0
  1026. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dvi.py +64 -0
  1027. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dvi.pyc +0 -0
  1028. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dvipdf.py +125 -0
  1029. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dvipdf.pyc +0 -0
  1030. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dvips.py +94 -0
  1031. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/dvips.pyc +0 -0
  1032. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/f77.py +62 -0
  1033. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/f77.pyc +0 -0
  1034. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/f90.py +62 -0
  1035. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/f90.pyc +0 -0
  1036. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/f95.py +63 -0
  1037. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/f95.pyc +0 -0
  1038. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/filesystem.py +98 -0
  1039. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/filesystem.pyc +0 -0
  1040. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/fortran.py +63 -0
  1041. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/fortran.pyc +0 -0
  1042. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/g++.py +90 -0
  1043. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/g++.pyc +0 -0
  1044. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/g77.py +73 -0
  1045. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/g77.pyc +0 -0
  1046. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gas.py +53 -0
  1047. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gas.pyc +0 -0
  1048. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gcc.py +80 -0
  1049. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gcc.pyc +0 -0
  1050. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gfortran.py +64 -0
  1051. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gfortran.pyc +0 -0
  1052. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gnulink.py +63 -0
  1053. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gnulink.pyc +0 -0
  1054. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gs.py +81 -0
  1055. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/gs.pyc +0 -0
  1056. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/hpc++.py +85 -0
  1057. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/hpc++.pyc +0 -0
  1058. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/hpcc.py +53 -0
  1059. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/hpcc.pyc +0 -0
  1060. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/hplink.py +77 -0
  1061. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/hplink.pyc +0 -0
  1062. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/icc.py +59 -0
  1063. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/icc.pyc +0 -0
  1064. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/icl.py +52 -0
  1065. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/icl.pyc +0 -0
  1066. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ifl.py +72 -0
  1067. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ifl.pyc +0 -0
  1068. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ifort.py +90 -0
  1069. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ifort.pyc +0 -0
  1070. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ilink.py +59 -0
  1071. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ilink.pyc +0 -0
  1072. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ilink32.py +60 -0
  1073. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ilink32.pyc +0 -0
  1074. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/install.py +229 -0
  1075. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/install.pyc +0 -0
  1076. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/intelc.py +490 -0
  1077. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/intelc.pyc +0 -0
  1078. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ipkg.py +71 -0
  1079. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/ipkg.pyc +0 -0
  1080. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/jar.py +110 -0
  1081. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/jar.pyc +0 -0
  1082. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/javac.py +234 -0
  1083. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/javac.pyc +0 -0
  1084. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/javah.py +138 -0
  1085. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/javah.pyc +0 -0
  1086. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/latex.py +79 -0
  1087. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/latex.pyc +0 -0
  1088. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/lex.py +99 -0
  1089. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/lex.pyc +0 -0
  1090. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/link.py +121 -0
  1091. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/link.pyc +0 -0
  1092. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/linkloc.py +112 -0
  1093. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/linkloc.pyc +0 -0
  1094. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/m4.py +63 -0
  1095. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/m4.pyc +0 -0
  1096. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/masm.py +77 -0
  1097. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/masm.pyc +0 -0
  1098. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/midl.py +90 -0
  1099. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/midl.pyc +0 -0
  1100. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mingw.py +159 -0
  1101. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mingw.pyc +0 -0
  1102. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mslib.py +64 -0
  1103. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mslib.pyc +0 -0
  1104. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mslink.py +266 -0
  1105. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mslink.pyc +0 -0
  1106. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mssdk.py +50 -0
  1107. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mssdk.pyc +0 -0
  1108. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.py +269 -0
  1109. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pyc +0 -0
  1110. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/msvs.py +1439 -0
  1111. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/msvs.pyc +0 -0
  1112. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mwcc.py +208 -0
  1113. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mwcc.pyc +0 -0
  1114. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mwld.py +107 -0
  1115. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/mwld.pyc +0 -0
  1116. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/nasm.py +72 -0
  1117. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/nasm.pyc +0 -0
  1118. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/__init__.py +314 -0
  1119. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/__init__.pyc +0 -0
  1120. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/ipk.py +185 -0
  1121. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/ipk.pyc +0 -0
  1122. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/msi.py +526 -0
  1123. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/msi.pyc +0 -0
  1124. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/rpm.py +367 -0
  1125. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/rpm.pyc +0 -0
  1126. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/src_tarbz2.py +43 -0
  1127. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/src_tarbz2.pyc +0 -0
  1128. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/src_targz.py +43 -0
  1129. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/src_targz.pyc +0 -0
  1130. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/src_zip.py +43 -0
  1131. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/src_zip.pyc +0 -0
  1132. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/tarbz2.py +44 -0
  1133. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/tarbz2.pyc +0 -0
  1134. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/targz.py +44 -0
  1135. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/targz.pyc +0 -0
  1136. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/zip.py +44 -0
  1137. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/packaging/zip.pyc +0 -0
  1138. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/pdf.py +78 -0
  1139. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/pdf.pyc +0 -0
  1140. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/pdflatex.py +83 -0
  1141. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/pdflatex.pyc +0 -0
  1142. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/pdftex.py +108 -0
  1143. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/pdftex.pyc +0 -0
  1144. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/qt.py +336 -0
  1145. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/qt.pyc +0 -0
  1146. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/rmic.py +121 -0
  1147. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/rmic.pyc +0 -0
  1148. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/rpcgen.py +70 -0
  1149. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/rpcgen.pyc +0 -0
  1150. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/rpm.py +132 -0
  1151. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/rpm.pyc +0 -0
  1152. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgiar.py +68 -0
  1153. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgiar.pyc +0 -0
  1154. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgic++.py +58 -0
  1155. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgic++.pyc +0 -0
  1156. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgicc.py +53 -0
  1157. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgicc.pyc +0 -0
  1158. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgilink.py +63 -0
  1159. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sgilink.pyc +0 -0
  1160. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunar.py +67 -0
  1161. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunar.pyc +0 -0
  1162. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunc++.py +142 -0
  1163. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunc++.pyc +0 -0
  1164. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/suncc.py +58 -0
  1165. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/suncc.pyc +0 -0
  1166. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunf77.py +63 -0
  1167. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunf77.pyc +0 -0
  1168. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunf90.py +64 -0
  1169. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunf90.pyc +0 -0
  1170. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunf95.py +64 -0
  1171. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunf95.pyc +0 -0
  1172. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunlink.py +77 -0
  1173. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/sunlink.pyc +0 -0
  1174. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/swig.py +186 -0
  1175. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/swig.pyc +0 -0
  1176. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/tar.py +73 -0
  1177. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/tar.pyc +0 -0
  1178. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/tex.py +805 -0
  1179. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/tex.pyc +0 -0
  1180. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/textfile.py +175 -0
  1181. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/textfile.pyc +0 -0
  1182. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/tlib.py +53 -0
  1183. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/tlib.pyc +0 -0
  1184. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/wix.py +100 -0
  1185. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/wix.pyc +0 -0
  1186. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/yacc.py +131 -0
  1187. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/yacc.pyc +0 -0
  1188. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/zip.py +100 -0
  1189. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Tool/zip.pyc +0 -0
  1190. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Util.py +1645 -0
  1191. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Util.pyc +0 -0
  1192. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/BoolVariable.py +91 -0
  1193. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/BoolVariable.pyc +0 -0
  1194. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/EnumVariable.py +107 -0
  1195. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/EnumVariable.pyc +0 -0
  1196. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/ListVariable.py +139 -0
  1197. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/ListVariable.pyc +0 -0
  1198. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/PackageVariable.py +109 -0
  1199. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/PackageVariable.pyc +0 -0
  1200. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/PathVariable.py +147 -0
  1201. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/PathVariable.pyc +0 -0
  1202. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.py +317 -0
  1203. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Variables/__init__.pyc +0 -0
  1204. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Warnings.py +228 -0
  1205. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/Warnings.pyc +0 -0
  1206. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/__init__.py +49 -0
  1207. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/__init__.pyc +0 -0
  1208. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/__init__.py +302 -0
  1209. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/__init__.pyc +0 -0
  1210. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_UserString.py +98 -0
  1211. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_UserString.pyc +0 -0
  1212. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_hashlib.py +91 -0
  1213. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_hashlib.pyc +0 -0
  1214. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_itertools.py +124 -0
  1215. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_itertools.pyc +0 -0
  1216. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.py +1725 -0
  1217. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_optparse.pyc +0 -0
  1218. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_sets.py +583 -0
  1219. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_sets.pyc +0 -0
  1220. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_sets15.py +176 -0
  1221. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_sets15.pyc +0 -0
  1222. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_shlex.py +325 -0
  1223. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_shlex.pyc +0 -0
  1224. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_subprocess.py +1296 -0
  1225. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_subprocess.pyc +0 -0
  1226. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_textwrap.py +382 -0
  1227. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/_scons_textwrap.pyc +0 -0
  1228. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/builtins.py +187 -0
  1229. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/compat/builtins.pyc +0 -0
  1230. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/cpp.py +598 -0
  1231. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/cpp.pyc +0 -0
  1232. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/dblite.py +248 -0
  1233. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/dblite.pyc +0 -0
  1234. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/exitfuncs.py +77 -0
  1235. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/SCons/exitfuncs.pyc +0 -0
  1236. data/ext/v8/upstream/build/scons/install/lib/scons-1.2.0.d20100117/scons-1.2.0.d20100117.egg-info +13 -0
  1237. data/ext/v8/upstream/build/scons/install/man/man1/scons-time.1 +1017 -0
  1238. data/ext/v8/upstream/build/scons/install/man/man1/scons.1 +15179 -0
  1239. data/ext/v8/upstream/build/scons/install/man/man1/sconsign.1 +208 -0
  1240. data/ext/v8/upstream/build/scons/os_spawnv_fix.diff +83 -0
  1241. data/ext/v8/upstream/build/scons/scons-time.1 +1017 -0
  1242. data/ext/v8/upstream/build/scons/scons.1 +15179 -0
  1243. data/ext/v8/upstream/build/scons/sconsign.1 +208 -0
  1244. data/ext/v8/upstream/build/scons/script/scons +184 -0
  1245. data/ext/v8/upstream/build/scons/script/scons-time +1529 -0
  1246. data/ext/v8/upstream/build/scons/script/scons.bat +31 -0
  1247. data/ext/v8/upstream/build/scons/script/sconsign +508 -0
  1248. data/ext/v8/upstream/build/scons/setup.cfg +6 -0
  1249. data/ext/v8/upstream/build/scons/setup.py +427 -0
  1250. data/ext/v8/upstream/build/v8/.gitignore +26 -0
  1251. data/ext/v8/upstream/build/v8/AUTHORS +31 -0
  1252. data/ext/v8/upstream/build/v8/ChangeLog +1916 -0
  1253. data/ext/v8/upstream/build/v8/LICENSE +55 -0
  1254. data/ext/v8/upstream/build/v8/SConstruct +1158 -0
  1255. data/ext/v8/upstream/build/v8/SConstruct.orig +1154 -0
  1256. data/ext/v8/upstream/build/v8/include/v8-debug.h +381 -0
  1257. data/ext/v8/upstream/build/v8/include/v8-profiler.h +353 -0
  1258. data/ext/v8/upstream/build/v8/include/v8.h +3616 -0
  1259. data/ext/v8/upstream/build/v8/src/SConscript +330 -0
  1260. data/ext/v8/upstream/build/v8/src/accessors.cc +661 -0
  1261. data/ext/v8/upstream/build/v8/src/accessors.h +114 -0
  1262. data/ext/v8/upstream/build/v8/src/allocation.cc +198 -0
  1263. data/ext/v8/upstream/build/v8/src/allocation.h +169 -0
  1264. data/ext/v8/upstream/build/v8/src/api.cc +4795 -0
  1265. data/ext/v8/upstream/build/v8/src/api.h +485 -0
  1266. data/ext/v8/upstream/build/v8/src/apinatives.js +110 -0
  1267. data/ext/v8/upstream/build/v8/src/apiutils.h +69 -0
  1268. data/ext/v8/upstream/build/v8/src/arguments.h +96 -0
  1269. data/ext/v8/upstream/build/v8/src/arm/assembler-arm-inl.h +305 -0
  1270. data/ext/v8/upstream/build/v8/src/arm/assembler-arm.cc +2580 -0
  1271. data/ext/v8/upstream/build/v8/src/arm/assembler-arm.h +1275 -0
  1272. data/ext/v8/upstream/build/v8/src/arm/builtins-arm.cc +1320 -0
  1273. data/ext/v8/upstream/build/v8/src/arm/codegen-arm-inl.h +48 -0
  1274. data/ext/v8/upstream/build/v8/src/arm/codegen-arm.cc +11398 -0
  1275. data/ext/v8/upstream/build/v8/src/arm/codegen-arm.h +1102 -0
  1276. data/ext/v8/upstream/build/v8/src/arm/constants-arm.cc +154 -0
  1277. data/ext/v8/upstream/build/v8/src/arm/constants-arm.h +388 -0
  1278. data/ext/v8/upstream/build/v8/src/arm/cpu-arm.cc +142 -0
  1279. data/ext/v8/upstream/build/v8/src/arm/debug-arm.cc +309 -0
  1280. data/ext/v8/upstream/build/v8/src/arm/disasm-arm.cc +1459 -0
  1281. data/ext/v8/upstream/build/v8/src/arm/fast-codegen-arm.cc +241 -0
  1282. data/ext/v8/upstream/build/v8/src/arm/frames-arm.cc +123 -0
  1283. data/ext/v8/upstream/build/v8/src/arm/frames-arm.h +162 -0
  1284. data/ext/v8/upstream/build/v8/src/arm/full-codegen-arm.cc +3178 -0
  1285. data/ext/v8/upstream/build/v8/src/arm/ic-arm.cc +2258 -0
  1286. data/ext/v8/upstream/build/v8/src/arm/jump-target-arm.cc +164 -0
  1287. data/ext/v8/upstream/build/v8/src/arm/macro-assembler-arm.cc +1892 -0
  1288. data/ext/v8/upstream/build/v8/src/arm/macro-assembler-arm.h +727 -0
  1289. data/ext/v8/upstream/build/v8/src/arm/regexp-macro-assembler-arm.cc +1261 -0
  1290. data/ext/v8/upstream/build/v8/src/arm/regexp-macro-assembler-arm.h +266 -0
  1291. data/ext/v8/upstream/build/v8/src/arm/register-allocator-arm-inl.h +100 -0
  1292. data/ext/v8/upstream/build/v8/src/arm/register-allocator-arm.cc +63 -0
  1293. data/ext/v8/upstream/build/v8/src/arm/register-allocator-arm.h +44 -0
  1294. data/ext/v8/upstream/build/v8/src/arm/simulator-arm.cc +2822 -0
  1295. data/ext/v8/upstream/build/v8/src/arm/simulator-arm.h +361 -0
  1296. data/ext/v8/upstream/build/v8/src/arm/stub-cache-arm.cc +2387 -0
  1297. data/ext/v8/upstream/build/v8/src/arm/virtual-frame-arm-inl.h +59 -0
  1298. data/ext/v8/upstream/build/v8/src/arm/virtual-frame-arm.cc +834 -0
  1299. data/ext/v8/upstream/build/v8/src/arm/virtual-frame-arm.h +519 -0
  1300. data/ext/v8/upstream/build/v8/src/array.js +1127 -0
  1301. data/ext/v8/upstream/build/v8/src/assembler.cc +801 -0
  1302. data/ext/v8/upstream/build/v8/src/assembler.h +573 -0
  1303. data/ext/v8/upstream/build/v8/src/ast-inl.h +81 -0
  1304. data/ext/v8/upstream/build/v8/src/ast.cc +1152 -0
  1305. data/ext/v8/upstream/build/v8/src/ast.h +2106 -0
  1306. data/ext/v8/upstream/build/v8/src/bootstrapper.cc +1819 -0
  1307. data/ext/v8/upstream/build/v8/src/bootstrapper.h +118 -0
  1308. data/ext/v8/upstream/build/v8/src/builtins.cc +1529 -0
  1309. data/ext/v8/upstream/build/v8/src/builtins.h +263 -0
  1310. data/ext/v8/upstream/build/v8/src/bytecodes-irregexp.h +104 -0
  1311. data/ext/v8/upstream/build/v8/src/cached-powers.h +119 -0
  1312. data/ext/v8/upstream/build/v8/src/char-predicates-inl.h +86 -0
  1313. data/ext/v8/upstream/build/v8/src/char-predicates.h +65 -0
  1314. data/ext/v8/upstream/build/v8/src/checks.cc +100 -0
  1315. data/ext/v8/upstream/build/v8/src/checks.h +310 -0
  1316. data/ext/v8/upstream/build/v8/src/circular-queue-inl.h +53 -0
  1317. data/ext/v8/upstream/build/v8/src/circular-queue.cc +121 -0
  1318. data/ext/v8/upstream/build/v8/src/circular-queue.h +103 -0
  1319. data/ext/v8/upstream/build/v8/src/code-stubs.cc +177 -0
  1320. data/ext/v8/upstream/build/v8/src/code-stubs.h +177 -0
  1321. data/ext/v8/upstream/build/v8/src/code.h +68 -0
  1322. data/ext/v8/upstream/build/v8/src/codegen-inl.h +60 -0
  1323. data/ext/v8/upstream/build/v8/src/codegen.cc +516 -0
  1324. data/ext/v8/upstream/build/v8/src/codegen.h +897 -0
  1325. data/ext/v8/upstream/build/v8/src/compilation-cache.cc +562 -0
  1326. data/ext/v8/upstream/build/v8/src/compilation-cache.h +102 -0
  1327. data/ext/v8/upstream/build/v8/src/compiler.cc +654 -0
  1328. data/ext/v8/upstream/build/v8/src/compiler.h +299 -0
  1329. data/ext/v8/upstream/build/v8/src/contexts.cc +256 -0
  1330. data/ext/v8/upstream/build/v8/src/contexts.h +342 -0
  1331. data/ext/v8/upstream/build/v8/src/conversions-inl.h +110 -0
  1332. data/ext/v8/upstream/build/v8/src/conversions.cc +1119 -0
  1333. data/ext/v8/upstream/build/v8/src/conversions.h +123 -0
  1334. data/ext/v8/upstream/build/v8/src/counters.cc +78 -0
  1335. data/ext/v8/upstream/build/v8/src/counters.h +239 -0
  1336. data/ext/v8/upstream/build/v8/src/cpu-profiler-inl.h +100 -0
  1337. data/ext/v8/upstream/build/v8/src/cpu-profiler.cc +538 -0
  1338. data/ext/v8/upstream/build/v8/src/cpu-profiler.h +285 -0
  1339. data/ext/v8/upstream/build/v8/src/cpu.h +65 -0
  1340. data/ext/v8/upstream/build/v8/src/d8-debug.cc +356 -0
  1341. data/ext/v8/upstream/build/v8/src/d8-debug.h +155 -0
  1342. data/ext/v8/upstream/build/v8/src/d8-posix.cc +693 -0
  1343. data/ext/v8/upstream/build/v8/src/d8-readline.cc +128 -0
  1344. data/ext/v8/upstream/build/v8/src/d8-windows.cc +42 -0
  1345. data/ext/v8/upstream/build/v8/src/d8.cc +783 -0
  1346. data/ext/v8/upstream/build/v8/src/d8.h +227 -0
  1347. data/ext/v8/upstream/build/v8/src/d8.js +1683 -0
  1348. data/ext/v8/upstream/build/v8/src/data-flow.cc +758 -0
  1349. data/ext/v8/upstream/build/v8/src/data-flow.h +278 -0
  1350. data/ext/v8/upstream/build/v8/src/date.js +1059 -0
  1351. data/ext/v8/upstream/build/v8/src/dateparser-inl.h +123 -0
  1352. data/ext/v8/upstream/build/v8/src/dateparser.cc +178 -0
  1353. data/ext/v8/upstream/build/v8/src/dateparser.h +244 -0
  1354. data/ext/v8/upstream/build/v8/src/debug-agent.cc +427 -0
  1355. data/ext/v8/upstream/build/v8/src/debug-agent.h +129 -0
  1356. data/ext/v8/upstream/build/v8/src/debug-debugger.js +2227 -0
  1357. data/ext/v8/upstream/build/v8/src/debug.cc +3005 -0
  1358. data/ext/v8/upstream/build/v8/src/debug.h +993 -0
  1359. data/ext/v8/upstream/build/v8/src/disasm.h +77 -0
  1360. data/ext/v8/upstream/build/v8/src/disassembler.cc +312 -0
  1361. data/ext/v8/upstream/build/v8/src/disassembler.h +56 -0
  1362. data/ext/v8/upstream/build/v8/src/diy-fp.cc +58 -0
  1363. data/ext/v8/upstream/build/v8/src/diy-fp.h +117 -0
  1364. data/ext/v8/upstream/build/v8/src/double.h +169 -0
  1365. data/ext/v8/upstream/build/v8/src/dtoa-config.c +92 -0
  1366. data/ext/v8/upstream/build/v8/src/dtoa.cc +77 -0
  1367. data/ext/v8/upstream/build/v8/src/dtoa.h +81 -0
  1368. data/ext/v8/upstream/build/v8/src/execution.cc +809 -0
  1369. data/ext/v8/upstream/build/v8/src/execution.h +336 -0
  1370. data/ext/v8/upstream/build/v8/src/factory.cc +1003 -0
  1371. data/ext/v8/upstream/build/v8/src/factory.h +410 -0
  1372. data/ext/v8/upstream/build/v8/src/fast-codegen.cc +746 -0
  1373. data/ext/v8/upstream/build/v8/src/fast-codegen.h +161 -0
  1374. data/ext/v8/upstream/build/v8/src/fast-dtoa.cc +505 -0
  1375. data/ext/v8/upstream/build/v8/src/fast-dtoa.h +58 -0
  1376. data/ext/v8/upstream/build/v8/src/fixed-dtoa.cc +405 -0
  1377. data/ext/v8/upstream/build/v8/src/fixed-dtoa.h +55 -0
  1378. data/ext/v8/upstream/build/v8/src/flag-definitions.h +455 -0
  1379. data/ext/v8/upstream/build/v8/src/flags.cc +551 -0
  1380. data/ext/v8/upstream/build/v8/src/flags.h +81 -0
  1381. data/ext/v8/upstream/build/v8/src/flow-graph.cc +763 -0
  1382. data/ext/v8/upstream/build/v8/src/flow-graph.h +180 -0
  1383. data/ext/v8/upstream/build/v8/src/frame-element.cc +42 -0
  1384. data/ext/v8/upstream/build/v8/src/frame-element.h +273 -0
  1385. data/ext/v8/upstream/build/v8/src/frames-inl.h +217 -0
  1386. data/ext/v8/upstream/build/v8/src/frames.cc +826 -0
  1387. data/ext/v8/upstream/build/v8/src/frames.h +682 -0
  1388. data/ext/v8/upstream/build/v8/src/full-codegen.cc +1443 -0
  1389. data/ext/v8/upstream/build/v8/src/full-codegen.h +548 -0
  1390. data/ext/v8/upstream/build/v8/src/func-name-inferrer.cc +76 -0
  1391. data/ext/v8/upstream/build/v8/src/func-name-inferrer.h +135 -0
  1392. data/ext/v8/upstream/build/v8/src/global-handles.cc +520 -0
  1393. data/ext/v8/upstream/build/v8/src/global-handles.h +180 -0
  1394. data/ext/v8/upstream/build/v8/src/globals.h +669 -0
  1395. data/ext/v8/upstream/build/v8/src/handles-inl.h +76 -0
  1396. data/ext/v8/upstream/build/v8/src/handles.cc +825 -0
  1397. data/ext/v8/upstream/build/v8/src/handles.h +393 -0
  1398. data/ext/v8/upstream/build/v8/src/hashmap.cc +226 -0
  1399. data/ext/v8/upstream/build/v8/src/hashmap.h +120 -0
  1400. data/ext/v8/upstream/build/v8/src/heap-inl.h +493 -0
  1401. data/ext/v8/upstream/build/v8/src/heap-profiler.cc +779 -0
  1402. data/ext/v8/upstream/build/v8/src/heap-profiler.h +323 -0
  1403. data/ext/v8/upstream/build/v8/src/heap.cc +4994 -0
  1404. data/ext/v8/upstream/build/v8/src/heap.h +1984 -0
  1405. data/ext/v8/upstream/build/v8/src/ia32/assembler-ia32-inl.h +360 -0
  1406. data/ext/v8/upstream/build/v8/src/ia32/assembler-ia32.cc +2600 -0
  1407. data/ext/v8/upstream/build/v8/src/ia32/assembler-ia32.h +969 -0
  1408. data/ext/v8/upstream/build/v8/src/ia32/builtins-ia32.cc +1261 -0
  1409. data/ext/v8/upstream/build/v8/src/ia32/codegen-ia32-inl.h +46 -0
  1410. data/ext/v8/upstream/build/v8/src/ia32/codegen-ia32.cc +13968 -0
  1411. data/ext/v8/upstream/build/v8/src/ia32/codegen-ia32.h +1097 -0
  1412. data/ext/v8/upstream/build/v8/src/ia32/cpu-ia32.cc +83 -0
  1413. data/ext/v8/upstream/build/v8/src/ia32/debug-ia32.cc +309 -0
  1414. data/ext/v8/upstream/build/v8/src/ia32/disasm-ia32.cc +1471 -0
  1415. data/ext/v8/upstream/build/v8/src/ia32/fast-codegen-ia32.cc +954 -0
  1416. data/ext/v8/upstream/build/v8/src/ia32/fast-codegen-ia32.h +155 -0
  1417. data/ext/v8/upstream/build/v8/src/ia32/frames-ia32.cc +115 -0
  1418. data/ext/v8/upstream/build/v8/src/ia32/frames-ia32.h +135 -0
  1419. data/ext/v8/upstream/build/v8/src/ia32/full-codegen-ia32.cc +3281 -0
  1420. data/ext/v8/upstream/build/v8/src/ia32/ic-ia32.cc +1966 -0
  1421. data/ext/v8/upstream/build/v8/src/ia32/jump-target-ia32.cc +437 -0
  1422. data/ext/v8/upstream/build/v8/src/ia32/macro-assembler-ia32.cc +1610 -0
  1423. data/ext/v8/upstream/build/v8/src/ia32/macro-assembler-ia32.h +610 -0
  1424. data/ext/v8/upstream/build/v8/src/ia32/regexp-macro-assembler-ia32.cc +1247 -0
  1425. data/ext/v8/upstream/build/v8/src/ia32/regexp-macro-assembler-ia32.h +214 -0
  1426. data/ext/v8/upstream/build/v8/src/ia32/register-allocator-ia32-inl.h +82 -0
  1427. data/ext/v8/upstream/build/v8/src/ia32/register-allocator-ia32.cc +157 -0
  1428. data/ext/v8/upstream/build/v8/src/ia32/register-allocator-ia32.h +43 -0
  1429. data/ext/v8/upstream/build/v8/src/ia32/simulator-ia32.cc +30 -0
  1430. data/ext/v8/upstream/build/v8/src/ia32/simulator-ia32.h +62 -0
  1431. data/ext/v8/upstream/build/v8/src/ia32/stub-cache-ia32.cc +2750 -0
  1432. data/ext/v8/upstream/build/v8/src/ia32/virtual-frame-ia32.cc +1334 -0
  1433. data/ext/v8/upstream/build/v8/src/ia32/virtual-frame-ia32.h +627 -0
  1434. data/ext/v8/upstream/build/v8/src/ic-inl.h +120 -0
  1435. data/ext/v8/upstream/build/v8/src/ic.cc +1827 -0
  1436. data/ext/v8/upstream/build/v8/src/ic.h +515 -0
  1437. data/ext/v8/upstream/build/v8/src/interpreter-irregexp.cc +646 -0
  1438. data/ext/v8/upstream/build/v8/src/interpreter-irregexp.h +48 -0
  1439. data/ext/v8/upstream/build/v8/src/json.js +268 -0
  1440. data/ext/v8/upstream/build/v8/src/jsregexp.cc +5283 -0
  1441. data/ext/v8/upstream/build/v8/src/jsregexp.h +1463 -0
  1442. data/ext/v8/upstream/build/v8/src/jump-target-heavy-inl.h +51 -0
  1443. data/ext/v8/upstream/build/v8/src/jump-target-heavy.cc +429 -0
  1444. data/ext/v8/upstream/build/v8/src/jump-target-heavy.h +244 -0
  1445. data/ext/v8/upstream/build/v8/src/jump-target-inl.h +48 -0
  1446. data/ext/v8/upstream/build/v8/src/jump-target-light-inl.h +56 -0
  1447. data/ext/v8/upstream/build/v8/src/jump-target-light.cc +110 -0
  1448. data/ext/v8/upstream/build/v8/src/jump-target-light.h +192 -0
  1449. data/ext/v8/upstream/build/v8/src/jump-target.cc +91 -0
  1450. data/ext/v8/upstream/build/v8/src/jump-target.h +90 -0
  1451. data/ext/v8/upstream/build/v8/src/list-inl.h +166 -0
  1452. data/ext/v8/upstream/build/v8/src/list.h +159 -0
  1453. data/ext/v8/upstream/build/v8/src/liveedit-debugger.js +1057 -0
  1454. data/ext/v8/upstream/build/v8/src/liveedit.cc +1480 -0
  1455. data/ext/v8/upstream/build/v8/src/liveedit.h +170 -0
  1456. data/ext/v8/upstream/build/v8/src/log-inl.h +59 -0
  1457. data/ext/v8/upstream/build/v8/src/log-utils.cc +497 -0
  1458. data/ext/v8/upstream/build/v8/src/log-utils.h +289 -0
  1459. data/ext/v8/upstream/build/v8/src/log.cc +1561 -0
  1460. data/ext/v8/upstream/build/v8/src/log.h +384 -0
  1461. data/ext/v8/upstream/build/v8/src/macro-assembler.h +86 -0
  1462. data/ext/v8/upstream/build/v8/src/macros.py +177 -0
  1463. data/ext/v8/upstream/build/v8/src/mark-compact.cc +2330 -0
  1464. data/ext/v8/upstream/build/v8/src/mark-compact.h +451 -0
  1465. data/ext/v8/upstream/build/v8/src/math.js +264 -0
  1466. data/ext/v8/upstream/build/v8/src/memory.h +74 -0
  1467. data/ext/v8/upstream/build/v8/src/messages.cc +183 -0
  1468. data/ext/v8/upstream/build/v8/src/messages.h +113 -0
  1469. data/ext/v8/upstream/build/v8/src/messages.js +982 -0
  1470. data/ext/v8/upstream/build/v8/src/mips/assembler-mips-inl.h +215 -0
  1471. data/ext/v8/upstream/build/v8/src/mips/assembler-mips.cc +1219 -0
  1472. data/ext/v8/upstream/build/v8/src/mips/assembler-mips.h +668 -0
  1473. data/ext/v8/upstream/build/v8/src/mips/builtins-mips.cc +205 -0
  1474. data/ext/v8/upstream/build/v8/src/mips/codegen-mips-inl.h +70 -0
  1475. data/ext/v8/upstream/build/v8/src/mips/codegen-mips.cc +1437 -0
  1476. data/ext/v8/upstream/build/v8/src/mips/codegen-mips.h +434 -0
  1477. data/ext/v8/upstream/build/v8/src/mips/constants-mips.cc +328 -0
  1478. data/ext/v8/upstream/build/v8/src/mips/constants-mips.h +525 -0
  1479. data/ext/v8/upstream/build/v8/src/mips/cpu-mips.cc +73 -0
  1480. data/ext/v8/upstream/build/v8/src/mips/debug-mips.cc +131 -0
  1481. data/ext/v8/upstream/build/v8/src/mips/disasm-mips.cc +787 -0
  1482. data/ext/v8/upstream/build/v8/src/mips/fast-codegen-mips.cc +77 -0
  1483. data/ext/v8/upstream/build/v8/src/mips/frames-mips.cc +102 -0
  1484. data/ext/v8/upstream/build/v8/src/mips/frames-mips.h +164 -0
  1485. data/ext/v8/upstream/build/v8/src/mips/full-codegen-mips.cc +277 -0
  1486. data/ext/v8/upstream/build/v8/src/mips/ic-mips.cc +220 -0
  1487. data/ext/v8/upstream/build/v8/src/mips/jump-target-mips.cc +175 -0
  1488. data/ext/v8/upstream/build/v8/src/mips/macro-assembler-mips.cc +1326 -0
  1489. data/ext/v8/upstream/build/v8/src/mips/macro-assembler-mips.h +461 -0
  1490. data/ext/v8/upstream/build/v8/src/mips/register-allocator-mips-inl.h +137 -0
  1491. data/ext/v8/upstream/build/v8/src/mips/register-allocator-mips.cc +63 -0
  1492. data/ext/v8/upstream/build/v8/src/mips/register-allocator-mips.h +46 -0
  1493. data/ext/v8/upstream/build/v8/src/mips/simulator-mips.cc +1651 -0
  1494. data/ext/v8/upstream/build/v8/src/mips/simulator-mips.h +311 -0
  1495. data/ext/v8/upstream/build/v8/src/mips/stub-cache-mips.cc +403 -0
  1496. data/ext/v8/upstream/build/v8/src/mips/virtual-frame-mips.cc +319 -0
  1497. data/ext/v8/upstream/build/v8/src/mips/virtual-frame-mips.h +548 -0
  1498. data/ext/v8/upstream/build/v8/src/mirror-debugger.js +2380 -0
  1499. data/ext/v8/upstream/build/v8/src/mksnapshot.cc +256 -0
  1500. data/ext/v8/upstream/build/v8/src/natives.h +63 -0
  1501. data/ext/v8/upstream/build/v8/src/objects-debug.cc +1366 -0
  1502. data/ext/v8/upstream/build/v8/src/objects-inl.h +3333 -0
  1503. data/ext/v8/upstream/build/v8/src/objects.cc +8820 -0
  1504. data/ext/v8/upstream/build/v8/src/objects.h +5373 -0
  1505. data/ext/v8/upstream/build/v8/src/oprofile-agent.cc +108 -0
  1506. data/ext/v8/upstream/build/v8/src/oprofile-agent.h +77 -0
  1507. data/ext/v8/upstream/build/v8/src/parser.cc +5207 -0
  1508. data/ext/v8/upstream/build/v8/src/parser.h +197 -0
  1509. data/ext/v8/upstream/build/v8/src/platform-freebsd.cc +667 -0
  1510. data/ext/v8/upstream/build/v8/src/platform-linux.cc +862 -0
  1511. data/ext/v8/upstream/build/v8/src/platform-macos.cc +665 -0
  1512. data/ext/v8/upstream/build/v8/src/platform-nullos.cc +454 -0
  1513. data/ext/v8/upstream/build/v8/src/platform-openbsd.cc +622 -0
  1514. data/ext/v8/upstream/build/v8/src/platform-posix.cc +362 -0
  1515. data/ext/v8/upstream/build/v8/src/platform-solaris.cc +653 -0
  1516. data/ext/v8/upstream/build/v8/src/platform-win32.cc +1911 -0
  1517. data/ext/v8/upstream/build/v8/src/platform.h +577 -0
  1518. data/ext/v8/upstream/build/v8/src/powers-ten.h +2461 -0
  1519. data/ext/v8/upstream/build/v8/src/prettyprinter.cc +1531 -0
  1520. data/ext/v8/upstream/build/v8/src/prettyprinter.h +221 -0
  1521. data/ext/v8/upstream/build/v8/src/profile-generator-inl.h +148 -0
  1522. data/ext/v8/upstream/build/v8/src/profile-generator.cc +1830 -0
  1523. data/ext/v8/upstream/build/v8/src/profile-generator.h +853 -0
  1524. data/ext/v8/upstream/build/v8/src/property.cc +96 -0
  1525. data/ext/v8/upstream/build/v8/src/property.h +315 -0
  1526. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  1527. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler-irregexp.cc +464 -0
  1528. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler-irregexp.h +141 -0
  1529. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler-tracer.cc +356 -0
  1530. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler-tracer.h +103 -0
  1531. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler.cc +261 -0
  1532. data/ext/v8/upstream/build/v8/src/regexp-macro-assembler.h +228 -0
  1533. data/ext/v8/upstream/build/v8/src/regexp-stack.cc +103 -0
  1534. data/ext/v8/upstream/build/v8/src/regexp-stack.h +123 -0
  1535. data/ext/v8/upstream/build/v8/src/regexp.js +549 -0
  1536. data/ext/v8/upstream/build/v8/src/register-allocator-inl.h +141 -0
  1537. data/ext/v8/upstream/build/v8/src/register-allocator.cc +104 -0
  1538. data/ext/v8/upstream/build/v8/src/register-allocator.h +320 -0
  1539. data/ext/v8/upstream/build/v8/src/rewriter.cc +1038 -0
  1540. data/ext/v8/upstream/build/v8/src/rewriter.h +54 -0
  1541. data/ext/v8/upstream/build/v8/src/runtime.cc +10599 -0
  1542. data/ext/v8/upstream/build/v8/src/runtime.h +459 -0
  1543. data/ext/v8/upstream/build/v8/src/runtime.js +629 -0
  1544. data/ext/v8/upstream/build/v8/src/scanner.cc +1346 -0
  1545. data/ext/v8/upstream/build/v8/src/scanner.h +503 -0
  1546. data/ext/v8/upstream/build/v8/src/scopeinfo.cc +637 -0
  1547. data/ext/v8/upstream/build/v8/src/scopeinfo.h +233 -0
  1548. data/ext/v8/upstream/build/v8/src/scopes.cc +962 -0
  1549. data/ext/v8/upstream/build/v8/src/scopes.h +400 -0
  1550. data/ext/v8/upstream/build/v8/src/serialize.cc +1461 -0
  1551. data/ext/v8/upstream/build/v8/src/serialize.h +581 -0
  1552. data/ext/v8/upstream/build/v8/src/shell.h +55 -0
  1553. data/ext/v8/upstream/build/v8/src/simulator.h +43 -0
  1554. data/ext/v8/upstream/build/v8/src/smart-pointer.h +109 -0
  1555. data/ext/v8/upstream/build/v8/src/snapshot-common.cc +82 -0
  1556. data/ext/v8/upstream/build/v8/src/snapshot-empty.cc +50 -0
  1557. data/ext/v8/upstream/build/v8/src/snapshot.h +71 -0
  1558. data/ext/v8/upstream/build/v8/src/spaces-inl.h +483 -0
  1559. data/ext/v8/upstream/build/v8/src/spaces.cc +2901 -0
  1560. data/ext/v8/upstream/build/v8/src/spaces.h +2197 -0
  1561. data/ext/v8/upstream/build/v8/src/splay-tree-inl.h +310 -0
  1562. data/ext/v8/upstream/build/v8/src/splay-tree.h +203 -0
  1563. data/ext/v8/upstream/build/v8/src/string-stream.cc +584 -0
  1564. data/ext/v8/upstream/build/v8/src/string-stream.h +189 -0
  1565. data/ext/v8/upstream/build/v8/src/string.js +1006 -0
  1566. data/ext/v8/upstream/build/v8/src/stub-cache.cc +1379 -0
  1567. data/ext/v8/upstream/build/v8/src/stub-cache.h +756 -0
  1568. data/ext/v8/upstream/build/v8/src/third_party/dtoa/COPYING +15 -0
  1569. data/ext/v8/upstream/build/v8/src/third_party/dtoa/dtoa.c +3334 -0
  1570. data/ext/v8/upstream/build/v8/src/third_party/valgrind/valgrind.h +3925 -0
  1571. data/ext/v8/upstream/build/v8/src/token.cc +56 -0
  1572. data/ext/v8/upstream/build/v8/src/token.h +270 -0
  1573. data/ext/v8/upstream/build/v8/src/top.cc +1067 -0
  1574. data/ext/v8/upstream/build/v8/src/top.h +463 -0
  1575. data/ext/v8/upstream/build/v8/src/type-info.cc +53 -0
  1576. data/ext/v8/upstream/build/v8/src/type-info.h +244 -0
  1577. data/ext/v8/upstream/build/v8/src/unbound-queue-inl.h +95 -0
  1578. data/ext/v8/upstream/build/v8/src/unbound-queue.h +67 -0
  1579. data/ext/v8/upstream/build/v8/src/unicode-inl.h +238 -0
  1580. data/ext/v8/upstream/build/v8/src/unicode.cc +749 -0
  1581. data/ext/v8/upstream/build/v8/src/unicode.h +279 -0
  1582. data/ext/v8/upstream/build/v8/src/uri.js +415 -0
  1583. data/ext/v8/upstream/build/v8/src/utils.cc +285 -0
  1584. data/ext/v8/upstream/build/v8/src/utils.h +745 -0
  1585. data/ext/v8/upstream/build/v8/src/v8-counters.cc +55 -0
  1586. data/ext/v8/upstream/build/v8/src/v8-counters.h +250 -0
  1587. data/ext/v8/upstream/build/v8/src/v8.cc +228 -0
  1588. data/ext/v8/upstream/build/v8/src/v8.h +121 -0
  1589. data/ext/v8/upstream/build/v8/src/v8dll-main.cc +39 -0
  1590. data/ext/v8/upstream/build/v8/src/v8natives.js +1188 -0
  1591. data/ext/v8/upstream/build/v8/src/v8threads.cc +461 -0
  1592. data/ext/v8/upstream/build/v8/src/v8threads.h +159 -0
  1593. data/ext/v8/upstream/build/v8/src/variables.cc +119 -0
  1594. data/ext/v8/upstream/build/v8/src/variables.h +205 -0
  1595. data/ext/v8/upstream/build/v8/src/version.cc +88 -0
  1596. data/ext/v8/upstream/build/v8/src/version.h +64 -0
  1597. data/ext/v8/upstream/build/v8/src/virtual-frame-heavy-inl.h +192 -0
  1598. data/ext/v8/upstream/build/v8/src/virtual-frame-heavy.cc +312 -0
  1599. data/ext/v8/upstream/build/v8/src/virtual-frame-inl.h +39 -0
  1600. data/ext/v8/upstream/build/v8/src/virtual-frame-light-inl.h +170 -0
  1601. data/ext/v8/upstream/build/v8/src/virtual-frame-light.cc +52 -0
  1602. data/ext/v8/upstream/build/v8/src/virtual-frame.cc +49 -0
  1603. data/ext/v8/upstream/build/v8/src/virtual-frame.h +46 -0
  1604. data/ext/v8/upstream/build/v8/src/vm-state-inl.h +137 -0
  1605. data/ext/v8/upstream/build/v8/src/vm-state.cc +39 -0
  1606. data/ext/v8/upstream/build/v8/src/vm-state.h +77 -0
  1607. data/ext/v8/upstream/build/v8/src/x64/assembler-x64-inl.h +400 -0
  1608. data/ext/v8/upstream/build/v8/src/x64/assembler-x64.cc +2963 -0
  1609. data/ext/v8/upstream/build/v8/src/x64/assembler-x64.h +1438 -0
  1610. data/ext/v8/upstream/build/v8/src/x64/builtins-x64.cc +1296 -0
  1611. data/ext/v8/upstream/build/v8/src/x64/codegen-x64-inl.h +46 -0
  1612. data/ext/v8/upstream/build/v8/src/x64/codegen-x64.cc +12491 -0
  1613. data/ext/v8/upstream/build/v8/src/x64/codegen-x64.h +1090 -0
  1614. data/ext/v8/upstream/build/v8/src/x64/cpu-x64.cc +83 -0
  1615. data/ext/v8/upstream/build/v8/src/x64/debug-x64.cc +267 -0
  1616. data/ext/v8/upstream/build/v8/src/x64/disasm-x64.cc +1696 -0
  1617. data/ext/v8/upstream/build/v8/src/x64/fast-codegen-x64.cc +250 -0
  1618. data/ext/v8/upstream/build/v8/src/x64/frames-x64.cc +113 -0
  1619. data/ext/v8/upstream/build/v8/src/x64/frames-x64.h +125 -0
  1620. data/ext/v8/upstream/build/v8/src/x64/full-codegen-x64.cc +3270 -0
  1621. data/ext/v8/upstream/build/v8/src/x64/ic-x64.cc +1907 -0
  1622. data/ext/v8/upstream/build/v8/src/x64/jump-target-x64.cc +437 -0
  1623. data/ext/v8/upstream/build/v8/src/x64/macro-assembler-x64.cc +2793 -0
  1624. data/ext/v8/upstream/build/v8/src/x64/macro-assembler-x64.h +916 -0
  1625. data/ext/v8/upstream/build/v8/src/x64/regexp-macro-assembler-x64.cc +1374 -0
  1626. data/ext/v8/upstream/build/v8/src/x64/regexp-macro-assembler-x64.h +277 -0
  1627. data/ext/v8/upstream/build/v8/src/x64/register-allocator-x64-inl.h +87 -0
  1628. data/ext/v8/upstream/build/v8/src/x64/register-allocator-x64.cc +91 -0
  1629. data/ext/v8/upstream/build/v8/src/x64/register-allocator-x64.h +43 -0
  1630. data/ext/v8/upstream/build/v8/src/x64/simulator-x64.cc +27 -0
  1631. data/ext/v8/upstream/build/v8/src/x64/simulator-x64.h +63 -0
  1632. data/ext/v8/upstream/build/v8/src/x64/stub-cache-x64.cc +2560 -0
  1633. data/ext/v8/upstream/build/v8/src/x64/virtual-frame-x64.cc +1264 -0
  1634. data/ext/v8/upstream/build/v8/src/x64/virtual-frame-x64.h +590 -0
  1635. data/ext/v8/upstream/build/v8/src/zone-inl.h +82 -0
  1636. data/ext/v8/upstream/build/v8/src/zone.cc +194 -0
  1637. data/ext/v8/upstream/build/v8/src/zone.h +221 -0
  1638. data/ext/v8/upstream/build/v8/tools/codemap.js +270 -0
  1639. data/ext/v8/upstream/build/v8/tools/consarray.js +93 -0
  1640. data/ext/v8/upstream/build/v8/tools/csvparser.js +83 -0
  1641. data/ext/v8/upstream/build/v8/tools/gc-nvp-trace-processor.py +317 -0
  1642. data/ext/v8/upstream/build/v8/tools/generate-ten-powers.scm +286 -0
  1643. data/ext/v8/upstream/build/v8/tools/gyp/v8.gyp +749 -0
  1644. data/ext/v8/upstream/build/v8/tools/js2c.py +380 -0
  1645. data/ext/v8/upstream/build/v8/tools/jsmin.py +280 -0
  1646. data/ext/v8/upstream/build/v8/tools/linux-tick-processor +33 -0
  1647. data/ext/v8/upstream/build/v8/tools/linux-tick-processor.py +78 -0
  1648. data/ext/v8/upstream/build/v8/tools/logreader.js +338 -0
  1649. data/ext/v8/upstream/build/v8/tools/mac-nm +18 -0
  1650. data/ext/v8/upstream/build/v8/tools/mac-tick-processor +6 -0
  1651. data/ext/v8/upstream/build/v8/tools/oprofile/annotate +7 -0
  1652. data/ext/v8/upstream/build/v8/tools/oprofile/common +19 -0
  1653. data/ext/v8/upstream/build/v8/tools/oprofile/dump +7 -0
  1654. data/ext/v8/upstream/build/v8/tools/oprofile/report +7 -0
  1655. data/ext/v8/upstream/build/v8/tools/oprofile/reset +7 -0
  1656. data/ext/v8/upstream/build/v8/tools/oprofile/run +14 -0
  1657. data/ext/v8/upstream/build/v8/tools/oprofile/shutdown +7 -0
  1658. data/ext/v8/upstream/build/v8/tools/oprofile/start +7 -0
  1659. data/ext/v8/upstream/build/v8/tools/presubmit.py +299 -0
  1660. data/ext/v8/upstream/build/v8/tools/process-heap-prof.py +120 -0
  1661. data/ext/v8/upstream/build/v8/tools/profile.js +691 -0
  1662. data/ext/v8/upstream/build/v8/tools/profile_view.js +224 -0
  1663. data/ext/v8/upstream/build/v8/tools/run-valgrind.py +77 -0
  1664. data/ext/v8/upstream/build/v8/tools/splaytree.js +322 -0
  1665. data/ext/v8/upstream/build/v8/tools/splaytree.py +226 -0
  1666. data/ext/v8/upstream/build/v8/tools/stats-viewer.py +468 -0
  1667. data/ext/v8/upstream/build/v8/tools/tickprocessor-driver.js +59 -0
  1668. data/ext/v8/upstream/build/v8/tools/tickprocessor.js +862 -0
  1669. data/ext/v8/upstream/build/v8/tools/tickprocessor.py +571 -0
  1670. data/ext/v8/upstream/build/v8/tools/utils.py +88 -0
  1671. data/ext/v8/upstream/build/v8/tools/visual_studio/README.txt +71 -0
  1672. data/ext/v8/upstream/build/v8/tools/visual_studio/arm.vsprops +14 -0
  1673. data/ext/v8/upstream/build/v8/tools/visual_studio/common.vsprops +34 -0
  1674. data/ext/v8/upstream/build/v8/tools/visual_studio/d8.vcproj +193 -0
  1675. data/ext/v8/upstream/build/v8/tools/visual_studio/d8_arm.vcproj +193 -0
  1676. data/ext/v8/upstream/build/v8/tools/visual_studio/d8_x64.vcproj +209 -0
  1677. data/ext/v8/upstream/build/v8/tools/visual_studio/d8js2c.cmd +6 -0
  1678. data/ext/v8/upstream/build/v8/tools/visual_studio/debug.vsprops +17 -0
  1679. data/ext/v8/upstream/build/v8/tools/visual_studio/ia32.vsprops +17 -0
  1680. data/ext/v8/upstream/build/v8/tools/visual_studio/js2c.cmd +6 -0
  1681. data/ext/v8/upstream/build/v8/tools/visual_studio/release.vsprops +24 -0
  1682. data/ext/v8/upstream/build/v8/tools/visual_studio/v8.sln +101 -0
  1683. data/ext/v8/upstream/build/v8/tools/visual_studio/v8.vcproj +227 -0
  1684. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_arm.sln +74 -0
  1685. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_arm.vcproj +227 -0
  1686. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_base.vcproj +1143 -0
  1687. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_base_arm.vcproj +1115 -0
  1688. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_base_x64.vcproj +1096 -0
  1689. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_cctest.vcproj +265 -0
  1690. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_cctest_arm.vcproj +249 -0
  1691. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
  1692. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_mksnapshot.vcproj +145 -0
  1693. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_mksnapshot_x64.vcproj +145 -0
  1694. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_process_sample.vcproj +145 -0
  1695. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_process_sample_arm.vcproj +145 -0
  1696. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_process_sample_x64.vcproj +161 -0
  1697. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_shell_sample.vcproj +145 -0
  1698. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_shell_sample_arm.vcproj +145 -0
  1699. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_shell_sample_x64.vcproj +161 -0
  1700. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_snapshot.vcproj +142 -0
  1701. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
  1702. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
  1703. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
  1704. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_x64.sln +101 -0
  1705. data/ext/v8/upstream/build/v8/tools/visual_studio/v8_x64.vcproj +227 -0
  1706. data/ext/v8/upstream/build/v8/tools/visual_studio/x64.vsprops +17 -0
  1707. data/ext/v8/upstream/build/v8/tools/windows-tick-processor.bat +29 -0
  1708. data/ext/v8/upstream/build/v8/tools/windows-tick-processor.py +137 -0
  1709. data/ext/v8/upstream/detect_cpu.rb +27 -0
  1710. data/ext/v8/upstream/fpic-on-linux-amd64.patch +13 -0
  1711. data/ext/v8/upstream/scons/CHANGES.txt +5183 -0
  1712. data/ext/v8/upstream/scons/LICENSE.txt +20 -0
  1713. data/ext/v8/upstream/scons/MANIFEST +202 -0
  1714. data/ext/v8/upstream/scons/PKG-INFO +13 -0
  1715. data/ext/v8/upstream/scons/README.txt +273 -0
  1716. data/ext/v8/upstream/scons/RELEASE.txt +1040 -0
  1717. data/ext/v8/upstream/scons/engine/SCons/Action.py +1256 -0
  1718. data/ext/v8/upstream/scons/engine/SCons/Builder.py +868 -0
  1719. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +217 -0
  1720. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +794 -0
  1721. data/ext/v8/upstream/scons/engine/SCons/Debug.py +237 -0
  1722. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +485 -0
  1723. data/ext/v8/upstream/scons/engine/SCons/Environment.py +2327 -0
  1724. data/ext/v8/upstream/scons/engine/SCons/Errors.py +207 -0
  1725. data/ext/v8/upstream/scons/engine/SCons/Executor.py +636 -0
  1726. data/ext/v8/upstream/scons/engine/SCons/Job.py +435 -0
  1727. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +292 -0
  1728. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +153 -0
  1729. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +3220 -0
  1730. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +128 -0
  1731. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +1341 -0
  1732. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +50 -0
  1733. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +50 -0
  1734. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +50 -0
  1735. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +50 -0
  1736. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +76 -0
  1737. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +74 -0
  1738. data/ext/v8/upstream/scons/engine/SCons/PathList.py +232 -0
  1739. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +236 -0
  1740. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +70 -0
  1741. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +55 -0
  1742. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +46 -0
  1743. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +46 -0
  1744. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +44 -0
  1745. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +58 -0
  1746. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +264 -0
  1747. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +50 -0
  1748. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +386 -0
  1749. data/ext/v8/upstream/scons/engine/SCons/SConf.py +1038 -0
  1750. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +381 -0
  1751. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +132 -0
  1752. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +74 -0
  1753. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +111 -0
  1754. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +320 -0
  1755. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +48 -0
  1756. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +378 -0
  1757. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +103 -0
  1758. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +55 -0
  1759. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +415 -0
  1760. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +386 -0
  1761. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +1360 -0
  1762. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +944 -0
  1763. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +642 -0
  1764. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +414 -0
  1765. data/ext/v8/upstream/scons/engine/SCons/Sig.py +63 -0
  1766. data/ext/v8/upstream/scons/engine/SCons/Subst.py +911 -0
  1767. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +1030 -0
  1768. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +61 -0
  1769. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +65 -0
  1770. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +73 -0
  1771. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +247 -0
  1772. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +324 -0
  1773. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  1774. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  1775. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
  1776. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
  1777. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
  1778. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
  1779. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
  1780. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +104 -0
  1781. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
  1782. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +64 -0
  1783. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +64 -0
  1784. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +71 -0
  1785. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +675 -0
  1786. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +82 -0
  1787. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +74 -0
  1788. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +80 -0
  1789. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +76 -0
  1790. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +71 -0
  1791. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +63 -0
  1792. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +78 -0
  1793. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +82 -0
  1794. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +99 -0
  1795. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +114 -0
  1796. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +58 -0
  1797. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +50 -0
  1798. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +224 -0
  1799. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +64 -0
  1800. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +125 -0
  1801. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +94 -0
  1802. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +62 -0
  1803. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +62 -0
  1804. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +63 -0
  1805. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +98 -0
  1806. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +63 -0
  1807. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +90 -0
  1808. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +73 -0
  1809. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +53 -0
  1810. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +80 -0
  1811. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +64 -0
  1812. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +63 -0
  1813. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +81 -0
  1814. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +85 -0
  1815. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +53 -0
  1816. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +77 -0
  1817. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +59 -0
  1818. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +52 -0
  1819. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +72 -0
  1820. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +90 -0
  1821. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +59 -0
  1822. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +60 -0
  1823. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +229 -0
  1824. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +490 -0
  1825. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +71 -0
  1826. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +110 -0
  1827. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +234 -0
  1828. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +138 -0
  1829. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +79 -0
  1830. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +99 -0
  1831. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +121 -0
  1832. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +112 -0
  1833. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +63 -0
  1834. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +77 -0
  1835. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +90 -0
  1836. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +159 -0
  1837. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +64 -0
  1838. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +266 -0
  1839. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +50 -0
  1840. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +269 -0
  1841. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +1439 -0
  1842. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +208 -0
  1843. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +107 -0
  1844. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +72 -0
  1845. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
  1846. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  1847. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +526 -0
  1848. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
  1849. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  1850. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  1851. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  1852. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  1853. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  1854. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  1855. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +78 -0
  1856. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +83 -0
  1857. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +108 -0
  1858. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +336 -0
  1859. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +121 -0
  1860. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +70 -0
  1861. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +132 -0
  1862. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +68 -0
  1863. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +58 -0
  1864. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +53 -0
  1865. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +63 -0
  1866. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +67 -0
  1867. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +142 -0
  1868. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +58 -0
  1869. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +63 -0
  1870. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +64 -0
  1871. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +64 -0
  1872. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +77 -0
  1873. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +186 -0
  1874. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +73 -0
  1875. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +805 -0
  1876. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +175 -0
  1877. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +53 -0
  1878. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +100 -0
  1879. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +131 -0
  1880. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +100 -0
  1881. data/ext/v8/upstream/scons/engine/SCons/Util.py +1645 -0
  1882. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +91 -0
  1883. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +107 -0
  1884. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +139 -0
  1885. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +109 -0
  1886. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +147 -0
  1887. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +317 -0
  1888. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +228 -0
  1889. data/ext/v8/upstream/scons/engine/SCons/__init__.py +49 -0
  1890. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +302 -0
  1891. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +98 -0
  1892. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
  1893. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +124 -0
  1894. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
  1895. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +583 -0
  1896. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +176 -0
  1897. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +325 -0
  1898. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
  1899. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
  1900. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +187 -0
  1901. data/ext/v8/upstream/scons/engine/SCons/cpp.py +598 -0
  1902. data/ext/v8/upstream/scons/engine/SCons/dblite.py +248 -0
  1903. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +77 -0
  1904. data/ext/v8/upstream/scons/os_spawnv_fix.diff +83 -0
  1905. data/ext/v8/upstream/scons/scons-time.1 +1017 -0
  1906. data/ext/v8/upstream/scons/scons.1 +15179 -0
  1907. data/ext/v8/upstream/scons/sconsign.1 +208 -0
  1908. data/ext/v8/upstream/scons/script/scons +184 -0
  1909. data/ext/v8/upstream/scons/script/scons-time +1529 -0
  1910. data/ext/v8/upstream/scons/script/scons.bat +31 -0
  1911. data/ext/v8/upstream/scons/script/sconsign +508 -0
  1912. data/ext/v8/upstream/scons/setup.cfg +6 -0
  1913. data/ext/v8/upstream/scons/setup.py +427 -0
  1914. data/ext/v8/v8.cpp +41 -0
  1915. data/ext/v8/v8_array.cpp +50 -0
  1916. data/ext/v8/v8_array.h +8 -0
  1917. data/ext/v8/v8_callbacks.cpp +121 -0
  1918. data/ext/v8/v8_callbacks.h +8 -0
  1919. data/ext/v8/v8_cxt.cpp +92 -0
  1920. data/ext/v8/v8_cxt.h +6 -0
  1921. data/ext/v8/v8_date.cpp +35 -0
  1922. data/ext/v8/v8_date.h +6 -0
  1923. data/ext/v8/v8_exception.cpp +128 -0
  1924. data/ext/v8/v8_exception.h +11 -0
  1925. data/ext/v8/v8_external.cpp +57 -0
  1926. data/ext/v8/v8_external.h +9 -0
  1927. data/ext/v8/v8_func.cpp +66 -0
  1928. data/ext/v8/v8_func.h +12 -0
  1929. data/ext/v8/v8_locker.cpp +41 -0
  1930. data/ext/v8/v8_locker.h +6 -0
  1931. data/ext/v8/v8_msg.cpp +68 -0
  1932. data/ext/v8/v8_msg.h +10 -0
  1933. data/ext/v8/v8_obj.cpp +96 -0
  1934. data/ext/v8/v8_obj.h +11 -0
  1935. data/ext/v8/v8_ref.cpp +37 -0
  1936. data/ext/v8/v8_ref.h +28 -0
  1937. data/ext/v8/v8_script.cpp +36 -0
  1938. data/ext/v8/v8_script.h +8 -0
  1939. data/ext/v8/v8_str.cpp +52 -0
  1940. data/ext/v8/v8_str.h +9 -0
  1941. data/ext/v8/v8_template.cpp +329 -0
  1942. data/ext/v8/v8_template.h +8 -0
  1943. data/ext/v8/v8_try_catch.cpp +99 -0
  1944. data/ext/v8/v8_try_catch.h +5 -0
  1945. data/ext/v8/v8_value.cpp +167 -0
  1946. data/ext/v8/v8_value.h +10 -0
  1947. data/lib/v8.rb +16 -0
  1948. data/lib/v8/access.rb +87 -0
  1949. data/lib/v8/array.rb +17 -0
  1950. data/lib/v8/cli.rb +131 -0
  1951. data/lib/v8/context.rb +88 -0
  1952. data/lib/v8/error.rb +129 -0
  1953. data/lib/v8/function.rb +28 -0
  1954. data/lib/v8/object.rb +69 -0
  1955. data/lib/v8/portal.rb +327 -0
  1956. data/lib/v8/portal/functions.rb +45 -0
  1957. data/lib/v8/tap.rb +9 -0
  1958. data/lib/v8/version.rb +3 -0
  1959. data/spec/ext/cxt_spec.rb +12 -0
  1960. data/spec/ext/func_spec.rb +49 -0
  1961. data/spec/ext/try_catch_spec.rb +32 -0
  1962. data/spec/redjs_helper.rb +3 -0
  1963. data/spec/spec_helper.rb +8 -0
  1964. data/spec/v8/error_spec.rb +131 -0
  1965. data/therubyracer-heroku.gemspec +24 -0
  1966. metadata +2061 -0
@@ -0,0 +1,4795 @@
1
+ // Copyright 2009 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #include "v8.h"
29
+
30
+ #include "api.h"
31
+ #include "arguments.h"
32
+ #include "bootstrapper.h"
33
+ #include "compiler.h"
34
+ #include "debug.h"
35
+ #include "execution.h"
36
+ #include "global-handles.h"
37
+ #include "heap-profiler.h"
38
+ #include "messages.h"
39
+ #include "platform.h"
40
+ #include "profile-generator-inl.h"
41
+ #include "serialize.h"
42
+ #include "snapshot.h"
43
+ #include "top.h"
44
+ #include "utils.h"
45
+ #include "v8threads.h"
46
+ #include "version.h"
47
+
48
+ #include "../include/v8-profiler.h"
49
+
50
+ #define LOG_API(expr) LOG(ApiEntryCall(expr))
51
+
52
+ #ifdef ENABLE_VMSTATE_TRACKING
53
+ #define ENTER_V8 i::VMState __state__(i::OTHER)
54
+ #define LEAVE_V8 i::VMState __state__(i::EXTERNAL)
55
+ #else
56
+ #define ENTER_V8 ((void) 0)
57
+ #define LEAVE_V8 ((void) 0)
58
+ #endif
59
+
60
+ namespace v8 {
61
+
62
+ #define ON_BAILOUT(location, code) \
63
+ if (IsDeadCheck(location) || v8::V8::IsExecutionTerminating()) { \
64
+ code; \
65
+ UNREACHABLE(); \
66
+ }
67
+
68
+
69
+ #define EXCEPTION_PREAMBLE() \
70
+ thread_local.IncrementCallDepth(); \
71
+ ASSERT(!i::Top::external_caught_exception()); \
72
+ bool has_pending_exception = false
73
+
74
+
75
+ #define EXCEPTION_BAILOUT_CHECK(value) \
76
+ do { \
77
+ thread_local.DecrementCallDepth(); \
78
+ if (has_pending_exception) { \
79
+ if (thread_local.CallDepthIsZero() && i::Top::is_out_of_memory()) { \
80
+ if (!thread_local.ignore_out_of_memory()) \
81
+ i::V8::FatalProcessOutOfMemory(NULL); \
82
+ } \
83
+ bool call_depth_is_zero = thread_local.CallDepthIsZero(); \
84
+ i::Top::OptionalRescheduleException(call_depth_is_zero); \
85
+ return value; \
86
+ } \
87
+ } while (false)
88
+
89
+
90
+ #define API_ENTRY_CHECK(msg) \
91
+ do { \
92
+ if (v8::Locker::IsActive()) { \
93
+ ApiCheck(i::ThreadManager::IsLockedByCurrentThread(), \
94
+ msg, \
95
+ "Entering the V8 API without proper locking in place"); \
96
+ } \
97
+ } while (false)
98
+
99
+ // --- D a t a t h a t i s s p e c i f i c t o a t h r e a d ---
100
+
101
+
102
+ static i::HandleScopeImplementer thread_local;
103
+
104
+
105
+ // --- E x c e p t i o n B e h a v i o r ---
106
+
107
+
108
+ static FatalErrorCallback exception_behavior = NULL;
109
+
110
+ static void DefaultFatalErrorHandler(const char* location,
111
+ const char* message) {
112
+ ENTER_V8;
113
+ API_Fatal(location, message);
114
+ }
115
+
116
+
117
+
118
+ static FatalErrorCallback& GetFatalErrorHandler() {
119
+ if (exception_behavior == NULL) {
120
+ exception_behavior = DefaultFatalErrorHandler;
121
+ }
122
+ return exception_behavior;
123
+ }
124
+
125
+
126
+
127
+ // When V8 cannot allocated memory FatalProcessOutOfMemory is called.
128
+ // The default fatal error handler is called and execution is stopped.
129
+ void i::V8::FatalProcessOutOfMemory(const char* location) {
130
+ i::HeapStats heap_stats;
131
+ int start_marker;
132
+ heap_stats.start_marker = &start_marker;
133
+ int new_space_size;
134
+ heap_stats.new_space_size = &new_space_size;
135
+ int new_space_capacity;
136
+ heap_stats.new_space_capacity = &new_space_capacity;
137
+ int old_pointer_space_size;
138
+ heap_stats.old_pointer_space_size = &old_pointer_space_size;
139
+ int old_pointer_space_capacity;
140
+ heap_stats.old_pointer_space_capacity = &old_pointer_space_capacity;
141
+ int old_data_space_size;
142
+ heap_stats.old_data_space_size = &old_data_space_size;
143
+ int old_data_space_capacity;
144
+ heap_stats.old_data_space_capacity = &old_data_space_capacity;
145
+ int code_space_size;
146
+ heap_stats.code_space_size = &code_space_size;
147
+ int code_space_capacity;
148
+ heap_stats.code_space_capacity = &code_space_capacity;
149
+ int map_space_size;
150
+ heap_stats.map_space_size = &map_space_size;
151
+ int map_space_capacity;
152
+ heap_stats.map_space_capacity = &map_space_capacity;
153
+ int cell_space_size;
154
+ heap_stats.cell_space_size = &cell_space_size;
155
+ int cell_space_capacity;
156
+ heap_stats.cell_space_capacity = &cell_space_capacity;
157
+ int lo_space_size;
158
+ heap_stats.lo_space_size = &lo_space_size;
159
+ int global_handle_count;
160
+ heap_stats.global_handle_count = &global_handle_count;
161
+ int weak_global_handle_count;
162
+ heap_stats.weak_global_handle_count = &weak_global_handle_count;
163
+ int pending_global_handle_count;
164
+ heap_stats.pending_global_handle_count = &pending_global_handle_count;
165
+ int near_death_global_handle_count;
166
+ heap_stats.near_death_global_handle_count = &near_death_global_handle_count;
167
+ int destroyed_global_handle_count;
168
+ heap_stats.destroyed_global_handle_count = &destroyed_global_handle_count;
169
+ int end_marker;
170
+ heap_stats.end_marker = &end_marker;
171
+ i::Heap::RecordStats(&heap_stats);
172
+ i::V8::SetFatalError();
173
+ FatalErrorCallback callback = GetFatalErrorHandler();
174
+ {
175
+ LEAVE_V8;
176
+ callback(location, "Allocation failed - process out of memory");
177
+ }
178
+ // If the callback returns, we stop execution.
179
+ UNREACHABLE();
180
+ }
181
+
182
+
183
+ void V8::SetFatalErrorHandler(FatalErrorCallback that) {
184
+ exception_behavior = that;
185
+ }
186
+
187
+
188
+ bool Utils::ReportApiFailure(const char* location, const char* message) {
189
+ FatalErrorCallback callback = GetFatalErrorHandler();
190
+ callback(location, message);
191
+ i::V8::SetFatalError();
192
+ return false;
193
+ }
194
+
195
+
196
+ bool V8::IsDead() {
197
+ return i::V8::IsDead();
198
+ }
199
+
200
+
201
+ static inline bool ApiCheck(bool condition,
202
+ const char* location,
203
+ const char* message) {
204
+ return condition ? true : Utils::ReportApiFailure(location, message);
205
+ }
206
+
207
+
208
+ static bool ReportV8Dead(const char* location) {
209
+ FatalErrorCallback callback = GetFatalErrorHandler();
210
+ callback(location, "V8 is no longer usable");
211
+ return true;
212
+ }
213
+
214
+
215
+ static bool ReportEmptyHandle(const char* location) {
216
+ FatalErrorCallback callback = GetFatalErrorHandler();
217
+ callback(location, "Reading from empty handle");
218
+ return true;
219
+ }
220
+
221
+
222
+ /**
223
+ * IsDeadCheck checks that the vm is usable. If, for instance, the vm has been
224
+ * out of memory at some point this check will fail. It should be called on
225
+ * entry to all methods that touch anything in the heap, except destructors
226
+ * which you sometimes can't avoid calling after the vm has crashed. Functions
227
+ * that call EnsureInitialized or ON_BAILOUT don't have to also call
228
+ * IsDeadCheck. ON_BAILOUT has the advantage over EnsureInitialized that you
229
+ * can arrange to return if the VM is dead. This is needed to ensure that no VM
230
+ * heap allocations are attempted on a dead VM. EnsureInitialized has the
231
+ * advantage over ON_BAILOUT that it actually initializes the VM if this has not
232
+ * yet been done.
233
+ */
234
+ static inline bool IsDeadCheck(const char* location) {
235
+ return !i::V8::IsRunning()
236
+ && i::V8::IsDead() ? ReportV8Dead(location) : false;
237
+ }
238
+
239
+
240
+ static inline bool EmptyCheck(const char* location, v8::Handle<v8::Data> obj) {
241
+ return obj.IsEmpty() ? ReportEmptyHandle(location) : false;
242
+ }
243
+
244
+
245
+ static inline bool EmptyCheck(const char* location, const v8::Data* obj) {
246
+ return (obj == 0) ? ReportEmptyHandle(location) : false;
247
+ }
248
+
249
+ // --- S t a t i c s ---
250
+
251
+
252
+ static i::StringInputBuffer write_input_buffer;
253
+
254
+
255
+ static inline bool EnsureInitialized(const char* location) {
256
+ if (i::V8::IsRunning()) {
257
+ return true;
258
+ }
259
+ if (IsDeadCheck(location)) {
260
+ return false;
261
+ }
262
+ return ApiCheck(v8::V8::Initialize(), location, "Error initializing V8");
263
+ }
264
+
265
+
266
+ ImplementationUtilities::HandleScopeData*
267
+ ImplementationUtilities::CurrentHandleScope() {
268
+ return &i::HandleScope::current_;
269
+ }
270
+
271
+
272
+ #ifdef DEBUG
273
+ void ImplementationUtilities::ZapHandleRange(i::Object** begin,
274
+ i::Object** end) {
275
+ i::HandleScope::ZapRange(begin, end);
276
+ }
277
+ #endif
278
+
279
+
280
+ v8::Handle<v8::Primitive> ImplementationUtilities::Undefined() {
281
+ if (!EnsureInitialized("v8::Undefined()")) return v8::Handle<v8::Primitive>();
282
+ return v8::Handle<Primitive>(ToApi<Primitive>(i::Factory::undefined_value()));
283
+ }
284
+
285
+
286
+ v8::Handle<v8::Primitive> ImplementationUtilities::Null() {
287
+ if (!EnsureInitialized("v8::Null()")) return v8::Handle<v8::Primitive>();
288
+ return v8::Handle<Primitive>(ToApi<Primitive>(i::Factory::null_value()));
289
+ }
290
+
291
+
292
+ v8::Handle<v8::Boolean> ImplementationUtilities::True() {
293
+ if (!EnsureInitialized("v8::True()")) return v8::Handle<v8::Boolean>();
294
+ return v8::Handle<v8::Boolean>(ToApi<Boolean>(i::Factory::true_value()));
295
+ }
296
+
297
+
298
+ v8::Handle<v8::Boolean> ImplementationUtilities::False() {
299
+ if (!EnsureInitialized("v8::False()")) return v8::Handle<v8::Boolean>();
300
+ return v8::Handle<v8::Boolean>(ToApi<Boolean>(i::Factory::false_value()));
301
+ }
302
+
303
+
304
+ void V8::SetFlagsFromString(const char* str, int length) {
305
+ i::FlagList::SetFlagsFromString(str, length);
306
+ }
307
+
308
+
309
+ void V8::SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags) {
310
+ i::FlagList::SetFlagsFromCommandLine(argc, argv, remove_flags);
311
+ }
312
+
313
+
314
+ v8::Handle<Value> ThrowException(v8::Handle<v8::Value> value) {
315
+ if (IsDeadCheck("v8::ThrowException()")) return v8::Handle<Value>();
316
+ ENTER_V8;
317
+ // If we're passed an empty handle, we throw an undefined exception
318
+ // to deal more gracefully with out of memory situations.
319
+ if (value.IsEmpty()) {
320
+ i::Top::ScheduleThrow(i::Heap::undefined_value());
321
+ } else {
322
+ i::Top::ScheduleThrow(*Utils::OpenHandle(*value));
323
+ }
324
+ return v8::Undefined();
325
+ }
326
+
327
+
328
+ RegisteredExtension* RegisteredExtension::first_extension_ = NULL;
329
+
330
+
331
+ RegisteredExtension::RegisteredExtension(Extension* extension)
332
+ : extension_(extension), state_(UNVISITED) { }
333
+
334
+
335
+ void RegisteredExtension::Register(RegisteredExtension* that) {
336
+ that->next_ = RegisteredExtension::first_extension_;
337
+ RegisteredExtension::first_extension_ = that;
338
+ }
339
+
340
+
341
+ void RegisterExtension(Extension* that) {
342
+ RegisteredExtension* extension = new RegisteredExtension(that);
343
+ RegisteredExtension::Register(extension);
344
+ }
345
+
346
+
347
+ Extension::Extension(const char* name,
348
+ const char* source,
349
+ int dep_count,
350
+ const char** deps)
351
+ : name_(name),
352
+ source_(source),
353
+ dep_count_(dep_count),
354
+ deps_(deps),
355
+ auto_enable_(false) { }
356
+
357
+
358
+ v8::Handle<Primitive> Undefined() {
359
+ LOG_API("Undefined");
360
+ return ImplementationUtilities::Undefined();
361
+ }
362
+
363
+
364
+ v8::Handle<Primitive> Null() {
365
+ LOG_API("Null");
366
+ return ImplementationUtilities::Null();
367
+ }
368
+
369
+
370
+ v8::Handle<Boolean> True() {
371
+ LOG_API("True");
372
+ return ImplementationUtilities::True();
373
+ }
374
+
375
+
376
+ v8::Handle<Boolean> False() {
377
+ LOG_API("False");
378
+ return ImplementationUtilities::False();
379
+ }
380
+
381
+
382
+ ResourceConstraints::ResourceConstraints()
383
+ : max_young_space_size_(0),
384
+ max_old_space_size_(0),
385
+ stack_limit_(NULL) { }
386
+
387
+
388
+ bool SetResourceConstraints(ResourceConstraints* constraints) {
389
+ int young_space_size = constraints->max_young_space_size();
390
+ int old_gen_size = constraints->max_old_space_size();
391
+ if (young_space_size != 0 || old_gen_size != 0) {
392
+ bool result = i::Heap::ConfigureHeap(young_space_size / 2, old_gen_size);
393
+ if (!result) return false;
394
+ }
395
+ if (constraints->stack_limit() != NULL) {
396
+ uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
397
+ i::StackGuard::SetStackLimit(limit);
398
+ }
399
+ return true;
400
+ }
401
+
402
+
403
+ i::Object** V8::GlobalizeReference(i::Object** obj) {
404
+ if (IsDeadCheck("V8::Persistent::New")) return NULL;
405
+ LOG_API("Persistent::New");
406
+ i::Handle<i::Object> result =
407
+ i::GlobalHandles::Create(*obj);
408
+ return result.location();
409
+ }
410
+
411
+
412
+ void V8::MakeWeak(i::Object** object, void* parameters,
413
+ WeakReferenceCallback callback) {
414
+ LOG_API("MakeWeak");
415
+ i::GlobalHandles::MakeWeak(object, parameters, callback);
416
+ }
417
+
418
+
419
+ void V8::ClearWeak(i::Object** obj) {
420
+ LOG_API("ClearWeak");
421
+ i::GlobalHandles::ClearWeakness(obj);
422
+ }
423
+
424
+
425
+ bool V8::IsGlobalNearDeath(i::Object** obj) {
426
+ LOG_API("IsGlobalNearDeath");
427
+ if (!i::V8::IsRunning()) return false;
428
+ return i::GlobalHandles::IsNearDeath(obj);
429
+ }
430
+
431
+
432
+ bool V8::IsGlobalWeak(i::Object** obj) {
433
+ LOG_API("IsGlobalWeak");
434
+ if (!i::V8::IsRunning()) return false;
435
+ return i::GlobalHandles::IsWeak(obj);
436
+ }
437
+
438
+
439
+ void V8::DisposeGlobal(i::Object** obj) {
440
+ LOG_API("DisposeGlobal");
441
+ if (!i::V8::IsRunning()) return;
442
+ i::GlobalHandles::Destroy(obj);
443
+ }
444
+
445
+ // --- H a n d l e s ---
446
+
447
+
448
+ HandleScope::HandleScope() : is_closed_(false) {
449
+ API_ENTRY_CHECK("HandleScope::HandleScope");
450
+ i::HandleScope::Enter(&previous_);
451
+ }
452
+
453
+
454
+ HandleScope::~HandleScope() {
455
+ if (!is_closed_) {
456
+ i::HandleScope::Leave(&previous_);
457
+ }
458
+ }
459
+
460
+
461
+ int HandleScope::NumberOfHandles() {
462
+ return i::HandleScope::NumberOfHandles();
463
+ }
464
+
465
+
466
+ i::Object** v8::HandleScope::CreateHandle(i::Object* value) {
467
+ return i::HandleScope::CreateHandle(value);
468
+ }
469
+
470
+
471
+ void Context::Enter() {
472
+ if (IsDeadCheck("v8::Context::Enter()")) return;
473
+ ENTER_V8;
474
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
475
+ thread_local.EnterContext(env);
476
+
477
+ thread_local.SaveContext(i::Top::context());
478
+ i::Top::set_context(*env);
479
+ }
480
+
481
+
482
+ void Context::Exit() {
483
+ if (!i::V8::IsRunning()) return;
484
+ if (!ApiCheck(thread_local.LeaveLastContext(),
485
+ "v8::Context::Exit()",
486
+ "Cannot exit non-entered context")) {
487
+ return;
488
+ }
489
+
490
+ // Content of 'last_context' could be NULL.
491
+ i::Context* last_context = thread_local.RestoreContext();
492
+ i::Top::set_context(last_context);
493
+ }
494
+
495
+
496
+ void Context::SetData(v8::Handle<String> data) {
497
+ if (IsDeadCheck("v8::Context::SetData()")) return;
498
+ ENTER_V8;
499
+ {
500
+ HandleScope scope;
501
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
502
+ i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
503
+ ASSERT(env->IsGlobalContext());
504
+ if (env->IsGlobalContext()) {
505
+ env->set_data(*raw_data);
506
+ }
507
+ }
508
+ }
509
+
510
+
511
+ v8::Local<v8::Value> Context::GetData() {
512
+ if (IsDeadCheck("v8::Context::GetData()")) return v8::Local<Value>();
513
+ ENTER_V8;
514
+ i::Object* raw_result = NULL;
515
+ {
516
+ HandleScope scope;
517
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
518
+ ASSERT(env->IsGlobalContext());
519
+ if (env->IsGlobalContext()) {
520
+ raw_result = env->data();
521
+ } else {
522
+ return Local<Value>();
523
+ }
524
+ }
525
+ i::Handle<i::Object> result(raw_result);
526
+ return Utils::ToLocal(result);
527
+ }
528
+
529
+
530
+ i::Object** v8::HandleScope::RawClose(i::Object** value) {
531
+ if (!ApiCheck(!is_closed_,
532
+ "v8::HandleScope::Close()",
533
+ "Local scope has already been closed")) {
534
+ return 0;
535
+ }
536
+ LOG_API("CloseHandleScope");
537
+
538
+ // Read the result before popping the handle block.
539
+ i::Object* result = NULL;
540
+ if (value != NULL) {
541
+ result = *value;
542
+ }
543
+ is_closed_ = true;
544
+ i::HandleScope::Leave(&previous_);
545
+
546
+ if (value == NULL) {
547
+ return NULL;
548
+ }
549
+
550
+ // Allocate a new handle on the previous handle block.
551
+ i::Handle<i::Object> handle(result);
552
+ return handle.location();
553
+ }
554
+
555
+
556
+ // --- N e a n d e r ---
557
+
558
+
559
+ // A constructor cannot easily return an error value, therefore it is necessary
560
+ // to check for a dead VM with ON_BAILOUT before constructing any Neander
561
+ // objects. To remind you about this there is no HandleScope in the
562
+ // NeanderObject constructor. When you add one to the site calling the
563
+ // constructor you should check that you ensured the VM was not dead first.
564
+ NeanderObject::NeanderObject(int size) {
565
+ EnsureInitialized("v8::Nowhere");
566
+ ENTER_V8;
567
+ value_ = i::Factory::NewNeanderObject();
568
+ i::Handle<i::FixedArray> elements = i::Factory::NewFixedArray(size);
569
+ value_->set_elements(*elements);
570
+ }
571
+
572
+
573
+ int NeanderObject::size() {
574
+ return i::FixedArray::cast(value_->elements())->length();
575
+ }
576
+
577
+
578
+ NeanderArray::NeanderArray() : obj_(2) {
579
+ obj_.set(0, i::Smi::FromInt(0));
580
+ }
581
+
582
+
583
+ int NeanderArray::length() {
584
+ return i::Smi::cast(obj_.get(0))->value();
585
+ }
586
+
587
+
588
+ i::Object* NeanderArray::get(int offset) {
589
+ ASSERT(0 <= offset);
590
+ ASSERT(offset < length());
591
+ return obj_.get(offset + 1);
592
+ }
593
+
594
+
595
+ // This method cannot easily return an error value, therefore it is necessary
596
+ // to check for a dead VM with ON_BAILOUT before calling it. To remind you
597
+ // about this there is no HandleScope in this method. When you add one to the
598
+ // site calling this method you should check that you ensured the VM was not
599
+ // dead first.
600
+ void NeanderArray::add(i::Handle<i::Object> value) {
601
+ int length = this->length();
602
+ int size = obj_.size();
603
+ if (length == size - 1) {
604
+ i::Handle<i::FixedArray> new_elms = i::Factory::NewFixedArray(2 * size);
605
+ for (int i = 0; i < length; i++)
606
+ new_elms->set(i + 1, get(i));
607
+ obj_.value()->set_elements(*new_elms);
608
+ }
609
+ obj_.set(length + 1, *value);
610
+ obj_.set(0, i::Smi::FromInt(length + 1));
611
+ }
612
+
613
+
614
+ void NeanderArray::set(int index, i::Object* value) {
615
+ if (index < 0 || index >= this->length()) return;
616
+ obj_.set(index + 1, value);
617
+ }
618
+
619
+
620
+ // --- T e m p l a t e ---
621
+
622
+
623
+ static void InitializeTemplate(i::Handle<i::TemplateInfo> that, int type) {
624
+ that->set_tag(i::Smi::FromInt(type));
625
+ }
626
+
627
+
628
+ void Template::Set(v8::Handle<String> name, v8::Handle<Data> value,
629
+ v8::PropertyAttribute attribute) {
630
+ if (IsDeadCheck("v8::Template::SetProperty()")) return;
631
+ ENTER_V8;
632
+ HandleScope scope;
633
+ i::Handle<i::Object> list(Utils::OpenHandle(this)->property_list());
634
+ if (list->IsUndefined()) {
635
+ list = NeanderArray().value();
636
+ Utils::OpenHandle(this)->set_property_list(*list);
637
+ }
638
+ NeanderArray array(list);
639
+ array.add(Utils::OpenHandle(*name));
640
+ array.add(Utils::OpenHandle(*value));
641
+ array.add(Utils::OpenHandle(*v8::Integer::New(attribute)));
642
+ }
643
+
644
+
645
+ // --- F u n c t i o n T e m p l a t e ---
646
+ static void InitializeFunctionTemplate(
647
+ i::Handle<i::FunctionTemplateInfo> info) {
648
+ info->set_tag(i::Smi::FromInt(Consts::FUNCTION_TEMPLATE));
649
+ info->set_flag(0);
650
+ }
651
+
652
+
653
+ Local<ObjectTemplate> FunctionTemplate::PrototypeTemplate() {
654
+ if (IsDeadCheck("v8::FunctionTemplate::PrototypeTemplate()")) {
655
+ return Local<ObjectTemplate>();
656
+ }
657
+ ENTER_V8;
658
+ i::Handle<i::Object> result(Utils::OpenHandle(this)->prototype_template());
659
+ if (result->IsUndefined()) {
660
+ result = Utils::OpenHandle(*ObjectTemplate::New());
661
+ Utils::OpenHandle(this)->set_prototype_template(*result);
662
+ }
663
+ return Local<ObjectTemplate>(ToApi<ObjectTemplate>(result));
664
+ }
665
+
666
+
667
+ void FunctionTemplate::Inherit(v8::Handle<FunctionTemplate> value) {
668
+ if (IsDeadCheck("v8::FunctionTemplate::Inherit()")) return;
669
+ ENTER_V8;
670
+ Utils::OpenHandle(this)->set_parent_template(*Utils::OpenHandle(*value));
671
+ }
672
+
673
+
674
+ // To distinguish the function templates, so that we can find them in the
675
+ // function cache of the global context.
676
+ static int next_serial_number = 0;
677
+
678
+
679
+ Local<FunctionTemplate> FunctionTemplate::New(InvocationCallback callback,
680
+ v8::Handle<Value> data, v8::Handle<Signature> signature) {
681
+ EnsureInitialized("v8::FunctionTemplate::New()");
682
+ LOG_API("FunctionTemplate::New");
683
+ ENTER_V8;
684
+ i::Handle<i::Struct> struct_obj =
685
+ i::Factory::NewStruct(i::FUNCTION_TEMPLATE_INFO_TYPE);
686
+ i::Handle<i::FunctionTemplateInfo> obj =
687
+ i::Handle<i::FunctionTemplateInfo>::cast(struct_obj);
688
+ InitializeFunctionTemplate(obj);
689
+ obj->set_serial_number(i::Smi::FromInt(next_serial_number++));
690
+ if (callback != 0) {
691
+ if (data.IsEmpty()) data = v8::Undefined();
692
+ Utils::ToLocal(obj)->SetCallHandler(callback, data);
693
+ }
694
+ obj->set_undetectable(false);
695
+ obj->set_needs_access_check(false);
696
+
697
+ if (!signature.IsEmpty())
698
+ obj->set_signature(*Utils::OpenHandle(*signature));
699
+ return Utils::ToLocal(obj);
700
+ }
701
+
702
+
703
+ Local<Signature> Signature::New(Handle<FunctionTemplate> receiver,
704
+ int argc, Handle<FunctionTemplate> argv[]) {
705
+ EnsureInitialized("v8::Signature::New()");
706
+ LOG_API("Signature::New");
707
+ ENTER_V8;
708
+ i::Handle<i::Struct> struct_obj =
709
+ i::Factory::NewStruct(i::SIGNATURE_INFO_TYPE);
710
+ i::Handle<i::SignatureInfo> obj =
711
+ i::Handle<i::SignatureInfo>::cast(struct_obj);
712
+ if (!receiver.IsEmpty()) obj->set_receiver(*Utils::OpenHandle(*receiver));
713
+ if (argc > 0) {
714
+ i::Handle<i::FixedArray> args = i::Factory::NewFixedArray(argc);
715
+ for (int i = 0; i < argc; i++) {
716
+ if (!argv[i].IsEmpty())
717
+ args->set(i, *Utils::OpenHandle(*argv[i]));
718
+ }
719
+ obj->set_args(*args);
720
+ }
721
+ return Utils::ToLocal(obj);
722
+ }
723
+
724
+
725
+ Local<TypeSwitch> TypeSwitch::New(Handle<FunctionTemplate> type) {
726
+ Handle<FunctionTemplate> types[1] = { type };
727
+ return TypeSwitch::New(1, types);
728
+ }
729
+
730
+
731
+ Local<TypeSwitch> TypeSwitch::New(int argc, Handle<FunctionTemplate> types[]) {
732
+ EnsureInitialized("v8::TypeSwitch::New()");
733
+ LOG_API("TypeSwitch::New");
734
+ ENTER_V8;
735
+ i::Handle<i::FixedArray> vector = i::Factory::NewFixedArray(argc);
736
+ for (int i = 0; i < argc; i++)
737
+ vector->set(i, *Utils::OpenHandle(*types[i]));
738
+ i::Handle<i::Struct> struct_obj =
739
+ i::Factory::NewStruct(i::TYPE_SWITCH_INFO_TYPE);
740
+ i::Handle<i::TypeSwitchInfo> obj =
741
+ i::Handle<i::TypeSwitchInfo>::cast(struct_obj);
742
+ obj->set_types(*vector);
743
+ return Utils::ToLocal(obj);
744
+ }
745
+
746
+
747
+ int TypeSwitch::match(v8::Handle<Value> value) {
748
+ LOG_API("TypeSwitch::match");
749
+ i::Handle<i::Object> obj = Utils::OpenHandle(*value);
750
+ i::Handle<i::TypeSwitchInfo> info = Utils::OpenHandle(this);
751
+ i::FixedArray* types = i::FixedArray::cast(info->types());
752
+ for (int i = 0; i < types->length(); i++) {
753
+ if (obj->IsInstanceOf(i::FunctionTemplateInfo::cast(types->get(i))))
754
+ return i + 1;
755
+ }
756
+ return 0;
757
+ }
758
+
759
+
760
+ void FunctionTemplate::SetCallHandler(InvocationCallback callback,
761
+ v8::Handle<Value> data) {
762
+ if (IsDeadCheck("v8::FunctionTemplate::SetCallHandler()")) return;
763
+ ENTER_V8;
764
+ HandleScope scope;
765
+ i::Handle<i::Struct> struct_obj =
766
+ i::Factory::NewStruct(i::CALL_HANDLER_INFO_TYPE);
767
+ i::Handle<i::CallHandlerInfo> obj =
768
+ i::Handle<i::CallHandlerInfo>::cast(struct_obj);
769
+ obj->set_callback(*FromCData(callback));
770
+ if (data.IsEmpty()) data = v8::Undefined();
771
+ obj->set_data(*Utils::OpenHandle(*data));
772
+ Utils::OpenHandle(this)->set_call_code(*obj);
773
+ }
774
+
775
+
776
+ static i::Handle<i::AccessorInfo> MakeAccessorInfo(
777
+ v8::Handle<String> name,
778
+ AccessorGetter getter,
779
+ AccessorSetter setter,
780
+ v8::Handle<Value> data,
781
+ v8::AccessControl settings,
782
+ v8::PropertyAttribute attributes) {
783
+ i::Handle<i::AccessorInfo> obj = i::Factory::NewAccessorInfo();
784
+ ASSERT(getter != NULL);
785
+ obj->set_getter(*FromCData(getter));
786
+ obj->set_setter(*FromCData(setter));
787
+ if (data.IsEmpty()) data = v8::Undefined();
788
+ obj->set_data(*Utils::OpenHandle(*data));
789
+ obj->set_name(*Utils::OpenHandle(*name));
790
+ if (settings & ALL_CAN_READ) obj->set_all_can_read(true);
791
+ if (settings & ALL_CAN_WRITE) obj->set_all_can_write(true);
792
+ if (settings & PROHIBITS_OVERWRITING) obj->set_prohibits_overwriting(true);
793
+ obj->set_property_attributes(static_cast<PropertyAttributes>(attributes));
794
+ return obj;
795
+ }
796
+
797
+
798
+ void FunctionTemplate::AddInstancePropertyAccessor(
799
+ v8::Handle<String> name,
800
+ AccessorGetter getter,
801
+ AccessorSetter setter,
802
+ v8::Handle<Value> data,
803
+ v8::AccessControl settings,
804
+ v8::PropertyAttribute attributes) {
805
+ if (IsDeadCheck("v8::FunctionTemplate::AddInstancePropertyAccessor()")) {
806
+ return;
807
+ }
808
+ ENTER_V8;
809
+ HandleScope scope;
810
+
811
+ i::Handle<i::AccessorInfo> obj = MakeAccessorInfo(name,
812
+ getter, setter, data,
813
+ settings, attributes);
814
+ i::Handle<i::Object> list(Utils::OpenHandle(this)->property_accessors());
815
+ if (list->IsUndefined()) {
816
+ list = NeanderArray().value();
817
+ Utils::OpenHandle(this)->set_property_accessors(*list);
818
+ }
819
+ NeanderArray array(list);
820
+ array.add(obj);
821
+ }
822
+
823
+
824
+ Local<ObjectTemplate> FunctionTemplate::InstanceTemplate() {
825
+ if (IsDeadCheck("v8::FunctionTemplate::InstanceTemplate()")
826
+ || EmptyCheck("v8::FunctionTemplate::InstanceTemplate()", this))
827
+ return Local<ObjectTemplate>();
828
+ ENTER_V8;
829
+ if (Utils::OpenHandle(this)->instance_template()->IsUndefined()) {
830
+ Local<ObjectTemplate> templ =
831
+ ObjectTemplate::New(v8::Handle<FunctionTemplate>(this));
832
+ Utils::OpenHandle(this)->set_instance_template(*Utils::OpenHandle(*templ));
833
+ }
834
+ i::Handle<i::ObjectTemplateInfo> result(i::ObjectTemplateInfo::cast(
835
+ Utils::OpenHandle(this)->instance_template()));
836
+ return Utils::ToLocal(result);
837
+ }
838
+
839
+
840
+ void FunctionTemplate::SetClassName(Handle<String> name) {
841
+ if (IsDeadCheck("v8::FunctionTemplate::SetClassName()")) return;
842
+ ENTER_V8;
843
+ Utils::OpenHandle(this)->set_class_name(*Utils::OpenHandle(*name));
844
+ }
845
+
846
+
847
+ void FunctionTemplate::SetHiddenPrototype(bool value) {
848
+ if (IsDeadCheck("v8::FunctionTemplate::SetHiddenPrototype()")) return;
849
+ ENTER_V8;
850
+ Utils::OpenHandle(this)->set_hidden_prototype(value);
851
+ }
852
+
853
+
854
+ void FunctionTemplate::SetNamedInstancePropertyHandler(
855
+ NamedPropertyGetter getter,
856
+ NamedPropertySetter setter,
857
+ NamedPropertyQuery query,
858
+ NamedPropertyDeleter remover,
859
+ NamedPropertyEnumerator enumerator,
860
+ Handle<Value> data) {
861
+ if (IsDeadCheck("v8::FunctionTemplate::SetNamedInstancePropertyHandler()")) {
862
+ return;
863
+ }
864
+ ENTER_V8;
865
+ HandleScope scope;
866
+ i::Handle<i::Struct> struct_obj =
867
+ i::Factory::NewStruct(i::INTERCEPTOR_INFO_TYPE);
868
+ i::Handle<i::InterceptorInfo> obj =
869
+ i::Handle<i::InterceptorInfo>::cast(struct_obj);
870
+ if (getter != 0) obj->set_getter(*FromCData(getter));
871
+ if (setter != 0) obj->set_setter(*FromCData(setter));
872
+ if (query != 0) obj->set_query(*FromCData(query));
873
+ if (remover != 0) obj->set_deleter(*FromCData(remover));
874
+ if (enumerator != 0) obj->set_enumerator(*FromCData(enumerator));
875
+ if (data.IsEmpty()) data = v8::Undefined();
876
+ obj->set_data(*Utils::OpenHandle(*data));
877
+ Utils::OpenHandle(this)->set_named_property_handler(*obj);
878
+ }
879
+
880
+
881
+ void FunctionTemplate::SetIndexedInstancePropertyHandler(
882
+ IndexedPropertyGetter getter,
883
+ IndexedPropertySetter setter,
884
+ IndexedPropertyQuery query,
885
+ IndexedPropertyDeleter remover,
886
+ IndexedPropertyEnumerator enumerator,
887
+ Handle<Value> data) {
888
+ if (IsDeadCheck(
889
+ "v8::FunctionTemplate::SetIndexedInstancePropertyHandler()")) {
890
+ return;
891
+ }
892
+ ENTER_V8;
893
+ HandleScope scope;
894
+ i::Handle<i::Struct> struct_obj =
895
+ i::Factory::NewStruct(i::INTERCEPTOR_INFO_TYPE);
896
+ i::Handle<i::InterceptorInfo> obj =
897
+ i::Handle<i::InterceptorInfo>::cast(struct_obj);
898
+ if (getter != 0) obj->set_getter(*FromCData(getter));
899
+ if (setter != 0) obj->set_setter(*FromCData(setter));
900
+ if (query != 0) obj->set_query(*FromCData(query));
901
+ if (remover != 0) obj->set_deleter(*FromCData(remover));
902
+ if (enumerator != 0) obj->set_enumerator(*FromCData(enumerator));
903
+ if (data.IsEmpty()) data = v8::Undefined();
904
+ obj->set_data(*Utils::OpenHandle(*data));
905
+ Utils::OpenHandle(this)->set_indexed_property_handler(*obj);
906
+ }
907
+
908
+
909
+ void FunctionTemplate::SetInstanceCallAsFunctionHandler(
910
+ InvocationCallback callback,
911
+ Handle<Value> data) {
912
+ if (IsDeadCheck("v8::FunctionTemplate::SetInstanceCallAsFunctionHandler()")) {
913
+ return;
914
+ }
915
+ ENTER_V8;
916
+ HandleScope scope;
917
+ i::Handle<i::Struct> struct_obj =
918
+ i::Factory::NewStruct(i::CALL_HANDLER_INFO_TYPE);
919
+ i::Handle<i::CallHandlerInfo> obj =
920
+ i::Handle<i::CallHandlerInfo>::cast(struct_obj);
921
+ obj->set_callback(*FromCData(callback));
922
+ if (data.IsEmpty()) data = v8::Undefined();
923
+ obj->set_data(*Utils::OpenHandle(*data));
924
+ Utils::OpenHandle(this)->set_instance_call_handler(*obj);
925
+ }
926
+
927
+
928
+ // --- O b j e c t T e m p l a t e ---
929
+
930
+
931
+ Local<ObjectTemplate> ObjectTemplate::New() {
932
+ return New(Local<FunctionTemplate>());
933
+ }
934
+
935
+
936
+ Local<ObjectTemplate> ObjectTemplate::New(
937
+ v8::Handle<FunctionTemplate> constructor) {
938
+ if (IsDeadCheck("v8::ObjectTemplate::New()")) return Local<ObjectTemplate>();
939
+ EnsureInitialized("v8::ObjectTemplate::New()");
940
+ LOG_API("ObjectTemplate::New");
941
+ ENTER_V8;
942
+ i::Handle<i::Struct> struct_obj =
943
+ i::Factory::NewStruct(i::OBJECT_TEMPLATE_INFO_TYPE);
944
+ i::Handle<i::ObjectTemplateInfo> obj =
945
+ i::Handle<i::ObjectTemplateInfo>::cast(struct_obj);
946
+ InitializeTemplate(obj, Consts::OBJECT_TEMPLATE);
947
+ if (!constructor.IsEmpty())
948
+ obj->set_constructor(*Utils::OpenHandle(*constructor));
949
+ obj->set_internal_field_count(i::Smi::FromInt(0));
950
+ return Utils::ToLocal(obj);
951
+ }
952
+
953
+
954
+ // Ensure that the object template has a constructor. If no
955
+ // constructor is available we create one.
956
+ static void EnsureConstructor(ObjectTemplate* object_template) {
957
+ if (Utils::OpenHandle(object_template)->constructor()->IsUndefined()) {
958
+ Local<FunctionTemplate> templ = FunctionTemplate::New();
959
+ i::Handle<i::FunctionTemplateInfo> constructor = Utils::OpenHandle(*templ);
960
+ constructor->set_instance_template(*Utils::OpenHandle(object_template));
961
+ Utils::OpenHandle(object_template)->set_constructor(*constructor);
962
+ }
963
+ }
964
+
965
+
966
+ void ObjectTemplate::SetAccessor(v8::Handle<String> name,
967
+ AccessorGetter getter,
968
+ AccessorSetter setter,
969
+ v8::Handle<Value> data,
970
+ AccessControl settings,
971
+ PropertyAttribute attribute) {
972
+ if (IsDeadCheck("v8::ObjectTemplate::SetAccessor()")) return;
973
+ ENTER_V8;
974
+ HandleScope scope;
975
+ EnsureConstructor(this);
976
+ i::FunctionTemplateInfo* constructor =
977
+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
978
+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
979
+ Utils::ToLocal(cons)->AddInstancePropertyAccessor(name,
980
+ getter,
981
+ setter,
982
+ data,
983
+ settings,
984
+ attribute);
985
+ }
986
+
987
+
988
+ void ObjectTemplate::SetNamedPropertyHandler(NamedPropertyGetter getter,
989
+ NamedPropertySetter setter,
990
+ NamedPropertyQuery query,
991
+ NamedPropertyDeleter remover,
992
+ NamedPropertyEnumerator enumerator,
993
+ Handle<Value> data) {
994
+ if (IsDeadCheck("v8::ObjectTemplate::SetNamedPropertyHandler()")) return;
995
+ ENTER_V8;
996
+ HandleScope scope;
997
+ EnsureConstructor(this);
998
+ i::FunctionTemplateInfo* constructor =
999
+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
1000
+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
1001
+ Utils::ToLocal(cons)->SetNamedInstancePropertyHandler(getter,
1002
+ setter,
1003
+ query,
1004
+ remover,
1005
+ enumerator,
1006
+ data);
1007
+ }
1008
+
1009
+
1010
+ void ObjectTemplate::MarkAsUndetectable() {
1011
+ if (IsDeadCheck("v8::ObjectTemplate::MarkAsUndetectable()")) return;
1012
+ ENTER_V8;
1013
+ HandleScope scope;
1014
+ EnsureConstructor(this);
1015
+ i::FunctionTemplateInfo* constructor =
1016
+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
1017
+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
1018
+ cons->set_undetectable(true);
1019
+ }
1020
+
1021
+
1022
+ void ObjectTemplate::SetAccessCheckCallbacks(
1023
+ NamedSecurityCallback named_callback,
1024
+ IndexedSecurityCallback indexed_callback,
1025
+ Handle<Value> data,
1026
+ bool turned_on_by_default) {
1027
+ if (IsDeadCheck("v8::ObjectTemplate::SetAccessCheckCallbacks()")) return;
1028
+ ENTER_V8;
1029
+ HandleScope scope;
1030
+ EnsureConstructor(this);
1031
+
1032
+ i::Handle<i::Struct> struct_info =
1033
+ i::Factory::NewStruct(i::ACCESS_CHECK_INFO_TYPE);
1034
+ i::Handle<i::AccessCheckInfo> info =
1035
+ i::Handle<i::AccessCheckInfo>::cast(struct_info);
1036
+ info->set_named_callback(*FromCData(named_callback));
1037
+ info->set_indexed_callback(*FromCData(indexed_callback));
1038
+ if (data.IsEmpty()) data = v8::Undefined();
1039
+ info->set_data(*Utils::OpenHandle(*data));
1040
+
1041
+ i::FunctionTemplateInfo* constructor =
1042
+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
1043
+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
1044
+ cons->set_access_check_info(*info);
1045
+ cons->set_needs_access_check(turned_on_by_default);
1046
+ }
1047
+
1048
+
1049
+ void ObjectTemplate::SetIndexedPropertyHandler(
1050
+ IndexedPropertyGetter getter,
1051
+ IndexedPropertySetter setter,
1052
+ IndexedPropertyQuery query,
1053
+ IndexedPropertyDeleter remover,
1054
+ IndexedPropertyEnumerator enumerator,
1055
+ Handle<Value> data) {
1056
+ if (IsDeadCheck("v8::ObjectTemplate::SetIndexedPropertyHandler()")) return;
1057
+ ENTER_V8;
1058
+ HandleScope scope;
1059
+ EnsureConstructor(this);
1060
+ i::FunctionTemplateInfo* constructor =
1061
+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
1062
+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
1063
+ Utils::ToLocal(cons)->SetIndexedInstancePropertyHandler(getter,
1064
+ setter,
1065
+ query,
1066
+ remover,
1067
+ enumerator,
1068
+ data);
1069
+ }
1070
+
1071
+
1072
+ void ObjectTemplate::SetCallAsFunctionHandler(InvocationCallback callback,
1073
+ Handle<Value> data) {
1074
+ if (IsDeadCheck("v8::ObjectTemplate::SetCallAsFunctionHandler()")) return;
1075
+ ENTER_V8;
1076
+ HandleScope scope;
1077
+ EnsureConstructor(this);
1078
+ i::FunctionTemplateInfo* constructor =
1079
+ i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
1080
+ i::Handle<i::FunctionTemplateInfo> cons(constructor);
1081
+ Utils::ToLocal(cons)->SetInstanceCallAsFunctionHandler(callback, data);
1082
+ }
1083
+
1084
+
1085
+ int ObjectTemplate::InternalFieldCount() {
1086
+ if (IsDeadCheck("v8::ObjectTemplate::InternalFieldCount()")) {
1087
+ return 0;
1088
+ }
1089
+ return i::Smi::cast(Utils::OpenHandle(this)->internal_field_count())->value();
1090
+ }
1091
+
1092
+
1093
+ void ObjectTemplate::SetInternalFieldCount(int value) {
1094
+ if (IsDeadCheck("v8::ObjectTemplate::SetInternalFieldCount()")) return;
1095
+ if (!ApiCheck(i::Smi::IsValid(value),
1096
+ "v8::ObjectTemplate::SetInternalFieldCount()",
1097
+ "Invalid internal field count")) {
1098
+ return;
1099
+ }
1100
+ ENTER_V8;
1101
+ if (value > 0) {
1102
+ // The internal field count is set by the constructor function's
1103
+ // construct code, so we ensure that there is a constructor
1104
+ // function to do the setting.
1105
+ EnsureConstructor(this);
1106
+ }
1107
+ Utils::OpenHandle(this)->set_internal_field_count(i::Smi::FromInt(value));
1108
+ }
1109
+
1110
+
1111
+ // --- S c r i p t D a t a ---
1112
+
1113
+
1114
+ ScriptData* ScriptData::PreCompile(const char* input, int length) {
1115
+ unibrow::Utf8InputBuffer<> buf(input, length);
1116
+ return i::PreParse(i::Handle<i::String>(), &buf, NULL);
1117
+ }
1118
+
1119
+
1120
+ ScriptData* ScriptData::PreCompile(v8::Handle<String> source) {
1121
+ i::Handle<i::String> str = Utils::OpenHandle(*source);
1122
+ return i::PreParse(str, NULL, NULL);
1123
+ }
1124
+
1125
+
1126
+ ScriptData* ScriptData::New(const char* data, int length) {
1127
+ // Return an empty ScriptData if the length is obviously invalid.
1128
+ if (length % sizeof(unsigned) != 0) {
1129
+ return new i::ScriptDataImpl(i::Vector<unsigned>());
1130
+ }
1131
+
1132
+ // Copy the data to ensure it is properly aligned.
1133
+ int deserialized_data_length = length / sizeof(unsigned);
1134
+ unsigned* deserialized_data = i::NewArray<unsigned>(deserialized_data_length);
1135
+ memcpy(deserialized_data, data, length);
1136
+
1137
+ return new i::ScriptDataImpl(
1138
+ i::Vector<unsigned>(deserialized_data, deserialized_data_length));
1139
+ }
1140
+
1141
+
1142
+ // --- S c r i p t ---
1143
+
1144
+
1145
+ Local<Script> Script::New(v8::Handle<String> source,
1146
+ v8::ScriptOrigin* origin,
1147
+ v8::ScriptData* pre_data,
1148
+ v8::Handle<String> script_data) {
1149
+ ON_BAILOUT("v8::Script::New()", return Local<Script>());
1150
+ LOG_API("Script::New");
1151
+ ENTER_V8;
1152
+ i::Handle<i::String> str = Utils::OpenHandle(*source);
1153
+ i::Handle<i::Object> name_obj;
1154
+ int line_offset = 0;
1155
+ int column_offset = 0;
1156
+ if (origin != NULL) {
1157
+ if (!origin->ResourceName().IsEmpty()) {
1158
+ name_obj = Utils::OpenHandle(*origin->ResourceName());
1159
+ }
1160
+ if (!origin->ResourceLineOffset().IsEmpty()) {
1161
+ line_offset = static_cast<int>(origin->ResourceLineOffset()->Value());
1162
+ }
1163
+ if (!origin->ResourceColumnOffset().IsEmpty()) {
1164
+ column_offset = static_cast<int>(origin->ResourceColumnOffset()->Value());
1165
+ }
1166
+ }
1167
+ EXCEPTION_PREAMBLE();
1168
+ i::ScriptDataImpl* pre_data_impl = static_cast<i::ScriptDataImpl*>(pre_data);
1169
+ // We assert that the pre-data is sane, even though we can actually
1170
+ // handle it if it turns out not to be in release mode.
1171
+ ASSERT(pre_data_impl == NULL || pre_data_impl->SanityCheck());
1172
+ // If the pre-data isn't sane we simply ignore it
1173
+ if (pre_data_impl != NULL && !pre_data_impl->SanityCheck()) {
1174
+ pre_data_impl = NULL;
1175
+ }
1176
+ i::Handle<i::SharedFunctionInfo> result =
1177
+ i::Compiler::Compile(str,
1178
+ name_obj,
1179
+ line_offset,
1180
+ column_offset,
1181
+ NULL,
1182
+ pre_data_impl,
1183
+ Utils::OpenHandle(*script_data),
1184
+ i::NOT_NATIVES_CODE);
1185
+ has_pending_exception = result.is_null();
1186
+ EXCEPTION_BAILOUT_CHECK(Local<Script>());
1187
+ return Local<Script>(ToApi<Script>(result));
1188
+ }
1189
+
1190
+
1191
+ Local<Script> Script::New(v8::Handle<String> source,
1192
+ v8::Handle<Value> file_name) {
1193
+ ScriptOrigin origin(file_name);
1194
+ return New(source, &origin);
1195
+ }
1196
+
1197
+
1198
+ Local<Script> Script::Compile(v8::Handle<String> source,
1199
+ v8::ScriptOrigin* origin,
1200
+ v8::ScriptData* pre_data,
1201
+ v8::Handle<String> script_data) {
1202
+ ON_BAILOUT("v8::Script::Compile()", return Local<Script>());
1203
+ LOG_API("Script::Compile");
1204
+ ENTER_V8;
1205
+ Local<Script> generic = New(source, origin, pre_data, script_data);
1206
+ if (generic.IsEmpty())
1207
+ return generic;
1208
+ i::Handle<i::Object> obj = Utils::OpenHandle(*generic);
1209
+ i::Handle<i::SharedFunctionInfo> function =
1210
+ i::Handle<i::SharedFunctionInfo>(i::SharedFunctionInfo::cast(*obj));
1211
+ i::Handle<i::JSFunction> result =
1212
+ i::Factory::NewFunctionFromSharedFunctionInfo(function,
1213
+ i::Top::global_context());
1214
+ return Local<Script>(ToApi<Script>(result));
1215
+ }
1216
+
1217
+
1218
+ Local<Script> Script::Compile(v8::Handle<String> source,
1219
+ v8::Handle<Value> file_name,
1220
+ v8::Handle<String> script_data) {
1221
+ ScriptOrigin origin(file_name);
1222
+ return Compile(source, &origin, 0, script_data);
1223
+ }
1224
+
1225
+
1226
+ Local<Value> Script::Run() {
1227
+ ON_BAILOUT("v8::Script::Run()", return Local<Value>());
1228
+ LOG_API("Script::Run");
1229
+ ENTER_V8;
1230
+ i::Object* raw_result = NULL;
1231
+ {
1232
+ HandleScope scope;
1233
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1234
+ i::Handle<i::JSFunction> fun;
1235
+ if (obj->IsSharedFunctionInfo()) {
1236
+ i::Handle<i::SharedFunctionInfo>
1237
+ function_info(i::SharedFunctionInfo::cast(*obj));
1238
+ fun = i::Factory::NewFunctionFromSharedFunctionInfo(
1239
+ function_info, i::Top::global_context());
1240
+ } else {
1241
+ fun = i::Handle<i::JSFunction>(i::JSFunction::cast(*obj));
1242
+ }
1243
+ EXCEPTION_PREAMBLE();
1244
+ i::Handle<i::Object> receiver(i::Top::context()->global_proxy());
1245
+ i::Handle<i::Object> result =
1246
+ i::Execution::Call(fun, receiver, 0, NULL, &has_pending_exception);
1247
+ EXCEPTION_BAILOUT_CHECK(Local<Value>());
1248
+ raw_result = *result;
1249
+ }
1250
+ i::Handle<i::Object> result(raw_result);
1251
+ return Utils::ToLocal(result);
1252
+ }
1253
+
1254
+
1255
+ static i::Handle<i::SharedFunctionInfo> OpenScript(Script* script) {
1256
+ i::Handle<i::Object> obj = Utils::OpenHandle(script);
1257
+ i::Handle<i::SharedFunctionInfo> result;
1258
+ if (obj->IsSharedFunctionInfo()) {
1259
+ result =
1260
+ i::Handle<i::SharedFunctionInfo>(i::SharedFunctionInfo::cast(*obj));
1261
+ } else {
1262
+ result =
1263
+ i::Handle<i::SharedFunctionInfo>(i::JSFunction::cast(*obj)->shared());
1264
+ }
1265
+ return result;
1266
+ }
1267
+
1268
+
1269
+ Local<Value> Script::Id() {
1270
+ ON_BAILOUT("v8::Script::Id()", return Local<Value>());
1271
+ LOG_API("Script::Id");
1272
+ i::Object* raw_id = NULL;
1273
+ {
1274
+ HandleScope scope;
1275
+ i::Handle<i::SharedFunctionInfo> function_info = OpenScript(this);
1276
+ i::Handle<i::Script> script(i::Script::cast(function_info->script()));
1277
+ i::Handle<i::Object> id(script->id());
1278
+ raw_id = *id;
1279
+ }
1280
+ i::Handle<i::Object> id(raw_id);
1281
+ return Utils::ToLocal(id);
1282
+ }
1283
+
1284
+
1285
+ void Script::SetData(v8::Handle<String> data) {
1286
+ ON_BAILOUT("v8::Script::SetData()", return);
1287
+ LOG_API("Script::SetData");
1288
+ {
1289
+ HandleScope scope;
1290
+ i::Handle<i::SharedFunctionInfo> function_info = OpenScript(this);
1291
+ i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
1292
+ i::Handle<i::Script> script(i::Script::cast(function_info->script()));
1293
+ script->set_data(*raw_data);
1294
+ }
1295
+ }
1296
+
1297
+
1298
+ // --- E x c e p t i o n s ---
1299
+
1300
+
1301
+ v8::TryCatch::TryCatch()
1302
+ : next_(i::Top::try_catch_handler_address()),
1303
+ exception_(i::Heap::the_hole_value()),
1304
+ message_(i::Smi::FromInt(0)),
1305
+ is_verbose_(false),
1306
+ can_continue_(true),
1307
+ capture_message_(true),
1308
+ rethrow_(false) {
1309
+ i::Top::RegisterTryCatchHandler(this);
1310
+ }
1311
+
1312
+
1313
+ v8::TryCatch::~TryCatch() {
1314
+ if (rethrow_) {
1315
+ v8::HandleScope scope;
1316
+ v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(Exception());
1317
+ i::Top::UnregisterTryCatchHandler(this);
1318
+ v8::ThrowException(exc);
1319
+ } else {
1320
+ i::Top::UnregisterTryCatchHandler(this);
1321
+ }
1322
+ }
1323
+
1324
+
1325
+ bool v8::TryCatch::HasCaught() const {
1326
+ return !reinterpret_cast<i::Object*>(exception_)->IsTheHole();
1327
+ }
1328
+
1329
+
1330
+ bool v8::TryCatch::CanContinue() const {
1331
+ return can_continue_;
1332
+ }
1333
+
1334
+
1335
+ v8::Handle<v8::Value> v8::TryCatch::ReThrow() {
1336
+ if (!HasCaught()) return v8::Local<v8::Value>();
1337
+ rethrow_ = true;
1338
+ return v8::Undefined();
1339
+ }
1340
+
1341
+
1342
+ v8::Local<Value> v8::TryCatch::Exception() const {
1343
+ if (HasCaught()) {
1344
+ // Check for out of memory exception.
1345
+ i::Object* exception = reinterpret_cast<i::Object*>(exception_);
1346
+ return v8::Utils::ToLocal(i::Handle<i::Object>(exception));
1347
+ } else {
1348
+ return v8::Local<Value>();
1349
+ }
1350
+ }
1351
+
1352
+
1353
+ v8::Local<Value> v8::TryCatch::StackTrace() const {
1354
+ if (HasCaught()) {
1355
+ i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_);
1356
+ if (!raw_obj->IsJSObject()) return v8::Local<Value>();
1357
+ v8::HandleScope scope;
1358
+ i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj));
1359
+ i::Handle<i::String> name = i::Factory::LookupAsciiSymbol("stack");
1360
+ if (!obj->HasProperty(*name))
1361
+ return v8::Local<Value>();
1362
+ return scope.Close(v8::Utils::ToLocal(i::GetProperty(obj, name)));
1363
+ } else {
1364
+ return v8::Local<Value>();
1365
+ }
1366
+ }
1367
+
1368
+
1369
+ v8::Local<v8::Message> v8::TryCatch::Message() const {
1370
+ if (HasCaught() && message_ != i::Smi::FromInt(0)) {
1371
+ i::Object* message = reinterpret_cast<i::Object*>(message_);
1372
+ return v8::Utils::MessageToLocal(i::Handle<i::Object>(message));
1373
+ } else {
1374
+ return v8::Local<v8::Message>();
1375
+ }
1376
+ }
1377
+
1378
+
1379
+ void v8::TryCatch::Reset() {
1380
+ exception_ = i::Heap::the_hole_value();
1381
+ message_ = i::Smi::FromInt(0);
1382
+ }
1383
+
1384
+
1385
+ void v8::TryCatch::SetVerbose(bool value) {
1386
+ is_verbose_ = value;
1387
+ }
1388
+
1389
+
1390
+ void v8::TryCatch::SetCaptureMessage(bool value) {
1391
+ capture_message_ = value;
1392
+ }
1393
+
1394
+
1395
+ // --- M e s s a g e ---
1396
+
1397
+
1398
+ Local<String> Message::Get() const {
1399
+ ON_BAILOUT("v8::Message::Get()", return Local<String>());
1400
+ ENTER_V8;
1401
+ HandleScope scope;
1402
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1403
+ i::Handle<i::String> raw_result = i::MessageHandler::GetMessage(obj);
1404
+ Local<String> result = Utils::ToLocal(raw_result);
1405
+ return scope.Close(result);
1406
+ }
1407
+
1408
+
1409
+ v8::Handle<Value> Message::GetScriptResourceName() const {
1410
+ if (IsDeadCheck("v8::Message::GetScriptResourceName()")) {
1411
+ return Local<String>();
1412
+ }
1413
+ ENTER_V8;
1414
+ HandleScope scope;
1415
+ i::Handle<i::JSObject> obj =
1416
+ i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
1417
+ // Return this.script.name.
1418
+ i::Handle<i::JSValue> script =
1419
+ i::Handle<i::JSValue>::cast(GetProperty(obj, "script"));
1420
+ i::Handle<i::Object> resource_name(i::Script::cast(script->value())->name());
1421
+ return scope.Close(Utils::ToLocal(resource_name));
1422
+ }
1423
+
1424
+
1425
+ v8::Handle<Value> Message::GetScriptData() const {
1426
+ if (IsDeadCheck("v8::Message::GetScriptResourceData()")) {
1427
+ return Local<Value>();
1428
+ }
1429
+ ENTER_V8;
1430
+ HandleScope scope;
1431
+ i::Handle<i::JSObject> obj =
1432
+ i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
1433
+ // Return this.script.data.
1434
+ i::Handle<i::JSValue> script =
1435
+ i::Handle<i::JSValue>::cast(GetProperty(obj, "script"));
1436
+ i::Handle<i::Object> data(i::Script::cast(script->value())->data());
1437
+ return scope.Close(Utils::ToLocal(data));
1438
+ }
1439
+
1440
+
1441
+ v8::Handle<v8::StackTrace> Message::GetStackTrace() const {
1442
+ if (IsDeadCheck("v8::Message::GetStackTrace()")) {
1443
+ return Local<v8::StackTrace>();
1444
+ }
1445
+ ENTER_V8;
1446
+ HandleScope scope;
1447
+ i::Handle<i::JSObject> obj =
1448
+ i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
1449
+ i::Handle<i::Object> stackFramesObj = GetProperty(obj, "stackFrames");
1450
+ if (!stackFramesObj->IsJSArray()) return v8::Handle<v8::StackTrace>();
1451
+ i::Handle<i::JSArray> stackTrace =
1452
+ i::Handle<i::JSArray>::cast(stackFramesObj);
1453
+ return scope.Close(Utils::StackTraceToLocal(stackTrace));
1454
+ }
1455
+
1456
+
1457
+ static i::Handle<i::Object> CallV8HeapFunction(const char* name,
1458
+ i::Handle<i::Object> recv,
1459
+ int argc,
1460
+ i::Object** argv[],
1461
+ bool* has_pending_exception) {
1462
+ i::Handle<i::String> fmt_str = i::Factory::LookupAsciiSymbol(name);
1463
+ i::Object* object_fun = i::Top::builtins()->GetProperty(*fmt_str);
1464
+ i::Handle<i::JSFunction> fun =
1465
+ i::Handle<i::JSFunction>(i::JSFunction::cast(object_fun));
1466
+ i::Handle<i::Object> value =
1467
+ i::Execution::Call(fun, recv, argc, argv, has_pending_exception);
1468
+ return value;
1469
+ }
1470
+
1471
+
1472
+ static i::Handle<i::Object> CallV8HeapFunction(const char* name,
1473
+ i::Handle<i::Object> data,
1474
+ bool* has_pending_exception) {
1475
+ i::Object** argv[1] = { data.location() };
1476
+ return CallV8HeapFunction(name,
1477
+ i::Top::builtins(),
1478
+ 1,
1479
+ argv,
1480
+ has_pending_exception);
1481
+ }
1482
+
1483
+
1484
+ int Message::GetLineNumber() const {
1485
+ ON_BAILOUT("v8::Message::GetLineNumber()", return kNoLineNumberInfo);
1486
+ ENTER_V8;
1487
+ HandleScope scope;
1488
+ EXCEPTION_PREAMBLE();
1489
+ i::Handle<i::Object> result = CallV8HeapFunction("GetLineNumber",
1490
+ Utils::OpenHandle(this),
1491
+ &has_pending_exception);
1492
+ EXCEPTION_BAILOUT_CHECK(0);
1493
+ return static_cast<int>(result->Number());
1494
+ }
1495
+
1496
+
1497
+ int Message::GetStartPosition() const {
1498
+ if (IsDeadCheck("v8::Message::GetStartPosition()")) return 0;
1499
+ ENTER_V8;
1500
+ HandleScope scope;
1501
+
1502
+ i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this);
1503
+ return static_cast<int>(GetProperty(data_obj, "startPos")->Number());
1504
+ }
1505
+
1506
+
1507
+ int Message::GetEndPosition() const {
1508
+ if (IsDeadCheck("v8::Message::GetEndPosition()")) return 0;
1509
+ ENTER_V8;
1510
+ HandleScope scope;
1511
+ i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this);
1512
+ return static_cast<int>(GetProperty(data_obj, "endPos")->Number());
1513
+ }
1514
+
1515
+
1516
+ int Message::GetStartColumn() const {
1517
+ if (IsDeadCheck("v8::Message::GetStartColumn()")) return kNoColumnInfo;
1518
+ ENTER_V8;
1519
+ HandleScope scope;
1520
+ i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this);
1521
+ EXCEPTION_PREAMBLE();
1522
+ i::Handle<i::Object> start_col_obj = CallV8HeapFunction(
1523
+ "GetPositionInLine",
1524
+ data_obj,
1525
+ &has_pending_exception);
1526
+ EXCEPTION_BAILOUT_CHECK(0);
1527
+ return static_cast<int>(start_col_obj->Number());
1528
+ }
1529
+
1530
+
1531
+ int Message::GetEndColumn() const {
1532
+ if (IsDeadCheck("v8::Message::GetEndColumn()")) return kNoColumnInfo;
1533
+ ENTER_V8;
1534
+ HandleScope scope;
1535
+ i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this);
1536
+ EXCEPTION_PREAMBLE();
1537
+ i::Handle<i::Object> start_col_obj = CallV8HeapFunction(
1538
+ "GetPositionInLine",
1539
+ data_obj,
1540
+ &has_pending_exception);
1541
+ EXCEPTION_BAILOUT_CHECK(0);
1542
+ int start = static_cast<int>(GetProperty(data_obj, "startPos")->Number());
1543
+ int end = static_cast<int>(GetProperty(data_obj, "endPos")->Number());
1544
+ return static_cast<int>(start_col_obj->Number()) + (end - start);
1545
+ }
1546
+
1547
+
1548
+ Local<String> Message::GetSourceLine() const {
1549
+ ON_BAILOUT("v8::Message::GetSourceLine()", return Local<String>());
1550
+ ENTER_V8;
1551
+ HandleScope scope;
1552
+ EXCEPTION_PREAMBLE();
1553
+ i::Handle<i::Object> result = CallV8HeapFunction("GetSourceLine",
1554
+ Utils::OpenHandle(this),
1555
+ &has_pending_exception);
1556
+ EXCEPTION_BAILOUT_CHECK(Local<v8::String>());
1557
+ if (result->IsString()) {
1558
+ return scope.Close(Utils::ToLocal(i::Handle<i::String>::cast(result)));
1559
+ } else {
1560
+ return Local<String>();
1561
+ }
1562
+ }
1563
+
1564
+
1565
+ void Message::PrintCurrentStackTrace(FILE* out) {
1566
+ if (IsDeadCheck("v8::Message::PrintCurrentStackTrace()")) return;
1567
+ ENTER_V8;
1568
+ i::Top::PrintCurrentStackTrace(out);
1569
+ }
1570
+
1571
+
1572
+ // --- S t a c k T r a c e ---
1573
+
1574
+ Local<StackFrame> StackTrace::GetFrame(uint32_t index) const {
1575
+ if (IsDeadCheck("v8::StackTrace::GetFrame()")) return Local<StackFrame>();
1576
+ ENTER_V8;
1577
+ HandleScope scope;
1578
+ i::Handle<i::JSArray> self = Utils::OpenHandle(this);
1579
+ i::Handle<i::JSObject> obj(i::JSObject::cast(self->GetElement(index)));
1580
+ return scope.Close(Utils::StackFrameToLocal(obj));
1581
+ }
1582
+
1583
+
1584
+ int StackTrace::GetFrameCount() const {
1585
+ if (IsDeadCheck("v8::StackTrace::GetFrameCount()")) return -1;
1586
+ ENTER_V8;
1587
+ return i::Smi::cast(Utils::OpenHandle(this)->length())->value();
1588
+ }
1589
+
1590
+
1591
+ Local<Array> StackTrace::AsArray() {
1592
+ if (IsDeadCheck("v8::StackTrace::AsArray()")) Local<Array>();
1593
+ ENTER_V8;
1594
+ return Utils::ToLocal(Utils::OpenHandle(this));
1595
+ }
1596
+
1597
+
1598
+ Local<StackTrace> StackTrace::CurrentStackTrace(int frame_limit,
1599
+ StackTraceOptions options) {
1600
+ if (IsDeadCheck("v8::StackTrace::CurrentStackTrace()")) Local<StackTrace>();
1601
+ ENTER_V8;
1602
+ i::Handle<i::JSArray> stackTrace =
1603
+ i::Top::CaptureCurrentStackTrace(frame_limit, options);
1604
+ return Utils::StackTraceToLocal(stackTrace);
1605
+ }
1606
+
1607
+
1608
+ // --- S t a c k F r a m e ---
1609
+
1610
+ int StackFrame::GetLineNumber() const {
1611
+ if (IsDeadCheck("v8::StackFrame::GetLineNumber()")) {
1612
+ return Message::kNoLineNumberInfo;
1613
+ }
1614
+ ENTER_V8;
1615
+ i::HandleScope scope;
1616
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1617
+ i::Handle<i::Object> line = GetProperty(self, "lineNumber");
1618
+ if (!line->IsSmi()) {
1619
+ return Message::kNoLineNumberInfo;
1620
+ }
1621
+ return i::Smi::cast(*line)->value();
1622
+ }
1623
+
1624
+
1625
+ int StackFrame::GetColumn() const {
1626
+ if (IsDeadCheck("v8::StackFrame::GetColumn()")) {
1627
+ return Message::kNoColumnInfo;
1628
+ }
1629
+ ENTER_V8;
1630
+ i::HandleScope scope;
1631
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1632
+ i::Handle<i::Object> column = GetProperty(self, "column");
1633
+ if (!column->IsSmi()) {
1634
+ return Message::kNoColumnInfo;
1635
+ }
1636
+ return i::Smi::cast(*column)->value();
1637
+ }
1638
+
1639
+
1640
+ Local<String> StackFrame::GetScriptName() const {
1641
+ if (IsDeadCheck("v8::StackFrame::GetScriptName()")) return Local<String>();
1642
+ ENTER_V8;
1643
+ HandleScope scope;
1644
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1645
+ i::Handle<i::Object> name = GetProperty(self, "scriptName");
1646
+ if (!name->IsString()) {
1647
+ return Local<String>();
1648
+ }
1649
+ return scope.Close(Local<String>::Cast(Utils::ToLocal(name)));
1650
+ }
1651
+
1652
+
1653
+ Local<String> StackFrame::GetFunctionName() const {
1654
+ if (IsDeadCheck("v8::StackFrame::GetFunctionName()")) return Local<String>();
1655
+ ENTER_V8;
1656
+ HandleScope scope;
1657
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1658
+ i::Handle<i::Object> name = GetProperty(self, "functionName");
1659
+ if (!name->IsString()) {
1660
+ return Local<String>();
1661
+ }
1662
+ return scope.Close(Local<String>::Cast(Utils::ToLocal(name)));
1663
+ }
1664
+
1665
+
1666
+ bool StackFrame::IsEval() const {
1667
+ if (IsDeadCheck("v8::StackFrame::IsEval()")) return false;
1668
+ ENTER_V8;
1669
+ i::HandleScope scope;
1670
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1671
+ i::Handle<i::Object> is_eval = GetProperty(self, "isEval");
1672
+ return is_eval->IsTrue();
1673
+ }
1674
+
1675
+
1676
+ bool StackFrame::IsConstructor() const {
1677
+ if (IsDeadCheck("v8::StackFrame::IsConstructor()")) return false;
1678
+ ENTER_V8;
1679
+ i::HandleScope scope;
1680
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1681
+ i::Handle<i::Object> is_constructor = GetProperty(self, "isConstructor");
1682
+ return is_constructor->IsTrue();
1683
+ }
1684
+
1685
+
1686
+ // --- D a t a ---
1687
+
1688
+ bool Value::IsUndefined() const {
1689
+ if (IsDeadCheck("v8::Value::IsUndefined()")) return false;
1690
+ return Utils::OpenHandle(this)->IsUndefined();
1691
+ }
1692
+
1693
+
1694
+ bool Value::IsNull() const {
1695
+ if (IsDeadCheck("v8::Value::IsNull()")) return false;
1696
+ return Utils::OpenHandle(this)->IsNull();
1697
+ }
1698
+
1699
+
1700
+ bool Value::IsTrue() const {
1701
+ if (IsDeadCheck("v8::Value::IsTrue()")) return false;
1702
+ return Utils::OpenHandle(this)->IsTrue();
1703
+ }
1704
+
1705
+
1706
+ bool Value::IsFalse() const {
1707
+ if (IsDeadCheck("v8::Value::IsFalse()")) return false;
1708
+ return Utils::OpenHandle(this)->IsFalse();
1709
+ }
1710
+
1711
+
1712
+ bool Value::IsFunction() const {
1713
+ if (IsDeadCheck("v8::Value::IsFunction()")) return false;
1714
+ return Utils::OpenHandle(this)->IsJSFunction();
1715
+ }
1716
+
1717
+
1718
+ bool Value::FullIsString() const {
1719
+ if (IsDeadCheck("v8::Value::IsString()")) return false;
1720
+ bool result = Utils::OpenHandle(this)->IsString();
1721
+ ASSERT_EQ(result, QuickIsString());
1722
+ return result;
1723
+ }
1724
+
1725
+
1726
+ bool Value::IsArray() const {
1727
+ if (IsDeadCheck("v8::Value::IsArray()")) return false;
1728
+ return Utils::OpenHandle(this)->IsJSArray();
1729
+ }
1730
+
1731
+
1732
+ bool Value::IsObject() const {
1733
+ if (IsDeadCheck("v8::Value::IsObject()")) return false;
1734
+ return Utils::OpenHandle(this)->IsJSObject();
1735
+ }
1736
+
1737
+
1738
+ bool Value::IsNumber() const {
1739
+ if (IsDeadCheck("v8::Value::IsNumber()")) return false;
1740
+ return Utils::OpenHandle(this)->IsNumber();
1741
+ }
1742
+
1743
+
1744
+ bool Value::IsBoolean() const {
1745
+ if (IsDeadCheck("v8::Value::IsBoolean()")) return false;
1746
+ return Utils::OpenHandle(this)->IsBoolean();
1747
+ }
1748
+
1749
+
1750
+ bool Value::IsExternal() const {
1751
+ if (IsDeadCheck("v8::Value::IsExternal()")) return false;
1752
+ return Utils::OpenHandle(this)->IsProxy();
1753
+ }
1754
+
1755
+
1756
+ bool Value::IsInt32() const {
1757
+ if (IsDeadCheck("v8::Value::IsInt32()")) return false;
1758
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1759
+ if (obj->IsSmi()) return true;
1760
+ if (obj->IsNumber()) {
1761
+ double value = obj->Number();
1762
+ return i::FastI2D(i::FastD2I(value)) == value;
1763
+ }
1764
+ return false;
1765
+ }
1766
+
1767
+
1768
+ bool Value::IsUint32() const {
1769
+ if (IsDeadCheck("v8::Value::IsUint32()")) return false;
1770
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1771
+ if (obj->IsSmi()) return i::Smi::cast(*obj)->value() >= 0;
1772
+ if (obj->IsNumber()) {
1773
+ double value = obj->Number();
1774
+ return i::FastUI2D(i::FastD2UI(value)) == value;
1775
+ }
1776
+ return false;
1777
+ }
1778
+
1779
+
1780
+ bool Value::IsDate() const {
1781
+ if (IsDeadCheck("v8::Value::IsDate()")) return false;
1782
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1783
+ return obj->HasSpecificClassOf(i::Heap::Date_symbol());
1784
+ }
1785
+
1786
+
1787
+ Local<String> Value::ToString() const {
1788
+ if (IsDeadCheck("v8::Value::ToString()")) return Local<String>();
1789
+ LOG_API("ToString");
1790
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1791
+ i::Handle<i::Object> str;
1792
+ if (obj->IsString()) {
1793
+ str = obj;
1794
+ } else {
1795
+ ENTER_V8;
1796
+ EXCEPTION_PREAMBLE();
1797
+ str = i::Execution::ToString(obj, &has_pending_exception);
1798
+ EXCEPTION_BAILOUT_CHECK(Local<String>());
1799
+ }
1800
+ return Local<String>(ToApi<String>(str));
1801
+ }
1802
+
1803
+
1804
+ Local<String> Value::ToDetailString() const {
1805
+ if (IsDeadCheck("v8::Value::ToDetailString()")) return Local<String>();
1806
+ LOG_API("ToDetailString");
1807
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1808
+ i::Handle<i::Object> str;
1809
+ if (obj->IsString()) {
1810
+ str = obj;
1811
+ } else {
1812
+ ENTER_V8;
1813
+ EXCEPTION_PREAMBLE();
1814
+ str = i::Execution::ToDetailString(obj, &has_pending_exception);
1815
+ EXCEPTION_BAILOUT_CHECK(Local<String>());
1816
+ }
1817
+ return Local<String>(ToApi<String>(str));
1818
+ }
1819
+
1820
+
1821
+ Local<v8::Object> Value::ToObject() const {
1822
+ if (IsDeadCheck("v8::Value::ToObject()")) return Local<v8::Object>();
1823
+ LOG_API("ToObject");
1824
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1825
+ i::Handle<i::Object> val;
1826
+ if (obj->IsJSObject()) {
1827
+ val = obj;
1828
+ } else {
1829
+ ENTER_V8;
1830
+ EXCEPTION_PREAMBLE();
1831
+ val = i::Execution::ToObject(obj, &has_pending_exception);
1832
+ EXCEPTION_BAILOUT_CHECK(Local<v8::Object>());
1833
+ }
1834
+ return Local<v8::Object>(ToApi<Object>(val));
1835
+ }
1836
+
1837
+
1838
+ Local<Boolean> Value::ToBoolean() const {
1839
+ if (IsDeadCheck("v8::Value::ToBoolean()")) return Local<Boolean>();
1840
+ LOG_API("ToBoolean");
1841
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1842
+ if (obj->IsBoolean()) {
1843
+ return Local<Boolean>(ToApi<Boolean>(obj));
1844
+ } else {
1845
+ ENTER_V8;
1846
+ i::Handle<i::Object> val = i::Execution::ToBoolean(obj);
1847
+ return Local<Boolean>(ToApi<Boolean>(val));
1848
+ }
1849
+ }
1850
+
1851
+
1852
+ Local<Number> Value::ToNumber() const {
1853
+ if (IsDeadCheck("v8::Value::ToNumber()")) return Local<Number>();
1854
+ LOG_API("ToNumber");
1855
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1856
+ i::Handle<i::Object> num;
1857
+ if (obj->IsNumber()) {
1858
+ num = obj;
1859
+ } else {
1860
+ ENTER_V8;
1861
+ EXCEPTION_PREAMBLE();
1862
+ num = i::Execution::ToNumber(obj, &has_pending_exception);
1863
+ EXCEPTION_BAILOUT_CHECK(Local<Number>());
1864
+ }
1865
+ return Local<Number>(ToApi<Number>(num));
1866
+ }
1867
+
1868
+
1869
+ Local<Integer> Value::ToInteger() const {
1870
+ if (IsDeadCheck("v8::Value::ToInteger()")) return Local<Integer>();
1871
+ LOG_API("ToInteger");
1872
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1873
+ i::Handle<i::Object> num;
1874
+ if (obj->IsSmi()) {
1875
+ num = obj;
1876
+ } else {
1877
+ ENTER_V8;
1878
+ EXCEPTION_PREAMBLE();
1879
+ num = i::Execution::ToInteger(obj, &has_pending_exception);
1880
+ EXCEPTION_BAILOUT_CHECK(Local<Integer>());
1881
+ }
1882
+ return Local<Integer>(ToApi<Integer>(num));
1883
+ }
1884
+
1885
+
1886
+ void External::CheckCast(v8::Value* that) {
1887
+ if (IsDeadCheck("v8::External::Cast()")) return;
1888
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1889
+ ApiCheck(obj->IsProxy(),
1890
+ "v8::External::Cast()",
1891
+ "Could not convert to external");
1892
+ }
1893
+
1894
+
1895
+ void v8::Object::CheckCast(Value* that) {
1896
+ if (IsDeadCheck("v8::Object::Cast()")) return;
1897
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1898
+ ApiCheck(obj->IsJSObject(),
1899
+ "v8::Object::Cast()",
1900
+ "Could not convert to object");
1901
+ }
1902
+
1903
+
1904
+ void v8::Function::CheckCast(Value* that) {
1905
+ if (IsDeadCheck("v8::Function::Cast()")) return;
1906
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1907
+ ApiCheck(obj->IsJSFunction(),
1908
+ "v8::Function::Cast()",
1909
+ "Could not convert to function");
1910
+ }
1911
+
1912
+
1913
+ void v8::String::CheckCast(v8::Value* that) {
1914
+ if (IsDeadCheck("v8::String::Cast()")) return;
1915
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1916
+ ApiCheck(obj->IsString(),
1917
+ "v8::String::Cast()",
1918
+ "Could not convert to string");
1919
+ }
1920
+
1921
+
1922
+ void v8::Number::CheckCast(v8::Value* that) {
1923
+ if (IsDeadCheck("v8::Number::Cast()")) return;
1924
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1925
+ ApiCheck(obj->IsNumber(),
1926
+ "v8::Number::Cast()",
1927
+ "Could not convert to number");
1928
+ }
1929
+
1930
+
1931
+ void v8::Integer::CheckCast(v8::Value* that) {
1932
+ if (IsDeadCheck("v8::Integer::Cast()")) return;
1933
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1934
+ ApiCheck(obj->IsNumber(),
1935
+ "v8::Integer::Cast()",
1936
+ "Could not convert to number");
1937
+ }
1938
+
1939
+
1940
+ void v8::Array::CheckCast(Value* that) {
1941
+ if (IsDeadCheck("v8::Array::Cast()")) return;
1942
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1943
+ ApiCheck(obj->IsJSArray(),
1944
+ "v8::Array::Cast()",
1945
+ "Could not convert to array");
1946
+ }
1947
+
1948
+
1949
+ void v8::Date::CheckCast(v8::Value* that) {
1950
+ if (IsDeadCheck("v8::Date::Cast()")) return;
1951
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
1952
+ ApiCheck(obj->HasSpecificClassOf(i::Heap::Date_symbol()),
1953
+ "v8::Date::Cast()",
1954
+ "Could not convert to date");
1955
+ }
1956
+
1957
+
1958
+ bool Value::BooleanValue() const {
1959
+ if (IsDeadCheck("v8::Value::BooleanValue()")) return false;
1960
+ LOG_API("BooleanValue");
1961
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1962
+ if (obj->IsBoolean()) {
1963
+ return obj->IsTrue();
1964
+ } else {
1965
+ ENTER_V8;
1966
+ i::Handle<i::Object> value = i::Execution::ToBoolean(obj);
1967
+ return value->IsTrue();
1968
+ }
1969
+ }
1970
+
1971
+
1972
+ double Value::NumberValue() const {
1973
+ if (IsDeadCheck("v8::Value::NumberValue()")) return i::OS::nan_value();
1974
+ LOG_API("NumberValue");
1975
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1976
+ i::Handle<i::Object> num;
1977
+ if (obj->IsNumber()) {
1978
+ num = obj;
1979
+ } else {
1980
+ ENTER_V8;
1981
+ EXCEPTION_PREAMBLE();
1982
+ num = i::Execution::ToNumber(obj, &has_pending_exception);
1983
+ EXCEPTION_BAILOUT_CHECK(i::OS::nan_value());
1984
+ }
1985
+ return num->Number();
1986
+ }
1987
+
1988
+
1989
+ int64_t Value::IntegerValue() const {
1990
+ if (IsDeadCheck("v8::Value::IntegerValue()")) return 0;
1991
+ LOG_API("IntegerValue");
1992
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
1993
+ i::Handle<i::Object> num;
1994
+ if (obj->IsNumber()) {
1995
+ num = obj;
1996
+ } else {
1997
+ ENTER_V8;
1998
+ EXCEPTION_PREAMBLE();
1999
+ num = i::Execution::ToInteger(obj, &has_pending_exception);
2000
+ EXCEPTION_BAILOUT_CHECK(0);
2001
+ }
2002
+ if (num->IsSmi()) {
2003
+ return i::Smi::cast(*num)->value();
2004
+ } else {
2005
+ return static_cast<int64_t>(num->Number());
2006
+ }
2007
+ }
2008
+
2009
+
2010
+ Local<Int32> Value::ToInt32() const {
2011
+ if (IsDeadCheck("v8::Value::ToInt32()")) return Local<Int32>();
2012
+ LOG_API("ToInt32");
2013
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2014
+ i::Handle<i::Object> num;
2015
+ if (obj->IsSmi()) {
2016
+ num = obj;
2017
+ } else {
2018
+ ENTER_V8;
2019
+ EXCEPTION_PREAMBLE();
2020
+ num = i::Execution::ToInt32(obj, &has_pending_exception);
2021
+ EXCEPTION_BAILOUT_CHECK(Local<Int32>());
2022
+ }
2023
+ return Local<Int32>(ToApi<Int32>(num));
2024
+ }
2025
+
2026
+
2027
+ Local<Uint32> Value::ToUint32() const {
2028
+ if (IsDeadCheck("v8::Value::ToUint32()")) return Local<Uint32>();
2029
+ LOG_API("ToUInt32");
2030
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2031
+ i::Handle<i::Object> num;
2032
+ if (obj->IsSmi()) {
2033
+ num = obj;
2034
+ } else {
2035
+ ENTER_V8;
2036
+ EXCEPTION_PREAMBLE();
2037
+ num = i::Execution::ToUint32(obj, &has_pending_exception);
2038
+ EXCEPTION_BAILOUT_CHECK(Local<Uint32>());
2039
+ }
2040
+ return Local<Uint32>(ToApi<Uint32>(num));
2041
+ }
2042
+
2043
+
2044
+ Local<Uint32> Value::ToArrayIndex() const {
2045
+ if (IsDeadCheck("v8::Value::ToArrayIndex()")) return Local<Uint32>();
2046
+ LOG_API("ToArrayIndex");
2047
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2048
+ if (obj->IsSmi()) {
2049
+ if (i::Smi::cast(*obj)->value() >= 0) return Utils::Uint32ToLocal(obj);
2050
+ return Local<Uint32>();
2051
+ }
2052
+ ENTER_V8;
2053
+ EXCEPTION_PREAMBLE();
2054
+ i::Handle<i::Object> string_obj =
2055
+ i::Execution::ToString(obj, &has_pending_exception);
2056
+ EXCEPTION_BAILOUT_CHECK(Local<Uint32>());
2057
+ i::Handle<i::String> str = i::Handle<i::String>::cast(string_obj);
2058
+ uint32_t index;
2059
+ if (str->AsArrayIndex(&index)) {
2060
+ i::Handle<i::Object> value;
2061
+ if (index <= static_cast<uint32_t>(i::Smi::kMaxValue)) {
2062
+ value = i::Handle<i::Object>(i::Smi::FromInt(index));
2063
+ } else {
2064
+ value = i::Factory::NewNumber(index);
2065
+ }
2066
+ return Utils::Uint32ToLocal(value);
2067
+ }
2068
+ return Local<Uint32>();
2069
+ }
2070
+
2071
+
2072
+ int32_t Value::Int32Value() const {
2073
+ if (IsDeadCheck("v8::Value::Int32Value()")) return 0;
2074
+ LOG_API("Int32Value");
2075
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2076
+ if (obj->IsSmi()) {
2077
+ return i::Smi::cast(*obj)->value();
2078
+ } else {
2079
+ LOG_API("Int32Value (slow)");
2080
+ ENTER_V8;
2081
+ EXCEPTION_PREAMBLE();
2082
+ i::Handle<i::Object> num =
2083
+ i::Execution::ToInt32(obj, &has_pending_exception);
2084
+ EXCEPTION_BAILOUT_CHECK(0);
2085
+ if (num->IsSmi()) {
2086
+ return i::Smi::cast(*num)->value();
2087
+ } else {
2088
+ return static_cast<int32_t>(num->Number());
2089
+ }
2090
+ }
2091
+ }
2092
+
2093
+
2094
+ bool Value::Equals(Handle<Value> that) const {
2095
+ if (IsDeadCheck("v8::Value::Equals()")
2096
+ || EmptyCheck("v8::Value::Equals()", this)
2097
+ || EmptyCheck("v8::Value::Equals()", that)) {
2098
+ return false;
2099
+ }
2100
+ LOG_API("Equals");
2101
+ ENTER_V8;
2102
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2103
+ i::Handle<i::Object> other = Utils::OpenHandle(*that);
2104
+ i::Object** args[1] = { other.location() };
2105
+ EXCEPTION_PREAMBLE();
2106
+ i::Handle<i::Object> result =
2107
+ CallV8HeapFunction("EQUALS", obj, 1, args, &has_pending_exception);
2108
+ EXCEPTION_BAILOUT_CHECK(false);
2109
+ return *result == i::Smi::FromInt(i::EQUAL);
2110
+ }
2111
+
2112
+
2113
+ bool Value::StrictEquals(Handle<Value> that) const {
2114
+ if (IsDeadCheck("v8::Value::StrictEquals()")
2115
+ || EmptyCheck("v8::Value::StrictEquals()", this)
2116
+ || EmptyCheck("v8::Value::StrictEquals()", that)) {
2117
+ return false;
2118
+ }
2119
+ LOG_API("StrictEquals");
2120
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2121
+ i::Handle<i::Object> other = Utils::OpenHandle(*that);
2122
+ // Must check HeapNumber first, since NaN !== NaN.
2123
+ if (obj->IsHeapNumber()) {
2124
+ if (!other->IsNumber()) return false;
2125
+ double x = obj->Number();
2126
+ double y = other->Number();
2127
+ // Must check explicitly for NaN:s on Windows, but -0 works fine.
2128
+ return x == y && !isnan(x) && !isnan(y);
2129
+ } else if (*obj == *other) { // Also covers Booleans.
2130
+ return true;
2131
+ } else if (obj->IsSmi()) {
2132
+ return other->IsNumber() && obj->Number() == other->Number();
2133
+ } else if (obj->IsString()) {
2134
+ return other->IsString() &&
2135
+ i::String::cast(*obj)->Equals(i::String::cast(*other));
2136
+ } else if (obj->IsUndefined() || obj->IsUndetectableObject()) {
2137
+ return other->IsUndefined() || other->IsUndetectableObject();
2138
+ } else {
2139
+ return false;
2140
+ }
2141
+ }
2142
+
2143
+
2144
+ uint32_t Value::Uint32Value() const {
2145
+ if (IsDeadCheck("v8::Value::Uint32Value()")) return 0;
2146
+ LOG_API("Uint32Value");
2147
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
2148
+ if (obj->IsSmi()) {
2149
+ return i::Smi::cast(*obj)->value();
2150
+ } else {
2151
+ ENTER_V8;
2152
+ EXCEPTION_PREAMBLE();
2153
+ i::Handle<i::Object> num =
2154
+ i::Execution::ToUint32(obj, &has_pending_exception);
2155
+ EXCEPTION_BAILOUT_CHECK(0);
2156
+ if (num->IsSmi()) {
2157
+ return i::Smi::cast(*num)->value();
2158
+ } else {
2159
+ return static_cast<uint32_t>(num->Number());
2160
+ }
2161
+ }
2162
+ }
2163
+
2164
+
2165
+ bool v8::Object::Set(v8::Handle<Value> key, v8::Handle<Value> value,
2166
+ v8::PropertyAttribute attribs) {
2167
+ ON_BAILOUT("v8::Object::Set()", return false);
2168
+ ENTER_V8;
2169
+ HandleScope scope;
2170
+ i::Handle<i::Object> self = Utils::OpenHandle(this);
2171
+ i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
2172
+ i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
2173
+ EXCEPTION_PREAMBLE();
2174
+ i::Handle<i::Object> obj = i::SetProperty(
2175
+ self,
2176
+ key_obj,
2177
+ value_obj,
2178
+ static_cast<PropertyAttributes>(attribs));
2179
+ has_pending_exception = obj.is_null();
2180
+ EXCEPTION_BAILOUT_CHECK(false);
2181
+ return true;
2182
+ }
2183
+
2184
+
2185
+ bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) {
2186
+ ON_BAILOUT("v8::Object::Set()", return false);
2187
+ ENTER_V8;
2188
+ HandleScope scope;
2189
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2190
+ i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
2191
+ EXCEPTION_PREAMBLE();
2192
+ i::Handle<i::Object> obj = i::SetElement(
2193
+ self,
2194
+ index,
2195
+ value_obj);
2196
+ has_pending_exception = obj.is_null();
2197
+ EXCEPTION_BAILOUT_CHECK(false);
2198
+ return true;
2199
+ }
2200
+
2201
+
2202
+ bool v8::Object::ForceSet(v8::Handle<Value> key,
2203
+ v8::Handle<Value> value,
2204
+ v8::PropertyAttribute attribs) {
2205
+ ON_BAILOUT("v8::Object::ForceSet()", return false);
2206
+ ENTER_V8;
2207
+ HandleScope scope;
2208
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2209
+ i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
2210
+ i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
2211
+ EXCEPTION_PREAMBLE();
2212
+ i::Handle<i::Object> obj = i::ForceSetProperty(
2213
+ self,
2214
+ key_obj,
2215
+ value_obj,
2216
+ static_cast<PropertyAttributes>(attribs));
2217
+ has_pending_exception = obj.is_null();
2218
+ EXCEPTION_BAILOUT_CHECK(false);
2219
+ return true;
2220
+ }
2221
+
2222
+
2223
+ bool v8::Object::ForceDelete(v8::Handle<Value> key) {
2224
+ ON_BAILOUT("v8::Object::ForceDelete()", return false);
2225
+ ENTER_V8;
2226
+ HandleScope scope;
2227
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2228
+ i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
2229
+ EXCEPTION_PREAMBLE();
2230
+ i::Handle<i::Object> obj = i::ForceDeleteProperty(self, key_obj);
2231
+ has_pending_exception = obj.is_null();
2232
+ EXCEPTION_BAILOUT_CHECK(false);
2233
+ return obj->IsTrue();
2234
+ }
2235
+
2236
+
2237
+ Local<Value> v8::Object::Get(v8::Handle<Value> key) {
2238
+ ON_BAILOUT("v8::Object::Get()", return Local<v8::Value>());
2239
+ ENTER_V8;
2240
+ i::Handle<i::Object> self = Utils::OpenHandle(this);
2241
+ i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
2242
+ EXCEPTION_PREAMBLE();
2243
+ i::Handle<i::Object> result = i::GetProperty(self, key_obj);
2244
+ has_pending_exception = result.is_null();
2245
+ EXCEPTION_BAILOUT_CHECK(Local<Value>());
2246
+ return Utils::ToLocal(result);
2247
+ }
2248
+
2249
+
2250
+ Local<Value> v8::Object::Get(uint32_t index) {
2251
+ ON_BAILOUT("v8::Object::Get()", return Local<v8::Value>());
2252
+ ENTER_V8;
2253
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2254
+ EXCEPTION_PREAMBLE();
2255
+ i::Handle<i::Object> result = i::GetElement(self, index);
2256
+ has_pending_exception = result.is_null();
2257
+ EXCEPTION_BAILOUT_CHECK(Local<Value>());
2258
+ return Utils::ToLocal(result);
2259
+ }
2260
+
2261
+
2262
+ Local<Value> v8::Object::GetPrototype() {
2263
+ ON_BAILOUT("v8::Object::GetPrototype()", return Local<v8::Value>());
2264
+ ENTER_V8;
2265
+ i::Handle<i::Object> self = Utils::OpenHandle(this);
2266
+ i::Handle<i::Object> result = i::GetPrototype(self);
2267
+ return Utils::ToLocal(result);
2268
+ }
2269
+
2270
+
2271
+ bool v8::Object::SetPrototype(Handle<Value> value) {
2272
+ ON_BAILOUT("v8::Object::SetPrototype()", return false);
2273
+ ENTER_V8;
2274
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2275
+ i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
2276
+ EXCEPTION_PREAMBLE();
2277
+ i::Handle<i::Object> result = i::SetPrototype(self, value_obj);
2278
+ has_pending_exception = result.is_null();
2279
+ EXCEPTION_BAILOUT_CHECK(false);
2280
+ return true;
2281
+ }
2282
+
2283
+
2284
+ Local<Object> v8::Object::FindInstanceInPrototypeChain(
2285
+ v8::Handle<FunctionTemplate> tmpl) {
2286
+ ON_BAILOUT("v8::Object::FindInstanceInPrototypeChain()",
2287
+ return Local<v8::Object>());
2288
+ ENTER_V8;
2289
+ i::JSObject* object = *Utils::OpenHandle(this);
2290
+ i::FunctionTemplateInfo* tmpl_info = *Utils::OpenHandle(*tmpl);
2291
+ while (!object->IsInstanceOf(tmpl_info)) {
2292
+ i::Object* prototype = object->GetPrototype();
2293
+ if (!prototype->IsJSObject()) return Local<Object>();
2294
+ object = i::JSObject::cast(prototype);
2295
+ }
2296
+ return Utils::ToLocal(i::Handle<i::JSObject>(object));
2297
+ }
2298
+
2299
+
2300
+ Local<Array> v8::Object::GetPropertyNames() {
2301
+ ON_BAILOUT("v8::Object::GetPropertyNames()", return Local<v8::Array>());
2302
+ ENTER_V8;
2303
+ v8::HandleScope scope;
2304
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2305
+ i::Handle<i::FixedArray> value =
2306
+ i::GetKeysInFixedArrayFor(self, i::INCLUDE_PROTOS);
2307
+ // Because we use caching to speed up enumeration it is important
2308
+ // to never change the result of the basic enumeration function so
2309
+ // we clone the result.
2310
+ i::Handle<i::FixedArray> elms = i::Factory::CopyFixedArray(value);
2311
+ i::Handle<i::JSArray> result = i::Factory::NewJSArrayWithElements(elms);
2312
+ return scope.Close(Utils::ToLocal(result));
2313
+ }
2314
+
2315
+
2316
+ Local<String> v8::Object::ObjectProtoToString() {
2317
+ ON_BAILOUT("v8::Object::ObjectProtoToString()", return Local<v8::String>());
2318
+ ENTER_V8;
2319
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2320
+
2321
+ i::Handle<i::Object> name(self->class_name());
2322
+
2323
+ // Native implementation of Object.prototype.toString (v8natives.js):
2324
+ // var c = %ClassOf(this);
2325
+ // if (c === 'Arguments') c = 'Object';
2326
+ // return "[object " + c + "]";
2327
+
2328
+ if (!name->IsString()) {
2329
+ return v8::String::New("[object ]");
2330
+
2331
+ } else {
2332
+ i::Handle<i::String> class_name = i::Handle<i::String>::cast(name);
2333
+ if (class_name->IsEqualTo(i::CStrVector("Arguments"))) {
2334
+ return v8::String::New("[object Object]");
2335
+
2336
+ } else {
2337
+ const char* prefix = "[object ";
2338
+ Local<String> str = Utils::ToLocal(class_name);
2339
+ const char* postfix = "]";
2340
+
2341
+ int prefix_len = i::StrLength(prefix);
2342
+ int str_len = str->Length();
2343
+ int postfix_len = i::StrLength(postfix);
2344
+
2345
+ int buf_len = prefix_len + str_len + postfix_len;
2346
+ i::ScopedVector<char> buf(buf_len);
2347
+
2348
+ // Write prefix.
2349
+ char* ptr = buf.start();
2350
+ memcpy(ptr, prefix, prefix_len * v8::internal::kCharSize);
2351
+ ptr += prefix_len;
2352
+
2353
+ // Write real content.
2354
+ str->WriteAscii(ptr, 0, str_len);
2355
+ ptr += str_len;
2356
+
2357
+ // Write postfix.
2358
+ memcpy(ptr, postfix, postfix_len * v8::internal::kCharSize);
2359
+
2360
+ // Copy the buffer into a heap-allocated string and return it.
2361
+ Local<String> result = v8::String::New(buf.start(), buf_len);
2362
+ return result;
2363
+ }
2364
+ }
2365
+ }
2366
+
2367
+
2368
+ bool v8::Object::Delete(v8::Handle<String> key) {
2369
+ ON_BAILOUT("v8::Object::Delete()", return false);
2370
+ ENTER_V8;
2371
+ HandleScope scope;
2372
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2373
+ i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
2374
+ return i::DeleteProperty(self, key_obj)->IsTrue();
2375
+ }
2376
+
2377
+
2378
+ bool v8::Object::Has(v8::Handle<String> key) {
2379
+ ON_BAILOUT("v8::Object::Has()", return false);
2380
+ ENTER_V8;
2381
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2382
+ i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
2383
+ return self->HasProperty(*key_obj);
2384
+ }
2385
+
2386
+
2387
+ bool v8::Object::Delete(uint32_t index) {
2388
+ ON_BAILOUT("v8::Object::DeleteProperty()", return false);
2389
+ ENTER_V8;
2390
+ HandleScope scope;
2391
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2392
+ return i::DeleteElement(self, index)->IsTrue();
2393
+ }
2394
+
2395
+
2396
+ bool v8::Object::Has(uint32_t index) {
2397
+ ON_BAILOUT("v8::Object::HasProperty()", return false);
2398
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2399
+ return self->HasElement(index);
2400
+ }
2401
+
2402
+
2403
+ bool Object::SetAccessor(Handle<String> name,
2404
+ AccessorGetter getter,
2405
+ AccessorSetter setter,
2406
+ v8::Handle<Value> data,
2407
+ AccessControl settings,
2408
+ PropertyAttribute attributes) {
2409
+ ON_BAILOUT("v8::Object::SetAccessor()", return false);
2410
+ ENTER_V8;
2411
+ HandleScope scope;
2412
+ i::Handle<i::AccessorInfo> info = MakeAccessorInfo(name,
2413
+ getter, setter, data,
2414
+ settings, attributes);
2415
+ i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this), info);
2416
+ return !result.is_null() && !result->IsUndefined();
2417
+ }
2418
+
2419
+
2420
+ bool v8::Object::HasRealNamedProperty(Handle<String> key) {
2421
+ ON_BAILOUT("v8::Object::HasRealNamedProperty()", return false);
2422
+ return Utils::OpenHandle(this)->HasRealNamedProperty(
2423
+ *Utils::OpenHandle(*key));
2424
+ }
2425
+
2426
+
2427
+ bool v8::Object::HasRealIndexedProperty(uint32_t index) {
2428
+ ON_BAILOUT("v8::Object::HasRealIndexedProperty()", return false);
2429
+ return Utils::OpenHandle(this)->HasRealElementProperty(index);
2430
+ }
2431
+
2432
+
2433
+ bool v8::Object::HasRealNamedCallbackProperty(Handle<String> key) {
2434
+ ON_BAILOUT("v8::Object::HasRealNamedCallbackProperty()", return false);
2435
+ ENTER_V8;
2436
+ return Utils::OpenHandle(this)->HasRealNamedCallbackProperty(
2437
+ *Utils::OpenHandle(*key));
2438
+ }
2439
+
2440
+
2441
+ bool v8::Object::HasNamedLookupInterceptor() {
2442
+ ON_BAILOUT("v8::Object::HasNamedLookupInterceptor()", return false);
2443
+ return Utils::OpenHandle(this)->HasNamedInterceptor();
2444
+ }
2445
+
2446
+
2447
+ bool v8::Object::HasIndexedLookupInterceptor() {
2448
+ ON_BAILOUT("v8::Object::HasIndexedLookupInterceptor()", return false);
2449
+ return Utils::OpenHandle(this)->HasIndexedInterceptor();
2450
+ }
2451
+
2452
+
2453
+ Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
2454
+ Handle<String> key) {
2455
+ ON_BAILOUT("v8::Object::GetRealNamedPropertyInPrototypeChain()",
2456
+ return Local<Value>());
2457
+ ENTER_V8;
2458
+ i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this);
2459
+ i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
2460
+ i::LookupResult lookup;
2461
+ self_obj->LookupRealNamedPropertyInPrototypes(*key_obj, &lookup);
2462
+ if (lookup.IsProperty()) {
2463
+ PropertyAttributes attributes;
2464
+ i::Handle<i::Object> result(self_obj->GetProperty(*self_obj,
2465
+ &lookup,
2466
+ *key_obj,
2467
+ &attributes));
2468
+ return Utils::ToLocal(result);
2469
+ }
2470
+ return Local<Value>(); // No real property was found in prototype chain.
2471
+ }
2472
+
2473
+
2474
+ Local<Value> v8::Object::GetRealNamedProperty(Handle<String> key) {
2475
+ ON_BAILOUT("v8::Object::GetRealNamedProperty()", return Local<Value>());
2476
+ ENTER_V8;
2477
+ i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this);
2478
+ i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
2479
+ i::LookupResult lookup;
2480
+ self_obj->LookupRealNamedProperty(*key_obj, &lookup);
2481
+ if (lookup.IsProperty()) {
2482
+ PropertyAttributes attributes;
2483
+ i::Handle<i::Object> result(self_obj->GetProperty(*self_obj,
2484
+ &lookup,
2485
+ *key_obj,
2486
+ &attributes));
2487
+ return Utils::ToLocal(result);
2488
+ }
2489
+ return Local<Value>(); // No real property was found in prototype chain.
2490
+ }
2491
+
2492
+
2493
+ // Turns on access checks by copying the map and setting the check flag.
2494
+ // Because the object gets a new map, existing inline cache caching
2495
+ // the old map of this object will fail.
2496
+ void v8::Object::TurnOnAccessCheck() {
2497
+ ON_BAILOUT("v8::Object::TurnOnAccessCheck()", return);
2498
+ ENTER_V8;
2499
+ HandleScope scope;
2500
+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
2501
+
2502
+ i::Handle<i::Map> new_map =
2503
+ i::Factory::CopyMapDropTransitions(i::Handle<i::Map>(obj->map()));
2504
+ new_map->set_is_access_check_needed(true);
2505
+ obj->set_map(*new_map);
2506
+ }
2507
+
2508
+
2509
+ bool v8::Object::IsDirty() {
2510
+ return Utils::OpenHandle(this)->IsDirty();
2511
+ }
2512
+
2513
+
2514
+ Local<v8::Object> v8::Object::Clone() {
2515
+ ON_BAILOUT("v8::Object::Clone()", return Local<Object>());
2516
+ ENTER_V8;
2517
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2518
+ EXCEPTION_PREAMBLE();
2519
+ i::Handle<i::JSObject> result = i::Copy(self);
2520
+ has_pending_exception = result.is_null();
2521
+ EXCEPTION_BAILOUT_CHECK(Local<Object>());
2522
+ return Utils::ToLocal(result);
2523
+ }
2524
+
2525
+
2526
+ int v8::Object::GetIdentityHash() {
2527
+ ON_BAILOUT("v8::Object::GetIdentityHash()", return 0);
2528
+ ENTER_V8;
2529
+ HandleScope scope;
2530
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2531
+ i::Handle<i::Object> hidden_props(i::GetHiddenProperties(self, true));
2532
+ i::Handle<i::Object> hash_symbol = i::Factory::identity_hash_symbol();
2533
+ i::Handle<i::Object> hash = i::GetProperty(hidden_props, hash_symbol);
2534
+ int hash_value;
2535
+ if (hash->IsSmi()) {
2536
+ hash_value = i::Smi::cast(*hash)->value();
2537
+ } else {
2538
+ int attempts = 0;
2539
+ do {
2540
+ // Generate a random 32-bit hash value but limit range to fit
2541
+ // within a smi.
2542
+ hash_value = i::V8::Random() & i::Smi::kMaxValue;
2543
+ attempts++;
2544
+ } while (hash_value == 0 && attempts < 30);
2545
+ hash_value = hash_value != 0 ? hash_value : 1; // never return 0
2546
+ i::SetProperty(hidden_props,
2547
+ hash_symbol,
2548
+ i::Handle<i::Object>(i::Smi::FromInt(hash_value)),
2549
+ static_cast<PropertyAttributes>(None));
2550
+ }
2551
+ return hash_value;
2552
+ }
2553
+
2554
+
2555
+ bool v8::Object::SetHiddenValue(v8::Handle<v8::String> key,
2556
+ v8::Handle<v8::Value> value) {
2557
+ ON_BAILOUT("v8::Object::SetHiddenValue()", return false);
2558
+ ENTER_V8;
2559
+ HandleScope scope;
2560
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2561
+ i::Handle<i::Object> hidden_props(i::GetHiddenProperties(self, true));
2562
+ i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
2563
+ i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
2564
+ EXCEPTION_PREAMBLE();
2565
+ i::Handle<i::Object> obj = i::SetProperty(
2566
+ hidden_props,
2567
+ key_obj,
2568
+ value_obj,
2569
+ static_cast<PropertyAttributes>(None));
2570
+ has_pending_exception = obj.is_null();
2571
+ EXCEPTION_BAILOUT_CHECK(false);
2572
+ return true;
2573
+ }
2574
+
2575
+
2576
+ v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) {
2577
+ ON_BAILOUT("v8::Object::GetHiddenValue()", return Local<v8::Value>());
2578
+ ENTER_V8;
2579
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2580
+ i::Handle<i::Object> hidden_props(i::GetHiddenProperties(self, false));
2581
+ if (hidden_props->IsUndefined()) {
2582
+ return v8::Local<v8::Value>();
2583
+ }
2584
+ i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
2585
+ EXCEPTION_PREAMBLE();
2586
+ i::Handle<i::Object> result = i::GetProperty(hidden_props, key_obj);
2587
+ has_pending_exception = result.is_null();
2588
+ EXCEPTION_BAILOUT_CHECK(v8::Local<v8::Value>());
2589
+ if (result->IsUndefined()) {
2590
+ return v8::Local<v8::Value>();
2591
+ }
2592
+ return Utils::ToLocal(result);
2593
+ }
2594
+
2595
+
2596
+ bool v8::Object::DeleteHiddenValue(v8::Handle<v8::String> key) {
2597
+ ON_BAILOUT("v8::DeleteHiddenValue()", return false);
2598
+ ENTER_V8;
2599
+ HandleScope scope;
2600
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2601
+ i::Handle<i::Object> hidden_props(i::GetHiddenProperties(self, false));
2602
+ if (hidden_props->IsUndefined()) {
2603
+ return true;
2604
+ }
2605
+ i::Handle<i::JSObject> js_obj(i::JSObject::cast(*hidden_props));
2606
+ i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
2607
+ return i::DeleteProperty(js_obj, key_obj)->IsTrue();
2608
+ }
2609
+
2610
+
2611
+ void v8::Object::SetIndexedPropertiesToPixelData(uint8_t* data, int length) {
2612
+ ON_BAILOUT("v8::SetElementsToPixelData()", return);
2613
+ ENTER_V8;
2614
+ HandleScope scope;
2615
+ if (!ApiCheck(length <= i::PixelArray::kMaxLength,
2616
+ "v8::Object::SetIndexedPropertiesToPixelData()",
2617
+ "length exceeds max acceptable value")) {
2618
+ return;
2619
+ }
2620
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2621
+ if (!ApiCheck(!self->IsJSArray(),
2622
+ "v8::Object::SetIndexedPropertiesToPixelData()",
2623
+ "JSArray is not supported")) {
2624
+ return;
2625
+ }
2626
+ i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data);
2627
+ self->set_map(
2628
+ *i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())));
2629
+ self->set_elements(*pixels);
2630
+ }
2631
+
2632
+
2633
+ bool v8::Object::HasIndexedPropertiesInPixelData() {
2634
+ ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false);
2635
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2636
+ return self->HasPixelElements();
2637
+ }
2638
+
2639
+
2640
+ uint8_t* v8::Object::GetIndexedPropertiesPixelData() {
2641
+ ON_BAILOUT("v8::GetIndexedPropertiesPixelData()", return NULL);
2642
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2643
+ if (self->HasPixelElements()) {
2644
+ return i::PixelArray::cast(self->elements())->external_pointer();
2645
+ } else {
2646
+ return NULL;
2647
+ }
2648
+ }
2649
+
2650
+
2651
+ int v8::Object::GetIndexedPropertiesPixelDataLength() {
2652
+ ON_BAILOUT("v8::GetIndexedPropertiesPixelDataLength()", return -1);
2653
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2654
+ if (self->HasPixelElements()) {
2655
+ return i::PixelArray::cast(self->elements())->length();
2656
+ } else {
2657
+ return -1;
2658
+ }
2659
+ }
2660
+
2661
+
2662
+ void v8::Object::SetIndexedPropertiesToExternalArrayData(
2663
+ void* data,
2664
+ ExternalArrayType array_type,
2665
+ int length) {
2666
+ ON_BAILOUT("v8::SetIndexedPropertiesToExternalArrayData()", return);
2667
+ ENTER_V8;
2668
+ HandleScope scope;
2669
+ if (!ApiCheck(length <= i::ExternalArray::kMaxLength,
2670
+ "v8::Object::SetIndexedPropertiesToExternalArrayData()",
2671
+ "length exceeds max acceptable value")) {
2672
+ return;
2673
+ }
2674
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2675
+ if (!ApiCheck(!self->IsJSArray(),
2676
+ "v8::Object::SetIndexedPropertiesToExternalArrayData()",
2677
+ "JSArray is not supported")) {
2678
+ return;
2679
+ }
2680
+ i::Handle<i::ExternalArray> array =
2681
+ i::Factory::NewExternalArray(length, array_type, data);
2682
+ self->set_map(
2683
+ *i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())));
2684
+ self->set_elements(*array);
2685
+ }
2686
+
2687
+
2688
+ bool v8::Object::HasIndexedPropertiesInExternalArrayData() {
2689
+ ON_BAILOUT("v8::HasIndexedPropertiesInExternalArrayData()", return false);
2690
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2691
+ return self->HasExternalArrayElements();
2692
+ }
2693
+
2694
+
2695
+ void* v8::Object::GetIndexedPropertiesExternalArrayData() {
2696
+ ON_BAILOUT("v8::GetIndexedPropertiesExternalArrayData()", return NULL);
2697
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2698
+ if (self->HasExternalArrayElements()) {
2699
+ return i::ExternalArray::cast(self->elements())->external_pointer();
2700
+ } else {
2701
+ return NULL;
2702
+ }
2703
+ }
2704
+
2705
+
2706
+ ExternalArrayType v8::Object::GetIndexedPropertiesExternalArrayDataType() {
2707
+ ON_BAILOUT("v8::GetIndexedPropertiesExternalArrayDataType()",
2708
+ return static_cast<ExternalArrayType>(-1));
2709
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2710
+ switch (self->elements()->map()->instance_type()) {
2711
+ case i::EXTERNAL_BYTE_ARRAY_TYPE:
2712
+ return kExternalByteArray;
2713
+ case i::EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE:
2714
+ return kExternalUnsignedByteArray;
2715
+ case i::EXTERNAL_SHORT_ARRAY_TYPE:
2716
+ return kExternalShortArray;
2717
+ case i::EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE:
2718
+ return kExternalUnsignedShortArray;
2719
+ case i::EXTERNAL_INT_ARRAY_TYPE:
2720
+ return kExternalIntArray;
2721
+ case i::EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
2722
+ return kExternalUnsignedIntArray;
2723
+ case i::EXTERNAL_FLOAT_ARRAY_TYPE:
2724
+ return kExternalFloatArray;
2725
+ default:
2726
+ return static_cast<ExternalArrayType>(-1);
2727
+ }
2728
+ }
2729
+
2730
+
2731
+ int v8::Object::GetIndexedPropertiesExternalArrayDataLength() {
2732
+ ON_BAILOUT("v8::GetIndexedPropertiesExternalArrayDataLength()", return 0);
2733
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2734
+ if (self->HasExternalArrayElements()) {
2735
+ return i::ExternalArray::cast(self->elements())->length();
2736
+ } else {
2737
+ return -1;
2738
+ }
2739
+ }
2740
+
2741
+
2742
+ Local<v8::Object> Function::NewInstance() const {
2743
+ return NewInstance(0, NULL);
2744
+ }
2745
+
2746
+
2747
+ Local<v8::Object> Function::NewInstance(int argc,
2748
+ v8::Handle<v8::Value> argv[]) const {
2749
+ ON_BAILOUT("v8::Function::NewInstance()", return Local<v8::Object>());
2750
+ LOG_API("Function::NewInstance");
2751
+ ENTER_V8;
2752
+ HandleScope scope;
2753
+ i::Handle<i::JSFunction> function = Utils::OpenHandle(this);
2754
+ STATIC_ASSERT(sizeof(v8::Handle<v8::Value>) == sizeof(i::Object**));
2755
+ i::Object*** args = reinterpret_cast<i::Object***>(argv);
2756
+ EXCEPTION_PREAMBLE();
2757
+ i::Handle<i::Object> returned =
2758
+ i::Execution::New(function, argc, args, &has_pending_exception);
2759
+ EXCEPTION_BAILOUT_CHECK(Local<v8::Object>());
2760
+ return scope.Close(Utils::ToLocal(i::Handle<i::JSObject>::cast(returned)));
2761
+ }
2762
+
2763
+
2764
+ Local<v8::Value> Function::Call(v8::Handle<v8::Object> recv, int argc,
2765
+ v8::Handle<v8::Value> argv[]) {
2766
+ ON_BAILOUT("v8::Function::Call()", return Local<v8::Value>());
2767
+ LOG_API("Function::Call");
2768
+ ENTER_V8;
2769
+ i::Object* raw_result = NULL;
2770
+ {
2771
+ HandleScope scope;
2772
+ i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
2773
+ i::Handle<i::Object> recv_obj = Utils::OpenHandle(*recv);
2774
+ STATIC_ASSERT(sizeof(v8::Handle<v8::Value>) == sizeof(i::Object**));
2775
+ i::Object*** args = reinterpret_cast<i::Object***>(argv);
2776
+ EXCEPTION_PREAMBLE();
2777
+ i::Handle<i::Object> returned =
2778
+ i::Execution::Call(fun, recv_obj, argc, args, &has_pending_exception);
2779
+ EXCEPTION_BAILOUT_CHECK(Local<Object>());
2780
+ raw_result = *returned;
2781
+ }
2782
+ i::Handle<i::Object> result(raw_result);
2783
+ return Utils::ToLocal(result);
2784
+ }
2785
+
2786
+
2787
+ void Function::SetName(v8::Handle<v8::String> name) {
2788
+ ENTER_V8;
2789
+ i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
2790
+ func->shared()->set_name(*Utils::OpenHandle(*name));
2791
+ }
2792
+
2793
+
2794
+ Handle<Value> Function::GetName() const {
2795
+ i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
2796
+ return Utils::ToLocal(i::Handle<i::Object>(func->shared()->name()));
2797
+ }
2798
+
2799
+
2800
+ ScriptOrigin Function::GetScriptOrigin() const {
2801
+ i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
2802
+ if (func->shared()->script()->IsScript()) {
2803
+ i::Handle<i::Script> script(i::Script::cast(func->shared()->script()));
2804
+ v8::ScriptOrigin origin(
2805
+ Utils::ToLocal(i::Handle<i::Object>(script->name())),
2806
+ v8::Integer::New(script->line_offset()->value()),
2807
+ v8::Integer::New(script->column_offset()->value()));
2808
+ return origin;
2809
+ }
2810
+ return v8::ScriptOrigin(Handle<Value>());
2811
+ }
2812
+
2813
+
2814
+ const int Function::kLineOffsetNotFound = -1;
2815
+
2816
+
2817
+ int Function::GetScriptLineNumber() const {
2818
+ i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
2819
+ if (func->shared()->script()->IsScript()) {
2820
+ i::Handle<i::Script> script(i::Script::cast(func->shared()->script()));
2821
+ return i::GetScriptLineNumber(script, func->shared()->start_position());
2822
+ }
2823
+ return kLineOffsetNotFound;
2824
+ }
2825
+
2826
+
2827
+ namespace {
2828
+
2829
+ // Tracks string usage to help make better decisions when
2830
+ // externalizing strings.
2831
+ //
2832
+ // Implementation note: internally this class only tracks fresh
2833
+ // strings and keeps a single use counter for them.
2834
+ class StringTracker {
2835
+ public:
2836
+ // Records that the given string's characters were copied to some
2837
+ // external buffer. If this happens often we should honor
2838
+ // externalization requests for the string.
2839
+ static void RecordWrite(i::Handle<i::String> string) {
2840
+ i::Address address = reinterpret_cast<i::Address>(*string);
2841
+ i::Address top = i::Heap::NewSpaceTop();
2842
+ if (IsFreshString(address, top)) {
2843
+ IncrementUseCount(top);
2844
+ }
2845
+ }
2846
+
2847
+ // Estimates freshness and use frequency of the given string based
2848
+ // on how close it is to the new space top and the recorded usage
2849
+ // history.
2850
+ static inline bool IsFreshUnusedString(i::Handle<i::String> string) {
2851
+ i::Address address = reinterpret_cast<i::Address>(*string);
2852
+ i::Address top = i::Heap::NewSpaceTop();
2853
+ return IsFreshString(address, top) && IsUseCountLow(top);
2854
+ }
2855
+
2856
+ private:
2857
+ static inline bool IsFreshString(i::Address string, i::Address top) {
2858
+ return top - kFreshnessLimit <= string && string <= top;
2859
+ }
2860
+
2861
+ static inline bool IsUseCountLow(i::Address top) {
2862
+ if (last_top_ != top) return true;
2863
+ return use_count_ < kUseLimit;
2864
+ }
2865
+
2866
+ static inline void IncrementUseCount(i::Address top) {
2867
+ if (last_top_ != top) {
2868
+ use_count_ = 0;
2869
+ last_top_ = top;
2870
+ }
2871
+ ++use_count_;
2872
+ }
2873
+
2874
+ // How close to the new space top a fresh string has to be.
2875
+ static const int kFreshnessLimit = 1024;
2876
+
2877
+ // The number of uses required to consider a string useful.
2878
+ static const int kUseLimit = 32;
2879
+
2880
+ // Single use counter shared by all fresh strings.
2881
+ static int use_count_;
2882
+
2883
+ // Last new space top when the use count above was valid.
2884
+ static i::Address last_top_;
2885
+ };
2886
+
2887
+ int StringTracker::use_count_ = 0;
2888
+ i::Address StringTracker::last_top_ = NULL;
2889
+
2890
+ } // namespace
2891
+
2892
+
2893
+ int String::Length() const {
2894
+ if (IsDeadCheck("v8::String::Length()")) return 0;
2895
+ return Utils::OpenHandle(this)->length();
2896
+ }
2897
+
2898
+
2899
+ int String::Utf8Length() const {
2900
+ if (IsDeadCheck("v8::String::Utf8Length()")) return 0;
2901
+ return Utils::OpenHandle(this)->Utf8Length();
2902
+ }
2903
+
2904
+
2905
+ int String::WriteUtf8(char* buffer,
2906
+ int capacity,
2907
+ int* nchars_ref,
2908
+ WriteHints hints) const {
2909
+ if (IsDeadCheck("v8::String::WriteUtf8()")) return 0;
2910
+ LOG_API("String::WriteUtf8");
2911
+ ENTER_V8;
2912
+ i::Handle<i::String> str = Utils::OpenHandle(this);
2913
+ StringTracker::RecordWrite(str);
2914
+ if (hints & HINT_MANY_WRITES_EXPECTED) {
2915
+ // Flatten the string for efficiency. This applies whether we are
2916
+ // using StringInputBuffer or Get(i) to access the characters.
2917
+ str->TryFlatten();
2918
+ }
2919
+ write_input_buffer.Reset(0, *str);
2920
+ int len = str->length();
2921
+ // Encode the first K - 3 bytes directly into the buffer since we
2922
+ // know there's room for them. If no capacity is given we copy all
2923
+ // of them here.
2924
+ int fast_end = capacity - (unibrow::Utf8::kMaxEncodedSize - 1);
2925
+ int i;
2926
+ int pos = 0;
2927
+ int nchars = 0;
2928
+ for (i = 0; i < len && (capacity == -1 || pos < fast_end); i++) {
2929
+ i::uc32 c = write_input_buffer.GetNext();
2930
+ int written = unibrow::Utf8::Encode(buffer + pos, c);
2931
+ pos += written;
2932
+ nchars++;
2933
+ }
2934
+ if (i < len) {
2935
+ // For the last characters we need to check the length for each one
2936
+ // because they may be longer than the remaining space in the
2937
+ // buffer.
2938
+ char intermediate[unibrow::Utf8::kMaxEncodedSize];
2939
+ for (; i < len && pos < capacity; i++) {
2940
+ i::uc32 c = write_input_buffer.GetNext();
2941
+ int written = unibrow::Utf8::Encode(intermediate, c);
2942
+ if (pos + written <= capacity) {
2943
+ for (int j = 0; j < written; j++)
2944
+ buffer[pos + j] = intermediate[j];
2945
+ pos += written;
2946
+ nchars++;
2947
+ } else {
2948
+ // We've reached the end of the buffer
2949
+ break;
2950
+ }
2951
+ }
2952
+ }
2953
+ if (nchars_ref != NULL) *nchars_ref = nchars;
2954
+ if (i == len && (capacity == -1 || pos < capacity))
2955
+ buffer[pos++] = '\0';
2956
+ return pos;
2957
+ }
2958
+
2959
+
2960
+ int String::WriteAscii(char* buffer,
2961
+ int start,
2962
+ int length,
2963
+ WriteHints hints) const {
2964
+ if (IsDeadCheck("v8::String::WriteAscii()")) return 0;
2965
+ LOG_API("String::WriteAscii");
2966
+ ENTER_V8;
2967
+ ASSERT(start >= 0 && length >= -1);
2968
+ i::Handle<i::String> str = Utils::OpenHandle(this);
2969
+ StringTracker::RecordWrite(str);
2970
+ if (hints & HINT_MANY_WRITES_EXPECTED) {
2971
+ // Flatten the string for efficiency. This applies whether we are
2972
+ // using StringInputBuffer or Get(i) to access the characters.
2973
+ str->TryFlatten();
2974
+ }
2975
+ int end = length;
2976
+ if ( (length == -1) || (length > str->length() - start) )
2977
+ end = str->length() - start;
2978
+ if (end < 0) return 0;
2979
+ write_input_buffer.Reset(start, *str);
2980
+ int i;
2981
+ for (i = 0; i < end; i++) {
2982
+ char c = static_cast<char>(write_input_buffer.GetNext());
2983
+ if (c == '\0') c = ' ';
2984
+ buffer[i] = c;
2985
+ }
2986
+ if (length == -1 || i < length)
2987
+ buffer[i] = '\0';
2988
+ return i;
2989
+ }
2990
+
2991
+
2992
+ int String::Write(uint16_t* buffer,
2993
+ int start,
2994
+ int length,
2995
+ WriteHints hints) const {
2996
+ if (IsDeadCheck("v8::String::Write()")) return 0;
2997
+ LOG_API("String::Write");
2998
+ ENTER_V8;
2999
+ ASSERT(start >= 0 && length >= -1);
3000
+ i::Handle<i::String> str = Utils::OpenHandle(this);
3001
+ StringTracker::RecordWrite(str);
3002
+ if (hints & HINT_MANY_WRITES_EXPECTED) {
3003
+ // Flatten the string for efficiency. This applies whether we are
3004
+ // using StringInputBuffer or Get(i) to access the characters.
3005
+ str->TryFlatten();
3006
+ }
3007
+ int end = length;
3008
+ if ( (length == -1) || (length > str->length() - start) )
3009
+ end = str->length() - start;
3010
+ if (end < 0) return 0;
3011
+ i::String::WriteToFlat(*str, buffer, start, end);
3012
+ if (length == -1 || end < length)
3013
+ buffer[end] = '\0';
3014
+ return end;
3015
+ }
3016
+
3017
+
3018
+ bool v8::String::IsExternal() const {
3019
+ EnsureInitialized("v8::String::IsExternal()");
3020
+ i::Handle<i::String> str = Utils::OpenHandle(this);
3021
+ return i::StringShape(*str).IsExternalTwoByte();
3022
+ }
3023
+
3024
+
3025
+ bool v8::String::IsExternalAscii() const {
3026
+ EnsureInitialized("v8::String::IsExternalAscii()");
3027
+ i::Handle<i::String> str = Utils::OpenHandle(this);
3028
+ return i::StringShape(*str).IsExternalAscii();
3029
+ }
3030
+
3031
+
3032
+ void v8::String::VerifyExternalStringResource(
3033
+ v8::String::ExternalStringResource* value) const {
3034
+ i::Handle<i::String> str = Utils::OpenHandle(this);
3035
+ v8::String::ExternalStringResource* expected;
3036
+ if (i::StringShape(*str).IsExternalTwoByte()) {
3037
+ void* resource = i::Handle<i::ExternalTwoByteString>::cast(str)->resource();
3038
+ expected = reinterpret_cast<ExternalStringResource*>(resource);
3039
+ } else {
3040
+ expected = NULL;
3041
+ }
3042
+ CHECK_EQ(expected, value);
3043
+ }
3044
+
3045
+
3046
+ v8::String::ExternalAsciiStringResource*
3047
+ v8::String::GetExternalAsciiStringResource() const {
3048
+ EnsureInitialized("v8::String::GetExternalAsciiStringResource()");
3049
+ i::Handle<i::String> str = Utils::OpenHandle(this);
3050
+ if (i::StringShape(*str).IsExternalAscii()) {
3051
+ void* resource = i::Handle<i::ExternalAsciiString>::cast(str)->resource();
3052
+ return reinterpret_cast<ExternalAsciiStringResource*>(resource);
3053
+ } else {
3054
+ return NULL;
3055
+ }
3056
+ }
3057
+
3058
+
3059
+ double Number::Value() const {
3060
+ if (IsDeadCheck("v8::Number::Value()")) return 0;
3061
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3062
+ return obj->Number();
3063
+ }
3064
+
3065
+
3066
+ bool Boolean::Value() const {
3067
+ if (IsDeadCheck("v8::Boolean::Value()")) return false;
3068
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3069
+ return obj->IsTrue();
3070
+ }
3071
+
3072
+
3073
+ int64_t Integer::Value() const {
3074
+ if (IsDeadCheck("v8::Integer::Value()")) return 0;
3075
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3076
+ if (obj->IsSmi()) {
3077
+ return i::Smi::cast(*obj)->value();
3078
+ } else {
3079
+ return static_cast<int64_t>(obj->Number());
3080
+ }
3081
+ }
3082
+
3083
+
3084
+ int32_t Int32::Value() const {
3085
+ if (IsDeadCheck("v8::Int32::Value()")) return 0;
3086
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3087
+ if (obj->IsSmi()) {
3088
+ return i::Smi::cast(*obj)->value();
3089
+ } else {
3090
+ return static_cast<int32_t>(obj->Number());
3091
+ }
3092
+ }
3093
+
3094
+
3095
+ uint32_t Uint32::Value() const {
3096
+ if (IsDeadCheck("v8::Uint32::Value()")) return 0;
3097
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3098
+ if (obj->IsSmi()) {
3099
+ return i::Smi::cast(*obj)->value();
3100
+ } else {
3101
+ return static_cast<uint32_t>(obj->Number());
3102
+ }
3103
+ }
3104
+
3105
+
3106
+ int v8::Object::InternalFieldCount() {
3107
+ if (IsDeadCheck("v8::Object::InternalFieldCount()")) return 0;
3108
+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
3109
+ return obj->GetInternalFieldCount();
3110
+ }
3111
+
3112
+
3113
+ Local<Value> v8::Object::CheckedGetInternalField(int index) {
3114
+ if (IsDeadCheck("v8::Object::GetInternalField()")) return Local<Value>();
3115
+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
3116
+ if (!ApiCheck(index < obj->GetInternalFieldCount(),
3117
+ "v8::Object::GetInternalField()",
3118
+ "Reading internal field out of bounds")) {
3119
+ return Local<Value>();
3120
+ }
3121
+ i::Handle<i::Object> value(obj->GetInternalField(index));
3122
+ Local<Value> result = Utils::ToLocal(value);
3123
+ #ifdef DEBUG
3124
+ Local<Value> unchecked = UncheckedGetInternalField(index);
3125
+ ASSERT(unchecked.IsEmpty() || (unchecked == result));
3126
+ #endif
3127
+ return result;
3128
+ }
3129
+
3130
+
3131
+ void v8::Object::SetInternalField(int index, v8::Handle<Value> value) {
3132
+ if (IsDeadCheck("v8::Object::SetInternalField()")) return;
3133
+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
3134
+ if (!ApiCheck(index < obj->GetInternalFieldCount(),
3135
+ "v8::Object::SetInternalField()",
3136
+ "Writing internal field out of bounds")) {
3137
+ return;
3138
+ }
3139
+ ENTER_V8;
3140
+ i::Handle<i::Object> val = Utils::OpenHandle(*value);
3141
+ obj->SetInternalField(index, *val);
3142
+ }
3143
+
3144
+
3145
+ void v8::Object::SetPointerInInternalField(int index, void* value) {
3146
+ ENTER_V8;
3147
+ i::Object* as_object = reinterpret_cast<i::Object*>(value);
3148
+ if (as_object->IsSmi()) {
3149
+ Utils::OpenHandle(this)->SetInternalField(index, as_object);
3150
+ return;
3151
+ }
3152
+ HandleScope scope;
3153
+ i::Handle<i::Proxy> proxy =
3154
+ i::Factory::NewProxy(reinterpret_cast<i::Address>(value), i::TENURED);
3155
+ if (!proxy.is_null())
3156
+ Utils::OpenHandle(this)->SetInternalField(index, *proxy);
3157
+ }
3158
+
3159
+
3160
+ // --- E n v i r o n m e n t ---
3161
+
3162
+ bool v8::V8::Initialize() {
3163
+ if (i::V8::IsRunning()) return true;
3164
+ ENTER_V8;
3165
+ HandleScope scope;
3166
+ if (i::Snapshot::Initialize()) return true;
3167
+ return i::V8::Initialize(NULL);
3168
+ }
3169
+
3170
+
3171
+ bool v8::V8::Dispose() {
3172
+ i::V8::TearDown();
3173
+ return true;
3174
+ }
3175
+
3176
+
3177
+ HeapStatistics::HeapStatistics(): total_heap_size_(0), used_heap_size_(0) { }
3178
+
3179
+
3180
+ void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) {
3181
+ heap_statistics->set_total_heap_size(i::Heap::CommittedMemory());
3182
+ heap_statistics->set_used_heap_size(i::Heap::SizeOfObjects());
3183
+ }
3184
+
3185
+
3186
+ bool v8::V8::IdleNotification() {
3187
+ // Returning true tells the caller that it need not
3188
+ // continue to call IdleNotification.
3189
+ if (!i::V8::IsRunning()) return true;
3190
+ return i::V8::IdleNotification();
3191
+ }
3192
+
3193
+
3194
+ void v8::V8::LowMemoryNotification() {
3195
+ if (!i::V8::IsRunning()) return;
3196
+ i::Heap::CollectAllGarbage(true);
3197
+ }
3198
+
3199
+
3200
+ int v8::V8::ContextDisposedNotification() {
3201
+ if (!i::V8::IsRunning()) return 0;
3202
+ return i::Heap::NotifyContextDisposed();
3203
+ }
3204
+
3205
+
3206
+ const char* v8::V8::GetVersion() {
3207
+ static v8::internal::EmbeddedVector<char, 128> buffer;
3208
+ v8::internal::Version::GetString(buffer);
3209
+ return buffer.start();
3210
+ }
3211
+
3212
+
3213
+ static i::Handle<i::FunctionTemplateInfo>
3214
+ EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) {
3215
+ if (templ->constructor()->IsUndefined()) {
3216
+ Local<FunctionTemplate> constructor = FunctionTemplate::New();
3217
+ Utils::OpenHandle(*constructor)->set_instance_template(*templ);
3218
+ templ->set_constructor(*Utils::OpenHandle(*constructor));
3219
+ }
3220
+ return i::Handle<i::FunctionTemplateInfo>(
3221
+ i::FunctionTemplateInfo::cast(templ->constructor()));
3222
+ }
3223
+
3224
+
3225
+ Persistent<Context> v8::Context::New(
3226
+ v8::ExtensionConfiguration* extensions,
3227
+ v8::Handle<ObjectTemplate> global_template,
3228
+ v8::Handle<Value> global_object) {
3229
+ EnsureInitialized("v8::Context::New()");
3230
+ LOG_API("Context::New");
3231
+ ON_BAILOUT("v8::Context::New()", return Persistent<Context>());
3232
+
3233
+ // Enter V8 via an ENTER_V8 scope.
3234
+ i::Handle<i::Context> env;
3235
+ {
3236
+ ENTER_V8;
3237
+ v8::Handle<ObjectTemplate> proxy_template = global_template;
3238
+ i::Handle<i::FunctionTemplateInfo> proxy_constructor;
3239
+ i::Handle<i::FunctionTemplateInfo> global_constructor;
3240
+
3241
+ if (!global_template.IsEmpty()) {
3242
+ // Make sure that the global_template has a constructor.
3243
+ global_constructor =
3244
+ EnsureConstructor(Utils::OpenHandle(*global_template));
3245
+
3246
+ // Create a fresh template for the global proxy object.
3247
+ proxy_template = ObjectTemplate::New();
3248
+ proxy_constructor =
3249
+ EnsureConstructor(Utils::OpenHandle(*proxy_template));
3250
+
3251
+ // Set the global template to be the prototype template of
3252
+ // global proxy template.
3253
+ proxy_constructor->set_prototype_template(
3254
+ *Utils::OpenHandle(*global_template));
3255
+
3256
+ // Migrate security handlers from global_template to
3257
+ // proxy_template. Temporarily removing access check
3258
+ // information from the global template.
3259
+ if (!global_constructor->access_check_info()->IsUndefined()) {
3260
+ proxy_constructor->set_access_check_info(
3261
+ global_constructor->access_check_info());
3262
+ proxy_constructor->set_needs_access_check(
3263
+ global_constructor->needs_access_check());
3264
+ global_constructor->set_needs_access_check(false);
3265
+ global_constructor->set_access_check_info(i::Heap::undefined_value());
3266
+ }
3267
+ }
3268
+
3269
+ // Create the environment.
3270
+ env = i::Bootstrapper::CreateEnvironment(
3271
+ Utils::OpenHandle(*global_object),
3272
+ proxy_template,
3273
+ extensions);
3274
+
3275
+ // Restore the access check info on the global template.
3276
+ if (!global_template.IsEmpty()) {
3277
+ ASSERT(!global_constructor.is_null());
3278
+ ASSERT(!proxy_constructor.is_null());
3279
+ global_constructor->set_access_check_info(
3280
+ proxy_constructor->access_check_info());
3281
+ global_constructor->set_needs_access_check(
3282
+ proxy_constructor->needs_access_check());
3283
+ }
3284
+ }
3285
+ // Leave V8.
3286
+
3287
+ if (env.is_null())
3288
+ return Persistent<Context>();
3289
+ return Persistent<Context>(Utils::ToLocal(env));
3290
+ }
3291
+
3292
+
3293
+ void v8::Context::SetSecurityToken(Handle<Value> token) {
3294
+ if (IsDeadCheck("v8::Context::SetSecurityToken()")) return;
3295
+ ENTER_V8;
3296
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
3297
+ i::Handle<i::Object> token_handle = Utils::OpenHandle(*token);
3298
+ env->set_security_token(*token_handle);
3299
+ }
3300
+
3301
+
3302
+ void v8::Context::UseDefaultSecurityToken() {
3303
+ if (IsDeadCheck("v8::Context::UseDefaultSecurityToken()")) return;
3304
+ ENTER_V8;
3305
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
3306
+ env->set_security_token(env->global());
3307
+ }
3308
+
3309
+
3310
+ Handle<Value> v8::Context::GetSecurityToken() {
3311
+ if (IsDeadCheck("v8::Context::GetSecurityToken()")) return Handle<Value>();
3312
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
3313
+ i::Object* security_token = env->security_token();
3314
+ i::Handle<i::Object> token_handle(security_token);
3315
+ return Utils::ToLocal(token_handle);
3316
+ }
3317
+
3318
+
3319
+ bool Context::HasOutOfMemoryException() {
3320
+ i::Handle<i::Context> env = Utils::OpenHandle(this);
3321
+ return env->has_out_of_memory();
3322
+ }
3323
+
3324
+
3325
+ bool Context::InContext() {
3326
+ return i::Top::context() != NULL;
3327
+ }
3328
+
3329
+
3330
+ v8::Local<v8::Context> Context::GetEntered() {
3331
+ if (IsDeadCheck("v8::Context::GetEntered()")) return Local<Context>();
3332
+ i::Handle<i::Object> last = thread_local.LastEnteredContext();
3333
+ if (last.is_null()) return Local<Context>();
3334
+ i::Handle<i::Context> context = i::Handle<i::Context>::cast(last);
3335
+ return Utils::ToLocal(context);
3336
+ }
3337
+
3338
+
3339
+ v8::Local<v8::Context> Context::GetCurrent() {
3340
+ if (IsDeadCheck("v8::Context::GetCurrent()")) return Local<Context>();
3341
+ i::Handle<i::Object> current = i::Top::global_context();
3342
+ if (current.is_null()) return Local<Context>();
3343
+ i::Handle<i::Context> context = i::Handle<i::Context>::cast(current);
3344
+ return Utils::ToLocal(context);
3345
+ }
3346
+
3347
+
3348
+ v8::Local<v8::Context> Context::GetCalling() {
3349
+ if (IsDeadCheck("v8::Context::GetCalling()")) return Local<Context>();
3350
+ i::Handle<i::Object> calling = i::Top::GetCallingGlobalContext();
3351
+ if (calling.is_null()) return Local<Context>();
3352
+ i::Handle<i::Context> context = i::Handle<i::Context>::cast(calling);
3353
+ return Utils::ToLocal(context);
3354
+ }
3355
+
3356
+
3357
+ v8::Local<v8::Object> Context::Global() {
3358
+ if (IsDeadCheck("v8::Context::Global()")) return Local<v8::Object>();
3359
+ i::Object** ctx = reinterpret_cast<i::Object**>(this);
3360
+ i::Handle<i::Context> context =
3361
+ i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
3362
+ i::Handle<i::Object> global(context->global_proxy());
3363
+ return Utils::ToLocal(i::Handle<i::JSObject>::cast(global));
3364
+ }
3365
+
3366
+
3367
+ void Context::DetachGlobal() {
3368
+ if (IsDeadCheck("v8::Context::DetachGlobal()")) return;
3369
+ ENTER_V8;
3370
+ i::Object** ctx = reinterpret_cast<i::Object**>(this);
3371
+ i::Handle<i::Context> context =
3372
+ i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
3373
+ i::Bootstrapper::DetachGlobal(context);
3374
+ }
3375
+
3376
+
3377
+ void Context::ReattachGlobal(Handle<Object> global_object) {
3378
+ if (IsDeadCheck("v8::Context::ReattachGlobal()")) return;
3379
+ ENTER_V8;
3380
+ i::Object** ctx = reinterpret_cast<i::Object**>(this);
3381
+ i::Handle<i::Context> context =
3382
+ i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
3383
+ i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object));
3384
+ }
3385
+
3386
+
3387
+ Local<v8::Object> ObjectTemplate::NewInstance() {
3388
+ ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>());
3389
+ LOG_API("ObjectTemplate::NewInstance");
3390
+ ENTER_V8;
3391
+ EXCEPTION_PREAMBLE();
3392
+ i::Handle<i::Object> obj =
3393
+ i::Execution::InstantiateObject(Utils::OpenHandle(this),
3394
+ &has_pending_exception);
3395
+ EXCEPTION_BAILOUT_CHECK(Local<v8::Object>());
3396
+ return Utils::ToLocal(i::Handle<i::JSObject>::cast(obj));
3397
+ }
3398
+
3399
+
3400
+ Local<v8::Function> FunctionTemplate::GetFunction() {
3401
+ ON_BAILOUT("v8::FunctionTemplate::GetFunction()",
3402
+ return Local<v8::Function>());
3403
+ LOG_API("FunctionTemplate::GetFunction");
3404
+ ENTER_V8;
3405
+ EXCEPTION_PREAMBLE();
3406
+ i::Handle<i::Object> obj =
3407
+ i::Execution::InstantiateFunction(Utils::OpenHandle(this),
3408
+ &has_pending_exception);
3409
+ EXCEPTION_BAILOUT_CHECK(Local<v8::Function>());
3410
+ return Utils::ToLocal(i::Handle<i::JSFunction>::cast(obj));
3411
+ }
3412
+
3413
+
3414
+ bool FunctionTemplate::HasInstance(v8::Handle<v8::Value> value) {
3415
+ ON_BAILOUT("v8::FunctionTemplate::HasInstanceOf()", return false);
3416
+ i::Object* obj = *Utils::OpenHandle(*value);
3417
+ return obj->IsInstanceOf(*Utils::OpenHandle(this));
3418
+ }
3419
+
3420
+
3421
+ static Local<External> ExternalNewImpl(void* data) {
3422
+ return Utils::ToLocal(i::Factory::NewProxy(static_cast<i::Address>(data)));
3423
+ }
3424
+
3425
+ static void* ExternalValueImpl(i::Handle<i::Object> obj) {
3426
+ return reinterpret_cast<void*>(i::Proxy::cast(*obj)->proxy());
3427
+ }
3428
+
3429
+
3430
+ Local<Value> v8::External::Wrap(void* data) {
3431
+ STATIC_ASSERT(sizeof(data) == sizeof(i::Address));
3432
+ LOG_API("External::Wrap");
3433
+ EnsureInitialized("v8::External::Wrap()");
3434
+ ENTER_V8;
3435
+ i::Object* as_object = reinterpret_cast<i::Object*>(data);
3436
+ if (as_object->IsSmi()) {
3437
+ return Utils::ToLocal(i::Handle<i::Object>(as_object));
3438
+ }
3439
+ return ExternalNewImpl(data);
3440
+ }
3441
+
3442
+
3443
+ void* v8::Object::SlowGetPointerFromInternalField(int index) {
3444
+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
3445
+ i::Object* value = obj->GetInternalField(index);
3446
+ if (value->IsSmi()) {
3447
+ return value;
3448
+ } else if (value->IsProxy()) {
3449
+ return reinterpret_cast<void*>(i::Proxy::cast(value)->proxy());
3450
+ } else {
3451
+ return NULL;
3452
+ }
3453
+ }
3454
+
3455
+
3456
+ void* v8::External::FullUnwrap(v8::Handle<v8::Value> wrapper) {
3457
+ if (IsDeadCheck("v8::External::Unwrap()")) return 0;
3458
+ i::Handle<i::Object> obj = Utils::OpenHandle(*wrapper);
3459
+ void* result;
3460
+ if (obj->IsSmi()) {
3461
+ // The external value was an aligned pointer.
3462
+ result = *obj;
3463
+ } else if (obj->IsProxy()) {
3464
+ result = ExternalValueImpl(obj);
3465
+ } else {
3466
+ result = NULL;
3467
+ }
3468
+ ASSERT_EQ(result, QuickUnwrap(wrapper));
3469
+ return result;
3470
+ }
3471
+
3472
+
3473
+ Local<External> v8::External::New(void* data) {
3474
+ STATIC_ASSERT(sizeof(data) == sizeof(i::Address));
3475
+ LOG_API("External::New");
3476
+ EnsureInitialized("v8::External::New()");
3477
+ ENTER_V8;
3478
+ return ExternalNewImpl(data);
3479
+ }
3480
+
3481
+
3482
+ void* External::Value() const {
3483
+ if (IsDeadCheck("v8::External::Value()")) return 0;
3484
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3485
+ return ExternalValueImpl(obj);
3486
+ }
3487
+
3488
+
3489
+ Local<String> v8::String::Empty() {
3490
+ EnsureInitialized("v8::String::Empty()");
3491
+ LOG_API("String::Empty()");
3492
+ return Utils::ToLocal(i::Factory::empty_symbol());
3493
+ }
3494
+
3495
+
3496
+ Local<String> v8::String::New(const char* data, int length) {
3497
+ EnsureInitialized("v8::String::New()");
3498
+ LOG_API("String::New(char)");
3499
+ if (length == 0) return Empty();
3500
+ ENTER_V8;
3501
+ if (length == -1) length = i::StrLength(data);
3502
+ i::Handle<i::String> result =
3503
+ i::Factory::NewStringFromUtf8(i::Vector<const char>(data, length));
3504
+ return Utils::ToLocal(result);
3505
+ }
3506
+
3507
+
3508
+ Local<String> v8::String::Concat(Handle<String> left, Handle<String> right) {
3509
+ EnsureInitialized("v8::String::New()");
3510
+ LOG_API("String::New(char)");
3511
+ ENTER_V8;
3512
+ i::Handle<i::String> left_string = Utils::OpenHandle(*left);
3513
+ i::Handle<i::String> right_string = Utils::OpenHandle(*right);
3514
+ i::Handle<i::String> result = i::Factory::NewConsString(left_string,
3515
+ right_string);
3516
+ return Utils::ToLocal(result);
3517
+ }
3518
+
3519
+
3520
+ Local<String> v8::String::NewUndetectable(const char* data, int length) {
3521
+ EnsureInitialized("v8::String::NewUndetectable()");
3522
+ LOG_API("String::NewUndetectable(char)");
3523
+ ENTER_V8;
3524
+ if (length == -1) length = i::StrLength(data);
3525
+ i::Handle<i::String> result =
3526
+ i::Factory::NewStringFromUtf8(i::Vector<const char>(data, length));
3527
+ result->MarkAsUndetectable();
3528
+ return Utils::ToLocal(result);
3529
+ }
3530
+
3531
+
3532
+ static int TwoByteStringLength(const uint16_t* data) {
3533
+ int length = 0;
3534
+ while (data[length] != '\0') length++;
3535
+ return length;
3536
+ }
3537
+
3538
+
3539
+ Local<String> v8::String::New(const uint16_t* data, int length) {
3540
+ EnsureInitialized("v8::String::New()");
3541
+ LOG_API("String::New(uint16_)");
3542
+ if (length == 0) return Empty();
3543
+ ENTER_V8;
3544
+ if (length == -1) length = TwoByteStringLength(data);
3545
+ i::Handle<i::String> result =
3546
+ i::Factory::NewStringFromTwoByte(i::Vector<const uint16_t>(data, length));
3547
+ return Utils::ToLocal(result);
3548
+ }
3549
+
3550
+
3551
+ Local<String> v8::String::NewUndetectable(const uint16_t* data, int length) {
3552
+ EnsureInitialized("v8::String::NewUndetectable()");
3553
+ LOG_API("String::NewUndetectable(uint16_)");
3554
+ ENTER_V8;
3555
+ if (length == -1) length = TwoByteStringLength(data);
3556
+ i::Handle<i::String> result =
3557
+ i::Factory::NewStringFromTwoByte(i::Vector<const uint16_t>(data, length));
3558
+ result->MarkAsUndetectable();
3559
+ return Utils::ToLocal(result);
3560
+ }
3561
+
3562
+
3563
+ i::Handle<i::String> NewExternalStringHandle(
3564
+ v8::String::ExternalStringResource* resource) {
3565
+ i::Handle<i::String> result =
3566
+ i::Factory::NewExternalStringFromTwoByte(resource);
3567
+ return result;
3568
+ }
3569
+
3570
+
3571
+ i::Handle<i::String> NewExternalAsciiStringHandle(
3572
+ v8::String::ExternalAsciiStringResource* resource) {
3573
+ i::Handle<i::String> result =
3574
+ i::Factory::NewExternalStringFromAscii(resource);
3575
+ return result;
3576
+ }
3577
+
3578
+
3579
+ Local<String> v8::String::NewExternal(
3580
+ v8::String::ExternalStringResource* resource) {
3581
+ EnsureInitialized("v8::String::NewExternal()");
3582
+ LOG_API("String::NewExternal");
3583
+ ENTER_V8;
3584
+ i::Handle<i::String> result = NewExternalStringHandle(resource);
3585
+ i::ExternalStringTable::AddString(*result);
3586
+ return Utils::ToLocal(result);
3587
+ }
3588
+
3589
+
3590
+ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
3591
+ if (IsDeadCheck("v8::String::MakeExternal()")) return false;
3592
+ if (this->IsExternal()) return false; // Already an external string.
3593
+ ENTER_V8;
3594
+ i::Handle<i::String> obj = Utils::OpenHandle(this);
3595
+ if (StringTracker::IsFreshUnusedString(obj)) return false;
3596
+ bool result = obj->MakeExternal(resource);
3597
+ if (result && !obj->IsSymbol()) {
3598
+ i::ExternalStringTable::AddString(*obj);
3599
+ }
3600
+ return result;
3601
+ }
3602
+
3603
+
3604
+ Local<String> v8::String::NewExternal(
3605
+ v8::String::ExternalAsciiStringResource* resource) {
3606
+ EnsureInitialized("v8::String::NewExternal()");
3607
+ LOG_API("String::NewExternal");
3608
+ ENTER_V8;
3609
+ i::Handle<i::String> result = NewExternalAsciiStringHandle(resource);
3610
+ i::ExternalStringTable::AddString(*result);
3611
+ return Utils::ToLocal(result);
3612
+ }
3613
+
3614
+
3615
+ bool v8::String::MakeExternal(
3616
+ v8::String::ExternalAsciiStringResource* resource) {
3617
+ if (IsDeadCheck("v8::String::MakeExternal()")) return false;
3618
+ if (this->IsExternal()) return false; // Already an external string.
3619
+ ENTER_V8;
3620
+ i::Handle<i::String> obj = Utils::OpenHandle(this);
3621
+ if (StringTracker::IsFreshUnusedString(obj)) return false;
3622
+ bool result = obj->MakeExternal(resource);
3623
+ if (result && !obj->IsSymbol()) {
3624
+ i::ExternalStringTable::AddString(*obj);
3625
+ }
3626
+ return result;
3627
+ }
3628
+
3629
+
3630
+ bool v8::String::CanMakeExternal() {
3631
+ if (IsDeadCheck("v8::String::CanMakeExternal()")) return false;
3632
+ i::Handle<i::String> obj = Utils::OpenHandle(this);
3633
+ if (StringTracker::IsFreshUnusedString(obj)) return false;
3634
+ int size = obj->Size(); // Byte size of the original string.
3635
+ if (size < i::ExternalString::kSize)
3636
+ return false;
3637
+ i::StringShape shape(*obj);
3638
+ return !shape.IsExternal();
3639
+ }
3640
+
3641
+
3642
+ Local<v8::Object> v8::Object::New() {
3643
+ EnsureInitialized("v8::Object::New()");
3644
+ LOG_API("Object::New");
3645
+ ENTER_V8;
3646
+ i::Handle<i::JSObject> obj =
3647
+ i::Factory::NewJSObject(i::Top::object_function());
3648
+ return Utils::ToLocal(obj);
3649
+ }
3650
+
3651
+
3652
+ Local<v8::Value> v8::Date::New(double time) {
3653
+ EnsureInitialized("v8::Date::New()");
3654
+ LOG_API("Date::New");
3655
+ if (isnan(time)) {
3656
+ // Introduce only canonical NaN value into the VM, to avoid signaling NaNs.
3657
+ time = i::OS::nan_value();
3658
+ }
3659
+ ENTER_V8;
3660
+ EXCEPTION_PREAMBLE();
3661
+ i::Handle<i::Object> obj =
3662
+ i::Execution::NewDate(time, &has_pending_exception);
3663
+ EXCEPTION_BAILOUT_CHECK(Local<v8::Value>());
3664
+ return Utils::ToLocal(obj);
3665
+ }
3666
+
3667
+
3668
+ double v8::Date::NumberValue() const {
3669
+ if (IsDeadCheck("v8::Date::NumberValue()")) return 0;
3670
+ LOG_API("Date::NumberValue");
3671
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
3672
+ i::Handle<i::JSValue> jsvalue = i::Handle<i::JSValue>::cast(obj);
3673
+ return jsvalue->value()->Number();
3674
+ }
3675
+
3676
+
3677
+ Local<v8::Array> v8::Array::New(int length) {
3678
+ EnsureInitialized("v8::Array::New()");
3679
+ LOG_API("Array::New");
3680
+ ENTER_V8;
3681
+ i::Handle<i::JSArray> obj = i::Factory::NewJSArray(length);
3682
+ return Utils::ToLocal(obj);
3683
+ }
3684
+
3685
+
3686
+ uint32_t v8::Array::Length() const {
3687
+ if (IsDeadCheck("v8::Array::Length()")) return 0;
3688
+ i::Handle<i::JSArray> obj = Utils::OpenHandle(this);
3689
+ i::Object* length = obj->length();
3690
+ if (length->IsSmi()) {
3691
+ return i::Smi::cast(length)->value();
3692
+ } else {
3693
+ return static_cast<uint32_t>(length->Number());
3694
+ }
3695
+ }
3696
+
3697
+
3698
+ Local<Object> Array::CloneElementAt(uint32_t index) {
3699
+ ON_BAILOUT("v8::Array::CloneElementAt()", return Local<Object>());
3700
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3701
+ if (!self->HasFastElements()) {
3702
+ return Local<Object>();
3703
+ }
3704
+ i::FixedArray* elms = i::FixedArray::cast(self->elements());
3705
+ i::Object* paragon = elms->get(index);
3706
+ if (!paragon->IsJSObject()) {
3707
+ return Local<Object>();
3708
+ }
3709
+ i::Handle<i::JSObject> paragon_handle(i::JSObject::cast(paragon));
3710
+ EXCEPTION_PREAMBLE();
3711
+ ENTER_V8;
3712
+ i::Handle<i::JSObject> result = i::Copy(paragon_handle);
3713
+ has_pending_exception = result.is_null();
3714
+ EXCEPTION_BAILOUT_CHECK(Local<Object>());
3715
+ return Utils::ToLocal(result);
3716
+ }
3717
+
3718
+
3719
+ Local<String> v8::String::NewSymbol(const char* data, int length) {
3720
+ EnsureInitialized("v8::String::NewSymbol()");
3721
+ LOG_API("String::NewSymbol(char)");
3722
+ ENTER_V8;
3723
+ if (length == -1) length = i::StrLength(data);
3724
+ i::Handle<i::String> result =
3725
+ i::Factory::LookupSymbol(i::Vector<const char>(data, length));
3726
+ return Utils::ToLocal(result);
3727
+ }
3728
+
3729
+
3730
+ Local<Number> v8::Number::New(double value) {
3731
+ EnsureInitialized("v8::Number::New()");
3732
+ if (isnan(value)) {
3733
+ // Introduce only canonical NaN value into the VM, to avoid signaling NaNs.
3734
+ value = i::OS::nan_value();
3735
+ }
3736
+ ENTER_V8;
3737
+ i::Handle<i::Object> result = i::Factory::NewNumber(value);
3738
+ return Utils::NumberToLocal(result);
3739
+ }
3740
+
3741
+
3742
+ Local<Integer> v8::Integer::New(int32_t value) {
3743
+ EnsureInitialized("v8::Integer::New()");
3744
+ if (i::Smi::IsValid(value)) {
3745
+ return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value)));
3746
+ }
3747
+ ENTER_V8;
3748
+ i::Handle<i::Object> result = i::Factory::NewNumber(value);
3749
+ return Utils::IntegerToLocal(result);
3750
+ }
3751
+
3752
+
3753
+ Local<Integer> Integer::NewFromUnsigned(uint32_t value) {
3754
+ bool fits_into_int32_t = (value & (1 << 31)) == 0;
3755
+ if (fits_into_int32_t) {
3756
+ return Integer::New(static_cast<int32_t>(value));
3757
+ }
3758
+ ENTER_V8;
3759
+ i::Handle<i::Object> result = i::Factory::NewNumber(value);
3760
+ return Utils::IntegerToLocal(result);
3761
+ }
3762
+
3763
+
3764
+ void V8::IgnoreOutOfMemoryException() {
3765
+ thread_local.set_ignore_out_of_memory(true);
3766
+ }
3767
+
3768
+
3769
+ bool V8::AddMessageListener(MessageCallback that, Handle<Value> data) {
3770
+ EnsureInitialized("v8::V8::AddMessageListener()");
3771
+ ON_BAILOUT("v8::V8::AddMessageListener()", return false);
3772
+ ENTER_V8;
3773
+ HandleScope scope;
3774
+ NeanderArray listeners(i::Factory::message_listeners());
3775
+ NeanderObject obj(2);
3776
+ obj.set(0, *i::Factory::NewProxy(FUNCTION_ADDR(that)));
3777
+ obj.set(1, data.IsEmpty() ?
3778
+ i::Heap::undefined_value() :
3779
+ *Utils::OpenHandle(*data));
3780
+ listeners.add(obj.value());
3781
+ return true;
3782
+ }
3783
+
3784
+
3785
+ void V8::RemoveMessageListeners(MessageCallback that) {
3786
+ EnsureInitialized("v8::V8::RemoveMessageListener()");
3787
+ ON_BAILOUT("v8::V8::RemoveMessageListeners()", return);
3788
+ ENTER_V8;
3789
+ HandleScope scope;
3790
+ NeanderArray listeners(i::Factory::message_listeners());
3791
+ for (int i = 0; i < listeners.length(); i++) {
3792
+ if (listeners.get(i)->IsUndefined()) continue; // skip deleted ones
3793
+
3794
+ NeanderObject listener(i::JSObject::cast(listeners.get(i)));
3795
+ i::Handle<i::Proxy> callback_obj(i::Proxy::cast(listener.get(0)));
3796
+ if (callback_obj->proxy() == FUNCTION_ADDR(that)) {
3797
+ listeners.set(i, i::Heap::undefined_value());
3798
+ }
3799
+ }
3800
+ }
3801
+
3802
+
3803
+ void V8::SetCaptureStackTraceForUncaughtExceptions(
3804
+ bool capture,
3805
+ int frame_limit,
3806
+ StackTrace::StackTraceOptions options) {
3807
+ i::Top::SetCaptureStackTraceForUncaughtExceptions(
3808
+ capture,
3809
+ frame_limit,
3810
+ options);
3811
+ }
3812
+
3813
+
3814
+ void V8::SetCounterFunction(CounterLookupCallback callback) {
3815
+ if (IsDeadCheck("v8::V8::SetCounterFunction()")) return;
3816
+ i::StatsTable::SetCounterFunction(callback);
3817
+ }
3818
+
3819
+ void V8::SetCreateHistogramFunction(CreateHistogramCallback callback) {
3820
+ if (IsDeadCheck("v8::V8::SetCreateHistogramFunction()")) return;
3821
+ i::StatsTable::SetCreateHistogramFunction(callback);
3822
+ }
3823
+
3824
+ void V8::SetAddHistogramSampleFunction(AddHistogramSampleCallback callback) {
3825
+ if (IsDeadCheck("v8::V8::SetAddHistogramSampleFunction()")) return;
3826
+ i::StatsTable::SetAddHistogramSampleFunction(callback);
3827
+ }
3828
+
3829
+ void V8::EnableSlidingStateWindow() {
3830
+ if (IsDeadCheck("v8::V8::EnableSlidingStateWindow()")) return;
3831
+ i::Logger::EnableSlidingStateWindow();
3832
+ }
3833
+
3834
+
3835
+ void V8::SetFailedAccessCheckCallbackFunction(
3836
+ FailedAccessCheckCallback callback) {
3837
+ if (IsDeadCheck("v8::V8::SetFailedAccessCheckCallbackFunction()")) return;
3838
+ i::Top::SetFailedAccessCheckCallback(callback);
3839
+ }
3840
+
3841
+
3842
+ void V8::AddObjectGroup(Persistent<Value>* objects, size_t length) {
3843
+ if (IsDeadCheck("v8::V8::AddObjectGroup()")) return;
3844
+ STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
3845
+ i::GlobalHandles::AddGroup(reinterpret_cast<i::Object***>(objects), length);
3846
+ }
3847
+
3848
+
3849
+ int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
3850
+ if (IsDeadCheck("v8::V8::AdjustAmountOfExternalAllocatedMemory()")) return 0;
3851
+ return i::Heap::AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
3852
+ }
3853
+
3854
+
3855
+ void V8::SetGlobalGCPrologueCallback(GCCallback callback) {
3856
+ if (IsDeadCheck("v8::V8::SetGlobalGCPrologueCallback()")) return;
3857
+ i::Heap::SetGlobalGCPrologueCallback(callback);
3858
+ }
3859
+
3860
+
3861
+ void V8::SetGlobalGCEpilogueCallback(GCCallback callback) {
3862
+ if (IsDeadCheck("v8::V8::SetGlobalGCEpilogueCallback()")) return;
3863
+ i::Heap::SetGlobalGCEpilogueCallback(callback);
3864
+ }
3865
+
3866
+
3867
+ void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) {
3868
+ if (IsDeadCheck("v8::V8::AddGCPrologueCallback()")) return;
3869
+ i::Heap::AddGCPrologueCallback(callback, gc_type);
3870
+ }
3871
+
3872
+
3873
+ void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) {
3874
+ if (IsDeadCheck("v8::V8::RemoveGCPrologueCallback()")) return;
3875
+ i::Heap::RemoveGCPrologueCallback(callback);
3876
+ }
3877
+
3878
+
3879
+ void V8::AddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type) {
3880
+ if (IsDeadCheck("v8::V8::AddGCEpilogueCallback()")) return;
3881
+ i::Heap::AddGCEpilogueCallback(callback, gc_type);
3882
+ }
3883
+
3884
+
3885
+ void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) {
3886
+ if (IsDeadCheck("v8::V8::RemoveGCEpilogueCallback()")) return;
3887
+ i::Heap::RemoveGCEpilogueCallback(callback);
3888
+ }
3889
+
3890
+
3891
+ void V8::PauseProfiler() {
3892
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3893
+ PauseProfilerEx(PROFILER_MODULE_CPU);
3894
+ #endif
3895
+ }
3896
+
3897
+
3898
+ void V8::ResumeProfiler() {
3899
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3900
+ ResumeProfilerEx(PROFILER_MODULE_CPU);
3901
+ #endif
3902
+ }
3903
+
3904
+
3905
+ bool V8::IsProfilerPaused() {
3906
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3907
+ return i::Logger::GetActiveProfilerModules() & PROFILER_MODULE_CPU;
3908
+ #else
3909
+ return true;
3910
+ #endif
3911
+ }
3912
+
3913
+
3914
+ void V8::ResumeProfilerEx(int flags, int tag) {
3915
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3916
+ if (flags & PROFILER_MODULE_HEAP_SNAPSHOT) {
3917
+ // Snapshot mode: resume modules, perform GC, then pause only
3918
+ // those modules which haven't been started prior to making a
3919
+ // snapshot.
3920
+
3921
+ // Make a GC prior to taking a snapshot.
3922
+ i::Heap::CollectAllGarbage(false);
3923
+ // Reset snapshot flag and CPU module flags.
3924
+ flags &= ~(PROFILER_MODULE_HEAP_SNAPSHOT | PROFILER_MODULE_CPU);
3925
+ const int current_flags = i::Logger::GetActiveProfilerModules();
3926
+ i::Logger::ResumeProfiler(flags, tag);
3927
+ i::Heap::CollectAllGarbage(false);
3928
+ i::Logger::PauseProfiler(~current_flags & flags, tag);
3929
+ } else {
3930
+ i::Logger::ResumeProfiler(flags, tag);
3931
+ }
3932
+ #endif
3933
+ }
3934
+
3935
+
3936
+ void V8::PauseProfilerEx(int flags, int tag) {
3937
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3938
+ i::Logger::PauseProfiler(flags, tag);
3939
+ #endif
3940
+ }
3941
+
3942
+
3943
+ int V8::GetActiveProfilerModules() {
3944
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3945
+ return i::Logger::GetActiveProfilerModules();
3946
+ #else
3947
+ return PROFILER_MODULE_NONE;
3948
+ #endif
3949
+ }
3950
+
3951
+
3952
+ int V8::GetLogLines(int from_pos, char* dest_buf, int max_size) {
3953
+ #ifdef ENABLE_LOGGING_AND_PROFILING
3954
+ ASSERT(max_size >= kMinimumSizeForLogLinesBuffer);
3955
+ return i::Logger::GetLogLines(from_pos, dest_buf, max_size);
3956
+ #endif
3957
+ return 0;
3958
+ }
3959
+
3960
+
3961
+ int V8::GetCurrentThreadId() {
3962
+ API_ENTRY_CHECK("V8::GetCurrentThreadId()");
3963
+ EnsureInitialized("V8::GetCurrentThreadId()");
3964
+ return i::Top::thread_id();
3965
+ }
3966
+
3967
+
3968
+ void V8::TerminateExecution(int thread_id) {
3969
+ if (!i::V8::IsRunning()) return;
3970
+ API_ENTRY_CHECK("V8::GetCurrentThreadId()");
3971
+ // If the thread_id identifies the current thread just terminate
3972
+ // execution right away. Otherwise, ask the thread manager to
3973
+ // terminate the thread with the given id if any.
3974
+ if (thread_id == i::Top::thread_id()) {
3975
+ i::StackGuard::TerminateExecution();
3976
+ } else {
3977
+ i::ThreadManager::TerminateExecution(thread_id);
3978
+ }
3979
+ }
3980
+
3981
+
3982
+ void V8::TerminateExecution() {
3983
+ if (!i::V8::IsRunning()) return;
3984
+ i::StackGuard::TerminateExecution();
3985
+ }
3986
+
3987
+
3988
+ bool V8::IsExecutionTerminating() {
3989
+ if (!i::V8::IsRunning()) return false;
3990
+ if (i::Top::has_scheduled_exception()) {
3991
+ return i::Top::scheduled_exception() == i::Heap::termination_exception();
3992
+ }
3993
+ return false;
3994
+ }
3995
+
3996
+
3997
+ String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) {
3998
+ EnsureInitialized("v8::String::Utf8Value::Utf8Value()");
3999
+ if (obj.IsEmpty()) {
4000
+ str_ = NULL;
4001
+ length_ = 0;
4002
+ return;
4003
+ }
4004
+ ENTER_V8;
4005
+ HandleScope scope;
4006
+ TryCatch try_catch;
4007
+ Handle<String> str = obj->ToString();
4008
+ if (str.IsEmpty()) {
4009
+ str_ = NULL;
4010
+ length_ = 0;
4011
+ } else {
4012
+ length_ = str->Utf8Length();
4013
+ str_ = i::NewArray<char>(length_ + 1);
4014
+ str->WriteUtf8(str_);
4015
+ }
4016
+ }
4017
+
4018
+
4019
+ String::Utf8Value::~Utf8Value() {
4020
+ i::DeleteArray(str_);
4021
+ }
4022
+
4023
+
4024
+ String::AsciiValue::AsciiValue(v8::Handle<v8::Value> obj) {
4025
+ EnsureInitialized("v8::String::AsciiValue::AsciiValue()");
4026
+ if (obj.IsEmpty()) {
4027
+ str_ = NULL;
4028
+ length_ = 0;
4029
+ return;
4030
+ }
4031
+ ENTER_V8;
4032
+ HandleScope scope;
4033
+ TryCatch try_catch;
4034
+ Handle<String> str = obj->ToString();
4035
+ if (str.IsEmpty()) {
4036
+ str_ = NULL;
4037
+ length_ = 0;
4038
+ } else {
4039
+ length_ = str->Length();
4040
+ str_ = i::NewArray<char>(length_ + 1);
4041
+ str->WriteAscii(str_);
4042
+ }
4043
+ }
4044
+
4045
+
4046
+ String::AsciiValue::~AsciiValue() {
4047
+ i::DeleteArray(str_);
4048
+ }
4049
+
4050
+
4051
+ String::Value::Value(v8::Handle<v8::Value> obj) {
4052
+ EnsureInitialized("v8::String::Value::Value()");
4053
+ if (obj.IsEmpty()) {
4054
+ str_ = NULL;
4055
+ length_ = 0;
4056
+ return;
4057
+ }
4058
+ ENTER_V8;
4059
+ HandleScope scope;
4060
+ TryCatch try_catch;
4061
+ Handle<String> str = obj->ToString();
4062
+ if (str.IsEmpty()) {
4063
+ str_ = NULL;
4064
+ length_ = 0;
4065
+ } else {
4066
+ length_ = str->Length();
4067
+ str_ = i::NewArray<uint16_t>(length_ + 1);
4068
+ str->Write(str_);
4069
+ }
4070
+ }
4071
+
4072
+
4073
+ String::Value::~Value() {
4074
+ i::DeleteArray(str_);
4075
+ }
4076
+
4077
+ Local<Value> Exception::RangeError(v8::Handle<v8::String> raw_message) {
4078
+ LOG_API("RangeError");
4079
+ ON_BAILOUT("v8::Exception::RangeError()", return Local<Value>());
4080
+ ENTER_V8;
4081
+ i::Object* error;
4082
+ {
4083
+ HandleScope scope;
4084
+ i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
4085
+ i::Handle<i::Object> result = i::Factory::NewRangeError(message);
4086
+ error = *result;
4087
+ }
4088
+ i::Handle<i::Object> result(error);
4089
+ return Utils::ToLocal(result);
4090
+ }
4091
+
4092
+ Local<Value> Exception::ReferenceError(v8::Handle<v8::String> raw_message) {
4093
+ LOG_API("ReferenceError");
4094
+ ON_BAILOUT("v8::Exception::ReferenceError()", return Local<Value>());
4095
+ ENTER_V8;
4096
+ i::Object* error;
4097
+ {
4098
+ HandleScope scope;
4099
+ i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
4100
+ i::Handle<i::Object> result = i::Factory::NewReferenceError(message);
4101
+ error = *result;
4102
+ }
4103
+ i::Handle<i::Object> result(error);
4104
+ return Utils::ToLocal(result);
4105
+ }
4106
+
4107
+ Local<Value> Exception::SyntaxError(v8::Handle<v8::String> raw_message) {
4108
+ LOG_API("SyntaxError");
4109
+ ON_BAILOUT("v8::Exception::SyntaxError()", return Local<Value>());
4110
+ ENTER_V8;
4111
+ i::Object* error;
4112
+ {
4113
+ HandleScope scope;
4114
+ i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
4115
+ i::Handle<i::Object> result = i::Factory::NewSyntaxError(message);
4116
+ error = *result;
4117
+ }
4118
+ i::Handle<i::Object> result(error);
4119
+ return Utils::ToLocal(result);
4120
+ }
4121
+
4122
+ Local<Value> Exception::TypeError(v8::Handle<v8::String> raw_message) {
4123
+ LOG_API("TypeError");
4124
+ ON_BAILOUT("v8::Exception::TypeError()", return Local<Value>());
4125
+ ENTER_V8;
4126
+ i::Object* error;
4127
+ {
4128
+ HandleScope scope;
4129
+ i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
4130
+ i::Handle<i::Object> result = i::Factory::NewTypeError(message);
4131
+ error = *result;
4132
+ }
4133
+ i::Handle<i::Object> result(error);
4134
+ return Utils::ToLocal(result);
4135
+ }
4136
+
4137
+ Local<Value> Exception::Error(v8::Handle<v8::String> raw_message) {
4138
+ LOG_API("Error");
4139
+ ON_BAILOUT("v8::Exception::Error()", return Local<Value>());
4140
+ ENTER_V8;
4141
+ i::Object* error;
4142
+ {
4143
+ HandleScope scope;
4144
+ i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
4145
+ i::Handle<i::Object> result = i::Factory::NewError(message);
4146
+ error = *result;
4147
+ }
4148
+ i::Handle<i::Object> result(error);
4149
+ return Utils::ToLocal(result);
4150
+ }
4151
+
4152
+
4153
+ // --- D e b u g S u p p o r t ---
4154
+
4155
+ #ifdef ENABLE_DEBUGGER_SUPPORT
4156
+
4157
+ static v8::Debug::EventCallback event_callback = NULL;
4158
+
4159
+ static void EventCallbackWrapper(const v8::Debug::EventDetails& event_details) {
4160
+ if (event_callback) {
4161
+ event_callback(event_details.GetEvent(),
4162
+ event_details.GetExecutionState(),
4163
+ event_details.GetEventData(),
4164
+ event_details.GetCallbackData());
4165
+ }
4166
+ }
4167
+
4168
+
4169
+ bool Debug::SetDebugEventListener(EventCallback that, Handle<Value> data) {
4170
+ EnsureInitialized("v8::Debug::SetDebugEventListener()");
4171
+ ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false);
4172
+ ENTER_V8;
4173
+
4174
+ event_callback = that;
4175
+
4176
+ HandleScope scope;
4177
+ i::Handle<i::Object> proxy = i::Factory::undefined_value();
4178
+ if (that != NULL) {
4179
+ proxy = i::Factory::NewProxy(FUNCTION_ADDR(EventCallbackWrapper));
4180
+ }
4181
+ i::Debugger::SetEventListener(proxy, Utils::OpenHandle(*data));
4182
+ return true;
4183
+ }
4184
+
4185
+
4186
+ bool Debug::SetDebugEventListener2(EventCallback2 that, Handle<Value> data) {
4187
+ EnsureInitialized("v8::Debug::SetDebugEventListener2()");
4188
+ ON_BAILOUT("v8::Debug::SetDebugEventListener2()", return false);
4189
+ ENTER_V8;
4190
+ HandleScope scope;
4191
+ i::Handle<i::Object> proxy = i::Factory::undefined_value();
4192
+ if (that != NULL) {
4193
+ proxy = i::Factory::NewProxy(FUNCTION_ADDR(that));
4194
+ }
4195
+ i::Debugger::SetEventListener(proxy, Utils::OpenHandle(*data));
4196
+ return true;
4197
+ }
4198
+
4199
+
4200
+ bool Debug::SetDebugEventListener(v8::Handle<v8::Object> that,
4201
+ Handle<Value> data) {
4202
+ ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false);
4203
+ ENTER_V8;
4204
+ i::Debugger::SetEventListener(Utils::OpenHandle(*that),
4205
+ Utils::OpenHandle(*data));
4206
+ return true;
4207
+ }
4208
+
4209
+
4210
+ void Debug::DebugBreak() {
4211
+ if (!i::V8::IsRunning()) return;
4212
+ i::StackGuard::DebugBreak();
4213
+ }
4214
+
4215
+
4216
+ void Debug::DebugBreakForCommand(ClientData* data) {
4217
+ if (!i::V8::IsRunning()) return;
4218
+ i::Debugger::EnqueueDebugCommand(data);
4219
+ }
4220
+
4221
+
4222
+ static v8::Debug::MessageHandler message_handler = NULL;
4223
+
4224
+ static void MessageHandlerWrapper(const v8::Debug::Message& message) {
4225
+ if (message_handler) {
4226
+ v8::String::Value json(message.GetJSON());
4227
+ message_handler(*json, json.length(), message.GetClientData());
4228
+ }
4229
+ }
4230
+
4231
+
4232
+ void Debug::SetMessageHandler(v8::Debug::MessageHandler handler,
4233
+ bool message_handler_thread) {
4234
+ EnsureInitialized("v8::Debug::SetMessageHandler");
4235
+ ENTER_V8;
4236
+ // Message handler thread not supported any more. Parameter temporally left in
4237
+ // the API for client compatability reasons.
4238
+ CHECK(!message_handler_thread);
4239
+
4240
+ // TODO(sgjesse) support the old message handler API through a simple wrapper.
4241
+ message_handler = handler;
4242
+ if (message_handler != NULL) {
4243
+ i::Debugger::SetMessageHandler(MessageHandlerWrapper);
4244
+ } else {
4245
+ i::Debugger::SetMessageHandler(NULL);
4246
+ }
4247
+ }
4248
+
4249
+
4250
+ void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) {
4251
+ EnsureInitialized("v8::Debug::SetMessageHandler");
4252
+ ENTER_V8;
4253
+ i::Debugger::SetMessageHandler(handler);
4254
+ }
4255
+
4256
+
4257
+ void Debug::SendCommand(const uint16_t* command, int length,
4258
+ ClientData* client_data) {
4259
+ if (!i::V8::IsRunning()) return;
4260
+ i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length),
4261
+ client_data);
4262
+ }
4263
+
4264
+
4265
+ void Debug::SetHostDispatchHandler(HostDispatchHandler handler,
4266
+ int period) {
4267
+ EnsureInitialized("v8::Debug::SetHostDispatchHandler");
4268
+ ENTER_V8;
4269
+ i::Debugger::SetHostDispatchHandler(handler, period);
4270
+ }
4271
+
4272
+
4273
+ void Debug::SetDebugMessageDispatchHandler(
4274
+ DebugMessageDispatchHandler handler, bool provide_locker) {
4275
+ EnsureInitialized("v8::Debug::SetDebugMessageDispatchHandler");
4276
+ ENTER_V8;
4277
+ i::Debugger::SetDebugMessageDispatchHandler(handler, provide_locker);
4278
+ }
4279
+
4280
+
4281
+ Local<Value> Debug::Call(v8::Handle<v8::Function> fun,
4282
+ v8::Handle<v8::Value> data) {
4283
+ if (!i::V8::IsRunning()) return Local<Value>();
4284
+ ON_BAILOUT("v8::Debug::Call()", return Local<Value>());
4285
+ ENTER_V8;
4286
+ i::Handle<i::Object> result;
4287
+ EXCEPTION_PREAMBLE();
4288
+ if (data.IsEmpty()) {
4289
+ result = i::Debugger::Call(Utils::OpenHandle(*fun),
4290
+ i::Factory::undefined_value(),
4291
+ &has_pending_exception);
4292
+ } else {
4293
+ result = i::Debugger::Call(Utils::OpenHandle(*fun),
4294
+ Utils::OpenHandle(*data),
4295
+ &has_pending_exception);
4296
+ }
4297
+ EXCEPTION_BAILOUT_CHECK(Local<Value>());
4298
+ return Utils::ToLocal(result);
4299
+ }
4300
+
4301
+
4302
+ Local<Value> Debug::GetMirror(v8::Handle<v8::Value> obj) {
4303
+ if (!i::V8::IsRunning()) return Local<Value>();
4304
+ ON_BAILOUT("v8::Debug::GetMirror()", return Local<Value>());
4305
+ ENTER_V8;
4306
+ v8::HandleScope scope;
4307
+ i::Debug::Load();
4308
+ i::Handle<i::JSObject> debug(i::Debug::debug_context()->global());
4309
+ i::Handle<i::String> name = i::Factory::LookupAsciiSymbol("MakeMirror");
4310
+ i::Handle<i::Object> fun_obj = i::GetProperty(debug, name);
4311
+ i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(fun_obj);
4312
+ v8::Handle<v8::Function> v8_fun = Utils::ToLocal(fun);
4313
+ const int kArgc = 1;
4314
+ v8::Handle<v8::Value> argv[kArgc] = { obj };
4315
+ EXCEPTION_PREAMBLE();
4316
+ v8::Handle<v8::Value> result = v8_fun->Call(Utils::ToLocal(debug),
4317
+ kArgc,
4318
+ argv);
4319
+ EXCEPTION_BAILOUT_CHECK(Local<Value>());
4320
+ return scope.Close(result);
4321
+ }
4322
+
4323
+
4324
+ bool Debug::EnableAgent(const char* name, int port, bool wait_for_connection) {
4325
+ return i::Debugger::StartAgent(name, port, wait_for_connection);
4326
+ }
4327
+
4328
+ void Debug::ProcessDebugMessages() {
4329
+ i::Execution::ProcessDebugMesssages(true);
4330
+ }
4331
+
4332
+ Local<Context> Debug::GetDebugContext() {
4333
+ EnsureInitialized("v8::Debug::GetDebugContext()");
4334
+ ENTER_V8;
4335
+ return Utils::ToLocal(i::Debugger::GetDebugContext());
4336
+ }
4337
+
4338
+ #endif // ENABLE_DEBUGGER_SUPPORT
4339
+
4340
+
4341
+ #ifdef ENABLE_LOGGING_AND_PROFILING
4342
+
4343
+ Handle<String> CpuProfileNode::GetFunctionName() const {
4344
+ IsDeadCheck("v8::CpuProfileNode::GetFunctionName");
4345
+ const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
4346
+ const i::CodeEntry* entry = node->entry();
4347
+ if (!entry->has_name_prefix()) {
4348
+ return Handle<String>(ToApi<String>(
4349
+ i::Factory::LookupAsciiSymbol(entry->name())));
4350
+ } else {
4351
+ return Handle<String>(ToApi<String>(i::Factory::NewConsString(
4352
+ i::Factory::LookupAsciiSymbol(entry->name_prefix()),
4353
+ i::Factory::LookupAsciiSymbol(entry->name()))));
4354
+ }
4355
+ }
4356
+
4357
+
4358
+ Handle<String> CpuProfileNode::GetScriptResourceName() const {
4359
+ IsDeadCheck("v8::CpuProfileNode::GetScriptResourceName");
4360
+ const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
4361
+ return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
4362
+ node->entry()->resource_name())));
4363
+ }
4364
+
4365
+
4366
+ int CpuProfileNode::GetLineNumber() const {
4367
+ IsDeadCheck("v8::CpuProfileNode::GetLineNumber");
4368
+ return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
4369
+ }
4370
+
4371
+
4372
+ double CpuProfileNode::GetTotalTime() const {
4373
+ IsDeadCheck("v8::CpuProfileNode::GetTotalTime");
4374
+ return reinterpret_cast<const i::ProfileNode*>(this)->GetTotalMillis();
4375
+ }
4376
+
4377
+
4378
+ double CpuProfileNode::GetSelfTime() const {
4379
+ IsDeadCheck("v8::CpuProfileNode::GetSelfTime");
4380
+ return reinterpret_cast<const i::ProfileNode*>(this)->GetSelfMillis();
4381
+ }
4382
+
4383
+
4384
+ double CpuProfileNode::GetTotalSamplesCount() const {
4385
+ IsDeadCheck("v8::CpuProfileNode::GetTotalSamplesCount");
4386
+ return reinterpret_cast<const i::ProfileNode*>(this)->total_ticks();
4387
+ }
4388
+
4389
+
4390
+ double CpuProfileNode::GetSelfSamplesCount() const {
4391
+ IsDeadCheck("v8::CpuProfileNode::GetSelfSamplesCount");
4392
+ return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
4393
+ }
4394
+
4395
+
4396
+ unsigned CpuProfileNode::GetCallUid() const {
4397
+ IsDeadCheck("v8::CpuProfileNode::GetCallUid");
4398
+ return reinterpret_cast<const i::ProfileNode*>(this)->entry()->call_uid();
4399
+ }
4400
+
4401
+
4402
+ int CpuProfileNode::GetChildrenCount() const {
4403
+ IsDeadCheck("v8::CpuProfileNode::GetChildrenCount");
4404
+ return reinterpret_cast<const i::ProfileNode*>(this)->children()->length();
4405
+ }
4406
+
4407
+
4408
+ const CpuProfileNode* CpuProfileNode::GetChild(int index) const {
4409
+ IsDeadCheck("v8::CpuProfileNode::GetChild");
4410
+ const i::ProfileNode* child =
4411
+ reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index);
4412
+ return reinterpret_cast<const CpuProfileNode*>(child);
4413
+ }
4414
+
4415
+
4416
+ unsigned CpuProfile::GetUid() const {
4417
+ IsDeadCheck("v8::CpuProfile::GetUid");
4418
+ return reinterpret_cast<const i::CpuProfile*>(this)->uid();
4419
+ }
4420
+
4421
+
4422
+ Handle<String> CpuProfile::GetTitle() const {
4423
+ IsDeadCheck("v8::CpuProfile::GetTitle");
4424
+ const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
4425
+ return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
4426
+ profile->title())));
4427
+ }
4428
+
4429
+
4430
+ const CpuProfileNode* CpuProfile::GetBottomUpRoot() const {
4431
+ IsDeadCheck("v8::CpuProfile::GetBottomUpRoot");
4432
+ const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
4433
+ return reinterpret_cast<const CpuProfileNode*>(profile->bottom_up()->root());
4434
+ }
4435
+
4436
+
4437
+ const CpuProfileNode* CpuProfile::GetTopDownRoot() const {
4438
+ IsDeadCheck("v8::CpuProfile::GetTopDownRoot");
4439
+ const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
4440
+ return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root());
4441
+ }
4442
+
4443
+
4444
+ int CpuProfiler::GetProfilesCount() {
4445
+ IsDeadCheck("v8::CpuProfiler::GetProfilesCount");
4446
+ return i::CpuProfiler::GetProfilesCount();
4447
+ }
4448
+
4449
+
4450
+ const CpuProfile* CpuProfiler::GetProfile(int index,
4451
+ Handle<Value> security_token) {
4452
+ IsDeadCheck("v8::CpuProfiler::GetProfile");
4453
+ return reinterpret_cast<const CpuProfile*>(
4454
+ i::CpuProfiler::GetProfile(
4455
+ security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
4456
+ index));
4457
+ }
4458
+
4459
+
4460
+ const CpuProfile* CpuProfiler::FindProfile(unsigned uid,
4461
+ Handle<Value> security_token) {
4462
+ IsDeadCheck("v8::CpuProfiler::FindProfile");
4463
+ return reinterpret_cast<const CpuProfile*>(
4464
+ i::CpuProfiler::FindProfile(
4465
+ security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
4466
+ uid));
4467
+ }
4468
+
4469
+
4470
+ void CpuProfiler::StartProfiling(Handle<String> title) {
4471
+ IsDeadCheck("v8::CpuProfiler::StartProfiling");
4472
+ i::CpuProfiler::StartProfiling(*Utils::OpenHandle(*title));
4473
+ }
4474
+
4475
+
4476
+ const CpuProfile* CpuProfiler::StopProfiling(Handle<String> title,
4477
+ Handle<Value> security_token) {
4478
+ IsDeadCheck("v8::CpuProfiler::StopProfiling");
4479
+ return reinterpret_cast<const CpuProfile*>(
4480
+ i::CpuProfiler::StopProfiling(
4481
+ security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
4482
+ *Utils::OpenHandle(*title)));
4483
+ }
4484
+
4485
+
4486
+ HeapGraphEdge::Type HeapGraphEdge::GetType() const {
4487
+ IsDeadCheck("v8::HeapGraphEdge::GetType");
4488
+ return static_cast<HeapGraphEdge::Type>(
4489
+ reinterpret_cast<const i::HeapGraphEdge*>(this)->type());
4490
+ }
4491
+
4492
+
4493
+ Handle<Value> HeapGraphEdge::GetName() const {
4494
+ IsDeadCheck("v8::HeapGraphEdge::GetName");
4495
+ const i::HeapGraphEdge* edge =
4496
+ reinterpret_cast<const i::HeapGraphEdge*>(this);
4497
+ switch (edge->type()) {
4498
+ case i::HeapGraphEdge::CONTEXT_VARIABLE:
4499
+ case i::HeapGraphEdge::INTERNAL:
4500
+ case i::HeapGraphEdge::PROPERTY:
4501
+ return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
4502
+ edge->name())));
4503
+ case i::HeapGraphEdge::ELEMENT:
4504
+ return Handle<Number>(ToApi<Number>(i::Factory::NewNumberFromInt(
4505
+ edge->index())));
4506
+ default: UNREACHABLE();
4507
+ }
4508
+ return ImplementationUtilities::Undefined();
4509
+ }
4510
+
4511
+
4512
+ const HeapGraphNode* HeapGraphEdge::GetFromNode() const {
4513
+ IsDeadCheck("v8::HeapGraphEdge::GetFromNode");
4514
+ const i::HeapEntry* from =
4515
+ reinterpret_cast<const i::HeapGraphEdge*>(this)->from();
4516
+ return reinterpret_cast<const HeapGraphNode*>(from);
4517
+ }
4518
+
4519
+
4520
+ const HeapGraphNode* HeapGraphEdge::GetToNode() const {
4521
+ IsDeadCheck("v8::HeapGraphEdge::GetToNode");
4522
+ const i::HeapEntry* to =
4523
+ reinterpret_cast<const i::HeapGraphEdge*>(this)->to();
4524
+ return reinterpret_cast<const HeapGraphNode*>(to);
4525
+ }
4526
+
4527
+
4528
+ int HeapGraphPath::GetEdgesCount() const {
4529
+ return reinterpret_cast<const i::HeapGraphPath*>(this)->path()->length();
4530
+ }
4531
+
4532
+
4533
+ const HeapGraphEdge* HeapGraphPath::GetEdge(int index) const {
4534
+ return reinterpret_cast<const HeapGraphEdge*>(
4535
+ reinterpret_cast<const i::HeapGraphPath*>(this)->path()->at(index));
4536
+ }
4537
+
4538
+
4539
+ const HeapGraphNode* HeapGraphPath::GetFromNode() const {
4540
+ return GetEdgesCount() > 0 ? GetEdge(0)->GetFromNode() : NULL;
4541
+ }
4542
+
4543
+
4544
+ const HeapGraphNode* HeapGraphPath::GetToNode() const {
4545
+ const int count = GetEdgesCount();
4546
+ return count > 0 ? GetEdge(count - 1)->GetToNode() : NULL;
4547
+ }
4548
+
4549
+
4550
+ HeapGraphNode::Type HeapGraphNode::GetType() const {
4551
+ IsDeadCheck("v8::HeapGraphNode::GetType");
4552
+ return static_cast<HeapGraphNode::Type>(
4553
+ reinterpret_cast<const i::HeapEntry*>(this)->type());
4554
+ }
4555
+
4556
+
4557
+ Handle<String> HeapGraphNode::GetName() const {
4558
+ IsDeadCheck("v8::HeapGraphNode::GetName");
4559
+ return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
4560
+ reinterpret_cast<const i::HeapEntry*>(this)->name())));
4561
+ }
4562
+
4563
+
4564
+ uint64_t HeapGraphNode::GetId() const {
4565
+ IsDeadCheck("v8::HeapGraphNode::GetId");
4566
+ return reinterpret_cast<const i::HeapEntry*>(this)->id();
4567
+ }
4568
+
4569
+
4570
+ int HeapGraphNode::GetSelfSize() const {
4571
+ IsDeadCheck("v8::HeapGraphNode::GetSelfSize");
4572
+ return reinterpret_cast<const i::HeapEntry*>(this)->self_size();
4573
+ }
4574
+
4575
+
4576
+ int HeapGraphNode::GetTotalSize() const {
4577
+ IsDeadCheck("v8::HeapSnapshot::GetHead");
4578
+ return const_cast<i::HeapEntry*>(
4579
+ reinterpret_cast<const i::HeapEntry*>(this))->TotalSize();
4580
+ }
4581
+
4582
+
4583
+ int HeapGraphNode::GetPrivateSize() const {
4584
+ IsDeadCheck("v8::HeapSnapshot::GetPrivateSize");
4585
+ return const_cast<i::HeapEntry*>(
4586
+ reinterpret_cast<const i::HeapEntry*>(this))->NonSharedTotalSize();
4587
+ }
4588
+
4589
+
4590
+ int HeapGraphNode::GetChildrenCount() const {
4591
+ IsDeadCheck("v8::HeapSnapshot::GetChildrenCount");
4592
+ return reinterpret_cast<const i::HeapEntry*>(this)->children()->length();
4593
+ }
4594
+
4595
+
4596
+ const HeapGraphEdge* HeapGraphNode::GetChild(int index) const {
4597
+ IsDeadCheck("v8::HeapSnapshot::GetChild");
4598
+ return reinterpret_cast<const HeapGraphEdge*>(
4599
+ reinterpret_cast<const i::HeapEntry*>(this)->children()->at(index));
4600
+ }
4601
+
4602
+
4603
+ int HeapGraphNode::GetRetainersCount() const {
4604
+ IsDeadCheck("v8::HeapSnapshot::GetRetainersCount");
4605
+ return reinterpret_cast<const i::HeapEntry*>(this)->retainers()->length();
4606
+ }
4607
+
4608
+
4609
+ const HeapGraphEdge* HeapGraphNode::GetRetainer(int index) const {
4610
+ IsDeadCheck("v8::HeapSnapshot::GetRetainer");
4611
+ return reinterpret_cast<const HeapGraphEdge*>(
4612
+ reinterpret_cast<const i::HeapEntry*>(this)->retainers()->at(index));
4613
+ }
4614
+
4615
+
4616
+ int HeapGraphNode::GetRetainingPathsCount() const {
4617
+ IsDeadCheck("v8::HeapSnapshot::GetRetainingPathsCount");
4618
+ return const_cast<i::HeapEntry*>(
4619
+ reinterpret_cast<const i::HeapEntry*>(
4620
+ this))->GetRetainingPaths()->length();
4621
+ }
4622
+
4623
+
4624
+ const HeapGraphPath* HeapGraphNode::GetRetainingPath(int index) const {
4625
+ IsDeadCheck("v8::HeapSnapshot::GetRetainingPath");
4626
+ return reinterpret_cast<const HeapGraphPath*>(
4627
+ const_cast<i::HeapEntry*>(
4628
+ reinterpret_cast<const i::HeapEntry*>(
4629
+ this))->GetRetainingPaths()->at(index));
4630
+ }
4631
+
4632
+
4633
+ const HeapGraphNode* HeapSnapshotsDiff::GetAdditionsRoot() const {
4634
+ IsDeadCheck("v8::HeapSnapshotsDiff::GetAdditionsRoot");
4635
+ const i::HeapSnapshotsDiff* diff =
4636
+ reinterpret_cast<const i::HeapSnapshotsDiff*>(this);
4637
+ return reinterpret_cast<const HeapGraphNode*>(diff->additions_root());
4638
+ }
4639
+
4640
+
4641
+ const HeapGraphNode* HeapSnapshotsDiff::GetDeletionsRoot() const {
4642
+ IsDeadCheck("v8::HeapSnapshotsDiff::GetDeletionsRoot");
4643
+ const i::HeapSnapshotsDiff* diff =
4644
+ reinterpret_cast<const i::HeapSnapshotsDiff*>(this);
4645
+ return reinterpret_cast<const HeapGraphNode*>(diff->deletions_root());
4646
+ }
4647
+
4648
+
4649
+ unsigned HeapSnapshot::GetUid() const {
4650
+ IsDeadCheck("v8::HeapSnapshot::GetUid");
4651
+ return reinterpret_cast<const i::HeapSnapshot*>(this)->uid();
4652
+ }
4653
+
4654
+
4655
+ Handle<String> HeapSnapshot::GetTitle() const {
4656
+ IsDeadCheck("v8::HeapSnapshot::GetTitle");
4657
+ const i::HeapSnapshot* snapshot =
4658
+ reinterpret_cast<const i::HeapSnapshot*>(this);
4659
+ return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
4660
+ snapshot->title())));
4661
+ }
4662
+
4663
+
4664
+ const HeapGraphNode* HeapSnapshot::GetRoot() const {
4665
+ IsDeadCheck("v8::HeapSnapshot::GetHead");
4666
+ const i::HeapSnapshot* snapshot =
4667
+ reinterpret_cast<const i::HeapSnapshot*>(this);
4668
+ return reinterpret_cast<const HeapGraphNode*>(snapshot->const_root());
4669
+ }
4670
+
4671
+
4672
+ const HeapSnapshotsDiff* HeapSnapshot::CompareWith(
4673
+ const HeapSnapshot* snapshot) const {
4674
+ IsDeadCheck("v8::HeapSnapshot::CompareWith");
4675
+ i::HeapSnapshot* snapshot1 = const_cast<i::HeapSnapshot*>(
4676
+ reinterpret_cast<const i::HeapSnapshot*>(this));
4677
+ i::HeapSnapshot* snapshot2 = const_cast<i::HeapSnapshot*>(
4678
+ reinterpret_cast<const i::HeapSnapshot*>(snapshot));
4679
+ return reinterpret_cast<const HeapSnapshotsDiff*>(
4680
+ snapshot1->CompareWith(snapshot2));
4681
+ }
4682
+
4683
+
4684
+ int HeapProfiler::GetSnapshotsCount() {
4685
+ IsDeadCheck("v8::HeapProfiler::GetSnapshotsCount");
4686
+ return i::HeapProfiler::GetSnapshotsCount();
4687
+ }
4688
+
4689
+
4690
+ const HeapSnapshot* HeapProfiler::GetSnapshot(int index) {
4691
+ IsDeadCheck("v8::HeapProfiler::GetSnapshot");
4692
+ return reinterpret_cast<const HeapSnapshot*>(
4693
+ i::HeapProfiler::GetSnapshot(index));
4694
+ }
4695
+
4696
+
4697
+ const HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) {
4698
+ IsDeadCheck("v8::HeapProfiler::FindSnapshot");
4699
+ return reinterpret_cast<const HeapSnapshot*>(
4700
+ i::HeapProfiler::FindSnapshot(uid));
4701
+ }
4702
+
4703
+
4704
+ const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title) {
4705
+ IsDeadCheck("v8::HeapProfiler::TakeSnapshot");
4706
+ return reinterpret_cast<const HeapSnapshot*>(
4707
+ i::HeapProfiler::TakeSnapshot(*Utils::OpenHandle(*title)));
4708
+ }
4709
+
4710
+ #endif // ENABLE_LOGGING_AND_PROFILING
4711
+
4712
+
4713
+ namespace internal {
4714
+
4715
+
4716
+ HandleScopeImplementer* HandleScopeImplementer::instance() {
4717
+ return &thread_local;
4718
+ }
4719
+
4720
+
4721
+ void HandleScopeImplementer::FreeThreadResources() {
4722
+ thread_local.Free();
4723
+ }
4724
+
4725
+
4726
+ char* HandleScopeImplementer::ArchiveThread(char* storage) {
4727
+ return thread_local.ArchiveThreadHelper(storage);
4728
+ }
4729
+
4730
+
4731
+ char* HandleScopeImplementer::ArchiveThreadHelper(char* storage) {
4732
+ v8::ImplementationUtilities::HandleScopeData* current =
4733
+ v8::ImplementationUtilities::CurrentHandleScope();
4734
+ handle_scope_data_ = *current;
4735
+ memcpy(storage, this, sizeof(*this));
4736
+
4737
+ ResetAfterArchive();
4738
+ current->Initialize();
4739
+
4740
+ return storage + ArchiveSpacePerThread();
4741
+ }
4742
+
4743
+
4744
+ int HandleScopeImplementer::ArchiveSpacePerThread() {
4745
+ return sizeof(thread_local);
4746
+ }
4747
+
4748
+
4749
+ char* HandleScopeImplementer::RestoreThread(char* storage) {
4750
+ return thread_local.RestoreThreadHelper(storage);
4751
+ }
4752
+
4753
+
4754
+ char* HandleScopeImplementer::RestoreThreadHelper(char* storage) {
4755
+ memcpy(this, storage, sizeof(*this));
4756
+ *v8::ImplementationUtilities::CurrentHandleScope() = handle_scope_data_;
4757
+ return storage + ArchiveSpacePerThread();
4758
+ }
4759
+
4760
+
4761
+ void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
4762
+ // Iterate over all handles in the blocks except for the last.
4763
+ for (int i = blocks()->length() - 2; i >= 0; --i) {
4764
+ Object** block = blocks()->at(i);
4765
+ v->VisitPointers(block, &block[kHandleBlockSize]);
4766
+ }
4767
+
4768
+ // Iterate over live handles in the last block (if any).
4769
+ if (!blocks()->is_empty()) {
4770
+ v->VisitPointers(blocks()->last(), handle_scope_data_.next);
4771
+ }
4772
+
4773
+ if (!saved_contexts_.is_empty()) {
4774
+ Object** start = reinterpret_cast<Object**>(&saved_contexts_.first());
4775
+ v->VisitPointers(start, start + saved_contexts_.length());
4776
+ }
4777
+ }
4778
+
4779
+
4780
+ void HandleScopeImplementer::Iterate(ObjectVisitor* v) {
4781
+ v8::ImplementationUtilities::HandleScopeData* current =
4782
+ v8::ImplementationUtilities::CurrentHandleScope();
4783
+ thread_local.handle_scope_data_ = *current;
4784
+ thread_local.IterateThis(v);
4785
+ }
4786
+
4787
+
4788
+ char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
4789
+ HandleScopeImplementer* thread_local =
4790
+ reinterpret_cast<HandleScopeImplementer*>(storage);
4791
+ thread_local->IterateThis(v);
4792
+ return storage + ArchiveSpacePerThread();
4793
+ }
4794
+
4795
+ } } // namespace v8::internal