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,174 +0,0 @@
1
- // Copyright 2008 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
- #if defined(V8_TARGET_ARCH_ARM)
31
-
32
- #include "codegen-inl.h"
33
- #include "jump-target-inl.h"
34
- #include "register-allocator-inl.h"
35
- #include "virtual-frame-inl.h"
36
-
37
- namespace v8 {
38
- namespace internal {
39
-
40
- // -------------------------------------------------------------------------
41
- // JumpTarget implementation.
42
-
43
- #define __ ACCESS_MASM(cgen()->masm())
44
-
45
- void JumpTarget::DoJump() {
46
- ASSERT(cgen()->has_valid_frame());
47
- // Live non-frame registers are not allowed at unconditional jumps
48
- // because we have no way of invalidating the corresponding results
49
- // which are still live in the C++ code.
50
- ASSERT(cgen()->HasValidEntryRegisters());
51
-
52
- if (entry_frame_set_) {
53
- if (entry_label_.is_bound()) {
54
- // If we already bound and generated code at the destination then it
55
- // is too late to ask for less optimistic type assumptions.
56
- ASSERT(entry_frame_.IsCompatibleWith(cgen()->frame()));
57
- }
58
- // There already a frame expectation at the target.
59
- cgen()->frame()->MergeTo(&entry_frame_);
60
- cgen()->DeleteFrame();
61
- } else {
62
- // Clone the current frame to use as the expected one at the target.
63
- set_entry_frame(cgen()->frame());
64
- // Zap the fall-through frame since the jump was unconditional.
65
- RegisterFile empty;
66
- cgen()->SetFrame(NULL, &empty);
67
- }
68
- if (entry_label_.is_bound()) {
69
- // You can't jump backwards to an already bound label unless you admitted
70
- // up front that this was a bidirectional jump target. Bidirectional jump
71
- // targets will zap their type info when bound in case some later virtual
72
- // frame with less precise type info branches to them.
73
- ASSERT(direction_ != FORWARD_ONLY);
74
- }
75
- __ jmp(&entry_label_);
76
- }
77
-
78
-
79
- void JumpTarget::DoBranch(Condition cond, Hint ignored) {
80
- ASSERT(cgen()->has_valid_frame());
81
-
82
- if (entry_frame_set_) {
83
- if (entry_label_.is_bound()) {
84
- // If we already bound and generated code at the destination then it
85
- // is too late to ask for less optimistic type assumptions.
86
- ASSERT(entry_frame_.IsCompatibleWith(cgen()->frame()));
87
- }
88
- // We have an expected frame to merge to on the backward edge.
89
- cgen()->frame()->MergeTo(&entry_frame_, cond);
90
- } else {
91
- // Clone the current frame to use as the expected one at the target.
92
- set_entry_frame(cgen()->frame());
93
- }
94
- if (entry_label_.is_bound()) {
95
- // You can't branch backwards to an already bound label unless you admitted
96
- // up front that this was a bidirectional jump target. Bidirectional jump
97
- // targets will zap their type info when bound in case some later virtual
98
- // frame with less precise type info branches to them.
99
- ASSERT(direction_ != FORWARD_ONLY);
100
- }
101
- __ b(cond, &entry_label_);
102
- if (cond == al) {
103
- cgen()->DeleteFrame();
104
- }
105
- }
106
-
107
-
108
- void JumpTarget::Call() {
109
- // Call is used to push the address of the catch block on the stack as
110
- // a return address when compiling try/catch and try/finally. We
111
- // fully spill the frame before making the call. The expected frame
112
- // at the label (which should be the only one) is the spilled current
113
- // frame plus an in-memory return address. The "fall-through" frame
114
- // at the return site is the spilled current frame.
115
- ASSERT(cgen()->has_valid_frame());
116
- // There are no non-frame references across the call.
117
- ASSERT(cgen()->HasValidEntryRegisters());
118
- ASSERT(!is_linked());
119
-
120
- // Calls are always 'forward' so we use a copy of the current frame (plus
121
- // one for a return address) as the expected frame.
122
- ASSERT(!entry_frame_set_);
123
- VirtualFrame target_frame = *cgen()->frame();
124
- target_frame.Adjust(1);
125
- set_entry_frame(&target_frame);
126
-
127
- __ bl(&entry_label_);
128
- }
129
-
130
-
131
- void JumpTarget::DoBind() {
132
- ASSERT(!is_bound());
133
-
134
- // Live non-frame registers are not allowed at the start of a basic
135
- // block.
136
- ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters());
137
-
138
- if (cgen()->has_valid_frame()) {
139
- if (direction_ != FORWARD_ONLY) cgen()->frame()->ForgetTypeInfo();
140
- // If there is a current frame we can use it on the fall through.
141
- if (!entry_frame_set_) {
142
- entry_frame_ = *cgen()->frame();
143
- entry_frame_set_ = true;
144
- } else {
145
- cgen()->frame()->MergeTo(&entry_frame_);
146
- // On fall through we may have to merge both ways.
147
- if (direction_ != FORWARD_ONLY) {
148
- // This will not need to adjust the virtual frame entries that are
149
- // register allocated since that was done above and they now match.
150
- // But it does need to adjust the entry_frame_ of this jump target
151
- // to make it potentially less optimistic. Later code can branch back
152
- // to this jump target and we need to assert that that code does not
153
- // have weaker assumptions about types.
154
- entry_frame_.MergeTo(cgen()->frame());
155
- }
156
- }
157
- } else {
158
- // If there is no current frame we must have an entry frame which we can
159
- // copy.
160
- ASSERT(entry_frame_set_);
161
- RegisterFile empty;
162
- cgen()->SetFrame(new VirtualFrame(&entry_frame_), &empty);
163
- }
164
-
165
- __ bind(&entry_label_);
166
- }
167
-
168
-
169
- #undef __
170
-
171
-
172
- } } // namespace v8::internal
173
-
174
- #endif // V8_TARGET_ARCH_ARM
@@ -1,2120 +0,0 @@
1
- // Copyright 2011 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 "lithium-allocator-inl.h"
31
- #include "arm/lithium-arm.h"
32
- #include "arm/lithium-codegen-arm.h"
33
-
34
- namespace v8 {
35
- namespace internal {
36
-
37
- #define DEFINE_COMPILE(type) \
38
- void L##type::CompileToNative(LCodeGen* generator) { \
39
- generator->Do##type(this); \
40
- }
41
- LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
42
- #undef DEFINE_COMPILE
43
-
44
- LOsrEntry::LOsrEntry() {
45
- for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) {
46
- register_spills_[i] = NULL;
47
- }
48
- for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) {
49
- double_register_spills_[i] = NULL;
50
- }
51
- }
52
-
53
-
54
- void LOsrEntry::MarkSpilledRegister(int allocation_index,
55
- LOperand* spill_operand) {
56
- ASSERT(spill_operand->IsStackSlot());
57
- ASSERT(register_spills_[allocation_index] == NULL);
58
- register_spills_[allocation_index] = spill_operand;
59
- }
60
-
61
-
62
- #ifdef DEBUG
63
- void LInstruction::VerifyCall() {
64
- // Call instructions can use only fixed registers as
65
- // temporaries and outputs because all registers
66
- // are blocked by the calling convention.
67
- // Inputs must use a fixed register.
68
- ASSERT(Output() == NULL ||
69
- LUnallocated::cast(Output())->HasFixedPolicy() ||
70
- !LUnallocated::cast(Output())->HasRegisterPolicy());
71
- for (UseIterator it(this); it.HasNext(); it.Advance()) {
72
- LOperand* operand = it.Next();
73
- ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
74
- !LUnallocated::cast(operand)->HasRegisterPolicy());
75
- }
76
- for (TempIterator it(this); it.HasNext(); it.Advance()) {
77
- LOperand* operand = it.Next();
78
- ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
79
- !LUnallocated::cast(operand)->HasRegisterPolicy());
80
- }
81
- }
82
- #endif
83
-
84
-
85
- void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index,
86
- LOperand* spill_operand) {
87
- ASSERT(spill_operand->IsDoubleStackSlot());
88
- ASSERT(double_register_spills_[allocation_index] == NULL);
89
- double_register_spills_[allocation_index] = spill_operand;
90
- }
91
-
92
-
93
- void LInstruction::PrintTo(StringStream* stream) {
94
- stream->Add("%s ", this->Mnemonic());
95
-
96
- PrintOutputOperandTo(stream);
97
-
98
- PrintDataTo(stream);
99
-
100
- if (HasEnvironment()) {
101
- stream->Add(" ");
102
- environment()->PrintTo(stream);
103
- }
104
-
105
- if (HasPointerMap()) {
106
- stream->Add(" ");
107
- pointer_map()->PrintTo(stream);
108
- }
109
- }
110
-
111
-
112
- template<int R, int I, int T>
113
- void LTemplateInstruction<R, I, T>::PrintDataTo(StringStream* stream) {
114
- stream->Add("= ");
115
- inputs_.PrintOperandsTo(stream);
116
- }
117
-
118
-
119
- template<int R, int I, int T>
120
- void LTemplateInstruction<R, I, T>::PrintOutputOperandTo(StringStream* stream) {
121
- results_.PrintOperandsTo(stream);
122
- }
123
-
124
-
125
- template<typename T, int N>
126
- void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
127
- for (int i = 0; i < N; i++) {
128
- if (i > 0) stream->Add(" ");
129
- elems_[i]->PrintTo(stream);
130
- }
131
- }
132
-
133
-
134
- void LLabel::PrintDataTo(StringStream* stream) {
135
- LGap::PrintDataTo(stream);
136
- LLabel* rep = replacement();
137
- if (rep != NULL) {
138
- stream->Add(" Dead block replaced with B%d", rep->block_id());
139
- }
140
- }
141
-
142
-
143
- bool LGap::IsRedundant() const {
144
- for (int i = 0; i < 4; i++) {
145
- if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
146
- return false;
147
- }
148
- }
149
-
150
- return true;
151
- }
152
-
153
-
154
- void LGap::PrintDataTo(StringStream* stream) const {
155
- for (int i = 0; i < 4; i++) {
156
- stream->Add("(");
157
- if (parallel_moves_[i] != NULL) {
158
- parallel_moves_[i]->PrintDataTo(stream);
159
- }
160
- stream->Add(") ");
161
- }
162
- }
163
-
164
-
165
- const char* LArithmeticD::Mnemonic() const {
166
- switch (op()) {
167
- case Token::ADD: return "add-d";
168
- case Token::SUB: return "sub-d";
169
- case Token::MUL: return "mul-d";
170
- case Token::DIV: return "div-d";
171
- case Token::MOD: return "mod-d";
172
- default:
173
- UNREACHABLE();
174
- return NULL;
175
- }
176
- }
177
-
178
-
179
- const char* LArithmeticT::Mnemonic() const {
180
- switch (op()) {
181
- case Token::ADD: return "add-t";
182
- case Token::SUB: return "sub-t";
183
- case Token::MUL: return "mul-t";
184
- case Token::MOD: return "mod-t";
185
- case Token::DIV: return "div-t";
186
- case Token::BIT_AND: return "bit-and-t";
187
- case Token::BIT_OR: return "bit-or-t";
188
- case Token::BIT_XOR: return "bit-xor-t";
189
- case Token::SHL: return "shl-t";
190
- case Token::SAR: return "sar-t";
191
- case Token::SHR: return "shr-t";
192
- default:
193
- UNREACHABLE();
194
- return NULL;
195
- }
196
- }
197
-
198
-
199
- void LGoto::PrintDataTo(StringStream* stream) {
200
- stream->Add("B%d", block_id());
201
- }
202
-
203
-
204
- void LBranch::PrintDataTo(StringStream* stream) {
205
- stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
206
- InputAt(0)->PrintTo(stream);
207
- }
208
-
209
-
210
- void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
211
- stream->Add("if ");
212
- InputAt(0)->PrintTo(stream);
213
- stream->Add(" %s ", Token::String(op()));
214
- InputAt(1)->PrintTo(stream);
215
- stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
216
- }
217
-
218
-
219
- void LIsNullAndBranch::PrintDataTo(StringStream* stream) {
220
- stream->Add("if ");
221
- InputAt(0)->PrintTo(stream);
222
- stream->Add(is_strict() ? " === null" : " == null");
223
- stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
224
- }
225
-
226
-
227
- void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
228
- stream->Add("if is_object(");
229
- InputAt(0)->PrintTo(stream);
230
- stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
231
- }
232
-
233
-
234
- void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
235
- stream->Add("if is_smi(");
236
- InputAt(0)->PrintTo(stream);
237
- stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
238
- }
239
-
240
-
241
- void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
242
- stream->Add("if has_instance_type(");
243
- InputAt(0)->PrintTo(stream);
244
- stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
245
- }
246
-
247
-
248
- void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
249
- stream->Add("if has_cached_array_index(");
250
- InputAt(0)->PrintTo(stream);
251
- stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
252
- }
253
-
254
-
255
- void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
256
- stream->Add("if class_of_test(");
257
- InputAt(0)->PrintTo(stream);
258
- stream->Add(", \"%o\") then B%d else B%d",
259
- *hydrogen()->class_name(),
260
- true_block_id(),
261
- false_block_id());
262
- }
263
-
264
-
265
- void LTypeofIs::PrintDataTo(StringStream* stream) {
266
- InputAt(0)->PrintTo(stream);
267
- stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
268
- }
269
-
270
-
271
- void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
272
- stream->Add("if typeof ");
273
- InputAt(0)->PrintTo(stream);
274
- stream->Add(" == \"%s\" then B%d else B%d",
275
- *hydrogen()->type_literal()->ToCString(),
276
- true_block_id(), false_block_id());
277
- }
278
-
279
-
280
- void LCallConstantFunction::PrintDataTo(StringStream* stream) {
281
- stream->Add("#%d / ", arity());
282
- }
283
-
284
-
285
- void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
286
- stream->Add("/%s ", hydrogen()->OpName());
287
- InputAt(0)->PrintTo(stream);
288
- }
289
-
290
-
291
- void LLoadContextSlot::PrintDataTo(StringStream* stream) {
292
- InputAt(0)->PrintTo(stream);
293
- stream->Add("[%d]", slot_index());
294
- }
295
-
296
-
297
- void LStoreContextSlot::PrintDataTo(StringStream* stream) {
298
- InputAt(0)->PrintTo(stream);
299
- stream->Add("[%d] <- ", slot_index());
300
- InputAt(1)->PrintTo(stream);
301
- }
302
-
303
-
304
- void LCallKeyed::PrintDataTo(StringStream* stream) {
305
- stream->Add("[r2] #%d / ", arity());
306
- }
307
-
308
-
309
- void LCallNamed::PrintDataTo(StringStream* stream) {
310
- SmartPointer<char> name_string = name()->ToCString();
311
- stream->Add("%s #%d / ", *name_string, arity());
312
- }
313
-
314
-
315
- void LCallGlobal::PrintDataTo(StringStream* stream) {
316
- SmartPointer<char> name_string = name()->ToCString();
317
- stream->Add("%s #%d / ", *name_string, arity());
318
- }
319
-
320
-
321
- void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
322
- stream->Add("#%d / ", arity());
323
- }
324
-
325
-
326
- void LCallNew::PrintDataTo(StringStream* stream) {
327
- stream->Add("= ");
328
- InputAt(0)->PrintTo(stream);
329
- stream->Add(" #%d / ", arity());
330
- }
331
-
332
-
333
- void LClassOfTest::PrintDataTo(StringStream* stream) {
334
- stream->Add("= class_of_test(");
335
- InputAt(0)->PrintTo(stream);
336
- stream->Add(", \"%o\")", *hydrogen()->class_name());
337
- }
338
-
339
-
340
- void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
341
- arguments()->PrintTo(stream);
342
-
343
- stream->Add(" length ");
344
- length()->PrintTo(stream);
345
-
346
- stream->Add(" index ");
347
- index()->PrintTo(stream);
348
- }
349
-
350
-
351
- void LStoreNamedField::PrintDataTo(StringStream* stream) {
352
- object()->PrintTo(stream);
353
- stream->Add(".");
354
- stream->Add(*String::cast(*name())->ToCString());
355
- stream->Add(" <- ");
356
- value()->PrintTo(stream);
357
- }
358
-
359
-
360
- void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
361
- object()->PrintTo(stream);
362
- stream->Add(".");
363
- stream->Add(*String::cast(*name())->ToCString());
364
- stream->Add(" <- ");
365
- value()->PrintTo(stream);
366
- }
367
-
368
-
369
- void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
370
- object()->PrintTo(stream);
371
- stream->Add("[");
372
- key()->PrintTo(stream);
373
- stream->Add("] <- ");
374
- value()->PrintTo(stream);
375
- }
376
-
377
-
378
- void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
379
- object()->PrintTo(stream);
380
- stream->Add("[");
381
- key()->PrintTo(stream);
382
- stream->Add("] <- ");
383
- value()->PrintTo(stream);
384
- }
385
-
386
-
387
- LChunk::LChunk(CompilationInfo* info, HGraph* graph)
388
- : spill_slot_count_(0),
389
- info_(info),
390
- graph_(graph),
391
- instructions_(32),
392
- pointer_maps_(8),
393
- inlined_closures_(1) {
394
- }
395
-
396
-
397
- int LChunk::GetNextSpillIndex(bool is_double) {
398
- // Skip a slot if for a double-width slot.
399
- if (is_double) spill_slot_count_++;
400
- return spill_slot_count_++;
401
- }
402
-
403
-
404
- LOperand* LChunk::GetNextSpillSlot(bool is_double) {
405
- int index = GetNextSpillIndex(is_double);
406
- if (is_double) {
407
- return LDoubleStackSlot::Create(index);
408
- } else {
409
- return LStackSlot::Create(index);
410
- }
411
- }
412
-
413
-
414
- void LChunk::MarkEmptyBlocks() {
415
- HPhase phase("Mark empty blocks", this);
416
- for (int i = 0; i < graph()->blocks()->length(); ++i) {
417
- HBasicBlock* block = graph()->blocks()->at(i);
418
- int first = block->first_instruction_index();
419
- int last = block->last_instruction_index();
420
- LInstruction* first_instr = instructions()->at(first);
421
- LInstruction* last_instr = instructions()->at(last);
422
-
423
- LLabel* label = LLabel::cast(first_instr);
424
- if (last_instr->IsGoto()) {
425
- LGoto* goto_instr = LGoto::cast(last_instr);
426
- if (!goto_instr->include_stack_check() &&
427
- label->IsRedundant() &&
428
- !label->is_loop_header()) {
429
- bool can_eliminate = true;
430
- for (int i = first + 1; i < last && can_eliminate; ++i) {
431
- LInstruction* cur = instructions()->at(i);
432
- if (cur->IsGap()) {
433
- LGap* gap = LGap::cast(cur);
434
- if (!gap->IsRedundant()) {
435
- can_eliminate = false;
436
- }
437
- } else {
438
- can_eliminate = false;
439
- }
440
- }
441
-
442
- if (can_eliminate) {
443
- label->set_replacement(GetLabel(goto_instr->block_id()));
444
- }
445
- }
446
- }
447
- }
448
- }
449
-
450
-
451
- void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
452
- LGap* gap = new LGap(block);
453
- int index = -1;
454
- if (instr->IsControl()) {
455
- instructions_.Add(gap);
456
- index = instructions_.length();
457
- instructions_.Add(instr);
458
- } else {
459
- index = instructions_.length();
460
- instructions_.Add(instr);
461
- instructions_.Add(gap);
462
- }
463
- if (instr->HasPointerMap()) {
464
- pointer_maps_.Add(instr->pointer_map());
465
- instr->pointer_map()->set_lithium_position(index);
466
- }
467
- }
468
-
469
-
470
- LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
471
- return LConstantOperand::Create(constant->id());
472
- }
473
-
474
-
475
- int LChunk::GetParameterStackSlot(int index) const {
476
- // The receiver is at index 0, the first parameter at index 1, so we
477
- // shift all parameter indexes down by the number of parameters, and
478
- // make sure they end up negative so they are distinguishable from
479
- // spill slots.
480
- int result = index - info()->scope()->num_parameters() - 1;
481
- ASSERT(result < 0);
482
- return result;
483
- }
484
-
485
- // A parameter relative to ebp in the arguments stub.
486
- int LChunk::ParameterAt(int index) {
487
- ASSERT(-1 <= index); // -1 is the receiver.
488
- return (1 + info()->scope()->num_parameters() - index) *
489
- kPointerSize;
490
- }
491
-
492
-
493
- LGap* LChunk::GetGapAt(int index) const {
494
- return LGap::cast(instructions_[index]);
495
- }
496
-
497
-
498
- bool LChunk::IsGapAt(int index) const {
499
- return instructions_[index]->IsGap();
500
- }
501
-
502
-
503
- int LChunk::NearestGapPos(int index) const {
504
- while (!IsGapAt(index)) index--;
505
- return index;
506
- }
507
-
508
-
509
- void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
510
- GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to);
511
- }
512
-
513
-
514
- Handle<Object> LChunk::LookupLiteral(LConstantOperand* operand) const {
515
- return HConstant::cast(graph_->LookupValue(operand->index()))->handle();
516
- }
517
-
518
-
519
- Representation LChunk::LookupLiteralRepresentation(
520
- LConstantOperand* operand) const {
521
- return graph_->LookupValue(operand->index())->representation();
522
- }
523
-
524
-
525
- LChunk* LChunkBuilder::Build() {
526
- ASSERT(is_unused());
527
- chunk_ = new LChunk(info(), graph());
528
- HPhase phase("Building chunk", chunk_);
529
- status_ = BUILDING;
530
- const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
531
- for (int i = 0; i < blocks->length(); i++) {
532
- HBasicBlock* next = NULL;
533
- if (i < blocks->length() - 1) next = blocks->at(i + 1);
534
- DoBasicBlock(blocks->at(i), next);
535
- if (is_aborted()) return NULL;
536
- }
537
- status_ = DONE;
538
- return chunk_;
539
- }
540
-
541
-
542
- void LChunkBuilder::Abort(const char* format, ...) {
543
- if (FLAG_trace_bailout) {
544
- SmartPointer<char> name(info()->shared_info()->DebugName()->ToCString());
545
- PrintF("Aborting LChunk building in @\"%s\": ", *name);
546
- va_list arguments;
547
- va_start(arguments, format);
548
- OS::VPrint(format, arguments);
549
- va_end(arguments);
550
- PrintF("\n");
551
- }
552
- status_ = ABORTED;
553
- }
554
-
555
-
556
- LRegister* LChunkBuilder::ToOperand(Register reg) {
557
- return LRegister::Create(Register::ToAllocationIndex(reg));
558
- }
559
-
560
-
561
- LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
562
- return new LUnallocated(LUnallocated::FIXED_REGISTER,
563
- Register::ToAllocationIndex(reg));
564
- }
565
-
566
-
567
- LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) {
568
- return new LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
569
- DoubleRegister::ToAllocationIndex(reg));
570
- }
571
-
572
-
573
- LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) {
574
- return Use(value, ToUnallocated(fixed_register));
575
- }
576
-
577
-
578
- LOperand* LChunkBuilder::UseFixedDouble(HValue* value, DoubleRegister reg) {
579
- return Use(value, ToUnallocated(reg));
580
- }
581
-
582
-
583
- LOperand* LChunkBuilder::UseRegister(HValue* value) {
584
- return Use(value, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
585
- }
586
-
587
-
588
- LOperand* LChunkBuilder::UseRegisterAtStart(HValue* value) {
589
- return Use(value,
590
- new LUnallocated(LUnallocated::MUST_HAVE_REGISTER,
591
- LUnallocated::USED_AT_START));
592
- }
593
-
594
-
595
- LOperand* LChunkBuilder::UseTempRegister(HValue* value) {
596
- return Use(value, new LUnallocated(LUnallocated::WRITABLE_REGISTER));
597
- }
598
-
599
-
600
- LOperand* LChunkBuilder::Use(HValue* value) {
601
- return Use(value, new LUnallocated(LUnallocated::NONE));
602
- }
603
-
604
-
605
- LOperand* LChunkBuilder::UseAtStart(HValue* value) {
606
- return Use(value, new LUnallocated(LUnallocated::NONE,
607
- LUnallocated::USED_AT_START));
608
- }
609
-
610
-
611
- LOperand* LChunkBuilder::UseOrConstant(HValue* value) {
612
- return value->IsConstant()
613
- ? chunk_->DefineConstantOperand(HConstant::cast(value))
614
- : Use(value);
615
- }
616
-
617
-
618
- LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
619
- return value->IsConstant()
620
- ? chunk_->DefineConstantOperand(HConstant::cast(value))
621
- : UseAtStart(value);
622
- }
623
-
624
-
625
- LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
626
- return value->IsConstant()
627
- ? chunk_->DefineConstantOperand(HConstant::cast(value))
628
- : UseRegister(value);
629
- }
630
-
631
-
632
- LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
633
- return value->IsConstant()
634
- ? chunk_->DefineConstantOperand(HConstant::cast(value))
635
- : UseRegisterAtStart(value);
636
- }
637
-
638
-
639
- LOperand* LChunkBuilder::UseAny(HValue* value) {
640
- return value->IsConstant()
641
- ? chunk_->DefineConstantOperand(HConstant::cast(value))
642
- : Use(value, new LUnallocated(LUnallocated::ANY));
643
- }
644
-
645
-
646
- LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
647
- if (value->EmitAtUses()) {
648
- HInstruction* instr = HInstruction::cast(value);
649
- VisitInstruction(instr);
650
- }
651
- allocator_->RecordUse(value, operand);
652
- return operand;
653
- }
654
-
655
-
656
- template<int I, int T>
657
- LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr,
658
- LUnallocated* result) {
659
- allocator_->RecordDefinition(current_instruction_, result);
660
- instr->set_result(result);
661
- return instr;
662
- }
663
-
664
-
665
- template<int I, int T>
666
- LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr) {
667
- return Define(instr, new LUnallocated(LUnallocated::NONE));
668
- }
669
-
670
-
671
- template<int I, int T>
672
- LInstruction* LChunkBuilder::DefineAsRegister(
673
- LTemplateInstruction<1, I, T>* instr) {
674
- return Define(instr, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
675
- }
676
-
677
-
678
- template<int I, int T>
679
- LInstruction* LChunkBuilder::DefineAsSpilled(
680
- LTemplateInstruction<1, I, T>* instr, int index) {
681
- return Define(instr, new LUnallocated(LUnallocated::FIXED_SLOT, index));
682
- }
683
-
684
-
685
- template<int I, int T>
686
- LInstruction* LChunkBuilder::DefineSameAsFirst(
687
- LTemplateInstruction<1, I, T>* instr) {
688
- return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
689
- }
690
-
691
-
692
- template<int I, int T>
693
- LInstruction* LChunkBuilder::DefineFixed(
694
- LTemplateInstruction<1, I, T>* instr, Register reg) {
695
- return Define(instr, ToUnallocated(reg));
696
- }
697
-
698
-
699
- template<int I, int T>
700
- LInstruction* LChunkBuilder::DefineFixedDouble(
701
- LTemplateInstruction<1, I, T>* instr, DoubleRegister reg) {
702
- return Define(instr, ToUnallocated(reg));
703
- }
704
-
705
-
706
- LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
707
- HEnvironment* hydrogen_env = current_block_->last_environment();
708
- instr->set_environment(CreateEnvironment(hydrogen_env));
709
- return instr;
710
- }
711
-
712
-
713
- LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment(
714
- LInstruction* instr, int ast_id) {
715
- ASSERT(instruction_pending_deoptimization_environment_ == NULL);
716
- ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber);
717
- instruction_pending_deoptimization_environment_ = instr;
718
- pending_deoptimization_ast_id_ = ast_id;
719
- return instr;
720
- }
721
-
722
-
723
- void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() {
724
- instruction_pending_deoptimization_environment_ = NULL;
725
- pending_deoptimization_ast_id_ = AstNode::kNoNumber;
726
- }
727
-
728
-
729
- LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
730
- HInstruction* hinstr,
731
- CanDeoptimize can_deoptimize) {
732
- #ifdef DEBUG
733
- instr->VerifyCall();
734
- #endif
735
- instr->MarkAsCall();
736
- instr = AssignPointerMap(instr);
737
-
738
- if (hinstr->HasSideEffects()) {
739
- ASSERT(hinstr->next()->IsSimulate());
740
- HSimulate* sim = HSimulate::cast(hinstr->next());
741
- instr = SetInstructionPendingDeoptimizationEnvironment(
742
- instr, sim->ast_id());
743
- }
744
-
745
- // If instruction does not have side-effects lazy deoptimization
746
- // after the call will try to deoptimize to the point before the call.
747
- // Thus we still need to attach environment to this call even if
748
- // call sequence can not deoptimize eagerly.
749
- bool needs_environment =
750
- (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || !hinstr->HasSideEffects();
751
- if (needs_environment && !instr->HasEnvironment()) {
752
- instr = AssignEnvironment(instr);
753
- }
754
-
755
- return instr;
756
- }
757
-
758
-
759
- LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) {
760
- instr->MarkAsSaveDoubles();
761
- return instr;
762
- }
763
-
764
-
765
- LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
766
- ASSERT(!instr->HasPointerMap());
767
- instr->set_pointer_map(new LPointerMap(position_));
768
- return instr;
769
- }
770
-
771
-
772
- LUnallocated* LChunkBuilder::TempRegister() {
773
- LUnallocated* operand = new LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
774
- allocator_->RecordTemporary(operand);
775
- return operand;
776
- }
777
-
778
-
779
- LOperand* LChunkBuilder::FixedTemp(Register reg) {
780
- LUnallocated* operand = ToUnallocated(reg);
781
- allocator_->RecordTemporary(operand);
782
- return operand;
783
- }
784
-
785
-
786
- LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) {
787
- LUnallocated* operand = ToUnallocated(reg);
788
- allocator_->RecordTemporary(operand);
789
- return operand;
790
- }
791
-
792
-
793
- LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
794
- return new LLabel(instr->block());
795
- }
796
-
797
-
798
- LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
799
- return AssignEnvironment(new LDeoptimize);
800
- }
801
-
802
-
803
- LInstruction* LChunkBuilder::DoBit(Token::Value op,
804
- HBitwiseBinaryOperation* instr) {
805
- if (instr->representation().IsInteger32()) {
806
- ASSERT(instr->left()->representation().IsInteger32());
807
- ASSERT(instr->right()->representation().IsInteger32());
808
-
809
- LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
810
- LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
811
- return DefineSameAsFirst(new LBitI(op, left, right));
812
- } else {
813
- ASSERT(instr->representation().IsTagged());
814
- ASSERT(instr->left()->representation().IsTagged());
815
- ASSERT(instr->right()->representation().IsTagged());
816
-
817
- LOperand* left = UseFixed(instr->left(), r1);
818
- LOperand* right = UseFixed(instr->right(), r0);
819
- LArithmeticT* result = new LArithmeticT(op, left, right);
820
- return MarkAsCall(DefineFixed(result, r0), instr);
821
- }
822
- }
823
-
824
-
825
- LInstruction* LChunkBuilder::DoShift(Token::Value op,
826
- HBitwiseBinaryOperation* instr) {
827
- if (instr->representation().IsTagged()) {
828
- ASSERT(instr->left()->representation().IsTagged());
829
- ASSERT(instr->right()->representation().IsTagged());
830
-
831
- LOperand* left = UseFixed(instr->left(), r1);
832
- LOperand* right = UseFixed(instr->right(), r0);
833
- LArithmeticT* result = new LArithmeticT(op, left, right);
834
- return MarkAsCall(DefineFixed(result, r0), instr);
835
- }
836
-
837
- ASSERT(instr->representation().IsInteger32());
838
- ASSERT(instr->OperandAt(0)->representation().IsInteger32());
839
- ASSERT(instr->OperandAt(1)->representation().IsInteger32());
840
- LOperand* left = UseRegisterAtStart(instr->OperandAt(0));
841
-
842
- HValue* right_value = instr->OperandAt(1);
843
- LOperand* right = NULL;
844
- int constant_value = 0;
845
- if (right_value->IsConstant()) {
846
- HConstant* constant = HConstant::cast(right_value);
847
- right = chunk_->DefineConstantOperand(constant);
848
- constant_value = constant->Integer32Value() & 0x1f;
849
- } else {
850
- right = UseRegister(right_value);
851
- }
852
-
853
- // Shift operations can only deoptimize if we do a logical shift
854
- // by 0 and the result cannot be truncated to int32.
855
- bool can_deopt = (op == Token::SHR && constant_value == 0);
856
- if (can_deopt) {
857
- bool can_truncate = true;
858
- for (int i = 0; i < instr->uses()->length(); i++) {
859
- if (!instr->uses()->at(i)->CheckFlag(HValue::kTruncatingToInt32)) {
860
- can_truncate = false;
861
- break;
862
- }
863
- }
864
- can_deopt = !can_truncate;
865
- }
866
-
867
- LInstruction* result =
868
- DefineSameAsFirst(new LShiftI(op, left, right, can_deopt));
869
- if (can_deopt) AssignEnvironment(result);
870
- return result;
871
- }
872
-
873
-
874
- LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
875
- HArithmeticBinaryOperation* instr) {
876
- ASSERT(instr->representation().IsDouble());
877
- ASSERT(instr->left()->representation().IsDouble());
878
- ASSERT(instr->right()->representation().IsDouble());
879
- ASSERT(op != Token::MOD);
880
- LOperand* left = UseRegisterAtStart(instr->left());
881
- LOperand* right = UseRegisterAtStart(instr->right());
882
- LArithmeticD* result = new LArithmeticD(op, left, right);
883
- return DefineSameAsFirst(result);
884
- }
885
-
886
-
887
- LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
888
- HArithmeticBinaryOperation* instr) {
889
- ASSERT(op == Token::ADD ||
890
- op == Token::DIV ||
891
- op == Token::MOD ||
892
- op == Token::MUL ||
893
- op == Token::SUB);
894
- HValue* left = instr->left();
895
- HValue* right = instr->right();
896
- ASSERT(left->representation().IsTagged());
897
- ASSERT(right->representation().IsTagged());
898
- LOperand* left_operand = UseFixed(left, r1);
899
- LOperand* right_operand = UseFixed(right, r0);
900
- LArithmeticT* result = new LArithmeticT(op, left_operand, right_operand);
901
- return MarkAsCall(DefineFixed(result, r0), instr);
902
- }
903
-
904
-
905
- void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
906
- ASSERT(is_building());
907
- current_block_ = block;
908
- next_block_ = next_block;
909
- if (block->IsStartBlock()) {
910
- block->UpdateEnvironment(graph_->start_environment());
911
- argument_count_ = 0;
912
- } else if (block->predecessors()->length() == 1) {
913
- // We have a single predecessor => copy environment and outgoing
914
- // argument count from the predecessor.
915
- ASSERT(block->phis()->length() == 0);
916
- HBasicBlock* pred = block->predecessors()->at(0);
917
- HEnvironment* last_environment = pred->last_environment();
918
- ASSERT(last_environment != NULL);
919
- // Only copy the environment, if it is later used again.
920
- if (pred->end()->SecondSuccessor() == NULL) {
921
- ASSERT(pred->end()->FirstSuccessor() == block);
922
- } else {
923
- if (pred->end()->FirstSuccessor()->block_id() > block->block_id() ||
924
- pred->end()->SecondSuccessor()->block_id() > block->block_id()) {
925
- last_environment = last_environment->Copy();
926
- }
927
- }
928
- block->UpdateEnvironment(last_environment);
929
- ASSERT(pred->argument_count() >= 0);
930
- argument_count_ = pred->argument_count();
931
- } else {
932
- // We are at a state join => process phis.
933
- HBasicBlock* pred = block->predecessors()->at(0);
934
- // No need to copy the environment, it cannot be used later.
935
- HEnvironment* last_environment = pred->last_environment();
936
- for (int i = 0; i < block->phis()->length(); ++i) {
937
- HPhi* phi = block->phis()->at(i);
938
- last_environment->SetValueAt(phi->merged_index(), phi);
939
- }
940
- for (int i = 0; i < block->deleted_phis()->length(); ++i) {
941
- last_environment->SetValueAt(block->deleted_phis()->at(i),
942
- graph_->GetConstantUndefined());
943
- }
944
- block->UpdateEnvironment(last_environment);
945
- // Pick up the outgoing argument count of one of the predecessors.
946
- argument_count_ = pred->argument_count();
947
- }
948
- HInstruction* current = block->first();
949
- int start = chunk_->instructions()->length();
950
- while (current != NULL && !is_aborted()) {
951
- // Code for constants in registers is generated lazily.
952
- if (!current->EmitAtUses()) {
953
- VisitInstruction(current);
954
- }
955
- current = current->next();
956
- }
957
- int end = chunk_->instructions()->length() - 1;
958
- if (end >= start) {
959
- block->set_first_instruction_index(start);
960
- block->set_last_instruction_index(end);
961
- }
962
- block->set_argument_count(argument_count_);
963
- next_block_ = NULL;
964
- current_block_ = NULL;
965
- }
966
-
967
-
968
- void LChunkBuilder::VisitInstruction(HInstruction* current) {
969
- HInstruction* old_current = current_instruction_;
970
- current_instruction_ = current;
971
- if (current->has_position()) position_ = current->position();
972
- LInstruction* instr = current->CompileToLithium(this);
973
-
974
- if (instr != NULL) {
975
- if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
976
- instr = AssignPointerMap(instr);
977
- }
978
- if (FLAG_stress_environments && !instr->HasEnvironment()) {
979
- instr = AssignEnvironment(instr);
980
- }
981
- if (current->IsTest() && !instr->IsGoto()) {
982
- ASSERT(instr->IsControl());
983
- HTest* test = HTest::cast(current);
984
- instr->set_hydrogen_value(test->value());
985
- HBasicBlock* first = test->FirstSuccessor();
986
- HBasicBlock* second = test->SecondSuccessor();
987
- ASSERT(first != NULL && second != NULL);
988
- instr->SetBranchTargets(first->block_id(), second->block_id());
989
- } else {
990
- instr->set_hydrogen_value(current);
991
- }
992
-
993
- chunk_->AddInstruction(instr, current_block_);
994
- }
995
- current_instruction_ = old_current;
996
- }
997
-
998
-
999
- LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
1000
- if (hydrogen_env == NULL) return NULL;
1001
-
1002
- LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
1003
- int ast_id = hydrogen_env->ast_id();
1004
- ASSERT(ast_id != AstNode::kNoNumber);
1005
- int value_count = hydrogen_env->length();
1006
- LEnvironment* result = new LEnvironment(hydrogen_env->closure(),
1007
- ast_id,
1008
- hydrogen_env->parameter_count(),
1009
- argument_count_,
1010
- value_count,
1011
- outer);
1012
- int argument_index = 0;
1013
- for (int i = 0; i < value_count; ++i) {
1014
- HValue* value = hydrogen_env->values()->at(i);
1015
- LOperand* op = NULL;
1016
- if (value->IsArgumentsObject()) {
1017
- op = NULL;
1018
- } else if (value->IsPushArgument()) {
1019
- op = new LArgument(argument_index++);
1020
- } else {
1021
- op = UseAny(value);
1022
- }
1023
- result->AddValue(op, value->representation());
1024
- }
1025
-
1026
- return result;
1027
- }
1028
-
1029
-
1030
- LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
1031
- LInstruction* result = new LGoto(instr->FirstSuccessor()->block_id(),
1032
- instr->include_stack_check());
1033
- if (instr->include_stack_check()) result = AssignPointerMap(result);
1034
- return result;
1035
- }
1036
-
1037
-
1038
- LInstruction* LChunkBuilder::DoTest(HTest* instr) {
1039
- HValue* v = instr->value();
1040
- if (v->EmitAtUses()) {
1041
- if (v->IsClassOfTest()) {
1042
- HClassOfTest* compare = HClassOfTest::cast(v);
1043
- ASSERT(compare->value()->representation().IsTagged());
1044
-
1045
- return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
1046
- TempRegister());
1047
- } else if (v->IsCompare()) {
1048
- HCompare* compare = HCompare::cast(v);
1049
- Token::Value op = compare->token();
1050
- HValue* left = compare->left();
1051
- HValue* right = compare->right();
1052
- Representation r = compare->GetInputRepresentation();
1053
- if (r.IsInteger32()) {
1054
- ASSERT(left->representation().IsInteger32());
1055
- ASSERT(right->representation().IsInteger32());
1056
- return new LCmpIDAndBranch(UseRegisterAtStart(left),
1057
- UseRegisterAtStart(right));
1058
- } else if (r.IsDouble()) {
1059
- ASSERT(left->representation().IsDouble());
1060
- ASSERT(right->representation().IsDouble());
1061
- return new LCmpIDAndBranch(UseRegisterAtStart(left),
1062
- UseRegisterAtStart(right));
1063
- } else {
1064
- ASSERT(left->representation().IsTagged());
1065
- ASSERT(right->representation().IsTagged());
1066
- bool reversed = op == Token::GT || op == Token::LTE;
1067
- LOperand* left_operand = UseFixed(left, reversed ? r0 : r1);
1068
- LOperand* right_operand = UseFixed(right, reversed ? r1 : r0);
1069
- LInstruction* result = new LCmpTAndBranch(left_operand,
1070
- right_operand);
1071
- return MarkAsCall(result, instr);
1072
- }
1073
- } else if (v->IsIsSmi()) {
1074
- HIsSmi* compare = HIsSmi::cast(v);
1075
- ASSERT(compare->value()->representation().IsTagged());
1076
-
1077
- return new LIsSmiAndBranch(Use(compare->value()));
1078
- } else if (v->IsHasInstanceType()) {
1079
- HHasInstanceType* compare = HHasInstanceType::cast(v);
1080
- ASSERT(compare->value()->representation().IsTagged());
1081
- return new LHasInstanceTypeAndBranch(
1082
- UseRegisterAtStart(compare->value()));
1083
- } else if (v->IsHasCachedArrayIndex()) {
1084
- HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v);
1085
- ASSERT(compare->value()->representation().IsTagged());
1086
-
1087
- return new LHasCachedArrayIndexAndBranch(
1088
- UseRegisterAtStart(compare->value()));
1089
- } else if (v->IsIsNull()) {
1090
- HIsNull* compare = HIsNull::cast(v);
1091
- ASSERT(compare->value()->representation().IsTagged());
1092
-
1093
- return new LIsNullAndBranch(UseRegisterAtStart(compare->value()));
1094
- } else if (v->IsIsObject()) {
1095
- HIsObject* compare = HIsObject::cast(v);
1096
- ASSERT(compare->value()->representation().IsTagged());
1097
-
1098
- LOperand* temp = TempRegister();
1099
- return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
1100
- } else if (v->IsCompareJSObjectEq()) {
1101
- HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1102
- return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1103
- UseRegisterAtStart(compare->right()));
1104
- } else if (v->IsInstanceOf()) {
1105
- HInstanceOf* instance_of = HInstanceOf::cast(v);
1106
- LInstruction* result =
1107
- new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0),
1108
- UseFixed(instance_of->right(), r1));
1109
- return MarkAsCall(result, instr);
1110
- } else if (v->IsTypeofIs()) {
1111
- HTypeofIs* typeof_is = HTypeofIs::cast(v);
1112
- return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1113
- } else if (v->IsIsConstructCall()) {
1114
- return new LIsConstructCallAndBranch(TempRegister());
1115
- } else {
1116
- if (v->IsConstant()) {
1117
- if (HConstant::cast(v)->handle()->IsTrue()) {
1118
- return new LGoto(instr->FirstSuccessor()->block_id());
1119
- } else if (HConstant::cast(v)->handle()->IsFalse()) {
1120
- return new LGoto(instr->SecondSuccessor()->block_id());
1121
- }
1122
- }
1123
- Abort("Undefined compare before branch");
1124
- return NULL;
1125
- }
1126
- }
1127
- return new LBranch(UseRegisterAtStart(v));
1128
- }
1129
-
1130
-
1131
- LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
1132
- ASSERT(instr->value()->representation().IsTagged());
1133
- LOperand* value = UseRegisterAtStart(instr->value());
1134
- LOperand* temp = TempRegister();
1135
- return new LCmpMapAndBranch(value, temp);
1136
- }
1137
-
1138
-
1139
- LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
1140
- return DefineAsRegister(new LArgumentsLength(UseRegister(length->value())));
1141
- }
1142
-
1143
-
1144
- LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) {
1145
- return DefineAsRegister(new LArgumentsElements);
1146
- }
1147
-
1148
-
1149
- LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
1150
- LInstanceOf* result =
1151
- new LInstanceOf(UseFixed(instr->left(), r0),
1152
- UseFixed(instr->right(), r1));
1153
- return MarkAsCall(DefineFixed(result, r0), instr);
1154
- }
1155
-
1156
-
1157
- LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
1158
- HInstanceOfKnownGlobal* instr) {
1159
- LInstanceOfKnownGlobal* result =
1160
- new LInstanceOfKnownGlobal(UseFixed(instr->value(), r0), FixedTemp(r4));
1161
- return MarkAsCall(DefineFixed(result, r0), instr);
1162
- }
1163
-
1164
-
1165
- LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) {
1166
- LOperand* function = UseFixed(instr->function(), r1);
1167
- LOperand* receiver = UseFixed(instr->receiver(), r0);
1168
- LOperand* length = UseFixed(instr->length(), r2);
1169
- LOperand* elements = UseFixed(instr->elements(), r3);
1170
- LApplyArguments* result = new LApplyArguments(function,
1171
- receiver,
1172
- length,
1173
- elements);
1174
- return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY);
1175
- }
1176
-
1177
-
1178
- LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1179
- ++argument_count_;
1180
- LOperand* argument = Use(instr->argument());
1181
- return new LPushArgument(argument);
1182
- }
1183
-
1184
-
1185
- LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1186
- return DefineAsRegister(new LContext);
1187
- }
1188
-
1189
-
1190
- LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
1191
- LOperand* context = UseRegisterAtStart(instr->value());
1192
- return DefineAsRegister(new LOuterContext(context));
1193
- }
1194
-
1195
-
1196
- LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
1197
- LOperand* context = UseRegisterAtStart(instr->value());
1198
- return DefineAsRegister(new LGlobalObject(context));
1199
- }
1200
-
1201
-
1202
- LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
1203
- LOperand* global_object = UseRegisterAtStart(instr->value());
1204
- return DefineAsRegister(new LGlobalReceiver(global_object));
1205
- }
1206
-
1207
-
1208
- LInstruction* LChunkBuilder::DoCallConstantFunction(
1209
- HCallConstantFunction* instr) {
1210
- argument_count_ -= instr->argument_count();
1211
- return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr);
1212
- }
1213
-
1214
-
1215
- LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1216
- BuiltinFunctionId op = instr->op();
1217
- if (op == kMathLog || op == kMathSin || op == kMathCos) {
1218
- LOperand* input = UseFixedDouble(instr->value(), d2);
1219
- LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL);
1220
- return MarkAsCall(DefineFixedDouble(result, d2), instr);
1221
- } else {
1222
- LOperand* input = UseRegisterAtStart(instr->value());
1223
- LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL;
1224
- LUnaryMathOperation* result = new LUnaryMathOperation(input, temp);
1225
- switch (op) {
1226
- case kMathAbs:
1227
- return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
1228
- case kMathFloor:
1229
- return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1230
- case kMathSqrt:
1231
- return DefineSameAsFirst(result);
1232
- case kMathRound:
1233
- return AssignEnvironment(DefineAsRegister(result));
1234
- case kMathPowHalf:
1235
- return DefineSameAsFirst(result);
1236
- default:
1237
- UNREACHABLE();
1238
- return NULL;
1239
- }
1240
- }
1241
- }
1242
-
1243
-
1244
- LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
1245
- ASSERT(instr->key()->representation().IsTagged());
1246
- argument_count_ -= instr->argument_count();
1247
- LOperand* key = UseFixed(instr->key(), r2);
1248
- return MarkAsCall(DefineFixed(new LCallKeyed(key), r0), instr);
1249
- }
1250
-
1251
-
1252
- LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
1253
- argument_count_ -= instr->argument_count();
1254
- return MarkAsCall(DefineFixed(new LCallNamed, r0), instr);
1255
- }
1256
-
1257
-
1258
- LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
1259
- argument_count_ -= instr->argument_count();
1260
- return MarkAsCall(DefineFixed(new LCallGlobal, r0), instr);
1261
- }
1262
-
1263
-
1264
- LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) {
1265
- argument_count_ -= instr->argument_count();
1266
- return MarkAsCall(DefineFixed(new LCallKnownGlobal, r0), instr);
1267
- }
1268
-
1269
-
1270
- LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
1271
- LOperand* constructor = UseFixed(instr->constructor(), r1);
1272
- argument_count_ -= instr->argument_count();
1273
- LCallNew* result = new LCallNew(constructor);
1274
- return MarkAsCall(DefineFixed(result, r0), instr);
1275
- }
1276
-
1277
-
1278
- LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
1279
- argument_count_ -= instr->argument_count();
1280
- return MarkAsCall(DefineFixed(new LCallFunction, r0), instr);
1281
- }
1282
-
1283
-
1284
- LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
1285
- argument_count_ -= instr->argument_count();
1286
- return MarkAsCall(DefineFixed(new LCallRuntime, r0), instr);
1287
- }
1288
-
1289
-
1290
- LInstruction* LChunkBuilder::DoShr(HShr* instr) {
1291
- return DoShift(Token::SHR, instr);
1292
- }
1293
-
1294
-
1295
- LInstruction* LChunkBuilder::DoSar(HSar* instr) {
1296
- return DoShift(Token::SAR, instr);
1297
- }
1298
-
1299
-
1300
- LInstruction* LChunkBuilder::DoShl(HShl* instr) {
1301
- return DoShift(Token::SHL, instr);
1302
- }
1303
-
1304
-
1305
- LInstruction* LChunkBuilder::DoBitAnd(HBitAnd* instr) {
1306
- return DoBit(Token::BIT_AND, instr);
1307
- }
1308
-
1309
-
1310
- LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
1311
- ASSERT(instr->value()->representation().IsInteger32());
1312
- ASSERT(instr->representation().IsInteger32());
1313
- return DefineSameAsFirst(new LBitNotI(UseRegisterAtStart(instr->value())));
1314
- }
1315
-
1316
-
1317
- LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) {
1318
- return DoBit(Token::BIT_OR, instr);
1319
- }
1320
-
1321
-
1322
- LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) {
1323
- return DoBit(Token::BIT_XOR, instr);
1324
- }
1325
-
1326
-
1327
- LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
1328
- if (instr->representation().IsDouble()) {
1329
- return DoArithmeticD(Token::DIV, instr);
1330
- } else if (instr->representation().IsInteger32()) {
1331
- // TODO(1042) The fixed register allocation
1332
- // is needed because we call GenericBinaryOpStub from
1333
- // the generated code, which requires registers r0
1334
- // and r1 to be used. We should remove that
1335
- // when we provide a native implementation.
1336
- LOperand* dividend = UseFixed(instr->left(), r0);
1337
- LOperand* divisor = UseFixed(instr->right(), r1);
1338
- return AssignEnvironment(AssignPointerMap(
1339
- DefineFixed(new LDivI(dividend, divisor), r0)));
1340
- } else {
1341
- return DoArithmeticT(Token::DIV, instr);
1342
- }
1343
- }
1344
-
1345
-
1346
- LInstruction* LChunkBuilder::DoMod(HMod* instr) {
1347
- if (instr->representation().IsInteger32()) {
1348
- ASSERT(instr->left()->representation().IsInteger32());
1349
- ASSERT(instr->right()->representation().IsInteger32());
1350
-
1351
- LModI* mod;
1352
- if (instr->HasPowerOf2Divisor()) {
1353
- ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero));
1354
- LOperand* value = UseRegisterAtStart(instr->left());
1355
- mod = new LModI(value, UseOrConstant(instr->right()));
1356
- } else {
1357
- LOperand* dividend = UseRegister(instr->left());
1358
- LOperand* divisor = UseRegisterAtStart(instr->right());
1359
- mod = new LModI(dividend,
1360
- divisor,
1361
- TempRegister(),
1362
- FixedTemp(d1),
1363
- FixedTemp(d2));
1364
- }
1365
-
1366
- return AssignEnvironment(DefineSameAsFirst(mod));
1367
- } else if (instr->representation().IsTagged()) {
1368
- return DoArithmeticT(Token::MOD, instr);
1369
- } else {
1370
- ASSERT(instr->representation().IsDouble());
1371
- // We call a C function for double modulo. It can't trigger a GC.
1372
- // We need to use fixed result register for the call.
1373
- // TODO(fschneider): Allow any register as input registers.
1374
- LOperand* left = UseFixedDouble(instr->left(), d1);
1375
- LOperand* right = UseFixedDouble(instr->right(), d2);
1376
- LArithmeticD* result = new LArithmeticD(Token::MOD, left, right);
1377
- return MarkAsCall(DefineFixedDouble(result, d1), instr);
1378
- }
1379
- }
1380
-
1381
-
1382
- LInstruction* LChunkBuilder::DoMul(HMul* instr) {
1383
- if (instr->representation().IsInteger32()) {
1384
- ASSERT(instr->left()->representation().IsInteger32());
1385
- ASSERT(instr->right()->representation().IsInteger32());
1386
- LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
1387
- LOperand* right = UseOrConstant(instr->MostConstantOperand());
1388
- LOperand* temp = NULL;
1389
- if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
1390
- temp = TempRegister();
1391
- }
1392
- LMulI* mul = new LMulI(left, right, temp);
1393
- return AssignEnvironment(DefineSameAsFirst(mul));
1394
- } else if (instr->representation().IsDouble()) {
1395
- return DoArithmeticD(Token::MUL, instr);
1396
- } else {
1397
- return DoArithmeticT(Token::MUL, instr);
1398
- }
1399
- }
1400
-
1401
-
1402
- LInstruction* LChunkBuilder::DoSub(HSub* instr) {
1403
- if (instr->representation().IsInteger32()) {
1404
- ASSERT(instr->left()->representation().IsInteger32());
1405
- ASSERT(instr->right()->representation().IsInteger32());
1406
- LOperand* left = UseRegisterAtStart(instr->left());
1407
- LOperand* right = UseOrConstantAtStart(instr->right());
1408
- LSubI* sub = new LSubI(left, right);
1409
- LInstruction* result = DefineSameAsFirst(sub);
1410
- if (instr->CheckFlag(HValue::kCanOverflow)) {
1411
- result = AssignEnvironment(result);
1412
- }
1413
- return result;
1414
- } else if (instr->representation().IsDouble()) {
1415
- return DoArithmeticD(Token::SUB, instr);
1416
- } else {
1417
- return DoArithmeticT(Token::SUB, instr);
1418
- }
1419
- }
1420
-
1421
-
1422
- LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
1423
- if (instr->representation().IsInteger32()) {
1424
- ASSERT(instr->left()->representation().IsInteger32());
1425
- ASSERT(instr->right()->representation().IsInteger32());
1426
- LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
1427
- LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
1428
- LAddI* add = new LAddI(left, right);
1429
- LInstruction* result = DefineSameAsFirst(add);
1430
- if (instr->CheckFlag(HValue::kCanOverflow)) {
1431
- result = AssignEnvironment(result);
1432
- }
1433
- return result;
1434
- } else if (instr->representation().IsDouble()) {
1435
- return DoArithmeticD(Token::ADD, instr);
1436
- } else {
1437
- ASSERT(instr->representation().IsTagged());
1438
- return DoArithmeticT(Token::ADD, instr);
1439
- }
1440
- }
1441
-
1442
-
1443
- LInstruction* LChunkBuilder::DoPower(HPower* instr) {
1444
- ASSERT(instr->representation().IsDouble());
1445
- // We call a C function for double power. It can't trigger a GC.
1446
- // We need to use fixed result register for the call.
1447
- Representation exponent_type = instr->right()->representation();
1448
- ASSERT(instr->left()->representation().IsDouble());
1449
- LOperand* left = UseFixedDouble(instr->left(), d1);
1450
- LOperand* right = exponent_type.IsDouble() ?
1451
- UseFixedDouble(instr->right(), d2) :
1452
- UseFixed(instr->right(), r0);
1453
- LPower* result = new LPower(left, right);
1454
- return MarkAsCall(DefineFixedDouble(result, d3),
1455
- instr,
1456
- CAN_DEOPTIMIZE_EAGERLY);
1457
- }
1458
-
1459
-
1460
- LInstruction* LChunkBuilder::DoCompare(HCompare* instr) {
1461
- Token::Value op = instr->token();
1462
- Representation r = instr->GetInputRepresentation();
1463
- if (r.IsInteger32()) {
1464
- ASSERT(instr->left()->representation().IsInteger32());
1465
- ASSERT(instr->right()->representation().IsInteger32());
1466
- LOperand* left = UseRegisterAtStart(instr->left());
1467
- LOperand* right = UseRegisterAtStart(instr->right());
1468
- return DefineAsRegister(new LCmpID(left, right));
1469
- } else if (r.IsDouble()) {
1470
- ASSERT(instr->left()->representation().IsDouble());
1471
- ASSERT(instr->right()->representation().IsDouble());
1472
- LOperand* left = UseRegisterAtStart(instr->left());
1473
- LOperand* right = UseRegisterAtStart(instr->right());
1474
- return DefineAsRegister(new LCmpID(left, right));
1475
- } else {
1476
- ASSERT(instr->left()->representation().IsTagged());
1477
- ASSERT(instr->right()->representation().IsTagged());
1478
- bool reversed = (op == Token::GT || op == Token::LTE);
1479
- LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
1480
- LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
1481
- LCmpT* result = new LCmpT(left, right);
1482
- return MarkAsCall(DefineFixed(result, r0), instr);
1483
- }
1484
- }
1485
-
1486
-
1487
- LInstruction* LChunkBuilder::DoCompareJSObjectEq(
1488
- HCompareJSObjectEq* instr) {
1489
- LOperand* left = UseRegisterAtStart(instr->left());
1490
- LOperand* right = UseRegisterAtStart(instr->right());
1491
- LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right);
1492
- return DefineAsRegister(result);
1493
- }
1494
-
1495
-
1496
- LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
1497
- ASSERT(instr->value()->representation().IsTagged());
1498
- LOperand* value = UseRegisterAtStart(instr->value());
1499
-
1500
- return DefineAsRegister(new LIsNull(value));
1501
- }
1502
-
1503
-
1504
- LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1505
- ASSERT(instr->value()->representation().IsTagged());
1506
- LOperand* value = UseRegisterAtStart(instr->value());
1507
-
1508
- return DefineAsRegister(new LIsObject(value));
1509
- }
1510
-
1511
-
1512
- LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) {
1513
- ASSERT(instr->value()->representation().IsTagged());
1514
- LOperand* value = UseAtStart(instr->value());
1515
-
1516
- return DefineAsRegister(new LIsSmi(value));
1517
- }
1518
-
1519
-
1520
- LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) {
1521
- ASSERT(instr->value()->representation().IsTagged());
1522
- LOperand* value = UseRegisterAtStart(instr->value());
1523
-
1524
- return DefineAsRegister(new LHasInstanceType(value));
1525
- }
1526
-
1527
-
1528
- LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1529
- HGetCachedArrayIndex* instr) {
1530
- ASSERT(instr->value()->representation().IsTagged());
1531
- LOperand* value = UseRegisterAtStart(instr->value());
1532
-
1533
- return DefineAsRegister(new LGetCachedArrayIndex(value));
1534
- }
1535
-
1536
-
1537
- LInstruction* LChunkBuilder::DoHasCachedArrayIndex(
1538
- HHasCachedArrayIndex* instr) {
1539
- ASSERT(instr->value()->representation().IsTagged());
1540
- LOperand* value = UseRegister(instr->value());
1541
-
1542
- return DefineAsRegister(new LHasCachedArrayIndex(value));
1543
- }
1544
-
1545
-
1546
- LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) {
1547
- ASSERT(instr->value()->representation().IsTagged());
1548
- LOperand* value = UseTempRegister(instr->value());
1549
- return DefineSameAsFirst(new LClassOfTest(value));
1550
- }
1551
-
1552
-
1553
- LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1554
- LOperand* array = UseRegisterAtStart(instr->value());
1555
- return DefineAsRegister(new LJSArrayLength(array));
1556
- }
1557
-
1558
-
1559
- LInstruction* LChunkBuilder::DoExternalArrayLength(
1560
- HExternalArrayLength* instr) {
1561
- LOperand* array = UseRegisterAtStart(instr->value());
1562
- return DefineAsRegister(new LExternalArrayLength(array));
1563
- }
1564
-
1565
-
1566
- LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1567
- LOperand* array = UseRegisterAtStart(instr->value());
1568
- return DefineAsRegister(new LFixedArrayLength(array));
1569
- }
1570
-
1571
-
1572
- LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1573
- LOperand* object = UseRegister(instr->value());
1574
- LValueOf* result = new LValueOf(object, TempRegister());
1575
- return AssignEnvironment(DefineSameAsFirst(result));
1576
- }
1577
-
1578
-
1579
- LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1580
- return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1581
- UseRegister(instr->length())));
1582
- }
1583
-
1584
-
1585
- LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) {
1586
- // The control instruction marking the end of a block that completed
1587
- // abruptly (e.g., threw an exception). There is nothing specific to do.
1588
- return NULL;
1589
- }
1590
-
1591
-
1592
- LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
1593
- LOperand* value = UseFixed(instr->value(), r0);
1594
- return MarkAsCall(new LThrow(value), instr);
1595
- }
1596
-
1597
-
1598
- LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1599
- Representation from = instr->from();
1600
- Representation to = instr->to();
1601
- if (from.IsTagged()) {
1602
- if (to.IsDouble()) {
1603
- LOperand* value = UseRegister(instr->value());
1604
- LNumberUntagD* res = new LNumberUntagD(value);
1605
- return AssignEnvironment(DefineAsRegister(res));
1606
- } else {
1607
- ASSERT(to.IsInteger32());
1608
- LOperand* value = UseRegister(instr->value());
1609
- bool needs_check = !instr->value()->type().IsSmi();
1610
- LInstruction* res = NULL;
1611
- if (!needs_check) {
1612
- res = DefineSameAsFirst(new LSmiUntag(value, needs_check));
1613
- } else {
1614
- LOperand* temp1 = TempRegister();
1615
- LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1616
- : NULL;
1617
- LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d3)
1618
- : NULL;
1619
- res = DefineSameAsFirst(new LTaggedToI(value, temp1, temp2, temp3));
1620
- res = AssignEnvironment(res);
1621
- }
1622
- return res;
1623
- }
1624
- } else if (from.IsDouble()) {
1625
- if (to.IsTagged()) {
1626
- LOperand* value = UseRegister(instr->value());
1627
- LOperand* temp1 = TempRegister();
1628
- LOperand* temp2 = TempRegister();
1629
-
1630
- // Make sure that the temp and result_temp registers are
1631
- // different.
1632
- LUnallocated* result_temp = TempRegister();
1633
- LNumberTagD* result = new LNumberTagD(value, temp1, temp2);
1634
- Define(result, result_temp);
1635
- return AssignPointerMap(result);
1636
- } else {
1637
- ASSERT(to.IsInteger32());
1638
- LOperand* value = UseRegister(instr->value());
1639
- LDoubleToI* res =
1640
- new LDoubleToI(value,
1641
- TempRegister(),
1642
- instr->CanTruncateToInt32() ? TempRegister() : NULL);
1643
- return AssignEnvironment(DefineAsRegister(res));
1644
- }
1645
- } else if (from.IsInteger32()) {
1646
- if (to.IsTagged()) {
1647
- HValue* val = instr->value();
1648
- LOperand* value = UseRegister(val);
1649
- if (val->HasRange() && val->range()->IsInSmiRange()) {
1650
- return DefineSameAsFirst(new LSmiTag(value));
1651
- } else {
1652
- LNumberTagI* result = new LNumberTagI(value);
1653
- return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
1654
- }
1655
- } else {
1656
- ASSERT(to.IsDouble());
1657
- LOperand* value = Use(instr->value());
1658
- return DefineAsRegister(new LInteger32ToDouble(value));
1659
- }
1660
- }
1661
- UNREACHABLE();
1662
- return NULL;
1663
- }
1664
-
1665
-
1666
- LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) {
1667
- LOperand* value = UseRegisterAtStart(instr->value());
1668
- return AssignEnvironment(new LCheckNonSmi(value));
1669
- }
1670
-
1671
-
1672
- LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
1673
- LOperand* value = UseRegisterAtStart(instr->value());
1674
- LInstruction* result = new LCheckInstanceType(value);
1675
- return AssignEnvironment(result);
1676
- }
1677
-
1678
-
1679
- LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
1680
- LOperand* temp1 = TempRegister();
1681
- LOperand* temp2 = TempRegister();
1682
- LInstruction* result = new LCheckPrototypeMaps(temp1, temp2);
1683
- return AssignEnvironment(result);
1684
- }
1685
-
1686
-
1687
- LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
1688
- LOperand* value = UseRegisterAtStart(instr->value());
1689
- return AssignEnvironment(new LCheckSmi(value));
1690
- }
1691
-
1692
-
1693
- LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
1694
- LOperand* value = UseRegisterAtStart(instr->value());
1695
- return AssignEnvironment(new LCheckFunction(value));
1696
- }
1697
-
1698
-
1699
- LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) {
1700
- LOperand* value = UseRegisterAtStart(instr->value());
1701
- LInstruction* result = new LCheckMap(value);
1702
- return AssignEnvironment(result);
1703
- }
1704
-
1705
-
1706
- LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1707
- return new LReturn(UseFixed(instr->value(), r0));
1708
- }
1709
-
1710
-
1711
- LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1712
- Representation r = instr->representation();
1713
- if (r.IsInteger32()) {
1714
- return DefineAsRegister(new LConstantI);
1715
- } else if (r.IsDouble()) {
1716
- return DefineAsRegister(new LConstantD);
1717
- } else if (r.IsTagged()) {
1718
- return DefineAsRegister(new LConstantT);
1719
- } else {
1720
- UNREACHABLE();
1721
- return NULL;
1722
- }
1723
- }
1724
-
1725
-
1726
- LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
1727
- LLoadGlobalCell* result = new LLoadGlobalCell;
1728
- return instr->check_hole_value()
1729
- ? AssignEnvironment(DefineAsRegister(result))
1730
- : DefineAsRegister(result);
1731
- }
1732
-
1733
-
1734
- LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
1735
- LOperand* global_object = UseFixed(instr->global_object(), r0);
1736
- LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object);
1737
- return MarkAsCall(DefineFixed(result, r0), instr);
1738
- }
1739
-
1740
-
1741
- LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
1742
- if (instr->check_hole_value()) {
1743
- LOperand* temp = TempRegister();
1744
- LOperand* value = UseRegister(instr->value());
1745
- return AssignEnvironment(new LStoreGlobalCell(value, temp));
1746
- } else {
1747
- LOperand* value = UseRegisterAtStart(instr->value());
1748
- return new LStoreGlobalCell(value, NULL);
1749
- }
1750
- }
1751
-
1752
-
1753
- LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) {
1754
- LOperand* global_object = UseFixed(instr->global_object(), r1);
1755
- LOperand* value = UseFixed(instr->value(), r0);
1756
- LStoreGlobalGeneric* result =
1757
- new LStoreGlobalGeneric(global_object, value);
1758
- return MarkAsCall(result, instr);
1759
- }
1760
-
1761
-
1762
- LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1763
- LOperand* context = UseRegisterAtStart(instr->value());
1764
- return DefineAsRegister(new LLoadContextSlot(context));
1765
- }
1766
-
1767
-
1768
- LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
1769
- LOperand* context;
1770
- LOperand* value;
1771
- if (instr->NeedsWriteBarrier()) {
1772
- context = UseTempRegister(instr->context());
1773
- value = UseTempRegister(instr->value());
1774
- } else {
1775
- context = UseRegister(instr->context());
1776
- value = UseRegister(instr->value());
1777
- }
1778
- return new LStoreContextSlot(context, value);
1779
- }
1780
-
1781
-
1782
- LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1783
- return DefineAsRegister(
1784
- new LLoadNamedField(UseRegisterAtStart(instr->object())));
1785
- }
1786
-
1787
-
1788
- LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic(
1789
- HLoadNamedFieldPolymorphic* instr) {
1790
- ASSERT(instr->representation().IsTagged());
1791
- if (instr->need_generic()) {
1792
- LOperand* obj = UseFixed(instr->object(), r0);
1793
- LLoadNamedFieldPolymorphic* result = new LLoadNamedFieldPolymorphic(obj);
1794
- return MarkAsCall(DefineFixed(result, r0), instr);
1795
- } else {
1796
- LOperand* obj = UseRegisterAtStart(instr->object());
1797
- LLoadNamedFieldPolymorphic* result = new LLoadNamedFieldPolymorphic(obj);
1798
- return AssignEnvironment(DefineAsRegister(result));
1799
- }
1800
- }
1801
-
1802
-
1803
- LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
1804
- LOperand* object = UseFixed(instr->object(), r0);
1805
- LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), r0);
1806
- return MarkAsCall(result, instr);
1807
- }
1808
-
1809
-
1810
- LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
1811
- HLoadFunctionPrototype* instr) {
1812
- return AssignEnvironment(DefineAsRegister(
1813
- new LLoadFunctionPrototype(UseRegister(instr->function()))));
1814
- }
1815
-
1816
-
1817
- LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
1818
- LOperand* input = UseRegisterAtStart(instr->value());
1819
- return DefineAsRegister(new LLoadElements(input));
1820
- }
1821
-
1822
-
1823
- LInstruction* LChunkBuilder::DoLoadExternalArrayPointer(
1824
- HLoadExternalArrayPointer* instr) {
1825
- LOperand* input = UseRegisterAtStart(instr->value());
1826
- return DefineAsRegister(new LLoadExternalArrayPointer(input));
1827
- }
1828
-
1829
-
1830
- LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1831
- HLoadKeyedFastElement* instr) {
1832
- ASSERT(instr->representation().IsTagged());
1833
- ASSERT(instr->key()->representation().IsInteger32());
1834
- LOperand* obj = UseRegisterAtStart(instr->object());
1835
- LOperand* key = UseRegisterAtStart(instr->key());
1836
- LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1837
- return AssignEnvironment(DefineSameAsFirst(result));
1838
- }
1839
-
1840
-
1841
- LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1842
- HLoadKeyedSpecializedArrayElement* instr) {
1843
- // TODO(danno): Add support for other external array types.
1844
- if (instr->array_type() != kExternalPixelArray) {
1845
- Abort("unsupported load for external array type.");
1846
- return NULL;
1847
- }
1848
-
1849
- ASSERT(instr->representation().IsInteger32());
1850
- ASSERT(instr->key()->representation().IsInteger32());
1851
- LOperand* external_pointer =
1852
- UseRegisterAtStart(instr->external_pointer());
1853
- LOperand* key = UseRegisterAtStart(instr->key());
1854
- LLoadKeyedSpecializedArrayElement* result =
1855
- new LLoadKeyedSpecializedArrayElement(external_pointer,
1856
- key);
1857
- return DefineAsRegister(result);
1858
- }
1859
-
1860
-
1861
- LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1862
- LOperand* object = UseFixed(instr->object(), r1);
1863
- LOperand* key = UseFixed(instr->key(), r0);
1864
-
1865
- LInstruction* result =
1866
- DefineFixed(new LLoadKeyedGeneric(object, key), r0);
1867
- return MarkAsCall(result, instr);
1868
- }
1869
-
1870
-
1871
- LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
1872
- HStoreKeyedFastElement* instr) {
1873
- bool needs_write_barrier = instr->NeedsWriteBarrier();
1874
- ASSERT(instr->value()->representation().IsTagged());
1875
- ASSERT(instr->object()->representation().IsTagged());
1876
- ASSERT(instr->key()->representation().IsInteger32());
1877
-
1878
- LOperand* obj = UseTempRegister(instr->object());
1879
- LOperand* val = needs_write_barrier
1880
- ? UseTempRegister(instr->value())
1881
- : UseRegisterAtStart(instr->value());
1882
- LOperand* key = needs_write_barrier
1883
- ? UseTempRegister(instr->key())
1884
- : UseRegisterOrConstantAtStart(instr->key());
1885
-
1886
- return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1887
- }
1888
-
1889
-
1890
- LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1891
- HStoreKeyedSpecializedArrayElement* instr) {
1892
- // TODO(danno): Add support for other external array types.
1893
- if (instr->array_type() != kExternalPixelArray) {
1894
- Abort("unsupported store for external array type.");
1895
- return NULL;
1896
- }
1897
-
1898
- ASSERT(instr->value()->representation().IsInteger32());
1899
- ASSERT(instr->external_pointer()->representation().IsExternal());
1900
- ASSERT(instr->key()->representation().IsInteger32());
1901
-
1902
- LOperand* external_pointer = UseRegister(instr->external_pointer());
1903
- LOperand* value = UseTempRegister(instr->value()); // changed by clamp.
1904
- LOperand* key = UseRegister(instr->key());
1905
-
1906
- return new LStoreKeyedSpecializedArrayElement(external_pointer,
1907
- key,
1908
- value);
1909
- }
1910
-
1911
-
1912
- LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
1913
- LOperand* obj = UseFixed(instr->object(), r2);
1914
- LOperand* key = UseFixed(instr->key(), r1);
1915
- LOperand* val = UseFixed(instr->value(), r0);
1916
-
1917
- ASSERT(instr->object()->representation().IsTagged());
1918
- ASSERT(instr->key()->representation().IsTagged());
1919
- ASSERT(instr->value()->representation().IsTagged());
1920
-
1921
- return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr);
1922
- }
1923
-
1924
-
1925
- LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
1926
- bool needs_write_barrier = instr->NeedsWriteBarrier();
1927
-
1928
- LOperand* obj = needs_write_barrier
1929
- ? UseTempRegister(instr->object())
1930
- : UseRegisterAtStart(instr->object());
1931
-
1932
- LOperand* val = needs_write_barrier
1933
- ? UseTempRegister(instr->value())
1934
- : UseRegister(instr->value());
1935
-
1936
- return new LStoreNamedField(obj, val);
1937
- }
1938
-
1939
-
1940
- LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
1941
- LOperand* obj = UseFixed(instr->object(), r1);
1942
- LOperand* val = UseFixed(instr->value(), r0);
1943
-
1944
- LInstruction* result = new LStoreNamedGeneric(obj, val);
1945
- return MarkAsCall(result, instr);
1946
- }
1947
-
1948
-
1949
- LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
1950
- LOperand* string = UseRegister(instr->string());
1951
- LOperand* index = UseRegisterOrConstant(instr->index());
1952
- LStringCharCodeAt* result = new LStringCharCodeAt(string, index);
1953
- return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1954
- }
1955
-
1956
-
1957
- LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
1958
- LOperand* char_code = UseRegister(instr->value());
1959
- LStringCharFromCode* result = new LStringCharFromCode(char_code);
1960
- return AssignPointerMap(DefineAsRegister(result));
1961
- }
1962
-
1963
-
1964
- LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
1965
- LOperand* string = UseRegisterAtStart(instr->value());
1966
- return DefineAsRegister(new LStringLength(string));
1967
- }
1968
-
1969
-
1970
- LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
1971
- return MarkAsCall(DefineFixed(new LArrayLiteral, r0), instr);
1972
- }
1973
-
1974
-
1975
- LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) {
1976
- return MarkAsCall(DefineFixed(new LObjectLiteral, r0), instr);
1977
- }
1978
-
1979
-
1980
- LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) {
1981
- return MarkAsCall(DefineFixed(new LRegExpLiteral, r0), instr);
1982
- }
1983
-
1984
-
1985
- LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
1986
- return MarkAsCall(DefineFixed(new LFunctionLiteral, r0), instr);
1987
- }
1988
-
1989
-
1990
- LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
1991
- LOperand* object = UseFixed(instr->object(), r0);
1992
- LOperand* key = UseFixed(instr->key(), r1);
1993
- LDeleteProperty* result = new LDeleteProperty(object, key);
1994
- return MarkAsCall(DefineFixed(result, r0), instr);
1995
- }
1996
-
1997
-
1998
- LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
1999
- allocator_->MarkAsOsrEntry();
2000
- current_block_->last_environment()->set_ast_id(instr->ast_id());
2001
- return AssignEnvironment(new LOsrEntry);
2002
- }
2003
-
2004
-
2005
- LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2006
- int spill_index = chunk()->GetParameterStackSlot(instr->index());
2007
- return DefineAsSpilled(new LParameter, spill_index);
2008
- }
2009
-
2010
-
2011
- LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2012
- int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
2013
- return DefineAsSpilled(new LUnknownOSRValue, spill_index);
2014
- }
2015
-
2016
-
2017
- LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
2018
- argument_count_ -= instr->argument_count();
2019
- return MarkAsCall(DefineFixed(new LCallStub, r0), instr);
2020
- }
2021
-
2022
-
2023
- LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
2024
- // There are no real uses of the arguments object.
2025
- // arguments.length and element access are supported directly on
2026
- // stack arguments, and any real arguments object use causes a bailout.
2027
- // So this value is never used.
2028
- return NULL;
2029
- }
2030
-
2031
-
2032
- LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2033
- LOperand* arguments = UseRegister(instr->arguments());
2034
- LOperand* length = UseTempRegister(instr->length());
2035
- LOperand* index = UseRegister(instr->index());
2036
- LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index);
2037
- return AssignEnvironment(DefineAsRegister(result));
2038
- }
2039
-
2040
-
2041
- LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
2042
- LOperand* object = UseFixed(instr->value(), r0);
2043
- LToFastProperties* result = new LToFastProperties(object);
2044
- return MarkAsCall(DefineFixed(result, r0), instr);
2045
- }
2046
-
2047
-
2048
- LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
2049
- LTypeof* result = new LTypeof(UseFixed(instr->value(), r0));
2050
- return MarkAsCall(DefineFixed(result, r0), instr);
2051
- }
2052
-
2053
-
2054
- LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
2055
- return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value())));
2056
- }
2057
-
2058
-
2059
- LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
2060
- return DefineAsRegister(new LIsConstructCall());
2061
- }
2062
-
2063
-
2064
- LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
2065
- HEnvironment* env = current_block_->last_environment();
2066
- ASSERT(env != NULL);
2067
-
2068
- env->set_ast_id(instr->ast_id());
2069
-
2070
- env->Drop(instr->pop_count());
2071
- for (int i = 0; i < instr->values()->length(); ++i) {
2072
- HValue* value = instr->values()->at(i);
2073
- if (instr->HasAssignedIndexAt(i)) {
2074
- env->Bind(instr->GetAssignedIndexAt(i), value);
2075
- } else {
2076
- env->Push(value);
2077
- }
2078
- }
2079
-
2080
- // If there is an instruction pending deoptimization environment create a
2081
- // lazy bailout instruction to capture the environment.
2082
- if (pending_deoptimization_ast_id_ == instr->ast_id()) {
2083
- LInstruction* result = new LLazyBailout;
2084
- result = AssignEnvironment(result);
2085
- instruction_pending_deoptimization_environment_->
2086
- set_deoptimization_environment(result->environment());
2087
- ClearInstructionPendingDeoptimizationEnvironment();
2088
- return result;
2089
- }
2090
-
2091
- return NULL;
2092
- }
2093
-
2094
-
2095
- LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
2096
- return MarkAsCall(new LStackCheck, instr);
2097
- }
2098
-
2099
-
2100
- LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2101
- HEnvironment* outer = current_block_->last_environment();
2102
- HConstant* undefined = graph()->GetConstantUndefined();
2103
- HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2104
- instr->function(),
2105
- false,
2106
- undefined);
2107
- current_block_->UpdateEnvironment(inner);
2108
- chunk_->AddInlinedClosure(instr->closure());
2109
- return NULL;
2110
- }
2111
-
2112
-
2113
- LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2114
- HEnvironment* outer = current_block_->last_environment()->outer();
2115
- current_block_->UpdateEnvironment(outer);
2116
- return NULL;
2117
- }
2118
-
2119
-
2120
- } } // namespace v8::internal