libv8 3.3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (700) hide show
  1. data/.gitignore +8 -0
  2. data/.gitmodules +3 -0
  3. data/Gemfile +4 -0
  4. data/README.md +44 -0
  5. data/Rakefile +73 -0
  6. data/ext/libv8/extconf.rb +9 -0
  7. data/lib/libv8.rb +15 -0
  8. data/lib/libv8/Makefile +38 -0
  9. data/lib/libv8/detect_cpu.rb +27 -0
  10. data/lib/libv8/fpic-on-linux-amd64.patch +13 -0
  11. data/lib/libv8/scons/CHANGES.txt +5334 -0
  12. data/lib/libv8/scons/LICENSE.txt +20 -0
  13. data/lib/libv8/scons/MANIFEST +199 -0
  14. data/lib/libv8/scons/PKG-INFO +13 -0
  15. data/lib/libv8/scons/README.txt +243 -0
  16. data/lib/libv8/scons/RELEASE.txt +98 -0
  17. data/lib/libv8/scons/engine/SCons/Action.py +1241 -0
  18. data/lib/libv8/scons/engine/SCons/Builder.py +877 -0
  19. data/lib/libv8/scons/engine/SCons/CacheDir.py +216 -0
  20. data/lib/libv8/scons/engine/SCons/Conftest.py +793 -0
  21. data/lib/libv8/scons/engine/SCons/Debug.py +220 -0
  22. data/lib/libv8/scons/engine/SCons/Defaults.py +480 -0
  23. data/lib/libv8/scons/engine/SCons/Environment.py +2318 -0
  24. data/lib/libv8/scons/engine/SCons/Errors.py +205 -0
  25. data/lib/libv8/scons/engine/SCons/Executor.py +633 -0
  26. data/lib/libv8/scons/engine/SCons/Job.py +435 -0
  27. data/lib/libv8/scons/engine/SCons/Memoize.py +244 -0
  28. data/lib/libv8/scons/engine/SCons/Node/Alias.py +152 -0
  29. data/lib/libv8/scons/engine/SCons/Node/FS.py +3142 -0
  30. data/lib/libv8/scons/engine/SCons/Node/Python.py +128 -0
  31. data/lib/libv8/scons/engine/SCons/Node/__init__.py +1328 -0
  32. data/lib/libv8/scons/engine/SCons/Options/BoolOption.py +50 -0
  33. data/lib/libv8/scons/engine/SCons/Options/EnumOption.py +50 -0
  34. data/lib/libv8/scons/engine/SCons/Options/ListOption.py +50 -0
  35. data/lib/libv8/scons/engine/SCons/Options/PackageOption.py +50 -0
  36. data/lib/libv8/scons/engine/SCons/Options/PathOption.py +76 -0
  37. data/lib/libv8/scons/engine/SCons/Options/__init__.py +67 -0
  38. data/lib/libv8/scons/engine/SCons/PathList.py +231 -0
  39. data/lib/libv8/scons/engine/SCons/Platform/__init__.py +241 -0
  40. data/lib/libv8/scons/engine/SCons/Platform/aix.py +69 -0
  41. data/lib/libv8/scons/engine/SCons/Platform/cygwin.py +55 -0
  42. data/lib/libv8/scons/engine/SCons/Platform/darwin.py +46 -0
  43. data/lib/libv8/scons/engine/SCons/Platform/hpux.py +46 -0
  44. data/lib/libv8/scons/engine/SCons/Platform/irix.py +44 -0
  45. data/lib/libv8/scons/engine/SCons/Platform/os2.py +58 -0
  46. data/lib/libv8/scons/engine/SCons/Platform/posix.py +263 -0
  47. data/lib/libv8/scons/engine/SCons/Platform/sunos.py +50 -0
  48. data/lib/libv8/scons/engine/SCons/Platform/win32.py +385 -0
  49. data/lib/libv8/scons/engine/SCons/SConf.py +1030 -0
  50. data/lib/libv8/scons/engine/SCons/SConsign.py +383 -0
  51. data/lib/libv8/scons/engine/SCons/Scanner/C.py +132 -0
  52. data/lib/libv8/scons/engine/SCons/Scanner/D.py +73 -0
  53. data/lib/libv8/scons/engine/SCons/Scanner/Dir.py +109 -0
  54. data/lib/libv8/scons/engine/SCons/Scanner/Fortran.py +316 -0
  55. data/lib/libv8/scons/engine/SCons/Scanner/IDL.py +48 -0
  56. data/lib/libv8/scons/engine/SCons/Scanner/LaTeX.py +384 -0
  57. data/lib/libv8/scons/engine/SCons/Scanner/Prog.py +101 -0
  58. data/lib/libv8/scons/engine/SCons/Scanner/RC.py +55 -0
  59. data/lib/libv8/scons/engine/SCons/Scanner/__init__.py +413 -0
  60. data/lib/libv8/scons/engine/SCons/Script/Interactive.py +384 -0
  61. data/lib/libv8/scons/engine/SCons/Script/Main.py +1334 -0
  62. data/lib/libv8/scons/engine/SCons/Script/SConsOptions.py +939 -0
  63. data/lib/libv8/scons/engine/SCons/Script/SConscript.py +640 -0
  64. data/lib/libv8/scons/engine/SCons/Script/__init__.py +412 -0
  65. data/lib/libv8/scons/engine/SCons/Sig.py +63 -0
  66. data/lib/libv8/scons/engine/SCons/Subst.py +904 -0
  67. data/lib/libv8/scons/engine/SCons/Taskmaster.py +1017 -0
  68. data/lib/libv8/scons/engine/SCons/Tool/386asm.py +61 -0
  69. data/lib/libv8/scons/engine/SCons/Tool/BitKeeper.py +67 -0
  70. data/lib/libv8/scons/engine/SCons/Tool/CVS.py +73 -0
  71. data/lib/libv8/scons/engine/SCons/Tool/FortranCommon.py +246 -0
  72. data/lib/libv8/scons/engine/SCons/Tool/JavaCommon.py +323 -0
  73. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/__init__.py +56 -0
  74. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/arch.py +61 -0
  75. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/common.py +240 -0
  76. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/netframework.py +82 -0
  77. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/sdk.py +391 -0
  78. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vc.py +456 -0
  79. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vs.py +499 -0
  80. data/lib/libv8/scons/engine/SCons/Tool/Perforce.py +103 -0
  81. data/lib/libv8/scons/engine/SCons/Tool/PharLapCommon.py +137 -0
  82. data/lib/libv8/scons/engine/SCons/Tool/RCS.py +64 -0
  83. data/lib/libv8/scons/engine/SCons/Tool/SCCS.py +64 -0
  84. data/lib/libv8/scons/engine/SCons/Tool/Subversion.py +71 -0
  85. data/lib/libv8/scons/engine/SCons/Tool/__init__.py +681 -0
  86. data/lib/libv8/scons/engine/SCons/Tool/aixc++.py +82 -0
  87. data/lib/libv8/scons/engine/SCons/Tool/aixcc.py +74 -0
  88. data/lib/libv8/scons/engine/SCons/Tool/aixf77.py +80 -0
  89. data/lib/libv8/scons/engine/SCons/Tool/aixlink.py +76 -0
  90. data/lib/libv8/scons/engine/SCons/Tool/applelink.py +71 -0
  91. data/lib/libv8/scons/engine/SCons/Tool/ar.py +63 -0
  92. data/lib/libv8/scons/engine/SCons/Tool/as.py +78 -0
  93. data/lib/libv8/scons/engine/SCons/Tool/bcc32.py +81 -0
  94. data/lib/libv8/scons/engine/SCons/Tool/c++.py +99 -0
  95. data/lib/libv8/scons/engine/SCons/Tool/cc.py +102 -0
  96. data/lib/libv8/scons/engine/SCons/Tool/cvf.py +58 -0
  97. data/lib/libv8/scons/engine/SCons/Tool/default.py +50 -0
  98. data/lib/libv8/scons/engine/SCons/Tool/dmd.py +223 -0
  99. data/lib/libv8/scons/engine/SCons/Tool/dvi.py +64 -0
  100. data/lib/libv8/scons/engine/SCons/Tool/dvipdf.py +124 -0
  101. data/lib/libv8/scons/engine/SCons/Tool/dvips.py +94 -0
  102. data/lib/libv8/scons/engine/SCons/Tool/f77.py +62 -0
  103. data/lib/libv8/scons/engine/SCons/Tool/f90.py +62 -0
  104. data/lib/libv8/scons/engine/SCons/Tool/f95.py +63 -0
  105. data/lib/libv8/scons/engine/SCons/Tool/filesystem.py +98 -0
  106. data/lib/libv8/scons/engine/SCons/Tool/fortran.py +62 -0
  107. data/lib/libv8/scons/engine/SCons/Tool/g++.py +90 -0
  108. data/lib/libv8/scons/engine/SCons/Tool/g77.py +73 -0
  109. data/lib/libv8/scons/engine/SCons/Tool/gas.py +53 -0
  110. data/lib/libv8/scons/engine/SCons/Tool/gcc.py +80 -0
  111. data/lib/libv8/scons/engine/SCons/Tool/gfortran.py +64 -0
  112. data/lib/libv8/scons/engine/SCons/Tool/gnulink.py +63 -0
  113. data/lib/libv8/scons/engine/SCons/Tool/gs.py +81 -0
  114. data/lib/libv8/scons/engine/SCons/Tool/hpc++.py +84 -0
  115. data/lib/libv8/scons/engine/SCons/Tool/hpcc.py +53 -0
  116. data/lib/libv8/scons/engine/SCons/Tool/hplink.py +77 -0
  117. data/lib/libv8/scons/engine/SCons/Tool/icc.py +59 -0
  118. data/lib/libv8/scons/engine/SCons/Tool/icl.py +52 -0
  119. data/lib/libv8/scons/engine/SCons/Tool/ifl.py +72 -0
  120. data/lib/libv8/scons/engine/SCons/Tool/ifort.py +88 -0
  121. data/lib/libv8/scons/engine/SCons/Tool/ilink.py +59 -0
  122. data/lib/libv8/scons/engine/SCons/Tool/ilink32.py +60 -0
  123. data/lib/libv8/scons/engine/SCons/Tool/install.py +229 -0
  124. data/lib/libv8/scons/engine/SCons/Tool/intelc.py +482 -0
  125. data/lib/libv8/scons/engine/SCons/Tool/ipkg.py +67 -0
  126. data/lib/libv8/scons/engine/SCons/Tool/jar.py +110 -0
  127. data/lib/libv8/scons/engine/SCons/Tool/javac.py +230 -0
  128. data/lib/libv8/scons/engine/SCons/Tool/javah.py +137 -0
  129. data/lib/libv8/scons/engine/SCons/Tool/latex.py +79 -0
  130. data/lib/libv8/scons/engine/SCons/Tool/lex.py +97 -0
  131. data/lib/libv8/scons/engine/SCons/Tool/link.py +121 -0
  132. data/lib/libv8/scons/engine/SCons/Tool/linkloc.py +112 -0
  133. data/lib/libv8/scons/engine/SCons/Tool/m4.py +63 -0
  134. data/lib/libv8/scons/engine/SCons/Tool/masm.py +77 -0
  135. data/lib/libv8/scons/engine/SCons/Tool/midl.py +88 -0
  136. data/lib/libv8/scons/engine/SCons/Tool/mingw.py +158 -0
  137. data/lib/libv8/scons/engine/SCons/Tool/mslib.py +64 -0
  138. data/lib/libv8/scons/engine/SCons/Tool/mslink.py +266 -0
  139. data/lib/libv8/scons/engine/SCons/Tool/mssdk.py +50 -0
  140. data/lib/libv8/scons/engine/SCons/Tool/msvc.py +268 -0
  141. data/lib/libv8/scons/engine/SCons/Tool/msvs.py +1388 -0
  142. data/lib/libv8/scons/engine/SCons/Tool/mwcc.py +207 -0
  143. data/lib/libv8/scons/engine/SCons/Tool/mwld.py +107 -0
  144. data/lib/libv8/scons/engine/SCons/Tool/nasm.py +72 -0
  145. data/lib/libv8/scons/engine/SCons/Tool/packaging/__init__.py +312 -0
  146. data/lib/libv8/scons/engine/SCons/Tool/packaging/ipk.py +185 -0
  147. data/lib/libv8/scons/engine/SCons/Tool/packaging/msi.py +527 -0
  148. data/lib/libv8/scons/engine/SCons/Tool/packaging/rpm.py +365 -0
  149. data/lib/libv8/scons/engine/SCons/Tool/packaging/src_tarbz2.py +43 -0
  150. data/lib/libv8/scons/engine/SCons/Tool/packaging/src_targz.py +43 -0
  151. data/lib/libv8/scons/engine/SCons/Tool/packaging/src_zip.py +43 -0
  152. data/lib/libv8/scons/engine/SCons/Tool/packaging/tarbz2.py +44 -0
  153. data/lib/libv8/scons/engine/SCons/Tool/packaging/targz.py +44 -0
  154. data/lib/libv8/scons/engine/SCons/Tool/packaging/zip.py +44 -0
  155. data/lib/libv8/scons/engine/SCons/Tool/pdf.py +78 -0
  156. data/lib/libv8/scons/engine/SCons/Tool/pdflatex.py +83 -0
  157. data/lib/libv8/scons/engine/SCons/Tool/pdftex.py +108 -0
  158. data/lib/libv8/scons/engine/SCons/Tool/qt.py +336 -0
  159. data/lib/libv8/scons/engine/SCons/Tool/rmic.py +120 -0
  160. data/lib/libv8/scons/engine/SCons/Tool/rpcgen.py +70 -0
  161. data/lib/libv8/scons/engine/SCons/Tool/rpm.py +132 -0
  162. data/lib/libv8/scons/engine/SCons/Tool/sgiar.py +68 -0
  163. data/lib/libv8/scons/engine/SCons/Tool/sgic++.py +58 -0
  164. data/lib/libv8/scons/engine/SCons/Tool/sgicc.py +53 -0
  165. data/lib/libv8/scons/engine/SCons/Tool/sgilink.py +63 -0
  166. data/lib/libv8/scons/engine/SCons/Tool/sunar.py +67 -0
  167. data/lib/libv8/scons/engine/SCons/Tool/sunc++.py +142 -0
  168. data/lib/libv8/scons/engine/SCons/Tool/suncc.py +58 -0
  169. data/lib/libv8/scons/engine/SCons/Tool/sunf77.py +63 -0
  170. data/lib/libv8/scons/engine/SCons/Tool/sunf90.py +64 -0
  171. data/lib/libv8/scons/engine/SCons/Tool/sunf95.py +64 -0
  172. data/lib/libv8/scons/engine/SCons/Tool/sunlink.py +77 -0
  173. data/lib/libv8/scons/engine/SCons/Tool/swig.py +182 -0
  174. data/lib/libv8/scons/engine/SCons/Tool/tar.py +73 -0
  175. data/lib/libv8/scons/engine/SCons/Tool/tex.py +813 -0
  176. data/lib/libv8/scons/engine/SCons/Tool/textfile.py +175 -0
  177. data/lib/libv8/scons/engine/SCons/Tool/tlib.py +53 -0
  178. data/lib/libv8/scons/engine/SCons/Tool/wix.py +99 -0
  179. data/lib/libv8/scons/engine/SCons/Tool/yacc.py +130 -0
  180. data/lib/libv8/scons/engine/SCons/Tool/zip.py +99 -0
  181. data/lib/libv8/scons/engine/SCons/Util.py +1492 -0
  182. data/lib/libv8/scons/engine/SCons/Variables/BoolVariable.py +89 -0
  183. data/lib/libv8/scons/engine/SCons/Variables/EnumVariable.py +103 -0
  184. data/lib/libv8/scons/engine/SCons/Variables/ListVariable.py +135 -0
  185. data/lib/libv8/scons/engine/SCons/Variables/PackageVariable.py +106 -0
  186. data/lib/libv8/scons/engine/SCons/Variables/PathVariable.py +147 -0
  187. data/lib/libv8/scons/engine/SCons/Variables/__init__.py +312 -0
  188. data/lib/libv8/scons/engine/SCons/Warnings.py +246 -0
  189. data/lib/libv8/scons/engine/SCons/__init__.py +49 -0
  190. data/lib/libv8/scons/engine/SCons/compat/__init__.py +237 -0
  191. data/lib/libv8/scons/engine/SCons/compat/_scons_builtins.py +150 -0
  192. data/lib/libv8/scons/engine/SCons/compat/_scons_collections.py +45 -0
  193. data/lib/libv8/scons/engine/SCons/compat/_scons_dbm.py +45 -0
  194. data/lib/libv8/scons/engine/SCons/compat/_scons_hashlib.py +76 -0
  195. data/lib/libv8/scons/engine/SCons/compat/_scons_io.py +45 -0
  196. data/lib/libv8/scons/engine/SCons/compat/_scons_sets.py +563 -0
  197. data/lib/libv8/scons/engine/SCons/compat/_scons_subprocess.py +1281 -0
  198. data/lib/libv8/scons/engine/SCons/cpp.py +589 -0
  199. data/lib/libv8/scons/engine/SCons/dblite.py +251 -0
  200. data/lib/libv8/scons/engine/SCons/exitfuncs.py +77 -0
  201. data/lib/libv8/scons/os_spawnv_fix.diff +83 -0
  202. data/lib/libv8/scons/scons-time.1 +1017 -0
  203. data/lib/libv8/scons/scons.1 +15219 -0
  204. data/lib/libv8/scons/sconsign.1 +208 -0
  205. data/lib/libv8/scons/script/scons +196 -0
  206. data/lib/libv8/scons/script/scons-time +1544 -0
  207. data/lib/libv8/scons/script/scons.bat +31 -0
  208. data/lib/libv8/scons/script/sconsign +513 -0
  209. data/lib/libv8/scons/setup.cfg +6 -0
  210. data/lib/libv8/scons/setup.py +425 -0
  211. data/lib/libv8/v8/.gitignore +35 -0
  212. data/lib/libv8/v8/AUTHORS +44 -0
  213. data/lib/libv8/v8/ChangeLog +2839 -0
  214. data/lib/libv8/v8/LICENSE +52 -0
  215. data/lib/libv8/v8/LICENSE.strongtalk +29 -0
  216. data/lib/libv8/v8/LICENSE.v8 +26 -0
  217. data/lib/libv8/v8/LICENSE.valgrind +45 -0
  218. data/lib/libv8/v8/SConstruct +1478 -0
  219. data/lib/libv8/v8/build/README.txt +49 -0
  220. data/lib/libv8/v8/build/all.gyp +18 -0
  221. data/lib/libv8/v8/build/armu.gypi +32 -0
  222. data/lib/libv8/v8/build/common.gypi +144 -0
  223. data/lib/libv8/v8/build/gyp_v8 +145 -0
  224. data/lib/libv8/v8/include/v8-debug.h +395 -0
  225. data/lib/libv8/v8/include/v8-preparser.h +117 -0
  226. data/lib/libv8/v8/include/v8-profiler.h +505 -0
  227. data/lib/libv8/v8/include/v8-testing.h +104 -0
  228. data/lib/libv8/v8/include/v8.h +4124 -0
  229. data/lib/libv8/v8/include/v8stdint.h +53 -0
  230. data/lib/libv8/v8/preparser/SConscript +38 -0
  231. data/lib/libv8/v8/preparser/preparser-process.cc +379 -0
  232. data/lib/libv8/v8/src/SConscript +368 -0
  233. data/lib/libv8/v8/src/accessors.cc +767 -0
  234. data/lib/libv8/v8/src/accessors.h +123 -0
  235. data/lib/libv8/v8/src/allocation-inl.h +49 -0
  236. data/lib/libv8/v8/src/allocation.cc +122 -0
  237. data/lib/libv8/v8/src/allocation.h +143 -0
  238. data/lib/libv8/v8/src/api.cc +5845 -0
  239. data/lib/libv8/v8/src/api.h +574 -0
  240. data/lib/libv8/v8/src/apinatives.js +110 -0
  241. data/lib/libv8/v8/src/apiutils.h +73 -0
  242. data/lib/libv8/v8/src/arguments.h +118 -0
  243. data/lib/libv8/v8/src/arm/assembler-arm-inl.h +353 -0
  244. data/lib/libv8/v8/src/arm/assembler-arm.cc +2661 -0
  245. data/lib/libv8/v8/src/arm/assembler-arm.h +1375 -0
  246. data/lib/libv8/v8/src/arm/builtins-arm.cc +1658 -0
  247. data/lib/libv8/v8/src/arm/code-stubs-arm.cc +6398 -0
  248. data/lib/libv8/v8/src/arm/code-stubs-arm.h +673 -0
  249. data/lib/libv8/v8/src/arm/codegen-arm.cc +52 -0
  250. data/lib/libv8/v8/src/arm/codegen-arm.h +91 -0
  251. data/lib/libv8/v8/src/arm/constants-arm.cc +152 -0
  252. data/lib/libv8/v8/src/arm/constants-arm.h +775 -0
  253. data/lib/libv8/v8/src/arm/cpu-arm.cc +120 -0
  254. data/lib/libv8/v8/src/arm/debug-arm.cc +317 -0
  255. data/lib/libv8/v8/src/arm/deoptimizer-arm.cc +754 -0
  256. data/lib/libv8/v8/src/arm/disasm-arm.cc +1506 -0
  257. data/lib/libv8/v8/src/arm/frames-arm.cc +45 -0
  258. data/lib/libv8/v8/src/arm/frames-arm.h +168 -0
  259. data/lib/libv8/v8/src/arm/full-codegen-arm.cc +4375 -0
  260. data/lib/libv8/v8/src/arm/ic-arm.cc +1562 -0
  261. data/lib/libv8/v8/src/arm/lithium-arm.cc +2206 -0
  262. data/lib/libv8/v8/src/arm/lithium-arm.h +2348 -0
  263. data/lib/libv8/v8/src/arm/lithium-codegen-arm.cc +4526 -0
  264. data/lib/libv8/v8/src/arm/lithium-codegen-arm.h +403 -0
  265. data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.cc +305 -0
  266. data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.h +84 -0
  267. data/lib/libv8/v8/src/arm/macro-assembler-arm.cc +3163 -0
  268. data/lib/libv8/v8/src/arm/macro-assembler-arm.h +1126 -0
  269. data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.cc +1287 -0
  270. data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.h +253 -0
  271. data/lib/libv8/v8/src/arm/simulator-arm.cc +3424 -0
  272. data/lib/libv8/v8/src/arm/simulator-arm.h +431 -0
  273. data/lib/libv8/v8/src/arm/stub-cache-arm.cc +4243 -0
  274. data/lib/libv8/v8/src/array.js +1366 -0
  275. data/lib/libv8/v8/src/assembler.cc +1207 -0
  276. data/lib/libv8/v8/src/assembler.h +858 -0
  277. data/lib/libv8/v8/src/ast-inl.h +112 -0
  278. data/lib/libv8/v8/src/ast.cc +1146 -0
  279. data/lib/libv8/v8/src/ast.h +2188 -0
  280. data/lib/libv8/v8/src/atomicops.h +167 -0
  281. data/lib/libv8/v8/src/atomicops_internals_arm_gcc.h +145 -0
  282. data/lib/libv8/v8/src/atomicops_internals_mips_gcc.h +169 -0
  283. data/lib/libv8/v8/src/atomicops_internals_x86_gcc.cc +133 -0
  284. data/lib/libv8/v8/src/atomicops_internals_x86_gcc.h +287 -0
  285. data/lib/libv8/v8/src/atomicops_internals_x86_macosx.h +301 -0
  286. data/lib/libv8/v8/src/atomicops_internals_x86_msvc.h +203 -0
  287. data/lib/libv8/v8/src/bignum-dtoa.cc +655 -0
  288. data/lib/libv8/v8/src/bignum-dtoa.h +81 -0
  289. data/lib/libv8/v8/src/bignum.cc +768 -0
  290. data/lib/libv8/v8/src/bignum.h +140 -0
  291. data/lib/libv8/v8/src/bootstrapper.cc +2184 -0
  292. data/lib/libv8/v8/src/bootstrapper.h +188 -0
  293. data/lib/libv8/v8/src/builtins.cc +1707 -0
  294. data/lib/libv8/v8/src/builtins.h +371 -0
  295. data/lib/libv8/v8/src/bytecodes-irregexp.h +105 -0
  296. data/lib/libv8/v8/src/cached-powers.cc +177 -0
  297. data/lib/libv8/v8/src/cached-powers.h +65 -0
  298. data/lib/libv8/v8/src/char-predicates-inl.h +94 -0
  299. data/lib/libv8/v8/src/char-predicates.h +67 -0
  300. data/lib/libv8/v8/src/checks.cc +110 -0
  301. data/lib/libv8/v8/src/checks.h +296 -0
  302. data/lib/libv8/v8/src/circular-queue-inl.h +53 -0
  303. data/lib/libv8/v8/src/circular-queue.cc +122 -0
  304. data/lib/libv8/v8/src/circular-queue.h +103 -0
  305. data/lib/libv8/v8/src/code-stubs.cc +267 -0
  306. data/lib/libv8/v8/src/code-stubs.h +1011 -0
  307. data/lib/libv8/v8/src/code.h +70 -0
  308. data/lib/libv8/v8/src/codegen.cc +231 -0
  309. data/lib/libv8/v8/src/codegen.h +84 -0
  310. data/lib/libv8/v8/src/compilation-cache.cc +540 -0
  311. data/lib/libv8/v8/src/compilation-cache.h +287 -0
  312. data/lib/libv8/v8/src/compiler.cc +786 -0
  313. data/lib/libv8/v8/src/compiler.h +312 -0
  314. data/lib/libv8/v8/src/contexts.cc +347 -0
  315. data/lib/libv8/v8/src/contexts.h +391 -0
  316. data/lib/libv8/v8/src/conversions-inl.h +106 -0
  317. data/lib/libv8/v8/src/conversions.cc +1131 -0
  318. data/lib/libv8/v8/src/conversions.h +135 -0
  319. data/lib/libv8/v8/src/counters.cc +93 -0
  320. data/lib/libv8/v8/src/counters.h +254 -0
  321. data/lib/libv8/v8/src/cpu-profiler-inl.h +101 -0
  322. data/lib/libv8/v8/src/cpu-profiler.cc +609 -0
  323. data/lib/libv8/v8/src/cpu-profiler.h +302 -0
  324. data/lib/libv8/v8/src/cpu.h +69 -0
  325. data/lib/libv8/v8/src/d8-debug.cc +367 -0
  326. data/lib/libv8/v8/src/d8-debug.h +158 -0
  327. data/lib/libv8/v8/src/d8-posix.cc +695 -0
  328. data/lib/libv8/v8/src/d8-readline.cc +130 -0
  329. data/lib/libv8/v8/src/d8-windows.cc +42 -0
  330. data/lib/libv8/v8/src/d8.cc +803 -0
  331. data/lib/libv8/v8/src/d8.gyp +91 -0
  332. data/lib/libv8/v8/src/d8.h +235 -0
  333. data/lib/libv8/v8/src/d8.js +2798 -0
  334. data/lib/libv8/v8/src/data-flow.cc +66 -0
  335. data/lib/libv8/v8/src/data-flow.h +205 -0
  336. data/lib/libv8/v8/src/date.js +1103 -0
  337. data/lib/libv8/v8/src/dateparser-inl.h +127 -0
  338. data/lib/libv8/v8/src/dateparser.cc +178 -0
  339. data/lib/libv8/v8/src/dateparser.h +266 -0
  340. data/lib/libv8/v8/src/debug-agent.cc +447 -0
  341. data/lib/libv8/v8/src/debug-agent.h +129 -0
  342. data/lib/libv8/v8/src/debug-debugger.js +2569 -0
  343. data/lib/libv8/v8/src/debug.cc +3165 -0
  344. data/lib/libv8/v8/src/debug.h +1057 -0
  345. data/lib/libv8/v8/src/deoptimizer.cc +1256 -0
  346. data/lib/libv8/v8/src/deoptimizer.h +602 -0
  347. data/lib/libv8/v8/src/disasm.h +80 -0
  348. data/lib/libv8/v8/src/disassembler.cc +343 -0
  349. data/lib/libv8/v8/src/disassembler.h +58 -0
  350. data/lib/libv8/v8/src/diy-fp.cc +58 -0
  351. data/lib/libv8/v8/src/diy-fp.h +117 -0
  352. data/lib/libv8/v8/src/double.h +238 -0
  353. data/lib/libv8/v8/src/dtoa.cc +103 -0
  354. data/lib/libv8/v8/src/dtoa.h +85 -0
  355. data/lib/libv8/v8/src/execution.cc +849 -0
  356. data/lib/libv8/v8/src/execution.h +297 -0
  357. data/lib/libv8/v8/src/extensions/experimental/break-iterator.cc +250 -0
  358. data/lib/libv8/v8/src/extensions/experimental/break-iterator.h +89 -0
  359. data/lib/libv8/v8/src/extensions/experimental/collator.cc +218 -0
  360. data/lib/libv8/v8/src/extensions/experimental/collator.h +69 -0
  361. data/lib/libv8/v8/src/extensions/experimental/experimental.gyp +94 -0
  362. data/lib/libv8/v8/src/extensions/experimental/i18n-extension.cc +78 -0
  363. data/lib/libv8/v8/src/extensions/experimental/i18n-extension.h +54 -0
  364. data/lib/libv8/v8/src/extensions/experimental/i18n-locale.cc +112 -0
  365. data/lib/libv8/v8/src/extensions/experimental/i18n-locale.h +60 -0
  366. data/lib/libv8/v8/src/extensions/experimental/i18n-utils.cc +43 -0
  367. data/lib/libv8/v8/src/extensions/experimental/i18n-utils.h +49 -0
  368. data/lib/libv8/v8/src/extensions/experimental/i18n.js +180 -0
  369. data/lib/libv8/v8/src/extensions/experimental/language-matcher.cc +251 -0
  370. data/lib/libv8/v8/src/extensions/experimental/language-matcher.h +95 -0
  371. data/lib/libv8/v8/src/extensions/externalize-string-extension.cc +141 -0
  372. data/lib/libv8/v8/src/extensions/externalize-string-extension.h +50 -0
  373. data/lib/libv8/v8/src/extensions/gc-extension.cc +58 -0
  374. data/lib/libv8/v8/src/extensions/gc-extension.h +49 -0
  375. data/lib/libv8/v8/src/factory.cc +1222 -0
  376. data/lib/libv8/v8/src/factory.h +442 -0
  377. data/lib/libv8/v8/src/fast-dtoa.cc +736 -0
  378. data/lib/libv8/v8/src/fast-dtoa.h +83 -0
  379. data/lib/libv8/v8/src/fixed-dtoa.cc +405 -0
  380. data/lib/libv8/v8/src/fixed-dtoa.h +55 -0
  381. data/lib/libv8/v8/src/flag-definitions.h +560 -0
  382. data/lib/libv8/v8/src/flags.cc +551 -0
  383. data/lib/libv8/v8/src/flags.h +79 -0
  384. data/lib/libv8/v8/src/frames-inl.h +247 -0
  385. data/lib/libv8/v8/src/frames.cc +1243 -0
  386. data/lib/libv8/v8/src/frames.h +870 -0
  387. data/lib/libv8/v8/src/full-codegen.cc +1374 -0
  388. data/lib/libv8/v8/src/full-codegen.h +771 -0
  389. data/lib/libv8/v8/src/func-name-inferrer.cc +92 -0
  390. data/lib/libv8/v8/src/func-name-inferrer.h +111 -0
  391. data/lib/libv8/v8/src/gdb-jit.cc +1555 -0
  392. data/lib/libv8/v8/src/gdb-jit.h +143 -0
  393. data/lib/libv8/v8/src/global-handles.cc +665 -0
  394. data/lib/libv8/v8/src/global-handles.h +284 -0
  395. data/lib/libv8/v8/src/globals.h +325 -0
  396. data/lib/libv8/v8/src/handles-inl.h +177 -0
  397. data/lib/libv8/v8/src/handles.cc +987 -0
  398. data/lib/libv8/v8/src/handles.h +382 -0
  399. data/lib/libv8/v8/src/hashmap.cc +230 -0
  400. data/lib/libv8/v8/src/hashmap.h +123 -0
  401. data/lib/libv8/v8/src/heap-inl.h +704 -0
  402. data/lib/libv8/v8/src/heap-profiler.cc +1173 -0
  403. data/lib/libv8/v8/src/heap-profiler.h +397 -0
  404. data/lib/libv8/v8/src/heap.cc +5930 -0
  405. data/lib/libv8/v8/src/heap.h +2268 -0
  406. data/lib/libv8/v8/src/hydrogen-instructions.cc +1769 -0
  407. data/lib/libv8/v8/src/hydrogen-instructions.h +3971 -0
  408. data/lib/libv8/v8/src/hydrogen.cc +6239 -0
  409. data/lib/libv8/v8/src/hydrogen.h +1202 -0
  410. data/lib/libv8/v8/src/ia32/assembler-ia32-inl.h +446 -0
  411. data/lib/libv8/v8/src/ia32/assembler-ia32.cc +2487 -0
  412. data/lib/libv8/v8/src/ia32/assembler-ia32.h +1144 -0
  413. data/lib/libv8/v8/src/ia32/builtins-ia32.cc +1621 -0
  414. data/lib/libv8/v8/src/ia32/code-stubs-ia32.cc +6198 -0
  415. data/lib/libv8/v8/src/ia32/code-stubs-ia32.h +517 -0
  416. data/lib/libv8/v8/src/ia32/codegen-ia32.cc +265 -0
  417. data/lib/libv8/v8/src/ia32/codegen-ia32.h +79 -0
  418. data/lib/libv8/v8/src/ia32/cpu-ia32.cc +88 -0
  419. data/lib/libv8/v8/src/ia32/debug-ia32.cc +312 -0
  420. data/lib/libv8/v8/src/ia32/deoptimizer-ia32.cc +774 -0
  421. data/lib/libv8/v8/src/ia32/disasm-ia32.cc +1628 -0
  422. data/lib/libv8/v8/src/ia32/frames-ia32.cc +45 -0
  423. data/lib/libv8/v8/src/ia32/frames-ia32.h +142 -0
  424. data/lib/libv8/v8/src/ia32/full-codegen-ia32.cc +4338 -0
  425. data/lib/libv8/v8/src/ia32/ic-ia32.cc +1597 -0
  426. data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.cc +4461 -0
  427. data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.h +375 -0
  428. data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.cc +475 -0
  429. data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  430. data/lib/libv8/v8/src/ia32/lithium-ia32.cc +2261 -0
  431. data/lib/libv8/v8/src/ia32/lithium-ia32.h +2396 -0
  432. data/lib/libv8/v8/src/ia32/macro-assembler-ia32.cc +2136 -0
  433. data/lib/libv8/v8/src/ia32/macro-assembler-ia32.h +775 -0
  434. data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.cc +1263 -0
  435. data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.h +216 -0
  436. data/lib/libv8/v8/src/ia32/simulator-ia32.cc +30 -0
  437. data/lib/libv8/v8/src/ia32/simulator-ia32.h +74 -0
  438. data/lib/libv8/v8/src/ia32/stub-cache-ia32.cc +3847 -0
  439. data/lib/libv8/v8/src/ic-inl.h +130 -0
  440. data/lib/libv8/v8/src/ic.cc +2577 -0
  441. data/lib/libv8/v8/src/ic.h +736 -0
  442. data/lib/libv8/v8/src/inspector.cc +63 -0
  443. data/lib/libv8/v8/src/inspector.h +62 -0
  444. data/lib/libv8/v8/src/interpreter-irregexp.cc +659 -0
  445. data/lib/libv8/v8/src/interpreter-irregexp.h +49 -0
  446. data/lib/libv8/v8/src/isolate-inl.h +50 -0
  447. data/lib/libv8/v8/src/isolate.cc +1869 -0
  448. data/lib/libv8/v8/src/isolate.h +1382 -0
  449. data/lib/libv8/v8/src/json-parser.cc +504 -0
  450. data/lib/libv8/v8/src/json-parser.h +161 -0
  451. data/lib/libv8/v8/src/json.js +342 -0
  452. data/lib/libv8/v8/src/jsregexp.cc +5385 -0
  453. data/lib/libv8/v8/src/jsregexp.h +1492 -0
  454. data/lib/libv8/v8/src/list-inl.h +212 -0
  455. data/lib/libv8/v8/src/list.h +174 -0
  456. data/lib/libv8/v8/src/lithium-allocator-inl.h +142 -0
  457. data/lib/libv8/v8/src/lithium-allocator.cc +2123 -0
  458. data/lib/libv8/v8/src/lithium-allocator.h +630 -0
  459. data/lib/libv8/v8/src/lithium.cc +190 -0
  460. data/lib/libv8/v8/src/lithium.h +597 -0
  461. data/lib/libv8/v8/src/liveedit-debugger.js +1082 -0
  462. data/lib/libv8/v8/src/liveedit.cc +1691 -0
  463. data/lib/libv8/v8/src/liveedit.h +180 -0
  464. data/lib/libv8/v8/src/liveobjectlist-inl.h +126 -0
  465. data/lib/libv8/v8/src/liveobjectlist.cc +2589 -0
  466. data/lib/libv8/v8/src/liveobjectlist.h +322 -0
  467. data/lib/libv8/v8/src/log-inl.h +59 -0
  468. data/lib/libv8/v8/src/log-utils.cc +428 -0
  469. data/lib/libv8/v8/src/log-utils.h +231 -0
  470. data/lib/libv8/v8/src/log.cc +1993 -0
  471. data/lib/libv8/v8/src/log.h +476 -0
  472. data/lib/libv8/v8/src/macro-assembler.h +120 -0
  473. data/lib/libv8/v8/src/macros.py +178 -0
  474. data/lib/libv8/v8/src/mark-compact.cc +3143 -0
  475. data/lib/libv8/v8/src/mark-compact.h +506 -0
  476. data/lib/libv8/v8/src/math.js +264 -0
  477. data/lib/libv8/v8/src/messages.cc +179 -0
  478. data/lib/libv8/v8/src/messages.h +113 -0
  479. data/lib/libv8/v8/src/messages.js +1096 -0
  480. data/lib/libv8/v8/src/mips/assembler-mips-inl.h +312 -0
  481. data/lib/libv8/v8/src/mips/assembler-mips.cc +1960 -0
  482. data/lib/libv8/v8/src/mips/assembler-mips.h +1138 -0
  483. data/lib/libv8/v8/src/mips/builtins-mips.cc +1628 -0
  484. data/lib/libv8/v8/src/mips/code-stubs-mips.cc +6656 -0
  485. data/lib/libv8/v8/src/mips/code-stubs-mips.h +682 -0
  486. data/lib/libv8/v8/src/mips/codegen-mips.cc +52 -0
  487. data/lib/libv8/v8/src/mips/codegen-mips.h +98 -0
  488. data/lib/libv8/v8/src/mips/constants-mips.cc +352 -0
  489. data/lib/libv8/v8/src/mips/constants-mips.h +739 -0
  490. data/lib/libv8/v8/src/mips/cpu-mips.cc +96 -0
  491. data/lib/libv8/v8/src/mips/debug-mips.cc +308 -0
  492. data/lib/libv8/v8/src/mips/deoptimizer-mips.cc +91 -0
  493. data/lib/libv8/v8/src/mips/disasm-mips.cc +1050 -0
  494. data/lib/libv8/v8/src/mips/frames-mips.cc +47 -0
  495. data/lib/libv8/v8/src/mips/frames-mips.h +219 -0
  496. data/lib/libv8/v8/src/mips/full-codegen-mips.cc +4388 -0
  497. data/lib/libv8/v8/src/mips/ic-mips.cc +1580 -0
  498. data/lib/libv8/v8/src/mips/lithium-codegen-mips.h +65 -0
  499. data/lib/libv8/v8/src/mips/lithium-mips.h +307 -0
  500. data/lib/libv8/v8/src/mips/macro-assembler-mips.cc +4056 -0
  501. data/lib/libv8/v8/src/mips/macro-assembler-mips.h +1214 -0
  502. data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.cc +1251 -0
  503. data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.h +252 -0
  504. data/lib/libv8/v8/src/mips/simulator-mips.cc +2621 -0
  505. data/lib/libv8/v8/src/mips/simulator-mips.h +401 -0
  506. data/lib/libv8/v8/src/mips/stub-cache-mips.cc +4285 -0
  507. data/lib/libv8/v8/src/mirror-debugger.js +2382 -0
  508. data/lib/libv8/v8/src/mksnapshot.cc +328 -0
  509. data/lib/libv8/v8/src/natives.h +64 -0
  510. data/lib/libv8/v8/src/objects-debug.cc +738 -0
  511. data/lib/libv8/v8/src/objects-inl.h +4323 -0
  512. data/lib/libv8/v8/src/objects-printer.cc +829 -0
  513. data/lib/libv8/v8/src/objects-visiting.cc +148 -0
  514. data/lib/libv8/v8/src/objects-visiting.h +424 -0
  515. data/lib/libv8/v8/src/objects.cc +10585 -0
  516. data/lib/libv8/v8/src/objects.h +6838 -0
  517. data/lib/libv8/v8/src/parser.cc +4997 -0
  518. data/lib/libv8/v8/src/parser.h +765 -0
  519. data/lib/libv8/v8/src/platform-cygwin.cc +779 -0
  520. data/lib/libv8/v8/src/platform-freebsd.cc +826 -0
  521. data/lib/libv8/v8/src/platform-linux.cc +1149 -0
  522. data/lib/libv8/v8/src/platform-macos.cc +830 -0
  523. data/lib/libv8/v8/src/platform-nullos.cc +479 -0
  524. data/lib/libv8/v8/src/platform-openbsd.cc +640 -0
  525. data/lib/libv8/v8/src/platform-posix.cc +424 -0
  526. data/lib/libv8/v8/src/platform-solaris.cc +762 -0
  527. data/lib/libv8/v8/src/platform-tls-mac.h +62 -0
  528. data/lib/libv8/v8/src/platform-tls-win32.h +62 -0
  529. data/lib/libv8/v8/src/platform-tls.h +50 -0
  530. data/lib/libv8/v8/src/platform-win32.cc +2021 -0
  531. data/lib/libv8/v8/src/platform.h +667 -0
  532. data/lib/libv8/v8/src/preparse-data-format.h +62 -0
  533. data/lib/libv8/v8/src/preparse-data.cc +183 -0
  534. data/lib/libv8/v8/src/preparse-data.h +225 -0
  535. data/lib/libv8/v8/src/preparser-api.cc +220 -0
  536. data/lib/libv8/v8/src/preparser.cc +1450 -0
  537. data/lib/libv8/v8/src/preparser.h +493 -0
  538. data/lib/libv8/v8/src/prettyprinter.cc +1493 -0
  539. data/lib/libv8/v8/src/prettyprinter.h +223 -0
  540. data/lib/libv8/v8/src/profile-generator-inl.h +128 -0
  541. data/lib/libv8/v8/src/profile-generator.cc +3098 -0
  542. data/lib/libv8/v8/src/profile-generator.h +1126 -0
  543. data/lib/libv8/v8/src/property.cc +105 -0
  544. data/lib/libv8/v8/src/property.h +365 -0
  545. data/lib/libv8/v8/src/proxy.js +83 -0
  546. data/lib/libv8/v8/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  547. data/lib/libv8/v8/src/regexp-macro-assembler-irregexp.cc +471 -0
  548. data/lib/libv8/v8/src/regexp-macro-assembler-irregexp.h +142 -0
  549. data/lib/libv8/v8/src/regexp-macro-assembler-tracer.cc +373 -0
  550. data/lib/libv8/v8/src/regexp-macro-assembler-tracer.h +104 -0
  551. data/lib/libv8/v8/src/regexp-macro-assembler.cc +267 -0
  552. data/lib/libv8/v8/src/regexp-macro-assembler.h +243 -0
  553. data/lib/libv8/v8/src/regexp-stack.cc +111 -0
  554. data/lib/libv8/v8/src/regexp-stack.h +147 -0
  555. data/lib/libv8/v8/src/regexp.js +483 -0
  556. data/lib/libv8/v8/src/rewriter.cc +360 -0
  557. data/lib/libv8/v8/src/rewriter.h +50 -0
  558. data/lib/libv8/v8/src/runtime-profiler.cc +489 -0
  559. data/lib/libv8/v8/src/runtime-profiler.h +201 -0
  560. data/lib/libv8/v8/src/runtime.cc +12227 -0
  561. data/lib/libv8/v8/src/runtime.h +652 -0
  562. data/lib/libv8/v8/src/runtime.js +649 -0
  563. data/lib/libv8/v8/src/safepoint-table.cc +256 -0
  564. data/lib/libv8/v8/src/safepoint-table.h +270 -0
  565. data/lib/libv8/v8/src/scanner-base.cc +952 -0
  566. data/lib/libv8/v8/src/scanner-base.h +670 -0
  567. data/lib/libv8/v8/src/scanner.cc +345 -0
  568. data/lib/libv8/v8/src/scanner.h +146 -0
  569. data/lib/libv8/v8/src/scopeinfo.cc +646 -0
  570. data/lib/libv8/v8/src/scopeinfo.h +254 -0
  571. data/lib/libv8/v8/src/scopes.cc +1150 -0
  572. data/lib/libv8/v8/src/scopes.h +507 -0
  573. data/lib/libv8/v8/src/serialize.cc +1574 -0
  574. data/lib/libv8/v8/src/serialize.h +589 -0
  575. data/lib/libv8/v8/src/shell.h +55 -0
  576. data/lib/libv8/v8/src/simulator.h +43 -0
  577. data/lib/libv8/v8/src/small-pointer-list.h +163 -0
  578. data/lib/libv8/v8/src/smart-pointer.h +109 -0
  579. data/lib/libv8/v8/src/snapshot-common.cc +83 -0
  580. data/lib/libv8/v8/src/snapshot-empty.cc +54 -0
  581. data/lib/libv8/v8/src/snapshot.h +91 -0
  582. data/lib/libv8/v8/src/spaces-inl.h +529 -0
  583. data/lib/libv8/v8/src/spaces.cc +3145 -0
  584. data/lib/libv8/v8/src/spaces.h +2369 -0
  585. data/lib/libv8/v8/src/splay-tree-inl.h +310 -0
  586. data/lib/libv8/v8/src/splay-tree.h +205 -0
  587. data/lib/libv8/v8/src/string-search.cc +41 -0
  588. data/lib/libv8/v8/src/string-search.h +568 -0
  589. data/lib/libv8/v8/src/string-stream.cc +592 -0
  590. data/lib/libv8/v8/src/string-stream.h +191 -0
  591. data/lib/libv8/v8/src/string.js +994 -0
  592. data/lib/libv8/v8/src/strtod.cc +440 -0
  593. data/lib/libv8/v8/src/strtod.h +40 -0
  594. data/lib/libv8/v8/src/stub-cache.cc +1965 -0
  595. data/lib/libv8/v8/src/stub-cache.h +924 -0
  596. data/lib/libv8/v8/src/third_party/valgrind/valgrind.h +3925 -0
  597. data/lib/libv8/v8/src/token.cc +63 -0
  598. data/lib/libv8/v8/src/token.h +288 -0
  599. data/lib/libv8/v8/src/type-info.cc +507 -0
  600. data/lib/libv8/v8/src/type-info.h +272 -0
  601. data/lib/libv8/v8/src/unbound-queue-inl.h +95 -0
  602. data/lib/libv8/v8/src/unbound-queue.h +69 -0
  603. data/lib/libv8/v8/src/unicode-inl.h +238 -0
  604. data/lib/libv8/v8/src/unicode.cc +1624 -0
  605. data/lib/libv8/v8/src/unicode.h +280 -0
  606. data/lib/libv8/v8/src/uri.js +408 -0
  607. data/lib/libv8/v8/src/utils-inl.h +48 -0
  608. data/lib/libv8/v8/src/utils.cc +371 -0
  609. data/lib/libv8/v8/src/utils.h +800 -0
  610. data/lib/libv8/v8/src/v8-counters.cc +62 -0
  611. data/lib/libv8/v8/src/v8-counters.h +314 -0
  612. data/lib/libv8/v8/src/v8.cc +213 -0
  613. data/lib/libv8/v8/src/v8.h +131 -0
  614. data/lib/libv8/v8/src/v8checks.h +64 -0
  615. data/lib/libv8/v8/src/v8dll-main.cc +44 -0
  616. data/lib/libv8/v8/src/v8globals.h +512 -0
  617. data/lib/libv8/v8/src/v8memory.h +82 -0
  618. data/lib/libv8/v8/src/v8natives.js +1310 -0
  619. data/lib/libv8/v8/src/v8preparserdll-main.cc +39 -0
  620. data/lib/libv8/v8/src/v8threads.cc +464 -0
  621. data/lib/libv8/v8/src/v8threads.h +165 -0
  622. data/lib/libv8/v8/src/v8utils.h +319 -0
  623. data/lib/libv8/v8/src/variables.cc +114 -0
  624. data/lib/libv8/v8/src/variables.h +167 -0
  625. data/lib/libv8/v8/src/version.cc +116 -0
  626. data/lib/libv8/v8/src/version.h +68 -0
  627. data/lib/libv8/v8/src/vm-state-inl.h +138 -0
  628. data/lib/libv8/v8/src/vm-state.h +71 -0
  629. data/lib/libv8/v8/src/win32-headers.h +96 -0
  630. data/lib/libv8/v8/src/x64/assembler-x64-inl.h +462 -0
  631. data/lib/libv8/v8/src/x64/assembler-x64.cc +3027 -0
  632. data/lib/libv8/v8/src/x64/assembler-x64.h +1633 -0
  633. data/lib/libv8/v8/src/x64/builtins-x64.cc +1520 -0
  634. data/lib/libv8/v8/src/x64/code-stubs-x64.cc +5132 -0
  635. data/lib/libv8/v8/src/x64/code-stubs-x64.h +514 -0
  636. data/lib/libv8/v8/src/x64/codegen-x64.cc +146 -0
  637. data/lib/libv8/v8/src/x64/codegen-x64.h +76 -0
  638. data/lib/libv8/v8/src/x64/cpu-x64.cc +88 -0
  639. data/lib/libv8/v8/src/x64/debug-x64.cc +319 -0
  640. data/lib/libv8/v8/src/x64/deoptimizer-x64.cc +815 -0
  641. data/lib/libv8/v8/src/x64/disasm-x64.cc +1832 -0
  642. data/lib/libv8/v8/src/x64/frames-x64.cc +45 -0
  643. data/lib/libv8/v8/src/x64/frames-x64.h +130 -0
  644. data/lib/libv8/v8/src/x64/full-codegen-x64.cc +4318 -0
  645. data/lib/libv8/v8/src/x64/ic-x64.cc +1608 -0
  646. data/lib/libv8/v8/src/x64/lithium-codegen-x64.cc +4267 -0
  647. data/lib/libv8/v8/src/x64/lithium-codegen-x64.h +367 -0
  648. data/lib/libv8/v8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  649. data/lib/libv8/v8/src/x64/lithium-gap-resolver-x64.h +74 -0
  650. data/lib/libv8/v8/src/x64/lithium-x64.cc +2202 -0
  651. data/lib/libv8/v8/src/x64/lithium-x64.h +2333 -0
  652. data/lib/libv8/v8/src/x64/macro-assembler-x64.cc +3745 -0
  653. data/lib/libv8/v8/src/x64/macro-assembler-x64.h +1290 -0
  654. data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.cc +1398 -0
  655. data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.h +282 -0
  656. data/lib/libv8/v8/src/x64/simulator-x64.cc +27 -0
  657. data/lib/libv8/v8/src/x64/simulator-x64.h +72 -0
  658. data/lib/libv8/v8/src/x64/stub-cache-x64.cc +3610 -0
  659. data/lib/libv8/v8/src/zone-inl.h +140 -0
  660. data/lib/libv8/v8/src/zone.cc +196 -0
  661. data/lib/libv8/v8/src/zone.h +240 -0
  662. data/lib/libv8/v8/tools/codemap.js +265 -0
  663. data/lib/libv8/v8/tools/consarray.js +93 -0
  664. data/lib/libv8/v8/tools/csvparser.js +78 -0
  665. data/lib/libv8/v8/tools/disasm.py +92 -0
  666. data/lib/libv8/v8/tools/freebsd-tick-processor +10 -0
  667. data/lib/libv8/v8/tools/gc-nvp-trace-processor.py +342 -0
  668. data/lib/libv8/v8/tools/gcmole/README +62 -0
  669. data/lib/libv8/v8/tools/gcmole/gccause.lua +60 -0
  670. data/lib/libv8/v8/tools/gcmole/gcmole.cc +1261 -0
  671. data/lib/libv8/v8/tools/gcmole/gcmole.lua +378 -0
  672. data/lib/libv8/v8/tools/generate-ten-powers.scm +286 -0
  673. data/lib/libv8/v8/tools/grokdump.py +841 -0
  674. data/lib/libv8/v8/tools/gyp/v8.gyp +995 -0
  675. data/lib/libv8/v8/tools/js2c.py +364 -0
  676. data/lib/libv8/v8/tools/jsmin.py +280 -0
  677. data/lib/libv8/v8/tools/linux-tick-processor +35 -0
  678. data/lib/libv8/v8/tools/ll_prof.py +942 -0
  679. data/lib/libv8/v8/tools/logreader.js +185 -0
  680. data/lib/libv8/v8/tools/mac-nm +18 -0
  681. data/lib/libv8/v8/tools/mac-tick-processor +6 -0
  682. data/lib/libv8/v8/tools/oom_dump/README +31 -0
  683. data/lib/libv8/v8/tools/oom_dump/SConstruct +42 -0
  684. data/lib/libv8/v8/tools/oom_dump/oom_dump.cc +288 -0
  685. data/lib/libv8/v8/tools/presubmit.py +305 -0
  686. data/lib/libv8/v8/tools/process-heap-prof.py +120 -0
  687. data/lib/libv8/v8/tools/profile.js +751 -0
  688. data/lib/libv8/v8/tools/profile_view.js +219 -0
  689. data/lib/libv8/v8/tools/run-valgrind.py +77 -0
  690. data/lib/libv8/v8/tools/splaytree.js +316 -0
  691. data/lib/libv8/v8/tools/stats-viewer.py +468 -0
  692. data/lib/libv8/v8/tools/test.py +1510 -0
  693. data/lib/libv8/v8/tools/tickprocessor-driver.js +59 -0
  694. data/lib/libv8/v8/tools/tickprocessor.js +877 -0
  695. data/lib/libv8/v8/tools/utils.py +96 -0
  696. data/lib/libv8/v8/tools/visual_studio/README.txt +12 -0
  697. data/lib/libv8/v8/tools/windows-tick-processor.bat +30 -0
  698. data/lib/libv8/version.rb +4 -0
  699. data/libv8.gemspec +31 -0
  700. metadata +800 -0
@@ -0,0 +1,384 @@
1
+ #
2
+ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included
13
+ # in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
16
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
17
+ # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ __revision__ = "src/engine/SCons/Script/Interactive.py 5134 2010/08/16 23:02:40 bdeegan"
24
+
25
+ __doc__ = """
26
+ SCons interactive mode
27
+ """
28
+
29
+ # TODO:
30
+ #
31
+ # This has the potential to grow into something with a really big life
32
+ # of its own, which might or might not be a good thing. Nevertheless,
33
+ # here are some enhancements that will probably be requested some day
34
+ # and are worth keeping in mind (assuming this takes off):
35
+ #
36
+ # - A command to re-read / re-load the SConscript files. This may
37
+ # involve allowing people to specify command-line options (e.g. -f,
38
+ # -I, --no-site-dir) that affect how the SConscript files are read.
39
+ #
40
+ # - Additional command-line options on the "build" command.
41
+ #
42
+ # Of the supported options that seemed to make sense (after a quick
43
+ # pass through the list), the ones that seemed likely enough to be
44
+ # used are listed in the man page and have explicit test scripts.
45
+ #
46
+ # These had code changed in Script/Main.py to support them, but didn't
47
+ # seem likely to be used regularly, so had no test scripts added:
48
+ #
49
+ # build --diskcheck=*
50
+ # build --implicit-cache=*
51
+ # build --implicit-deps-changed=*
52
+ # build --implicit-deps-unchanged=*
53
+ #
54
+ # These look like they should "just work" with no changes to the
55
+ # existing code, but like those above, look unlikely to be used and
56
+ # therefore had no test scripts added:
57
+ #
58
+ # build --random
59
+ #
60
+ # These I'm not sure about. They might be useful for individual
61
+ # "build" commands, and may even work, but they seem unlikely enough
62
+ # that we'll wait until they're requested before spending any time on
63
+ # writing test scripts for them, or investigating whether they work.
64
+ #
65
+ # build -q [??? is there a useful analog to the exit status?]
66
+ # build --duplicate=
67
+ # build --profile=
68
+ # build --max-drift=
69
+ # build --warn=*
70
+ # build --Y
71
+ #
72
+ # - Most of the SCons command-line options that the "build" command
73
+ # supports should be settable as default options that apply to all
74
+ # subsequent "build" commands. Maybe a "set {option}" command that
75
+ # maps to "SetOption('{option}')".
76
+ #
77
+ # - Need something in the 'help' command that prints the -h output.
78
+ #
79
+ # - A command to run the configure subsystem separately (must see how
80
+ # this interacts with the new automake model).
81
+ #
82
+ # - Command-line completion of target names; maybe even of SCons options?
83
+ # Completion is something that's supported by the Python cmd module,
84
+ # so this should be doable without too much trouble.
85
+ #
86
+
87
+ import cmd
88
+ import copy
89
+ import os
90
+ import re
91
+ import shlex
92
+ import sys
93
+
94
+ try:
95
+ import readline
96
+ except ImportError:
97
+ pass
98
+
99
+ class SConsInteractiveCmd(cmd.Cmd):
100
+ """\
101
+ build [TARGETS] Build the specified TARGETS and their dependencies.
102
+ 'b' is a synonym.
103
+ clean [TARGETS] Clean (remove) the specified TARGETS and their
104
+ dependencies. 'c' is a synonym.
105
+ exit Exit SCons interactive mode.
106
+ help [COMMAND] Prints help for the specified COMMAND. 'h' and
107
+ '?' are synonyms.
108
+ shell [COMMANDLINE] Execute COMMANDLINE in a subshell. 'sh' and '!'
109
+ are synonyms.
110
+ version Prints SCons version information.
111
+ """
112
+
113
+ synonyms = {
114
+ 'b' : 'build',
115
+ 'c' : 'clean',
116
+ 'h' : 'help',
117
+ 'scons' : 'build',
118
+ 'sh' : 'shell',
119
+ }
120
+
121
+ def __init__(self, **kw):
122
+ cmd.Cmd.__init__(self)
123
+ for key, val in kw.items():
124
+ setattr(self, key, val)
125
+
126
+ if sys.platform == 'win32':
127
+ self.shell_variable = 'COMSPEC'
128
+ else:
129
+ self.shell_variable = 'SHELL'
130
+
131
+ def default(self, argv):
132
+ print "*** Unknown command: %s" % argv[0]
133
+
134
+ def onecmd(self, line):
135
+ line = line.strip()
136
+ if not line:
137
+ print self.lastcmd
138
+ return self.emptyline()
139
+ self.lastcmd = line
140
+ if line[0] == '!':
141
+ line = 'shell ' + line[1:]
142
+ elif line[0] == '?':
143
+ line = 'help ' + line[1:]
144
+ if os.sep == '\\':
145
+ line = line.replace('\\', '\\\\')
146
+ argv = shlex.split(line)
147
+ argv[0] = self.synonyms.get(argv[0], argv[0])
148
+ if not argv[0]:
149
+ return self.default(line)
150
+ else:
151
+ try:
152
+ func = getattr(self, 'do_' + argv[0])
153
+ except AttributeError:
154
+ return self.default(argv)
155
+ return func(argv)
156
+
157
+ def do_build(self, argv):
158
+ """\
159
+ build [TARGETS] Build the specified TARGETS and their
160
+ dependencies. 'b' is a synonym.
161
+ """
162
+ import SCons.Node
163
+ import SCons.SConsign
164
+ import SCons.Script.Main
165
+
166
+ options = copy.deepcopy(self.options)
167
+
168
+ options, targets = self.parser.parse_args(argv[1:], values=options)
169
+
170
+ SCons.Script.COMMAND_LINE_TARGETS = targets
171
+
172
+ if targets:
173
+ SCons.Script.BUILD_TARGETS = targets
174
+ else:
175
+ # If the user didn't specify any targets on the command line,
176
+ # use the list of default targets.
177
+ SCons.Script.BUILD_TARGETS = SCons.Script._build_plus_default
178
+
179
+ nodes = SCons.Script.Main._build_targets(self.fs,
180
+ options,
181
+ targets,
182
+ self.target_top)
183
+
184
+ if not nodes:
185
+ return
186
+
187
+ # Call each of the Node's alter_targets() methods, which may
188
+ # provide additional targets that ended up as part of the build
189
+ # (the canonical example being a VariantDir() when we're building
190
+ # from a source directory) and which we therefore need their
191
+ # state cleared, too.
192
+ x = []
193
+ for n in nodes:
194
+ x.extend(n.alter_targets()[0])
195
+ nodes.extend(x)
196
+
197
+ # Clean up so that we can perform the next build correctly.
198
+ #
199
+ # We do this by walking over all the children of the targets,
200
+ # and clearing their state.
201
+ #
202
+ # We currently have to re-scan each node to find their
203
+ # children, because built nodes have already been partially
204
+ # cleared and don't remember their children. (In scons
205
+ # 0.96.1 and earlier, this wasn't the case, and we didn't
206
+ # have to re-scan the nodes.)
207
+ #
208
+ # Because we have to re-scan each node, we can't clear the
209
+ # nodes as we walk over them, because we may end up rescanning
210
+ # a cleared node as we scan a later node. Therefore, only
211
+ # store the list of nodes that need to be cleared as we walk
212
+ # the tree, and clear them in a separate pass.
213
+ #
214
+ # XXX: Someone more familiar with the inner workings of scons
215
+ # may be able to point out a more efficient way to do this.
216
+
217
+ SCons.Script.Main.progress_display("scons: Clearing cached node information ...")
218
+
219
+ seen_nodes = {}
220
+
221
+ def get_unseen_children(node, parent, seen_nodes=seen_nodes):
222
+ def is_unseen(node, seen_nodes=seen_nodes):
223
+ return node not in seen_nodes
224
+ return list(filter(is_unseen, node.children(scan=1)))
225
+
226
+ def add_to_seen_nodes(node, parent, seen_nodes=seen_nodes):
227
+ seen_nodes[node] = 1
228
+
229
+ # If this file is in a VariantDir and has a
230
+ # corresponding source file in the source tree, remember the
231
+ # node in the source tree, too. This is needed in
232
+ # particular to clear cached implicit dependencies on the
233
+ # source file, since the scanner will scan it if the
234
+ # VariantDir was created with duplicate=0.
235
+ try:
236
+ rfile_method = node.rfile
237
+ except AttributeError:
238
+ return
239
+ else:
240
+ rfile = rfile_method()
241
+ if rfile != node:
242
+ seen_nodes[rfile] = 1
243
+
244
+ for node in nodes:
245
+ walker = SCons.Node.Walker(node,
246
+ kids_func=get_unseen_children,
247
+ eval_func=add_to_seen_nodes)
248
+ n = walker.get_next()
249
+ while n:
250
+ n = walker.get_next()
251
+
252
+ for node in seen_nodes.keys():
253
+ # Call node.clear() to clear most of the state
254
+ node.clear()
255
+ # node.clear() doesn't reset node.state, so call
256
+ # node.set_state() to reset it manually
257
+ node.set_state(SCons.Node.no_state)
258
+ node.implicit = None
259
+
260
+ # Debug: Uncomment to verify that all Taskmaster reference
261
+ # counts have been reset to zero.
262
+ #if node.ref_count != 0:
263
+ # from SCons.Debug import Trace
264
+ # Trace('node %s, ref_count %s !!!\n' % (node, node.ref_count))
265
+
266
+ SCons.SConsign.Reset()
267
+ SCons.Script.Main.progress_display("scons: done clearing node information.")
268
+
269
+ def do_clean(self, argv):
270
+ """\
271
+ clean [TARGETS] Clean (remove) the specified TARGETS
272
+ and their dependencies. 'c' is a synonym.
273
+ """
274
+ return self.do_build(['build', '--clean'] + argv[1:])
275
+
276
+ def do_EOF(self, argv):
277
+ print
278
+ self.do_exit(argv)
279
+
280
+ def _do_one_help(self, arg):
281
+ try:
282
+ # If help_<arg>() exists, then call it.
283
+ func = getattr(self, 'help_' + arg)
284
+ except AttributeError:
285
+ try:
286
+ func = getattr(self, 'do_' + arg)
287
+ except AttributeError:
288
+ doc = None
289
+ else:
290
+ doc = self._doc_to_help(func)
291
+ if doc:
292
+ sys.stdout.write(doc + '\n')
293
+ sys.stdout.flush()
294
+ else:
295
+ doc = self.strip_initial_spaces(func())
296
+ if doc:
297
+ sys.stdout.write(doc + '\n')
298
+ sys.stdout.flush()
299
+
300
+ def _doc_to_help(self, obj):
301
+ doc = obj.__doc__
302
+ if doc is None:
303
+ return ''
304
+ return self._strip_initial_spaces(doc)
305
+
306
+ def _strip_initial_spaces(self, s):
307
+ #lines = s.split('\n')
308
+ lines = s.split('\n')
309
+ spaces = re.match(' *', lines[0]).group(0)
310
+ #def strip_spaces(l):
311
+ # if l.startswith(spaces):
312
+ # l = l[len(spaces):]
313
+ # return l
314
+ #return '\n'.join([ strip_spaces(l) for l in lines ])
315
+ def strip_spaces(l, spaces=spaces):
316
+ if l[:len(spaces)] == spaces:
317
+ l = l[len(spaces):]
318
+ return l
319
+ lines = list(map(strip_spaces, lines))
320
+ return '\n'.join(lines)
321
+
322
+ def do_exit(self, argv):
323
+ """\
324
+ exit Exit SCons interactive mode.
325
+ """
326
+ sys.exit(0)
327
+
328
+ def do_help(self, argv):
329
+ """\
330
+ help [COMMAND] Prints help for the specified COMMAND. 'h'
331
+ and '?' are synonyms.
332
+ """
333
+ if argv[1:]:
334
+ for arg in argv[1:]:
335
+ if self._do_one_help(arg):
336
+ break
337
+ else:
338
+ # If bare 'help' is called, print this class's doc
339
+ # string (if it has one).
340
+ doc = self._doc_to_help(self.__class__)
341
+ if doc:
342
+ sys.stdout.write(doc + '\n')
343
+ sys.stdout.flush()
344
+
345
+ def do_shell(self, argv):
346
+ """\
347
+ shell [COMMANDLINE] Execute COMMANDLINE in a subshell. 'sh' and
348
+ '!' are synonyms.
349
+ """
350
+ import subprocess
351
+ argv = argv[1:]
352
+ if not argv:
353
+ argv = os.environ[self.shell_variable]
354
+ try:
355
+ # Per "[Python-Dev] subprocess insufficiently platform-independent?"
356
+ # http://mail.python.org/pipermail/python-dev/2008-August/081979.html "+
357
+ # Doing the right thing with an argument list currently
358
+ # requires different shell= values on Windows and Linux.
359
+ p = subprocess.Popen(argv, shell=(sys.platform=='win32'))
360
+ except EnvironmentError, e:
361
+ sys.stderr.write('scons: %s: %s\n' % (argv[0], e.strerror))
362
+ else:
363
+ p.wait()
364
+
365
+ def do_version(self, argv):
366
+ """\
367
+ version Prints SCons version information.
368
+ """
369
+ sys.stdout.write(self.parser.version + '\n')
370
+
371
+ def interact(fs, parser, options, targets, target_top):
372
+ c = SConsInteractiveCmd(prompt = 'scons>>> ',
373
+ fs = fs,
374
+ parser = parser,
375
+ options = options,
376
+ targets = targets,
377
+ target_top = target_top)
378
+ c.cmdloop()
379
+
380
+ # Local Variables:
381
+ # tab-width:4
382
+ # indent-tabs-mode:nil
383
+ # End:
384
+ # vim: set expandtab tabstop=4 shiftwidth=4:
@@ -0,0 +1,1334 @@
1
+ """SCons.Script
2
+
3
+ This file implements the main() function used by the scons script.
4
+
5
+ Architecturally, this *is* the scons script, and will likely only be
6
+ called from the external "scons" wrapper. Consequently, anything here
7
+ should not be, or be considered, part of the build engine. If it's
8
+ something that we expect other software to want to use, it should go in
9
+ some other module. If it's specific to the "scons" script invocation,
10
+ it goes here.
11
+ """
12
+
13
+ unsupported_python_version = (2, 3, 0)
14
+ deprecated_python_version = (2, 4, 0)
15
+
16
+ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
17
+ #
18
+ # Permission is hereby granted, free of charge, to any person obtaining
19
+ # a copy of this software and associated documentation files (the
20
+ # "Software"), to deal in the Software without restriction, including
21
+ # without limitation the rights to use, copy, modify, merge, publish,
22
+ # distribute, sublicense, and/or sell copies of the Software, and to
23
+ # permit persons to whom the Software is furnished to do so, subject to
24
+ # the following conditions:
25
+ #
26
+ # The above copyright notice and this permission notice shall be included
27
+ # in all copies or substantial portions of the Software.
28
+ #
29
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
30
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
31
+ # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
33
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
34
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
35
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36
+
37
+ __revision__ = "src/engine/SCons/Script/Main.py 5134 2010/08/16 23:02:40 bdeegan"
38
+
39
+ import SCons.compat
40
+
41
+ import os
42
+ import sys
43
+ import time
44
+ import traceback
45
+
46
+ # Strip the script directory from sys.path() so on case-insensitive
47
+ # (Windows) systems Python doesn't think that the "scons" script is the
48
+ # "SCons" package. Replace it with our own version directory so, if
49
+ # if they're there, we pick up the right version of the build engine
50
+ # modules.
51
+ #sys.path = [os.path.join(sys.prefix,
52
+ # 'lib',
53
+ # 'scons-%d' % SCons.__version__)] + sys.path[1:]
54
+
55
+ import SCons.CacheDir
56
+ import SCons.Debug
57
+ import SCons.Defaults
58
+ import SCons.Environment
59
+ import SCons.Errors
60
+ import SCons.Job
61
+ import SCons.Node
62
+ import SCons.Node.FS
63
+ import SCons.SConf
64
+ import SCons.Script
65
+ import SCons.Taskmaster
66
+ import SCons.Util
67
+ import SCons.Warnings
68
+
69
+ import SCons.Script.Interactive
70
+
71
+ def fetch_win32_parallel_msg():
72
+ # A subsidiary function that exists solely to isolate this import
73
+ # so we don't have to pull it in on all platforms, and so that an
74
+ # in-line "import" statement in the _main() function below doesn't
75
+ # cause warnings about local names shadowing use of the 'SCons'
76
+ # globl in nest scopes and UnboundLocalErrors and the like in some
77
+ # versions (2.1) of Python.
78
+ import SCons.Platform.win32
79
+ return SCons.Platform.win32.parallel_msg
80
+
81
+ #
82
+
83
+ class SConsPrintHelpException(Exception):
84
+ pass
85
+
86
+ display = SCons.Util.display
87
+ progress_display = SCons.Util.DisplayEngine()
88
+
89
+ first_command_start = None
90
+ last_command_end = None
91
+
92
+ class Progressor(object):
93
+ prev = ''
94
+ count = 0
95
+ target_string = '$TARGET'
96
+
97
+ def __init__(self, obj, interval=1, file=None, overwrite=False):
98
+ if file is None:
99
+ file = sys.stdout
100
+
101
+ self.obj = obj
102
+ self.file = file
103
+ self.interval = interval
104
+ self.overwrite = overwrite
105
+
106
+ if callable(obj):
107
+ self.func = obj
108
+ elif SCons.Util.is_List(obj):
109
+ self.func = self.spinner
110
+ elif obj.find(self.target_string) != -1:
111
+ self.func = self.replace_string
112
+ else:
113
+ self.func = self.string
114
+
115
+ def write(self, s):
116
+ self.file.write(s)
117
+ self.file.flush()
118
+ self.prev = s
119
+
120
+ def erase_previous(self):
121
+ if self.prev:
122
+ length = len(self.prev)
123
+ if self.prev[-1] in ('\n', '\r'):
124
+ length = length - 1
125
+ self.write(' ' * length + '\r')
126
+ self.prev = ''
127
+
128
+ def spinner(self, node):
129
+ self.write(self.obj[self.count % len(self.obj)])
130
+
131
+ def string(self, node):
132
+ self.write(self.obj)
133
+
134
+ def replace_string(self, node):
135
+ self.write(self.obj.replace(self.target_string, str(node)))
136
+
137
+ def __call__(self, node):
138
+ self.count = self.count + 1
139
+ if (self.count % self.interval) == 0:
140
+ if self.overwrite:
141
+ self.erase_previous()
142
+ self.func(node)
143
+
144
+ ProgressObject = SCons.Util.Null()
145
+
146
+ def Progress(*args, **kw):
147
+ global ProgressObject
148
+ ProgressObject = Progressor(*args, **kw)
149
+
150
+ # Task control.
151
+ #
152
+
153
+ _BuildFailures = []
154
+
155
+ def GetBuildFailures():
156
+ return _BuildFailures
157
+
158
+ class BuildTask(SCons.Taskmaster.OutOfDateTask):
159
+ """An SCons build task."""
160
+ progress = ProgressObject
161
+
162
+ def display(self, message):
163
+ display('scons: ' + message)
164
+
165
+ def prepare(self):
166
+ self.progress(self.targets[0])
167
+ return SCons.Taskmaster.OutOfDateTask.prepare(self)
168
+
169
+ def needs_execute(self):
170
+ if SCons.Taskmaster.OutOfDateTask.needs_execute(self):
171
+ return True
172
+ if self.top and self.targets[0].has_builder():
173
+ display("scons: `%s' is up to date." % str(self.node))
174
+ return False
175
+
176
+ def execute(self):
177
+ if print_time:
178
+ start_time = time.time()
179
+ global first_command_start
180
+ if first_command_start is None:
181
+ first_command_start = start_time
182
+ SCons.Taskmaster.OutOfDateTask.execute(self)
183
+ if print_time:
184
+ global cumulative_command_time
185
+ global last_command_end
186
+ finish_time = time.time()
187
+ last_command_end = finish_time
188
+ cumulative_command_time = cumulative_command_time+finish_time-start_time
189
+ sys.stdout.write("Command execution time: %f seconds\n"%(finish_time-start_time))
190
+
191
+ def do_failed(self, status=2):
192
+ _BuildFailures.append(self.exception[1])
193
+ global exit_status
194
+ global this_build_status
195
+ if self.options.ignore_errors:
196
+ SCons.Taskmaster.OutOfDateTask.executed(self)
197
+ elif self.options.keep_going:
198
+ SCons.Taskmaster.OutOfDateTask.fail_continue(self)
199
+ exit_status = status
200
+ this_build_status = status
201
+ else:
202
+ SCons.Taskmaster.OutOfDateTask.fail_stop(self)
203
+ exit_status = status
204
+ this_build_status = status
205
+
206
+ def executed(self):
207
+ t = self.targets[0]
208
+ if self.top and not t.has_builder() and not t.side_effect:
209
+ if not t.exists():
210
+ if t.__class__.__name__ in ('File', 'Dir', 'Entry'):
211
+ errstr="Do not know how to make %s target `%s' (%s)." % (t.__class__.__name__, t, t.abspath)
212
+ else: # Alias or Python or ...
213
+ errstr="Do not know how to make %s target `%s'." % (t.__class__.__name__, t)
214
+ sys.stderr.write("scons: *** " + errstr)
215
+ if not self.options.keep_going:
216
+ sys.stderr.write(" Stop.")
217
+ sys.stderr.write("\n")
218
+ try:
219
+ raise SCons.Errors.BuildError(t, errstr)
220
+ except KeyboardInterrupt:
221
+ raise
222
+ except:
223
+ self.exception_set()
224
+ self.do_failed()
225
+ else:
226
+ print "scons: Nothing to be done for `%s'." % t
227
+ SCons.Taskmaster.OutOfDateTask.executed(self)
228
+ else:
229
+ SCons.Taskmaster.OutOfDateTask.executed(self)
230
+
231
+ def failed(self):
232
+ # Handle the failure of a build task. The primary purpose here
233
+ # is to display the various types of Errors and Exceptions
234
+ # appropriately.
235
+ exc_info = self.exc_info()
236
+ try:
237
+ t, e, tb = exc_info
238
+ except ValueError:
239
+ t, e = exc_info
240
+ tb = None
241
+
242
+ if t is None:
243
+ # The Taskmaster didn't record an exception for this Task;
244
+ # see if the sys module has one.
245
+ try:
246
+ t, e, tb = sys.exc_info()[:]
247
+ except ValueError:
248
+ t, e = exc_info
249
+ tb = None
250
+
251
+ # Deprecated string exceptions will have their string stored
252
+ # in the first entry of the tuple.
253
+ if e is None:
254
+ e = t
255
+
256
+ buildError = SCons.Errors.convert_to_BuildError(e)
257
+ if not buildError.node:
258
+ buildError.node = self.node
259
+
260
+ node = buildError.node
261
+ if not SCons.Util.is_List(node):
262
+ node = [ node ]
263
+ nodename = ', '.join(map(str, node))
264
+
265
+ errfmt = "scons: *** [%s] %s\n"
266
+ sys.stderr.write(errfmt % (nodename, buildError))
267
+
268
+ if (buildError.exc_info[2] and buildError.exc_info[1] and
269
+ not isinstance(
270
+ buildError.exc_info[1],
271
+ (EnvironmentError, SCons.Errors.StopError,
272
+ SCons.Errors.UserError))):
273
+ type, value, trace = buildError.exc_info
274
+ traceback.print_exception(type, value, trace)
275
+ elif tb and print_stacktrace:
276
+ sys.stderr.write("scons: internal stack trace:\n")
277
+ traceback.print_tb(tb, file=sys.stderr)
278
+
279
+ self.exception = (e, buildError, tb) # type, value, traceback
280
+ self.do_failed(buildError.exitstatus)
281
+
282
+ self.exc_clear()
283
+
284
+ def postprocess(self):
285
+ if self.top:
286
+ t = self.targets[0]
287
+ for tp in self.options.tree_printers:
288
+ tp.display(t)
289
+ if self.options.debug_includes:
290
+ tree = t.render_include_tree()
291
+ if tree:
292
+ print
293
+ print tree
294
+ SCons.Taskmaster.OutOfDateTask.postprocess(self)
295
+
296
+ def make_ready(self):
297
+ """Make a task ready for execution"""
298
+ SCons.Taskmaster.OutOfDateTask.make_ready(self)
299
+ if self.out_of_date and self.options.debug_explain:
300
+ explanation = self.out_of_date[0].explain()
301
+ if explanation:
302
+ sys.stdout.write("scons: " + explanation)
303
+
304
+ class CleanTask(SCons.Taskmaster.AlwaysTask):
305
+ """An SCons clean task."""
306
+ def fs_delete(self, path, pathstr, remove=1):
307
+ try:
308
+ if os.path.lexists(path):
309
+ if os.path.isfile(path) or os.path.islink(path):
310
+ if remove: os.unlink(path)
311
+ display("Removed " + pathstr)
312
+ elif os.path.isdir(path) and not os.path.islink(path):
313
+ # delete everything in the dir
314
+ for e in sorted(os.listdir(path)):
315
+ p = os.path.join(path, e)
316
+ s = os.path.join(pathstr, e)
317
+ if os.path.isfile(p):
318
+ if remove: os.unlink(p)
319
+ display("Removed " + s)
320
+ else:
321
+ self.fs_delete(p, s, remove)
322
+ # then delete dir itself
323
+ if remove: os.rmdir(path)
324
+ display("Removed directory " + pathstr)
325
+ else:
326
+ errstr = "Path '%s' exists but isn't a file or directory."
327
+ raise SCons.Errors.UserError(errstr % (pathstr))
328
+ except SCons.Errors.UserError, e:
329
+ print e
330
+ except (IOError, OSError), e:
331
+ print "scons: Could not remove '%s':" % pathstr, e.strerror
332
+
333
+ def show(self):
334
+ target = self.targets[0]
335
+ if (target.has_builder() or target.side_effect) and not target.noclean:
336
+ for t in self.targets:
337
+ if not t.isdir():
338
+ display("Removed " + str(t))
339
+ if target in SCons.Environment.CleanTargets:
340
+ files = SCons.Environment.CleanTargets[target]
341
+ for f in files:
342
+ self.fs_delete(f.abspath, str(f), 0)
343
+
344
+ def remove(self):
345
+ target = self.targets[0]
346
+ if (target.has_builder() or target.side_effect) and not target.noclean:
347
+ for t in self.targets:
348
+ try:
349
+ removed = t.remove()
350
+ except OSError, e:
351
+ # An OSError may indicate something like a permissions
352
+ # issue, an IOError would indicate something like
353
+ # the file not existing. In either case, print a
354
+ # message and keep going to try to remove as many
355
+ # targets aa possible.
356
+ print "scons: Could not remove '%s':" % str(t), e.strerror
357
+ else:
358
+ if removed:
359
+ display("Removed " + str(t))
360
+ if target in SCons.Environment.CleanTargets:
361
+ files = SCons.Environment.CleanTargets[target]
362
+ for f in files:
363
+ self.fs_delete(f.abspath, str(f))
364
+
365
+ execute = remove
366
+
367
+ # We want the Taskmaster to update the Node states (and therefore
368
+ # handle reference counts, etc.), but we don't want to call
369
+ # back to the Node's post-build methods, which would do things
370
+ # we don't want, like store .sconsign information.
371
+ executed = SCons.Taskmaster.Task.executed_without_callbacks
372
+
373
+ # Have the taskmaster arrange to "execute" all of the targets, because
374
+ # we'll figure out ourselves (in remove() or show() above) whether
375
+ # anything really needs to be done.
376
+ make_ready = SCons.Taskmaster.Task.make_ready_all
377
+
378
+ def prepare(self):
379
+ pass
380
+
381
+ class QuestionTask(SCons.Taskmaster.AlwaysTask):
382
+ """An SCons task for the -q (question) option."""
383
+ def prepare(self):
384
+ pass
385
+
386
+ def execute(self):
387
+ if self.targets[0].get_state() != SCons.Node.up_to_date or \
388
+ (self.top and not self.targets[0].exists()):
389
+ global exit_status
390
+ global this_build_status
391
+ exit_status = 1
392
+ this_build_status = 1
393
+ self.tm.stop()
394
+
395
+ def executed(self):
396
+ pass
397
+
398
+
399
+ class TreePrinter(object):
400
+ def __init__(self, derived=False, prune=False, status=False):
401
+ self.derived = derived
402
+ self.prune = prune
403
+ self.status = status
404
+ def get_all_children(self, node):
405
+ return node.all_children()
406
+ def get_derived_children(self, node):
407
+ children = node.all_children(None)
408
+ return [x for x in children if x.has_builder()]
409
+ def display(self, t):
410
+ if self.derived:
411
+ func = self.get_derived_children
412
+ else:
413
+ func = self.get_all_children
414
+ s = self.status and 2 or 0
415
+ SCons.Util.print_tree(t, func, prune=self.prune, showtags=s)
416
+
417
+
418
+ def python_version_string():
419
+ return sys.version.split()[0]
420
+
421
+ def python_version_unsupported(version=sys.version_info):
422
+ return version < unsupported_python_version
423
+
424
+ def python_version_deprecated(version=sys.version_info):
425
+ return version < deprecated_python_version
426
+
427
+
428
+ # Global variables
429
+
430
+ print_objects = 0
431
+ print_memoizer = 0
432
+ print_stacktrace = 0
433
+ print_time = 0
434
+ sconscript_time = 0
435
+ cumulative_command_time = 0
436
+ exit_status = 0 # final exit status, assume success by default
437
+ this_build_status = 0 # "exit status" of an individual build
438
+ num_jobs = None
439
+ delayed_warnings = []
440
+
441
+ class FakeOptionParser(object):
442
+ """
443
+ A do-nothing option parser, used for the initial OptionsParser variable.
444
+
445
+ During normal SCons operation, the OptionsParser is created right
446
+ away by the main() function. Certain tests scripts however, can
447
+ introspect on different Tool modules, the initialization of which
448
+ can try to add a new, local option to an otherwise uninitialized
449
+ OptionsParser object. This allows that introspection to happen
450
+ without blowing up.
451
+
452
+ """
453
+ class FakeOptionValues(object):
454
+ def __getattr__(self, attr):
455
+ return None
456
+ values = FakeOptionValues()
457
+ def add_local_option(self, *args, **kw):
458
+ pass
459
+
460
+ OptionsParser = FakeOptionParser()
461
+
462
+ def AddOption(*args, **kw):
463
+ if 'default' not in kw:
464
+ kw['default'] = None
465
+ result = OptionsParser.add_local_option(*args, **kw)
466
+ return result
467
+
468
+ def GetOption(name):
469
+ return getattr(OptionsParser.values, name)
470
+
471
+ def SetOption(name, value):
472
+ return OptionsParser.values.set_option(name, value)
473
+
474
+ #
475
+ class Stats(object):
476
+ def __init__(self):
477
+ self.stats = []
478
+ self.labels = []
479
+ self.append = self.do_nothing
480
+ self.print_stats = self.do_nothing
481
+ def enable(self, outfp):
482
+ self.outfp = outfp
483
+ self.append = self.do_append
484
+ self.print_stats = self.do_print
485
+ def do_nothing(self, *args, **kw):
486
+ pass
487
+
488
+ class CountStats(Stats):
489
+ def do_append(self, label):
490
+ self.labels.append(label)
491
+ self.stats.append(SCons.Debug.fetchLoggedInstances())
492
+ def do_print(self):
493
+ stats_table = {}
494
+ for s in self.stats:
495
+ for n in [t[0] for t in s]:
496
+ stats_table[n] = [0, 0, 0, 0]
497
+ i = 0
498
+ for s in self.stats:
499
+ for n, c in s:
500
+ stats_table[n][i] = c
501
+ i = i + 1
502
+ self.outfp.write("Object counts:\n")
503
+ pre = [" "]
504
+ post = [" %s\n"]
505
+ l = len(self.stats)
506
+ fmt1 = ''.join(pre + [' %7s']*l + post)
507
+ fmt2 = ''.join(pre + [' %7d']*l + post)
508
+ labels = self.labels[:l]
509
+ labels.append(("", "Class"))
510
+ self.outfp.write(fmt1 % tuple([x[0] for x in labels]))
511
+ self.outfp.write(fmt1 % tuple([x[1] for x in labels]))
512
+ for k in sorted(stats_table.keys()):
513
+ r = stats_table[k][:l] + [k]
514
+ self.outfp.write(fmt2 % tuple(r))
515
+
516
+ count_stats = CountStats()
517
+
518
+ class MemStats(Stats):
519
+ def do_append(self, label):
520
+ self.labels.append(label)
521
+ self.stats.append(SCons.Debug.memory())
522
+ def do_print(self):
523
+ fmt = 'Memory %-32s %12d\n'
524
+ for label, stats in zip(self.labels, self.stats):
525
+ self.outfp.write(fmt % (label, stats))
526
+
527
+ memory_stats = MemStats()
528
+
529
+ # utility functions
530
+
531
+ def _scons_syntax_error(e):
532
+ """Handle syntax errors. Print out a message and show where the error
533
+ occurred.
534
+ """
535
+ etype, value, tb = sys.exc_info()
536
+ lines = traceback.format_exception_only(etype, value)
537
+ for line in lines:
538
+ sys.stderr.write(line+'\n')
539
+ sys.exit(2)
540
+
541
+ def find_deepest_user_frame(tb):
542
+ """
543
+ Find the deepest stack frame that is not part of SCons.
544
+
545
+ Input is a "pre-processed" stack trace in the form
546
+ returned by traceback.extract_tb() or traceback.extract_stack()
547
+ """
548
+
549
+ tb.reverse()
550
+
551
+ # find the deepest traceback frame that is not part
552
+ # of SCons:
553
+ for frame in tb:
554
+ filename = frame[0]
555
+ if filename.find(os.sep+'SCons'+os.sep) == -1:
556
+ return frame
557
+ return tb[0]
558
+
559
+ def _scons_user_error(e):
560
+ """Handle user errors. Print out a message and a description of the
561
+ error, along with the line number and routine where it occured.
562
+ The file and line number will be the deepest stack frame that is
563
+ not part of SCons itself.
564
+ """
565
+ global print_stacktrace
566
+ etype, value, tb = sys.exc_info()
567
+ if print_stacktrace:
568
+ traceback.print_exception(etype, value, tb)
569
+ filename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_tb(tb))
570
+ sys.stderr.write("\nscons: *** %s\n" % value)
571
+ sys.stderr.write('File "%s", line %d, in %s\n' % (filename, lineno, routine))
572
+ sys.exit(2)
573
+
574
+ def _scons_user_warning(e):
575
+ """Handle user warnings. Print out a message and a description of
576
+ the warning, along with the line number and routine where it occured.
577
+ The file and line number will be the deepest stack frame that is
578
+ not part of SCons itself.
579
+ """
580
+ etype, value, tb = sys.exc_info()
581
+ filename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_tb(tb))
582
+ sys.stderr.write("\nscons: warning: %s\n" % e)
583
+ sys.stderr.write('File "%s", line %d, in %s\n' % (filename, lineno, routine))
584
+
585
+ def _scons_internal_warning(e):
586
+ """Slightly different from _scons_user_warning in that we use the
587
+ *current call stack* rather than sys.exc_info() to get our stack trace.
588
+ This is used by the warnings framework to print warnings."""
589
+ filename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_stack())
590
+ sys.stderr.write("\nscons: warning: %s\n" % e.args[0])
591
+ sys.stderr.write('File "%s", line %d, in %s\n' % (filename, lineno, routine))
592
+
593
+ def _scons_internal_error():
594
+ """Handle all errors but user errors. Print out a message telling
595
+ the user what to do in this case and print a normal trace.
596
+ """
597
+ print 'internal error'
598
+ traceback.print_exc()
599
+ sys.exit(2)
600
+
601
+ def _SConstruct_exists(dirname='', repositories=[], filelist=None):
602
+ """This function checks that an SConstruct file exists in a directory.
603
+ If so, it returns the path of the file. By default, it checks the
604
+ current directory.
605
+ """
606
+ if not filelist:
607
+ filelist = ['SConstruct', 'Sconstruct', 'sconstruct']
608
+ for file in filelist:
609
+ sfile = os.path.join(dirname, file)
610
+ if os.path.isfile(sfile):
611
+ return sfile
612
+ if not os.path.isabs(sfile):
613
+ for rep in repositories:
614
+ if os.path.isfile(os.path.join(rep, sfile)):
615
+ return sfile
616
+ return None
617
+
618
+ def _set_debug_values(options):
619
+ global print_memoizer, print_objects, print_stacktrace, print_time
620
+
621
+ debug_values = options.debug
622
+
623
+ if "count" in debug_values:
624
+ # All of the object counts are within "if __debug__:" blocks,
625
+ # which get stripped when running optimized (with python -O or
626
+ # from compiled *.pyo files). Provide a warning if __debug__ is
627
+ # stripped, so it doesn't just look like --debug=count is broken.
628
+ enable_count = False
629
+ if __debug__: enable_count = True
630
+ if enable_count:
631
+ count_stats.enable(sys.stdout)
632
+ else:
633
+ msg = "--debug=count is not supported when running SCons\n" + \
634
+ "\twith the python -O option or optimized (.pyo) modules."
635
+ SCons.Warnings.warn(SCons.Warnings.NoObjectCountWarning, msg)
636
+ if "dtree" in debug_values:
637
+ options.tree_printers.append(TreePrinter(derived=True))
638
+ options.debug_explain = ("explain" in debug_values)
639
+ if "findlibs" in debug_values:
640
+ SCons.Scanner.Prog.print_find_libs = "findlibs"
641
+ options.debug_includes = ("includes" in debug_values)
642
+ print_memoizer = ("memoizer" in debug_values)
643
+ if "memory" in debug_values:
644
+ memory_stats.enable(sys.stdout)
645
+ print_objects = ("objects" in debug_values)
646
+ if "presub" in debug_values:
647
+ SCons.Action.print_actions_presub = 1
648
+ if "stacktrace" in debug_values:
649
+ print_stacktrace = 1
650
+ if "stree" in debug_values:
651
+ options.tree_printers.append(TreePrinter(status=True))
652
+ if "time" in debug_values:
653
+ print_time = 1
654
+ if "tree" in debug_values:
655
+ options.tree_printers.append(TreePrinter())
656
+
657
+ def _create_path(plist):
658
+ path = '.'
659
+ for d in plist:
660
+ if os.path.isabs(d):
661
+ path = d
662
+ else:
663
+ path = path + '/' + d
664
+ return path
665
+
666
+ def _load_site_scons_dir(topdir, site_dir_name=None):
667
+ """Load the site_scons dir under topdir.
668
+ Adds site_scons to sys.path, imports site_scons/site_init.py,
669
+ and adds site_scons/site_tools to default toolpath."""
670
+ if site_dir_name:
671
+ err_if_not_found = True # user specified: err if missing
672
+ else:
673
+ site_dir_name = "site_scons"
674
+ err_if_not_found = False
675
+
676
+ site_dir = os.path.join(topdir.path, site_dir_name)
677
+ if not os.path.exists(site_dir):
678
+ if err_if_not_found:
679
+ raise SCons.Errors.UserError("site dir %s not found."%site_dir)
680
+ return
681
+
682
+ site_init_filename = "site_init.py"
683
+ site_init_modname = "site_init"
684
+ site_tools_dirname = "site_tools"
685
+ sys.path = [os.path.abspath(site_dir)] + sys.path
686
+ site_init_file = os.path.join(site_dir, site_init_filename)
687
+ site_tools_dir = os.path.join(site_dir, site_tools_dirname)
688
+ if os.path.exists(site_init_file):
689
+ import imp
690
+ # TODO(2.4): turn this into try:-except:-finally:
691
+ try:
692
+ try:
693
+ fp, pathname, description = imp.find_module(site_init_modname,
694
+ [site_dir])
695
+ # Load the file into SCons.Script namespace. This is
696
+ # opaque and clever; m is the module object for the
697
+ # SCons.Script module, and the exec ... in call executes a
698
+ # file (or string containing code) in the context of the
699
+ # module's dictionary, so anything that code defines ends
700
+ # up adding to that module. This is really short, but all
701
+ # the error checking makes it longer.
702
+ try:
703
+ m = sys.modules['SCons.Script']
704
+ except Exception, e:
705
+ fmt = 'cannot import site_init.py: missing SCons.Script module %s'
706
+ raise SCons.Errors.InternalError(fmt % repr(e))
707
+ try:
708
+ # This is the magic.
709
+ exec fp in m.__dict__
710
+ except KeyboardInterrupt:
711
+ raise
712
+ except Exception, e:
713
+ fmt = '*** Error loading site_init file %s:\n'
714
+ sys.stderr.write(fmt % repr(site_init_file))
715
+ raise
716
+ except KeyboardInterrupt:
717
+ raise
718
+ except ImportError, e:
719
+ fmt = '*** cannot import site init file %s:\n'
720
+ sys.stderr.write(fmt % repr(site_init_file))
721
+ raise
722
+ finally:
723
+ if fp:
724
+ fp.close()
725
+ if os.path.exists(site_tools_dir):
726
+ SCons.Tool.DefaultToolpath.append(os.path.abspath(site_tools_dir))
727
+
728
+ def version_string(label, module):
729
+ version = module.__version__
730
+ build = module.__build__
731
+ if build:
732
+ if build[0] != '.':
733
+ build = '.' + build
734
+ version = version + build
735
+ fmt = "\t%s: v%s, %s, by %s on %s\n"
736
+ return fmt % (label,
737
+ version,
738
+ module.__date__,
739
+ module.__developer__,
740
+ module.__buildsys__)
741
+
742
+ def _main(parser):
743
+ global exit_status
744
+ global this_build_status
745
+
746
+ options = parser.values
747
+
748
+ # Here's where everything really happens.
749
+
750
+ # First order of business: set up default warnings and then
751
+ # handle the user's warning options, so that we can issue (or
752
+ # suppress) appropriate warnings about anything that might happen,
753
+ # as configured by the user.
754
+
755
+ default_warnings = [ SCons.Warnings.WarningOnByDefault,
756
+ SCons.Warnings.DeprecatedWarning,
757
+ ]
758
+
759
+ for warning in default_warnings:
760
+ SCons.Warnings.enableWarningClass(warning)
761
+ SCons.Warnings._warningOut = _scons_internal_warning
762
+ SCons.Warnings.process_warn_strings(options.warn)
763
+
764
+ # Now that we have the warnings configuration set up, we can actually
765
+ # issue (or suppress) any warnings about warning-worthy things that
766
+ # occurred while the command-line options were getting parsed.
767
+ try:
768
+ dw = options.delayed_warnings
769
+ except AttributeError:
770
+ pass
771
+ else:
772
+ delayed_warnings.extend(dw)
773
+ for warning_type, message in delayed_warnings:
774
+ SCons.Warnings.warn(warning_type, message)
775
+
776
+ if options.diskcheck:
777
+ SCons.Node.FS.set_diskcheck(options.diskcheck)
778
+
779
+ # Next, we want to create the FS object that represents the outside
780
+ # world's file system, as that's central to a lot of initialization.
781
+ # To do this, however, we need to be in the directory from which we
782
+ # want to start everything, which means first handling any relevant
783
+ # options that might cause us to chdir somewhere (-C, -D, -U, -u).
784
+ if options.directory:
785
+ script_dir = os.path.abspath(_create_path(options.directory))
786
+ else:
787
+ script_dir = os.getcwd()
788
+
789
+ target_top = None
790
+ if options.climb_up:
791
+ target_top = '.' # directory to prepend to targets
792
+ while script_dir and not _SConstruct_exists(script_dir,
793
+ options.repository,
794
+ options.file):
795
+ script_dir, last_part = os.path.split(script_dir)
796
+ if last_part:
797
+ target_top = os.path.join(last_part, target_top)
798
+ else:
799
+ script_dir = ''
800
+
801
+ if script_dir and script_dir != os.getcwd():
802
+ display("scons: Entering directory `%s'" % script_dir)
803
+ try:
804
+ os.chdir(script_dir)
805
+ except OSError:
806
+ sys.stderr.write("Could not change directory to %s\n" % script_dir)
807
+
808
+ # Now that we're in the top-level SConstruct directory, go ahead
809
+ # and initialize the FS object that represents the file system,
810
+ # and make it the build engine default.
811
+ fs = SCons.Node.FS.get_default_fs()
812
+
813
+ for rep in options.repository:
814
+ fs.Repository(rep)
815
+
816
+ # Now that we have the FS object, the next order of business is to
817
+ # check for an SConstruct file (or other specified config file).
818
+ # If there isn't one, we can bail before doing any more work.
819
+ scripts = []
820
+ if options.file:
821
+ scripts.extend(options.file)
822
+ if not scripts:
823
+ sfile = _SConstruct_exists(repositories=options.repository,
824
+ filelist=options.file)
825
+ if sfile:
826
+ scripts.append(sfile)
827
+
828
+ if not scripts:
829
+ if options.help:
830
+ # There's no SConstruct, but they specified -h.
831
+ # Give them the options usage now, before we fail
832
+ # trying to read a non-existent SConstruct file.
833
+ raise SConsPrintHelpException
834
+ raise SCons.Errors.UserError("No SConstruct file found.")
835
+
836
+ if scripts[0] == "-":
837
+ d = fs.getcwd()
838
+ else:
839
+ d = fs.File(scripts[0]).dir
840
+ fs.set_SConstruct_dir(d)
841
+
842
+ _set_debug_values(options)
843
+ SCons.Node.implicit_cache = options.implicit_cache
844
+ SCons.Node.implicit_deps_changed = options.implicit_deps_changed
845
+ SCons.Node.implicit_deps_unchanged = options.implicit_deps_unchanged
846
+
847
+ if options.no_exec:
848
+ SCons.SConf.dryrun = 1
849
+ SCons.Action.execute_actions = None
850
+ if options.question:
851
+ SCons.SConf.dryrun = 1
852
+ if options.clean:
853
+ SCons.SConf.SetBuildType('clean')
854
+ if options.help:
855
+ SCons.SConf.SetBuildType('help')
856
+ SCons.SConf.SetCacheMode(options.config)
857
+ SCons.SConf.SetProgressDisplay(progress_display)
858
+
859
+ if options.no_progress or options.silent:
860
+ progress_display.set_mode(0)
861
+
862
+ if options.site_dir:
863
+ _load_site_scons_dir(d, options.site_dir)
864
+ elif not options.no_site_dir:
865
+ _load_site_scons_dir(d)
866
+
867
+ if options.include_dir:
868
+ sys.path = options.include_dir + sys.path
869
+
870
+ # That should cover (most of) the options. Next, set up the variables
871
+ # that hold command-line arguments, so the SConscript files that we
872
+ # read and execute have access to them.
873
+ targets = []
874
+ xmit_args = []
875
+ for a in parser.largs:
876
+ if a[:1] == '-':
877
+ continue
878
+ if '=' in a:
879
+ xmit_args.append(a)
880
+ else:
881
+ targets.append(a)
882
+ SCons.Script._Add_Targets(targets + parser.rargs)
883
+ SCons.Script._Add_Arguments(xmit_args)
884
+
885
+ # If stdout is not a tty, replace it with a wrapper object to call flush
886
+ # after every write.
887
+ #
888
+ # Tty devices automatically flush after every newline, so the replacement
889
+ # isn't necessary. Furthermore, if we replace sys.stdout, the readline
890
+ # module will no longer work. This affects the behavior during
891
+ # --interactive mode. --interactive should only be used when stdin and
892
+ # stdout refer to a tty.
893
+ if not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty():
894
+ sys.stdout = SCons.Util.Unbuffered(sys.stdout)
895
+ if not hasattr(sys.stderr, 'isatty') or not sys.stderr.isatty():
896
+ sys.stderr = SCons.Util.Unbuffered(sys.stderr)
897
+
898
+ memory_stats.append('before reading SConscript files:')
899
+ count_stats.append(('pre-', 'read'))
900
+
901
+ # And here's where we (finally) read the SConscript files.
902
+
903
+ progress_display("scons: Reading SConscript files ...")
904
+
905
+ start_time = time.time()
906
+ try:
907
+ for script in scripts:
908
+ SCons.Script._SConscript._SConscript(fs, script)
909
+ except SCons.Errors.StopError, e:
910
+ # We had problems reading an SConscript file, such as it
911
+ # couldn't be copied in to the VariantDir. Since we're just
912
+ # reading SConscript files and haven't started building
913
+ # things yet, stop regardless of whether they used -i or -k
914
+ # or anything else.
915
+ sys.stderr.write("scons: *** %s Stop.\n" % e)
916
+ exit_status = 2
917
+ sys.exit(exit_status)
918
+ global sconscript_time
919
+ sconscript_time = time.time() - start_time
920
+
921
+ progress_display("scons: done reading SConscript files.")
922
+
923
+ memory_stats.append('after reading SConscript files:')
924
+ count_stats.append(('post-', 'read'))
925
+
926
+ # Re-{enable,disable} warnings in case they disabled some in
927
+ # the SConscript file.
928
+ #
929
+ # We delay enabling the PythonVersionWarning class until here so that,
930
+ # if they explicity disabled it in either in the command line or in
931
+ # $SCONSFLAGS, or in the SConscript file, then the search through
932
+ # the list of deprecated warning classes will find that disabling
933
+ # first and not issue the warning.
934
+ #SCons.Warnings.enableWarningClass(SCons.Warnings.PythonVersionWarning)
935
+ SCons.Warnings.process_warn_strings(options.warn)
936
+
937
+ # Now that we've read the SConscript files, we can check for the
938
+ # warning about deprecated Python versions--delayed until here
939
+ # in case they disabled the warning in the SConscript files.
940
+ if python_version_deprecated():
941
+ msg = "Support for pre-2.4 Python (%s) is deprecated.\n" + \
942
+ " If this will cause hardship, contact dev@scons.tigris.org."
943
+ SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning,
944
+ msg % python_version_string())
945
+
946
+ if not options.help:
947
+ SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
948
+
949
+ # Now re-parse the command-line options (any to the left of a '--'
950
+ # argument, that is) with any user-defined command-line options that
951
+ # the SConscript files may have added to the parser object. This will
952
+ # emit the appropriate error message and exit if any unknown option
953
+ # was specified on the command line.
954
+
955
+ parser.preserve_unknown_options = False
956
+ parser.parse_args(parser.largs, options)
957
+
958
+ if options.help:
959
+ help_text = SCons.Script.help_text
960
+ if help_text is None:
961
+ # They specified -h, but there was no Help() inside the
962
+ # SConscript files. Give them the options usage.
963
+ raise SConsPrintHelpException
964
+ else:
965
+ print help_text
966
+ print "Use scons -H for help about command-line options."
967
+ exit_status = 0
968
+ return
969
+
970
+ # Change directory to the top-level SConstruct directory, then tell
971
+ # the Node.FS subsystem that we're all done reading the SConscript
972
+ # files and calling Repository() and VariantDir() and changing
973
+ # directories and the like, so it can go ahead and start memoizing
974
+ # the string values of file system nodes.
975
+
976
+ fs.chdir(fs.Top)
977
+
978
+ SCons.Node.FS.save_strings(1)
979
+
980
+ # Now that we've read the SConscripts we can set the options
981
+ # that are SConscript settable:
982
+ SCons.Node.implicit_cache = options.implicit_cache
983
+ SCons.Node.FS.set_duplicate(options.duplicate)
984
+ fs.set_max_drift(options.max_drift)
985
+
986
+ SCons.Job.explicit_stack_size = options.stack_size
987
+
988
+ if options.md5_chunksize:
989
+ SCons.Node.FS.File.md5_chunksize = options.md5_chunksize
990
+
991
+ platform = SCons.Platform.platform_module()
992
+
993
+ if options.interactive:
994
+ SCons.Script.Interactive.interact(fs, OptionsParser, options,
995
+ targets, target_top)
996
+
997
+ else:
998
+
999
+ # Build the targets
1000
+ nodes = _build_targets(fs, options, targets, target_top)
1001
+ if not nodes:
1002
+ exit_status = 2
1003
+
1004
+ def _build_targets(fs, options, targets, target_top):
1005
+
1006
+ global this_build_status
1007
+ this_build_status = 0
1008
+
1009
+ progress_display.set_mode(not (options.no_progress or options.silent))
1010
+ display.set_mode(not options.silent)
1011
+ SCons.Action.print_actions = not options.silent
1012
+ SCons.Action.execute_actions = not options.no_exec
1013
+ SCons.Node.FS.do_store_info = not options.no_exec
1014
+ SCons.SConf.dryrun = options.no_exec
1015
+
1016
+ if options.diskcheck:
1017
+ SCons.Node.FS.set_diskcheck(options.diskcheck)
1018
+
1019
+ SCons.CacheDir.cache_enabled = not options.cache_disable
1020
+ SCons.CacheDir.cache_debug = options.cache_debug
1021
+ SCons.CacheDir.cache_force = options.cache_force
1022
+ SCons.CacheDir.cache_show = options.cache_show
1023
+
1024
+ if options.no_exec:
1025
+ CleanTask.execute = CleanTask.show
1026
+ else:
1027
+ CleanTask.execute = CleanTask.remove
1028
+
1029
+ lookup_top = None
1030
+ if targets or SCons.Script.BUILD_TARGETS != SCons.Script._build_plus_default:
1031
+ # They specified targets on the command line or modified
1032
+ # BUILD_TARGETS in the SConscript file(s), so if they used -u,
1033
+ # -U or -D, we have to look up targets relative to the top,
1034
+ # but we build whatever they specified.
1035
+ if target_top:
1036
+ lookup_top = fs.Dir(target_top)
1037
+ target_top = None
1038
+
1039
+ targets = SCons.Script.BUILD_TARGETS
1040
+ else:
1041
+ # There are no targets specified on the command line,
1042
+ # so if they used -u, -U or -D, we may have to restrict
1043
+ # what actually gets built.
1044
+ d = None
1045
+ if target_top:
1046
+ if options.climb_up == 1:
1047
+ # -u, local directory and below
1048
+ target_top = fs.Dir(target_top)
1049
+ lookup_top = target_top
1050
+ elif options.climb_up == 2:
1051
+ # -D, all Default() targets
1052
+ target_top = None
1053
+ lookup_top = None
1054
+ elif options.climb_up == 3:
1055
+ # -U, local SConscript Default() targets
1056
+ target_top = fs.Dir(target_top)
1057
+ def check_dir(x, target_top=target_top):
1058
+ if hasattr(x, 'cwd') and not x.cwd is None:
1059
+ cwd = x.cwd.srcnode()
1060
+ return cwd == target_top
1061
+ else:
1062
+ # x doesn't have a cwd, so it's either not a target,
1063
+ # or not a file, so go ahead and keep it as a default
1064
+ # target and let the engine sort it out:
1065
+ return 1
1066
+ d = list(filter(check_dir, SCons.Script.DEFAULT_TARGETS))
1067
+ SCons.Script.DEFAULT_TARGETS[:] = d
1068
+ target_top = None
1069
+ lookup_top = None
1070
+
1071
+ targets = SCons.Script._Get_Default_Targets(d, fs)
1072
+
1073
+ if not targets:
1074
+ sys.stderr.write("scons: *** No targets specified and no Default() targets found. Stop.\n")
1075
+ return None
1076
+
1077
+ def Entry(x, ltop=lookup_top, ttop=target_top, fs=fs):
1078
+ if isinstance(x, SCons.Node.Node):
1079
+ node = x
1080
+ else:
1081
+ node = None
1082
+ # Why would ltop be None? Unfortunately this happens.
1083
+ if ltop is None: ltop = ''
1084
+ # Curdir becomes important when SCons is called with -u, -C,
1085
+ # or similar option that changes directory, and so the paths
1086
+ # of targets given on the command line need to be adjusted.
1087
+ curdir = os.path.join(os.getcwd(), str(ltop))
1088
+ for lookup in SCons.Node.arg2nodes_lookups:
1089
+ node = lookup(x, curdir=curdir)
1090
+ if node is not None:
1091
+ break
1092
+ if node is None:
1093
+ node = fs.Entry(x, directory=ltop, create=1)
1094
+ if ttop and not node.is_under(ttop):
1095
+ if isinstance(node, SCons.Node.FS.Dir) and ttop.is_under(node):
1096
+ node = ttop
1097
+ else:
1098
+ node = None
1099
+ return node
1100
+
1101
+ nodes = [_f for _f in map(Entry, targets) if _f]
1102
+
1103
+ task_class = BuildTask # default action is to build targets
1104
+ opening_message = "Building targets ..."
1105
+ closing_message = "done building targets."
1106
+ if options.keep_going:
1107
+ failure_message = "done building targets (errors occurred during build)."
1108
+ else:
1109
+ failure_message = "building terminated because of errors."
1110
+ if options.question:
1111
+ task_class = QuestionTask
1112
+ try:
1113
+ if options.clean:
1114
+ task_class = CleanTask
1115
+ opening_message = "Cleaning targets ..."
1116
+ closing_message = "done cleaning targets."
1117
+ if options.keep_going:
1118
+ failure_message = "done cleaning targets (errors occurred during clean)."
1119
+ else:
1120
+ failure_message = "cleaning terminated because of errors."
1121
+ except AttributeError:
1122
+ pass
1123
+
1124
+ task_class.progress = ProgressObject
1125
+
1126
+ if options.random:
1127
+ def order(dependencies):
1128
+ """Randomize the dependencies."""
1129
+ import random
1130
+ # This is cribbed from the implementation of
1131
+ # random.shuffle() in Python 2.X.
1132
+ d = dependencies
1133
+ for i in range(len(d)-1, 0, -1):
1134
+ j = int(random.random() * (i+1))
1135
+ d[i], d[j] = d[j], d[i]
1136
+ return d
1137
+ else:
1138
+ def order(dependencies):
1139
+ """Leave the order of dependencies alone."""
1140
+ return dependencies
1141
+
1142
+ if options.taskmastertrace_file == '-':
1143
+ tmtrace = sys.stdout
1144
+ elif options.taskmastertrace_file:
1145
+ tmtrace = open(options.taskmastertrace_file, 'wb')
1146
+ else:
1147
+ tmtrace = None
1148
+ taskmaster = SCons.Taskmaster.Taskmaster(nodes, task_class, order, tmtrace)
1149
+
1150
+ # Let the BuildTask objects get at the options to respond to the
1151
+ # various print_* settings, tree_printer list, etc.
1152
+ BuildTask.options = options
1153
+
1154
+ global num_jobs
1155
+ num_jobs = options.num_jobs
1156
+ jobs = SCons.Job.Jobs(num_jobs, taskmaster)
1157
+ if num_jobs > 1:
1158
+ msg = None
1159
+ if jobs.num_jobs == 1:
1160
+ msg = "parallel builds are unsupported by this version of Python;\n" + \
1161
+ "\tignoring -j or num_jobs option.\n"
1162
+ elif sys.platform == 'win32':
1163
+ msg = fetch_win32_parallel_msg()
1164
+ if msg:
1165
+ SCons.Warnings.warn(SCons.Warnings.NoParallelSupportWarning, msg)
1166
+
1167
+ memory_stats.append('before building targets:')
1168
+ count_stats.append(('pre-', 'build'))
1169
+
1170
+ def jobs_postfunc(
1171
+ jobs=jobs,
1172
+ options=options,
1173
+ closing_message=closing_message,
1174
+ failure_message=failure_message
1175
+ ):
1176
+ if jobs.were_interrupted():
1177
+ if not options.no_progress and not options.silent:
1178
+ sys.stderr.write("scons: Build interrupted.\n")
1179
+ global exit_status
1180
+ global this_build_status
1181
+ exit_status = 2
1182
+ this_build_status = 2
1183
+
1184
+ if this_build_status:
1185
+ progress_display("scons: " + failure_message)
1186
+ else:
1187
+ progress_display("scons: " + closing_message)
1188
+ if not options.no_exec:
1189
+ if jobs.were_interrupted():
1190
+ progress_display("scons: writing .sconsign file.")
1191
+ SCons.SConsign.write()
1192
+
1193
+ progress_display("scons: " + opening_message)
1194
+ jobs.run(postfunc = jobs_postfunc)
1195
+
1196
+ memory_stats.append('after building targets:')
1197
+ count_stats.append(('post-', 'build'))
1198
+
1199
+ return nodes
1200
+
1201
+ def _exec_main(parser, values):
1202
+ sconsflags = os.environ.get('SCONSFLAGS', '')
1203
+ all_args = sconsflags.split() + sys.argv[1:]
1204
+
1205
+ options, args = parser.parse_args(all_args, values)
1206
+
1207
+ if isinstance(options.debug, list) and "pdb" in options.debug:
1208
+ import pdb
1209
+ pdb.Pdb().runcall(_main, parser)
1210
+ elif options.profile_file:
1211
+ # compat layer imports "cProfile" for us if it's available.
1212
+ from profile import Profile
1213
+
1214
+ # Some versions of Python 2.4 shipped a profiler that had the
1215
+ # wrong 'c_exception' entry in its dispatch table. Make sure
1216
+ # we have the right one. (This may put an unnecessary entry
1217
+ # in the table in earlier versions of Python, but its presence
1218
+ # shouldn't hurt anything).
1219
+ try:
1220
+ dispatch = Profile.dispatch
1221
+ except AttributeError:
1222
+ pass
1223
+ else:
1224
+ dispatch['c_exception'] = Profile.trace_dispatch_return
1225
+
1226
+ prof = Profile()
1227
+ try:
1228
+ prof.runcall(_main, parser)
1229
+ except SConsPrintHelpException, e:
1230
+ prof.dump_stats(options.profile_file)
1231
+ raise e
1232
+ except SystemExit:
1233
+ pass
1234
+ prof.dump_stats(options.profile_file)
1235
+ else:
1236
+ _main(parser)
1237
+
1238
+ def main():
1239
+ global OptionsParser
1240
+ global exit_status
1241
+ global first_command_start
1242
+
1243
+ # Check up front for a Python version we do not support. We
1244
+ # delay the check for deprecated Python versions until later,
1245
+ # after the SConscript files have been read, in case they
1246
+ # disable that warning.
1247
+ if python_version_unsupported():
1248
+ msg = "scons: *** SCons version %s does not run under Python version %s.\n"
1249
+ sys.stderr.write(msg % (SCons.__version__, python_version_string()))
1250
+ sys.exit(1)
1251
+
1252
+ parts = ["SCons by Steven Knight et al.:\n"]
1253
+ try:
1254
+ import __main__
1255
+ parts.append(version_string("script", __main__))
1256
+ except (ImportError, AttributeError):
1257
+ # On Windows there is no scons.py, so there is no
1258
+ # __main__.__version__, hence there is no script version.
1259
+ pass
1260
+ parts.append(version_string("engine", SCons))
1261
+ parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation")
1262
+ version = ''.join(parts)
1263
+
1264
+ import SConsOptions
1265
+ parser = SConsOptions.Parser(version)
1266
+ values = SConsOptions.SConsValues(parser.get_default_values())
1267
+
1268
+ OptionsParser = parser
1269
+
1270
+ try:
1271
+ _exec_main(parser, values)
1272
+ except SystemExit, s:
1273
+ if s:
1274
+ exit_status = s
1275
+ except KeyboardInterrupt:
1276
+ print("scons: Build interrupted.")
1277
+ sys.exit(2)
1278
+ except SyntaxError, e:
1279
+ _scons_syntax_error(e)
1280
+ except SCons.Errors.InternalError:
1281
+ _scons_internal_error()
1282
+ except SCons.Errors.UserError, e:
1283
+ _scons_user_error(e)
1284
+ except SConsPrintHelpException:
1285
+ parser.print_help()
1286
+ exit_status = 0
1287
+ except SCons.Errors.BuildError, e:
1288
+ exit_status = e.exitstatus
1289
+ except:
1290
+ # An exception here is likely a builtin Python exception Python
1291
+ # code in an SConscript file. Show them precisely what the
1292
+ # problem was and where it happened.
1293
+ SCons.Script._SConscript.SConscript_exception()
1294
+ sys.exit(2)
1295
+
1296
+ memory_stats.print_stats()
1297
+ count_stats.print_stats()
1298
+
1299
+ if print_objects:
1300
+ SCons.Debug.listLoggedInstances('*')
1301
+ #SCons.Debug.dumpLoggedInstances('*')
1302
+
1303
+ if print_memoizer:
1304
+ SCons.Memoize.Dump("Memoizer (memory cache) hits and misses:")
1305
+
1306
+ # Dump any development debug info that may have been enabled.
1307
+ # These are purely for internal debugging during development, so
1308
+ # there's no need to control them with --debug= options; they're
1309
+ # controlled by changing the source code.
1310
+ SCons.Debug.dump_caller_counts()
1311
+ SCons.Taskmaster.dump_stats()
1312
+
1313
+ if print_time:
1314
+ total_time = time.time() - SCons.Script.start_time
1315
+ if num_jobs == 1:
1316
+ ct = cumulative_command_time
1317
+ else:
1318
+ if last_command_end is None or first_command_start is None:
1319
+ ct = 0.0
1320
+ else:
1321
+ ct = last_command_end - first_command_start
1322
+ scons_time = total_time - sconscript_time - ct
1323
+ print "Total build time: %f seconds"%total_time
1324
+ print "Total SConscript file execution time: %f seconds"%sconscript_time
1325
+ print "Total SCons execution time: %f seconds"%scons_time
1326
+ print "Total command execution time: %f seconds"%ct
1327
+
1328
+ sys.exit(exit_status)
1329
+
1330
+ # Local Variables:
1331
+ # tab-width:4
1332
+ # indent-tabs-mode:nil
1333
+ # End:
1334
+ # vim: set expandtab tabstop=4 shiftwidth=4: