libv8 3.3.10.4 → 3.5.10.beta1

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 (538) hide show
  1. data/lib/libv8/scons/CHANGES.txt +24 -231
  2. data/lib/libv8/scons/LICENSE.txt +1 -1
  3. data/lib/libv8/scons/MANIFEST +0 -1
  4. data/lib/libv8/scons/PKG-INFO +1 -1
  5. data/lib/libv8/scons/README.txt +9 -9
  6. data/lib/libv8/scons/RELEASE.txt +75 -77
  7. data/lib/libv8/scons/engine/SCons/Action.py +6 -22
  8. data/lib/libv8/scons/engine/SCons/Builder.py +2 -2
  9. data/lib/libv8/scons/engine/SCons/CacheDir.py +2 -2
  10. data/lib/libv8/scons/engine/SCons/Debug.py +2 -2
  11. data/lib/libv8/scons/engine/SCons/Defaults.py +10 -24
  12. data/lib/libv8/scons/engine/SCons/Environment.py +19 -118
  13. data/lib/libv8/scons/engine/SCons/Errors.py +2 -2
  14. data/lib/libv8/scons/engine/SCons/Executor.py +2 -2
  15. data/lib/libv8/scons/engine/SCons/Job.py +2 -2
  16. data/lib/libv8/scons/engine/SCons/Memoize.py +2 -2
  17. data/lib/libv8/scons/engine/SCons/Node/Alias.py +2 -2
  18. data/lib/libv8/scons/engine/SCons/Node/FS.py +121 -281
  19. data/lib/libv8/scons/engine/SCons/Node/Python.py +2 -2
  20. data/lib/libv8/scons/engine/SCons/Node/__init__.py +5 -6
  21. data/lib/libv8/scons/engine/SCons/Options/BoolOption.py +2 -2
  22. data/lib/libv8/scons/engine/SCons/Options/EnumOption.py +2 -2
  23. data/lib/libv8/scons/engine/SCons/Options/ListOption.py +2 -2
  24. data/lib/libv8/scons/engine/SCons/Options/PackageOption.py +2 -2
  25. data/lib/libv8/scons/engine/SCons/Options/PathOption.py +2 -2
  26. data/lib/libv8/scons/engine/SCons/Options/__init__.py +2 -2
  27. data/lib/libv8/scons/engine/SCons/PathList.py +2 -2
  28. data/lib/libv8/scons/engine/SCons/Platform/__init__.py +2 -2
  29. data/lib/libv8/scons/engine/SCons/Platform/aix.py +2 -2
  30. data/lib/libv8/scons/engine/SCons/Platform/cygwin.py +2 -2
  31. data/lib/libv8/scons/engine/SCons/Platform/darwin.py +3 -27
  32. data/lib/libv8/scons/engine/SCons/Platform/hpux.py +2 -2
  33. data/lib/libv8/scons/engine/SCons/Platform/irix.py +2 -2
  34. data/lib/libv8/scons/engine/SCons/Platform/os2.py +2 -2
  35. data/lib/libv8/scons/engine/SCons/Platform/posix.py +2 -2
  36. data/lib/libv8/scons/engine/SCons/Platform/sunos.py +2 -2
  37. data/lib/libv8/scons/engine/SCons/Platform/win32.py +2 -2
  38. data/lib/libv8/scons/engine/SCons/SConf.py +2 -2
  39. data/lib/libv8/scons/engine/SCons/SConsign.py +3 -9
  40. data/lib/libv8/scons/engine/SCons/Scanner/C.py +2 -2
  41. data/lib/libv8/scons/engine/SCons/Scanner/D.py +2 -2
  42. data/lib/libv8/scons/engine/SCons/Scanner/Dir.py +2 -2
  43. data/lib/libv8/scons/engine/SCons/Scanner/Fortran.py +2 -2
  44. data/lib/libv8/scons/engine/SCons/Scanner/IDL.py +2 -2
  45. data/lib/libv8/scons/engine/SCons/Scanner/LaTeX.py +2 -5
  46. data/lib/libv8/scons/engine/SCons/Scanner/Prog.py +2 -2
  47. data/lib/libv8/scons/engine/SCons/Scanner/RC.py +3 -3
  48. data/lib/libv8/scons/engine/SCons/Scanner/__init__.py +2 -2
  49. data/lib/libv8/scons/engine/SCons/Script/Interactive.py +2 -2
  50. data/lib/libv8/scons/engine/SCons/Script/Main.py +11 -82
  51. data/lib/libv8/scons/engine/SCons/Script/SConsOptions.py +5 -5
  52. data/lib/libv8/scons/engine/SCons/Script/SConscript.py +2 -2
  53. data/lib/libv8/scons/engine/SCons/Script/__init__.py +2 -2
  54. data/lib/libv8/scons/engine/SCons/Sig.py +2 -2
  55. data/lib/libv8/scons/engine/SCons/Subst.py +2 -2
  56. data/lib/libv8/scons/engine/SCons/Taskmaster.py +2 -10
  57. data/lib/libv8/scons/engine/SCons/Tool/386asm.py +2 -2
  58. data/lib/libv8/scons/engine/SCons/Tool/BitKeeper.py +2 -2
  59. data/lib/libv8/scons/engine/SCons/Tool/CVS.py +2 -2
  60. data/lib/libv8/scons/engine/SCons/Tool/FortranCommon.py +2 -19
  61. data/lib/libv8/scons/engine/SCons/Tool/JavaCommon.py +2 -2
  62. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/__init__.py +2 -2
  63. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/arch.py +2 -2
  64. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/common.py +2 -2
  65. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/netframework.py +2 -2
  66. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/sdk.py +2 -2
  67. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vc.py +6 -9
  68. data/lib/libv8/scons/engine/SCons/Tool/MSCommon/vs.py +2 -29
  69. data/lib/libv8/scons/engine/SCons/Tool/Perforce.py +2 -2
  70. data/lib/libv8/scons/engine/SCons/Tool/PharLapCommon.py +2 -2
  71. data/lib/libv8/scons/engine/SCons/Tool/RCS.py +2 -2
  72. data/lib/libv8/scons/engine/SCons/Tool/SCCS.py +2 -2
  73. data/lib/libv8/scons/engine/SCons/Tool/Subversion.py +2 -2
  74. data/lib/libv8/scons/engine/SCons/Tool/__init__.py +3 -3
  75. data/lib/libv8/scons/engine/SCons/Tool/aixc++.py +2 -2
  76. data/lib/libv8/scons/engine/SCons/Tool/aixcc.py +2 -2
  77. data/lib/libv8/scons/engine/SCons/Tool/aixf77.py +2 -2
  78. data/lib/libv8/scons/engine/SCons/Tool/aixlink.py +2 -2
  79. data/lib/libv8/scons/engine/SCons/Tool/applelink.py +2 -2
  80. data/lib/libv8/scons/engine/SCons/Tool/ar.py +2 -2
  81. data/lib/libv8/scons/engine/SCons/Tool/as.py +2 -2
  82. data/lib/libv8/scons/engine/SCons/Tool/bcc32.py +2 -2
  83. data/lib/libv8/scons/engine/SCons/Tool/c++.py +2 -2
  84. data/lib/libv8/scons/engine/SCons/Tool/cc.py +2 -2
  85. data/lib/libv8/scons/engine/SCons/Tool/cvf.py +2 -2
  86. data/lib/libv8/scons/engine/SCons/Tool/default.py +2 -2
  87. data/lib/libv8/scons/engine/SCons/Tool/dmd.py +7 -24
  88. data/lib/libv8/scons/engine/SCons/Tool/dvi.py +2 -2
  89. data/lib/libv8/scons/engine/SCons/Tool/dvipdf.py +2 -3
  90. data/lib/libv8/scons/engine/SCons/Tool/dvips.py +2 -3
  91. data/lib/libv8/scons/engine/SCons/Tool/f77.py +2 -2
  92. data/lib/libv8/scons/engine/SCons/Tool/f90.py +2 -2
  93. data/lib/libv8/scons/engine/SCons/Tool/f95.py +2 -2
  94. data/lib/libv8/scons/engine/SCons/Tool/filesystem.py +2 -2
  95. data/lib/libv8/scons/engine/SCons/Tool/fortran.py +2 -2
  96. data/lib/libv8/scons/engine/SCons/Tool/g++.py +2 -2
  97. data/lib/libv8/scons/engine/SCons/Tool/g77.py +2 -2
  98. data/lib/libv8/scons/engine/SCons/Tool/gas.py +2 -2
  99. data/lib/libv8/scons/engine/SCons/Tool/gcc.py +2 -2
  100. data/lib/libv8/scons/engine/SCons/Tool/gfortran.py +3 -3
  101. data/lib/libv8/scons/engine/SCons/Tool/gnulink.py +3 -2
  102. data/lib/libv8/scons/engine/SCons/Tool/gs.py +2 -2
  103. data/lib/libv8/scons/engine/SCons/Tool/hpc++.py +2 -2
  104. data/lib/libv8/scons/engine/SCons/Tool/hpcc.py +2 -2
  105. data/lib/libv8/scons/engine/SCons/Tool/hplink.py +2 -2
  106. data/lib/libv8/scons/engine/SCons/Tool/icc.py +2 -2
  107. data/lib/libv8/scons/engine/SCons/Tool/icl.py +2 -2
  108. data/lib/libv8/scons/engine/SCons/Tool/ifl.py +2 -2
  109. data/lib/libv8/scons/engine/SCons/Tool/ifort.py +2 -2
  110. data/lib/libv8/scons/engine/SCons/Tool/ilink.py +2 -2
  111. data/lib/libv8/scons/engine/SCons/Tool/ilink32.py +2 -2
  112. data/lib/libv8/scons/engine/SCons/Tool/install.py +3 -57
  113. data/lib/libv8/scons/engine/SCons/Tool/intelc.py +25 -65
  114. data/lib/libv8/scons/engine/SCons/Tool/ipkg.py +2 -2
  115. data/lib/libv8/scons/engine/SCons/Tool/jar.py +3 -9
  116. data/lib/libv8/scons/engine/SCons/Tool/javac.py +2 -2
  117. data/lib/libv8/scons/engine/SCons/Tool/javah.py +2 -2
  118. data/lib/libv8/scons/engine/SCons/Tool/latex.py +2 -3
  119. data/lib/libv8/scons/engine/SCons/Tool/lex.py +2 -2
  120. data/lib/libv8/scons/engine/SCons/Tool/link.py +5 -6
  121. data/lib/libv8/scons/engine/SCons/Tool/linkloc.py +2 -2
  122. data/lib/libv8/scons/engine/SCons/Tool/m4.py +2 -2
  123. data/lib/libv8/scons/engine/SCons/Tool/masm.py +2 -2
  124. data/lib/libv8/scons/engine/SCons/Tool/midl.py +2 -2
  125. data/lib/libv8/scons/engine/SCons/Tool/mingw.py +10 -31
  126. data/lib/libv8/scons/engine/SCons/Tool/mslib.py +2 -2
  127. data/lib/libv8/scons/engine/SCons/Tool/mslink.py +9 -61
  128. data/lib/libv8/scons/engine/SCons/Tool/mssdk.py +2 -2
  129. data/lib/libv8/scons/engine/SCons/Tool/msvc.py +11 -21
  130. data/lib/libv8/scons/engine/SCons/Tool/msvs.py +59 -477
  131. data/lib/libv8/scons/engine/SCons/Tool/mwcc.py +2 -2
  132. data/lib/libv8/scons/engine/SCons/Tool/mwld.py +2 -2
  133. data/lib/libv8/scons/engine/SCons/Tool/nasm.py +2 -2
  134. data/lib/libv8/scons/engine/SCons/Tool/packaging/__init__.py +2 -2
  135. data/lib/libv8/scons/engine/SCons/Tool/packaging/ipk.py +2 -2
  136. data/lib/libv8/scons/engine/SCons/Tool/packaging/msi.py +2 -2
  137. data/lib/libv8/scons/engine/SCons/Tool/packaging/rpm.py +2 -2
  138. data/lib/libv8/scons/engine/SCons/Tool/packaging/src_tarbz2.py +2 -2
  139. data/lib/libv8/scons/engine/SCons/Tool/packaging/src_targz.py +2 -2
  140. data/lib/libv8/scons/engine/SCons/Tool/packaging/src_zip.py +2 -2
  141. data/lib/libv8/scons/engine/SCons/Tool/packaging/tarbz2.py +2 -2
  142. data/lib/libv8/scons/engine/SCons/Tool/packaging/targz.py +2 -2
  143. data/lib/libv8/scons/engine/SCons/Tool/packaging/zip.py +2 -2
  144. data/lib/libv8/scons/engine/SCons/Tool/pdf.py +2 -2
  145. data/lib/libv8/scons/engine/SCons/Tool/pdflatex.py +2 -3
  146. data/lib/libv8/scons/engine/SCons/Tool/pdftex.py +2 -3
  147. data/lib/libv8/scons/engine/SCons/Tool/qt.py +2 -2
  148. data/lib/libv8/scons/engine/SCons/Tool/rmic.py +3 -9
  149. data/lib/libv8/scons/engine/SCons/Tool/rpcgen.py +2 -2
  150. data/lib/libv8/scons/engine/SCons/Tool/rpm.py +2 -2
  151. data/lib/libv8/scons/engine/SCons/Tool/sgiar.py +2 -2
  152. data/lib/libv8/scons/engine/SCons/Tool/sgic++.py +2 -2
  153. data/lib/libv8/scons/engine/SCons/Tool/sgicc.py +2 -2
  154. data/lib/libv8/scons/engine/SCons/Tool/sgilink.py +3 -2
  155. data/lib/libv8/scons/engine/SCons/Tool/sunar.py +2 -2
  156. data/lib/libv8/scons/engine/SCons/Tool/sunc++.py +2 -2
  157. data/lib/libv8/scons/engine/SCons/Tool/suncc.py +2 -2
  158. data/lib/libv8/scons/engine/SCons/Tool/sunf77.py +2 -2
  159. data/lib/libv8/scons/engine/SCons/Tool/sunf90.py +2 -2
  160. data/lib/libv8/scons/engine/SCons/Tool/sunf95.py +2 -2
  161. data/lib/libv8/scons/engine/SCons/Tool/sunlink.py +3 -2
  162. data/lib/libv8/scons/engine/SCons/Tool/swig.py +5 -6
  163. data/lib/libv8/scons/engine/SCons/Tool/tar.py +2 -2
  164. data/lib/libv8/scons/engine/SCons/Tool/tex.py +43 -96
  165. data/lib/libv8/scons/engine/SCons/Tool/textfile.py +2 -2
  166. data/lib/libv8/scons/engine/SCons/Tool/tlib.py +2 -2
  167. data/lib/libv8/scons/engine/SCons/Tool/wix.py +2 -2
  168. data/lib/libv8/scons/engine/SCons/Tool/yacc.py +2 -12
  169. data/lib/libv8/scons/engine/SCons/Tool/zip.py +2 -2
  170. data/lib/libv8/scons/engine/SCons/Util.py +3 -3
  171. data/lib/libv8/scons/engine/SCons/Variables/BoolVariable.py +2 -2
  172. data/lib/libv8/scons/engine/SCons/Variables/EnumVariable.py +3 -3
  173. data/lib/libv8/scons/engine/SCons/Variables/ListVariable.py +2 -2
  174. data/lib/libv8/scons/engine/SCons/Variables/PackageVariable.py +2 -2
  175. data/lib/libv8/scons/engine/SCons/Variables/PathVariable.py +2 -2
  176. data/lib/libv8/scons/engine/SCons/Variables/__init__.py +2 -2
  177. data/lib/libv8/scons/engine/SCons/Warnings.py +2 -2
  178. data/lib/libv8/scons/engine/SCons/__init__.py +6 -6
  179. data/lib/libv8/scons/engine/SCons/compat/__init__.py +2 -2
  180. data/lib/libv8/scons/engine/SCons/compat/_scons_builtins.py +2 -2
  181. data/lib/libv8/scons/engine/SCons/compat/_scons_collections.py +2 -2
  182. data/lib/libv8/scons/engine/SCons/compat/_scons_dbm.py +2 -2
  183. data/lib/libv8/scons/engine/SCons/compat/_scons_hashlib.py +2 -2
  184. data/lib/libv8/scons/engine/SCons/compat/_scons_io.py +2 -2
  185. data/lib/libv8/scons/engine/SCons/cpp.py +2 -2
  186. data/lib/libv8/scons/engine/SCons/dblite.py +1 -4
  187. data/lib/libv8/scons/engine/SCons/exitfuncs.py +2 -2
  188. data/lib/libv8/scons/scons-time.1 +3 -3
  189. data/lib/libv8/scons/scons.1 +1164 -1170
  190. data/lib/libv8/scons/sconsign.1 +3 -3
  191. data/lib/libv8/scons/script/scons +22 -22
  192. data/lib/libv8/scons/script/scons-time +2 -2
  193. data/lib/libv8/scons/script/scons.bat +4 -7
  194. data/lib/libv8/scons/script/sconsign +20 -21
  195. data/lib/libv8/scons/setup.cfg +1 -0
  196. data/lib/libv8/scons/setup.py +40 -38
  197. data/lib/libv8/v8/.gitignore +1 -1
  198. data/lib/libv8/v8/AUTHORS +2 -0
  199. data/lib/libv8/v8/ChangeLog +387 -0
  200. data/lib/libv8/v8/Makefile +171 -0
  201. data/lib/libv8/v8/SConstruct +124 -51
  202. data/lib/libv8/v8/build/README.txt +31 -14
  203. data/lib/libv8/v8/build/all.gyp +11 -4
  204. data/lib/libv8/v8/build/armu.gypi +6 -2
  205. data/lib/libv8/v8/build/common.gypi +240 -94
  206. data/lib/libv8/v8/build/gyp_v8 +32 -4
  207. data/lib/libv8/v8/build/standalone.gypi +200 -0
  208. data/lib/libv8/v8/include/v8-debug.h +0 -0
  209. data/lib/libv8/v8/include/v8-profiler.h +8 -11
  210. data/lib/libv8/v8/include/v8.h +191 -108
  211. data/lib/libv8/v8/preparser/SConscript +2 -2
  212. data/lib/libv8/v8/preparser/preparser-process.cc +3 -3
  213. data/lib/libv8/v8/preparser/preparser.gyp +42 -0
  214. data/lib/libv8/v8/src/SConscript +33 -8
  215. data/lib/libv8/v8/src/accessors.cc +77 -43
  216. data/lib/libv8/v8/src/api.cc +393 -191
  217. data/lib/libv8/v8/src/api.h +4 -8
  218. data/lib/libv8/v8/src/apinatives.js +15 -3
  219. data/lib/libv8/v8/src/arguments.h +8 -0
  220. data/lib/libv8/v8/src/arm/assembler-arm.cc +120 -120
  221. data/lib/libv8/v8/src/arm/assembler-arm.h +92 -43
  222. data/lib/libv8/v8/src/arm/builtins-arm.cc +32 -39
  223. data/lib/libv8/v8/src/arm/code-stubs-arm.cc +572 -351
  224. data/lib/libv8/v8/src/arm/code-stubs-arm.h +8 -77
  225. data/lib/libv8/v8/src/arm/codegen-arm.h +0 -2
  226. data/lib/libv8/v8/src/arm/deoptimizer-arm.cc +50 -30
  227. data/lib/libv8/v8/src/arm/disasm-arm.cc +1 -1
  228. data/lib/libv8/v8/src/arm/frames-arm.h +9 -5
  229. data/lib/libv8/v8/src/arm/full-codegen-arm.cc +331 -432
  230. data/lib/libv8/v8/src/arm/ic-arm.cc +192 -124
  231. data/lib/libv8/v8/src/arm/lithium-arm.cc +216 -232
  232. data/lib/libv8/v8/src/arm/lithium-arm.h +106 -259
  233. data/lib/libv8/v8/src/arm/lithium-codegen-arm.cc +633 -642
  234. data/lib/libv8/v8/src/arm/lithium-codegen-arm.h +4 -4
  235. data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.cc +1 -3
  236. data/lib/libv8/v8/src/arm/macro-assembler-arm.cc +260 -185
  237. data/lib/libv8/v8/src/arm/macro-assembler-arm.h +45 -25
  238. data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.cc +25 -13
  239. data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.h +3 -0
  240. data/lib/libv8/v8/src/arm/stub-cache-arm.cc +413 -226
  241. data/lib/libv8/v8/src/array.js +38 -18
  242. data/lib/libv8/v8/src/assembler.cc +12 -5
  243. data/lib/libv8/v8/src/assembler.h +15 -9
  244. data/lib/libv8/v8/src/ast-inl.h +34 -25
  245. data/lib/libv8/v8/src/ast.cc +141 -72
  246. data/lib/libv8/v8/src/ast.h +255 -181
  247. data/lib/libv8/v8/src/bignum.cc +3 -4
  248. data/lib/libv8/v8/src/bootstrapper.cc +55 -11
  249. data/lib/libv8/v8/src/bootstrapper.h +3 -2
  250. data/lib/libv8/v8/src/builtins.cc +8 -2
  251. data/lib/libv8/v8/src/builtins.h +4 -0
  252. data/lib/libv8/v8/src/cached-powers.cc +8 -4
  253. data/lib/libv8/v8/src/checks.h +3 -3
  254. data/lib/libv8/v8/src/code-stubs.cc +173 -28
  255. data/lib/libv8/v8/src/code-stubs.h +104 -148
  256. data/lib/libv8/v8/src/codegen.cc +8 -8
  257. data/lib/libv8/v8/src/compilation-cache.cc +2 -47
  258. data/lib/libv8/v8/src/compilation-cache.h +0 -10
  259. data/lib/libv8/v8/src/compiler.cc +27 -16
  260. data/lib/libv8/v8/src/compiler.h +13 -18
  261. data/lib/libv8/v8/src/contexts.cc +107 -72
  262. data/lib/libv8/v8/src/contexts.h +70 -34
  263. data/lib/libv8/v8/src/conversions-inl.h +572 -14
  264. data/lib/libv8/v8/src/conversions.cc +9 -707
  265. data/lib/libv8/v8/src/conversions.h +23 -12
  266. data/lib/libv8/v8/src/cpu-profiler-inl.h +2 -19
  267. data/lib/libv8/v8/src/cpu-profiler.cc +4 -21
  268. data/lib/libv8/v8/src/cpu-profiler.h +8 -17
  269. data/lib/libv8/v8/src/d8-debug.cc +5 -3
  270. data/lib/libv8/v8/src/d8-debug.h +6 -7
  271. data/lib/libv8/v8/src/d8-posix.cc +1 -10
  272. data/lib/libv8/v8/src/d8.cc +721 -219
  273. data/lib/libv8/v8/src/d8.gyp +37 -12
  274. data/lib/libv8/v8/src/d8.h +141 -19
  275. data/lib/libv8/v8/src/d8.js +17 -8
  276. data/lib/libv8/v8/src/date.js +16 -5
  277. data/lib/libv8/v8/src/dateparser-inl.h +242 -39
  278. data/lib/libv8/v8/src/dateparser.cc +38 -4
  279. data/lib/libv8/v8/src/dateparser.h +170 -28
  280. data/lib/libv8/v8/src/debug-agent.cc +5 -3
  281. data/lib/libv8/v8/src/debug-agent.h +11 -7
  282. data/lib/libv8/v8/src/debug-debugger.js +65 -34
  283. data/lib/libv8/v8/src/debug.cc +30 -60
  284. data/lib/libv8/v8/src/debug.h +5 -3
  285. data/lib/libv8/v8/src/deoptimizer.cc +227 -10
  286. data/lib/libv8/v8/src/deoptimizer.h +133 -9
  287. data/lib/libv8/v8/src/disassembler.cc +22 -14
  288. data/lib/libv8/v8/src/diy-fp.cc +4 -3
  289. data/lib/libv8/v8/src/diy-fp.h +3 -3
  290. data/lib/libv8/v8/src/elements.cc +634 -0
  291. data/lib/libv8/v8/src/elements.h +95 -0
  292. data/lib/libv8/v8/src/execution.cc +5 -21
  293. data/lib/libv8/v8/src/extensions/experimental/break-iterator.cc +3 -1
  294. data/lib/libv8/v8/src/extensions/experimental/break-iterator.h +1 -1
  295. data/lib/libv8/v8/src/extensions/experimental/collator.cc +6 -2
  296. data/lib/libv8/v8/src/extensions/experimental/collator.h +1 -2
  297. data/lib/libv8/v8/src/extensions/experimental/datetime-format.cc +384 -0
  298. data/lib/libv8/v8/src/extensions/experimental/datetime-format.h +83 -0
  299. data/lib/libv8/v8/src/extensions/experimental/experimental.gyp +18 -7
  300. data/lib/libv8/v8/src/extensions/experimental/i18n-extension.cc +12 -16
  301. data/lib/libv8/v8/src/extensions/experimental/i18n-extension.h +1 -1
  302. data/lib/libv8/v8/src/extensions/experimental/i18n-js2c.py +126 -0
  303. data/lib/libv8/v8/src/extensions/experimental/i18n-locale.cc +3 -4
  304. data/lib/libv8/v8/src/extensions/experimental/i18n-locale.h +1 -1
  305. data/lib/libv8/v8/src/{shell.h → extensions/experimental/i18n-natives.h} +8 -20
  306. data/lib/libv8/v8/src/extensions/experimental/i18n-utils.cc +45 -1
  307. data/lib/libv8/v8/src/extensions/experimental/i18n-utils.h +21 -1
  308. data/lib/libv8/v8/src/extensions/experimental/i18n.js +211 -11
  309. data/lib/libv8/v8/src/extensions/experimental/language-matcher.cc +4 -3
  310. data/lib/libv8/v8/src/extensions/experimental/language-matcher.h +1 -1
  311. data/lib/libv8/v8/src/extensions/experimental/number-format.cc +374 -0
  312. data/lib/libv8/v8/src/extensions/experimental/number-format.h +71 -0
  313. data/lib/libv8/v8/src/factory.cc +89 -18
  314. data/lib/libv8/v8/src/factory.h +36 -8
  315. data/lib/libv8/v8/src/flag-definitions.h +11 -44
  316. data/lib/libv8/v8/src/frames-inl.h +8 -1
  317. data/lib/libv8/v8/src/frames.cc +39 -3
  318. data/lib/libv8/v8/src/frames.h +10 -3
  319. data/lib/libv8/v8/src/full-codegen.cc +311 -293
  320. data/lib/libv8/v8/src/full-codegen.h +183 -143
  321. data/lib/libv8/v8/src/func-name-inferrer.cc +29 -15
  322. data/lib/libv8/v8/src/func-name-inferrer.h +19 -9
  323. data/lib/libv8/v8/src/gdb-jit.cc +658 -55
  324. data/lib/libv8/v8/src/gdb-jit.h +6 -2
  325. data/lib/libv8/v8/src/global-handles.cc +368 -312
  326. data/lib/libv8/v8/src/global-handles.h +29 -36
  327. data/lib/libv8/v8/src/globals.h +3 -1
  328. data/lib/libv8/v8/src/handles.cc +43 -69
  329. data/lib/libv8/v8/src/handles.h +21 -16
  330. data/lib/libv8/v8/src/heap-inl.h +11 -13
  331. data/lib/libv8/v8/src/heap-profiler.cc +0 -999
  332. data/lib/libv8/v8/src/heap-profiler.h +0 -303
  333. data/lib/libv8/v8/src/heap.cc +366 -141
  334. data/lib/libv8/v8/src/heap.h +87 -26
  335. data/lib/libv8/v8/src/hydrogen-instructions.cc +192 -81
  336. data/lib/libv8/v8/src/hydrogen-instructions.h +711 -482
  337. data/lib/libv8/v8/src/hydrogen.cc +1146 -629
  338. data/lib/libv8/v8/src/hydrogen.h +100 -64
  339. data/lib/libv8/v8/src/ia32/assembler-ia32.cc +19 -0
  340. data/lib/libv8/v8/src/ia32/assembler-ia32.h +15 -2
  341. data/lib/libv8/v8/src/ia32/builtins-ia32.cc +34 -39
  342. data/lib/libv8/v8/src/ia32/code-stubs-ia32.cc +675 -377
  343. data/lib/libv8/v8/src/ia32/code-stubs-ia32.h +8 -69
  344. data/lib/libv8/v8/src/ia32/codegen-ia32.cc +1 -0
  345. data/lib/libv8/v8/src/ia32/codegen-ia32.h +0 -2
  346. data/lib/libv8/v8/src/ia32/cpu-ia32.cc +3 -2
  347. data/lib/libv8/v8/src/ia32/deoptimizer-ia32.cc +28 -3
  348. data/lib/libv8/v8/src/ia32/disasm-ia32.cc +21 -10
  349. data/lib/libv8/v8/src/ia32/frames-ia32.h +6 -5
  350. data/lib/libv8/v8/src/ia32/full-codegen-ia32.cc +459 -465
  351. data/lib/libv8/v8/src/ia32/ic-ia32.cc +196 -147
  352. data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.cc +575 -650
  353. data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.h +19 -21
  354. data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.cc +7 -2
  355. data/lib/libv8/v8/src/ia32/lithium-ia32.cc +261 -256
  356. data/lib/libv8/v8/src/ia32/lithium-ia32.h +234 -335
  357. data/lib/libv8/v8/src/ia32/macro-assembler-ia32.cc +224 -67
  358. data/lib/libv8/v8/src/ia32/macro-assembler-ia32.h +63 -19
  359. data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.cc +22 -8
  360. data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.h +3 -0
  361. data/lib/libv8/v8/src/ia32/stub-cache-ia32.cc +380 -239
  362. data/lib/libv8/v8/src/ic.cc +198 -234
  363. data/lib/libv8/v8/src/ic.h +32 -30
  364. data/lib/libv8/v8/src/interpreter-irregexp.cc +6 -4
  365. data/lib/libv8/v8/src/isolate.cc +112 -95
  366. data/lib/libv8/v8/src/isolate.h +55 -71
  367. data/lib/libv8/v8/src/json-parser.h +486 -48
  368. data/lib/libv8/v8/src/json.js +28 -23
  369. data/lib/libv8/v8/src/jsregexp.cc +163 -208
  370. data/lib/libv8/v8/src/jsregexp.h +0 -1
  371. data/lib/libv8/v8/src/lithium-allocator-inl.h +29 -27
  372. data/lib/libv8/v8/src/lithium-allocator.cc +22 -17
  373. data/lib/libv8/v8/src/lithium-allocator.h +8 -8
  374. data/lib/libv8/v8/src/lithium.cc +16 -11
  375. data/lib/libv8/v8/src/lithium.h +31 -34
  376. data/lib/libv8/v8/src/liveedit.cc +111 -15
  377. data/lib/libv8/v8/src/liveedit.h +3 -4
  378. data/lib/libv8/v8/src/liveobjectlist.cc +116 -80
  379. data/lib/libv8/v8/src/liveobjectlist.h +2 -2
  380. data/lib/libv8/v8/src/log-inl.h +0 -4
  381. data/lib/libv8/v8/src/log-utils.cc +25 -143
  382. data/lib/libv8/v8/src/log-utils.h +13 -92
  383. data/lib/libv8/v8/src/log.cc +26 -249
  384. data/lib/libv8/v8/src/log.h +6 -17
  385. data/lib/libv8/v8/src/macros.py +9 -6
  386. data/lib/libv8/v8/src/mark-compact.cc +276 -56
  387. data/lib/libv8/v8/src/mark-compact.h +20 -0
  388. data/lib/libv8/v8/src/messages.js +93 -39
  389. data/lib/libv8/v8/src/mips/assembler-mips-inl.h +9 -3
  390. data/lib/libv8/v8/src/mips/assembler-mips.cc +297 -189
  391. data/lib/libv8/v8/src/mips/assembler-mips.h +121 -54
  392. data/lib/libv8/v8/src/mips/builtins-mips.cc +23 -24
  393. data/lib/libv8/v8/src/mips/code-stubs-mips.cc +484 -263
  394. data/lib/libv8/v8/src/mips/code-stubs-mips.h +8 -83
  395. data/lib/libv8/v8/src/mips/codegen-mips.h +0 -2
  396. data/lib/libv8/v8/src/mips/constants-mips.h +37 -11
  397. data/lib/libv8/v8/src/mips/deoptimizer-mips.cc +6 -1
  398. data/lib/libv8/v8/src/mips/frames-mips.h +8 -7
  399. data/lib/libv8/v8/src/mips/full-codegen-mips.cc +258 -419
  400. data/lib/libv8/v8/src/mips/ic-mips.cc +181 -121
  401. data/lib/libv8/v8/src/mips/macro-assembler-mips.cc +640 -382
  402. data/lib/libv8/v8/src/mips/macro-assembler-mips.h +94 -89
  403. data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.cc +23 -10
  404. data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.h +6 -1
  405. data/lib/libv8/v8/src/mips/simulator-mips.cc +249 -49
  406. data/lib/libv8/v8/src/mips/simulator-mips.h +25 -1
  407. data/lib/libv8/v8/src/mips/stub-cache-mips.cc +373 -161
  408. data/lib/libv8/v8/src/mirror-debugger.js +55 -8
  409. data/lib/libv8/v8/src/misc-intrinsics.h +89 -0
  410. data/lib/libv8/v8/src/mksnapshot.cc +36 -4
  411. data/lib/libv8/v8/src/natives.h +5 -2
  412. data/lib/libv8/v8/src/objects-debug.cc +73 -6
  413. data/lib/libv8/v8/src/objects-inl.h +529 -164
  414. data/lib/libv8/v8/src/objects-printer.cc +67 -12
  415. data/lib/libv8/v8/src/objects-visiting.cc +13 -2
  416. data/lib/libv8/v8/src/objects-visiting.h +41 -1
  417. data/lib/libv8/v8/src/objects.cc +2200 -1177
  418. data/lib/libv8/v8/src/objects.h +912 -283
  419. data/lib/libv8/v8/src/parser.cc +566 -371
  420. data/lib/libv8/v8/src/parser.h +35 -33
  421. data/lib/libv8/v8/src/platform-cygwin.cc +10 -25
  422. data/lib/libv8/v8/src/platform-freebsd.cc +4 -29
  423. data/lib/libv8/v8/src/platform-linux.cc +60 -57
  424. data/lib/libv8/v8/src/platform-macos.cc +4 -27
  425. data/lib/libv8/v8/src/platform-nullos.cc +3 -16
  426. data/lib/libv8/v8/src/platform-openbsd.cc +247 -85
  427. data/lib/libv8/v8/src/platform-posix.cc +43 -1
  428. data/lib/libv8/v8/src/platform-solaris.cc +151 -112
  429. data/lib/libv8/v8/src/platform-tls.h +1 -1
  430. data/lib/libv8/v8/src/platform-win32.cc +65 -39
  431. data/lib/libv8/v8/src/platform.h +17 -14
  432. data/lib/libv8/v8/src/preparse-data-format.h +2 -2
  433. data/lib/libv8/v8/src/preparse-data.h +8 -2
  434. data/lib/libv8/v8/src/preparser-api.cc +2 -18
  435. data/lib/libv8/v8/src/preparser.cc +106 -65
  436. data/lib/libv8/v8/src/preparser.h +26 -5
  437. data/lib/libv8/v8/src/prettyprinter.cc +25 -43
  438. data/lib/libv8/v8/src/profile-generator-inl.h +0 -4
  439. data/lib/libv8/v8/src/profile-generator.cc +213 -34
  440. data/lib/libv8/v8/src/profile-generator.h +9 -9
  441. data/lib/libv8/v8/src/property.h +1 -0
  442. data/lib/libv8/v8/src/proxy.js +74 -4
  443. data/lib/libv8/v8/src/regexp-macro-assembler.cc +10 -6
  444. data/lib/libv8/v8/src/regexp.js +16 -11
  445. data/lib/libv8/v8/src/rewriter.cc +24 -133
  446. data/lib/libv8/v8/src/runtime-profiler.cc +27 -151
  447. data/lib/libv8/v8/src/runtime-profiler.h +5 -31
  448. data/lib/libv8/v8/src/runtime.cc +1450 -681
  449. data/lib/libv8/v8/src/runtime.h +47 -31
  450. data/lib/libv8/v8/src/runtime.js +2 -1
  451. data/lib/libv8/v8/src/scanner-base.cc +358 -220
  452. data/lib/libv8/v8/src/scanner-base.h +30 -138
  453. data/lib/libv8/v8/src/scanner.cc +0 -18
  454. data/lib/libv8/v8/src/scanner.h +0 -15
  455. data/lib/libv8/v8/src/scopeinfo.cc +3 -1
  456. data/lib/libv8/v8/src/scopeinfo.h +1 -6
  457. data/lib/libv8/v8/src/scopes.cc +243 -253
  458. data/lib/libv8/v8/src/scopes.h +58 -109
  459. data/lib/libv8/v8/src/serialize.cc +12 -54
  460. data/lib/libv8/v8/src/serialize.h +47 -0
  461. data/lib/libv8/v8/src/small-pointer-list.h +25 -0
  462. data/lib/libv8/v8/src/spaces-inl.h +4 -50
  463. data/lib/libv8/v8/src/spaces.cc +64 -131
  464. data/lib/libv8/v8/src/spaces.h +19 -70
  465. data/lib/libv8/v8/src/string-stream.cc +3 -1
  466. data/lib/libv8/v8/src/string.js +10 -6
  467. data/lib/libv8/v8/src/strtod.cc +7 -3
  468. data/lib/libv8/v8/src/stub-cache.cc +59 -129
  469. data/lib/libv8/v8/src/stub-cache.h +42 -54
  470. data/lib/libv8/v8/src/third_party/valgrind/valgrind.h +1447 -1339
  471. data/lib/libv8/v8/src/token.cc +4 -4
  472. data/lib/libv8/v8/src/token.h +6 -5
  473. data/lib/libv8/v8/src/type-info.cc +173 -129
  474. data/lib/libv8/v8/src/type-info.h +40 -22
  475. data/lib/libv8/v8/src/utils.cc +25 -304
  476. data/lib/libv8/v8/src/utils.h +118 -3
  477. data/lib/libv8/v8/src/v8-counters.h +3 -6
  478. data/lib/libv8/v8/src/v8.cc +34 -27
  479. data/lib/libv8/v8/src/v8.h +7 -7
  480. data/lib/libv8/v8/src/v8conversions.cc +129 -0
  481. data/lib/libv8/v8/src/v8conversions.h +60 -0
  482. data/lib/libv8/v8/src/v8globals.h +15 -6
  483. data/lib/libv8/v8/src/v8natives.js +300 -78
  484. data/lib/libv8/v8/src/v8threads.cc +14 -6
  485. data/lib/libv8/v8/src/v8threads.h +4 -1
  486. data/lib/libv8/v8/src/v8utils.cc +360 -0
  487. data/lib/libv8/v8/src/v8utils.h +17 -66
  488. data/lib/libv8/v8/src/variables.cc +7 -12
  489. data/lib/libv8/v8/src/variables.h +12 -10
  490. data/lib/libv8/v8/src/version.cc +2 -2
  491. data/lib/libv8/v8/src/vm-state-inl.h +0 -41
  492. data/lib/libv8/v8/src/vm-state.h +0 -11
  493. data/lib/libv8/v8/src/weakmap.js +103 -0
  494. data/lib/libv8/v8/src/x64/assembler-x64.h +6 -3
  495. data/lib/libv8/v8/src/x64/builtins-x64.cc +25 -22
  496. data/lib/libv8/v8/src/x64/code-stubs-x64.cc +523 -250
  497. data/lib/libv8/v8/src/x64/code-stubs-x64.h +8 -71
  498. data/lib/libv8/v8/src/x64/codegen-x64.cc +1 -0
  499. data/lib/libv8/v8/src/x64/codegen-x64.h +0 -2
  500. data/lib/libv8/v8/src/x64/cpu-x64.cc +2 -1
  501. data/lib/libv8/v8/src/x64/deoptimizer-x64.cc +40 -8
  502. data/lib/libv8/v8/src/x64/disasm-x64.cc +12 -10
  503. data/lib/libv8/v8/src/x64/frames-x64.h +7 -6
  504. data/lib/libv8/v8/src/x64/full-codegen-x64.cc +310 -415
  505. data/lib/libv8/v8/src/x64/ic-x64.cc +180 -117
  506. data/lib/libv8/v8/src/x64/lithium-codegen-x64.cc +411 -523
  507. data/lib/libv8/v8/src/x64/lithium-codegen-x64.h +11 -6
  508. data/lib/libv8/v8/src/x64/lithium-x64.cc +191 -216
  509. data/lib/libv8/v8/src/x64/lithium-x64.h +112 -263
  510. data/lib/libv8/v8/src/x64/macro-assembler-x64.cc +177 -61
  511. data/lib/libv8/v8/src/x64/macro-assembler-x64.h +23 -7
  512. data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.cc +21 -9
  513. data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.h +6 -0
  514. data/lib/libv8/v8/src/x64/stub-cache-x64.cc +273 -107
  515. data/lib/libv8/v8/src/zone.cc +31 -22
  516. data/lib/libv8/v8/src/zone.h +12 -6
  517. data/lib/libv8/v8/tools/codemap.js +8 -0
  518. data/lib/libv8/v8/tools/gcmole/Makefile +43 -0
  519. data/lib/libv8/v8/tools/gcmole/gcmole.lua +0 -2
  520. data/lib/libv8/v8/tools/gdb-v8-support.py +154 -0
  521. data/lib/libv8/v8/tools/grokdump.py +44 -35
  522. data/lib/libv8/v8/tools/gyp/v8.gyp +94 -248
  523. data/lib/libv8/v8/tools/js2c.py +83 -52
  524. data/lib/libv8/v8/tools/linux-tick-processor +4 -6
  525. data/lib/libv8/v8/tools/ll_prof.py +3 -3
  526. data/lib/libv8/v8/tools/oom_dump/README +3 -1
  527. data/lib/libv8/v8/tools/presubmit.py +11 -4
  528. data/lib/libv8/v8/tools/profile.js +46 -2
  529. data/lib/libv8/v8/tools/splaytree.js +11 -0
  530. data/lib/libv8/v8/tools/stats-viewer.py +15 -11
  531. data/lib/libv8/v8/tools/test-wrapper-gypbuild.py +227 -0
  532. data/lib/libv8/v8/tools/test.py +28 -8
  533. data/lib/libv8/v8/tools/tickprocessor.js +0 -16
  534. data/lib/libv8/version.rb +1 -1
  535. data/libv8.gemspec +2 -2
  536. metadata +31 -19
  537. data/lib/libv8/scons/engine/SCons/Tool/f03.py +0 -63
  538. data/lib/libv8/v8/src/json-parser.cc +0 -504
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
2
+ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
3
3
  #
4
4
  # Permission is hereby granted, free of charge, to any person obtaining
5
5
  # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #
23
23
 
24
- __revision__ = "src/engine/SCons/Tool/mssdk.py 5357 2011/09/09 21:31:03 bdeegan"
24
+ __revision__ = "src/engine/SCons/Tool/mssdk.py 5134 2010/08/16 23:02:40 bdeegan"
25
25
 
26
26
  """engine.SCons.Tool.mssdk
27
27
 
@@ -9,7 +9,7 @@ selection method.
9
9
  """
10
10
 
11
11
  #
12
- # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
12
+ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
13
13
  #
14
14
  # Permission is hereby granted, free of charge, to any person obtaining
15
15
  # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
31
31
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
32
  #
33
33
 
34
- __revision__ = "src/engine/SCons/Tool/msvc.py 5357 2011/09/09 21:31:03 bdeegan"
34
+ __revision__ = "src/engine/SCons/Tool/msvc.py 5134 2010/08/16 23:02:40 bdeegan"
35
35
 
36
36
  import os.path
37
37
  import re
@@ -140,13 +140,8 @@ def msvc_batch_key(action, env, target, source):
140
140
  Returning None specifies that the specified target+source should not
141
141
  be batched with other compilations.
142
142
  """
143
-
144
- # Fixing MSVC_BATCH mode. Previous if did not work when MSVC_BATCH
145
- # was set to False. This new version should work better.
146
- # Note we need to do the env.subst so $MSVC_BATCH can be a reference to
147
- # another construction variable, which is why we test for False and 0
148
- # as strings.
149
- if not 'MSVC_BATCH' in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
143
+ b = env.subst('$MSVC_BATCH')
144
+ if b in (None, '', '0'):
150
145
  # We're not using batching; return no key.
151
146
  return None
152
147
  t = target[0]
@@ -166,13 +161,8 @@ def msvc_output_flag(target, source, env, for_signature):
166
161
  we return an /Fo string that just specifies the first target's
167
162
  directory (where the Visual C/C++ compiler will put the .obj files).
168
163
  """
169
-
170
- # Fixing MSVC_BATCH mode. Previous if did not work when MSVC_BATCH
171
- # was set to False. This new version should work better. Removed
172
- # len(source)==1 as batch mode can compile only one file
173
- # (and it also fixed problem with compiling only one changed file
174
- # with batch mode enabled)
175
- if not 'MSVC_BATCH' in env or env.subst('$MSVC_BATCH') in ('0', 'False', '', None):
164
+ b = env.subst('$MSVC_BATCH')
165
+ if b in (None, '', '0') or len(source) == 1:
176
166
  return '/Fo$TARGET'
177
167
  else:
178
168
  # The Visual C/C++ compiler requires a \ at the end of the /Fo
@@ -218,23 +208,23 @@ def generate(env):
218
208
  shared_obj.add_emitter(suffix, shared_object_emitter)
219
209
 
220
210
  env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Z7") or ""}'])
221
- env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s \\\"/Fp%s\\\""%(PCHSTOP or "",File(PCH))) or ""}'])
211
+ env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
222
212
  env['_MSVC_OUTPUT_FLAG'] = msvc_output_flag
223
213
  env['_CCCOMCOM'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS'
224
214
  env['CC'] = 'cl'
225
215
  env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
226
216
  env['CFLAGS'] = SCons.Util.CLVar('')
227
- env['CCCOM'] = '${TEMPFILE("$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM")}'
217
+ env['CCCOM'] = '$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM'
228
218
  env['SHCC'] = '$CC'
229
219
  env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
230
220
  env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS')
231
- env['SHCCCOM'] = '${TEMPFILE("$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM")}'
221
+ env['SHCCCOM'] = '$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM'
232
222
  env['CXX'] = '$CC'
233
223
  env['CXXFLAGS'] = SCons.Util.CLVar('$( /TP $)')
234
- env['CXXCOM'] = '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM")}'
224
+ env['CXXCOM'] = '$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM'
235
225
  env['SHCXX'] = '$CXX'
236
226
  env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
237
- env['SHCXXCOM'] = '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM")}'
227
+ env['SHCXXCOM'] = '$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM'
238
228
  env['CPPDEFPREFIX'] = '/D'
239
229
  env['CPPDEFSUFFIX'] = ''
240
230
  env['INCPREFIX'] = '/I'
@@ -9,7 +9,7 @@ selection method.
9
9
  """
10
10
 
11
11
  #
12
- # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation
12
+ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
13
13
  #
14
14
  # Permission is hereby granted, free of charge, to any person obtaining
15
15
  # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
30
30
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31
31
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
32
 
33
- __revision__ = "src/engine/SCons/Tool/msvs.py 5357 2011/09/09 21:31:03 bdeegan"
33
+ __revision__ = "src/engine/SCons/Tool/msvs.py 5134 2010/08/16 23:02:40 bdeegan"
34
34
 
35
35
  import SCons.compat
36
36
 
@@ -47,7 +47,6 @@ import SCons.Builder
47
47
  import SCons.Node.FS
48
48
  import SCons.Platform.win32
49
49
  import SCons.Script.SConscript
50
- import SCons.PathList
51
50
  import SCons.Util
52
51
  import SCons.Warnings
53
52
 
@@ -65,12 +64,6 @@ def xmlify(s):
65
64
  s = s.replace('"', """)
66
65
  return s
67
66
 
68
- # Process a CPPPATH list in includes, given the env, target and source.
69
- # Returns a tuple of nodes.
70
- def processIncludes(includes, env, target, source):
71
- return SCons.PathList.PathList(includes).subst_path(env, target, source)
72
-
73
-
74
67
  external_makefile_guid = '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}'
75
68
 
76
69
  def _generateGUID(slnfile, name):
@@ -99,42 +92,6 @@ def msvs_parse_version(s):
99
92
  num, suite = version_re.match(s).groups()
100
93
  return float(num), suite
101
94
 
102
- # os.path.relpath has been introduced in Python 2.6
103
- # We define it locally for earlier versions of Python
104
- def relpath(path, start=os.path.curdir):
105
- """Return a relative version of a path"""
106
- import sys
107
- if not path:
108
- raise ValueError("no path specified")
109
- start_list = os.path.abspath(start).split(os.sep)
110
- path_list = os.path.abspath(path).split(os.sep)
111
- if 'posix' in sys.builtin_module_names:
112
- # Work out how much of the filepath is shared by start and path.
113
- i = len(os.path.commonprefix([start_list, path_list]))
114
- else:
115
- if start_list[0].lower() != path_list[0].lower():
116
- unc_path, rest = os.path.splitunc(path)
117
- unc_start, rest = os.path.splitunc(start)
118
- if bool(unc_path) ^ bool(unc_start):
119
- raise ValueError("Cannot mix UNC and non-UNC paths (%s and %s)"
120
- % (path, start))
121
- else:
122
- raise ValueError("path is on drive %s, start on drive %s"
123
- % (path_list[0], start_list[0]))
124
- # Work out how much of the filepath is shared by start and path.
125
- for i in range(min(len(start_list), len(path_list))):
126
- if start_list[i].lower() != path_list[i].lower():
127
- break
128
- else:
129
- i += 1
130
- rel_list = [os.pardir] * (len(start_list)-i) + path_list[i:]
131
- if not rel_list:
132
- return os.path.curdir
133
- return os.path.join(*rel_list)
134
-
135
- if not "relpath" in os.path.__all__:
136
- os.path.relpath = relpath
137
-
138
95
  # This is how we re-invoke SCons from inside MSVS Project files.
139
96
  # The problem is that we might have been invoked as either scons.bat
140
97
  # or scons.py. If we were invoked directly as scons.py, then we could
@@ -559,12 +516,11 @@ class _GenerateV6DSP(_DSPGenerator):
559
516
  self.file.close()
560
517
 
561
518
  V7DSPHeader = """\
562
- <?xml version="1.0" encoding="%(encoding)s"?>
519
+ <?xml version="1.0" encoding = "%(encoding)s"?>
563
520
  <VisualStudioProject
564
521
  \tProjectType="Visual C++"
565
522
  \tVersion="%(versionstr)s"
566
523
  \tName="%(name)s"
567
- \tProjectGUID="%(project_guid)s"
568
524
  %(scc_attrs)s
569
525
  \tKeyword="MakeFileProj">
570
526
  """
@@ -580,8 +536,8 @@ V7DSPConfiguration = """\
580
536
  \t\t\t<Tool
581
537
  \t\t\t\tName="VCNMakeTool"
582
538
  \t\t\t\tBuildCommandLine="%(buildcmd)s"
583
- \t\t\t\tReBuildCommandLine="%(rebuildcmd)s"
584
539
  \t\t\t\tCleanCommandLine="%(cleancmd)s"
540
+ \t\t\t\tRebuildCommandLine="%(rebuildcmd)s"
585
541
  \t\t\t\tOutput="%(runfile)s"/>
586
542
  \t\t</Configuration>
587
543
  """
@@ -592,9 +548,8 @@ V8DSPHeader = """\
592
548
  \tProjectType="Visual C++"
593
549
  \tVersion="%(versionstr)s"
594
550
  \tName="%(name)s"
595
- \tProjectGUID="%(project_guid)s"
596
- \tRootNamespace="%(name)s"
597
551
  %(scc_attrs)s
552
+ \tRootNamespace="%(name)s"
598
553
  \tKeyword="MakeFileProj">
599
554
  """
600
555
 
@@ -627,11 +582,7 @@ class _GenerateV7DSP(_DSPGenerator):
627
582
  _DSPGenerator.__init__(self, dspfile, source, env)
628
583
  self.version = env['MSVS_VERSION']
629
584
  self.version_num, self.suite = msvs_parse_version(self.version)
630
- if self.version_num >= 9.0:
631
- self.versionstr = '9.00'
632
- self.dspheader = V8DSPHeader
633
- self.dspconfiguration = V8DSPConfiguration
634
- elif self.version_num >= 8.0:
585
+ if self.version_num >= 8.0:
635
586
  self.versionstr = '8.00'
636
587
  self.dspheader = V8DSPHeader
637
588
  self.dspconfiguration = V8DSPConfiguration
@@ -652,27 +603,20 @@ class _GenerateV7DSP(_DSPGenerator):
652
603
  scc_provider = env.get('MSVS_SCC_PROVIDER', '')
653
604
  scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '')
654
605
  scc_aux_path = env.get('MSVS_SCC_AUX_PATH', '')
655
- # MSVS_SCC_LOCAL_PATH is kept for backwards compatibility purpose and should
656
- # be deprecated as soon as possible.
657
- scc_local_path_legacy = env.get('MSVS_SCC_LOCAL_PATH', '')
658
- scc_connection_root = env.get('MSVS_SCC_CONNECTION_ROOT', os.curdir)
659
- scc_local_path = os.path.relpath(scc_connection_root, os.path.dirname(self.dspabs))
606
+ scc_local_path = env.get('MSVS_SCC_LOCAL_PATH', '')
660
607
  project_guid = env.get('MSVS_PROJECT_GUID', '')
661
- if not project_guid:
608
+ if self.version_num >= 8.0 and not project_guid:
662
609
  project_guid = _generateGUID(self.dspfile, '')
663
610
  if scc_provider != '':
664
- scc_attrs = '\tSccProjectName="%s"\n' % scc_project_name
665
- if scc_aux_path != '':
666
- scc_attrs += '\tSccAuxPath="%s"\n' % scc_aux_path
667
- scc_attrs += ('\tSccLocalPath="%s"\n'
668
- '\tSccProvider="%s"' % (scc_local_path, scc_provider))
669
- elif scc_local_path_legacy != '':
670
- # This case is kept for backwards compatibility purpose and should
671
- # be deprecated as soon as possible.
672
- scc_attrs = ('\tSccProjectName="%s"\n'
673
- '\tSccLocalPath="%s"' % (scc_project_name, scc_local_path_legacy))
611
+ scc_attrs = ('\tProjectGUID="%s"\n'
612
+ '\tSccProjectName="%s"\n'
613
+ '\tSccAuxPath="%s"\n'
614
+ '\tSccLocalPath="%s"\n'
615
+ '\tSccProvider="%s"' % (project_guid, scc_project_name, scc_aux_path, scc_local_path, scc_provider))
674
616
  else:
675
- self.dspheader = self.dspheader.replace('%(scc_attrs)s\n', '')
617
+ scc_attrs = ('\tProjectGUID="%s"\n'
618
+ '\tSccProjectName="%s"\n'
619
+ '\tSccLocalPath="%s"' % (project_guid, scc_project_name, scc_local_path))
676
620
 
677
621
  self.file.write(self.dspheader % locals())
678
622
 
@@ -712,13 +656,9 @@ class _GenerateV7DSP(_DSPGenerator):
712
656
  rebuildcmd = xmlify(starting + self.env.subst('$MSVSREBUILDCOM', 1) + cmdargs)
713
657
  cleancmd = xmlify(starting + self.env.subst('$MSVSCLEANCOM', 1) + cmdargs)
714
658
 
715
- # This isn't perfect; CPPDEFINES and CPPPATH can contain $TARGET and $SOURCE,
716
- # so they could vary depending on the command being generated. This code
717
- # assumes they don't.
718
659
  preprocdefs = xmlify(';'.join(processDefines(self.env.get('CPPDEFINES', []))))
719
- includepath_Dirs = processIncludes(self.env.get('CPPPATH', []), self.env, None, None)
720
- includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
721
-
660
+ includepath = xmlify(';'.join(self.env.get('CPPPATH', [])))
661
+
722
662
  if not env_has_buildtarget:
723
663
  del self.env['MSVSBUILDTARGET']
724
664
 
@@ -871,322 +811,11 @@ class _GenerateV7DSP(_DSPGenerator):
871
811
  self.PrintHeader()
872
812
  self.PrintProject()
873
813
  self.file.close()
874
-
875
- V10DSPHeader = """\
876
- <?xml version="1.0" encoding="%(encoding)s"?>
877
- <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
878
- """
879
-
880
- V10DSPProjectConfiguration = """\
881
- \t\t<ProjectConfiguration Include="%(variant)s|%(platform)s">
882
- \t\t\t<Configuration>%(variant)s</Configuration>
883
- \t\t\t<Platform>%(platform)s</Platform>
884
- \t\t</ProjectConfiguration>
885
- """
886
-
887
- V10DSPGlobals = """\
888
- \t<PropertyGroup Label="Globals">
889
- \t\t<ProjectGuid>%(project_guid)s</ProjectGuid>
890
- %(scc_attrs)s\t\t<RootNamespace>%(name)s</RootNamespace>
891
- \t\t<Keyword>MakeFileProj</Keyword>
892
- \t</PropertyGroup>
893
- """
894
-
895
- V10DSPPropertyGroupCondition = """\
896
- \t<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="Configuration">
897
- \t\t<ConfigurationType>Makefile</ConfigurationType>
898
- \t\t<UseOfMfc>false</UseOfMfc>
899
- \t</PropertyGroup>
900
- """
901
-
902
- V10DSPImportGroupCondition = """\
903
- \t<ImportGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="PropertySheets">
904
- \t\t<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
905
- \t</ImportGroup>
906
- """
907
-
908
- V10DSPCommandLine = """\
909
- \t\t<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(buildcmd)s</NMakeBuildCommandLine>
910
- \t\t<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(rebuildcmd)s</NMakeReBuildCommandLine>
911
- \t\t<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(cleancmd)s</NMakeCleanCommandLine>
912
- \t\t<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(runfile)s</NMakeOutput>
913
- \t\t<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(preprocdefs)s</NMakePreprocessorDefinitions>
914
- \t\t<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">%(includepath)s</NMakeIncludeSearchPath>
915
- \t\t<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
916
- \t\t<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
917
- \t\t<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
918
- """
919
-
920
- class _GenerateV10DSP(_DSPGenerator):
921
- """Generates a Project file for MSVS 2010"""
922
-
923
- def __init__(self, dspfile, source, env):
924
- _DSPGenerator.__init__(self, dspfile, source, env)
925
-
926
- self.dspheader = V10DSPHeader
927
- self.dspconfiguration = V10DSPProjectConfiguration
928
- self.dspglobals = V10DSPGlobals
929
-
930
- def PrintHeader(self):
931
- env = self.env
932
- name = self.name
933
- encoding = env.subst('$MSVSENCODING')
934
- project_guid = env.get('MSVS_PROJECT_GUID', '')
935
- scc_provider = env.get('MSVS_SCC_PROVIDER', '')
936
- scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '')
937
- scc_aux_path = env.get('MSVS_SCC_AUX_PATH', '')
938
- # MSVS_SCC_LOCAL_PATH is kept for backwards compatibility purpose and should
939
- # be deprecated as soon as possible.
940
- scc_local_path_legacy = env.get('MSVS_SCC_LOCAL_PATH', '')
941
- scc_connection_root = env.get('MSVS_SCC_CONNECTION_ROOT', os.curdir)
942
- scc_local_path = os.path.relpath(scc_connection_root, os.path.dirname(self.dspabs))
943
- if not project_guid:
944
- project_guid = _generateGUID(self.dspfile, '')
945
- if scc_provider != '':
946
- scc_attrs = '\t\t<SccProjectName>%s</SccProjectName>\n' % scc_project_name
947
- if scc_aux_path != '':
948
- scc_attrs += '\t\t<SccAuxPath>%s</SccAuxPath>\n' % scc_aux_path
949
- scc_attrs += ('\t\t<SccLocalPath>%s</SccLocalPath>\n'
950
- '\t\t<SccProvider>%s</SccProvider>\n' % (scc_local_path, scc_provider))
951
- elif scc_local_path_legacy != '':
952
- # This case is kept for backwards compatibility purpose and should
953
- # be deprecated as soon as possible.
954
- scc_attrs = ('\t\t<SccProjectName>%s</SccProjectName>\n'
955
- '\t\t<SccLocalPath>%s</SccLocalPath>\n' % (scc_project_name, scc_local_path_legacy))
956
- else:
957
- self.dspglobals = self.dspglobals.replace('%(scc_attrs)s', '')
958
-
959
- self.file.write(self.dspheader % locals())
960
-
961
- self.file.write('\t<ItemGroup Label="ProjectConfigurations">\n')
962
-
963
- confkeys = sorted(self.configs.keys())
964
- for kind in confkeys:
965
- variant = self.configs[kind].variant
966
- platform = self.configs[kind].platform
967
- self.file.write(self.dspconfiguration % locals())
968
-
969
- self.file.write('\t</ItemGroup>\n')
970
-
971
- self.file.write(self.dspglobals % locals())
972
-
973
- def PrintProject(self):
974
- name = self.name
975
- confkeys = sorted(self.configs.keys())
976
-
977
- self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\n')
978
-
979
- for kind in confkeys:
980
- variant = self.configs[kind].variant
981
- platform = self.configs[kind].platform
982
- self.file.write(V10DSPPropertyGroupCondition % locals())
983
-
984
- self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\n')
985
- self.file.write('\t<ImportGroup Label="ExtensionSettings">\n')
986
- self.file.write('\t</ImportGroup>\n')
987
-
988
- for kind in confkeys:
989
- variant = self.configs[kind].variant
990
- platform = self.configs[kind].platform
991
- self.file.write(V10DSPImportGroupCondition % locals())
992
-
993
- self.file.write('\t<PropertyGroup Label="UserMacros" />\n')
994
- self.file.write('\t<PropertyGroup>\n')
995
- self.file.write('\t<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\n')
996
-
997
- for kind in confkeys:
998
- variant = self.configs[kind].variant
999
- platform = self.configs[kind].platform
1000
- outdir = self.configs[kind].outdir
1001
- buildtarget = self.configs[kind].buildtarget
1002
- runfile = self.configs[kind].runfile
1003
- cmdargs = self.configs[kind].cmdargs
1004
-
1005
- env_has_buildtarget = 'MSVSBUILDTARGET' in self.env
1006
- if not env_has_buildtarget:
1007
- self.env['MSVSBUILDTARGET'] = buildtarget
1008
-
1009
- starting = 'echo Starting SCons && '
1010
- if cmdargs:
1011
- cmdargs = ' ' + cmdargs
1012
- else:
1013
- cmdargs = ''
1014
- buildcmd = xmlify(starting + self.env.subst('$MSVSBUILDCOM', 1) + cmdargs)
1015
- rebuildcmd = xmlify(starting + self.env.subst('$MSVSREBUILDCOM', 1) + cmdargs)
1016
- cleancmd = xmlify(starting + self.env.subst('$MSVSCLEANCOM', 1) + cmdargs)
1017
-
1018
- # This isn't perfect; CPPDEFINES and CPPPATH can contain $TARGET and $SOURCE,
1019
- # so they could vary depending on the command being generated. This code
1020
- # assumes they don't.
1021
- preprocdefs = xmlify(';'.join(processDefines(self.env.get('CPPDEFINES', []))))
1022
- includepath_Dirs = processIncludes(self.env.get('CPPPATH', []), self.env, None, None)
1023
- includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
1024
-
1025
- if not env_has_buildtarget:
1026
- del self.env['MSVSBUILDTARGET']
1027
-
1028
- self.file.write(V10DSPCommandLine % locals())
1029
-
1030
- self.file.write('\t</PropertyGroup>\n')
1031
-
1032
- #filter settings in MSVS 2010 are stored in separate file
1033
- self.filtersabs = self.dspabs + '.filters'
1034
- try:
1035
- self.filters_file = open(self.filtersabs, 'w')
1036
- except IOError, detail:
1037
- raise SCons.Errors.InternalError('Unable to open "' + self.filtersabs + '" for writing:' + str(detail))
1038
-
1039
- self.filters_file.write('<?xml version="1.0" encoding="utf-8"?>\n'
1040
- '<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n')
1041
-
1042
- self.PrintSourceFiles()
1043
-
1044
- self.filters_file.write('</Project>')
1045
- self.filters_file.close()
1046
-
1047
- self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\n'
1048
- '\t<ImportGroup Label="ExtensionTargets">\n'
1049
- '\t</ImportGroup>\n'
1050
- '</Project>\n')
1051
-
1052
- if self.nokeep == 0:
1053
- # now we pickle some data and add it to the file -- MSDEV will ignore it.
1054
- pdata = pickle.dumps(self.configs,1)
1055
- pdata = base64.encodestring(pdata)
1056
- self.file.write('<!-- SCons Data:\n' + pdata + '\n')
1057
- pdata = pickle.dumps(self.sources,1)
1058
- pdata = base64.encodestring(pdata)
1059
- self.file.write(pdata + '-->\n')
1060
-
1061
- def printFilters(self, hierarchy, name):
1062
- sorteditems = sorted(hierarchy.items(), key = lambda a: a[0].lower())
1063
-
1064
- for key, value in sorteditems:
1065
- if SCons.Util.is_Dict(value):
1066
- filter_name = name + '\\' + key
1067
- self.filters_file.write('\t\t<Filter Include="%s">\n'
1068
- '\t\t\t<UniqueIdentifier>%s</UniqueIdentifier>\n'
1069
- '\t\t</Filter>\n' % (filter_name, _generateGUID(self.dspabs, filter_name)))
1070
- self.printFilters(value, filter_name)
1071
-
1072
- def printSources(self, hierarchy, kind, commonprefix, filter_name):
1073
- keywords = {'Source Files': 'ClCompile',
1074
- 'Header Files': 'ClInclude',
1075
- 'Local Headers': 'ClInclude',
1076
- 'Resource Files': 'None',
1077
- 'Other Files': 'None'}
1078
-
1079
- sorteditems = sorted(hierarchy.items(), key = lambda a: a[0].lower())
1080
-
1081
- # First folders, then files
1082
- for key, value in sorteditems:
1083
- if SCons.Util.is_Dict(value):
1084
- self.printSources(value, kind, commonprefix, filter_name + '\\' + key)
1085
-
1086
- for key, value in sorteditems:
1087
- if SCons.Util.is_String(value):
1088
- file = value
1089
- if commonprefix:
1090
- file = os.path.join(commonprefix, value)
1091
- file = os.path.normpath(file)
1092
-
1093
- self.file.write('\t\t<%s Include="%s" />\n' % (keywords[kind], file))
1094
- self.filters_file.write('\t\t<%s Include="%s">\n'
1095
- '\t\t\t<Filter>%s</Filter>\n'
1096
- '\t\t</%s>\n' % (keywords[kind], file, filter_name, keywords[kind]))
1097
-
1098
- def PrintSourceFiles(self):
1099
- categories = {'Source Files': 'cpp;c;cxx;l;y;def;odl;idl;hpj;bat',
1100
- 'Header Files': 'h;hpp;hxx;hm;inl',
1101
- 'Local Headers': 'h;hpp;hxx;hm;inl',
1102
- 'Resource Files': 'r;rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe',
1103
- 'Other Files': ''}
1104
-
1105
- cats = sorted([k for k in categories.keys() if self.sources[k]],
1106
- key = lambda a: a.lower())
1107
-
1108
- # print vcxproj.filters file first
1109
- self.filters_file.write('\t<ItemGroup>\n')
1110
- for kind in cats:
1111
- self.filters_file.write('\t\t<Filter Include="%s">\n'
1112
- '\t\t\t<UniqueIdentifier>{7b42d31d-d53c-4868-8b92-ca2bc9fc052f}</UniqueIdentifier>\n'
1113
- '\t\t\t<Extensions>%s</Extensions>\n'
1114
- '\t\t</Filter>\n' % (kind, categories[kind]))
1115
-
1116
- # First remove any common prefix
1117
- sources = self.sources[kind]
1118
- commonprefix = None
1119
- if len(sources) > 1:
1120
- s = list(map(os.path.normpath, sources))
1121
- # take the dirname because the prefix may include parts
1122
- # of the filenames (e.g. if you have 'dir\abcd' and
1123
- # 'dir\acde' then the cp will be 'dir\a' )
1124
- cp = os.path.dirname( os.path.commonprefix(s) )
1125
- if cp and s[0][len(cp)] == os.sep:
1126
- # +1 because the filename starts after the separator
1127
- sources = [s[len(cp)+1:] for s in sources]
1128
- commonprefix = cp
1129
- elif len(sources) == 1:
1130
- commonprefix = os.path.dirname( sources[0] )
1131
- sources[0] = os.path.basename( sources[0] )
1132
-
1133
- hierarchy = makeHierarchy(sources)
1134
- self.printFilters(hierarchy, kind)
1135
-
1136
- self.filters_file.write('\t</ItemGroup>\n')
1137
-
1138
- # then print files and filters
1139
- for kind in cats:
1140
- self.file.write('\t<ItemGroup>\n')
1141
- self.filters_file.write('\t<ItemGroup>\n')
1142
-
1143
- # First remove any common prefix
1144
- sources = self.sources[kind]
1145
- commonprefix = None
1146
- if len(sources) > 1:
1147
- s = list(map(os.path.normpath, sources))
1148
- # take the dirname because the prefix may include parts
1149
- # of the filenames (e.g. if you have 'dir\abcd' and
1150
- # 'dir\acde' then the cp will be 'dir\a' )
1151
- cp = os.path.dirname( os.path.commonprefix(s) )
1152
- if cp and s[0][len(cp)] == os.sep:
1153
- # +1 because the filename starts after the separator
1154
- sources = [s[len(cp)+1:] for s in sources]
1155
- commonprefix = cp
1156
- elif len(sources) == 1:
1157
- commonprefix = os.path.dirname( sources[0] )
1158
- sources[0] = os.path.basename( sources[0] )
1159
-
1160
- hierarchy = makeHierarchy(sources)
1161
- self.printSources(hierarchy, kind, commonprefix, kind)
1162
-
1163
- self.file.write('\t</ItemGroup>\n')
1164
- self.filters_file.write('\t</ItemGroup>\n')
1165
-
1166
- # add the SConscript file outside of the groups
1167
- self.file.write('\t<ItemGroup>\n'
1168
- '\t\t<None Include="%s" />\n'
1169
- #'\t\t<None Include="SConstruct" />\n'
1170
- '\t</ItemGroup>\n' % str(self.sconscript))
1171
-
1172
- def Parse(self):
1173
- print "_GenerateV10DSP.Parse()"
1174
-
1175
- def Build(self):
1176
- try:
1177
- self.file = open(self.dspabs, 'w')
1178
- except IOError, detail:
1179
- raise SCons.Errors.InternalError('Unable to open "' + self.dspabs + '" for writing:' + str(detail))
1180
- else:
1181
- self.PrintHeader()
1182
- self.PrintProject()
1183
- self.file.close()
1184
814
 
1185
815
  class _DSWGenerator(object):
1186
816
  """ Base class for DSW generators """
1187
817
  def __init__(self, dswfile, source, env):
1188
818
  self.dswfile = os.path.normpath(str(dswfile))
1189
- self.dsw_folder_path = os.path.dirname(os.path.abspath(self.dswfile))
1190
819
  self.env = env
1191
820
 
1192
821
  if 'projects' not in env:
@@ -1217,14 +846,12 @@ class _GenerateV7DSW(_DSWGenerator):
1217
846
  self.version = self.env['MSVS_VERSION']
1218
847
  self.version_num, self.suite = msvs_parse_version(self.version)
1219
848
  self.versionstr = '7.00'
1220
- if self.version_num >= 10.0:
1221
- self.versionstr = '11.00'
1222
- elif self.version_num >= 9.0:
1223
- self.versionstr = '10.00'
1224
- elif self.version_num >= 8.0:
849
+ if self.version_num >= 8.0:
1225
850
  self.versionstr = '9.00'
1226
851
  elif self.version_num >= 7.1:
1227
852
  self.versionstr = '8.00'
853
+ if self.version_num >= 8.0:
854
+ self.versionstr = '9.00'
1228
855
 
1229
856
  if 'slnguid' in env and env['slnguid']:
1230
857
  self.slnguid = env['slnguid']
@@ -1269,26 +896,6 @@ class _GenerateV7DSW(_DSWGenerator):
1269
896
  if not platform in self.platforms:
1270
897
  self.platforms.append(platform)
1271
898
 
1272
- def GenerateProjectFilesInfo(self):
1273
- for dspfile in self.dspfiles:
1274
- dsp_folder_path, name = os.path.split(dspfile)
1275
- dsp_folder_path = os.path.abspath(dsp_folder_path)
1276
- dsp_relative_folder_path = os.path.relpath(dsp_folder_path, self.dsw_folder_path)
1277
- if dsp_relative_folder_path == os.curdir:
1278
- dsp_relative_file_path = name
1279
- else:
1280
- dsp_relative_file_path = os.path.join(dsp_relative_folder_path, name)
1281
- dspfile_info = {'NAME': name,
1282
- 'GUID': _generateGUID(dspfile, ''),
1283
- 'FOLDER_PATH': dsp_folder_path,
1284
- 'FILE_PATH': dspfile,
1285
- 'SLN_RELATIVE_FOLDER_PATH': dsp_relative_folder_path,
1286
- 'SLN_RELATIVE_FILE_PATH': dsp_relative_file_path}
1287
- self.dspfiles_info.append(dspfile_info)
1288
-
1289
- self.dspfiles_info = []
1290
- GenerateProjectFilesInfo(self)
1291
-
1292
899
  def Parse(self):
1293
900
  try:
1294
901
  dswfile = open(self.dswfile,'r')
@@ -1321,19 +928,16 @@ class _GenerateV7DSW(_DSWGenerator):
1321
928
  def PrintSolution(self):
1322
929
  """Writes a solution file"""
1323
930
  self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr )
1324
- if self.version_num >= 10.0:
1325
- self.file.write('# Visual Studio 2010\n')
1326
- elif self.version_num >= 9.0:
1327
- self.file.write('# Visual Studio 2008\n')
1328
- elif self.version_num >= 8.0:
931
+ if self.version_num >= 8.0:
1329
932
  self.file.write('# Visual Studio 2005\n')
1330
- for dspinfo in self.dspfiles_info:
1331
- name = dspinfo['NAME']
933
+ for p in self.dspfiles:
934
+ name = os.path.basename(p)
1332
935
  base, suffix = SCons.Util.splitext(name)
1333
936
  if suffix == '.vcproj':
1334
937
  name = base
938
+ guid = _generateGUID(p, '')
1335
939
  self.file.write('Project("%s") = "%s", "%s", "%s"\n'
1336
- % (external_makefile_guid, name, dspinfo['SLN_RELATIVE_FILE_PATH'], dspinfo['GUID']))
940
+ % ( external_makefile_guid, name, p, guid ) )
1337
941
  if self.version_num >= 7.1 and self.version_num < 8.0:
1338
942
  self.file.write('\tProjectSection(ProjectDependencies) = postProject\n'
1339
943
  '\tEndProjectSection\n')
@@ -1343,36 +947,30 @@ class _GenerateV7DSW(_DSWGenerator):
1343
947
 
1344
948
  env = self.env
1345
949
  if 'MSVS_SCC_PROVIDER' in env:
1346
- scc_number_of_projects = len(self.dspfiles) + 1
950
+ dspfile_base = os.path.basename(self.dspfile)
1347
951
  slnguid = self.slnguid
1348
- scc_provider = env.get('MSVS_SCC_PROVIDER', '').replace(' ', r'\u0020')
1349
- scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '').replace(' ', r'\u0020')
1350
- scc_connection_root = env.get('MSVS_SCC_CONNECTION_ROOT', os.curdir)
1351
- scc_local_path = os.path.relpath(scc_connection_root, self.dsw_folder_path).replace('\\', '\\\\')
952
+ scc_provider = env.get('MSVS_SCC_PROVIDER', '')
953
+ scc_provider = scc_provider.replace(' ', r'\u0020')
954
+ scc_project_name = env.get('MSVS_SCC_PROJECT_NAME', '')
955
+ # scc_aux_path = env.get('MSVS_SCC_AUX_PATH', '')
956
+ scc_local_path = env.get('MSVS_SCC_LOCAL_PATH', '')
957
+ scc_project_base_path = env.get('MSVS_SCC_PROJECT_BASE_PATH', '')
958
+ # project_guid = env.get('MSVS_PROJECT_GUID', '')
959
+
1352
960
  self.file.write('\tGlobalSection(SourceCodeControl) = preSolution\n'
1353
- '\t\tSccNumberOfProjects = %(scc_number_of_projects)d\n'
1354
- '\t\tSccProjectName0 = %(scc_project_name)s\n'
961
+ '\t\tSccNumberOfProjects = 2\n'
962
+ '\t\tSccProjectUniqueName0 = %(dspfile_base)s\n'
1355
963
  '\t\tSccLocalPath0 = %(scc_local_path)s\n'
1356
- '\t\tSccProvider0 = %(scc_provider)s\n'
1357
- '\t\tCanCheckoutShared = true\n' % locals())
1358
- sln_relative_path_from_scc = os.path.relpath(self.dsw_folder_path, scc_connection_root)
1359
- if sln_relative_path_from_scc != os.curdir:
1360
- self.file.write('\t\tSccProjectFilePathRelativizedFromConnection0 = %s\\\\\n'
1361
- % sln_relative_path_from_scc.replace('\\', '\\\\'))
1362
- if self.version_num < 8.0:
1363
- # When present, SolutionUniqueID is automatically removed by VS 2005
1364
- # TODO: check for Visual Studio versions newer than 2005
1365
- self.file.write('\t\tSolutionUniqueID = %s\n' % slnguid)
1366
- for dspinfo in self.dspfiles_info:
1367
- i = self.dspfiles_info.index(dspinfo) + 1
1368
- dsp_relative_file_path = dspinfo['SLN_RELATIVE_FILE_PATH'].replace('\\', '\\\\')
1369
- dsp_scc_relative_folder_path = os.path.relpath(dspinfo['FOLDER_PATH'], scc_connection_root).replace('\\', '\\\\')
1370
- self.file.write('\t\tSccProjectUniqueName%(i)s = %(dsp_relative_file_path)s\n'
1371
- '\t\tSccLocalPath%(i)d = %(scc_local_path)s\n'
1372
- '\t\tCanCheckoutShared = true\n'
1373
- '\t\tSccProjectFilePathRelativizedFromConnection%(i)s = %(dsp_scc_relative_folder_path)s\\\\\n'
1374
- % locals())
1375
- self.file.write('\tEndGlobalSection\n')
964
+ '\t\tCanCheckoutShared = true\n'
965
+ '\t\tSccProjectFilePathRelativizedFromConnection0 = %(scc_project_base_path)s\n'
966
+ '\t\tSccProjectName1 = %(scc_project_name)s\n'
967
+ '\t\tSccLocalPath1 = %(scc_local_path)s\n'
968
+ '\t\tSccProvider1 = %(scc_provider)s\n'
969
+ '\t\tCanCheckoutShared = true\n'
970
+ '\t\tSccProjectFilePathRelativizedFromConnection1 = %(scc_project_base_path)s\n'
971
+ '\t\tSolutionUniqueID = %(slnguid)s\n'
972
+ '\tEndGlobalSection\n' % locals())
973
+
1376
974
  if self.version_num >= 8.0:
1377
975
  self.file.write('\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n')
1378
976
  else:
@@ -1389,7 +987,7 @@ class _GenerateV7DSW(_DSWGenerator):
1389
987
  self.file.write('\t\tConfigName.%d = %s\n' % (cnt, variant))
1390
988
  cnt = cnt + 1
1391
989
  self.file.write('\tEndGlobalSection\n')
1392
- if self.version_num <= 7.1:
990
+ if self.version_num < 7.1:
1393
991
  self.file.write('\tGlobalSection(ProjectDependencies) = postSolution\n'
1394
992
  '\tEndGlobalSection\n')
1395
993
  if self.version_num >= 8.0:
@@ -1401,13 +999,13 @@ class _GenerateV7DSW(_DSWGenerator):
1401
999
  variant = self.configs[name].variant
1402
1000
  platform = self.configs[name].platform
1403
1001
  if self.version_num >= 8.0:
1404
- for dspinfo in self.dspfiles_info:
1405
- guid = dspinfo['GUID']
1002
+ for p in self.dspfiles:
1003
+ guid = _generateGUID(p, '')
1406
1004
  self.file.write('\t\t%s.%s|%s.ActiveCfg = %s|%s\n'
1407
1005
  '\t\t%s.%s|%s.Build.0 = %s|%s\n' % (guid,variant,platform,variant,platform,guid,variant,platform,variant,platform))
1408
1006
  else:
1409
- for dspinfo in self.dspfiles_info:
1410
- guid = dspinfo['GUID']
1007
+ for p in self.dspfiles:
1008
+ guid = _generateGUID(p, '')
1411
1009
  self.file.write('\t\t%s.%s.ActiveCfg = %s|%s\n'
1412
1010
  '\t\t%s.%s.Build.0 = %s|%s\n' %(guid,variant,variant,platform,guid,variant,variant,platform))
1413
1011
 
@@ -1474,7 +1072,7 @@ class _GenerateV6DSW(_DSWGenerator):
1474
1072
  def PrintWorkspace(self):
1475
1073
  """ writes a DSW file """
1476
1074
  name = self.name
1477
- dspfile = os.path.relpath(self.dspfiles[0], self.dsw_folder_path)
1075
+ dspfile = self.dspfiles[0]
1478
1076
  self.file.write(V6DSWHeader % locals())
1479
1077
 
1480
1078
  def Build(self):
@@ -1493,10 +1091,7 @@ def GenerateDSP(dspfile, source, env):
1493
1091
  version_num = 6.0
1494
1092
  if 'MSVS_VERSION' in env:
1495
1093
  version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
1496
- if version_num >= 10.0:
1497
- g = _GenerateV10DSP(dspfile, source, env)
1498
- g.Build()
1499
- elif version_num >= 7.0:
1094
+ if version_num >= 7.0:
1500
1095
  g = _GenerateV7DSP(dspfile, source, env)
1501
1096
  g.Build()
1502
1097
  else:
@@ -1523,10 +1118,10 @@ def GenerateDSW(dswfile, source, env):
1523
1118
  ##############################################################################
1524
1119
 
1525
1120
  def GetMSVSProjectSuffix(target, source, env, for_signature):
1526
- return env['MSVS']['PROJECTSUFFIX']
1121
+ return env['MSVS']['PROJECTSUFFIX']
1527
1122
 
1528
1123
  def GetMSVSSolutionSuffix(target, source, env, for_signature):
1529
- return env['MSVS']['SOLUTIONSUFFIX']
1124
+ return env['MSVS']['SOLUTIONSUFFIX']
1530
1125
 
1531
1126
  def GenerateProject(target, source, env):
1532
1127
  # generate the dsp file, according to the version of MSVS.
@@ -1583,12 +1178,6 @@ def projectEmitter(target, source, env):
1583
1178
  source = source + env.subst('$MSVSSCONSCOM', 1)
1584
1179
  source = source + env.subst('$MSVSENCODING', 1)
1585
1180
 
1586
- # Project file depends on CPPDEFINES and CPPPATH
1587
- preprocdefs = xmlify(';'.join(processDefines(env.get('CPPDEFINES', []))))
1588
- includepath_Dirs = processIncludes(env.get('CPPPATH', []), env, None, None)
1589
- includepath = xmlify(';'.join([str(x) for x in includepath_Dirs]))
1590
- source = source + "; ppdefs:%s incpath:%s"%(preprocdefs, includepath)
1591
-
1592
1181
  if 'buildtarget' in env and env['buildtarget'] != None:
1593
1182
  if SCons.Util.is_String(env['buildtarget']):
1594
1183
  source = source + ' "%s"' % env['buildtarget']
@@ -1657,7 +1246,7 @@ def projectEmitter(target, source, env):
1657
1246
  sourcelist = source
1658
1247
 
1659
1248
  if env.get('auto_build_solution', 1):
1660
- env['projects'] = [env.File(t).srcnode() for t in targetlist]
1249
+ env['projects'] = targetlist
1661
1250
  t, s = solutionEmitter(target, target, env)
1662
1251
  targetlist = targetlist + t
1663
1252
 
@@ -1765,6 +1354,7 @@ def generate(env):
1765
1354
  env['MSVSBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
1766
1355
  env['MSVSREBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
1767
1356
  env['MSVSCLEANCOM'] = '$MSVSSCONSCOM -c "$MSVSBUILDTARGET"'
1357
+ env['MSVSENCODING'] = 'Windows-1252'
1768
1358
 
1769
1359
  # Set-up ms tools paths for default version
1770
1360
  msvc_setup_env_once(env)
@@ -1778,17 +1368,9 @@ def generate(env):
1778
1368
  if (version_num < 7.0):
1779
1369
  env['MSVS']['PROJECTSUFFIX'] = '.dsp'
1780
1370
  env['MSVS']['SOLUTIONSUFFIX'] = '.dsw'
1781
- elif (version_num < 10.0):
1782
- env['MSVS']['PROJECTSUFFIX'] = '.vcproj'
1783
- env['MSVS']['SOLUTIONSUFFIX'] = '.sln'
1784
1371
  else:
1785
- env['MSVS']['PROJECTSUFFIX'] = '.vcxproj'
1372
+ env['MSVS']['PROJECTSUFFIX'] = '.vcproj'
1786
1373
  env['MSVS']['SOLUTIONSUFFIX'] = '.sln'
1787
-
1788
- if (version_num >= 10.0):
1789
- env['MSVSENCODING'] = 'utf-8'
1790
- else:
1791
- env['MSVSENCODING'] = 'Windows-1252'
1792
1374
 
1793
1375
  env['GET_MSVSPROJECTSUFFIX'] = GetMSVSProjectSuffix
1794
1376
  env['GET_MSVSSOLUTIONSUFFIX'] = GetMSVSSolutionSuffix