therubyracer 0.9.0beta4 → 0.9.0beta5

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

Potentially problematic release.


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

Files changed (771) hide show
  1. data/.gitignore +1 -0
  2. data/Rakefile +0 -11
  3. data/ext/v8/extconf.rb +9 -9
  4. data/ext/v8/v8_external.cpp +40 -10
  5. data/lib/v8/cli.rb +2 -1
  6. data/lib/v8/version.rb +1 -1
  7. data/spec/redjs/.gitignore +1 -0
  8. data/therubyracer.gemspec +2 -3
  9. metadata +33 -779
  10. data/ext/v8/upstream/Makefile +0 -38
  11. data/ext/v8/upstream/detect_cpu.rb +0 -27
  12. data/ext/v8/upstream/fpic-on-linux-amd64.patch +0 -13
  13. data/ext/v8/upstream/scons/CHANGES.txt +0 -5183
  14. data/ext/v8/upstream/scons/LICENSE.txt +0 -20
  15. data/ext/v8/upstream/scons/MANIFEST +0 -202
  16. data/ext/v8/upstream/scons/PKG-INFO +0 -13
  17. data/ext/v8/upstream/scons/README.txt +0 -273
  18. data/ext/v8/upstream/scons/RELEASE.txt +0 -1040
  19. data/ext/v8/upstream/scons/engine/SCons/Action.py +0 -1256
  20. data/ext/v8/upstream/scons/engine/SCons/Builder.py +0 -868
  21. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +0 -217
  22. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +0 -794
  23. data/ext/v8/upstream/scons/engine/SCons/Debug.py +0 -237
  24. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +0 -485
  25. data/ext/v8/upstream/scons/engine/SCons/Environment.py +0 -2327
  26. data/ext/v8/upstream/scons/engine/SCons/Errors.py +0 -207
  27. data/ext/v8/upstream/scons/engine/SCons/Executor.py +0 -636
  28. data/ext/v8/upstream/scons/engine/SCons/Job.py +0 -435
  29. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +0 -292
  30. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +0 -153
  31. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +0 -3220
  32. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +0 -128
  33. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +0 -1341
  34. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +0 -50
  35. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +0 -50
  36. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +0 -50
  37. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +0 -50
  38. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +0 -76
  39. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +0 -74
  40. data/ext/v8/upstream/scons/engine/SCons/PathList.py +0 -232
  41. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +0 -236
  42. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +0 -70
  43. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +0 -55
  44. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +0 -46
  45. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +0 -46
  46. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +0 -44
  47. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +0 -58
  48. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +0 -264
  49. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +0 -50
  50. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +0 -386
  51. data/ext/v8/upstream/scons/engine/SCons/SConf.py +0 -1038
  52. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +0 -381
  53. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +0 -132
  54. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +0 -74
  55. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +0 -111
  56. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +0 -320
  57. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +0 -48
  58. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +0 -378
  59. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +0 -103
  60. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +0 -55
  61. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +0 -415
  62. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +0 -386
  63. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +0 -1360
  64. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +0 -944
  65. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +0 -642
  66. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +0 -414
  67. data/ext/v8/upstream/scons/engine/SCons/Sig.py +0 -63
  68. data/ext/v8/upstream/scons/engine/SCons/Subst.py +0 -911
  69. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +0 -1030
  70. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +0 -61
  71. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +0 -65
  72. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +0 -73
  73. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +0 -247
  74. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +0 -324
  75. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +0 -56
  76. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +0 -61
  77. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +0 -210
  78. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +0 -84
  79. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +0 -321
  80. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +0 -367
  81. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +0 -497
  82. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +0 -104
  83. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +0 -138
  84. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +0 -64
  85. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +0 -64
  86. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +0 -71
  87. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +0 -675
  88. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +0 -82
  89. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +0 -74
  90. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +0 -80
  91. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +0 -76
  92. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +0 -71
  93. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +0 -63
  94. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +0 -78
  95. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +0 -82
  96. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +0 -99
  97. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +0 -114
  98. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +0 -58
  99. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +0 -50
  100. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +0 -224
  101. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +0 -64
  102. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +0 -125
  103. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +0 -94
  104. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +0 -62
  105. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +0 -62
  106. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +0 -63
  107. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +0 -98
  108. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +0 -63
  109. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +0 -90
  110. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +0 -73
  111. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +0 -53
  112. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +0 -80
  113. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +0 -64
  114. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +0 -63
  115. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +0 -81
  116. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +0 -85
  117. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +0 -53
  118. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +0 -77
  119. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +0 -59
  120. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +0 -52
  121. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +0 -72
  122. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +0 -90
  123. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +0 -59
  124. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +0 -60
  125. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +0 -229
  126. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +0 -490
  127. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +0 -71
  128. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +0 -110
  129. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +0 -234
  130. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +0 -138
  131. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +0 -79
  132. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +0 -99
  133. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +0 -121
  134. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +0 -112
  135. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +0 -63
  136. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +0 -77
  137. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +0 -90
  138. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +0 -159
  139. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +0 -64
  140. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +0 -266
  141. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +0 -50
  142. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +0 -269
  143. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +0 -1439
  144. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +0 -208
  145. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +0 -107
  146. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +0 -72
  147. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +0 -314
  148. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +0 -185
  149. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +0 -526
  150. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +0 -367
  151. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +0 -43
  152. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +0 -43
  153. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +0 -43
  154. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +0 -44
  155. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +0 -44
  156. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +0 -44
  157. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +0 -78
  158. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +0 -83
  159. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +0 -108
  160. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +0 -336
  161. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +0 -121
  162. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +0 -70
  163. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +0 -132
  164. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +0 -68
  165. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +0 -58
  166. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +0 -53
  167. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +0 -63
  168. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +0 -67
  169. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +0 -142
  170. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +0 -58
  171. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +0 -63
  172. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +0 -64
  173. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +0 -64
  174. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +0 -77
  175. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +0 -186
  176. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +0 -73
  177. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +0 -805
  178. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +0 -175
  179. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +0 -53
  180. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +0 -100
  181. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +0 -131
  182. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +0 -100
  183. data/ext/v8/upstream/scons/engine/SCons/Util.py +0 -1645
  184. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +0 -91
  185. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +0 -107
  186. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +0 -139
  187. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +0 -109
  188. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +0 -147
  189. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +0 -317
  190. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +0 -228
  191. data/ext/v8/upstream/scons/engine/SCons/__init__.py +0 -49
  192. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +0 -302
  193. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +0 -98
  194. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +0 -91
  195. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +0 -124
  196. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +0 -1725
  197. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +0 -583
  198. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +0 -176
  199. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +0 -325
  200. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +0 -1296
  201. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +0 -382
  202. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +0 -187
  203. data/ext/v8/upstream/scons/engine/SCons/cpp.py +0 -598
  204. data/ext/v8/upstream/scons/engine/SCons/dblite.py +0 -248
  205. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +0 -77
  206. data/ext/v8/upstream/scons/os_spawnv_fix.diff +0 -83
  207. data/ext/v8/upstream/scons/scons-time.1 +0 -1017
  208. data/ext/v8/upstream/scons/scons.1 +0 -15179
  209. data/ext/v8/upstream/scons/sconsign.1 +0 -208
  210. data/ext/v8/upstream/scons/script/scons +0 -184
  211. data/ext/v8/upstream/scons/script/scons-time +0 -1529
  212. data/ext/v8/upstream/scons/script/scons.bat +0 -31
  213. data/ext/v8/upstream/scons/script/sconsign +0 -508
  214. data/ext/v8/upstream/scons/setup.cfg +0 -6
  215. data/ext/v8/upstream/scons/setup.py +0 -427
  216. data/ext/v8/upstream/v8/.gitignore +0 -33
  217. data/ext/v8/upstream/v8/AUTHORS +0 -42
  218. data/ext/v8/upstream/v8/ChangeLog +0 -2663
  219. data/ext/v8/upstream/v8/LICENSE +0 -52
  220. data/ext/v8/upstream/v8/LICENSE.strongtalk +0 -29
  221. data/ext/v8/upstream/v8/LICENSE.v8 +0 -26
  222. data/ext/v8/upstream/v8/LICENSE.valgrind +0 -45
  223. data/ext/v8/upstream/v8/SConstruct +0 -1473
  224. data/ext/v8/upstream/v8/build/README.txt +0 -25
  225. data/ext/v8/upstream/v8/build/all.gyp +0 -18
  226. data/ext/v8/upstream/v8/build/armu.gypi +0 -32
  227. data/ext/v8/upstream/v8/build/common.gypi +0 -82
  228. data/ext/v8/upstream/v8/build/gyp_v8 +0 -145
  229. data/ext/v8/upstream/v8/include/v8-debug.h +0 -394
  230. data/ext/v8/upstream/v8/include/v8-preparser.h +0 -116
  231. data/ext/v8/upstream/v8/include/v8-profiler.h +0 -505
  232. data/ext/v8/upstream/v8/include/v8-testing.h +0 -104
  233. data/ext/v8/upstream/v8/include/v8.h +0 -4000
  234. data/ext/v8/upstream/v8/include/v8stdint.h +0 -53
  235. data/ext/v8/upstream/v8/preparser/SConscript +0 -38
  236. data/ext/v8/upstream/v8/preparser/preparser-process.cc +0 -169
  237. data/ext/v8/upstream/v8/src/SConscript +0 -380
  238. data/ext/v8/upstream/v8/src/accessors.cc +0 -766
  239. data/ext/v8/upstream/v8/src/accessors.h +0 -121
  240. data/ext/v8/upstream/v8/src/allocation-inl.h +0 -49
  241. data/ext/v8/upstream/v8/src/allocation.cc +0 -122
  242. data/ext/v8/upstream/v8/src/allocation.h +0 -143
  243. data/ext/v8/upstream/v8/src/api.cc +0 -5678
  244. data/ext/v8/upstream/v8/src/api.h +0 -572
  245. data/ext/v8/upstream/v8/src/apinatives.js +0 -110
  246. data/ext/v8/upstream/v8/src/apiutils.h +0 -73
  247. data/ext/v8/upstream/v8/src/arguments.h +0 -116
  248. data/ext/v8/upstream/v8/src/arm/assembler-arm-inl.h +0 -353
  249. data/ext/v8/upstream/v8/src/arm/assembler-arm.cc +0 -2877
  250. data/ext/v8/upstream/v8/src/arm/assembler-arm.h +0 -1382
  251. data/ext/v8/upstream/v8/src/arm/builtins-arm.cc +0 -1634
  252. data/ext/v8/upstream/v8/src/arm/code-stubs-arm.cc +0 -6917
  253. data/ext/v8/upstream/v8/src/arm/code-stubs-arm.h +0 -623
  254. data/ext/v8/upstream/v8/src/arm/codegen-arm-inl.h +0 -48
  255. data/ext/v8/upstream/v8/src/arm/codegen-arm.cc +0 -7437
  256. data/ext/v8/upstream/v8/src/arm/codegen-arm.h +0 -595
  257. data/ext/v8/upstream/v8/src/arm/constants-arm.cc +0 -152
  258. data/ext/v8/upstream/v8/src/arm/constants-arm.h +0 -778
  259. data/ext/v8/upstream/v8/src/arm/cpu-arm.cc +0 -149
  260. data/ext/v8/upstream/v8/src/arm/debug-arm.cc +0 -317
  261. data/ext/v8/upstream/v8/src/arm/deoptimizer-arm.cc +0 -737
  262. data/ext/v8/upstream/v8/src/arm/disasm-arm.cc +0 -1503
  263. data/ext/v8/upstream/v8/src/arm/frames-arm.cc +0 -45
  264. data/ext/v8/upstream/v8/src/arm/frames-arm.h +0 -168
  265. data/ext/v8/upstream/v8/src/arm/full-codegen-arm.cc +0 -4374
  266. data/ext/v8/upstream/v8/src/arm/ic-arm.cc +0 -1793
  267. data/ext/v8/upstream/v8/src/arm/jump-target-arm.cc +0 -174
  268. data/ext/v8/upstream/v8/src/arm/lithium-arm.cc +0 -2120
  269. data/ext/v8/upstream/v8/src/arm/lithium-arm.h +0 -2179
  270. data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.cc +0 -4132
  271. data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.h +0 -329
  272. data/ext/v8/upstream/v8/src/arm/lithium-gap-resolver-arm.cc +0 -305
  273. data/ext/v8/upstream/v8/src/arm/lithium-gap-resolver-arm.h +0 -84
  274. data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.cc +0 -2939
  275. data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.h +0 -1071
  276. data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.cc +0 -1287
  277. data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.h +0 -253
  278. data/ext/v8/upstream/v8/src/arm/register-allocator-arm-inl.h +0 -100
  279. data/ext/v8/upstream/v8/src/arm/register-allocator-arm.cc +0 -63
  280. data/ext/v8/upstream/v8/src/arm/register-allocator-arm.h +0 -44
  281. data/ext/v8/upstream/v8/src/arm/simulator-arm.cc +0 -3288
  282. data/ext/v8/upstream/v8/src/arm/simulator-arm.h +0 -413
  283. data/ext/v8/upstream/v8/src/arm/stub-cache-arm.cc +0 -4034
  284. data/ext/v8/upstream/v8/src/arm/virtual-frame-arm-inl.h +0 -59
  285. data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.cc +0 -843
  286. data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.h +0 -523
  287. data/ext/v8/upstream/v8/src/array.js +0 -1249
  288. data/ext/v8/upstream/v8/src/assembler.cc +0 -1067
  289. data/ext/v8/upstream/v8/src/assembler.h +0 -823
  290. data/ext/v8/upstream/v8/src/ast-inl.h +0 -112
  291. data/ext/v8/upstream/v8/src/ast.cc +0 -1078
  292. data/ext/v8/upstream/v8/src/ast.h +0 -2234
  293. data/ext/v8/upstream/v8/src/atomicops.h +0 -167
  294. data/ext/v8/upstream/v8/src/atomicops_internals_arm_gcc.h +0 -145
  295. data/ext/v8/upstream/v8/src/atomicops_internals_mips_gcc.h +0 -169
  296. data/ext/v8/upstream/v8/src/atomicops_internals_x86_gcc.cc +0 -126
  297. data/ext/v8/upstream/v8/src/atomicops_internals_x86_gcc.h +0 -287
  298. data/ext/v8/upstream/v8/src/atomicops_internals_x86_macosx.h +0 -301
  299. data/ext/v8/upstream/v8/src/atomicops_internals_x86_msvc.h +0 -203
  300. data/ext/v8/upstream/v8/src/bignum-dtoa.cc +0 -655
  301. data/ext/v8/upstream/v8/src/bignum-dtoa.h +0 -81
  302. data/ext/v8/upstream/v8/src/bignum.cc +0 -768
  303. data/ext/v8/upstream/v8/src/bignum.h +0 -140
  304. data/ext/v8/upstream/v8/src/bootstrapper.cc +0 -2138
  305. data/ext/v8/upstream/v8/src/bootstrapper.h +0 -185
  306. data/ext/v8/upstream/v8/src/builtins.cc +0 -1708
  307. data/ext/v8/upstream/v8/src/builtins.h +0 -368
  308. data/ext/v8/upstream/v8/src/bytecodes-irregexp.h +0 -105
  309. data/ext/v8/upstream/v8/src/cached-powers.cc +0 -177
  310. data/ext/v8/upstream/v8/src/cached-powers.h +0 -65
  311. data/ext/v8/upstream/v8/src/char-predicates-inl.h +0 -94
  312. data/ext/v8/upstream/v8/src/char-predicates.h +0 -65
  313. data/ext/v8/upstream/v8/src/checks.cc +0 -110
  314. data/ext/v8/upstream/v8/src/checks.h +0 -296
  315. data/ext/v8/upstream/v8/src/circular-queue-inl.h +0 -53
  316. data/ext/v8/upstream/v8/src/circular-queue.cc +0 -122
  317. data/ext/v8/upstream/v8/src/circular-queue.h +0 -103
  318. data/ext/v8/upstream/v8/src/code-stubs.cc +0 -240
  319. data/ext/v8/upstream/v8/src/code-stubs.h +0 -971
  320. data/ext/v8/upstream/v8/src/code.h +0 -68
  321. data/ext/v8/upstream/v8/src/codegen-inl.h +0 -68
  322. data/ext/v8/upstream/v8/src/codegen.cc +0 -505
  323. data/ext/v8/upstream/v8/src/codegen.h +0 -245
  324. data/ext/v8/upstream/v8/src/compilation-cache.cc +0 -540
  325. data/ext/v8/upstream/v8/src/compilation-cache.h +0 -287
  326. data/ext/v8/upstream/v8/src/compiler.cc +0 -792
  327. data/ext/v8/upstream/v8/src/compiler.h +0 -307
  328. data/ext/v8/upstream/v8/src/contexts.cc +0 -327
  329. data/ext/v8/upstream/v8/src/contexts.h +0 -382
  330. data/ext/v8/upstream/v8/src/conversions-inl.h +0 -110
  331. data/ext/v8/upstream/v8/src/conversions.cc +0 -1125
  332. data/ext/v8/upstream/v8/src/conversions.h +0 -122
  333. data/ext/v8/upstream/v8/src/counters.cc +0 -93
  334. data/ext/v8/upstream/v8/src/counters.h +0 -254
  335. data/ext/v8/upstream/v8/src/cpu-profiler-inl.h +0 -101
  336. data/ext/v8/upstream/v8/src/cpu-profiler.cc +0 -606
  337. data/ext/v8/upstream/v8/src/cpu-profiler.h +0 -305
  338. data/ext/v8/upstream/v8/src/cpu.h +0 -67
  339. data/ext/v8/upstream/v8/src/d8-debug.cc +0 -367
  340. data/ext/v8/upstream/v8/src/d8-debug.h +0 -158
  341. data/ext/v8/upstream/v8/src/d8-posix.cc +0 -695
  342. data/ext/v8/upstream/v8/src/d8-readline.cc +0 -128
  343. data/ext/v8/upstream/v8/src/d8-windows.cc +0 -42
  344. data/ext/v8/upstream/v8/src/d8.cc +0 -796
  345. data/ext/v8/upstream/v8/src/d8.gyp +0 -88
  346. data/ext/v8/upstream/v8/src/d8.h +0 -231
  347. data/ext/v8/upstream/v8/src/d8.js +0 -2798
  348. data/ext/v8/upstream/v8/src/data-flow.cc +0 -545
  349. data/ext/v8/upstream/v8/src/data-flow.h +0 -379
  350. data/ext/v8/upstream/v8/src/date.js +0 -1103
  351. data/ext/v8/upstream/v8/src/dateparser-inl.h +0 -125
  352. data/ext/v8/upstream/v8/src/dateparser.cc +0 -178
  353. data/ext/v8/upstream/v8/src/dateparser.h +0 -265
  354. data/ext/v8/upstream/v8/src/debug-agent.cc +0 -447
  355. data/ext/v8/upstream/v8/src/debug-agent.h +0 -129
  356. data/ext/v8/upstream/v8/src/debug-debugger.js +0 -2569
  357. data/ext/v8/upstream/v8/src/debug.cc +0 -3188
  358. data/ext/v8/upstream/v8/src/debug.h +0 -1055
  359. data/ext/v8/upstream/v8/src/deoptimizer.cc +0 -1296
  360. data/ext/v8/upstream/v8/src/deoptimizer.h +0 -629
  361. data/ext/v8/upstream/v8/src/disasm.h +0 -80
  362. data/ext/v8/upstream/v8/src/disassembler.cc +0 -339
  363. data/ext/v8/upstream/v8/src/disassembler.h +0 -56
  364. data/ext/v8/upstream/v8/src/diy-fp.cc +0 -58
  365. data/ext/v8/upstream/v8/src/diy-fp.h +0 -117
  366. data/ext/v8/upstream/v8/src/double.h +0 -238
  367. data/ext/v8/upstream/v8/src/dtoa.cc +0 -103
  368. data/ext/v8/upstream/v8/src/dtoa.h +0 -85
  369. data/ext/v8/upstream/v8/src/execution.cc +0 -791
  370. data/ext/v8/upstream/v8/src/execution.h +0 -291
  371. data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.cc +0 -250
  372. data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.h +0 -89
  373. data/ext/v8/upstream/v8/src/extensions/experimental/experimental.gyp +0 -55
  374. data/ext/v8/upstream/v8/src/extensions/experimental/i18n-extension.cc +0 -284
  375. data/ext/v8/upstream/v8/src/extensions/experimental/i18n-extension.h +0 -64
  376. data/ext/v8/upstream/v8/src/extensions/externalize-string-extension.cc +0 -141
  377. data/ext/v8/upstream/v8/src/extensions/externalize-string-extension.h +0 -50
  378. data/ext/v8/upstream/v8/src/extensions/gc-extension.cc +0 -58
  379. data/ext/v8/upstream/v8/src/extensions/gc-extension.h +0 -49
  380. data/ext/v8/upstream/v8/src/factory.cc +0 -1194
  381. data/ext/v8/upstream/v8/src/factory.h +0 -436
  382. data/ext/v8/upstream/v8/src/fast-dtoa.cc +0 -736
  383. data/ext/v8/upstream/v8/src/fast-dtoa.h +0 -83
  384. data/ext/v8/upstream/v8/src/fixed-dtoa.cc +0 -405
  385. data/ext/v8/upstream/v8/src/fixed-dtoa.h +0 -55
  386. data/ext/v8/upstream/v8/src/flag-definitions.h +0 -556
  387. data/ext/v8/upstream/v8/src/flags.cc +0 -551
  388. data/ext/v8/upstream/v8/src/flags.h +0 -79
  389. data/ext/v8/upstream/v8/src/frame-element.cc +0 -37
  390. data/ext/v8/upstream/v8/src/frame-element.h +0 -269
  391. data/ext/v8/upstream/v8/src/frames-inl.h +0 -236
  392. data/ext/v8/upstream/v8/src/frames.cc +0 -1273
  393. data/ext/v8/upstream/v8/src/frames.h +0 -854
  394. data/ext/v8/upstream/v8/src/full-codegen.cc +0 -1385
  395. data/ext/v8/upstream/v8/src/full-codegen.h +0 -753
  396. data/ext/v8/upstream/v8/src/func-name-inferrer.cc +0 -91
  397. data/ext/v8/upstream/v8/src/func-name-inferrer.h +0 -111
  398. data/ext/v8/upstream/v8/src/gdb-jit.cc +0 -1548
  399. data/ext/v8/upstream/v8/src/gdb-jit.h +0 -138
  400. data/ext/v8/upstream/v8/src/global-handles.cc +0 -596
  401. data/ext/v8/upstream/v8/src/global-handles.h +0 -239
  402. data/ext/v8/upstream/v8/src/globals.h +0 -325
  403. data/ext/v8/upstream/v8/src/handles-inl.h +0 -177
  404. data/ext/v8/upstream/v8/src/handles.cc +0 -965
  405. data/ext/v8/upstream/v8/src/handles.h +0 -372
  406. data/ext/v8/upstream/v8/src/hashmap.cc +0 -230
  407. data/ext/v8/upstream/v8/src/hashmap.h +0 -121
  408. data/ext/v8/upstream/v8/src/heap-inl.h +0 -703
  409. data/ext/v8/upstream/v8/src/heap-profiler.cc +0 -1173
  410. data/ext/v8/upstream/v8/src/heap-profiler.h +0 -396
  411. data/ext/v8/upstream/v8/src/heap.cc +0 -5856
  412. data/ext/v8/upstream/v8/src/heap.h +0 -2264
  413. data/ext/v8/upstream/v8/src/hydrogen-instructions.cc +0 -1639
  414. data/ext/v8/upstream/v8/src/hydrogen-instructions.h +0 -3657
  415. data/ext/v8/upstream/v8/src/hydrogen.cc +0 -6011
  416. data/ext/v8/upstream/v8/src/hydrogen.h +0 -1137
  417. data/ext/v8/upstream/v8/src/ia32/assembler-ia32-inl.h +0 -430
  418. data/ext/v8/upstream/v8/src/ia32/assembler-ia32.cc +0 -2846
  419. data/ext/v8/upstream/v8/src/ia32/assembler-ia32.h +0 -1159
  420. data/ext/v8/upstream/v8/src/ia32/builtins-ia32.cc +0 -1596
  421. data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.cc +0 -6549
  422. data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.h +0 -495
  423. data/ext/v8/upstream/v8/src/ia32/codegen-ia32-inl.h +0 -46
  424. data/ext/v8/upstream/v8/src/ia32/codegen-ia32.cc +0 -10385
  425. data/ext/v8/upstream/v8/src/ia32/codegen-ia32.h +0 -801
  426. data/ext/v8/upstream/v8/src/ia32/cpu-ia32.cc +0 -88
  427. data/ext/v8/upstream/v8/src/ia32/debug-ia32.cc +0 -312
  428. data/ext/v8/upstream/v8/src/ia32/deoptimizer-ia32.cc +0 -774
  429. data/ext/v8/upstream/v8/src/ia32/disasm-ia32.cc +0 -1620
  430. data/ext/v8/upstream/v8/src/ia32/frames-ia32.cc +0 -45
  431. data/ext/v8/upstream/v8/src/ia32/frames-ia32.h +0 -140
  432. data/ext/v8/upstream/v8/src/ia32/full-codegen-ia32.cc +0 -4357
  433. data/ext/v8/upstream/v8/src/ia32/ic-ia32.cc +0 -1779
  434. data/ext/v8/upstream/v8/src/ia32/jump-target-ia32.cc +0 -437
  435. data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.cc +0 -4158
  436. data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.h +0 -318
  437. data/ext/v8/upstream/v8/src/ia32/lithium-gap-resolver-ia32.cc +0 -466
  438. data/ext/v8/upstream/v8/src/ia32/lithium-gap-resolver-ia32.h +0 -110
  439. data/ext/v8/upstream/v8/src/ia32/lithium-ia32.cc +0 -2181
  440. data/ext/v8/upstream/v8/src/ia32/lithium-ia32.h +0 -2235
  441. data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.cc +0 -2056
  442. data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.h +0 -807
  443. data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.cc +0 -1264
  444. data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.h +0 -216
  445. data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32-inl.h +0 -82
  446. data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32.cc +0 -157
  447. data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32.h +0 -43
  448. data/ext/v8/upstream/v8/src/ia32/simulator-ia32.cc +0 -30
  449. data/ext/v8/upstream/v8/src/ia32/simulator-ia32.h +0 -72
  450. data/ext/v8/upstream/v8/src/ia32/stub-cache-ia32.cc +0 -3711
  451. data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.cc +0 -1366
  452. data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.h +0 -650
  453. data/ext/v8/upstream/v8/src/ic-inl.h +0 -130
  454. data/ext/v8/upstream/v8/src/ic.cc +0 -2389
  455. data/ext/v8/upstream/v8/src/ic.h +0 -675
  456. data/ext/v8/upstream/v8/src/inspector.cc +0 -63
  457. data/ext/v8/upstream/v8/src/inspector.h +0 -62
  458. data/ext/v8/upstream/v8/src/interpreter-irregexp.cc +0 -659
  459. data/ext/v8/upstream/v8/src/interpreter-irregexp.h +0 -49
  460. data/ext/v8/upstream/v8/src/isolate.cc +0 -883
  461. data/ext/v8/upstream/v8/src/isolate.h +0 -1306
  462. data/ext/v8/upstream/v8/src/json.js +0 -342
  463. data/ext/v8/upstream/v8/src/jsregexp.cc +0 -5371
  464. data/ext/v8/upstream/v8/src/jsregexp.h +0 -1483
  465. data/ext/v8/upstream/v8/src/jump-target-heavy-inl.h +0 -51
  466. data/ext/v8/upstream/v8/src/jump-target-heavy.cc +0 -427
  467. data/ext/v8/upstream/v8/src/jump-target-heavy.h +0 -238
  468. data/ext/v8/upstream/v8/src/jump-target-inl.h +0 -48
  469. data/ext/v8/upstream/v8/src/jump-target-light-inl.h +0 -56
  470. data/ext/v8/upstream/v8/src/jump-target-light.cc +0 -111
  471. data/ext/v8/upstream/v8/src/jump-target-light.h +0 -193
  472. data/ext/v8/upstream/v8/src/jump-target.cc +0 -91
  473. data/ext/v8/upstream/v8/src/jump-target.h +0 -90
  474. data/ext/v8/upstream/v8/src/list-inl.h +0 -206
  475. data/ext/v8/upstream/v8/src/list.h +0 -164
  476. data/ext/v8/upstream/v8/src/lithium-allocator-inl.h +0 -142
  477. data/ext/v8/upstream/v8/src/lithium-allocator.cc +0 -2105
  478. data/ext/v8/upstream/v8/src/lithium-allocator.h +0 -630
  479. data/ext/v8/upstream/v8/src/lithium.cc +0 -169
  480. data/ext/v8/upstream/v8/src/lithium.h +0 -592
  481. data/ext/v8/upstream/v8/src/liveedit-debugger.js +0 -1082
  482. data/ext/v8/upstream/v8/src/liveedit.cc +0 -1693
  483. data/ext/v8/upstream/v8/src/liveedit.h +0 -179
  484. data/ext/v8/upstream/v8/src/liveobjectlist-inl.h +0 -126
  485. data/ext/v8/upstream/v8/src/liveobjectlist.cc +0 -2589
  486. data/ext/v8/upstream/v8/src/liveobjectlist.h +0 -322
  487. data/ext/v8/upstream/v8/src/log-inl.h +0 -59
  488. data/ext/v8/upstream/v8/src/log-utils.cc +0 -423
  489. data/ext/v8/upstream/v8/src/log-utils.h +0 -229
  490. data/ext/v8/upstream/v8/src/log.cc +0 -1666
  491. data/ext/v8/upstream/v8/src/log.h +0 -446
  492. data/ext/v8/upstream/v8/src/macro-assembler.h +0 -120
  493. data/ext/v8/upstream/v8/src/macros.py +0 -178
  494. data/ext/v8/upstream/v8/src/mark-compact.cc +0 -3092
  495. data/ext/v8/upstream/v8/src/mark-compact.h +0 -506
  496. data/ext/v8/upstream/v8/src/math.js +0 -264
  497. data/ext/v8/upstream/v8/src/messages.cc +0 -166
  498. data/ext/v8/upstream/v8/src/messages.h +0 -114
  499. data/ext/v8/upstream/v8/src/messages.js +0 -1090
  500. data/ext/v8/upstream/v8/src/mips/assembler-mips-inl.h +0 -335
  501. data/ext/v8/upstream/v8/src/mips/assembler-mips.cc +0 -2093
  502. data/ext/v8/upstream/v8/src/mips/assembler-mips.h +0 -1066
  503. data/ext/v8/upstream/v8/src/mips/builtins-mips.cc +0 -148
  504. data/ext/v8/upstream/v8/src/mips/code-stubs-mips.cc +0 -752
  505. data/ext/v8/upstream/v8/src/mips/code-stubs-mips.h +0 -511
  506. data/ext/v8/upstream/v8/src/mips/codegen-mips-inl.h +0 -64
  507. data/ext/v8/upstream/v8/src/mips/codegen-mips.cc +0 -1213
  508. data/ext/v8/upstream/v8/src/mips/codegen-mips.h +0 -633
  509. data/ext/v8/upstream/v8/src/mips/constants-mips.cc +0 -352
  510. data/ext/v8/upstream/v8/src/mips/constants-mips.h +0 -723
  511. data/ext/v8/upstream/v8/src/mips/cpu-mips.cc +0 -90
  512. data/ext/v8/upstream/v8/src/mips/debug-mips.cc +0 -155
  513. data/ext/v8/upstream/v8/src/mips/deoptimizer-mips.cc +0 -91
  514. data/ext/v8/upstream/v8/src/mips/disasm-mips.cc +0 -1023
  515. data/ext/v8/upstream/v8/src/mips/frames-mips.cc +0 -48
  516. data/ext/v8/upstream/v8/src/mips/frames-mips.h +0 -179
  517. data/ext/v8/upstream/v8/src/mips/full-codegen-mips.cc +0 -727
  518. data/ext/v8/upstream/v8/src/mips/ic-mips.cc +0 -244
  519. data/ext/v8/upstream/v8/src/mips/jump-target-mips.cc +0 -80
  520. data/ext/v8/upstream/v8/src/mips/lithium-codegen-mips.h +0 -65
  521. data/ext/v8/upstream/v8/src/mips/lithium-mips.h +0 -304
  522. data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.cc +0 -3327
  523. data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.h +0 -1058
  524. data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.cc +0 -478
  525. data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.h +0 -250
  526. data/ext/v8/upstream/v8/src/mips/register-allocator-mips-inl.h +0 -134
  527. data/ext/v8/upstream/v8/src/mips/register-allocator-mips.cc +0 -63
  528. data/ext/v8/upstream/v8/src/mips/register-allocator-mips.h +0 -47
  529. data/ext/v8/upstream/v8/src/mips/simulator-mips.cc +0 -2438
  530. data/ext/v8/upstream/v8/src/mips/simulator-mips.h +0 -394
  531. data/ext/v8/upstream/v8/src/mips/stub-cache-mips.cc +0 -601
  532. data/ext/v8/upstream/v8/src/mips/virtual-frame-mips-inl.h +0 -58
  533. data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.cc +0 -307
  534. data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.h +0 -530
  535. data/ext/v8/upstream/v8/src/mirror-debugger.js +0 -2381
  536. data/ext/v8/upstream/v8/src/mksnapshot.cc +0 -256
  537. data/ext/v8/upstream/v8/src/natives.h +0 -63
  538. data/ext/v8/upstream/v8/src/objects-debug.cc +0 -722
  539. data/ext/v8/upstream/v8/src/objects-inl.h +0 -4166
  540. data/ext/v8/upstream/v8/src/objects-printer.cc +0 -801
  541. data/ext/v8/upstream/v8/src/objects-visiting.cc +0 -142
  542. data/ext/v8/upstream/v8/src/objects-visiting.h +0 -422
  543. data/ext/v8/upstream/v8/src/objects.cc +0 -10296
  544. data/ext/v8/upstream/v8/src/objects.h +0 -6662
  545. data/ext/v8/upstream/v8/src/parser.cc +0 -5168
  546. data/ext/v8/upstream/v8/src/parser.h +0 -823
  547. data/ext/v8/upstream/v8/src/platform-cygwin.cc +0 -811
  548. data/ext/v8/upstream/v8/src/platform-freebsd.cc +0 -854
  549. data/ext/v8/upstream/v8/src/platform-linux.cc +0 -1120
  550. data/ext/v8/upstream/v8/src/platform-macos.cc +0 -865
  551. data/ext/v8/upstream/v8/src/platform-nullos.cc +0 -504
  552. data/ext/v8/upstream/v8/src/platform-openbsd.cc +0 -672
  553. data/ext/v8/upstream/v8/src/platform-posix.cc +0 -424
  554. data/ext/v8/upstream/v8/src/platform-solaris.cc +0 -796
  555. data/ext/v8/upstream/v8/src/platform-tls-mac.h +0 -62
  556. data/ext/v8/upstream/v8/src/platform-tls-win32.h +0 -62
  557. data/ext/v8/upstream/v8/src/platform-tls.h +0 -50
  558. data/ext/v8/upstream/v8/src/platform-win32.cc +0 -2072
  559. data/ext/v8/upstream/v8/src/platform.h +0 -693
  560. data/ext/v8/upstream/v8/src/preparse-data.cc +0 -185
  561. data/ext/v8/upstream/v8/src/preparse-data.h +0 -249
  562. data/ext/v8/upstream/v8/src/preparser-api.cc +0 -219
  563. data/ext/v8/upstream/v8/src/preparser.cc +0 -1205
  564. data/ext/v8/upstream/v8/src/preparser.h +0 -278
  565. data/ext/v8/upstream/v8/src/prettyprinter.cc +0 -1530
  566. data/ext/v8/upstream/v8/src/prettyprinter.h +0 -223
  567. data/ext/v8/upstream/v8/src/profile-generator-inl.h +0 -128
  568. data/ext/v8/upstream/v8/src/profile-generator.cc +0 -3095
  569. data/ext/v8/upstream/v8/src/profile-generator.h +0 -1125
  570. data/ext/v8/upstream/v8/src/property.cc +0 -102
  571. data/ext/v8/upstream/v8/src/property.h +0 -348
  572. data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp-inl.h +0 -78
  573. data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp.cc +0 -470
  574. data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp.h +0 -142
  575. data/ext/v8/upstream/v8/src/regexp-macro-assembler-tracer.cc +0 -373
  576. data/ext/v8/upstream/v8/src/regexp-macro-assembler-tracer.h +0 -104
  577. data/ext/v8/upstream/v8/src/regexp-macro-assembler.cc +0 -266
  578. data/ext/v8/upstream/v8/src/regexp-macro-assembler.h +0 -236
  579. data/ext/v8/upstream/v8/src/regexp-stack.cc +0 -111
  580. data/ext/v8/upstream/v8/src/regexp-stack.h +0 -147
  581. data/ext/v8/upstream/v8/src/regexp.js +0 -483
  582. data/ext/v8/upstream/v8/src/register-allocator-inl.h +0 -141
  583. data/ext/v8/upstream/v8/src/register-allocator.cc +0 -98
  584. data/ext/v8/upstream/v8/src/register-allocator.h +0 -310
  585. data/ext/v8/upstream/v8/src/rewriter.cc +0 -1024
  586. data/ext/v8/upstream/v8/src/rewriter.h +0 -59
  587. data/ext/v8/upstream/v8/src/runtime-profiler.cc +0 -478
  588. data/ext/v8/upstream/v8/src/runtime-profiler.h +0 -192
  589. data/ext/v8/upstream/v8/src/runtime.cc +0 -11949
  590. data/ext/v8/upstream/v8/src/runtime.h +0 -643
  591. data/ext/v8/upstream/v8/src/runtime.js +0 -643
  592. data/ext/v8/upstream/v8/src/safepoint-table.cc +0 -256
  593. data/ext/v8/upstream/v8/src/safepoint-table.h +0 -269
  594. data/ext/v8/upstream/v8/src/scanner-base.cc +0 -964
  595. data/ext/v8/upstream/v8/src/scanner-base.h +0 -664
  596. data/ext/v8/upstream/v8/src/scanner.cc +0 -584
  597. data/ext/v8/upstream/v8/src/scanner.h +0 -196
  598. data/ext/v8/upstream/v8/src/scopeinfo.cc +0 -631
  599. data/ext/v8/upstream/v8/src/scopeinfo.h +0 -249
  600. data/ext/v8/upstream/v8/src/scopes.cc +0 -1093
  601. data/ext/v8/upstream/v8/src/scopes.h +0 -508
  602. data/ext/v8/upstream/v8/src/serialize.cc +0 -1574
  603. data/ext/v8/upstream/v8/src/serialize.h +0 -589
  604. data/ext/v8/upstream/v8/src/shell.h +0 -55
  605. data/ext/v8/upstream/v8/src/simulator.h +0 -43
  606. data/ext/v8/upstream/v8/src/small-pointer-list.h +0 -163
  607. data/ext/v8/upstream/v8/src/smart-pointer.h +0 -109
  608. data/ext/v8/upstream/v8/src/snapshot-common.cc +0 -82
  609. data/ext/v8/upstream/v8/src/snapshot-empty.cc +0 -50
  610. data/ext/v8/upstream/v8/src/snapshot.h +0 -73
  611. data/ext/v8/upstream/v8/src/spaces-inl.h +0 -529
  612. data/ext/v8/upstream/v8/src/spaces.cc +0 -3147
  613. data/ext/v8/upstream/v8/src/spaces.h +0 -2368
  614. data/ext/v8/upstream/v8/src/splay-tree-inl.h +0 -310
  615. data/ext/v8/upstream/v8/src/splay-tree.h +0 -203
  616. data/ext/v8/upstream/v8/src/string-search.cc +0 -41
  617. data/ext/v8/upstream/v8/src/string-search.h +0 -568
  618. data/ext/v8/upstream/v8/src/string-stream.cc +0 -592
  619. data/ext/v8/upstream/v8/src/string-stream.h +0 -191
  620. data/ext/v8/upstream/v8/src/string.js +0 -915
  621. data/ext/v8/upstream/v8/src/strtod.cc +0 -440
  622. data/ext/v8/upstream/v8/src/strtod.h +0 -40
  623. data/ext/v8/upstream/v8/src/stub-cache.cc +0 -1940
  624. data/ext/v8/upstream/v8/src/stub-cache.h +0 -866
  625. data/ext/v8/upstream/v8/src/third_party/valgrind/valgrind.h +0 -3925
  626. data/ext/v8/upstream/v8/src/token.cc +0 -63
  627. data/ext/v8/upstream/v8/src/token.h +0 -288
  628. data/ext/v8/upstream/v8/src/top.cc +0 -983
  629. data/ext/v8/upstream/v8/src/type-info.cc +0 -472
  630. data/ext/v8/upstream/v8/src/type-info.h +0 -290
  631. data/ext/v8/upstream/v8/src/unbound-queue-inl.h +0 -95
  632. data/ext/v8/upstream/v8/src/unbound-queue.h +0 -67
  633. data/ext/v8/upstream/v8/src/unicode-inl.h +0 -238
  634. data/ext/v8/upstream/v8/src/unicode.cc +0 -1624
  635. data/ext/v8/upstream/v8/src/unicode.h +0 -280
  636. data/ext/v8/upstream/v8/src/uri.js +0 -402
  637. data/ext/v8/upstream/v8/src/utils.cc +0 -371
  638. data/ext/v8/upstream/v8/src/utils.h +0 -796
  639. data/ext/v8/upstream/v8/src/v8-counters.cc +0 -62
  640. data/ext/v8/upstream/v8/src/v8-counters.h +0 -311
  641. data/ext/v8/upstream/v8/src/v8.cc +0 -215
  642. data/ext/v8/upstream/v8/src/v8.h +0 -130
  643. data/ext/v8/upstream/v8/src/v8checks.h +0 -64
  644. data/ext/v8/upstream/v8/src/v8dll-main.cc +0 -39
  645. data/ext/v8/upstream/v8/src/v8globals.h +0 -486
  646. data/ext/v8/upstream/v8/src/v8memory.h +0 -82
  647. data/ext/v8/upstream/v8/src/v8natives.js +0 -1293
  648. data/ext/v8/upstream/v8/src/v8preparserdll-main.cc +0 -39
  649. data/ext/v8/upstream/v8/src/v8threads.cc +0 -453
  650. data/ext/v8/upstream/v8/src/v8threads.h +0 -164
  651. data/ext/v8/upstream/v8/src/v8utils.h +0 -317
  652. data/ext/v8/upstream/v8/src/variables.cc +0 -132
  653. data/ext/v8/upstream/v8/src/variables.h +0 -212
  654. data/ext/v8/upstream/v8/src/version.cc +0 -116
  655. data/ext/v8/upstream/v8/src/version.h +0 -68
  656. data/ext/v8/upstream/v8/src/virtual-frame-heavy-inl.h +0 -190
  657. data/ext/v8/upstream/v8/src/virtual-frame-heavy.cc +0 -312
  658. data/ext/v8/upstream/v8/src/virtual-frame-inl.h +0 -39
  659. data/ext/v8/upstream/v8/src/virtual-frame-light-inl.h +0 -171
  660. data/ext/v8/upstream/v8/src/virtual-frame-light.cc +0 -52
  661. data/ext/v8/upstream/v8/src/virtual-frame.cc +0 -49
  662. data/ext/v8/upstream/v8/src/virtual-frame.h +0 -59
  663. data/ext/v8/upstream/v8/src/vm-state-inl.h +0 -138
  664. data/ext/v8/upstream/v8/src/vm-state.h +0 -70
  665. data/ext/v8/upstream/v8/src/win32-headers.h +0 -96
  666. data/ext/v8/upstream/v8/src/x64/assembler-x64-inl.h +0 -456
  667. data/ext/v8/upstream/v8/src/x64/assembler-x64.cc +0 -2954
  668. data/ext/v8/upstream/v8/src/x64/assembler-x64.h +0 -1630
  669. data/ext/v8/upstream/v8/src/x64/builtins-x64.cc +0 -1493
  670. data/ext/v8/upstream/v8/src/x64/code-stubs-x64.cc +0 -5132
  671. data/ext/v8/upstream/v8/src/x64/code-stubs-x64.h +0 -477
  672. data/ext/v8/upstream/v8/src/x64/codegen-x64-inl.h +0 -46
  673. data/ext/v8/upstream/v8/src/x64/codegen-x64.cc +0 -8843
  674. data/ext/v8/upstream/v8/src/x64/codegen-x64.h +0 -753
  675. data/ext/v8/upstream/v8/src/x64/cpu-x64.cc +0 -88
  676. data/ext/v8/upstream/v8/src/x64/debug-x64.cc +0 -318
  677. data/ext/v8/upstream/v8/src/x64/deoptimizer-x64.cc +0 -815
  678. data/ext/v8/upstream/v8/src/x64/disasm-x64.cc +0 -1752
  679. data/ext/v8/upstream/v8/src/x64/frames-x64.cc +0 -45
  680. data/ext/v8/upstream/v8/src/x64/frames-x64.h +0 -130
  681. data/ext/v8/upstream/v8/src/x64/full-codegen-x64.cc +0 -4339
  682. data/ext/v8/upstream/v8/src/x64/ic-x64.cc +0 -1752
  683. data/ext/v8/upstream/v8/src/x64/jump-target-x64.cc +0 -437
  684. data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.cc +0 -3970
  685. data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.h +0 -318
  686. data/ext/v8/upstream/v8/src/x64/lithium-gap-resolver-x64.cc +0 -320
  687. data/ext/v8/upstream/v8/src/x64/lithium-gap-resolver-x64.h +0 -74
  688. data/ext/v8/upstream/v8/src/x64/lithium-x64.cc +0 -2115
  689. data/ext/v8/upstream/v8/src/x64/lithium-x64.h +0 -2161
  690. data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.cc +0 -2911
  691. data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.h +0 -1984
  692. data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.cc +0 -1398
  693. data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.h +0 -282
  694. data/ext/v8/upstream/v8/src/x64/register-allocator-x64-inl.h +0 -87
  695. data/ext/v8/upstream/v8/src/x64/register-allocator-x64.cc +0 -95
  696. data/ext/v8/upstream/v8/src/x64/register-allocator-x64.h +0 -43
  697. data/ext/v8/upstream/v8/src/x64/simulator-x64.cc +0 -27
  698. data/ext/v8/upstream/v8/src/x64/simulator-x64.h +0 -71
  699. data/ext/v8/upstream/v8/src/x64/stub-cache-x64.cc +0 -3460
  700. data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.cc +0 -1296
  701. data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.h +0 -597
  702. data/ext/v8/upstream/v8/src/zone-inl.h +0 -129
  703. data/ext/v8/upstream/v8/src/zone.cc +0 -196
  704. data/ext/v8/upstream/v8/src/zone.h +0 -236
  705. data/ext/v8/upstream/v8/tools/codemap.js +0 -265
  706. data/ext/v8/upstream/v8/tools/consarray.js +0 -93
  707. data/ext/v8/upstream/v8/tools/csvparser.js +0 -78
  708. data/ext/v8/upstream/v8/tools/disasm.py +0 -92
  709. data/ext/v8/upstream/v8/tools/freebsd-tick-processor +0 -10
  710. data/ext/v8/upstream/v8/tools/gc-nvp-trace-processor.py +0 -328
  711. data/ext/v8/upstream/v8/tools/generate-ten-powers.scm +0 -286
  712. data/ext/v8/upstream/v8/tools/grokdump.py +0 -840
  713. data/ext/v8/upstream/v8/tools/gyp/v8.gyp +0 -844
  714. data/ext/v8/upstream/v8/tools/js2c.py +0 -380
  715. data/ext/v8/upstream/v8/tools/jsmin.py +0 -280
  716. data/ext/v8/upstream/v8/tools/linux-tick-processor +0 -35
  717. data/ext/v8/upstream/v8/tools/ll_prof.py +0 -919
  718. data/ext/v8/upstream/v8/tools/logreader.js +0 -185
  719. data/ext/v8/upstream/v8/tools/mac-nm +0 -18
  720. data/ext/v8/upstream/v8/tools/mac-tick-processor +0 -6
  721. data/ext/v8/upstream/v8/tools/oom_dump/README +0 -31
  722. data/ext/v8/upstream/v8/tools/oom_dump/SConstruct +0 -42
  723. data/ext/v8/upstream/v8/tools/oom_dump/oom_dump.cc +0 -288
  724. data/ext/v8/upstream/v8/tools/presubmit.py +0 -305
  725. data/ext/v8/upstream/v8/tools/process-heap-prof.py +0 -120
  726. data/ext/v8/upstream/v8/tools/profile.js +0 -751
  727. data/ext/v8/upstream/v8/tools/profile_view.js +0 -219
  728. data/ext/v8/upstream/v8/tools/run-valgrind.py +0 -77
  729. data/ext/v8/upstream/v8/tools/splaytree.js +0 -316
  730. data/ext/v8/upstream/v8/tools/stats-viewer.py +0 -468
  731. data/ext/v8/upstream/v8/tools/test.py +0 -1490
  732. data/ext/v8/upstream/v8/tools/tickprocessor-driver.js +0 -59
  733. data/ext/v8/upstream/v8/tools/tickprocessor.js +0 -877
  734. data/ext/v8/upstream/v8/tools/utils.py +0 -96
  735. data/ext/v8/upstream/v8/tools/visual_studio/README.txt +0 -70
  736. data/ext/v8/upstream/v8/tools/visual_studio/arm.vsprops +0 -14
  737. data/ext/v8/upstream/v8/tools/visual_studio/common.vsprops +0 -34
  738. data/ext/v8/upstream/v8/tools/visual_studio/d8.vcproj +0 -193
  739. data/ext/v8/upstream/v8/tools/visual_studio/d8_arm.vcproj +0 -193
  740. data/ext/v8/upstream/v8/tools/visual_studio/d8_x64.vcproj +0 -209
  741. data/ext/v8/upstream/v8/tools/visual_studio/d8js2c.cmd +0 -6
  742. data/ext/v8/upstream/v8/tools/visual_studio/debug.vsprops +0 -17
  743. data/ext/v8/upstream/v8/tools/visual_studio/ia32.vsprops +0 -17
  744. data/ext/v8/upstream/v8/tools/visual_studio/js2c.cmd +0 -6
  745. data/ext/v8/upstream/v8/tools/visual_studio/release.vsprops +0 -24
  746. data/ext/v8/upstream/v8/tools/visual_studio/v8.sln +0 -101
  747. data/ext/v8/upstream/v8/tools/visual_studio/v8.vcproj +0 -227
  748. data/ext/v8/upstream/v8/tools/visual_studio/v8_arm.sln +0 -74
  749. data/ext/v8/upstream/v8/tools/visual_studio/v8_arm.vcproj +0 -227
  750. data/ext/v8/upstream/v8/tools/visual_studio/v8_base.vcproj +0 -1308
  751. data/ext/v8/upstream/v8/tools/visual_studio/v8_base_arm.vcproj +0 -1238
  752. data/ext/v8/upstream/v8/tools/visual_studio/v8_base_x64.vcproj +0 -1300
  753. data/ext/v8/upstream/v8/tools/visual_studio/v8_cctest.vcproj +0 -265
  754. data/ext/v8/upstream/v8/tools/visual_studio/v8_cctest_arm.vcproj +0 -249
  755. data/ext/v8/upstream/v8/tools/visual_studio/v8_cctest_x64.vcproj +0 -257
  756. data/ext/v8/upstream/v8/tools/visual_studio/v8_mksnapshot.vcproj +0 -145
  757. data/ext/v8/upstream/v8/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -145
  758. data/ext/v8/upstream/v8/tools/visual_studio/v8_process_sample.vcproj +0 -145
  759. data/ext/v8/upstream/v8/tools/visual_studio/v8_process_sample_arm.vcproj +0 -145
  760. data/ext/v8/upstream/v8/tools/visual_studio/v8_process_sample_x64.vcproj +0 -161
  761. data/ext/v8/upstream/v8/tools/visual_studio/v8_shell_sample.vcproj +0 -147
  762. data/ext/v8/upstream/v8/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -147
  763. data/ext/v8/upstream/v8/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -163
  764. data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot.vcproj +0 -142
  765. data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot_cc.vcproj +0 -92
  766. data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -92
  767. data/ext/v8/upstream/v8/tools/visual_studio/v8_snapshot_x64.vcproj +0 -142
  768. data/ext/v8/upstream/v8/tools/visual_studio/v8_x64.sln +0 -101
  769. data/ext/v8/upstream/v8/tools/visual_studio/v8_x64.vcproj +0 -227
  770. data/ext/v8/upstream/v8/tools/visual_studio/x64.vsprops +0 -18
  771. data/ext/v8/upstream/v8/tools/windows-tick-processor.bat +0 -30
@@ -1,91 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #include "v8.h"
29
-
30
- #include "ast.h"
31
- #include "func-name-inferrer.h"
32
-
33
- namespace v8 {
34
- namespace internal {
35
-
36
-
37
- void FuncNameInferrer::PushEnclosingName(Handle<String> name) {
38
- // Enclosing name is a name of a constructor function. To check
39
- // that it is really a constructor, we check that it is not empty
40
- // and starts with a capital letter.
41
- if (name->length() > 0 && Runtime::IsUpperCaseChar(
42
- Isolate::Current()->runtime_state(), name->Get(0))) {
43
- names_stack_.Add(name);
44
- }
45
- }
46
-
47
-
48
- void FuncNameInferrer::PushLiteralName(Handle<String> name) {
49
- if (IsOpen() && !HEAP->prototype_symbol()->Equals(*name)) {
50
- names_stack_.Add(name);
51
- }
52
- }
53
-
54
-
55
- void FuncNameInferrer::PushVariableName(Handle<String> name) {
56
- if (IsOpen() && !HEAP->result_symbol()->Equals(*name)) {
57
- names_stack_.Add(name);
58
- }
59
- }
60
-
61
-
62
- Handle<String> FuncNameInferrer::MakeNameFromStack() {
63
- if (names_stack_.is_empty()) {
64
- return FACTORY->empty_string();
65
- } else {
66
- return MakeNameFromStackHelper(1, names_stack_.at(0));
67
- }
68
- }
69
-
70
-
71
- Handle<String> FuncNameInferrer::MakeNameFromStackHelper(int pos,
72
- Handle<String> prev) {
73
- if (pos >= names_stack_.length()) {
74
- return prev;
75
- } else {
76
- Handle<String> curr = FACTORY->NewConsString(dot_, names_stack_.at(pos));
77
- return MakeNameFromStackHelper(pos + 1, FACTORY->NewConsString(prev, curr));
78
- }
79
- }
80
-
81
-
82
- void FuncNameInferrer::InferFunctionsNames() {
83
- Handle<String> func_name = MakeNameFromStack();
84
- for (int i = 0; i < funcs_to_infer_.length(); ++i) {
85
- funcs_to_infer_[i]->set_inferred_name(func_name);
86
- }
87
- funcs_to_infer_.Rewind(0);
88
- }
89
-
90
-
91
- } } // namespace v8::internal
@@ -1,111 +0,0 @@
1
- // Copyright 2006-2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifndef V8_FUNC_NAME_INFERRER_H_
29
- #define V8_FUNC_NAME_INFERRER_H_
30
-
31
- namespace v8 {
32
- namespace internal {
33
-
34
- // FuncNameInferrer is a stateful class that is used to perform name
35
- // inference for anonymous functions during static analysis of source code.
36
- // Inference is performed in cases when an anonymous function is assigned
37
- // to a variable or a property (see test-func-name-inference.cc for examples.)
38
- //
39
- // The basic idea is that during parsing of LHSs of certain expressions
40
- // (assignments, declarations, object literals) we collect name strings,
41
- // and during parsing of the RHS, a function literal can be collected. After
42
- // parsing the RHS we can infer a name for function literals that do not have
43
- // a name.
44
- class FuncNameInferrer : public ZoneObject {
45
- public:
46
- FuncNameInferrer()
47
- : entries_stack_(10),
48
- names_stack_(5),
49
- funcs_to_infer_(4),
50
- dot_(FACTORY->NewStringFromAscii(CStrVector("."))) {
51
- }
52
-
53
- // Returns whether we have entered name collection state.
54
- bool IsOpen() const { return !entries_stack_.is_empty(); }
55
-
56
- // Pushes an enclosing the name of enclosing function onto names stack.
57
- void PushEnclosingName(Handle<String> name);
58
-
59
- // Enters name collection state.
60
- void Enter() {
61
- entries_stack_.Add(names_stack_.length());
62
- }
63
-
64
- // Pushes an encountered name onto names stack when in collection state.
65
- void PushLiteralName(Handle<String> name);
66
-
67
- void PushVariableName(Handle<String> name);
68
-
69
- // Adds a function to infer name for.
70
- void AddFunction(FunctionLiteral* func_to_infer) {
71
- if (IsOpen()) {
72
- funcs_to_infer_.Add(func_to_infer);
73
- }
74
- }
75
-
76
- // Infers a function name and leaves names collection state.
77
- void Infer() {
78
- ASSERT(IsOpen());
79
- if (!funcs_to_infer_.is_empty()) {
80
- InferFunctionsNames();
81
- }
82
- }
83
-
84
- // Infers a function name and leaves names collection state.
85
- void Leave() {
86
- ASSERT(IsOpen());
87
- names_stack_.Rewind(entries_stack_.RemoveLast());
88
- }
89
-
90
- private:
91
- // Constructs a full name in dotted notation from gathered names.
92
- Handle<String> MakeNameFromStack();
93
-
94
- // A helper function for MakeNameFromStack.
95
- Handle<String> MakeNameFromStackHelper(int pos, Handle<String> prev);
96
-
97
- // Performs name inferring for added functions.
98
- void InferFunctionsNames();
99
-
100
- ZoneList<int> entries_stack_;
101
- ZoneList<Handle<String> > names_stack_;
102
- ZoneList<FunctionLiteral*> funcs_to_infer_;
103
- Handle<String> dot_;
104
-
105
- DISALLOW_COPY_AND_ASSIGN(FuncNameInferrer);
106
- };
107
-
108
-
109
- } } // namespace v8::internal
110
-
111
- #endif // V8_FUNC_NAME_INFERRER_H_
@@ -1,1548 +0,0 @@
1
- // Copyright 2010 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifdef ENABLE_GDB_JIT_INTERFACE
29
- #include "v8.h"
30
- #include "gdb-jit.h"
31
-
32
- #include "bootstrapper.h"
33
- #include "compiler.h"
34
- #include "global-handles.h"
35
- #include "messages.h"
36
- #include "natives.h"
37
-
38
- namespace v8 {
39
- namespace internal {
40
-
41
- class ELF;
42
-
43
- class Writer BASE_EMBEDDED {
44
- public:
45
- explicit Writer(ELF* elf)
46
- : elf_(elf),
47
- position_(0),
48
- capacity_(1024),
49
- buffer_(reinterpret_cast<byte*>(malloc(capacity_))) {
50
- }
51
-
52
- ~Writer() {
53
- free(buffer_);
54
- }
55
-
56
- uintptr_t position() const {
57
- return position_;
58
- }
59
-
60
- template<typename T>
61
- class Slot {
62
- public:
63
- Slot(Writer* w, uintptr_t offset) : w_(w), offset_(offset) { }
64
-
65
- T* operator-> () {
66
- return w_->RawSlotAt<T>(offset_);
67
- }
68
-
69
- void set(const T& value) {
70
- *w_->RawSlotAt<T>(offset_) = value;
71
- }
72
-
73
- Slot<T> at(int i) {
74
- return Slot<T>(w_, offset_ + sizeof(T) * i);
75
- }
76
-
77
- private:
78
- Writer* w_;
79
- uintptr_t offset_;
80
- };
81
-
82
- template<typename T>
83
- void Write(const T& val) {
84
- Ensure(position_ + sizeof(T));
85
- *RawSlotAt<T>(position_) = val;
86
- position_ += sizeof(T);
87
- }
88
-
89
- template<typename T>
90
- Slot<T> SlotAt(uintptr_t offset) {
91
- Ensure(offset + sizeof(T));
92
- return Slot<T>(this, offset);
93
- }
94
-
95
- template<typename T>
96
- Slot<T> CreateSlotHere() {
97
- return CreateSlotsHere<T>(1);
98
- }
99
-
100
- template<typename T>
101
- Slot<T> CreateSlotsHere(uint32_t count) {
102
- uintptr_t slot_position = position_;
103
- position_ += sizeof(T) * count;
104
- Ensure(position_);
105
- return SlotAt<T>(slot_position);
106
- }
107
-
108
- void Ensure(uintptr_t pos) {
109
- if (capacity_ < pos) {
110
- while (capacity_ < pos) capacity_ *= 2;
111
- buffer_ = reinterpret_cast<byte*>(realloc(buffer_, capacity_));
112
- }
113
- }
114
-
115
- ELF* elf() { return elf_; }
116
-
117
- byte* buffer() { return buffer_; }
118
-
119
- void Align(uintptr_t align) {
120
- uintptr_t delta = position_ % align;
121
- if (delta == 0) return;
122
- uintptr_t padding = align - delta;
123
- Ensure(position_ += padding);
124
- ASSERT((position_ % align) == 0);
125
- }
126
-
127
- void WriteULEB128(uintptr_t value) {
128
- do {
129
- uint8_t byte = value & 0x7F;
130
- value >>= 7;
131
- if (value != 0) byte |= 0x80;
132
- Write<uint8_t>(byte);
133
- } while (value != 0);
134
- }
135
-
136
- void WriteSLEB128(intptr_t value) {
137
- bool more = true;
138
- while (more) {
139
- int8_t byte = value & 0x7F;
140
- bool byte_sign = byte & 0x40;
141
- value >>= 7;
142
-
143
- if ((value == 0 && !byte_sign) || (value == -1 && byte_sign)) {
144
- more = false;
145
- } else {
146
- byte |= 0x80;
147
- }
148
-
149
- Write<int8_t>(byte);
150
- }
151
- }
152
-
153
- void WriteString(const char* str) {
154
- do {
155
- Write<char>(*str);
156
- } while (*str++);
157
- }
158
-
159
- private:
160
- template<typename T> friend class Slot;
161
-
162
- template<typename T>
163
- T* RawSlotAt(uintptr_t offset) {
164
- ASSERT(offset < capacity_ && offset + sizeof(T) <= capacity_);
165
- return reinterpret_cast<T*>(&buffer_[offset]);
166
- }
167
-
168
- ELF* elf_;
169
- uintptr_t position_;
170
- uintptr_t capacity_;
171
- byte* buffer_;
172
- };
173
-
174
- class StringTable;
175
-
176
- class ELFSection : public ZoneObject {
177
- public:
178
- struct Header {
179
- uint32_t name;
180
- uint32_t type;
181
- uintptr_t flags;
182
- uintptr_t address;
183
- uintptr_t offset;
184
- uintptr_t size;
185
- uint32_t link;
186
- uint32_t info;
187
- uintptr_t alignment;
188
- uintptr_t entry_size;
189
- };
190
-
191
- enum Type {
192
- TYPE_NULL = 0,
193
- TYPE_PROGBITS = 1,
194
- TYPE_SYMTAB = 2,
195
- TYPE_STRTAB = 3,
196
- TYPE_RELA = 4,
197
- TYPE_HASH = 5,
198
- TYPE_DYNAMIC = 6,
199
- TYPE_NOTE = 7,
200
- TYPE_NOBITS = 8,
201
- TYPE_REL = 9,
202
- TYPE_SHLIB = 10,
203
- TYPE_DYNSYM = 11,
204
- TYPE_LOPROC = 0x70000000,
205
- TYPE_X86_64_UNWIND = 0x70000001,
206
- TYPE_HIPROC = 0x7fffffff,
207
- TYPE_LOUSER = 0x80000000,
208
- TYPE_HIUSER = 0xffffffff
209
- };
210
-
211
- enum Flags {
212
- FLAG_WRITE = 1,
213
- FLAG_ALLOC = 2,
214
- FLAG_EXEC = 4
215
- };
216
-
217
- enum SpecialIndexes {
218
- INDEX_ABSOLUTE = 0xfff1
219
- };
220
-
221
- ELFSection(const char* name, Type type, uintptr_t align)
222
- : name_(name), type_(type), align_(align) { }
223
-
224
- virtual ~ELFSection() { }
225
-
226
- void PopulateHeader(Writer::Slot<Header> header, StringTable* strtab);
227
-
228
- virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
229
- uintptr_t start = w->position();
230
- if (WriteBody(w)) {
231
- uintptr_t end = w->position();
232
- header->offset = start;
233
- header->size = end - start;
234
- }
235
- }
236
-
237
- virtual bool WriteBody(Writer* w) {
238
- return false;
239
- }
240
-
241
- uint16_t index() const { return index_; }
242
- void set_index(uint16_t index) { index_ = index; }
243
-
244
- protected:
245
- virtual void PopulateHeader(Writer::Slot<Header> header) {
246
- header->flags = 0;
247
- header->address = 0;
248
- header->offset = 0;
249
- header->size = 0;
250
- header->link = 0;
251
- header->info = 0;
252
- header->entry_size = 0;
253
- }
254
-
255
-
256
- private:
257
- const char* name_;
258
- Type type_;
259
- uintptr_t align_;
260
- uint16_t index_;
261
- };
262
-
263
-
264
- class FullHeaderELFSection : public ELFSection {
265
- public:
266
- FullHeaderELFSection(const char* name,
267
- Type type,
268
- uintptr_t align,
269
- uintptr_t addr,
270
- uintptr_t offset,
271
- uintptr_t size,
272
- uintptr_t flags)
273
- : ELFSection(name, type, align),
274
- addr_(addr),
275
- offset_(offset),
276
- size_(size),
277
- flags_(flags) { }
278
-
279
- protected:
280
- virtual void PopulateHeader(Writer::Slot<Header> header) {
281
- ELFSection::PopulateHeader(header);
282
- header->address = addr_;
283
- header->offset = offset_;
284
- header->size = size_;
285
- header->flags = flags_;
286
- }
287
-
288
- private:
289
- uintptr_t addr_;
290
- uintptr_t offset_;
291
- uintptr_t size_;
292
- uintptr_t flags_;
293
- };
294
-
295
-
296
- class StringTable : public ELFSection {
297
- public:
298
- explicit StringTable(const char* name)
299
- : ELFSection(name, TYPE_STRTAB, 1), writer_(NULL), offset_(0), size_(0) {
300
- }
301
-
302
- uintptr_t Add(const char* str) {
303
- if (*str == '\0') return 0;
304
-
305
- uintptr_t offset = size_;
306
- WriteString(str);
307
- return offset;
308
- }
309
-
310
- void AttachWriter(Writer* w) {
311
- writer_ = w;
312
- offset_ = writer_->position();
313
-
314
- // First entry in the string table should be an empty string.
315
- WriteString("");
316
- }
317
-
318
- void DetachWriter() {
319
- writer_ = NULL;
320
- }
321
-
322
- virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
323
- ASSERT(writer_ == NULL);
324
- header->offset = offset_;
325
- header->size = size_;
326
- }
327
-
328
- private:
329
- void WriteString(const char* str) {
330
- uintptr_t written = 0;
331
- do {
332
- writer_->Write(*str);
333
- written++;
334
- } while (*str++);
335
- size_ += written;
336
- }
337
-
338
- Writer* writer_;
339
-
340
- uintptr_t offset_;
341
- uintptr_t size_;
342
- };
343
-
344
-
345
- void ELFSection::PopulateHeader(Writer::Slot<ELFSection::Header> header,
346
- StringTable* strtab) {
347
- header->name = strtab->Add(name_);
348
- header->type = type_;
349
- header->alignment = align_;
350
- PopulateHeader(header);
351
- }
352
-
353
-
354
- class ELF BASE_EMBEDDED {
355
- public:
356
- ELF() : sections_(6) {
357
- sections_.Add(new ELFSection("", ELFSection::TYPE_NULL, 0));
358
- sections_.Add(new StringTable(".shstrtab"));
359
- }
360
-
361
- void Write(Writer* w) {
362
- WriteHeader(w);
363
- WriteSectionTable(w);
364
- WriteSections(w);
365
- }
366
-
367
- ELFSection* SectionAt(uint32_t index) {
368
- return sections_[index];
369
- }
370
-
371
- uint32_t AddSection(ELFSection* section) {
372
- sections_.Add(section);
373
- section->set_index(sections_.length() - 1);
374
- return sections_.length() - 1;
375
- }
376
-
377
- private:
378
- struct ELFHeader {
379
- uint8_t ident[16];
380
- uint16_t type;
381
- uint16_t machine;
382
- uint32_t version;
383
- uintptr_t entry;
384
- uintptr_t pht_offset;
385
- uintptr_t sht_offset;
386
- uint32_t flags;
387
- uint16_t header_size;
388
- uint16_t pht_entry_size;
389
- uint16_t pht_entry_num;
390
- uint16_t sht_entry_size;
391
- uint16_t sht_entry_num;
392
- uint16_t sht_strtab_index;
393
- };
394
-
395
-
396
- void WriteHeader(Writer* w) {
397
- ASSERT(w->position() == 0);
398
- Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>();
399
- #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
400
- const uint8_t ident[16] =
401
- { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
402
- #elif defined(V8_TARGET_ARCH_X64)
403
- const uint8_t ident[16] =
404
- { 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0 , 0, 0, 0, 0, 0, 0};
405
- #else
406
- #error Unsupported target architecture.
407
- #endif
408
- memcpy(header->ident, ident, 16);
409
- header->type = 1;
410
- #if defined(V8_TARGET_ARCH_IA32)
411
- header->machine = 3;
412
- #elif defined(V8_TARGET_ARCH_X64)
413
- // Processor identification value for x64 is 62 as defined in
414
- // System V ABI, AMD64 Supplement
415
- // http://www.x86-64.org/documentation/abi.pdf
416
- header->machine = 62;
417
- #elif defined(V8_TARGET_ARCH_ARM)
418
- // Set to EM_ARM, defined as 40, in "ARM ELF File Format" at
419
- // infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf
420
- header->machine = 40;
421
- #else
422
- #error Unsupported target architecture.
423
- #endif
424
- header->version = 1;
425
- header->entry = 0;
426
- header->pht_offset = 0;
427
- header->sht_offset = sizeof(ELFHeader); // Section table follows header.
428
- header->flags = 0;
429
- header->header_size = sizeof(ELFHeader);
430
- header->pht_entry_size = 0;
431
- header->pht_entry_num = 0;
432
- header->sht_entry_size = sizeof(ELFSection::Header);
433
- header->sht_entry_num = sections_.length();
434
- header->sht_strtab_index = 1;
435
- }
436
-
437
- void WriteSectionTable(Writer* w) {
438
- // Section headers table immediately follows file header.
439
- ASSERT(w->position() == sizeof(ELFHeader));
440
-
441
- Writer::Slot<ELFSection::Header> headers =
442
- w->CreateSlotsHere<ELFSection::Header>(sections_.length());
443
-
444
- // String table for section table is the first section.
445
- StringTable* strtab = static_cast<StringTable*>(SectionAt(1));
446
- strtab->AttachWriter(w);
447
- for (int i = 0, length = sections_.length();
448
- i < length;
449
- i++) {
450
- sections_[i]->PopulateHeader(headers.at(i), strtab);
451
- }
452
- strtab->DetachWriter();
453
- }
454
-
455
- int SectionHeaderPosition(uint32_t section_index) {
456
- return sizeof(ELFHeader) + sizeof(ELFSection::Header) * section_index;
457
- }
458
-
459
- void WriteSections(Writer* w) {
460
- Writer::Slot<ELFSection::Header> headers =
461
- w->SlotAt<ELFSection::Header>(sizeof(ELFHeader));
462
-
463
- for (int i = 0, length = sections_.length();
464
- i < length;
465
- i++) {
466
- sections_[i]->WriteBody(headers.at(i), w);
467
- }
468
- }
469
-
470
- ZoneList<ELFSection*> sections_;
471
- };
472
-
473
-
474
- class ELFSymbol BASE_EMBEDDED {
475
- public:
476
- enum Type {
477
- TYPE_NOTYPE = 0,
478
- TYPE_OBJECT = 1,
479
- TYPE_FUNC = 2,
480
- TYPE_SECTION = 3,
481
- TYPE_FILE = 4,
482
- TYPE_LOPROC = 13,
483
- TYPE_HIPROC = 15
484
- };
485
-
486
- enum Binding {
487
- BIND_LOCAL = 0,
488
- BIND_GLOBAL = 1,
489
- BIND_WEAK = 2,
490
- BIND_LOPROC = 13,
491
- BIND_HIPROC = 15
492
- };
493
-
494
- ELFSymbol(const char* name,
495
- uintptr_t value,
496
- uintptr_t size,
497
- Binding binding,
498
- Type type,
499
- uint16_t section)
500
- : name(name),
501
- value(value),
502
- size(size),
503
- info((binding << 4) | type),
504
- other(0),
505
- section(section) {
506
- }
507
-
508
- Binding binding() const {
509
- return static_cast<Binding>(info >> 4);
510
- }
511
- #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
512
- struct SerializedLayout {
513
- SerializedLayout(uint32_t name,
514
- uintptr_t value,
515
- uintptr_t size,
516
- Binding binding,
517
- Type type,
518
- uint16_t section)
519
- : name(name),
520
- value(value),
521
- size(size),
522
- info((binding << 4) | type),
523
- other(0),
524
- section(section) {
525
- }
526
-
527
- uint32_t name;
528
- uintptr_t value;
529
- uintptr_t size;
530
- uint8_t info;
531
- uint8_t other;
532
- uint16_t section;
533
- };
534
- #elif defined(V8_TARGET_ARCH_X64)
535
- struct SerializedLayout {
536
- SerializedLayout(uint32_t name,
537
- uintptr_t value,
538
- uintptr_t size,
539
- Binding binding,
540
- Type type,
541
- uint16_t section)
542
- : name(name),
543
- info((binding << 4) | type),
544
- other(0),
545
- section(section),
546
- value(value),
547
- size(size) {
548
- }
549
-
550
- uint32_t name;
551
- uint8_t info;
552
- uint8_t other;
553
- uint16_t section;
554
- uintptr_t value;
555
- uintptr_t size;
556
- };
557
- #endif
558
-
559
- void Write(Writer::Slot<SerializedLayout> s, StringTable* t) {
560
- // Convert symbol names from strings to indexes in the string table.
561
- s->name = t->Add(name);
562
- s->value = value;
563
- s->size = size;
564
- s->info = info;
565
- s->other = other;
566
- s->section = section;
567
- }
568
-
569
- private:
570
- const char* name;
571
- uintptr_t value;
572
- uintptr_t size;
573
- uint8_t info;
574
- uint8_t other;
575
- uint16_t section;
576
- };
577
-
578
-
579
- class ELFSymbolTable : public ELFSection {
580
- public:
581
- explicit ELFSymbolTable(const char* name)
582
- : ELFSection(name, TYPE_SYMTAB, sizeof(uintptr_t)),
583
- locals_(1),
584
- globals_(1) {
585
- }
586
-
587
- virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
588
- w->Align(header->alignment);
589
- int total_symbols = locals_.length() + globals_.length() + 1;
590
- header->offset = w->position();
591
-
592
- Writer::Slot<ELFSymbol::SerializedLayout> symbols =
593
- w->CreateSlotsHere<ELFSymbol::SerializedLayout>(total_symbols);
594
-
595
- header->size = w->position() - header->offset;
596
-
597
- // String table for this symbol table should follow it in the section table.
598
- StringTable* strtab =
599
- static_cast<StringTable*>(w->elf()->SectionAt(index() + 1));
600
- strtab->AttachWriter(w);
601
- symbols.at(0).set(ELFSymbol::SerializedLayout(0,
602
- 0,
603
- 0,
604
- ELFSymbol::BIND_LOCAL,
605
- ELFSymbol::TYPE_NOTYPE,
606
- 0));
607
- WriteSymbolsList(&locals_, symbols.at(1), strtab);
608
- WriteSymbolsList(&globals_, symbols.at(locals_.length() + 1), strtab);
609
- strtab->DetachWriter();
610
- }
611
-
612
- void Add(const ELFSymbol& symbol) {
613
- if (symbol.binding() == ELFSymbol::BIND_LOCAL) {
614
- locals_.Add(symbol);
615
- } else {
616
- globals_.Add(symbol);
617
- }
618
- }
619
-
620
- protected:
621
- virtual void PopulateHeader(Writer::Slot<Header> header) {
622
- ELFSection::PopulateHeader(header);
623
- // We are assuming that string table will follow symbol table.
624
- header->link = index() + 1;
625
- header->info = locals_.length() + 1;
626
- header->entry_size = sizeof(ELFSymbol::SerializedLayout);
627
- }
628
-
629
- private:
630
- void WriteSymbolsList(const ZoneList<ELFSymbol>* src,
631
- Writer::Slot<ELFSymbol::SerializedLayout> dst,
632
- StringTable* strtab) {
633
- for (int i = 0, len = src->length();
634
- i < len;
635
- i++) {
636
- src->at(i).Write(dst.at(i), strtab);
637
- }
638
- }
639
-
640
- ZoneList<ELFSymbol> locals_;
641
- ZoneList<ELFSymbol> globals_;
642
- };
643
-
644
-
645
- class CodeDescription BASE_EMBEDDED {
646
- public:
647
-
648
- #ifdef V8_TARGET_ARCH_X64
649
- enum StackState {
650
- POST_RBP_PUSH,
651
- POST_RBP_SET,
652
- POST_RBP_POP,
653
- STACK_STATE_MAX
654
- };
655
- #endif
656
-
657
- CodeDescription(const char* name,
658
- Code* code,
659
- Handle<Script> script,
660
- GDBJITLineInfo* lineinfo,
661
- GDBJITInterface::CodeTag tag)
662
- : name_(name),
663
- code_(code),
664
- script_(script),
665
- lineinfo_(lineinfo),
666
- tag_(tag) {
667
- }
668
-
669
- const char* name() const {
670
- return name_;
671
- }
672
-
673
- GDBJITLineInfo* lineinfo() const {
674
- return lineinfo_;
675
- }
676
-
677
- GDBJITInterface::CodeTag tag() const {
678
- return tag_;
679
- }
680
-
681
- uintptr_t CodeStart() const {
682
- return reinterpret_cast<uintptr_t>(code_->instruction_start());
683
- }
684
-
685
- uintptr_t CodeEnd() const {
686
- return reinterpret_cast<uintptr_t>(code_->instruction_end());
687
- }
688
-
689
- uintptr_t CodeSize() const {
690
- return CodeEnd() - CodeStart();
691
- }
692
-
693
- bool IsLineInfoAvailable() {
694
- return !script_.is_null() &&
695
- script_->source()->IsString() &&
696
- script_->HasValidSource() &&
697
- script_->name()->IsString() &&
698
- lineinfo_ != NULL;
699
- }
700
-
701
- #ifdef V8_TARGET_ARCH_X64
702
- uintptr_t GetStackStateStartAddress(StackState state) const {
703
- ASSERT(state < STACK_STATE_MAX);
704
- return stack_state_start_addresses_[state];
705
- }
706
-
707
- void SetStackStateStartAddress(StackState state, uintptr_t addr) {
708
- ASSERT(state < STACK_STATE_MAX);
709
- stack_state_start_addresses_[state] = addr;
710
- }
711
- #endif
712
-
713
- SmartPointer<char> GetFilename() {
714
- return String::cast(script_->name())->ToCString();
715
- }
716
-
717
- int GetScriptLineNumber(int pos) {
718
- return GetScriptLineNumberSafe(script_, pos) + 1;
719
- }
720
-
721
-
722
- private:
723
- const char* name_;
724
- Code* code_;
725
- Handle<Script> script_;
726
- GDBJITLineInfo* lineinfo_;
727
- GDBJITInterface::CodeTag tag_;
728
- #ifdef V8_TARGET_ARCH_X64
729
- uintptr_t stack_state_start_addresses_[STACK_STATE_MAX];
730
- #endif
731
- };
732
-
733
-
734
- static void CreateSymbolsTable(CodeDescription* desc,
735
- ELF* elf,
736
- int text_section_index) {
737
- ELFSymbolTable* symtab = new ELFSymbolTable(".symtab");
738
- StringTable* strtab = new StringTable(".strtab");
739
-
740
- // Symbol table should be followed by the linked string table.
741
- elf->AddSection(symtab);
742
- elf->AddSection(strtab);
743
-
744
- symtab->Add(ELFSymbol("V8 Code",
745
- 0,
746
- 0,
747
- ELFSymbol::BIND_LOCAL,
748
- ELFSymbol::TYPE_FILE,
749
- ELFSection::INDEX_ABSOLUTE));
750
-
751
- symtab->Add(ELFSymbol(desc->name(),
752
- 0,
753
- desc->CodeSize(),
754
- ELFSymbol::BIND_GLOBAL,
755
- ELFSymbol::TYPE_FUNC,
756
- text_section_index));
757
- }
758
-
759
-
760
- class DebugInfoSection : public ELFSection {
761
- public:
762
- explicit DebugInfoSection(CodeDescription* desc)
763
- : ELFSection(".debug_info", TYPE_PROGBITS, 1), desc_(desc) { }
764
-
765
- bool WriteBody(Writer* w) {
766
- Writer::Slot<uint32_t> size = w->CreateSlotHere<uint32_t>();
767
- uintptr_t start = w->position();
768
- w->Write<uint16_t>(2); // DWARF version.
769
- w->Write<uint32_t>(0); // Abbreviation table offset.
770
- w->Write<uint8_t>(sizeof(intptr_t));
771
-
772
- w->WriteULEB128(1); // Abbreviation code.
773
- w->WriteString(*desc_->GetFilename());
774
- w->Write<intptr_t>(desc_->CodeStart());
775
- w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize());
776
- w->Write<uint32_t>(0);
777
- size.set(static_cast<uint32_t>(w->position() - start));
778
- return true;
779
- }
780
-
781
- private:
782
- CodeDescription* desc_;
783
- };
784
-
785
-
786
- class DebugAbbrevSection : public ELFSection {
787
- public:
788
- DebugAbbrevSection() : ELFSection(".debug_abbrev", TYPE_PROGBITS, 1) { }
789
-
790
- // DWARF2 standard, figure 14.
791
- enum DWARF2Tags {
792
- DW_TAG_COMPILE_UNIT = 0x11
793
- };
794
-
795
- // DWARF2 standard, figure 16.
796
- enum DWARF2ChildrenDetermination {
797
- DW_CHILDREN_NO = 0,
798
- DW_CHILDREN_YES = 1
799
- };
800
-
801
- // DWARF standard, figure 17.
802
- enum DWARF2Attribute {
803
- DW_AT_NAME = 0x3,
804
- DW_AT_STMT_LIST = 0x10,
805
- DW_AT_LOW_PC = 0x11,
806
- DW_AT_HIGH_PC = 0x12
807
- };
808
-
809
- // DWARF2 standard, figure 19.
810
- enum DWARF2AttributeForm {
811
- DW_FORM_ADDR = 0x1,
812
- DW_FORM_STRING = 0x8,
813
- DW_FORM_DATA4 = 0x6
814
- };
815
-
816
- bool WriteBody(Writer* w) {
817
- w->WriteULEB128(1);
818
- w->WriteULEB128(DW_TAG_COMPILE_UNIT);
819
- w->Write<uint8_t>(DW_CHILDREN_NO);
820
- w->WriteULEB128(DW_AT_NAME);
821
- w->WriteULEB128(DW_FORM_STRING);
822
- w->WriteULEB128(DW_AT_LOW_PC);
823
- w->WriteULEB128(DW_FORM_ADDR);
824
- w->WriteULEB128(DW_AT_HIGH_PC);
825
- w->WriteULEB128(DW_FORM_ADDR);
826
- w->WriteULEB128(DW_AT_STMT_LIST);
827
- w->WriteULEB128(DW_FORM_DATA4);
828
- w->WriteULEB128(0);
829
- w->WriteULEB128(0);
830
- w->WriteULEB128(0);
831
- return true;
832
- }
833
- };
834
-
835
-
836
- class DebugLineSection : public ELFSection {
837
- public:
838
- explicit DebugLineSection(CodeDescription* desc)
839
- : ELFSection(".debug_line", TYPE_PROGBITS, 1),
840
- desc_(desc) { }
841
-
842
- // DWARF2 standard, figure 34.
843
- enum DWARF2Opcodes {
844
- DW_LNS_COPY = 1,
845
- DW_LNS_ADVANCE_PC = 2,
846
- DW_LNS_ADVANCE_LINE = 3,
847
- DW_LNS_SET_FILE = 4,
848
- DW_LNS_SET_COLUMN = 5,
849
- DW_LNS_NEGATE_STMT = 6
850
- };
851
-
852
- // DWARF2 standard, figure 35.
853
- enum DWARF2ExtendedOpcode {
854
- DW_LNE_END_SEQUENCE = 1,
855
- DW_LNE_SET_ADDRESS = 2,
856
- DW_LNE_DEFINE_FILE = 3
857
- };
858
-
859
- bool WriteBody(Writer* w) {
860
- // Write prologue.
861
- Writer::Slot<uint32_t> total_length = w->CreateSlotHere<uint32_t>();
862
- uintptr_t start = w->position();
863
-
864
- // Used for special opcodes
865
- const int8_t line_base = 1;
866
- const uint8_t line_range = 7;
867
- const int8_t max_line_incr = (line_base + line_range - 1);
868
- const uint8_t opcode_base = DW_LNS_NEGATE_STMT + 1;
869
-
870
- w->Write<uint16_t>(2); // Field version.
871
- Writer::Slot<uint32_t> prologue_length = w->CreateSlotHere<uint32_t>();
872
- uintptr_t prologue_start = w->position();
873
- w->Write<uint8_t>(1); // Field minimum_instruction_length.
874
- w->Write<uint8_t>(1); // Field default_is_stmt.
875
- w->Write<int8_t>(line_base); // Field line_base.
876
- w->Write<uint8_t>(line_range); // Field line_range.
877
- w->Write<uint8_t>(opcode_base); // Field opcode_base.
878
- w->Write<uint8_t>(0); // DW_LNS_COPY operands count.
879
- w->Write<uint8_t>(1); // DW_LNS_ADVANCE_PC operands count.
880
- w->Write<uint8_t>(1); // DW_LNS_ADVANCE_LINE operands count.
881
- w->Write<uint8_t>(1); // DW_LNS_SET_FILE operands count.
882
- w->Write<uint8_t>(1); // DW_LNS_SET_COLUMN operands count.
883
- w->Write<uint8_t>(0); // DW_LNS_NEGATE_STMT operands count.
884
- w->Write<uint8_t>(0); // Empty include_directories sequence.
885
- w->WriteString(*desc_->GetFilename()); // File name.
886
- w->WriteULEB128(0); // Current directory.
887
- w->WriteULEB128(0); // Unknown modification time.
888
- w->WriteULEB128(0); // Unknown file size.
889
- w->Write<uint8_t>(0);
890
- prologue_length.set(static_cast<uint32_t>(w->position() - prologue_start));
891
-
892
- WriteExtendedOpcode(w, DW_LNE_SET_ADDRESS, sizeof(intptr_t));
893
- w->Write<intptr_t>(desc_->CodeStart());
894
- w->Write<uint8_t>(DW_LNS_COPY);
895
-
896
- intptr_t pc = 0;
897
- intptr_t line = 1;
898
- bool is_statement = true;
899
-
900
- List<GDBJITLineInfo::PCInfo>* pc_info = desc_->lineinfo()->pc_info();
901
- pc_info->Sort(&ComparePCInfo);
902
-
903
- int pc_info_length = pc_info->length();
904
- for (int i = 0; i < pc_info_length; i++) {
905
- GDBJITLineInfo::PCInfo* info = &pc_info->at(i);
906
- ASSERT(info->pc_ >= pc);
907
-
908
- // Reduce bloating in the debug line table by removing duplicate line
909
- // entries (per DWARF2 standard).
910
- intptr_t new_line = desc_->GetScriptLineNumber(info->pos_);
911
- if (new_line == line) {
912
- continue;
913
- }
914
-
915
- // Mark statement boundaries. For a better debugging experience, mark
916
- // the last pc address in the function as a statement (e.g. "}"), so that
917
- // a user can see the result of the last line executed in the function,
918
- // should control reach the end.
919
- if ((i+1) == pc_info_length) {
920
- if (!is_statement) {
921
- w->Write<uint8_t>(DW_LNS_NEGATE_STMT);
922
- }
923
- } else if (is_statement != info->is_statement_) {
924
- w->Write<uint8_t>(DW_LNS_NEGATE_STMT);
925
- is_statement = !is_statement;
926
- }
927
-
928
- // Generate special opcodes, if possible. This results in more compact
929
- // debug line tables. See the DWARF 2.0 standard to learn more about
930
- // special opcodes.
931
- uintptr_t pc_diff = info->pc_ - pc;
932
- intptr_t line_diff = new_line - line;
933
-
934
- // Compute special opcode (see DWARF 2.0 standard)
935
- intptr_t special_opcode = (line_diff - line_base) +
936
- (line_range * pc_diff) + opcode_base;
937
-
938
- // If special_opcode is less than or equal to 255, it can be used as a
939
- // special opcode. If line_diff is larger than the max line increment
940
- // allowed for a special opcode, or if line_diff is less than the minimum
941
- // line that can be added to the line register (i.e. line_base), then
942
- // special_opcode can't be used.
943
- if ((special_opcode >= opcode_base) && (special_opcode <= 255) &&
944
- (line_diff <= max_line_incr) && (line_diff >= line_base)) {
945
- w->Write<uint8_t>(special_opcode);
946
- } else {
947
- w->Write<uint8_t>(DW_LNS_ADVANCE_PC);
948
- w->WriteSLEB128(pc_diff);
949
- w->Write<uint8_t>(DW_LNS_ADVANCE_LINE);
950
- w->WriteSLEB128(line_diff);
951
- w->Write<uint8_t>(DW_LNS_COPY);
952
- }
953
-
954
- // Increment the pc and line operands.
955
- pc += pc_diff;
956
- line += line_diff;
957
- }
958
- // Advance the pc to the end of the routine, since the end sequence opcode
959
- // requires this.
960
- w->Write<uint8_t>(DW_LNS_ADVANCE_PC);
961
- w->WriteSLEB128(desc_->CodeSize() - pc);
962
- WriteExtendedOpcode(w, DW_LNE_END_SEQUENCE, 0);
963
- total_length.set(static_cast<uint32_t>(w->position() - start));
964
- return true;
965
- }
966
-
967
- private:
968
- void WriteExtendedOpcode(Writer* w,
969
- DWARF2ExtendedOpcode op,
970
- size_t operands_size) {
971
- w->Write<uint8_t>(0);
972
- w->WriteULEB128(operands_size + 1);
973
- w->Write<uint8_t>(op);
974
- }
975
-
976
- static int ComparePCInfo(const GDBJITLineInfo::PCInfo* a,
977
- const GDBJITLineInfo::PCInfo* b) {
978
- if (a->pc_ == b->pc_) {
979
- if (a->is_statement_ != b->is_statement_) {
980
- return b->is_statement_ ? +1 : -1;
981
- }
982
- return 0;
983
- } else if (a->pc_ > b->pc_) {
984
- return +1;
985
- } else {
986
- return -1;
987
- }
988
- }
989
-
990
- CodeDescription* desc_;
991
- };
992
-
993
-
994
- #ifdef V8_TARGET_ARCH_X64
995
-
996
-
997
- class UnwindInfoSection : public ELFSection {
998
- public:
999
- explicit UnwindInfoSection(CodeDescription *desc);
1000
- virtual bool WriteBody(Writer *w);
1001
-
1002
- int WriteCIE(Writer *w);
1003
- void WriteFDE(Writer *w, int);
1004
-
1005
- void WriteFDEStateOnEntry(Writer *w);
1006
- void WriteFDEStateAfterRBPPush(Writer *w);
1007
- void WriteFDEStateAfterRBPSet(Writer *w);
1008
- void WriteFDEStateAfterRBPPop(Writer *w);
1009
-
1010
- void WriteLength(Writer *w,
1011
- Writer::Slot<uint32_t>* length_slot,
1012
- int initial_position);
1013
-
1014
- private:
1015
- CodeDescription *desc_;
1016
-
1017
- // DWARF3 Specification, Table 7.23
1018
- enum CFIInstructions {
1019
- DW_CFA_ADVANCE_LOC = 0x40,
1020
- DW_CFA_OFFSET = 0x80,
1021
- DW_CFA_RESTORE = 0xC0,
1022
- DW_CFA_NOP = 0x00,
1023
- DW_CFA_SET_LOC = 0x01,
1024
- DW_CFA_ADVANCE_LOC1 = 0x02,
1025
- DW_CFA_ADVANCE_LOC2 = 0x03,
1026
- DW_CFA_ADVANCE_LOC4 = 0x04,
1027
- DW_CFA_OFFSET_EXTENDED = 0x05,
1028
- DW_CFA_RESTORE_EXTENDED = 0x06,
1029
- DW_CFA_UNDEFINED = 0x07,
1030
- DW_CFA_SAME_VALUE = 0x08,
1031
- DW_CFA_REGISTER = 0x09,
1032
- DW_CFA_REMEMBER_STATE = 0x0A,
1033
- DW_CFA_RESTORE_STATE = 0x0B,
1034
- DW_CFA_DEF_CFA = 0x0C,
1035
- DW_CFA_DEF_CFA_REGISTER = 0x0D,
1036
- DW_CFA_DEF_CFA_OFFSET = 0x0E,
1037
-
1038
- DW_CFA_DEF_CFA_EXPRESSION = 0x0F,
1039
- DW_CFA_EXPRESSION = 0x10,
1040
- DW_CFA_OFFSET_EXTENDED_SF = 0x11,
1041
- DW_CFA_DEF_CFA_SF = 0x12,
1042
- DW_CFA_DEF_CFA_OFFSET_SF = 0x13,
1043
- DW_CFA_VAL_OFFSET = 0x14,
1044
- DW_CFA_VAL_OFFSET_SF = 0x15,
1045
- DW_CFA_VAL_EXPRESSION = 0x16
1046
- };
1047
-
1048
- // System V ABI, AMD64 Supplement, Version 0.99.5, Figure 3.36
1049
- enum RegisterMapping {
1050
- // Only the relevant ones have been added to reduce clutter.
1051
- AMD64_RBP = 6,
1052
- AMD64_RSP = 7,
1053
- AMD64_RA = 16
1054
- };
1055
-
1056
- enum CFIConstants {
1057
- CIE_ID = 0,
1058
- CIE_VERSION = 1,
1059
- CODE_ALIGN_FACTOR = 1,
1060
- DATA_ALIGN_FACTOR = 1,
1061
- RETURN_ADDRESS_REGISTER = AMD64_RA
1062
- };
1063
- };
1064
-
1065
-
1066
- void UnwindInfoSection::WriteLength(Writer *w,
1067
- Writer::Slot<uint32_t>* length_slot,
1068
- int initial_position) {
1069
- uint32_t align = (w->position() - initial_position) % kPointerSize;
1070
-
1071
- if (align != 0) {
1072
- for (uint32_t i = 0; i < (kPointerSize - align); i++) {
1073
- w->Write<uint8_t>(DW_CFA_NOP);
1074
- }
1075
- }
1076
-
1077
- ASSERT((w->position() - initial_position) % kPointerSize == 0);
1078
- length_slot->set(w->position() - initial_position);
1079
- }
1080
-
1081
-
1082
- UnwindInfoSection::UnwindInfoSection(CodeDescription *desc)
1083
- : ELFSection(".eh_frame", TYPE_X86_64_UNWIND, 1), desc_(desc)
1084
- { }
1085
-
1086
- int UnwindInfoSection::WriteCIE(Writer *w) {
1087
- Writer::Slot<uint32_t> cie_length_slot = w->CreateSlotHere<uint32_t>();
1088
- uint32_t cie_position = w->position();
1089
-
1090
- // Write out the CIE header. Currently no 'common instructions' are
1091
- // emitted onto the CIE; every FDE has its own set of instructions.
1092
-
1093
- w->Write<uint32_t>(CIE_ID);
1094
- w->Write<uint8_t>(CIE_VERSION);
1095
- w->Write<uint8_t>(0); // Null augmentation string.
1096
- w->WriteSLEB128(CODE_ALIGN_FACTOR);
1097
- w->WriteSLEB128(DATA_ALIGN_FACTOR);
1098
- w->Write<uint8_t>(RETURN_ADDRESS_REGISTER);
1099
-
1100
- WriteLength(w, &cie_length_slot, cie_position);
1101
-
1102
- return cie_position;
1103
- }
1104
-
1105
-
1106
- void UnwindInfoSection::WriteFDE(Writer *w, int cie_position) {
1107
- // The only FDE for this function. The CFA is the current RBP.
1108
- Writer::Slot<uint32_t> fde_length_slot = w->CreateSlotHere<uint32_t>();
1109
- int fde_position = w->position();
1110
- w->Write<int32_t>(fde_position - cie_position + 4);
1111
-
1112
- w->Write<uintptr_t>(desc_->CodeStart());
1113
- w->Write<uintptr_t>(desc_->CodeSize());
1114
-
1115
- WriteFDEStateOnEntry(w);
1116
- WriteFDEStateAfterRBPPush(w);
1117
- WriteFDEStateAfterRBPSet(w);
1118
- WriteFDEStateAfterRBPPop(w);
1119
-
1120
- WriteLength(w, &fde_length_slot, fde_position);
1121
- }
1122
-
1123
-
1124
- void UnwindInfoSection::WriteFDEStateOnEntry(Writer *w) {
1125
- // The first state, just after the control has been transferred to the the
1126
- // function.
1127
-
1128
- // RBP for this function will be the value of RSP after pushing the RBP
1129
- // for the previous function. The previous RBP has not been pushed yet.
1130
- w->Write<uint8_t>(DW_CFA_DEF_CFA_SF);
1131
- w->WriteULEB128(AMD64_RSP);
1132
- w->WriteSLEB128(-kPointerSize);
1133
-
1134
- // The RA is stored at location CFA + kCallerPCOffset. This is an invariant,
1135
- // and hence omitted from the next states.
1136
- w->Write<uint8_t>(DW_CFA_OFFSET_EXTENDED);
1137
- w->WriteULEB128(AMD64_RA);
1138
- w->WriteSLEB128(StandardFrameConstants::kCallerPCOffset);
1139
-
1140
- // The RBP of the previous function is still in RBP.
1141
- w->Write<uint8_t>(DW_CFA_SAME_VALUE);
1142
- w->WriteULEB128(AMD64_RBP);
1143
-
1144
- // Last location described by this entry.
1145
- w->Write<uint8_t>(DW_CFA_SET_LOC);
1146
- w->Write<uint64_t>(
1147
- desc_->GetStackStateStartAddress(CodeDescription::POST_RBP_PUSH));
1148
- }
1149
-
1150
-
1151
- void UnwindInfoSection::WriteFDEStateAfterRBPPush(Writer *w) {
1152
- // The second state, just after RBP has been pushed.
1153
-
1154
- // RBP / CFA for this function is now the current RSP, so just set the
1155
- // offset from the previous rule (from -8) to 0.
1156
- w->Write<uint8_t>(DW_CFA_DEF_CFA_OFFSET);
1157
- w->WriteULEB128(0);
1158
-
1159
- // The previous RBP is stored at CFA + kCallerFPOffset. This is an invariant
1160
- // in this and the next state, and hence omitted in the next state.
1161
- w->Write<uint8_t>(DW_CFA_OFFSET_EXTENDED);
1162
- w->WriteULEB128(AMD64_RBP);
1163
- w->WriteSLEB128(StandardFrameConstants::kCallerFPOffset);
1164
-
1165
- // Last location described by this entry.
1166
- w->Write<uint8_t>(DW_CFA_SET_LOC);
1167
- w->Write<uint64_t>(
1168
- desc_->GetStackStateStartAddress(CodeDescription::POST_RBP_SET));
1169
- }
1170
-
1171
-
1172
- void UnwindInfoSection::WriteFDEStateAfterRBPSet(Writer *w) {
1173
- // The third state, after the RBP has been set.
1174
-
1175
- // The CFA can now directly be set to RBP.
1176
- w->Write<uint8_t>(DW_CFA_DEF_CFA);
1177
- w->WriteULEB128(AMD64_RBP);
1178
- w->WriteULEB128(0);
1179
-
1180
- // Last location described by this entry.
1181
- w->Write<uint8_t>(DW_CFA_SET_LOC);
1182
- w->Write<uint64_t>(
1183
- desc_->GetStackStateStartAddress(CodeDescription::POST_RBP_POP));
1184
- }
1185
-
1186
-
1187
- void UnwindInfoSection::WriteFDEStateAfterRBPPop(Writer *w) {
1188
- // The fourth (final) state. The RBP has been popped (just before issuing a
1189
- // return).
1190
-
1191
- // The CFA can is now calculated in the same way as in the first state.
1192
- w->Write<uint8_t>(DW_CFA_DEF_CFA_SF);
1193
- w->WriteULEB128(AMD64_RSP);
1194
- w->WriteSLEB128(-kPointerSize);
1195
-
1196
- // The RBP
1197
- w->Write<uint8_t>(DW_CFA_OFFSET_EXTENDED);
1198
- w->WriteULEB128(AMD64_RBP);
1199
- w->WriteSLEB128(StandardFrameConstants::kCallerFPOffset);
1200
-
1201
- // Last location described by this entry.
1202
- w->Write<uint8_t>(DW_CFA_SET_LOC);
1203
- w->Write<uint64_t>(desc_->CodeEnd());
1204
- }
1205
-
1206
-
1207
- bool UnwindInfoSection::WriteBody(Writer *w) {
1208
- uint32_t cie_position = WriteCIE(w);
1209
- WriteFDE(w, cie_position);
1210
- return true;
1211
- }
1212
-
1213
-
1214
- #endif // V8_TARGET_ARCH_X64
1215
-
1216
-
1217
- static void CreateDWARFSections(CodeDescription* desc, ELF* elf) {
1218
- if (desc->IsLineInfoAvailable()) {
1219
- elf->AddSection(new DebugInfoSection(desc));
1220
- elf->AddSection(new DebugAbbrevSection);
1221
- elf->AddSection(new DebugLineSection(desc));
1222
- }
1223
- #ifdef V8_TARGET_ARCH_X64
1224
- elf->AddSection(new UnwindInfoSection(desc));
1225
- #endif
1226
- }
1227
-
1228
-
1229
- // -------------------------------------------------------------------
1230
- // Binary GDB JIT Interface as described in
1231
- // http://sourceware.org/gdb/onlinedocs/gdb/Declarations.html
1232
- extern "C" {
1233
- typedef enum {
1234
- JIT_NOACTION = 0,
1235
- JIT_REGISTER_FN,
1236
- JIT_UNREGISTER_FN
1237
- } JITAction;
1238
-
1239
- struct JITCodeEntry {
1240
- JITCodeEntry* next_;
1241
- JITCodeEntry* prev_;
1242
- Address symfile_addr_;
1243
- uint64_t symfile_size_;
1244
- };
1245
-
1246
- struct JITDescriptor {
1247
- uint32_t version_;
1248
- uint32_t action_flag_;
1249
- JITCodeEntry *relevant_entry_;
1250
- JITCodeEntry *first_entry_;
1251
- };
1252
-
1253
- // GDB will place breakpoint into this function.
1254
- // To prevent GCC from inlining or removing it we place noinline attribute
1255
- // and inline assembler statement inside.
1256
- void __attribute__((noinline)) __jit_debug_register_code() {
1257
- __asm__("");
1258
- }
1259
-
1260
- // GDB will inspect contents of this descriptor.
1261
- // Static initialization is necessary to prevent GDB from seeing
1262
- // uninitialized descriptor.
1263
- JITDescriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
1264
- }
1265
-
1266
-
1267
- static JITCodeEntry* CreateCodeEntry(Address symfile_addr,
1268
- uintptr_t symfile_size) {
1269
- JITCodeEntry* entry = static_cast<JITCodeEntry*>(
1270
- malloc(sizeof(JITCodeEntry) + symfile_size));
1271
-
1272
- entry->symfile_addr_ = reinterpret_cast<Address>(entry + 1);
1273
- entry->symfile_size_ = symfile_size;
1274
- memcpy(entry->symfile_addr_, symfile_addr, symfile_size);
1275
-
1276
- entry->prev_ = entry->next_ = NULL;
1277
-
1278
- return entry;
1279
- }
1280
-
1281
-
1282
- static void DestroyCodeEntry(JITCodeEntry* entry) {
1283
- free(entry);
1284
- }
1285
-
1286
-
1287
- static void RegisterCodeEntry(JITCodeEntry* entry) {
1288
- #if defined(DEBUG) && !defined(WIN32)
1289
- static int file_num = 0;
1290
- if (FLAG_gdbjit_dump) {
1291
- static const int kMaxFileNameSize = 64;
1292
- static const char* kElfFilePrefix = "/tmp/elfdump";
1293
- static const char* kObjFileExt = ".o";
1294
- char file_name[64];
1295
-
1296
- OS::SNPrintF(Vector<char>(file_name, kMaxFileNameSize), "%s%d%s",
1297
- kElfFilePrefix, file_num++, kObjFileExt);
1298
- WriteBytes(file_name, entry->symfile_addr_, entry->symfile_size_);
1299
- }
1300
- #endif
1301
-
1302
- entry->next_ = __jit_debug_descriptor.first_entry_;
1303
- if (entry->next_ != NULL) entry->next_->prev_ = entry;
1304
- __jit_debug_descriptor.first_entry_ =
1305
- __jit_debug_descriptor.relevant_entry_ = entry;
1306
-
1307
- __jit_debug_descriptor.action_flag_ = JIT_REGISTER_FN;
1308
- __jit_debug_register_code();
1309
- }
1310
-
1311
-
1312
- static void UnregisterCodeEntry(JITCodeEntry* entry) {
1313
- if (entry->prev_ != NULL) {
1314
- entry->prev_->next_ = entry->next_;
1315
- } else {
1316
- __jit_debug_descriptor.first_entry_ = entry->next_;
1317
- }
1318
-
1319
- if (entry->next_ != NULL) {
1320
- entry->next_->prev_ = entry->prev_;
1321
- }
1322
-
1323
- __jit_debug_descriptor.relevant_entry_ = entry;
1324
- __jit_debug_descriptor.action_flag_ = JIT_UNREGISTER_FN;
1325
- __jit_debug_register_code();
1326
- }
1327
-
1328
-
1329
- static JITCodeEntry* CreateELFObject(CodeDescription* desc) {
1330
- ZoneScope zone_scope(DELETE_ON_EXIT);
1331
-
1332
- ELF elf;
1333
- Writer w(&elf);
1334
-
1335
- int text_section_index = elf.AddSection(
1336
- new FullHeaderELFSection(".text",
1337
- ELFSection::TYPE_NOBITS,
1338
- kCodeAlignment,
1339
- desc->CodeStart(),
1340
- 0,
1341
- desc->CodeSize(),
1342
- ELFSection::FLAG_ALLOC | ELFSection::FLAG_EXEC));
1343
-
1344
- CreateSymbolsTable(desc, &elf, text_section_index);
1345
-
1346
- CreateDWARFSections(desc, &elf);
1347
-
1348
- elf.Write(&w);
1349
-
1350
- return CreateCodeEntry(w.buffer(), w.position());
1351
- }
1352
-
1353
-
1354
- static bool SameCodeObjects(void* key1, void* key2) {
1355
- return key1 == key2;
1356
- }
1357
-
1358
-
1359
- static HashMap* GetEntries() {
1360
- static HashMap* entries = NULL;
1361
- if (entries == NULL) {
1362
- entries = new HashMap(&SameCodeObjects);
1363
- }
1364
- return entries;
1365
- }
1366
-
1367
-
1368
- static uint32_t HashForCodeObject(Code* code) {
1369
- static const uintptr_t kGoldenRatio = 2654435761u;
1370
- uintptr_t hash = reinterpret_cast<uintptr_t>(code->address());
1371
- return static_cast<uint32_t>((hash >> kCodeAlignmentBits) * kGoldenRatio);
1372
- }
1373
-
1374
-
1375
- static const intptr_t kLineInfoTag = 0x1;
1376
-
1377
-
1378
- static bool IsLineInfoTagged(void* ptr) {
1379
- return 0 != (reinterpret_cast<intptr_t>(ptr) & kLineInfoTag);
1380
- }
1381
-
1382
-
1383
- static void* TagLineInfo(GDBJITLineInfo* ptr) {
1384
- return reinterpret_cast<void*>(
1385
- reinterpret_cast<intptr_t>(ptr) | kLineInfoTag);
1386
- }
1387
-
1388
-
1389
- static GDBJITLineInfo* UntagLineInfo(void* ptr) {
1390
- return reinterpret_cast<GDBJITLineInfo*>(
1391
- reinterpret_cast<intptr_t>(ptr) & ~kLineInfoTag);
1392
- }
1393
-
1394
-
1395
- void GDBJITInterface::AddCode(Handle<String> name,
1396
- Handle<Script> script,
1397
- Handle<Code> code) {
1398
- if (!FLAG_gdbjit) return;
1399
-
1400
- // Force initialization of line_ends array.
1401
- GetScriptLineNumber(script, 0);
1402
-
1403
- if (!name.is_null()) {
1404
- SmartPointer<char> name_cstring = name->ToCString(DISALLOW_NULLS);
1405
- AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script);
1406
- } else {
1407
- AddCode("", *code, GDBJITInterface::FUNCTION, *script);
1408
- }
1409
- }
1410
-
1411
- static void AddUnwindInfo(CodeDescription *desc) {
1412
- #ifdef V8_TARGET_ARCH_X64
1413
- if (desc->tag() == GDBJITInterface::FUNCTION) {
1414
- // To avoid propagating unwinding information through
1415
- // compilation pipeline we use an approximation.
1416
- // For most use cases this should not affect usability.
1417
- static const int kFramePointerPushOffset = 1;
1418
- static const int kFramePointerSetOffset = 4;
1419
- static const int kFramePointerPopOffset = -3;
1420
-
1421
- uintptr_t frame_pointer_push_address =
1422
- desc->CodeStart() + kFramePointerPushOffset;
1423
-
1424
- uintptr_t frame_pointer_set_address =
1425
- desc->CodeStart() + kFramePointerSetOffset;
1426
-
1427
- uintptr_t frame_pointer_pop_address =
1428
- desc->CodeEnd() + kFramePointerPopOffset;
1429
-
1430
- desc->SetStackStateStartAddress(CodeDescription::POST_RBP_PUSH,
1431
- frame_pointer_push_address);
1432
- desc->SetStackStateStartAddress(CodeDescription::POST_RBP_SET,
1433
- frame_pointer_set_address);
1434
- desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP,
1435
- frame_pointer_pop_address);
1436
- } else {
1437
- desc->SetStackStateStartAddress(CodeDescription::POST_RBP_PUSH,
1438
- desc->CodeStart());
1439
- desc->SetStackStateStartAddress(CodeDescription::POST_RBP_SET,
1440
- desc->CodeStart());
1441
- desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP,
1442
- desc->CodeEnd());
1443
- }
1444
- #endif // V8_TARGET_ARCH_X64
1445
- }
1446
-
1447
-
1448
- void GDBJITInterface::AddCode(const char* name,
1449
- Code* code,
1450
- GDBJITInterface::CodeTag tag,
1451
- Script* script) {
1452
- if (!FLAG_gdbjit) return;
1453
- AssertNoAllocation no_gc;
1454
-
1455
- HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
1456
- if (e->value != NULL && !IsLineInfoTagged(e->value)) return;
1457
-
1458
- GDBJITLineInfo* lineinfo = UntagLineInfo(e->value);
1459
- CodeDescription code_desc(name,
1460
- code,
1461
- script != NULL ? Handle<Script>(script)
1462
- : Handle<Script>(),
1463
- lineinfo,
1464
- tag);
1465
-
1466
- if (!FLAG_gdbjit_full && !code_desc.IsLineInfoAvailable()) {
1467
- delete lineinfo;
1468
- GetEntries()->Remove(code, HashForCodeObject(code));
1469
- return;
1470
- }
1471
-
1472
- AddUnwindInfo(&code_desc);
1473
- JITCodeEntry* entry = CreateELFObject(&code_desc);
1474
- ASSERT(!IsLineInfoTagged(entry));
1475
-
1476
- delete lineinfo;
1477
- e->value = entry;
1478
-
1479
- RegisterCodeEntry(entry);
1480
- }
1481
-
1482
-
1483
- void GDBJITInterface::AddCode(GDBJITInterface::CodeTag tag,
1484
- const char* name,
1485
- Code* code) {
1486
- if (!FLAG_gdbjit) return;
1487
-
1488
- EmbeddedVector<char, 256> buffer;
1489
- StringBuilder builder(buffer.start(), buffer.length());
1490
-
1491
- builder.AddString(Tag2String(tag));
1492
- if ((name != NULL) && (*name != '\0')) {
1493
- builder.AddString(": ");
1494
- builder.AddString(name);
1495
- } else {
1496
- builder.AddFormatted(": code object %p", static_cast<void*>(code));
1497
- }
1498
-
1499
- AddCode(builder.Finalize(), code, tag);
1500
- }
1501
-
1502
-
1503
- void GDBJITInterface::AddCode(GDBJITInterface::CodeTag tag,
1504
- String* name,
1505
- Code* code) {
1506
- if (!FLAG_gdbjit) return;
1507
- AddCode(tag, name != NULL ? *name->ToCString(DISALLOW_NULLS) : NULL, code);
1508
- }
1509
-
1510
-
1511
- void GDBJITInterface::AddCode(GDBJITInterface::CodeTag tag, Code* code) {
1512
- if (!FLAG_gdbjit) return;
1513
-
1514
- AddCode(tag, "", code);
1515
- }
1516
-
1517
-
1518
- void GDBJITInterface::RemoveCode(Code* code) {
1519
- if (!FLAG_gdbjit) return;
1520
-
1521
- HashMap::Entry* e = GetEntries()->Lookup(code,
1522
- HashForCodeObject(code),
1523
- false);
1524
- if (e == NULL) return;
1525
-
1526
- if (IsLineInfoTagged(e->value)) {
1527
- delete UntagLineInfo(e->value);
1528
- } else {
1529
- JITCodeEntry* entry = static_cast<JITCodeEntry*>(e->value);
1530
- UnregisterCodeEntry(entry);
1531
- DestroyCodeEntry(entry);
1532
- }
1533
- e->value = NULL;
1534
- GetEntries()->Remove(code, HashForCodeObject(code));
1535
- }
1536
-
1537
-
1538
- void GDBJITInterface::RegisterDetailedLineInfo(Code* code,
1539
- GDBJITLineInfo* line_info) {
1540
- ASSERT(!IsLineInfoTagged(line_info));
1541
- HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
1542
- ASSERT(e->value == NULL);
1543
- e->value = TagLineInfo(line_info);
1544
- }
1545
-
1546
-
1547
- } } // namespace v8::internal
1548
- #endif