therubyracer 0.4.7-x86-darwin-10

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

Potentially problematic release.


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

Files changed (1194) hide show
  1. data/Doxyfile +1514 -0
  2. data/History.txt +39 -0
  3. data/Manifest.txt +1192 -0
  4. data/README.rdoc +157 -0
  5. data/Rakefile +49 -0
  6. data/docs/data_conversion.txt +18 -0
  7. data/ext/v8/Makefile +169 -0
  8. data/ext/v8/callbacks.cpp +160 -0
  9. data/ext/v8/callbacks.h +14 -0
  10. data/ext/v8/convert_ruby.cpp +8 -0
  11. data/ext/v8/convert_ruby.h +99 -0
  12. data/ext/v8/convert_string.cpp +10 -0
  13. data/ext/v8/convert_string.h +73 -0
  14. data/ext/v8/convert_v8.cpp +9 -0
  15. data/ext/v8/convert_v8.h +121 -0
  16. data/ext/v8/converters.cpp +83 -0
  17. data/ext/v8/converters.h +23 -0
  18. data/ext/v8/extconf.rb +44 -0
  19. data/ext/v8/upstream/2.0.6/.sconsign.dblite +0 -0
  20. data/ext/v8/upstream/2.0.6/AUTHORS +23 -0
  21. data/ext/v8/upstream/2.0.6/ChangeLog +1479 -0
  22. data/ext/v8/upstream/2.0.6/LICENSE +55 -0
  23. data/ext/v8/upstream/2.0.6/SConstruct +1028 -0
  24. data/ext/v8/upstream/2.0.6/benchmarks/README.txt +63 -0
  25. data/ext/v8/upstream/2.0.6/benchmarks/base.js +264 -0
  26. data/ext/v8/upstream/2.0.6/benchmarks/crypto.js +1698 -0
  27. data/ext/v8/upstream/2.0.6/benchmarks/deltablue.js +880 -0
  28. data/ext/v8/upstream/2.0.6/benchmarks/earley-boyer.js +4684 -0
  29. data/ext/v8/upstream/2.0.6/benchmarks/raytrace.js +935 -0
  30. data/ext/v8/upstream/2.0.6/benchmarks/regexp.js +1614 -0
  31. data/ext/v8/upstream/2.0.6/benchmarks/revisions.html +86 -0
  32. data/ext/v8/upstream/2.0.6/benchmarks/richards.js +539 -0
  33. data/ext/v8/upstream/2.0.6/benchmarks/run.html +141 -0
  34. data/ext/v8/upstream/2.0.6/benchmarks/run.js +61 -0
  35. data/ext/v8/upstream/2.0.6/benchmarks/splay.js +378 -0
  36. data/ext/v8/upstream/2.0.6/benchmarks/style.css +77 -0
  37. data/ext/v8/upstream/2.0.6/benchmarks/v8-logo.png +0 -0
  38. data/ext/v8/upstream/2.0.6/include/v8-debug.h +275 -0
  39. data/ext/v8/upstream/2.0.6/include/v8.h +3236 -0
  40. data/ext/v8/upstream/2.0.6/samples/SConscript +38 -0
  41. data/ext/v8/upstream/2.0.6/samples/count-hosts.js +42 -0
  42. data/ext/v8/upstream/2.0.6/samples/process.cc +622 -0
  43. data/ext/v8/upstream/2.0.6/samples/shell.cc +303 -0
  44. data/ext/v8/upstream/2.0.6/src/SConscript +283 -0
  45. data/ext/v8/upstream/2.0.6/src/accessors.cc +695 -0
  46. data/ext/v8/upstream/2.0.6/src/accessors.h +114 -0
  47. data/ext/v8/upstream/2.0.6/src/allocation.cc +198 -0
  48. data/ext/v8/upstream/2.0.6/src/allocation.h +169 -0
  49. data/ext/v8/upstream/2.0.6/src/api.cc +3831 -0
  50. data/ext/v8/upstream/2.0.6/src/api.h +479 -0
  51. data/ext/v8/upstream/2.0.6/src/apinatives.js +110 -0
  52. data/ext/v8/upstream/2.0.6/src/apiutils.h +69 -0
  53. data/ext/v8/upstream/2.0.6/src/arguments.h +97 -0
  54. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +277 -0
  55. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +1821 -0
  56. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +1027 -0
  57. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +267 -0
  58. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +1821 -0
  59. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +1027 -0
  60. data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +1271 -0
  61. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +74 -0
  62. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +6682 -0
  63. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +535 -0
  64. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +112 -0
  65. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +347 -0
  66. data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +132 -0
  67. data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +213 -0
  68. data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +1166 -0
  69. data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +1698 -0
  70. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +123 -0
  71. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +162 -0
  72. data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +849 -0
  73. data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +238 -0
  74. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +1259 -0
  75. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +423 -0
  76. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +1266 -0
  77. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +282 -0
  78. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +103 -0
  79. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +59 -0
  80. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +43 -0
  81. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +2264 -0
  82. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +306 -0
  83. data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +1516 -0
  84. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +412 -0
  85. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +532 -0
  86. data/ext/v8/upstream/2.0.6/src/array.js +1154 -0
  87. data/ext/v8/upstream/2.0.6/src/assembler.cc +772 -0
  88. data/ext/v8/upstream/2.0.6/src/assembler.h +525 -0
  89. data/ext/v8/upstream/2.0.6/src/ast.cc +512 -0
  90. data/ext/v8/upstream/2.0.6/src/ast.h +1820 -0
  91. data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +1680 -0
  92. data/ext/v8/upstream/2.0.6/src/bootstrapper.h +103 -0
  93. data/ext/v8/upstream/2.0.6/src/builtins.cc +851 -0
  94. data/ext/v8/upstream/2.0.6/src/builtins.h +245 -0
  95. data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +104 -0
  96. data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +86 -0
  97. data/ext/v8/upstream/2.0.6/src/char-predicates.h +65 -0
  98. data/ext/v8/upstream/2.0.6/src/checks.cc +100 -0
  99. data/ext/v8/upstream/2.0.6/src/checks.h +284 -0
  100. data/ext/v8/upstream/2.0.6/src/code-stubs.cc +164 -0
  101. data/ext/v8/upstream/2.0.6/src/code-stubs.h +164 -0
  102. data/ext/v8/upstream/2.0.6/src/code.h +68 -0
  103. data/ext/v8/upstream/2.0.6/src/codegen-inl.h +88 -0
  104. data/ext/v8/upstream/2.0.6/src/codegen.cc +504 -0
  105. data/ext/v8/upstream/2.0.6/src/codegen.h +522 -0
  106. data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +490 -0
  107. data/ext/v8/upstream/2.0.6/src/compilation-cache.h +98 -0
  108. data/ext/v8/upstream/2.0.6/src/compiler.cc +1132 -0
  109. data/ext/v8/upstream/2.0.6/src/compiler.h +107 -0
  110. data/ext/v8/upstream/2.0.6/src/contexts.cc +256 -0
  111. data/ext/v8/upstream/2.0.6/src/contexts.h +345 -0
  112. data/ext/v8/upstream/2.0.6/src/conversions-inl.h +95 -0
  113. data/ext/v8/upstream/2.0.6/src/conversions.cc +709 -0
  114. data/ext/v8/upstream/2.0.6/src/conversions.h +118 -0
  115. data/ext/v8/upstream/2.0.6/src/counters.cc +78 -0
  116. data/ext/v8/upstream/2.0.6/src/counters.h +239 -0
  117. data/ext/v8/upstream/2.0.6/src/cpu.h +65 -0
  118. data/ext/v8/upstream/2.0.6/src/d8-debug.cc +345 -0
  119. data/ext/v8/upstream/2.0.6/src/d8-debug.h +155 -0
  120. data/ext/v8/upstream/2.0.6/src/d8-posix.cc +675 -0
  121. data/ext/v8/upstream/2.0.6/src/d8-readline.cc +128 -0
  122. data/ext/v8/upstream/2.0.6/src/d8-windows.cc +42 -0
  123. data/ext/v8/upstream/2.0.6/src/d8.cc +776 -0
  124. data/ext/v8/upstream/2.0.6/src/d8.h +225 -0
  125. data/ext/v8/upstream/2.0.6/src/d8.js +1625 -0
  126. data/ext/v8/upstream/2.0.6/src/date-delay.js +1138 -0
  127. data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +114 -0
  128. data/ext/v8/upstream/2.0.6/src/dateparser.cc +186 -0
  129. data/ext/v8/upstream/2.0.6/src/dateparser.h +240 -0
  130. data/ext/v8/upstream/2.0.6/src/debug-agent.cc +425 -0
  131. data/ext/v8/upstream/2.0.6/src/debug-agent.h +129 -0
  132. data/ext/v8/upstream/2.0.6/src/debug-delay.js +2073 -0
  133. data/ext/v8/upstream/2.0.6/src/debug.cc +2751 -0
  134. data/ext/v8/upstream/2.0.6/src/debug.h +866 -0
  135. data/ext/v8/upstream/2.0.6/src/disasm.h +77 -0
  136. data/ext/v8/upstream/2.0.6/src/disassembler.cc +318 -0
  137. data/ext/v8/upstream/2.0.6/src/disassembler.h +56 -0
  138. data/ext/v8/upstream/2.0.6/src/dtoa-config.c +91 -0
  139. data/ext/v8/upstream/2.0.6/src/execution.cc +701 -0
  140. data/ext/v8/upstream/2.0.6/src/execution.h +312 -0
  141. data/ext/v8/upstream/2.0.6/src/factory.cc +957 -0
  142. data/ext/v8/upstream/2.0.6/src/factory.h +393 -0
  143. data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +725 -0
  144. data/ext/v8/upstream/2.0.6/src/fast-codegen.h +371 -0
  145. data/ext/v8/upstream/2.0.6/src/flag-definitions.h +426 -0
  146. data/ext/v8/upstream/2.0.6/src/flags.cc +555 -0
  147. data/ext/v8/upstream/2.0.6/src/flags.h +81 -0
  148. data/ext/v8/upstream/2.0.6/src/frame-element.cc +45 -0
  149. data/ext/v8/upstream/2.0.6/src/frame-element.h +235 -0
  150. data/ext/v8/upstream/2.0.6/src/frames-inl.h +215 -0
  151. data/ext/v8/upstream/2.0.6/src/frames.cc +749 -0
  152. data/ext/v8/upstream/2.0.6/src/frames.h +659 -0
  153. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +76 -0
  154. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +135 -0
  155. data/ext/v8/upstream/2.0.6/src/global-handles.cc +516 -0
  156. data/ext/v8/upstream/2.0.6/src/global-handles.h +180 -0
  157. data/ext/v8/upstream/2.0.6/src/globals.h +608 -0
  158. data/ext/v8/upstream/2.0.6/src/handles-inl.h +76 -0
  159. data/ext/v8/upstream/2.0.6/src/handles.cc +811 -0
  160. data/ext/v8/upstream/2.0.6/src/handles.h +367 -0
  161. data/ext/v8/upstream/2.0.6/src/hashmap.cc +226 -0
  162. data/ext/v8/upstream/2.0.6/src/hashmap.h +120 -0
  163. data/ext/v8/upstream/2.0.6/src/heap-inl.h +407 -0
  164. data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +695 -0
  165. data/ext/v8/upstream/2.0.6/src/heap-profiler.h +277 -0
  166. data/ext/v8/upstream/2.0.6/src/heap.cc +4204 -0
  167. data/ext/v8/upstream/2.0.6/src/heap.h +1704 -0
  168. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +325 -0
  169. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +2375 -0
  170. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +914 -0
  171. data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +1222 -0
  172. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +46 -0
  173. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +9770 -0
  174. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +834 -0
  175. data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +79 -0
  176. data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +208 -0
  177. data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +1357 -0
  178. data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +1813 -0
  179. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +111 -0
  180. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +135 -0
  181. data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +1490 -0
  182. data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +432 -0
  183. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +1517 -0
  184. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +528 -0
  185. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +1219 -0
  186. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +230 -0
  187. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +82 -0
  188. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +99 -0
  189. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +43 -0
  190. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +30 -0
  191. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +62 -0
  192. data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +1961 -0
  193. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +1105 -0
  194. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +580 -0
  195. data/ext/v8/upstream/2.0.6/src/ic-inl.h +93 -0
  196. data/ext/v8/upstream/2.0.6/src/ic.cc +1426 -0
  197. data/ext/v8/upstream/2.0.6/src/ic.h +443 -0
  198. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +646 -0
  199. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +48 -0
  200. data/ext/v8/upstream/2.0.6/src/json-delay.js +254 -0
  201. data/ext/v8/upstream/2.0.6/src/jsregexp.cc +5234 -0
  202. data/ext/v8/upstream/2.0.6/src/jsregexp.h +1439 -0
  203. data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +49 -0
  204. data/ext/v8/upstream/2.0.6/src/jump-target.cc +383 -0
  205. data/ext/v8/upstream/2.0.6/src/jump-target.h +280 -0
  206. data/ext/v8/upstream/2.0.6/src/list-inl.h +166 -0
  207. data/ext/v8/upstream/2.0.6/src/list.h +158 -0
  208. data/ext/v8/upstream/2.0.6/src/log-inl.h +126 -0
  209. data/ext/v8/upstream/2.0.6/src/log-utils.cc +503 -0
  210. data/ext/v8/upstream/2.0.6/src/log-utils.h +292 -0
  211. data/ext/v8/upstream/2.0.6/src/log.cc +1457 -0
  212. data/ext/v8/upstream/2.0.6/src/log.h +371 -0
  213. data/ext/v8/upstream/2.0.6/src/macro-assembler.h +93 -0
  214. data/ext/v8/upstream/2.0.6/src/macros.py +137 -0
  215. data/ext/v8/upstream/2.0.6/src/mark-compact.cc +2007 -0
  216. data/ext/v8/upstream/2.0.6/src/mark-compact.h +442 -0
  217. data/ext/v8/upstream/2.0.6/src/math.js +263 -0
  218. data/ext/v8/upstream/2.0.6/src/memory.h +74 -0
  219. data/ext/v8/upstream/2.0.6/src/messages.cc +177 -0
  220. data/ext/v8/upstream/2.0.6/src/messages.h +112 -0
  221. data/ext/v8/upstream/2.0.6/src/messages.js +937 -0
  222. data/ext/v8/upstream/2.0.6/src/mirror-delay.js +2332 -0
  223. data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +169 -0
  224. data/ext/v8/upstream/2.0.6/src/natives.h +63 -0
  225. data/ext/v8/upstream/2.0.6/src/objects-debug.cc +1317 -0
  226. data/ext/v8/upstream/2.0.6/src/objects-inl.h +3044 -0
  227. data/ext/v8/upstream/2.0.6/src/objects.cc +8306 -0
  228. data/ext/v8/upstream/2.0.6/src/objects.h +4960 -0
  229. data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +116 -0
  230. data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +69 -0
  231. data/ext/v8/upstream/2.0.6/src/parser.cc +4810 -0
  232. data/ext/v8/upstream/2.0.6/src/parser.h +195 -0
  233. data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +645 -0
  234. data/ext/v8/upstream/2.0.6/src/platform-linux.cc +808 -0
  235. data/ext/v8/upstream/2.0.6/src/platform-macos.cc +643 -0
  236. data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +454 -0
  237. data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +597 -0
  238. data/ext/v8/upstream/2.0.6/src/platform-posix.cc +380 -0
  239. data/ext/v8/upstream/2.0.6/src/platform-win32.cc +1908 -0
  240. data/ext/v8/upstream/2.0.6/src/platform.h +556 -0
  241. data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +1511 -0
  242. data/ext/v8/upstream/2.0.6/src/prettyprinter.h +219 -0
  243. data/ext/v8/upstream/2.0.6/src/property.cc +96 -0
  244. data/ext/v8/upstream/2.0.6/src/property.h +327 -0
  245. data/ext/v8/upstream/2.0.6/src/regexp-delay.js +406 -0
  246. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  247. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +464 -0
  248. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +141 -0
  249. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +356 -0
  250. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +103 -0
  251. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +240 -0
  252. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +220 -0
  253. data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +103 -0
  254. data/ext/v8/upstream/2.0.6/src/regexp-stack.h +123 -0
  255. data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +74 -0
  256. data/ext/v8/upstream/2.0.6/src/register-allocator.cc +100 -0
  257. data/ext/v8/upstream/2.0.6/src/register-allocator.h +295 -0
  258. data/ext/v8/upstream/2.0.6/src/rewriter.cc +855 -0
  259. data/ext/v8/upstream/2.0.6/src/rewriter.h +54 -0
  260. data/ext/v8/upstream/2.0.6/src/runtime.cc +8163 -0
  261. data/ext/v8/upstream/2.0.6/src/runtime.h +432 -0
  262. data/ext/v8/upstream/2.0.6/src/runtime.js +626 -0
  263. data/ext/v8/upstream/2.0.6/src/scanner.cc +1098 -0
  264. data/ext/v8/upstream/2.0.6/src/scanner.h +425 -0
  265. data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +649 -0
  266. data/ext/v8/upstream/2.0.6/src/scopeinfo.h +236 -0
  267. data/ext/v8/upstream/2.0.6/src/scopes.cc +963 -0
  268. data/ext/v8/upstream/2.0.6/src/scopes.h +401 -0
  269. data/ext/v8/upstream/2.0.6/src/serialize.cc +1260 -0
  270. data/ext/v8/upstream/2.0.6/src/serialize.h +404 -0
  271. data/ext/v8/upstream/2.0.6/src/shell.h +55 -0
  272. data/ext/v8/upstream/2.0.6/src/simulator.h +41 -0
  273. data/ext/v8/upstream/2.0.6/src/smart-pointer.h +109 -0
  274. data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +97 -0
  275. data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +40 -0
  276. data/ext/v8/upstream/2.0.6/src/snapshot.h +59 -0
  277. data/ext/v8/upstream/2.0.6/src/spaces-inl.h +372 -0
  278. data/ext/v8/upstream/2.0.6/src/spaces.cc +2864 -0
  279. data/ext/v8/upstream/2.0.6/src/spaces.h +2072 -0
  280. data/ext/v8/upstream/2.0.6/src/string-stream.cc +584 -0
  281. data/ext/v8/upstream/2.0.6/src/string-stream.h +189 -0
  282. data/ext/v8/upstream/2.0.6/src/string.js +901 -0
  283. data/ext/v8/upstream/2.0.6/src/stub-cache.cc +1108 -0
  284. data/ext/v8/upstream/2.0.6/src/stub-cache.h +578 -0
  285. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +15 -0
  286. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +3330 -0
  287. data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +3925 -0
  288. data/ext/v8/upstream/2.0.6/src/token.cc +56 -0
  289. data/ext/v8/upstream/2.0.6/src/token.h +270 -0
  290. data/ext/v8/upstream/2.0.6/src/top.cc +991 -0
  291. data/ext/v8/upstream/2.0.6/src/top.h +459 -0
  292. data/ext/v8/upstream/2.0.6/src/unicode-inl.h +238 -0
  293. data/ext/v8/upstream/2.0.6/src/unicode.cc +749 -0
  294. data/ext/v8/upstream/2.0.6/src/unicode.h +279 -0
  295. data/ext/v8/upstream/2.0.6/src/uri.js +415 -0
  296. data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +426 -0
  297. data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +40 -0
  298. data/ext/v8/upstream/2.0.6/src/utils.cc +322 -0
  299. data/ext/v8/upstream/2.0.6/src/utils.h +592 -0
  300. data/ext/v8/upstream/2.0.6/src/v8-counters.cc +55 -0
  301. data/ext/v8/upstream/2.0.6/src/v8-counters.h +198 -0
  302. data/ext/v8/upstream/2.0.6/src/v8.cc +193 -0
  303. data/ext/v8/upstream/2.0.6/src/v8.h +119 -0
  304. data/ext/v8/upstream/2.0.6/src/v8natives.js +846 -0
  305. data/ext/v8/upstream/2.0.6/src/v8threads.cc +450 -0
  306. data/ext/v8/upstream/2.0.6/src/v8threads.h +144 -0
  307. data/ext/v8/upstream/2.0.6/src/variables.cc +163 -0
  308. data/ext/v8/upstream/2.0.6/src/variables.h +235 -0
  309. data/ext/v8/upstream/2.0.6/src/version.cc +88 -0
  310. data/ext/v8/upstream/2.0.6/src/version.h +64 -0
  311. data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +381 -0
  312. data/ext/v8/upstream/2.0.6/src/virtual-frame.h +44 -0
  313. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +352 -0
  314. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +2539 -0
  315. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +1399 -0
  316. data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +1255 -0
  317. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +46 -0
  318. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +8223 -0
  319. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +785 -0
  320. data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +79 -0
  321. data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +202 -0
  322. data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +1596 -0
  323. data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +1820 -0
  324. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +109 -0
  325. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +121 -0
  326. data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +1392 -0
  327. data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +432 -0
  328. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +2409 -0
  329. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +765 -0
  330. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +1337 -0
  331. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +295 -0
  332. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +86 -0
  333. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +84 -0
  334. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +43 -0
  335. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +27 -0
  336. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +63 -0
  337. data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +1884 -0
  338. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +1089 -0
  339. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +560 -0
  340. data/ext/v8/upstream/2.0.6/src/zone-inl.h +297 -0
  341. data/ext/v8/upstream/2.0.6/src/zone.cc +193 -0
  342. data/ext/v8/upstream/2.0.6/src/zone.h +305 -0
  343. data/ext/v8/upstream/2.0.6/test/cctest/SConscript +95 -0
  344. data/ext/v8/upstream/2.0.6/test/cctest/cctest.cc +126 -0
  345. data/ext/v8/upstream/2.0.6/test/cctest/cctest.h +211 -0
  346. data/ext/v8/upstream/2.0.6/test/cctest/cctest.status +54 -0
  347. data/ext/v8/upstream/2.0.6/test/cctest/test-accessors.cc +450 -0
  348. data/ext/v8/upstream/2.0.6/test/cctest/test-alloc.cc +215 -0
  349. data/ext/v8/upstream/2.0.6/test/cctest/test-api.cc +8699 -0
  350. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-arm.cc +227 -0
  351. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-ia32.cc +395 -0
  352. data/ext/v8/upstream/2.0.6/test/cctest/test-assembler-x64.cc +292 -0
  353. data/ext/v8/upstream/2.0.6/test/cctest/test-ast.cc +97 -0
  354. data/ext/v8/upstream/2.0.6/test/cctest/test-compiler.cc +318 -0
  355. data/ext/v8/upstream/2.0.6/test/cctest/test-conversions.cc +130 -0
  356. data/ext/v8/upstream/2.0.6/test/cctest/test-debug.cc +5788 -0
  357. data/ext/v8/upstream/2.0.6/test/cctest/test-decls.cc +593 -0
  358. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-arm.cc +281 -0
  359. data/ext/v8/upstream/2.0.6/test/cctest/test-disasm-ia32.cc +418 -0
  360. data/ext/v8/upstream/2.0.6/test/cctest/test-flags.cc +234 -0
  361. data/ext/v8/upstream/2.0.6/test/cctest/test-func-name-inference.cc +267 -0
  362. data/ext/v8/upstream/2.0.6/test/cctest/test-hashmap.cc +176 -0
  363. data/ext/v8/upstream/2.0.6/test/cctest/test-heap-profiler.cc +396 -0
  364. data/ext/v8/upstream/2.0.6/test/cctest/test-heap.cc +796 -0
  365. data/ext/v8/upstream/2.0.6/test/cctest/test-list.cc +101 -0
  366. data/ext/v8/upstream/2.0.6/test/cctest/test-lock.cc +63 -0
  367. data/ext/v8/upstream/2.0.6/test/cctest/test-log-stack-tracer.cc +372 -0
  368. data/ext/v8/upstream/2.0.6/test/cctest/test-log-utils.cc +310 -0
  369. data/ext/v8/upstream/2.0.6/test/cctest/test-log.cc +1081 -0
  370. data/ext/v8/upstream/2.0.6/test/cctest/test-macro-assembler-x64.cc +2104 -0
  371. data/ext/v8/upstream/2.0.6/test/cctest/test-mark-compact.cc +341 -0
  372. data/ext/v8/upstream/2.0.6/test/cctest/test-parsing.cc +129 -0
  373. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-linux.cc +80 -0
  374. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-macos.cc +10 -0
  375. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-nullos.cc +80 -0
  376. data/ext/v8/upstream/2.0.6/test/cctest/test-platform-win32.cc +26 -0
  377. data/ext/v8/upstream/2.0.6/test/cctest/test-regexp.cc +1815 -0
  378. data/ext/v8/upstream/2.0.6/test/cctest/test-serialize.cc +438 -0
  379. data/ext/v8/upstream/2.0.6/test/cctest/test-sockets.cc +162 -0
  380. data/ext/v8/upstream/2.0.6/test/cctest/test-spaces.cc +248 -0
  381. data/ext/v8/upstream/2.0.6/test/cctest/test-strings.cc +432 -0
  382. data/ext/v8/upstream/2.0.6/test/cctest/test-thread-termination.cc +290 -0
  383. data/ext/v8/upstream/2.0.6/test/cctest/test-threads.cc +52 -0
  384. data/ext/v8/upstream/2.0.6/test/cctest/test-utils.cc +186 -0
  385. data/ext/v8/upstream/2.0.6/test/cctest/test-version.cc +89 -0
  386. data/ext/v8/upstream/2.0.6/test/cctest/testcfg.py +108 -0
  387. data/ext/v8/upstream/2.0.6/test/es5conform/README +14 -0
  388. data/ext/v8/upstream/2.0.6/test/es5conform/es5conform.status +226 -0
  389. data/ext/v8/upstream/2.0.6/test/es5conform/harness-adapt.js +74 -0
  390. data/ext/v8/upstream/2.0.6/test/es5conform/testcfg.py +108 -0
  391. data/ext/v8/upstream/2.0.6/test/message/message.status +31 -0
  392. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.js +31 -0
  393. data/ext/v8/upstream/2.0.6/test/message/overwritten-builtins.out +30 -0
  394. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.js +33 -0
  395. data/ext/v8/upstream/2.0.6/test/message/regress/regress-73.out +30 -0
  396. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.js +32 -0
  397. data/ext/v8/upstream/2.0.6/test/message/regress/regress-75.out +30 -0
  398. data/ext/v8/upstream/2.0.6/test/message/simple-throw.js +28 -0
  399. data/ext/v8/upstream/2.0.6/test/message/simple-throw.out +30 -0
  400. data/ext/v8/upstream/2.0.6/test/message/testcfg.py +135 -0
  401. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.js +51 -0
  402. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-no-message.out +26 -0
  403. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.js +39 -0
  404. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-return-in-finally.out +28 -0
  405. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.js +34 -0
  406. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch-and-finally.out +30 -0
  407. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.js +34 -0
  408. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-catch.out +30 -0
  409. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.js +34 -0
  410. data/ext/v8/upstream/2.0.6/test/message/try-catch-finally-throw-in-finally.out +30 -0
  411. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.js +37 -0
  412. data/ext/v8/upstream/2.0.6/test/message/try-finally-return-in-finally.out +28 -0
  413. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.js +32 -0
  414. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-finally.out +30 -0
  415. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.js +32 -0
  416. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try-and-finally.out +30 -0
  417. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.js +32 -0
  418. data/ext/v8/upstream/2.0.6/test/message/try-finally-throw-in-try.out +30 -0
  419. data/ext/v8/upstream/2.0.6/test/mjsunit/api-call-after-bypassed-exception.js +39 -0
  420. data/ext/v8/upstream/2.0.6/test/mjsunit/apply.js +196 -0
  421. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-apply.js +134 -0
  422. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-call-apply.js +41 -0
  423. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-enum.js +52 -0
  424. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-indirect.js +47 -0
  425. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-lazy.js +47 -0
  426. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-opt.js +130 -0
  427. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments-read-and-assignment.js +164 -0
  428. data/ext/v8/upstream/2.0.6/test/mjsunit/arguments.js +97 -0
  429. data/ext/v8/upstream/2.0.6/test/mjsunit/array-concat.js +120 -0
  430. data/ext/v8/upstream/2.0.6/test/mjsunit/array-constructor.js +119 -0
  431. data/ext/v8/upstream/2.0.6/test/mjsunit/array-functions-prototype.js +159 -0
  432. data/ext/v8/upstream/2.0.6/test/mjsunit/array-indexing.js +66 -0
  433. data/ext/v8/upstream/2.0.6/test/mjsunit/array-iteration.js +228 -0
  434. data/ext/v8/upstream/2.0.6/test/mjsunit/array-join.js +45 -0
  435. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length-number-conversion.js +53 -0
  436. data/ext/v8/upstream/2.0.6/test/mjsunit/array-length.js +111 -0
  437. data/ext/v8/upstream/2.0.6/test/mjsunit/array-reduce.js +514 -0
  438. data/ext/v8/upstream/2.0.6/test/mjsunit/array-sort.js +362 -0
  439. data/ext/v8/upstream/2.0.6/test/mjsunit/array-splice.js +314 -0
  440. data/ext/v8/upstream/2.0.6/test/mjsunit/ascii-regexp-subject.js +49 -0
  441. data/ext/v8/upstream/2.0.6/test/mjsunit/big-array-literal.js +111 -0
  442. data/ext/v8/upstream/2.0.6/test/mjsunit/big-object-literal.js +114 -0
  443. data/ext/v8/upstream/2.0.6/test/mjsunit/binary-operation-overwrite.js +36 -0
  444. data/ext/v8/upstream/2.0.6/test/mjsunit/bit-not.js +75 -0
  445. data/ext/v8/upstream/2.0.6/test/mjsunit/bitwise-operations-undefined.js +49 -0
  446. data/ext/v8/upstream/2.0.6/test/mjsunit/body-not-visible.js +39 -0
  447. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-1344252.js +79 -0
  448. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-222.js +42 -0
  449. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-223.js +39 -0
  450. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-900066.js +38 -0
  451. data/ext/v8/upstream/2.0.6/test/mjsunit/bugs/bug-941049.js +100 -0
  452. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function-call.js +38 -0
  453. data/ext/v8/upstream/2.0.6/test/mjsunit/call-non-function.js +63 -0
  454. data/ext/v8/upstream/2.0.6/test/mjsunit/call.js +87 -0
  455. data/ext/v8/upstream/2.0.6/test/mjsunit/char-escape.js +53 -0
  456. data/ext/v8/upstream/2.0.6/test/mjsunit/class-of-builtins.js +50 -0
  457. data/ext/v8/upstream/2.0.6/test/mjsunit/closure.js +37 -0
  458. data/ext/v8/upstream/2.0.6/test/mjsunit/codegen-coverage.js +91 -0
  459. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-character.js +50 -0
  460. data/ext/v8/upstream/2.0.6/test/mjsunit/compare-nan.js +66 -0
  461. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/countoperation.js +111 -0
  462. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/function-call.js +52 -0
  463. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/globals.js +65 -0
  464. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/jsnatives.js +33 -0
  465. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals-assignment.js +104 -0
  466. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/literals.js +52 -0
  467. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/loops.js +35 -0
  468. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/objectliterals.js +57 -0
  469. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/property-simple.js +39 -0
  470. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/short-circuit.js +102 -0
  471. data/ext/v8/upstream/2.0.6/test/mjsunit/compiler/thisfunction.js +35 -0
  472. data/ext/v8/upstream/2.0.6/test/mjsunit/const-declaration.js +172 -0
  473. data/ext/v8/upstream/2.0.6/test/mjsunit/const-eval-init.js +111 -0
  474. data/ext/v8/upstream/2.0.6/test/mjsunit/const-redecl.js +220 -0
  475. data/ext/v8/upstream/2.0.6/test/mjsunit/const.js +70 -0
  476. data/ext/v8/upstream/2.0.6/test/mjsunit/constant-folding.js +232 -0
  477. data/ext/v8/upstream/2.0.6/test/mjsunit/context-variable-assignments.js +37 -0
  478. data/ext/v8/upstream/2.0.6/test/mjsunit/cyclic-array-to-string.js +65 -0
  479. data/ext/v8/upstream/2.0.6/test/mjsunit/cyrillic.js +199 -0
  480. data/ext/v8/upstream/2.0.6/test/mjsunit/d8-os.js +180 -0
  481. data/ext/v8/upstream/2.0.6/test/mjsunit/date-parse.js +268 -0
  482. data/ext/v8/upstream/2.0.6/test/mjsunit/date.js +149 -0
  483. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace-text.js +122 -0
  484. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-backtrace.js +272 -0
  485. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-breakpoints.js +120 -0
  486. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-changebreakpoint.js +108 -0
  487. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpoint.js +101 -0
  488. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-clearbreakpointgroup.js +117 -0
  489. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-compile-event.js +126 -0
  490. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-conditional-breakpoints.js +171 -0
  491. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructed-by.js +60 -0
  492. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-constructor.js +78 -0
  493. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-continue.js +114 -0
  494. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-enable-disable-breakpoints.js +90 -0
  495. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-arguments.js +93 -0
  496. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-bool-constructor.js +80 -0
  497. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-locals.js +132 -0
  498. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-recursive.js +167 -0
  499. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate-with.js +77 -0
  500. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-evaluate.js +118 -0
  501. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-event-listener.js +73 -0
  502. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-handle.js +252 -0
  503. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-ignore-breakpoints.js +89 -0
  504. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-mirror-cache.js +85 -0
  505. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-multiple-breakpoints.js +105 -0
  506. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-referenced-by.js +112 -0
  507. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-references.js +118 -0
  508. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scopes.js +761 -0
  509. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script-breakpoints.js +112 -0
  510. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-script.js +92 -0
  511. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-scripts-request.js +108 -0
  512. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-setbreakpoint.js +165 -0
  513. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceinfo.js +352 -0
  514. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-sourceslice.js +74 -0
  515. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step-stub-callfunction.js +87 -0
  516. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-step.js +82 -0
  517. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-accessor.js +248 -0
  518. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-builtin.js +78 -0
  519. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-call-function-stub.js +115 -0
  520. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-constructor.js +78 -0
  521. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepin-function-call.js +149 -0
  522. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepnext-do-while.js +79 -0
  523. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-recursive-function.js +106 -0
  524. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-stepout-to-builtin.js +84 -0
  525. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-suspend.js +96 -0
  526. data/ext/v8/upstream/2.0.6/test/mjsunit/debug-version.js +90 -0
  527. data/ext/v8/upstream/2.0.6/test/mjsunit/declare-locally.js +43 -0
  528. data/ext/v8/upstream/2.0.6/test/mjsunit/deep-recursion.js +66 -0
  529. data/ext/v8/upstream/2.0.6/test/mjsunit/delay-syntax-error.js +41 -0
  530. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-global-properties.js +37 -0
  531. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-eval.js +32 -0
  532. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-in-with.js +34 -0
  533. data/ext/v8/upstream/2.0.6/test/mjsunit/delete-vars-from-eval.js +40 -0
  534. data/ext/v8/upstream/2.0.6/test/mjsunit/delete.js +163 -0
  535. data/ext/v8/upstream/2.0.6/test/mjsunit/div-mod.js +157 -0
  536. data/ext/v8/upstream/2.0.6/test/mjsunit/do-not-strip-fc.js +31 -0
  537. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-enum-array-holes.js +35 -0
  538. data/ext/v8/upstream/2.0.6/test/mjsunit/dont-reinit-global-var.js +47 -0
  539. data/ext/v8/upstream/2.0.6/test/mjsunit/double-equals.js +114 -0
  540. data/ext/v8/upstream/2.0.6/test/mjsunit/dtoa.js +32 -0
  541. data/ext/v8/upstream/2.0.6/test/mjsunit/enumeration-order.js +109 -0
  542. data/ext/v8/upstream/2.0.6/test/mjsunit/error-constructors.js +32 -0
  543. data/ext/v8/upstream/2.0.6/test/mjsunit/escape.js +118 -0
  544. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-enclosing-function-name.js +76 -0
  545. data/ext/v8/upstream/2.0.6/test/mjsunit/eval-typeof-non-existing.js +35 -0
  546. data/ext/v8/upstream/2.0.6/test/mjsunit/eval.js +157 -0
  547. data/ext/v8/upstream/2.0.6/test/mjsunit/execScript-case-insensitive.js +34 -0
  548. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-arguments.js +54 -0
  549. data/ext/v8/upstream/2.0.6/test/mjsunit/extra-commas.js +46 -0
  550. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-null-or-undefined.js +33 -0
  551. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in-special-cases.js +64 -0
  552. data/ext/v8/upstream/2.0.6/test/mjsunit/for-in.js +86 -0
  553. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-as-prototype.js +36 -0
  554. data/ext/v8/upstream/2.0.6/test/mjsunit/fun-name.js +34 -0
  555. data/ext/v8/upstream/2.0.6/test/mjsunit/function-arguments-null.js +30 -0
  556. data/ext/v8/upstream/2.0.6/test/mjsunit/function-caller.js +48 -0
  557. data/ext/v8/upstream/2.0.6/test/mjsunit/function-names.js +133 -0
  558. data/ext/v8/upstream/2.0.6/test/mjsunit/function-property.js +29 -0
  559. data/ext/v8/upstream/2.0.6/test/mjsunit/function-prototype.js +98 -0
  560. data/ext/v8/upstream/2.0.6/test/mjsunit/function-source.js +49 -0
  561. data/ext/v8/upstream/2.0.6/test/mjsunit/function.js +83 -0
  562. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-accessors.js +85 -0
  563. data/ext/v8/upstream/2.0.6/test/mjsunit/fuzz-natives.js +159 -0
  564. data/ext/v8/upstream/2.0.6/test/mjsunit/get-own-property-descriptor.js +51 -0
  565. data/ext/v8/upstream/2.0.6/test/mjsunit/get-prototype-of.js +68 -0
  566. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-prototype.js +50 -0
  567. data/ext/v8/upstream/2.0.6/test/mjsunit/getter-in-value-prototype.js +35 -0
  568. data/ext/v8/upstream/2.0.6/test/mjsunit/global-const-var-conflicts.js +57 -0
  569. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-ic.js +45 -0
  570. data/ext/v8/upstream/2.0.6/test/mjsunit/global-deleted-property-keyed.js +38 -0
  571. data/ext/v8/upstream/2.0.6/test/mjsunit/global-ic.js +48 -0
  572. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval-in-with.js +59 -0
  573. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-eval.js +85 -0
  574. data/ext/v8/upstream/2.0.6/test/mjsunit/global-load-from-nested-eval.js +66 -0
  575. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-eval.js +34 -0
  576. data/ext/v8/upstream/2.0.6/test/mjsunit/global-vars-with.js +43 -0
  577. data/ext/v8/upstream/2.0.6/test/mjsunit/greedy.js +60 -0
  578. data/ext/v8/upstream/2.0.6/test/mjsunit/has-own-property.js +38 -0
  579. data/ext/v8/upstream/2.0.6/test/mjsunit/html-comments.js +57 -0
  580. data/ext/v8/upstream/2.0.6/test/mjsunit/html-string-funcs.js +47 -0
  581. data/ext/v8/upstream/2.0.6/test/mjsunit/if-in-undefined.js +36 -0
  582. data/ext/v8/upstream/2.0.6/test/mjsunit/in.js +159 -0
  583. data/ext/v8/upstream/2.0.6/test/mjsunit/indexed-accessors.js +120 -0
  584. data/ext/v8/upstream/2.0.6/test/mjsunit/instanceof.js +93 -0
  585. data/ext/v8/upstream/2.0.6/test/mjsunit/integer-to-string.js +35 -0
  586. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-lhs.js +65 -0
  587. data/ext/v8/upstream/2.0.6/test/mjsunit/invalid-source-element.js +31 -0
  588. data/ext/v8/upstream/2.0.6/test/mjsunit/json.js +207 -0
  589. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-ic.js +236 -0
  590. data/ext/v8/upstream/2.0.6/test/mjsunit/keyed-storage-extend.js +55 -0
  591. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-allocation.js +300 -0
  592. data/ext/v8/upstream/2.0.6/test/mjsunit/large-object-literal.js +56 -0
  593. data/ext/v8/upstream/2.0.6/test/mjsunit/lazy-load.js +34 -0
  594. data/ext/v8/upstream/2.0.6/test/mjsunit/leakcheck.js +53 -0
  595. data/ext/v8/upstream/2.0.6/test/mjsunit/length.js +78 -0
  596. data/ext/v8/upstream/2.0.6/test/mjsunit/local-load-from-eval.js +39 -0
  597. data/ext/v8/upstream/2.0.6/test/mjsunit/math-min-max.js +105 -0
  598. data/ext/v8/upstream/2.0.6/test/mjsunit/megamorphic-callbacks.js +70 -0
  599. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-array.js +138 -0
  600. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-boolean.js +59 -0
  601. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-date.js +77 -0
  602. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-error.js +94 -0
  603. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-function.js +90 -0
  604. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-null.js +50 -0
  605. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-number.js +77 -0
  606. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-object.js +227 -0
  607. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-regexp.js +110 -0
  608. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-script.js +100 -0
  609. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-string.js +89 -0
  610. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-undefined.js +50 -0
  611. data/ext/v8/upstream/2.0.6/test/mjsunit/mirror-unresolved-function.js +81 -0
  612. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.js +203 -0
  613. data/ext/v8/upstream/2.0.6/test/mjsunit/mjsunit.status +66 -0
  614. data/ext/v8/upstream/2.0.6/test/mjsunit/mul-exhaustive.js +4511 -0
  615. data/ext/v8/upstream/2.0.6/test/mjsunit/multiple-return.js +62 -0
  616. data/ext/v8/upstream/2.0.6/test/mjsunit/negate-zero.js +42 -0
  617. data/ext/v8/upstream/2.0.6/test/mjsunit/negate.js +59 -0
  618. data/ext/v8/upstream/2.0.6/test/mjsunit/new.js +56 -0
  619. data/ext/v8/upstream/2.0.6/test/mjsunit/newline-in-string.js +46 -0
  620. data/ext/v8/upstream/2.0.6/test/mjsunit/no-branch-elimination.js +36 -0
  621. data/ext/v8/upstream/2.0.6/test/mjsunit/no-octal-constants-above-256.js +32 -0
  622. data/ext/v8/upstream/2.0.6/test/mjsunit/no-semicolon.js +45 -0
  623. data/ext/v8/upstream/2.0.6/test/mjsunit/non-ascii-replace.js +30 -0
  624. data/ext/v8/upstream/2.0.6/test/mjsunit/nul-characters.js +38 -0
  625. data/ext/v8/upstream/2.0.6/test/mjsunit/number-limits.js +47 -0
  626. data/ext/v8/upstream/2.0.6/test/mjsunit/number-string-index-call.js +32 -0
  627. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring-small.js +395 -0
  628. data/ext/v8/upstream/2.0.6/test/mjsunit/number-tostring.js +338 -0
  629. data/ext/v8/upstream/2.0.6/test/mjsunit/obj-construct.js +46 -0
  630. data/ext/v8/upstream/2.0.6/test/mjsunit/object-create.js +250 -0
  631. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal-gc.js +66 -0
  632. data/ext/v8/upstream/2.0.6/test/mjsunit/object-literal.js +105 -0
  633. data/ext/v8/upstream/2.0.6/test/mjsunit/override-read-only-property.js +64 -0
  634. data/ext/v8/upstream/2.0.6/test/mjsunit/parse-int-float.js +85 -0
  635. data/ext/v8/upstream/2.0.6/test/mjsunit/property-load-across-eval.js +85 -0
  636. data/ext/v8/upstream/2.0.6/test/mjsunit/property-object-key.js +36 -0
  637. data/ext/v8/upstream/2.0.6/test/mjsunit/proto.js +33 -0
  638. data/ext/v8/upstream/2.0.6/test/mjsunit/prototype.js +93 -0
  639. data/ext/v8/upstream/2.0.6/test/mjsunit/receiver-in-with-calls.js +47 -0
  640. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-UC16.js +47 -0
  641. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-call-as-function.js +36 -0
  642. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-capture.js +57 -0
  643. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-captures.js +31 -0
  644. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-indexof.js +77 -0
  645. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-lookahead.js +166 -0
  646. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-loop-capture.js +29 -0
  647. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline-stack-trace.js +116 -0
  648. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-multiline.js +112 -0
  649. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-standalones.js +78 -0
  650. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-static.js +167 -0
  651. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp-string-methods.js +51 -0
  652. data/ext/v8/upstream/2.0.6/test/mjsunit/regexp.js +390 -0
  653. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1030466.js +45 -0
  654. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1036894.js +38 -0
  655. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1039610.js +29 -0
  656. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1050043.js +51 -0
  657. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1062422.js +30 -0
  658. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1066899.js +37 -0
  659. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1081309.js +110 -0
  660. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1102760.js +35 -0
  661. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1110164.js +46 -0
  662. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1112051.js +33 -0
  663. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1114040.js +58 -0
  664. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1134697.js +31 -0
  665. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-114.js +43 -0
  666. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-116.js +40 -0
  667. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1170187.js +80 -0
  668. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1173979.js +48 -0
  669. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1175390.js +30 -0
  670. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177518.js +39 -0
  671. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1177809.js +31 -0
  672. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1178598.js +90 -0
  673. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1182832.js +38 -0
  674. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1187524.js +34 -0
  675. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199401.js +75 -0
  676. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1199637.js +78 -0
  677. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1200351.js +2032 -0
  678. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1201933.js +40 -0
  679. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1203459.js +29 -0
  680. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1207276.js +36 -0
  681. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213516.js +40 -0
  682. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1213575.js +41 -0
  683. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1215653.js +365 -0
  684. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-124.js +57 -0
  685. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1254366.js +38 -0
  686. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1327557.js +36 -0
  687. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1341167.js +33 -0
  688. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1346700.js +29 -0
  689. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-137.js +46 -0
  690. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1439135.js +40 -0
  691. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-149.js +28 -0
  692. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1493017.js +52 -0
  693. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-155924.js +46 -0
  694. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-171.js +41 -0
  695. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-176.js +50 -0
  696. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-186.js +72 -0
  697. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-187.js +30 -0
  698. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-189.js +36 -0
  699. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-191.js +42 -0
  700. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-1919169.js +40 -0
  701. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-192.js +38 -0
  702. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-193.js +44 -0
  703. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-20070207.js +42 -0
  704. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-201.js +37 -0
  705. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-219.js +176 -0
  706. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-220.js +31 -0
  707. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-221.js +34 -0
  708. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-2249423.js +40 -0
  709. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-225.js +32 -0
  710. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-227.js +33 -0
  711. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-231.js +92 -0
  712. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-233.js +39 -0
  713. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-244.js +67 -0
  714. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-246.js +31 -0
  715. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-253.js +31 -0
  716. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-254.js +58 -0
  717. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-259.js +33 -0
  718. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-260.js +33 -0
  719. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-263.js +38 -0
  720. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-265.js +64 -0
  721. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-267.js +35 -0
  722. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-269.js +49 -0
  723. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-279.js +62 -0
  724. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-284.js +50 -0
  725. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-286.js +36 -0
  726. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-294.js +43 -0
  727. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-312.js +31 -0
  728. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-317.js +31 -0
  729. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-318.js +35 -0
  730. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-326.js +40 -0
  731. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-334.js +90 -0
  732. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-341.js +36 -0
  733. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-345.js +51 -0
  734. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-349.js +32 -0
  735. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-35.js +33 -0
  736. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-351.js +31 -0
  737. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-386.js +47 -0
  738. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-392.js +34 -0
  739. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-394.js +47 -0
  740. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-396.js +39 -0
  741. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-397.js +34 -0
  742. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-399.js +32 -0
  743. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-406.js +69 -0
  744. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-416.js +38 -0
  745. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-475.js +28 -0
  746. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-483.js +35 -0
  747. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-485.js +64 -0
  748. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-486.js +30 -0
  749. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-490.js +48 -0
  750. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-491.js +47 -0
  751. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-492.js +52 -0
  752. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-496.js +39 -0
  753. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-502.js +38 -0
  754. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-503.js +63 -0
  755. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-515.js +40 -0
  756. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-524.js +32 -0
  757. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-526.js +32 -0
  758. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-540.js +47 -0
  759. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-545.js +47 -0
  760. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-57.js +32 -0
  761. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-580.js +55 -0
  762. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-588599.js +31 -0
  763. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-6-9-regexp.js +30 -0
  764. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-662254.js +40 -0
  765. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-666721.js +53 -0
  766. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-667061.js +90 -0
  767. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-670147.js +34 -0
  768. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-674753.js +87 -0
  769. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-676025.js +31 -0
  770. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-678525.js +59 -0
  771. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-682649.js +30 -0
  772. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-69.js +43 -0
  773. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-734862.js +37 -0
  774. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-737588.js +34 -0
  775. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-74.js +41 -0
  776. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-780423.js +39 -0
  777. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-799761.js +92 -0
  778. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-806473.js +60 -0
  779. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-842017.js +60 -0
  780. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-86.js +46 -0
  781. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-87.js +58 -0
  782. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-874178.js +32 -0
  783. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-875031.js +37 -0
  784. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-877615.js +37 -0
  785. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-892742.js +50 -0
  786. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900055.js +42 -0
  787. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-900966.js +38 -0
  788. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-91.js +38 -0
  789. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-925537.js +42 -0
  790. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-937896.js +50 -0
  791. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-990205.js +35 -0
  792. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-992733.js +35 -0
  793. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-996542.js +40 -0
  794. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-998565.js +51 -0
  795. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-crbug-18639.js +34 -0
  796. data/ext/v8/upstream/2.0.6/test/mjsunit/regress/regress-r3391.js +77 -0
  797. data/ext/v8/upstream/2.0.6/test/mjsunit/scanner.js +30 -0
  798. data/ext/v8/upstream/2.0.6/test/mjsunit/short-circuit-boolean.js +46 -0
  799. data/ext/v8/upstream/2.0.6/test/mjsunit/simple-constructor.js +140 -0
  800. data/ext/v8/upstream/2.0.6/test/mjsunit/sin-cos.js +45 -0
  801. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-negative-zero.js +100 -0
  802. data/ext/v8/upstream/2.0.6/test/mjsunit/smi-ops.js +671 -0
  803. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array-reverse.js +131 -0
  804. data/ext/v8/upstream/2.0.6/test/mjsunit/sparse-array.js +41 -0
  805. data/ext/v8/upstream/2.0.6/test/mjsunit/stack-traces.js +204 -0
  806. data/ext/v8/upstream/2.0.6/test/mjsunit/str-to-num.js +158 -0
  807. data/ext/v8/upstream/2.0.6/test/mjsunit/stress-array-push.js +34 -0
  808. data/ext/v8/upstream/2.0.6/test/mjsunit/strict-equals.js +90 -0
  809. data/ext/v8/upstream/2.0.6/test/mjsunit/string-add.js +195 -0
  810. data/ext/v8/upstream/2.0.6/test/mjsunit/string-case.js +28 -0
  811. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charat.js +53 -0
  812. data/ext/v8/upstream/2.0.6/test/mjsunit/string-charcodeat.js +192 -0
  813. data/ext/v8/upstream/2.0.6/test/mjsunit/string-compare-alignment.js +47 -0
  814. data/ext/v8/upstream/2.0.6/test/mjsunit/string-flatten.js +37 -0
  815. data/ext/v8/upstream/2.0.6/test/mjsunit/string-index.js +154 -0
  816. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-1.js +99 -0
  817. data/ext/v8/upstream/2.0.6/test/mjsunit/string-indexof-2.js +68 -0
  818. data/ext/v8/upstream/2.0.6/test/mjsunit/string-lastindexof.js +88 -0
  819. data/ext/v8/upstream/2.0.6/test/mjsunit/string-localecompare.js +40 -0
  820. data/ext/v8/upstream/2.0.6/test/mjsunit/string-match.js +149 -0
  821. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace-gc.js +57 -0
  822. data/ext/v8/upstream/2.0.6/test/mjsunit/string-replace.js +182 -0
  823. data/ext/v8/upstream/2.0.6/test/mjsunit/string-search.js +30 -0
  824. data/ext/v8/upstream/2.0.6/test/mjsunit/string-split.js +126 -0
  825. data/ext/v8/upstream/2.0.6/test/mjsunit/substr.js +65 -0
  826. data/ext/v8/upstream/2.0.6/test/mjsunit/switch.js +289 -0
  827. data/ext/v8/upstream/2.0.6/test/mjsunit/testcfg.py +137 -0
  828. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-isarray.js +48 -0
  829. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/array-splice-webkit.js +62 -0
  830. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/object-keys.js +68 -0
  831. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/regexp-pcre.js +6603 -0
  832. data/ext/v8/upstream/2.0.6/test/mjsunit/third_party/string-trim.js +107 -0
  833. data/ext/v8/upstream/2.0.6/test/mjsunit/this-in-callbacks.js +47 -0
  834. data/ext/v8/upstream/2.0.6/test/mjsunit/this.js +46 -0
  835. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-and-catch-function.js +50 -0
  836. data/ext/v8/upstream/2.0.6/test/mjsunit/throw-exception-for-null-access.js +37 -0
  837. data/ext/v8/upstream/2.0.6/test/mjsunit/to-precision.js +82 -0
  838. data/ext/v8/upstream/2.0.6/test/mjsunit/to_number_order.js +129 -0
  839. data/ext/v8/upstream/2.0.6/test/mjsunit/tobool.js +36 -0
  840. data/ext/v8/upstream/2.0.6/test/mjsunit/toint32.js +129 -0
  841. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/codemap.js +180 -0
  842. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/consarray.js +60 -0
  843. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/csvparser.js +79 -0
  844. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/logreader.js +98 -0
  845. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile.js +348 -0
  846. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/profile_view.js +95 -0
  847. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/splaytree.js +166 -0
  848. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.default +55 -0
  849. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.gc-state +21 -0
  850. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.ignore-unknown +51 -0
  851. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor-test.separate-ic +61 -0
  852. data/ext/v8/upstream/2.0.6/test/mjsunit/tools/tickprocessor.js +409 -0
  853. data/ext/v8/upstream/2.0.6/test/mjsunit/top-level-assignments.js +107 -0
  854. data/ext/v8/upstream/2.0.6/test/mjsunit/touint32.js +72 -0
  855. data/ext/v8/upstream/2.0.6/test/mjsunit/transcendentals.js +49 -0
  856. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-extension-object.js +58 -0
  857. data/ext/v8/upstream/2.0.6/test/mjsunit/try-catch-scopes.js +42 -0
  858. data/ext/v8/upstream/2.0.6/test/mjsunit/try-finally-nested.js +46 -0
  859. data/ext/v8/upstream/2.0.6/test/mjsunit/try.js +394 -0
  860. data/ext/v8/upstream/2.0.6/test/mjsunit/typeof.js +40 -0
  861. data/ext/v8/upstream/2.0.6/test/mjsunit/undeletable-functions.js +181 -0
  862. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-case-overoptimization.js +35 -0
  863. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-string-to-number.js +46 -0
  864. data/ext/v8/upstream/2.0.6/test/mjsunit/unicode-test.js +9169 -0
  865. data/ext/v8/upstream/2.0.6/test/mjsunit/unusual-constructor.js +38 -0
  866. data/ext/v8/upstream/2.0.6/test/mjsunit/uri.js +78 -0
  867. data/ext/v8/upstream/2.0.6/test/mjsunit/value-callic-prototype-change.js +94 -0
  868. data/ext/v8/upstream/2.0.6/test/mjsunit/var.js +37 -0
  869. data/ext/v8/upstream/2.0.6/test/mjsunit/with-function-expression.js +36 -0
  870. data/ext/v8/upstream/2.0.6/test/mjsunit/with-leave.js +61 -0
  871. data/ext/v8/upstream/2.0.6/test/mjsunit/with-parameter-access.js +47 -0
  872. data/ext/v8/upstream/2.0.6/test/mjsunit/with-prototype.js +44 -0
  873. data/ext/v8/upstream/2.0.6/test/mjsunit/with-value.js +38 -0
  874. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla-shell-emulation.js +37 -0
  875. data/ext/v8/upstream/2.0.6/test/mozilla/mozilla.status +815 -0
  876. data/ext/v8/upstream/2.0.6/test/mozilla/testcfg.py +138 -0
  877. data/ext/v8/upstream/2.0.6/test/sputnik/README +6 -0
  878. data/ext/v8/upstream/2.0.6/test/sputnik/sputnik.status +318 -0
  879. data/ext/v8/upstream/2.0.6/test/sputnik/testcfg.py +112 -0
  880. data/ext/v8/upstream/2.0.6/tools/codemap.js +258 -0
  881. data/ext/v8/upstream/2.0.6/tools/consarray.js +93 -0
  882. data/ext/v8/upstream/2.0.6/tools/csvparser.js +98 -0
  883. data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +620 -0
  884. data/ext/v8/upstream/2.0.6/tools/js2c.py +376 -0
  885. data/ext/v8/upstream/2.0.6/tools/js2c.pyc +0 -0
  886. data/ext/v8/upstream/2.0.6/tools/jsmin.py +280 -0
  887. data/ext/v8/upstream/2.0.6/tools/jsmin.pyc +0 -0
  888. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +24 -0
  889. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +78 -0
  890. data/ext/v8/upstream/2.0.6/tools/logreader.js +320 -0
  891. data/ext/v8/upstream/2.0.6/tools/mac-nm +18 -0
  892. data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +6 -0
  893. data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +7 -0
  894. data/ext/v8/upstream/2.0.6/tools/oprofile/common +19 -0
  895. data/ext/v8/upstream/2.0.6/tools/oprofile/dump +7 -0
  896. data/ext/v8/upstream/2.0.6/tools/oprofile/report +7 -0
  897. data/ext/v8/upstream/2.0.6/tools/oprofile/reset +7 -0
  898. data/ext/v8/upstream/2.0.6/tools/oprofile/run +14 -0
  899. data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +7 -0
  900. data/ext/v8/upstream/2.0.6/tools/oprofile/start +7 -0
  901. data/ext/v8/upstream/2.0.6/tools/presubmit.py +299 -0
  902. data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +120 -0
  903. data/ext/v8/upstream/2.0.6/tools/profile.js +621 -0
  904. data/ext/v8/upstream/2.0.6/tools/profile_view.js +224 -0
  905. data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +77 -0
  906. data/ext/v8/upstream/2.0.6/tools/splaytree.js +322 -0
  907. data/ext/v8/upstream/2.0.6/tools/splaytree.py +226 -0
  908. data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +456 -0
  909. data/ext/v8/upstream/2.0.6/tools/test.py +1370 -0
  910. data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +53 -0
  911. data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +731 -0
  912. data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +535 -0
  913. data/ext/v8/upstream/2.0.6/tools/utils.py +82 -0
  914. data/ext/v8/upstream/2.0.6/tools/utils.pyc +0 -0
  915. data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +71 -0
  916. data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +14 -0
  917. data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +35 -0
  918. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +199 -0
  919. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +199 -0
  920. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +201 -0
  921. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +6 -0
  922. data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +17 -0
  923. data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +13 -0
  924. data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +6 -0
  925. data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +24 -0
  926. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +101 -0
  927. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +223 -0
  928. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +74 -0
  929. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +223 -0
  930. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +971 -0
  931. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +983 -0
  932. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +959 -0
  933. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +255 -0
  934. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +243 -0
  935. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +257 -0
  936. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +151 -0
  937. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +151 -0
  938. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +151 -0
  939. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +151 -0
  940. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +151 -0
  941. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +151 -0
  942. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +151 -0
  943. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +153 -0
  944. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +142 -0
  945. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +92 -0
  946. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +92 -0
  947. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +142 -0
  948. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +101 -0
  949. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +223 -0
  950. data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +13 -0
  951. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +5 -0
  952. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +137 -0
  953. data/ext/v8/upstream/scons/CHANGES.txt +5183 -0
  954. data/ext/v8/upstream/scons/LICENSE.txt +20 -0
  955. data/ext/v8/upstream/scons/MANIFEST +202 -0
  956. data/ext/v8/upstream/scons/PKG-INFO +13 -0
  957. data/ext/v8/upstream/scons/README.txt +273 -0
  958. data/ext/v8/upstream/scons/RELEASE.txt +1040 -0
  959. data/ext/v8/upstream/scons/engine/SCons/Action.py +1256 -0
  960. data/ext/v8/upstream/scons/engine/SCons/Builder.py +868 -0
  961. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +217 -0
  962. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +794 -0
  963. data/ext/v8/upstream/scons/engine/SCons/Debug.py +237 -0
  964. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +485 -0
  965. data/ext/v8/upstream/scons/engine/SCons/Environment.py +2327 -0
  966. data/ext/v8/upstream/scons/engine/SCons/Errors.py +207 -0
  967. data/ext/v8/upstream/scons/engine/SCons/Executor.py +636 -0
  968. data/ext/v8/upstream/scons/engine/SCons/Job.py +435 -0
  969. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +292 -0
  970. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +153 -0
  971. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +3220 -0
  972. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +128 -0
  973. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +1341 -0
  974. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +50 -0
  975. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +50 -0
  976. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +50 -0
  977. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +50 -0
  978. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +76 -0
  979. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +74 -0
  980. data/ext/v8/upstream/scons/engine/SCons/PathList.py +232 -0
  981. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +236 -0
  982. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +70 -0
  983. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +55 -0
  984. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +46 -0
  985. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +46 -0
  986. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +44 -0
  987. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +58 -0
  988. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +264 -0
  989. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +50 -0
  990. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +386 -0
  991. data/ext/v8/upstream/scons/engine/SCons/SConf.py +1038 -0
  992. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +381 -0
  993. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +132 -0
  994. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +74 -0
  995. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +111 -0
  996. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +320 -0
  997. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +48 -0
  998. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +378 -0
  999. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +103 -0
  1000. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +55 -0
  1001. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +415 -0
  1002. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +386 -0
  1003. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +1360 -0
  1004. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +944 -0
  1005. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +642 -0
  1006. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +414 -0
  1007. data/ext/v8/upstream/scons/engine/SCons/Sig.py +63 -0
  1008. data/ext/v8/upstream/scons/engine/SCons/Subst.py +911 -0
  1009. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +1030 -0
  1010. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +61 -0
  1011. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +65 -0
  1012. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +73 -0
  1013. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +247 -0
  1014. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +324 -0
  1015. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  1016. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  1017. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +210 -0
  1018. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +84 -0
  1019. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +321 -0
  1020. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +367 -0
  1021. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +497 -0
  1022. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +104 -0
  1023. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +138 -0
  1024. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +64 -0
  1025. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +64 -0
  1026. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +71 -0
  1027. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +675 -0
  1028. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +82 -0
  1029. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +74 -0
  1030. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +80 -0
  1031. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +76 -0
  1032. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +71 -0
  1033. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +63 -0
  1034. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +78 -0
  1035. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +82 -0
  1036. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +99 -0
  1037. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +114 -0
  1038. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +58 -0
  1039. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +50 -0
  1040. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +224 -0
  1041. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +64 -0
  1042. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +125 -0
  1043. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +94 -0
  1044. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +62 -0
  1045. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +62 -0
  1046. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +63 -0
  1047. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +98 -0
  1048. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +63 -0
  1049. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +90 -0
  1050. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +73 -0
  1051. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +53 -0
  1052. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +80 -0
  1053. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +64 -0
  1054. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +63 -0
  1055. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +81 -0
  1056. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +85 -0
  1057. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +53 -0
  1058. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +77 -0
  1059. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +59 -0
  1060. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +52 -0
  1061. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +72 -0
  1062. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +90 -0
  1063. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +59 -0
  1064. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +60 -0
  1065. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +229 -0
  1066. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +490 -0
  1067. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +71 -0
  1068. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +110 -0
  1069. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +234 -0
  1070. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +138 -0
  1071. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +79 -0
  1072. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +99 -0
  1073. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +121 -0
  1074. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +112 -0
  1075. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +63 -0
  1076. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +77 -0
  1077. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +90 -0
  1078. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +159 -0
  1079. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +64 -0
  1080. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +266 -0
  1081. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +50 -0
  1082. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +269 -0
  1083. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +1439 -0
  1084. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +208 -0
  1085. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +107 -0
  1086. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +72 -0
  1087. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +314 -0
  1088. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  1089. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +526 -0
  1090. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +367 -0
  1091. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  1092. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  1093. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  1094. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  1095. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  1096. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  1097. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +78 -0
  1098. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +83 -0
  1099. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +108 -0
  1100. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +336 -0
  1101. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +121 -0
  1102. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +70 -0
  1103. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +132 -0
  1104. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +68 -0
  1105. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +58 -0
  1106. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +53 -0
  1107. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +63 -0
  1108. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +67 -0
  1109. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +142 -0
  1110. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +58 -0
  1111. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +63 -0
  1112. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +64 -0
  1113. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +64 -0
  1114. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +77 -0
  1115. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +186 -0
  1116. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +73 -0
  1117. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +805 -0
  1118. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +175 -0
  1119. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +53 -0
  1120. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +100 -0
  1121. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +131 -0
  1122. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +100 -0
  1123. data/ext/v8/upstream/scons/engine/SCons/Util.py +1645 -0
  1124. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +91 -0
  1125. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +107 -0
  1126. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +139 -0
  1127. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +109 -0
  1128. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +147 -0
  1129. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +317 -0
  1130. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +228 -0
  1131. data/ext/v8/upstream/scons/engine/SCons/__init__.py +49 -0
  1132. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +302 -0
  1133. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +98 -0
  1134. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +91 -0
  1135. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +124 -0
  1136. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +1725 -0
  1137. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +583 -0
  1138. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +176 -0
  1139. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +325 -0
  1140. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +1296 -0
  1141. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +382 -0
  1142. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +187 -0
  1143. data/ext/v8/upstream/scons/engine/SCons/cpp.py +598 -0
  1144. data/ext/v8/upstream/scons/engine/SCons/dblite.py +248 -0
  1145. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +77 -0
  1146. data/ext/v8/upstream/scons/os_spawnv_fix.diff +83 -0
  1147. data/ext/v8/upstream/scons/scons-time.1 +1017 -0
  1148. data/ext/v8/upstream/scons/scons.1 +15179 -0
  1149. data/ext/v8/upstream/scons/sconsign.1 +208 -0
  1150. data/ext/v8/upstream/scons/script/scons +184 -0
  1151. data/ext/v8/upstream/scons/script/scons-time +1529 -0
  1152. data/ext/v8/upstream/scons/script/scons.bat +31 -0
  1153. data/ext/v8/upstream/scons/script/sconsign +508 -0
  1154. data/ext/v8/upstream/scons/setup.cfg +6 -0
  1155. data/ext/v8/upstream/scons/setup.py +427 -0
  1156. data/ext/v8/v8.cpp +81 -0
  1157. data/ext/v8/v8_cxt.cpp +92 -0
  1158. data/ext/v8/v8_cxt.h +20 -0
  1159. data/ext/v8/v8_func.cpp +10 -0
  1160. data/ext/v8/v8_func.h +11 -0
  1161. data/ext/v8/v8_msg.cpp +17 -0
  1162. data/ext/v8/v8_msg.h +10 -0
  1163. data/ext/v8/v8_obj.cpp +52 -0
  1164. data/ext/v8/v8_obj.h +13 -0
  1165. data/ext/v8/v8_ref.cpp +26 -0
  1166. data/ext/v8/v8_ref.h +31 -0
  1167. data/ext/v8/v8_script.cpp +20 -0
  1168. data/ext/v8/v8_script.h +8 -0
  1169. data/ext/v8/v8_standalone.cpp +69 -0
  1170. data/ext/v8/v8_standalone.h +31 -0
  1171. data/ext/v8/v8_str.cpp +17 -0
  1172. data/ext/v8/v8_str.h +9 -0
  1173. data/ext/v8/v8_template.cpp +53 -0
  1174. data/ext/v8/v8_template.h +13 -0
  1175. data/lib/v8.rb +10 -0
  1176. data/lib/v8/context.rb +87 -0
  1177. data/lib/v8/object.rb +38 -0
  1178. data/lib/v8/to.rb +33 -0
  1179. data/lib/v8/v8.bundle +0 -0
  1180. data/script/console +10 -0
  1181. data/script/destroy +14 -0
  1182. data/script/generate +14 -0
  1183. data/spec/ext/cxt_spec.rb +25 -0
  1184. data/spec/ext/obj_spec.rb +13 -0
  1185. data/spec/redjs/README.txt +8 -0
  1186. data/spec/redjs/jsapi_spec.rb +394 -0
  1187. data/spec/redjs/tap.rb +8 -0
  1188. data/spec/redjs_helper.rb +3 -0
  1189. data/spec/spec.opts +1 -0
  1190. data/spec/spec_helper.rb +14 -0
  1191. data/spec/v8/to_spec.rb +15 -0
  1192. data/tasks/rspec.rake +21 -0
  1193. data/therubyracer.gemspec +34 -0
  1194. metadata +1269 -0
@@ -0,0 +1,2327 @@
1
+ """SCons.Environment
2
+
3
+ Base class for construction Environments. These are
4
+ the primary objects used to communicate dependency and
5
+ construction information to the build engine.
6
+
7
+ Keyword arguments supplied when the construction Environment
8
+ is created are construction variables used to initialize the
9
+ Environment
10
+ """
11
+
12
+ #
13
+ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
14
+ #
15
+ # Permission is hereby granted, free of charge, to any person obtaining
16
+ # a copy of this software and associated documentation files (the
17
+ # "Software"), to deal in the Software without restriction, including
18
+ # without limitation the rights to use, copy, modify, merge, publish,
19
+ # distribute, sublicense, and/or sell copies of the Software, and to
20
+ # permit persons to whom the Software is furnished to do so, subject to
21
+ # the following conditions:
22
+ #
23
+ # The above copyright notice and this permission notice shall be included
24
+ # in all copies or substantial portions of the Software.
25
+ #
26
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
27
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
28
+ # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
+ #
34
+
35
+ __revision__ = "src/engine/SCons/Environment.py 4629 2010/01/17 22:23:21 scons"
36
+
37
+
38
+ import copy
39
+ import os
40
+ import sys
41
+ import re
42
+ import shlex
43
+ import string
44
+ from UserDict import UserDict
45
+
46
+ import SCons.Action
47
+ import SCons.Builder
48
+ from SCons.Debug import logInstanceCreation
49
+ import SCons.Defaults
50
+ import SCons.Errors
51
+ import SCons.Memoize
52
+ import SCons.Node
53
+ import SCons.Node.Alias
54
+ import SCons.Node.FS
55
+ import SCons.Node.Python
56
+ import SCons.Platform
57
+ import SCons.SConf
58
+ import SCons.SConsign
59
+ import SCons.Subst
60
+ import SCons.Tool
61
+ import SCons.Util
62
+ import SCons.Warnings
63
+
64
+ class _Null:
65
+ pass
66
+
67
+ _null = _Null
68
+
69
+ _warn_copy_deprecated = True
70
+ _warn_source_signatures_deprecated = True
71
+ _warn_target_signatures_deprecated = True
72
+
73
+ CleanTargets = {}
74
+ CalculatorArgs = {}
75
+
76
+ semi_deepcopy = SCons.Util.semi_deepcopy
77
+
78
+ # Pull UserError into the global name space for the benefit of
79
+ # Environment().SourceSignatures(), which has some import statements
80
+ # which seem to mess up its ability to reference SCons directly.
81
+ UserError = SCons.Errors.UserError
82
+
83
+ def alias_builder(env, target, source):
84
+ pass
85
+
86
+ AliasBuilder = SCons.Builder.Builder(action = alias_builder,
87
+ target_factory = SCons.Node.Alias.default_ans.Alias,
88
+ source_factory = SCons.Node.FS.Entry,
89
+ multi = 1,
90
+ is_explicit = None,
91
+ name='AliasBuilder')
92
+
93
+ def apply_tools(env, tools, toolpath):
94
+ # Store the toolpath in the Environment.
95
+ if toolpath is not None:
96
+ env['toolpath'] = toolpath
97
+
98
+ if not tools:
99
+ return
100
+ # Filter out null tools from the list.
101
+ for tool in filter(None, tools):
102
+ if SCons.Util.is_List(tool) or type(tool)==type(()):
103
+ toolname = tool[0]
104
+ toolargs = tool[1] # should be a dict of kw args
105
+ tool = apply(env.Tool, [toolname], toolargs)
106
+ else:
107
+ env.Tool(tool)
108
+
109
+ # These names are (or will be) controlled by SCons; users should never
110
+ # set or override them. This warning can optionally be turned off,
111
+ # but scons will still ignore the illegal variable names even if it's off.
112
+ reserved_construction_var_names = [
113
+ 'CHANGED_SOURCES',
114
+ 'CHANGED_TARGETS',
115
+ 'SOURCE',
116
+ 'SOURCES',
117
+ 'TARGET',
118
+ 'TARGETS',
119
+ 'UNCHANGED_SOURCES',
120
+ 'UNCHANGED_TARGETS',
121
+ ]
122
+
123
+ future_reserved_construction_var_names = [
124
+ #'HOST_OS',
125
+ #'HOST_ARCH',
126
+ #'HOST_CPU',
127
+ ]
128
+
129
+ def copy_non_reserved_keywords(dict):
130
+ result = semi_deepcopy(dict)
131
+ for k in result.keys():
132
+ if k in reserved_construction_var_names:
133
+ msg = "Ignoring attempt to set reserved variable `$%s'"
134
+ SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning, msg % k)
135
+ del result[k]
136
+ return result
137
+
138
+ def _set_reserved(env, key, value):
139
+ msg = "Ignoring attempt to set reserved variable `$%s'"
140
+ SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning, msg % key)
141
+
142
+ def _set_future_reserved(env, key, value):
143
+ env._dict[key] = value
144
+ msg = "`$%s' will be reserved in a future release and setting it will become ignored"
145
+ SCons.Warnings.warn(SCons.Warnings.FutureReservedVariableWarning, msg % key)
146
+
147
+ def _set_BUILDERS(env, key, value):
148
+ try:
149
+ bd = env._dict[key]
150
+ for k in bd.keys():
151
+ del bd[k]
152
+ except KeyError:
153
+ bd = BuilderDict(kwbd, env)
154
+ env._dict[key] = bd
155
+ bd.update(value)
156
+
157
+ def _del_SCANNERS(env, key):
158
+ del env._dict[key]
159
+ env.scanner_map_delete()
160
+
161
+ def _set_SCANNERS(env, key, value):
162
+ env._dict[key] = value
163
+ env.scanner_map_delete()
164
+
165
+ def _delete_duplicates(l, keep_last):
166
+ """Delete duplicates from a sequence, keeping the first or last."""
167
+ seen={}
168
+ result=[]
169
+ if keep_last: # reverse in & out, then keep first
170
+ l.reverse()
171
+ for i in l:
172
+ try:
173
+ if not seen.has_key(i):
174
+ result.append(i)
175
+ seen[i]=1
176
+ except TypeError:
177
+ # probably unhashable. Just keep it.
178
+ result.append(i)
179
+ if keep_last:
180
+ result.reverse()
181
+ return result
182
+
183
+
184
+
185
+ # The following is partly based on code in a comment added by Peter
186
+ # Shannon at the following page (there called the "transplant" class):
187
+ #
188
+ # ASPN : Python Cookbook : Dynamically added methods to a class
189
+ # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81732
190
+ #
191
+ # We had independently been using the idiom as BuilderWrapper, but
192
+ # factoring out the common parts into this base class, and making
193
+ # BuilderWrapper a subclass that overrides __call__() to enforce specific
194
+ # Builder calling conventions, simplified some of our higher-layer code.
195
+
196
+ class MethodWrapper:
197
+ """
198
+ A generic Wrapper class that associates a method (which can
199
+ actually be any callable) with an object. As part of creating this
200
+ MethodWrapper object an attribute with the specified (by default,
201
+ the name of the supplied method) is added to the underlying object.
202
+ When that new "method" is called, our __call__() method adds the
203
+ object as the first argument, simulating the Python behavior of
204
+ supplying "self" on method calls.
205
+
206
+ We hang on to the name by which the method was added to the underlying
207
+ base class so that we can provide a method to "clone" ourselves onto
208
+ a new underlying object being copied (without which we wouldn't need
209
+ to save that info).
210
+ """
211
+ def __init__(self, object, method, name=None):
212
+ if name is None:
213
+ name = method.__name__
214
+ self.object = object
215
+ self.method = method
216
+ self.name = name
217
+ setattr(self.object, name, self)
218
+
219
+ def __call__(self, *args, **kwargs):
220
+ nargs = (self.object,) + args
221
+ return apply(self.method, nargs, kwargs)
222
+
223
+ def clone(self, new_object):
224
+ """
225
+ Returns an object that re-binds the underlying "method" to
226
+ the specified new object.
227
+ """
228
+ return self.__class__(new_object, self.method, self.name)
229
+
230
+ class BuilderWrapper(MethodWrapper):
231
+ """
232
+ A MethodWrapper subclass that that associates an environment with
233
+ a Builder.
234
+
235
+ This mainly exists to wrap the __call__() function so that all calls
236
+ to Builders can have their argument lists massaged in the same way
237
+ (treat a lone argument as the source, treat two arguments as target
238
+ then source, make sure both target and source are lists) without
239
+ having to have cut-and-paste code to do it.
240
+
241
+ As a bit of obsessive backwards compatibility, we also intercept
242
+ attempts to get or set the "env" or "builder" attributes, which were
243
+ the names we used before we put the common functionality into the
244
+ MethodWrapper base class. We'll keep this around for a while in case
245
+ people shipped Tool modules that reached into the wrapper (like the
246
+ Tool/qt.py module does, or did). There shouldn't be a lot attribute
247
+ fetching or setting on these, so a little extra work shouldn't hurt.
248
+ """
249
+ def __call__(self, target=None, source=_null, *args, **kw):
250
+ if source is _null:
251
+ source = target
252
+ target = None
253
+ if target is not None and not SCons.Util.is_List(target):
254
+ target = [target]
255
+ if source is not None and not SCons.Util.is_List(source):
256
+ source = [source]
257
+ return apply(MethodWrapper.__call__, (self, target, source) + args, kw)
258
+
259
+ def __repr__(self):
260
+ return '<BuilderWrapper %s>' % repr(self.name)
261
+
262
+ def __str__(self):
263
+ return self.__repr__()
264
+
265
+ def __getattr__(self, name):
266
+ if name == 'env':
267
+ return self.object
268
+ elif name == 'builder':
269
+ return self.method
270
+ else:
271
+ raise AttributeError, name
272
+
273
+ def __setattr__(self, name, value):
274
+ if name == 'env':
275
+ self.object = value
276
+ elif name == 'builder':
277
+ self.method = value
278
+ else:
279
+ self.__dict__[name] = value
280
+
281
+ # This allows a Builder to be executed directly
282
+ # through the Environment to which it's attached.
283
+ # In practice, we shouldn't need this, because
284
+ # builders actually get executed through a Node.
285
+ # But we do have a unit test for this, and can't
286
+ # yet rule out that it would be useful in the
287
+ # future, so leave it for now.
288
+ #def execute(self, **kw):
289
+ # kw['env'] = self.env
290
+ # apply(self.builder.execute, (), kw)
291
+
292
+ class BuilderDict(UserDict):
293
+ """This is a dictionary-like class used by an Environment to hold
294
+ the Builders. We need to do this because every time someone changes
295
+ the Builders in the Environment's BUILDERS dictionary, we must
296
+ update the Environment's attributes."""
297
+ def __init__(self, dict, env):
298
+ # Set self.env before calling the superclass initialization,
299
+ # because it will end up calling our other methods, which will
300
+ # need to point the values in this dictionary to self.env.
301
+ self.env = env
302
+ UserDict.__init__(self, dict)
303
+
304
+ def __semi_deepcopy__(self):
305
+ return self.__class__(self.data, self.env)
306
+
307
+ def __setitem__(self, item, val):
308
+ try:
309
+ method = getattr(self.env, item).method
310
+ except AttributeError:
311
+ pass
312
+ else:
313
+ self.env.RemoveMethod(method)
314
+ UserDict.__setitem__(self, item, val)
315
+ BuilderWrapper(self.env, val, item)
316
+
317
+ def __delitem__(self, item):
318
+ UserDict.__delitem__(self, item)
319
+ delattr(self.env, item)
320
+
321
+ def update(self, dict):
322
+ for i, v in dict.items():
323
+ self.__setitem__(i, v)
324
+
325
+
326
+
327
+ _is_valid_var = re.compile(r'[_a-zA-Z]\w*$')
328
+
329
+ def is_valid_construction_var(varstr):
330
+ """Return if the specified string is a legitimate construction
331
+ variable.
332
+ """
333
+ return _is_valid_var.match(varstr)
334
+
335
+
336
+
337
+ class SubstitutionEnvironment:
338
+ """Base class for different flavors of construction environments.
339
+
340
+ This class contains a minimal set of methods that handle contruction
341
+ variable expansion and conversion of strings to Nodes, which may or
342
+ may not be actually useful as a stand-alone class. Which methods
343
+ ended up in this class is pretty arbitrary right now. They're
344
+ basically the ones which we've empirically determined are common to
345
+ the different construction environment subclasses, and most of the
346
+ others that use or touch the underlying dictionary of construction
347
+ variables.
348
+
349
+ Eventually, this class should contain all the methods that we
350
+ determine are necessary for a "minimal" interface to the build engine.
351
+ A full "native Python" SCons environment has gotten pretty heavyweight
352
+ with all of the methods and Tools and construction variables we've
353
+ jammed in there, so it would be nice to have a lighter weight
354
+ alternative for interfaces that don't need all of the bells and
355
+ whistles. (At some point, we'll also probably rename this class
356
+ "Base," since that more reflects what we want this class to become,
357
+ but because we've released comments that tell people to subclass
358
+ Environment.Base to create their own flavors of construction
359
+ environment, we'll save that for a future refactoring when this
360
+ class actually becomes useful.)
361
+ """
362
+
363
+ if SCons.Memoize.use_memoizer:
364
+ __metaclass__ = SCons.Memoize.Memoized_Metaclass
365
+
366
+ def __init__(self, **kw):
367
+ """Initialization of an underlying SubstitutionEnvironment class.
368
+ """
369
+ if __debug__: logInstanceCreation(self, 'Environment.SubstitutionEnvironment')
370
+ self.fs = SCons.Node.FS.get_default_fs()
371
+ self.ans = SCons.Node.Alias.default_ans
372
+ self.lookup_list = SCons.Node.arg2nodes_lookups
373
+ self._dict = kw.copy()
374
+ self._init_special()
375
+ self.added_methods = []
376
+ #self._memo = {}
377
+
378
+ def _init_special(self):
379
+ """Initial the dispatch tables for special handling of
380
+ special construction variables."""
381
+ self._special_del = {}
382
+ self._special_del['SCANNERS'] = _del_SCANNERS
383
+
384
+ self._special_set = {}
385
+ for key in reserved_construction_var_names:
386
+ self._special_set[key] = _set_reserved
387
+ for key in future_reserved_construction_var_names:
388
+ self._special_set[key] = _set_future_reserved
389
+ self._special_set['BUILDERS'] = _set_BUILDERS
390
+ self._special_set['SCANNERS'] = _set_SCANNERS
391
+
392
+ # Freeze the keys of self._special_set in a list for use by
393
+ # methods that need to check. (Empirically, list scanning has
394
+ # gotten better than dict.has_key() in Python 2.5.)
395
+ self._special_set_keys = self._special_set.keys()
396
+
397
+ def __cmp__(self, other):
398
+ return cmp(self._dict, other._dict)
399
+
400
+ def __delitem__(self, key):
401
+ special = self._special_del.get(key)
402
+ if special:
403
+ special(self, key)
404
+ else:
405
+ del self._dict[key]
406
+
407
+ def __getitem__(self, key):
408
+ return self._dict[key]
409
+
410
+ def __setitem__(self, key, value):
411
+ # This is heavily used. This implementation is the best we have
412
+ # according to the timings in bench/env.__setitem__.py.
413
+ #
414
+ # The "key in self._special_set_keys" test here seems to perform
415
+ # pretty well for the number of keys we have. A hard-coded
416
+ # list works a little better in Python 2.5, but that has the
417
+ # disadvantage of maybe getting out of sync if we ever add more
418
+ # variable names. Using self._special_set.has_key() works a
419
+ # little better in Python 2.4, but is worse then this test.
420
+ # So right now it seems like a good trade-off, but feel free to
421
+ # revisit this with bench/env.__setitem__.py as needed (and
422
+ # as newer versions of Python come out).
423
+ if key in self._special_set_keys:
424
+ self._special_set[key](self, key, value)
425
+ else:
426
+ # If we already have the entry, then it's obviously a valid
427
+ # key and we don't need to check. If we do check, using a
428
+ # global, pre-compiled regular expression directly is more
429
+ # efficient than calling another function or a method.
430
+ if not self._dict.has_key(key) \
431
+ and not _is_valid_var.match(key):
432
+ raise SCons.Errors.UserError, "Illegal construction variable `%s'" % key
433
+ self._dict[key] = value
434
+
435
+ def get(self, key, default=None):
436
+ """Emulates the get() method of dictionaries."""
437
+ return self._dict.get(key, default)
438
+
439
+ def has_key(self, key):
440
+ return self._dict.has_key(key)
441
+
442
+ def __contains__(self, key):
443
+ return self._dict.__contains__(key)
444
+
445
+ def items(self):
446
+ return self._dict.items()
447
+
448
+ def arg2nodes(self, args, node_factory=_null, lookup_list=_null, **kw):
449
+ if node_factory is _null:
450
+ node_factory = self.fs.File
451
+ if lookup_list is _null:
452
+ lookup_list = self.lookup_list
453
+
454
+ if not args:
455
+ return []
456
+
457
+ args = SCons.Util.flatten(args)
458
+
459
+ nodes = []
460
+ for v in args:
461
+ if SCons.Util.is_String(v):
462
+ n = None
463
+ for l in lookup_list:
464
+ n = l(v)
465
+ if n is not None:
466
+ break
467
+ if n is not None:
468
+ if SCons.Util.is_String(n):
469
+ # n = self.subst(n, raw=1, **kw)
470
+ kw['raw'] = 1
471
+ n = apply(self.subst, (n,), kw)
472
+ if node_factory:
473
+ n = node_factory(n)
474
+ if SCons.Util.is_List(n):
475
+ nodes.extend(n)
476
+ else:
477
+ nodes.append(n)
478
+ elif node_factory:
479
+ # v = node_factory(self.subst(v, raw=1, **kw))
480
+ kw['raw'] = 1
481
+ v = node_factory(apply(self.subst, (v,), kw))
482
+ if SCons.Util.is_List(v):
483
+ nodes.extend(v)
484
+ else:
485
+ nodes.append(v)
486
+ else:
487
+ nodes.append(v)
488
+
489
+ return nodes
490
+
491
+ def gvars(self):
492
+ return self._dict
493
+
494
+ def lvars(self):
495
+ return {}
496
+
497
+ def subst(self, string, raw=0, target=None, source=None, conv=None, executor=None):
498
+ """Recursively interpolates construction variables from the
499
+ Environment into the specified string, returning the expanded
500
+ result. Construction variables are specified by a $ prefix
501
+ in the string and begin with an initial underscore or
502
+ alphabetic character followed by any number of underscores
503
+ or alphanumeric characters. The construction variable names
504
+ may be surrounded by curly braces to separate the name from
505
+ trailing characters.
506
+ """
507
+ gvars = self.gvars()
508
+ lvars = self.lvars()
509
+ lvars['__env__'] = self
510
+ if executor:
511
+ lvars.update(executor.get_lvars())
512
+ return SCons.Subst.scons_subst(string, self, raw, target, source, gvars, lvars, conv)
513
+
514
+ def subst_kw(self, kw, raw=0, target=None, source=None):
515
+ nkw = {}
516
+ for k, v in kw.items():
517
+ k = self.subst(k, raw, target, source)
518
+ if SCons.Util.is_String(v):
519
+ v = self.subst(v, raw, target, source)
520
+ nkw[k] = v
521
+ return nkw
522
+
523
+ def subst_list(self, string, raw=0, target=None, source=None, conv=None, executor=None):
524
+ """Calls through to SCons.Subst.scons_subst_list(). See
525
+ the documentation for that function."""
526
+ gvars = self.gvars()
527
+ lvars = self.lvars()
528
+ lvars['__env__'] = self
529
+ if executor:
530
+ lvars.update(executor.get_lvars())
531
+ return SCons.Subst.scons_subst_list(string, self, raw, target, source, gvars, lvars, conv)
532
+
533
+ def subst_path(self, path, target=None, source=None):
534
+ """Substitute a path list, turning EntryProxies into Nodes
535
+ and leaving Nodes (and other objects) as-is."""
536
+
537
+ if not SCons.Util.is_List(path):
538
+ path = [path]
539
+
540
+ def s(obj):
541
+ """This is the "string conversion" routine that we have our
542
+ substitutions use to return Nodes, not strings. This relies
543
+ on the fact that an EntryProxy object has a get() method that
544
+ returns the underlying Node that it wraps, which is a bit of
545
+ architectural dependence that we might need to break or modify
546
+ in the future in response to additional requirements."""
547
+ try:
548
+ get = obj.get
549
+ except AttributeError:
550
+ obj = SCons.Util.to_String_for_subst(obj)
551
+ else:
552
+ obj = get()
553
+ return obj
554
+
555
+ r = []
556
+ for p in path:
557
+ if SCons.Util.is_String(p):
558
+ p = self.subst(p, target=target, source=source, conv=s)
559
+ if SCons.Util.is_List(p):
560
+ if len(p) == 1:
561
+ p = p[0]
562
+ else:
563
+ # We have an object plus a string, or multiple
564
+ # objects that we need to smush together. No choice
565
+ # but to make them into a string.
566
+ p = string.join(map(SCons.Util.to_String_for_subst, p), '')
567
+ else:
568
+ p = s(p)
569
+ r.append(p)
570
+ return r
571
+
572
+ subst_target_source = subst
573
+
574
+ def backtick(self, command):
575
+ import subprocess
576
+ # common arguments
577
+ kw = { 'stdin' : 'devnull',
578
+ 'stdout' : subprocess.PIPE,
579
+ 'stderr' : subprocess.PIPE,
580
+ 'universal_newlines' : True,
581
+ }
582
+ # if the command is a list, assume it's been quoted
583
+ # othewise force a shell
584
+ if not SCons.Util.is_List(command): kw['shell'] = True
585
+ # run constructed command
586
+ #TODO(1.5) p = SCons.Action._subproc(self, command, **kw)
587
+ p = apply(SCons.Action._subproc, (self, command), kw)
588
+ out,err = p.communicate()
589
+ status = p.wait()
590
+ if err:
591
+ sys.stderr.write(err)
592
+ if status:
593
+ raise OSError("'%s' exited %d" % (command, status))
594
+ return out
595
+
596
+ def AddMethod(self, function, name=None):
597
+ """
598
+ Adds the specified function as a method of this construction
599
+ environment with the specified name. If the name is omitted,
600
+ the default name is the name of the function itself.
601
+ """
602
+ method = MethodWrapper(self, function, name)
603
+ self.added_methods.append(method)
604
+
605
+ def RemoveMethod(self, function):
606
+ """
607
+ Removes the specified function's MethodWrapper from the
608
+ added_methods list, so we don't re-bind it when making a clone.
609
+ """
610
+ is_not_func = lambda dm, f=function: not dm.method is f
611
+ self.added_methods = filter(is_not_func, self.added_methods)
612
+
613
+ def Override(self, overrides):
614
+ """
615
+ Produce a modified environment whose variables are overriden by
616
+ the overrides dictionaries. "overrides" is a dictionary that
617
+ will override the variables of this environment.
618
+
619
+ This function is much more efficient than Clone() or creating
620
+ a new Environment because it doesn't copy the construction
621
+ environment dictionary, it just wraps the underlying construction
622
+ environment, and doesn't even create a wrapper object if there
623
+ are no overrides.
624
+ """
625
+ if not overrides: return self
626
+ o = copy_non_reserved_keywords(overrides)
627
+ if not o: return self
628
+ overrides = {}
629
+ merges = None
630
+ for key, value in o.items():
631
+ if key == 'parse_flags':
632
+ merges = value
633
+ else:
634
+ overrides[key] = SCons.Subst.scons_subst_once(value, self, key)
635
+ env = OverrideEnvironment(self, overrides)
636
+ if merges: env.MergeFlags(merges)
637
+ return env
638
+
639
+ def ParseFlags(self, *flags):
640
+ """
641
+ Parse the set of flags and return a dict with the flags placed
642
+ in the appropriate entry. The flags are treated as a typical
643
+ set of command-line flags for a GNU-like toolchain and used to
644
+ populate the entries in the dict immediately below. If one of
645
+ the flag strings begins with a bang (exclamation mark), it is
646
+ assumed to be a command and the rest of the string is executed;
647
+ the result of that evaluation is then added to the dict.
648
+ """
649
+ dict = {
650
+ 'ASFLAGS' : SCons.Util.CLVar(''),
651
+ 'CFLAGS' : SCons.Util.CLVar(''),
652
+ 'CCFLAGS' : SCons.Util.CLVar(''),
653
+ 'CPPDEFINES' : [],
654
+ 'CPPFLAGS' : SCons.Util.CLVar(''),
655
+ 'CPPPATH' : [],
656
+ 'FRAMEWORKPATH' : SCons.Util.CLVar(''),
657
+ 'FRAMEWORKS' : SCons.Util.CLVar(''),
658
+ 'LIBPATH' : [],
659
+ 'LIBS' : [],
660
+ 'LINKFLAGS' : SCons.Util.CLVar(''),
661
+ 'RPATH' : [],
662
+ }
663
+
664
+ # The use of the "me" parameter to provide our own name for
665
+ # recursion is an egregious hack to support Python 2.1 and before.
666
+ def do_parse(arg, me, self = self, dict = dict):
667
+ # if arg is a sequence, recurse with each element
668
+ if not arg:
669
+ return
670
+
671
+ if not SCons.Util.is_String(arg):
672
+ for t in arg: me(t, me)
673
+ return
674
+
675
+ # if arg is a command, execute it
676
+ if arg[0] == '!':
677
+ arg = self.backtick(arg[1:])
678
+
679
+ # utility function to deal with -D option
680
+ def append_define(name, dict = dict):
681
+ t = string.split(name, '=')
682
+ if len(t) == 1:
683
+ dict['CPPDEFINES'].append(name)
684
+ else:
685
+ dict['CPPDEFINES'].append([t[0], string.join(t[1:], '=')])
686
+
687
+ # Loop through the flags and add them to the appropriate option.
688
+ # This tries to strike a balance between checking for all possible
689
+ # flags and keeping the logic to a finite size, so it doesn't
690
+ # check for some that don't occur often. It particular, if the
691
+ # flag is not known to occur in a config script and there's a way
692
+ # of passing the flag to the right place (by wrapping it in a -W
693
+ # flag, for example) we don't check for it. Note that most
694
+ # preprocessor options are not handled, since unhandled options
695
+ # are placed in CCFLAGS, so unless the preprocessor is invoked
696
+ # separately, these flags will still get to the preprocessor.
697
+ # Other options not currently handled:
698
+ # -iqoutedir (preprocessor search path)
699
+ # -u symbol (linker undefined symbol)
700
+ # -s (linker strip files)
701
+ # -static* (linker static binding)
702
+ # -shared* (linker dynamic binding)
703
+ # -symbolic (linker global binding)
704
+ # -R dir (deprecated linker rpath)
705
+ # IBM compilers may also accept -qframeworkdir=foo
706
+
707
+ params = shlex.split(arg)
708
+ append_next_arg_to = None # for multi-word args
709
+ for arg in params:
710
+ if append_next_arg_to:
711
+ if append_next_arg_to == 'CPPDEFINES':
712
+ append_define(arg)
713
+ elif append_next_arg_to == '-include':
714
+ t = ('-include', self.fs.File(arg))
715
+ dict['CCFLAGS'].append(t)
716
+ elif append_next_arg_to == '-isysroot':
717
+ t = ('-isysroot', arg)
718
+ dict['CCFLAGS'].append(t)
719
+ dict['LINKFLAGS'].append(t)
720
+ elif append_next_arg_to == '-arch':
721
+ t = ('-arch', arg)
722
+ dict['CCFLAGS'].append(t)
723
+ dict['LINKFLAGS'].append(t)
724
+ else:
725
+ dict[append_next_arg_to].append(arg)
726
+ append_next_arg_to = None
727
+ elif not arg[0] in ['-', '+']:
728
+ dict['LIBS'].append(self.fs.File(arg))
729
+ elif arg[:2] == '-L':
730
+ if arg[2:]:
731
+ dict['LIBPATH'].append(arg[2:])
732
+ else:
733
+ append_next_arg_to = 'LIBPATH'
734
+ elif arg[:2] == '-l':
735
+ if arg[2:]:
736
+ dict['LIBS'].append(arg[2:])
737
+ else:
738
+ append_next_arg_to = 'LIBS'
739
+ elif arg[:2] == '-I':
740
+ if arg[2:]:
741
+ dict['CPPPATH'].append(arg[2:])
742
+ else:
743
+ append_next_arg_to = 'CPPPATH'
744
+ elif arg[:4] == '-Wa,':
745
+ dict['ASFLAGS'].append(arg[4:])
746
+ dict['CCFLAGS'].append(arg)
747
+ elif arg[:4] == '-Wl,':
748
+ if arg[:11] == '-Wl,-rpath=':
749
+ dict['RPATH'].append(arg[11:])
750
+ elif arg[:7] == '-Wl,-R,':
751
+ dict['RPATH'].append(arg[7:])
752
+ elif arg[:6] == '-Wl,-R':
753
+ dict['RPATH'].append(arg[6:])
754
+ else:
755
+ dict['LINKFLAGS'].append(arg)
756
+ elif arg[:4] == '-Wp,':
757
+ dict['CPPFLAGS'].append(arg)
758
+ elif arg[:2] == '-D':
759
+ if arg[2:]:
760
+ append_define(arg[2:])
761
+ else:
762
+ append_next_arg_to = 'CPPDEFINES'
763
+ elif arg == '-framework':
764
+ append_next_arg_to = 'FRAMEWORKS'
765
+ elif arg[:14] == '-frameworkdir=':
766
+ dict['FRAMEWORKPATH'].append(arg[14:])
767
+ elif arg[:2] == '-F':
768
+ if arg[2:]:
769
+ dict['FRAMEWORKPATH'].append(arg[2:])
770
+ else:
771
+ append_next_arg_to = 'FRAMEWORKPATH'
772
+ elif arg == '-mno-cygwin':
773
+ dict['CCFLAGS'].append(arg)
774
+ dict['LINKFLAGS'].append(arg)
775
+ elif arg == '-mwindows':
776
+ dict['LINKFLAGS'].append(arg)
777
+ elif arg == '-pthread':
778
+ dict['CCFLAGS'].append(arg)
779
+ dict['LINKFLAGS'].append(arg)
780
+ elif arg[:5] == '-std=':
781
+ dict['CFLAGS'].append(arg) # C only
782
+ elif arg[0] == '+':
783
+ dict['CCFLAGS'].append(arg)
784
+ dict['LINKFLAGS'].append(arg)
785
+ elif arg in ['-include', '-isysroot', '-arch']:
786
+ append_next_arg_to = arg
787
+ else:
788
+ dict['CCFLAGS'].append(arg)
789
+
790
+ for arg in flags:
791
+ do_parse(arg, do_parse)
792
+ return dict
793
+
794
+ def MergeFlags(self, args, unique=1, dict=None):
795
+ """
796
+ Merge the dict in args into the construction variables of this
797
+ env, or the passed-in dict. If args is not a dict, it is
798
+ converted into a dict using ParseFlags. If unique is not set,
799
+ the flags are appended rather than merged.
800
+ """
801
+
802
+ if dict is None:
803
+ dict = self
804
+ if not SCons.Util.is_Dict(args):
805
+ args = self.ParseFlags(args)
806
+ if not unique:
807
+ apply(self.Append, (), args)
808
+ return self
809
+ for key, value in args.items():
810
+ if not value:
811
+ continue
812
+ try:
813
+ orig = self[key]
814
+ except KeyError:
815
+ orig = value
816
+ else:
817
+ if not orig:
818
+ orig = value
819
+ elif value:
820
+ # Add orig and value. The logic here was lifted from
821
+ # part of env.Append() (see there for a lot of comments
822
+ # about the order in which things are tried) and is
823
+ # used mainly to handle coercion of strings to CLVar to
824
+ # "do the right thing" given (e.g.) an original CCFLAGS
825
+ # string variable like '-pipe -Wall'.
826
+ try:
827
+ orig = orig + value
828
+ except (KeyError, TypeError):
829
+ try:
830
+ add_to_orig = orig.append
831
+ except AttributeError:
832
+ value.insert(0, orig)
833
+ orig = value
834
+ else:
835
+ add_to_orig(value)
836
+ t = []
837
+ if key[-4:] == 'PATH':
838
+ ### keep left-most occurence
839
+ for v in orig:
840
+ if v not in t:
841
+ t.append(v)
842
+ else:
843
+ ### keep right-most occurence
844
+ orig.reverse()
845
+ for v in orig:
846
+ if v not in t:
847
+ t.insert(0, v)
848
+ self[key] = t
849
+ return self
850
+
851
+ # def MergeShellPaths(self, args, prepend=1):
852
+ # """
853
+ # Merge the dict in args into the shell environment in env['ENV'].
854
+ # Shell path elements are appended or prepended according to prepend.
855
+
856
+ # Uses Pre/AppendENVPath, so it always appends or prepends uniquely.
857
+
858
+ # Example: env.MergeShellPaths({'LIBPATH': '/usr/local/lib'})
859
+ # prepends /usr/local/lib to env['ENV']['LIBPATH'].
860
+ # """
861
+
862
+ # for pathname, pathval in args.items():
863
+ # if not pathval:
864
+ # continue
865
+ # if prepend:
866
+ # apply(self.PrependENVPath, (pathname, pathval))
867
+ # else:
868
+ # apply(self.AppendENVPath, (pathname, pathval))
869
+
870
+
871
+ # Used by the FindSourceFiles() method, below.
872
+ # Stuck here for support of pre-2.2 Python versions.
873
+ def build_source(ss, result):
874
+ for s in ss:
875
+ if isinstance(s, SCons.Node.FS.Dir):
876
+ build_source(s.all_children(), result)
877
+ elif s.has_builder():
878
+ build_source(s.sources, result)
879
+ elif isinstance(s.disambiguate(), SCons.Node.FS.File):
880
+ result.append(s)
881
+
882
+ def default_decide_source(dependency, target, prev_ni):
883
+ f = SCons.Defaults.DefaultEnvironment().decide_source
884
+ return f(dependency, target, prev_ni)
885
+
886
+ def default_decide_target(dependency, target, prev_ni):
887
+ f = SCons.Defaults.DefaultEnvironment().decide_target
888
+ return f(dependency, target, prev_ni)
889
+
890
+ def default_copy_from_cache(src, dst):
891
+ f = SCons.Defaults.DefaultEnvironment().copy_from_cache
892
+ return f(src, dst)
893
+
894
+ class Base(SubstitutionEnvironment):
895
+ """Base class for "real" construction Environments. These are the
896
+ primary objects used to communicate dependency and construction
897
+ information to the build engine.
898
+
899
+ Keyword arguments supplied when the construction Environment
900
+ is created are construction variables used to initialize the
901
+ Environment.
902
+ """
903
+
904
+ memoizer_counters = []
905
+
906
+ #######################################################################
907
+ # This is THE class for interacting with the SCons build engine,
908
+ # and it contains a lot of stuff, so we're going to try to keep this
909
+ # a little organized by grouping the methods.
910
+ #######################################################################
911
+
912
+ #######################################################################
913
+ # Methods that make an Environment act like a dictionary. These have
914
+ # the expected standard names for Python mapping objects. Note that
915
+ # we don't actually make an Environment a subclass of UserDict for
916
+ # performance reasons. Note also that we only supply methods for
917
+ # dictionary functionality that we actually need and use.
918
+ #######################################################################
919
+
920
+ def __init__(self,
921
+ platform=None,
922
+ tools=None,
923
+ toolpath=None,
924
+ variables=None,
925
+ parse_flags = None,
926
+ **kw):
927
+ """
928
+ Initialization of a basic SCons construction environment,
929
+ including setting up special construction variables like BUILDER,
930
+ PLATFORM, etc., and searching for and applying available Tools.
931
+
932
+ Note that we do *not* call the underlying base class
933
+ (SubsitutionEnvironment) initialization, because we need to
934
+ initialize things in a very specific order that doesn't work
935
+ with the much simpler base class initialization.
936
+ """
937
+ if __debug__: logInstanceCreation(self, 'Environment.Base')
938
+ self._memo = {}
939
+ self.fs = SCons.Node.FS.get_default_fs()
940
+ self.ans = SCons.Node.Alias.default_ans
941
+ self.lookup_list = SCons.Node.arg2nodes_lookups
942
+ self._dict = semi_deepcopy(SCons.Defaults.ConstructionEnvironment)
943
+ self._init_special()
944
+ self.added_methods = []
945
+
946
+ # We don't use AddMethod, or define these as methods in this
947
+ # class, because we *don't* want these functions to be bound
948
+ # methods. They need to operate independently so that the
949
+ # settings will work properly regardless of whether a given
950
+ # target ends up being built with a Base environment or an
951
+ # OverrideEnvironment or what have you.
952
+ self.decide_target = default_decide_target
953
+ self.decide_source = default_decide_source
954
+
955
+ self.copy_from_cache = default_copy_from_cache
956
+
957
+ self._dict['BUILDERS'] = BuilderDict(self._dict['BUILDERS'], self)
958
+
959
+ if platform is None:
960
+ platform = self._dict.get('PLATFORM', None)
961
+ if platform is None:
962
+ platform = SCons.Platform.Platform()
963
+ if SCons.Util.is_String(platform):
964
+ platform = SCons.Platform.Platform(platform)
965
+ self._dict['PLATFORM'] = str(platform)
966
+ platform(self)
967
+
968
+ self._dict['HOST_OS'] = self._dict.get('HOST_OS',None)
969
+ self._dict['HOST_ARCH'] = self._dict.get('HOST_ARCH',None)
970
+
971
+ # Now set defaults for TARGET_{OS|ARCH}
972
+ self._dict['TARGET_OS'] = self._dict.get('HOST_OS',None)
973
+ self._dict['TARGET_ARCH'] = self._dict.get('HOST_ARCH',None)
974
+
975
+
976
+ # Apply the passed-in and customizable variables to the
977
+ # environment before calling the tools, because they may use
978
+ # some of them during initialization.
979
+ if kw.has_key('options'):
980
+ # Backwards compatibility: they may stll be using the
981
+ # old "options" keyword.
982
+ variables = kw['options']
983
+ del kw['options']
984
+ apply(self.Replace, (), kw)
985
+ keys = kw.keys()
986
+ if variables:
987
+ keys = keys + variables.keys()
988
+ variables.Update(self)
989
+
990
+ save = {}
991
+ for k in keys:
992
+ try:
993
+ save[k] = self._dict[k]
994
+ except KeyError:
995
+ # No value may have been set if they tried to pass in a
996
+ # reserved variable name like TARGETS.
997
+ pass
998
+
999
+ SCons.Tool.Initializers(self)
1000
+
1001
+ if tools is None:
1002
+ tools = self._dict.get('TOOLS', None)
1003
+ if tools is None:
1004
+ tools = ['default']
1005
+ apply_tools(self, tools, toolpath)
1006
+
1007
+ # Now restore the passed-in and customized variables
1008
+ # to the environment, since the values the user set explicitly
1009
+ # should override any values set by the tools.
1010
+ for key, val in save.items():
1011
+ self._dict[key] = val
1012
+
1013
+ # Finally, apply any flags to be merged in
1014
+ if parse_flags: self.MergeFlags(parse_flags)
1015
+
1016
+ #######################################################################
1017
+ # Utility methods that are primarily for internal use by SCons.
1018
+ # These begin with lower-case letters.
1019
+ #######################################################################
1020
+
1021
+ def get_builder(self, name):
1022
+ """Fetch the builder with the specified name from the environment.
1023
+ """
1024
+ try:
1025
+ return self._dict['BUILDERS'][name]
1026
+ except KeyError:
1027
+ return None
1028
+
1029
+ def get_CacheDir(self):
1030
+ try:
1031
+ path = self._CacheDir_path
1032
+ except AttributeError:
1033
+ path = SCons.Defaults.DefaultEnvironment()._CacheDir_path
1034
+ try:
1035
+ if path == self._last_CacheDir_path:
1036
+ return self._last_CacheDir
1037
+ except AttributeError:
1038
+ pass
1039
+ cd = SCons.CacheDir.CacheDir(path)
1040
+ self._last_CacheDir_path = path
1041
+ self._last_CacheDir = cd
1042
+ return cd
1043
+
1044
+ def get_factory(self, factory, default='File'):
1045
+ """Return a factory function for creating Nodes for this
1046
+ construction environment.
1047
+ """
1048
+ name = default
1049
+ try:
1050
+ is_node = issubclass(factory, SCons.Node.FS.Base)
1051
+ except TypeError:
1052
+ # The specified factory isn't a Node itself--it's
1053
+ # most likely None, or possibly a callable.
1054
+ pass
1055
+ else:
1056
+ if is_node:
1057
+ # The specified factory is a Node (sub)class. Try to
1058
+ # return the FS method that corresponds to the Node's
1059
+ # name--that is, we return self.fs.Dir if they want a Dir,
1060
+ # self.fs.File for a File, etc.
1061
+ try: name = factory.__name__
1062
+ except AttributeError: pass
1063
+ else: factory = None
1064
+ if not factory:
1065
+ # They passed us None, or we picked up a name from a specified
1066
+ # class, so return the FS method. (Note that we *don't*
1067
+ # use our own self.{Dir,File} methods because that would
1068
+ # cause env.subst() to be called twice on the file name,
1069
+ # interfering with files that have $$ in them.)
1070
+ factory = getattr(self.fs, name)
1071
+ return factory
1072
+
1073
+ memoizer_counters.append(SCons.Memoize.CountValue('_gsm'))
1074
+
1075
+ def _gsm(self):
1076
+ try:
1077
+ return self._memo['_gsm']
1078
+ except KeyError:
1079
+ pass
1080
+
1081
+ result = {}
1082
+
1083
+ try:
1084
+ scanners = self._dict['SCANNERS']
1085
+ except KeyError:
1086
+ pass
1087
+ else:
1088
+ # Reverse the scanner list so that, if multiple scanners
1089
+ # claim they can scan the same suffix, earlier scanners
1090
+ # in the list will overwrite later scanners, so that
1091
+ # the result looks like a "first match" to the user.
1092
+ if not SCons.Util.is_List(scanners):
1093
+ scanners = [scanners]
1094
+ else:
1095
+ scanners = scanners[:] # copy so reverse() doesn't mod original
1096
+ scanners.reverse()
1097
+ for scanner in scanners:
1098
+ for k in scanner.get_skeys(self):
1099
+ if k and self['PLATFORM'] == 'win32':
1100
+ k = string.lower(k)
1101
+ result[k] = scanner
1102
+
1103
+ self._memo['_gsm'] = result
1104
+
1105
+ return result
1106
+
1107
+ def get_scanner(self, skey):
1108
+ """Find the appropriate scanner given a key (usually a file suffix).
1109
+ """
1110
+ if skey and self['PLATFORM'] == 'win32':
1111
+ skey = string.lower(skey)
1112
+ return self._gsm().get(skey)
1113
+
1114
+ def scanner_map_delete(self, kw=None):
1115
+ """Delete the cached scanner map (if we need to).
1116
+ """
1117
+ try:
1118
+ del self._memo['_gsm']
1119
+ except KeyError:
1120
+ pass
1121
+
1122
+ def _update(self, dict):
1123
+ """Update an environment's values directly, bypassing the normal
1124
+ checks that occur when users try to set items.
1125
+ """
1126
+ self._dict.update(dict)
1127
+
1128
+ def get_src_sig_type(self):
1129
+ try:
1130
+ return self.src_sig_type
1131
+ except AttributeError:
1132
+ t = SCons.Defaults.DefaultEnvironment().src_sig_type
1133
+ self.src_sig_type = t
1134
+ return t
1135
+
1136
+ def get_tgt_sig_type(self):
1137
+ try:
1138
+ return self.tgt_sig_type
1139
+ except AttributeError:
1140
+ t = SCons.Defaults.DefaultEnvironment().tgt_sig_type
1141
+ self.tgt_sig_type = t
1142
+ return t
1143
+
1144
+ #######################################################################
1145
+ # Public methods for manipulating an Environment. These begin with
1146
+ # upper-case letters. The essential characteristic of methods in
1147
+ # this section is that they do *not* have corresponding same-named
1148
+ # global functions. For example, a stand-alone Append() function
1149
+ # makes no sense, because Append() is all about appending values to
1150
+ # an Environment's construction variables.
1151
+ #######################################################################
1152
+
1153
+ def Append(self, **kw):
1154
+ """Append values to existing construction variables
1155
+ in an Environment.
1156
+ """
1157
+ kw = copy_non_reserved_keywords(kw)
1158
+ for key, val in kw.items():
1159
+ # It would be easier on the eyes to write this using
1160
+ # "continue" statements whenever we finish processing an item,
1161
+ # but Python 1.5.2 apparently doesn't let you use "continue"
1162
+ # within try:-except: blocks, so we have to nest our code.
1163
+ try:
1164
+ orig = self._dict[key]
1165
+ except KeyError:
1166
+ # No existing variable in the environment, so just set
1167
+ # it to the new value.
1168
+ self._dict[key] = val
1169
+ else:
1170
+ try:
1171
+ # Check if the original looks like a dictionary.
1172
+ # If it is, we can't just try adding the value because
1173
+ # dictionaries don't have __add__() methods, and
1174
+ # things like UserList will incorrectly coerce the
1175
+ # original dict to a list (which we don't want).
1176
+ update_dict = orig.update
1177
+ except AttributeError:
1178
+ try:
1179
+ # Most straightforward: just try to add them
1180
+ # together. This will work in most cases, when the
1181
+ # original and new values are of compatible types.
1182
+ self._dict[key] = orig + val
1183
+ except (KeyError, TypeError):
1184
+ try:
1185
+ # Check if the original is a list.
1186
+ add_to_orig = orig.append
1187
+ except AttributeError:
1188
+ # The original isn't a list, but the new
1189
+ # value is (by process of elimination),
1190
+ # so insert the original in the new value
1191
+ # (if there's one to insert) and replace
1192
+ # the variable with it.
1193
+ if orig:
1194
+ val.insert(0, orig)
1195
+ self._dict[key] = val
1196
+ else:
1197
+ # The original is a list, so append the new
1198
+ # value to it (if there's a value to append).
1199
+ if val:
1200
+ add_to_orig(val)
1201
+ else:
1202
+ # The original looks like a dictionary, so update it
1203
+ # based on what we think the value looks like.
1204
+ if SCons.Util.is_List(val):
1205
+ for v in val:
1206
+ orig[v] = None
1207
+ else:
1208
+ try:
1209
+ update_dict(val)
1210
+ except (AttributeError, TypeError, ValueError):
1211
+ if SCons.Util.is_Dict(val):
1212
+ for k, v in val.items():
1213
+ orig[k] = v
1214
+ else:
1215
+ orig[val] = None
1216
+ self.scanner_map_delete(kw)
1217
+
1218
+ # allow Dirs and strings beginning with # for top-relative
1219
+ # Note this uses the current env's fs (in self).
1220
+ def _canonicalize(self, path):
1221
+ if not SCons.Util.is_String(path): # typically a Dir
1222
+ path = str(path)
1223
+ if path and path[0] == '#':
1224
+ path = str(self.fs.Dir(path))
1225
+ return path
1226
+
1227
+ def AppendENVPath(self, name, newpath, envname = 'ENV',
1228
+ sep = os.pathsep, delete_existing=1):
1229
+ """Append path elements to the path 'name' in the 'ENV'
1230
+ dictionary for this environment. Will only add any particular
1231
+ path once, and will normpath and normcase all paths to help
1232
+ assure this. This can also handle the case where the env
1233
+ variable is a list instead of a string.
1234
+
1235
+ If delete_existing is 0, a newpath which is already in the path
1236
+ will not be moved to the end (it will be left where it is).
1237
+ """
1238
+
1239
+ orig = ''
1240
+ if self._dict.has_key(envname) and self._dict[envname].has_key(name):
1241
+ orig = self._dict[envname][name]
1242
+
1243
+ nv = SCons.Util.AppendPath(orig, newpath, sep, delete_existing,
1244
+ canonicalize=self._canonicalize)
1245
+
1246
+ if not self._dict.has_key(envname):
1247
+ self._dict[envname] = {}
1248
+
1249
+ self._dict[envname][name] = nv
1250
+
1251
+ def AppendUnique(self, delete_existing=0, **kw):
1252
+ """Append values to existing construction variables
1253
+ in an Environment, if they're not already there.
1254
+ If delete_existing is 1, removes existing values first, so
1255
+ values move to end.
1256
+ """
1257
+ kw = copy_non_reserved_keywords(kw)
1258
+ for key, val in kw.items():
1259
+ if SCons.Util.is_List(val):
1260
+ val = _delete_duplicates(val, delete_existing)
1261
+ if not self._dict.has_key(key) or self._dict[key] in ('', None):
1262
+ self._dict[key] = val
1263
+ elif SCons.Util.is_Dict(self._dict[key]) and \
1264
+ SCons.Util.is_Dict(val):
1265
+ self._dict[key].update(val)
1266
+ elif SCons.Util.is_List(val):
1267
+ dk = self._dict[key]
1268
+ if not SCons.Util.is_List(dk):
1269
+ dk = [dk]
1270
+ if delete_existing:
1271
+ dk = filter(lambda x, val=val: x not in val, dk)
1272
+ else:
1273
+ val = filter(lambda x, dk=dk: x not in dk, val)
1274
+ self._dict[key] = dk + val
1275
+ else:
1276
+ dk = self._dict[key]
1277
+ if SCons.Util.is_List(dk):
1278
+ # By elimination, val is not a list. Since dk is a
1279
+ # list, wrap val in a list first.
1280
+ if delete_existing:
1281
+ dk = filter(lambda x, val=val: x not in val, dk)
1282
+ self._dict[key] = dk + [val]
1283
+ else:
1284
+ if not val in dk:
1285
+ self._dict[key] = dk + [val]
1286
+ else:
1287
+ if delete_existing:
1288
+ dk = filter(lambda x, val=val: x not in val, dk)
1289
+ self._dict[key] = dk + val
1290
+ self.scanner_map_delete(kw)
1291
+
1292
+ def Clone(self, tools=[], toolpath=None, parse_flags = None, **kw):
1293
+ """Return a copy of a construction Environment. The
1294
+ copy is like a Python "deep copy"--that is, independent
1295
+ copies are made recursively of each objects--except that
1296
+ a reference is copied when an object is not deep-copyable
1297
+ (like a function). There are no references to any mutable
1298
+ objects in the original Environment.
1299
+ """
1300
+ clone = copy.copy(self)
1301
+ clone._dict = semi_deepcopy(self._dict)
1302
+
1303
+ try:
1304
+ cbd = clone._dict['BUILDERS']
1305
+ except KeyError:
1306
+ pass
1307
+ else:
1308
+ clone._dict['BUILDERS'] = BuilderDict(cbd, clone)
1309
+
1310
+ # Check the methods added via AddMethod() and re-bind them to
1311
+ # the cloned environment. Only do this if the attribute hasn't
1312
+ # been overwritten by the user explicitly and still points to
1313
+ # the added method.
1314
+ clone.added_methods = []
1315
+ for mw in self.added_methods:
1316
+ if mw == getattr(self, mw.name):
1317
+ clone.added_methods.append(mw.clone(clone))
1318
+
1319
+ clone._memo = {}
1320
+
1321
+ # Apply passed-in variables before the tools
1322
+ # so the tools can use the new variables
1323
+ kw = copy_non_reserved_keywords(kw)
1324
+ new = {}
1325
+ for key, value in kw.items():
1326
+ new[key] = SCons.Subst.scons_subst_once(value, self, key)
1327
+ apply(clone.Replace, (), new)
1328
+
1329
+ apply_tools(clone, tools, toolpath)
1330
+
1331
+ # apply them again in case the tools overwrote them
1332
+ apply(clone.Replace, (), new)
1333
+
1334
+ # Finally, apply any flags to be merged in
1335
+ if parse_flags: clone.MergeFlags(parse_flags)
1336
+
1337
+ if __debug__: logInstanceCreation(self, 'Environment.EnvironmentClone')
1338
+ return clone
1339
+
1340
+ def Copy(self, *args, **kw):
1341
+ global _warn_copy_deprecated
1342
+ if _warn_copy_deprecated:
1343
+ msg = "The env.Copy() method is deprecated; use the env.Clone() method instead."
1344
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedCopyWarning, msg)
1345
+ _warn_copy_deprecated = False
1346
+ return apply(self.Clone, args, kw)
1347
+
1348
+ def _changed_build(self, dependency, target, prev_ni):
1349
+ if dependency.changed_state(target, prev_ni):
1350
+ return 1
1351
+ return self.decide_source(dependency, target, prev_ni)
1352
+
1353
+ def _changed_content(self, dependency, target, prev_ni):
1354
+ return dependency.changed_content(target, prev_ni)
1355
+
1356
+ def _changed_source(self, dependency, target, prev_ni):
1357
+ target_env = dependency.get_build_env()
1358
+ type = target_env.get_tgt_sig_type()
1359
+ if type == 'source':
1360
+ return target_env.decide_source(dependency, target, prev_ni)
1361
+ else:
1362
+ return target_env.decide_target(dependency, target, prev_ni)
1363
+
1364
+ def _changed_timestamp_then_content(self, dependency, target, prev_ni):
1365
+ return dependency.changed_timestamp_then_content(target, prev_ni)
1366
+
1367
+ def _changed_timestamp_newer(self, dependency, target, prev_ni):
1368
+ return dependency.changed_timestamp_newer(target, prev_ni)
1369
+
1370
+ def _changed_timestamp_match(self, dependency, target, prev_ni):
1371
+ return dependency.changed_timestamp_match(target, prev_ni)
1372
+
1373
+ def _copy_from_cache(self, src, dst):
1374
+ return self.fs.copy(src, dst)
1375
+
1376
+ def _copy2_from_cache(self, src, dst):
1377
+ return self.fs.copy2(src, dst)
1378
+
1379
+ def Decider(self, function):
1380
+ copy_function = self._copy2_from_cache
1381
+ if function in ('MD5', 'content'):
1382
+ if not SCons.Util.md5:
1383
+ raise UserError, "MD5 signatures are not available in this version of Python."
1384
+ function = self._changed_content
1385
+ elif function == 'MD5-timestamp':
1386
+ function = self._changed_timestamp_then_content
1387
+ elif function in ('timestamp-newer', 'make'):
1388
+ function = self._changed_timestamp_newer
1389
+ copy_function = self._copy_from_cache
1390
+ elif function == 'timestamp-match':
1391
+ function = self._changed_timestamp_match
1392
+ elif not callable(function):
1393
+ raise UserError, "Unknown Decider value %s" % repr(function)
1394
+
1395
+ # We don't use AddMethod because we don't want to turn the
1396
+ # function, which only expects three arguments, into a bound
1397
+ # method, which would add self as an initial, fourth argument.
1398
+ self.decide_target = function
1399
+ self.decide_source = function
1400
+
1401
+ self.copy_from_cache = copy_function
1402
+
1403
+ def Detect(self, progs):
1404
+ """Return the first available program in progs.
1405
+ """
1406
+ if not SCons.Util.is_List(progs):
1407
+ progs = [ progs ]
1408
+ for prog in progs:
1409
+ path = self.WhereIs(prog)
1410
+ if path: return prog
1411
+ return None
1412
+
1413
+ def Dictionary(self, *args):
1414
+ if not args:
1415
+ return self._dict
1416
+ dlist = map(lambda x, s=self: s._dict[x], args)
1417
+ if len(dlist) == 1:
1418
+ dlist = dlist[0]
1419
+ return dlist
1420
+
1421
+ def Dump(self, key = None):
1422
+ """
1423
+ Using the standard Python pretty printer, dump the contents of the
1424
+ scons build environment to stdout.
1425
+
1426
+ If the key passed in is anything other than None, then that will
1427
+ be used as an index into the build environment dictionary and
1428
+ whatever is found there will be fed into the pretty printer. Note
1429
+ that this key is case sensitive.
1430
+ """
1431
+ import pprint
1432
+ pp = pprint.PrettyPrinter(indent=2)
1433
+ if key:
1434
+ dict = self.Dictionary(key)
1435
+ else:
1436
+ dict = self.Dictionary()
1437
+ return pp.pformat(dict)
1438
+
1439
+ def FindIxes(self, paths, prefix, suffix):
1440
+ """
1441
+ Search a list of paths for something that matches the prefix and suffix.
1442
+
1443
+ paths - the list of paths or nodes.
1444
+ prefix - construction variable for the prefix.
1445
+ suffix - construction variable for the suffix.
1446
+ """
1447
+
1448
+ suffix = self.subst('$'+suffix)
1449
+ prefix = self.subst('$'+prefix)
1450
+
1451
+ for path in paths:
1452
+ dir,name = os.path.split(str(path))
1453
+ if name[:len(prefix)] == prefix and name[-len(suffix):] == suffix:
1454
+ return path
1455
+
1456
+ def ParseConfig(self, command, function=None, unique=1):
1457
+ """
1458
+ Use the specified function to parse the output of the command
1459
+ in order to modify the current environment. The 'command' can
1460
+ be a string or a list of strings representing a command and
1461
+ its arguments. 'Function' is an optional argument that takes
1462
+ the environment, the output of the command, and the unique flag.
1463
+ If no function is specified, MergeFlags, which treats the output
1464
+ as the result of a typical 'X-config' command (i.e. gtk-config),
1465
+ will merge the output into the appropriate variables.
1466
+ """
1467
+ if function is None:
1468
+ def parse_conf(env, cmd, unique=unique):
1469
+ return env.MergeFlags(cmd, unique)
1470
+ function = parse_conf
1471
+ if SCons.Util.is_List(command):
1472
+ command = string.join(command)
1473
+ command = self.subst(command)
1474
+ return function(self, self.backtick(command))
1475
+
1476
+ def ParseDepends(self, filename, must_exist=None, only_one=0):
1477
+ """
1478
+ Parse a mkdep-style file for explicit dependencies. This is
1479
+ completely abusable, and should be unnecessary in the "normal"
1480
+ case of proper SCons configuration, but it may help make
1481
+ the transition from a Make hierarchy easier for some people
1482
+ to swallow. It can also be genuinely useful when using a tool
1483
+ that can write a .d file, but for which writing a scanner would
1484
+ be too complicated.
1485
+ """
1486
+ filename = self.subst(filename)
1487
+ try:
1488
+ fp = open(filename, 'r')
1489
+ except IOError:
1490
+ if must_exist:
1491
+ raise
1492
+ return
1493
+ lines = SCons.Util.LogicalLines(fp).readlines()
1494
+ lines = filter(lambda l: l[0] != '#', lines)
1495
+ tdlist = []
1496
+ for line in lines:
1497
+ try:
1498
+ target, depends = string.split(line, ':', 1)
1499
+ except (AttributeError, TypeError, ValueError):
1500
+ # Python 1.5.2 throws TypeError if line isn't a string,
1501
+ # Python 2.x throws AttributeError because it tries
1502
+ # to call line.split(). Either can throw ValueError
1503
+ # if the line doesn't split into two or more elements.
1504
+ pass
1505
+ else:
1506
+ tdlist.append((string.split(target), string.split(depends)))
1507
+ if only_one:
1508
+ targets = reduce(lambda x, y: x+y, map(lambda p: p[0], tdlist))
1509
+ if len(targets) > 1:
1510
+ raise SCons.Errors.UserError, "More than one dependency target found in `%s': %s" % (filename, targets)
1511
+ for target, depends in tdlist:
1512
+ self.Depends(target, depends)
1513
+
1514
+ def Platform(self, platform):
1515
+ platform = self.subst(platform)
1516
+ return SCons.Platform.Platform(platform)(self)
1517
+
1518
+ def Prepend(self, **kw):
1519
+ """Prepend values to existing construction variables
1520
+ in an Environment.
1521
+ """
1522
+ kw = copy_non_reserved_keywords(kw)
1523
+ for key, val in kw.items():
1524
+ # It would be easier on the eyes to write this using
1525
+ # "continue" statements whenever we finish processing an item,
1526
+ # but Python 1.5.2 apparently doesn't let you use "continue"
1527
+ # within try:-except: blocks, so we have to nest our code.
1528
+ try:
1529
+ orig = self._dict[key]
1530
+ except KeyError:
1531
+ # No existing variable in the environment, so just set
1532
+ # it to the new value.
1533
+ self._dict[key] = val
1534
+ else:
1535
+ try:
1536
+ # Check if the original looks like a dictionary.
1537
+ # If it is, we can't just try adding the value because
1538
+ # dictionaries don't have __add__() methods, and
1539
+ # things like UserList will incorrectly coerce the
1540
+ # original dict to a list (which we don't want).
1541
+ update_dict = orig.update
1542
+ except AttributeError:
1543
+ try:
1544
+ # Most straightforward: just try to add them
1545
+ # together. This will work in most cases, when the
1546
+ # original and new values are of compatible types.
1547
+ self._dict[key] = val + orig
1548
+ except (KeyError, TypeError):
1549
+ try:
1550
+ # Check if the added value is a list.
1551
+ add_to_val = val.append
1552
+ except AttributeError:
1553
+ # The added value isn't a list, but the
1554
+ # original is (by process of elimination),
1555
+ # so insert the the new value in the original
1556
+ # (if there's one to insert).
1557
+ if val:
1558
+ orig.insert(0, val)
1559
+ else:
1560
+ # The added value is a list, so append
1561
+ # the original to it (if there's a value
1562
+ # to append).
1563
+ if orig:
1564
+ add_to_val(orig)
1565
+ self._dict[key] = val
1566
+ else:
1567
+ # The original looks like a dictionary, so update it
1568
+ # based on what we think the value looks like.
1569
+ if SCons.Util.is_List(val):
1570
+ for v in val:
1571
+ orig[v] = None
1572
+ else:
1573
+ try:
1574
+ update_dict(val)
1575
+ except (AttributeError, TypeError, ValueError):
1576
+ if SCons.Util.is_Dict(val):
1577
+ for k, v in val.items():
1578
+ orig[k] = v
1579
+ else:
1580
+ orig[val] = None
1581
+ self.scanner_map_delete(kw)
1582
+
1583
+ def PrependENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep,
1584
+ delete_existing=1):
1585
+ """Prepend path elements to the path 'name' in the 'ENV'
1586
+ dictionary for this environment. Will only add any particular
1587
+ path once, and will normpath and normcase all paths to help
1588
+ assure this. This can also handle the case where the env
1589
+ variable is a list instead of a string.
1590
+
1591
+ If delete_existing is 0, a newpath which is already in the path
1592
+ will not be moved to the front (it will be left where it is).
1593
+ """
1594
+
1595
+ orig = ''
1596
+ if self._dict.has_key(envname) and self._dict[envname].has_key(name):
1597
+ orig = self._dict[envname][name]
1598
+
1599
+ nv = SCons.Util.PrependPath(orig, newpath, sep, delete_existing,
1600
+ canonicalize=self._canonicalize)
1601
+
1602
+ if not self._dict.has_key(envname):
1603
+ self._dict[envname] = {}
1604
+
1605
+ self._dict[envname][name] = nv
1606
+
1607
+ def PrependUnique(self, delete_existing=0, **kw):
1608
+ """Prepend values to existing construction variables
1609
+ in an Environment, if they're not already there.
1610
+ If delete_existing is 1, removes existing values first, so
1611
+ values move to front.
1612
+ """
1613
+ kw = copy_non_reserved_keywords(kw)
1614
+ for key, val in kw.items():
1615
+ if SCons.Util.is_List(val):
1616
+ val = _delete_duplicates(val, not delete_existing)
1617
+ if not self._dict.has_key(key) or self._dict[key] in ('', None):
1618
+ self._dict[key] = val
1619
+ elif SCons.Util.is_Dict(self._dict[key]) and \
1620
+ SCons.Util.is_Dict(val):
1621
+ self._dict[key].update(val)
1622
+ elif SCons.Util.is_List(val):
1623
+ dk = self._dict[key]
1624
+ if not SCons.Util.is_List(dk):
1625
+ dk = [dk]
1626
+ if delete_existing:
1627
+ dk = filter(lambda x, val=val: x not in val, dk)
1628
+ else:
1629
+ val = filter(lambda x, dk=dk: x not in dk, val)
1630
+ self._dict[key] = val + dk
1631
+ else:
1632
+ dk = self._dict[key]
1633
+ if SCons.Util.is_List(dk):
1634
+ # By elimination, val is not a list. Since dk is a
1635
+ # list, wrap val in a list first.
1636
+ if delete_existing:
1637
+ dk = filter(lambda x, val=val: x not in val, dk)
1638
+ self._dict[key] = [val] + dk
1639
+ else:
1640
+ if not val in dk:
1641
+ self._dict[key] = [val] + dk
1642
+ else:
1643
+ if delete_existing:
1644
+ dk = filter(lambda x, val=val: x not in val, dk)
1645
+ self._dict[key] = val + dk
1646
+ self.scanner_map_delete(kw)
1647
+
1648
+ def Replace(self, **kw):
1649
+ """Replace existing construction variables in an Environment
1650
+ with new construction variables and/or values.
1651
+ """
1652
+ try:
1653
+ kwbd = kw['BUILDERS']
1654
+ except KeyError:
1655
+ pass
1656
+ else:
1657
+ kwbd = semi_deepcopy(kwbd)
1658
+ del kw['BUILDERS']
1659
+ self.__setitem__('BUILDERS', kwbd)
1660
+ kw = copy_non_reserved_keywords(kw)
1661
+ self._update(semi_deepcopy(kw))
1662
+ self.scanner_map_delete(kw)
1663
+
1664
+ def ReplaceIxes(self, path, old_prefix, old_suffix, new_prefix, new_suffix):
1665
+ """
1666
+ Replace old_prefix with new_prefix and old_suffix with new_suffix.
1667
+
1668
+ env - Environment used to interpolate variables.
1669
+ path - the path that will be modified.
1670
+ old_prefix - construction variable for the old prefix.
1671
+ old_suffix - construction variable for the old suffix.
1672
+ new_prefix - construction variable for the new prefix.
1673
+ new_suffix - construction variable for the new suffix.
1674
+ """
1675
+ old_prefix = self.subst('$'+old_prefix)
1676
+ old_suffix = self.subst('$'+old_suffix)
1677
+
1678
+ new_prefix = self.subst('$'+new_prefix)
1679
+ new_suffix = self.subst('$'+new_suffix)
1680
+
1681
+ dir,name = os.path.split(str(path))
1682
+ if name[:len(old_prefix)] == old_prefix:
1683
+ name = name[len(old_prefix):]
1684
+ if name[-len(old_suffix):] == old_suffix:
1685
+ name = name[:-len(old_suffix)]
1686
+ return os.path.join(dir, new_prefix+name+new_suffix)
1687
+
1688
+ def SetDefault(self, **kw):
1689
+ for k in kw.keys():
1690
+ if self._dict.has_key(k):
1691
+ del kw[k]
1692
+ apply(self.Replace, (), kw)
1693
+
1694
+ def _find_toolpath_dir(self, tp):
1695
+ return self.fs.Dir(self.subst(tp)).srcnode().abspath
1696
+
1697
+ def Tool(self, tool, toolpath=None, **kw):
1698
+ if SCons.Util.is_String(tool):
1699
+ tool = self.subst(tool)
1700
+ if toolpath is None:
1701
+ toolpath = self.get('toolpath', [])
1702
+ toolpath = map(self._find_toolpath_dir, toolpath)
1703
+ tool = apply(SCons.Tool.Tool, (tool, toolpath), kw)
1704
+ tool(self)
1705
+
1706
+ def WhereIs(self, prog, path=None, pathext=None, reject=[]):
1707
+ """Find prog in the path.
1708
+ """
1709
+ if path is None:
1710
+ try:
1711
+ path = self['ENV']['PATH']
1712
+ except KeyError:
1713
+ pass
1714
+ elif SCons.Util.is_String(path):
1715
+ path = self.subst(path)
1716
+ if pathext is None:
1717
+ try:
1718
+ pathext = self['ENV']['PATHEXT']
1719
+ except KeyError:
1720
+ pass
1721
+ elif SCons.Util.is_String(pathext):
1722
+ pathext = self.subst(pathext)
1723
+ prog = self.subst(prog)
1724
+ path = SCons.Util.WhereIs(prog, path, pathext, reject)
1725
+ if path: return path
1726
+ return None
1727
+
1728
+ #######################################################################
1729
+ # Public methods for doing real "SCons stuff" (manipulating
1730
+ # dependencies, setting attributes on targets, etc.). These begin
1731
+ # with upper-case letters. The essential characteristic of methods
1732
+ # in this section is that they all *should* have corresponding
1733
+ # same-named global functions.
1734
+ #######################################################################
1735
+
1736
+ def Action(self, *args, **kw):
1737
+ def subst_string(a, self=self):
1738
+ if SCons.Util.is_String(a):
1739
+ a = self.subst(a)
1740
+ return a
1741
+ nargs = map(subst_string, args)
1742
+ nkw = self.subst_kw(kw)
1743
+ return apply(SCons.Action.Action, nargs, nkw)
1744
+
1745
+ def AddPreAction(self, files, action):
1746
+ nodes = self.arg2nodes(files, self.fs.Entry)
1747
+ action = SCons.Action.Action(action)
1748
+ uniq = {}
1749
+ for executor in map(lambda n: n.get_executor(), nodes):
1750
+ uniq[executor] = 1
1751
+ for executor in uniq.keys():
1752
+ executor.add_pre_action(action)
1753
+ return nodes
1754
+
1755
+ def AddPostAction(self, files, action):
1756
+ nodes = self.arg2nodes(files, self.fs.Entry)
1757
+ action = SCons.Action.Action(action)
1758
+ uniq = {}
1759
+ for executor in map(lambda n: n.get_executor(), nodes):
1760
+ uniq[executor] = 1
1761
+ for executor in uniq.keys():
1762
+ executor.add_post_action(action)
1763
+ return nodes
1764
+
1765
+ def Alias(self, target, source=[], action=None, **kw):
1766
+ tlist = self.arg2nodes(target, self.ans.Alias)
1767
+ if not SCons.Util.is_List(source):
1768
+ source = [source]
1769
+ source = filter(None, source)
1770
+
1771
+ if not action:
1772
+ if not source:
1773
+ # There are no source files and no action, so just
1774
+ # return a target list of classic Alias Nodes, without
1775
+ # any builder. The externally visible effect is that
1776
+ # this will make the wrapping Script.BuildTask class
1777
+ # say that there's "Nothing to be done" for this Alias,
1778
+ # instead of that it's "up to date."
1779
+ return tlist
1780
+
1781
+ # No action, but there are sources. Re-call all the target
1782
+ # builders to add the sources to each target.
1783
+ result = []
1784
+ for t in tlist:
1785
+ bld = t.get_builder(AliasBuilder)
1786
+ result.extend(bld(self, t, source))
1787
+ return result
1788
+
1789
+ nkw = self.subst_kw(kw)
1790
+ nkw.update({
1791
+ 'action' : SCons.Action.Action(action),
1792
+ 'source_factory' : self.fs.Entry,
1793
+ 'multi' : 1,
1794
+ 'is_explicit' : None,
1795
+ })
1796
+ bld = apply(SCons.Builder.Builder, (), nkw)
1797
+
1798
+ # Apply the Builder separately to each target so that the Aliases
1799
+ # stay separate. If we did one "normal" Builder call with the
1800
+ # whole target list, then all of the target Aliases would be
1801
+ # associated under a single Executor.
1802
+ result = []
1803
+ for t in tlist:
1804
+ # Calling the convert() method will cause a new Executor to be
1805
+ # created from scratch, so we have to explicitly initialize
1806
+ # it with the target's existing sources, plus our new ones,
1807
+ # so nothing gets lost.
1808
+ b = t.get_builder()
1809
+ if b is None or b is AliasBuilder:
1810
+ b = bld
1811
+ else:
1812
+ nkw['action'] = b.action + action
1813
+ b = apply(SCons.Builder.Builder, (), nkw)
1814
+ t.convert()
1815
+ result.extend(b(self, t, t.sources + source))
1816
+ return result
1817
+
1818
+ def AlwaysBuild(self, *targets):
1819
+ tlist = []
1820
+ for t in targets:
1821
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
1822
+ for t in tlist:
1823
+ t.set_always_build()
1824
+ return tlist
1825
+
1826
+ def BuildDir(self, *args, **kw):
1827
+ if kw.has_key('build_dir'):
1828
+ kw['variant_dir'] = kw['build_dir']
1829
+ del kw['build_dir']
1830
+ return apply(self.VariantDir, args, kw)
1831
+
1832
+ def Builder(self, **kw):
1833
+ nkw = self.subst_kw(kw)
1834
+ return apply(SCons.Builder.Builder, [], nkw)
1835
+
1836
+ def CacheDir(self, path):
1837
+ import SCons.CacheDir
1838
+ if path is not None:
1839
+ path = self.subst(path)
1840
+ self._CacheDir_path = path
1841
+
1842
+ def Clean(self, targets, files):
1843
+ global CleanTargets
1844
+ tlist = self.arg2nodes(targets, self.fs.Entry)
1845
+ flist = self.arg2nodes(files, self.fs.Entry)
1846
+ for t in tlist:
1847
+ try:
1848
+ CleanTargets[t].extend(flist)
1849
+ except KeyError:
1850
+ CleanTargets[t] = flist
1851
+
1852
+ def Configure(self, *args, **kw):
1853
+ nargs = [self]
1854
+ if args:
1855
+ nargs = nargs + self.subst_list(args)[0]
1856
+ nkw = self.subst_kw(kw)
1857
+ nkw['_depth'] = kw.get('_depth', 0) + 1
1858
+ try:
1859
+ nkw['custom_tests'] = self.subst_kw(nkw['custom_tests'])
1860
+ except KeyError:
1861
+ pass
1862
+ return apply(SCons.SConf.SConf, nargs, nkw)
1863
+
1864
+ def Command(self, target, source, action, **kw):
1865
+ """Builds the supplied target files from the supplied
1866
+ source files using the supplied action. Action may
1867
+ be any type that the Builder constructor will accept
1868
+ for an action."""
1869
+ bkw = {
1870
+ 'action' : action,
1871
+ 'target_factory' : self.fs.Entry,
1872
+ 'source_factory' : self.fs.Entry,
1873
+ }
1874
+ try: bkw['source_scanner'] = kw['source_scanner']
1875
+ except KeyError: pass
1876
+ else: del kw['source_scanner']
1877
+ bld = apply(SCons.Builder.Builder, (), bkw)
1878
+ return apply(bld, (self, target, source), kw)
1879
+
1880
+ def Depends(self, target, dependency):
1881
+ """Explicity specify that 'target's depend on 'dependency'."""
1882
+ tlist = self.arg2nodes(target, self.fs.Entry)
1883
+ dlist = self.arg2nodes(dependency, self.fs.Entry)
1884
+ for t in tlist:
1885
+ t.add_dependency(dlist)
1886
+ return tlist
1887
+
1888
+ def Dir(self, name, *args, **kw):
1889
+ """
1890
+ """
1891
+ s = self.subst(name)
1892
+ if SCons.Util.is_Sequence(s):
1893
+ result=[]
1894
+ for e in s:
1895
+ result.append(apply(self.fs.Dir, (e,) + args, kw))
1896
+ return result
1897
+ return apply(self.fs.Dir, (s,) + args, kw)
1898
+
1899
+ def NoClean(self, *targets):
1900
+ """Tags a target so that it will not be cleaned by -c"""
1901
+ tlist = []
1902
+ for t in targets:
1903
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
1904
+ for t in tlist:
1905
+ t.set_noclean()
1906
+ return tlist
1907
+
1908
+ def NoCache(self, *targets):
1909
+ """Tags a target so that it will not be cached"""
1910
+ tlist = []
1911
+ for t in targets:
1912
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
1913
+ for t in tlist:
1914
+ t.set_nocache()
1915
+ return tlist
1916
+
1917
+ def Entry(self, name, *args, **kw):
1918
+ """
1919
+ """
1920
+ s = self.subst(name)
1921
+ if SCons.Util.is_Sequence(s):
1922
+ result=[]
1923
+ for e in s:
1924
+ result.append(apply(self.fs.Entry, (e,) + args, kw))
1925
+ return result
1926
+ return apply(self.fs.Entry, (s,) + args, kw)
1927
+
1928
+ def Environment(self, **kw):
1929
+ return apply(SCons.Environment.Environment, [], self.subst_kw(kw))
1930
+
1931
+ def Execute(self, action, *args, **kw):
1932
+ """Directly execute an action through an Environment
1933
+ """
1934
+ action = apply(self.Action, (action,) + args, kw)
1935
+ result = action([], [], self)
1936
+ if isinstance(result, SCons.Errors.BuildError):
1937
+ errstr = result.errstr
1938
+ if result.filename:
1939
+ errstr = result.filename + ': ' + errstr
1940
+ sys.stderr.write("scons: *** %s\n" % errstr)
1941
+ return result.status
1942
+ else:
1943
+ return result
1944
+
1945
+ def File(self, name, *args, **kw):
1946
+ """
1947
+ """
1948
+ s = self.subst(name)
1949
+ if SCons.Util.is_Sequence(s):
1950
+ result=[]
1951
+ for e in s:
1952
+ result.append(apply(self.fs.File, (e,) + args, kw))
1953
+ return result
1954
+ return apply(self.fs.File, (s,) + args, kw)
1955
+
1956
+ def FindFile(self, file, dirs):
1957
+ file = self.subst(file)
1958
+ nodes = self.arg2nodes(dirs, self.fs.Dir)
1959
+ return SCons.Node.FS.find_file(file, tuple(nodes))
1960
+
1961
+ def Flatten(self, sequence):
1962
+ return SCons.Util.flatten(sequence)
1963
+
1964
+ def GetBuildPath(self, files):
1965
+ result = map(str, self.arg2nodes(files, self.fs.Entry))
1966
+ if SCons.Util.is_List(files):
1967
+ return result
1968
+ else:
1969
+ return result[0]
1970
+
1971
+ def Glob(self, pattern, ondisk=True, source=False, strings=False):
1972
+ return self.fs.Glob(self.subst(pattern), ondisk, source, strings)
1973
+
1974
+ def Ignore(self, target, dependency):
1975
+ """Ignore a dependency."""
1976
+ tlist = self.arg2nodes(target, self.fs.Entry)
1977
+ dlist = self.arg2nodes(dependency, self.fs.Entry)
1978
+ for t in tlist:
1979
+ t.add_ignore(dlist)
1980
+ return tlist
1981
+
1982
+ def Literal(self, string):
1983
+ return SCons.Subst.Literal(string)
1984
+
1985
+ def Local(self, *targets):
1986
+ ret = []
1987
+ for targ in targets:
1988
+ if isinstance(targ, SCons.Node.Node):
1989
+ targ.set_local()
1990
+ ret.append(targ)
1991
+ else:
1992
+ for t in self.arg2nodes(targ, self.fs.Entry):
1993
+ t.set_local()
1994
+ ret.append(t)
1995
+ return ret
1996
+
1997
+ def Precious(self, *targets):
1998
+ tlist = []
1999
+ for t in targets:
2000
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
2001
+ for t in tlist:
2002
+ t.set_precious()
2003
+ return tlist
2004
+
2005
+ def Repository(self, *dirs, **kw):
2006
+ dirs = self.arg2nodes(list(dirs), self.fs.Dir)
2007
+ apply(self.fs.Repository, dirs, kw)
2008
+
2009
+ def Requires(self, target, prerequisite):
2010
+ """Specify that 'prerequisite' must be built before 'target',
2011
+ (but 'target' does not actually depend on 'prerequisite'
2012
+ and need not be rebuilt if it changes)."""
2013
+ tlist = self.arg2nodes(target, self.fs.Entry)
2014
+ plist = self.arg2nodes(prerequisite, self.fs.Entry)
2015
+ for t in tlist:
2016
+ t.add_prerequisite(plist)
2017
+ return tlist
2018
+
2019
+ def Scanner(self, *args, **kw):
2020
+ nargs = []
2021
+ for arg in args:
2022
+ if SCons.Util.is_String(arg):
2023
+ arg = self.subst(arg)
2024
+ nargs.append(arg)
2025
+ nkw = self.subst_kw(kw)
2026
+ return apply(SCons.Scanner.Base, nargs, nkw)
2027
+
2028
+ def SConsignFile(self, name=".sconsign", dbm_module=None):
2029
+ if name is not None:
2030
+ name = self.subst(name)
2031
+ if not os.path.isabs(name):
2032
+ name = os.path.join(str(self.fs.SConstruct_dir), name)
2033
+ if name:
2034
+ name = os.path.normpath(name)
2035
+ sconsign_dir = os.path.dirname(name)
2036
+ if sconsign_dir and not os.path.exists(sconsign_dir):
2037
+ self.Execute(SCons.Defaults.Mkdir(sconsign_dir))
2038
+ SCons.SConsign.File(name, dbm_module)
2039
+
2040
+ def SideEffect(self, side_effect, target):
2041
+ """Tell scons that side_effects are built as side
2042
+ effects of building targets."""
2043
+ side_effects = self.arg2nodes(side_effect, self.fs.Entry)
2044
+ targets = self.arg2nodes(target, self.fs.Entry)
2045
+
2046
+ for side_effect in side_effects:
2047
+ if side_effect.multiple_side_effect_has_builder():
2048
+ raise SCons.Errors.UserError, "Multiple ways to build the same target were specified for: %s" % str(side_effect)
2049
+ side_effect.add_source(targets)
2050
+ side_effect.side_effect = 1
2051
+ self.Precious(side_effect)
2052
+ for target in targets:
2053
+ target.side_effects.append(side_effect)
2054
+ return side_effects
2055
+
2056
+ def SourceCode(self, entry, builder):
2057
+ """Arrange for a source code builder for (part of) a tree."""
2058
+ entries = self.arg2nodes(entry, self.fs.Entry)
2059
+ for entry in entries:
2060
+ entry.set_src_builder(builder)
2061
+ return entries
2062
+
2063
+ def SourceSignatures(self, type):
2064
+ global _warn_source_signatures_deprecated
2065
+ if _warn_source_signatures_deprecated:
2066
+ msg = "The env.SourceSignatures() method is deprecated;\n" + \
2067
+ "\tconvert your build to use the env.Decider() method instead."
2068
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceSignaturesWarning, msg)
2069
+ _warn_source_signatures_deprecated = False
2070
+ type = self.subst(type)
2071
+ self.src_sig_type = type
2072
+ if type == 'MD5':
2073
+ if not SCons.Util.md5:
2074
+ raise UserError, "MD5 signatures are not available in this version of Python."
2075
+ self.decide_source = self._changed_content
2076
+ elif type == 'timestamp':
2077
+ self.decide_source = self._changed_timestamp_match
2078
+ else:
2079
+ raise UserError, "Unknown source signature type '%s'" % type
2080
+
2081
+ def Split(self, arg):
2082
+ """This function converts a string or list into a list of strings
2083
+ or Nodes. This makes things easier for users by allowing files to
2084
+ be specified as a white-space separated list to be split.
2085
+ The input rules are:
2086
+ - A single string containing names separated by spaces. These will be
2087
+ split apart at the spaces.
2088
+ - A single Node instance
2089
+ - A list containing either strings or Node instances. Any strings
2090
+ in the list are not split at spaces.
2091
+ In all cases, the function returns a list of Nodes and strings."""
2092
+ if SCons.Util.is_List(arg):
2093
+ return map(self.subst, arg)
2094
+ elif SCons.Util.is_String(arg):
2095
+ return string.split(self.subst(arg))
2096
+ else:
2097
+ return [self.subst(arg)]
2098
+
2099
+ def TargetSignatures(self, type):
2100
+ global _warn_target_signatures_deprecated
2101
+ if _warn_target_signatures_deprecated:
2102
+ msg = "The env.TargetSignatures() method is deprecated;\n" + \
2103
+ "\tconvert your build to use the env.Decider() method instead."
2104
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedTargetSignaturesWarning, msg)
2105
+ _warn_target_signatures_deprecated = False
2106
+ type = self.subst(type)
2107
+ self.tgt_sig_type = type
2108
+ if type in ('MD5', 'content'):
2109
+ if not SCons.Util.md5:
2110
+ raise UserError, "MD5 signatures are not available in this version of Python."
2111
+ self.decide_target = self._changed_content
2112
+ elif type == 'timestamp':
2113
+ self.decide_target = self._changed_timestamp_match
2114
+ elif type == 'build':
2115
+ self.decide_target = self._changed_build
2116
+ elif type == 'source':
2117
+ self.decide_target = self._changed_source
2118
+ else:
2119
+ raise UserError, "Unknown target signature type '%s'"%type
2120
+
2121
+ def Value(self, value, built_value=None):
2122
+ """
2123
+ """
2124
+ return SCons.Node.Python.Value(value, built_value)
2125
+
2126
+ def VariantDir(self, variant_dir, src_dir, duplicate=1):
2127
+ variant_dir = self.arg2nodes(variant_dir, self.fs.Dir)[0]
2128
+ src_dir = self.arg2nodes(src_dir, self.fs.Dir)[0]
2129
+ self.fs.VariantDir(variant_dir, src_dir, duplicate)
2130
+
2131
+ def FindSourceFiles(self, node='.'):
2132
+ """ returns a list of all source files.
2133
+ """
2134
+ node = self.arg2nodes(node, self.fs.Entry)[0]
2135
+
2136
+ sources = []
2137
+ # Uncomment this and get rid of the global definition when we
2138
+ # drop support for pre-2.2 Python versions.
2139
+ #def build_source(ss, result):
2140
+ # for s in ss:
2141
+ # if isinstance(s, SCons.Node.FS.Dir):
2142
+ # build_source(s.all_children(), result)
2143
+ # elif s.has_builder():
2144
+ # build_source(s.sources, result)
2145
+ # elif isinstance(s.disambiguate(), SCons.Node.FS.File):
2146
+ # result.append(s)
2147
+ build_source(node.all_children(), sources)
2148
+
2149
+ # THIS CODE APPEARS TO HAVE NO EFFECT
2150
+ # # get the final srcnode for all nodes, this means stripping any
2151
+ # # attached build node by calling the srcnode function
2152
+ # for file in sources:
2153
+ # srcnode = file.srcnode()
2154
+ # while srcnode != file.srcnode():
2155
+ # srcnode = file.srcnode()
2156
+
2157
+ # remove duplicates
2158
+ return list(set(sources))
2159
+
2160
+ def FindInstalledFiles(self):
2161
+ """ returns the list of all targets of the Install and InstallAs Builder.
2162
+ """
2163
+ from SCons.Tool import install
2164
+ if install._UNIQUE_INSTALLED_FILES is None:
2165
+ install._UNIQUE_INSTALLED_FILES = SCons.Util.uniquer_hashables(install._INSTALLED_FILES)
2166
+ return install._UNIQUE_INSTALLED_FILES
2167
+
2168
+ class OverrideEnvironment(Base):
2169
+ """A proxy that overrides variables in a wrapped construction
2170
+ environment by returning values from an overrides dictionary in
2171
+ preference to values from the underlying subject environment.
2172
+
2173
+ This is a lightweight (I hope) proxy that passes through most use of
2174
+ attributes to the underlying Environment.Base class, but has just
2175
+ enough additional methods defined to act like a real construction
2176
+ environment with overridden values. It can wrap either a Base
2177
+ construction environment, or another OverrideEnvironment, which
2178
+ can in turn nest arbitrary OverrideEnvironments...
2179
+
2180
+ Note that we do *not* call the underlying base class
2181
+ (SubsitutionEnvironment) initialization, because we get most of those
2182
+ from proxying the attributes of the subject construction environment.
2183
+ But because we subclass SubstitutionEnvironment, this class also
2184
+ has inherited arg2nodes() and subst*() methods; those methods can't
2185
+ be proxied because they need *this* object's methods to fetch the
2186
+ values from the overrides dictionary.
2187
+ """
2188
+
2189
+ def __init__(self, subject, overrides={}):
2190
+ if __debug__: logInstanceCreation(self, 'Environment.OverrideEnvironment')
2191
+ self.__dict__['__subject'] = subject
2192
+ self.__dict__['overrides'] = overrides
2193
+
2194
+ # Methods that make this class act like a proxy.
2195
+ def __getattr__(self, name):
2196
+ return getattr(self.__dict__['__subject'], name)
2197
+ def __setattr__(self, name, value):
2198
+ setattr(self.__dict__['__subject'], name, value)
2199
+
2200
+ # Methods that make this class act like a dictionary.
2201
+ def __getitem__(self, key):
2202
+ try:
2203
+ return self.__dict__['overrides'][key]
2204
+ except KeyError:
2205
+ return self.__dict__['__subject'].__getitem__(key)
2206
+ def __setitem__(self, key, value):
2207
+ if not is_valid_construction_var(key):
2208
+ raise SCons.Errors.UserError, "Illegal construction variable `%s'" % key
2209
+ self.__dict__['overrides'][key] = value
2210
+ def __delitem__(self, key):
2211
+ try:
2212
+ del self.__dict__['overrides'][key]
2213
+ except KeyError:
2214
+ deleted = 0
2215
+ else:
2216
+ deleted = 1
2217
+ try:
2218
+ result = self.__dict__['__subject'].__delitem__(key)
2219
+ except KeyError:
2220
+ if not deleted:
2221
+ raise
2222
+ result = None
2223
+ return result
2224
+ def get(self, key, default=None):
2225
+ """Emulates the get() method of dictionaries."""
2226
+ try:
2227
+ return self.__dict__['overrides'][key]
2228
+ except KeyError:
2229
+ return self.__dict__['__subject'].get(key, default)
2230
+ def has_key(self, key):
2231
+ try:
2232
+ self.__dict__['overrides'][key]
2233
+ return 1
2234
+ except KeyError:
2235
+ return self.__dict__['__subject'].has_key(key)
2236
+ def __contains__(self, key):
2237
+ if self.__dict__['overrides'].__contains__(key):
2238
+ return 1
2239
+ return self.__dict__['__subject'].__contains__(key)
2240
+ def Dictionary(self):
2241
+ """Emulates the items() method of dictionaries."""
2242
+ d = self.__dict__['__subject'].Dictionary().copy()
2243
+ d.update(self.__dict__['overrides'])
2244
+ return d
2245
+ def items(self):
2246
+ """Emulates the items() method of dictionaries."""
2247
+ return self.Dictionary().items()
2248
+
2249
+ # Overridden private construction environment methods.
2250
+ def _update(self, dict):
2251
+ """Update an environment's values directly, bypassing the normal
2252
+ checks that occur when users try to set items.
2253
+ """
2254
+ self.__dict__['overrides'].update(dict)
2255
+
2256
+ def gvars(self):
2257
+ return self.__dict__['__subject'].gvars()
2258
+
2259
+ def lvars(self):
2260
+ lvars = self.__dict__['__subject'].lvars()
2261
+ lvars.update(self.__dict__['overrides'])
2262
+ return lvars
2263
+
2264
+ # Overridden public construction environment methods.
2265
+ def Replace(self, **kw):
2266
+ kw = copy_non_reserved_keywords(kw)
2267
+ self.__dict__['overrides'].update(semi_deepcopy(kw))
2268
+
2269
+ # The entry point that will be used by the external world
2270
+ # to refer to a construction environment. This allows the wrapper
2271
+ # interface to extend a construction environment for its own purposes
2272
+ # by subclassing SCons.Environment.Base and then assigning the
2273
+ # class to SCons.Environment.Environment.
2274
+
2275
+ Environment = Base
2276
+
2277
+ # An entry point for returning a proxy subclass instance that overrides
2278
+ # the subst*() methods so they don't actually perform construction
2279
+ # variable substitution. This is specifically intended to be the shim
2280
+ # layer in between global function calls (which don't want construction
2281
+ # variable substitution) and the DefaultEnvironment() (which would
2282
+ # substitute variables if left to its own devices)."""
2283
+ #
2284
+ # We have to wrap this in a function that allows us to delay definition of
2285
+ # the class until it's necessary, so that when it subclasses Environment
2286
+ # it will pick up whatever Environment subclass the wrapper interface
2287
+ # might have assigned to SCons.Environment.Environment.
2288
+
2289
+ def NoSubstitutionProxy(subject):
2290
+ class _NoSubstitutionProxy(Environment):
2291
+ def __init__(self, subject):
2292
+ self.__dict__['__subject'] = subject
2293
+ def __getattr__(self, name):
2294
+ return getattr(self.__dict__['__subject'], name)
2295
+ def __setattr__(self, name, value):
2296
+ return setattr(self.__dict__['__subject'], name, value)
2297
+ def raw_to_mode(self, dict):
2298
+ try:
2299
+ raw = dict['raw']
2300
+ except KeyError:
2301
+ pass
2302
+ else:
2303
+ del dict['raw']
2304
+ dict['mode'] = raw
2305
+ def subst(self, string, *args, **kwargs):
2306
+ return string
2307
+ def subst_kw(self, kw, *args, **kwargs):
2308
+ return kw
2309
+ def subst_list(self, string, *args, **kwargs):
2310
+ nargs = (string, self,) + args
2311
+ nkw = kwargs.copy()
2312
+ nkw['gvars'] = {}
2313
+ self.raw_to_mode(nkw)
2314
+ return apply(SCons.Subst.scons_subst_list, nargs, nkw)
2315
+ def subst_target_source(self, string, *args, **kwargs):
2316
+ nargs = (string, self,) + args
2317
+ nkw = kwargs.copy()
2318
+ nkw['gvars'] = {}
2319
+ self.raw_to_mode(nkw)
2320
+ return apply(SCons.Subst.scons_subst, nargs, nkw)
2321
+ return _NoSubstitutionProxy(subject)
2322
+
2323
+ # Local Variables:
2324
+ # tab-width:4
2325
+ # indent-tabs-mode:nil
2326
+ # End:
2327
+ # vim: set expandtab tabstop=4 shiftwidth=4: