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,82 +0,0 @@
1
- // Copyright 2006-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
- #ifndef V8_MEMORY_H_
29
- #define V8_MEMORY_H_
30
-
31
- namespace v8 {
32
- namespace internal {
33
-
34
- // Memory provides an interface to 'raw' memory. It encapsulates the casts
35
- // that typically are needed when incompatible pointer types are used.
36
-
37
- class Memory {
38
- public:
39
- static uint8_t& uint8_at(Address addr) {
40
- return *reinterpret_cast<uint8_t*>(addr);
41
- }
42
-
43
- static uint16_t& uint16_at(Address addr) {
44
- return *reinterpret_cast<uint16_t*>(addr);
45
- }
46
-
47
- static uint32_t& uint32_at(Address addr) {
48
- return *reinterpret_cast<uint32_t*>(addr);
49
- }
50
-
51
- static int32_t& int32_at(Address addr) {
52
- return *reinterpret_cast<int32_t*>(addr);
53
- }
54
-
55
- static uint64_t& uint64_at(Address addr) {
56
- return *reinterpret_cast<uint64_t*>(addr);
57
- }
58
-
59
- static int& int_at(Address addr) {
60
- return *reinterpret_cast<int*>(addr);
61
- }
62
-
63
- static double& double_at(Address addr) {
64
- return *reinterpret_cast<double*>(addr);
65
- }
66
-
67
- static Address& Address_at(Address addr) {
68
- return *reinterpret_cast<Address*>(addr);
69
- }
70
-
71
- static Object*& Object_at(Address addr) {
72
- return *reinterpret_cast<Object**>(addr);
73
- }
74
-
75
- static Handle<Object>& Object_Handle_at(Address addr) {
76
- return *reinterpret_cast<Handle<Object>*>(addr);
77
- }
78
- };
79
-
80
- } } // namespace v8::internal
81
-
82
- #endif // V8_MEMORY_H_
@@ -1,1293 +0,0 @@
1
- // Copyright 2006-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
- // This file relies on the fact that the following declarations have been made
29
- //
30
- // in runtime.js:
31
- // const $Object = global.Object;
32
- // const $Boolean = global.Boolean;
33
- // const $Number = global.Number;
34
- // const $Function = global.Function;
35
- // const $Array = global.Array;
36
- // const $NaN = 0/0;
37
- //
38
- // in math.js:
39
- // const $floor = MathFloor
40
-
41
- const $isNaN = GlobalIsNaN;
42
- const $isFinite = GlobalIsFinite;
43
-
44
-
45
- // ----------------------------------------------------------------------------
46
-
47
-
48
- // Helper function used to install functions on objects.
49
- function InstallFunctions(object, attributes, functions) {
50
- if (functions.length >= 8) {
51
- %OptimizeObjectForAddingMultipleProperties(object, functions.length >> 1);
52
- }
53
- for (var i = 0; i < functions.length; i += 2) {
54
- var key = functions[i];
55
- var f = functions[i + 1];
56
- %FunctionSetName(f, key);
57
- %FunctionRemovePrototype(f);
58
- %SetProperty(object, key, f, attributes);
59
- }
60
- %ToFastProperties(object);
61
- }
62
-
63
- // Emulates JSC by installing functions on a hidden prototype that
64
- // lies above the current object/prototype. This lets you override
65
- // functions on String.prototype etc. and then restore the old function
66
- // with delete. See http://code.google.com/p/chromium/issues/detail?id=1717
67
- function InstallFunctionsOnHiddenPrototype(object, attributes, functions) {
68
- var hidden_prototype = new $Object();
69
- %SetHiddenPrototype(object, hidden_prototype);
70
- InstallFunctions(hidden_prototype, attributes, functions);
71
- }
72
-
73
-
74
- // ----------------------------------------------------------------------------
75
-
76
-
77
- // ECMA 262 - 15.1.4
78
- function GlobalIsNaN(number) {
79
- var n = ToNumber(number);
80
- return NUMBER_IS_NAN(n);
81
- }
82
-
83
-
84
- // ECMA 262 - 15.1.5
85
- function GlobalIsFinite(number) {
86
- if (!IS_NUMBER(number)) number = NonNumberToNumber(number);
87
-
88
- // NaN - NaN == NaN, Infinity - Infinity == NaN, -Infinity - -Infinity == NaN.
89
- return %_IsSmi(number) || number - number == 0;
90
- }
91
-
92
-
93
- // ECMA-262 - 15.1.2.2
94
- function GlobalParseInt(string, radix) {
95
- if (IS_UNDEFINED(radix) || radix === 10 || radix === 0) {
96
- // Some people use parseInt instead of Math.floor. This
97
- // optimization makes parseInt on a Smi 12 times faster (60ns
98
- // vs 800ns). The following optimization makes parseInt on a
99
- // non-Smi number 9 times faster (230ns vs 2070ns). Together
100
- // they make parseInt on a string 1.4% slower (274ns vs 270ns).
101
- if (%_IsSmi(string)) return string;
102
- if (IS_NUMBER(string) &&
103
- ((0.01 < string && string < 1e9) ||
104
- (-1e9 < string && string < -0.01))) {
105
- // Truncate number.
106
- return string | 0;
107
- }
108
- if (IS_UNDEFINED(radix)) radix = 0;
109
- } else {
110
- radix = TO_INT32(radix);
111
- if (!(radix == 0 || (2 <= radix && radix <= 36)))
112
- return $NaN;
113
- }
114
- string = TO_STRING_INLINE(string);
115
- if (%_HasCachedArrayIndex(string) &&
116
- (radix == 0 || radix == 10)) {
117
- return %_GetCachedArrayIndex(string);
118
- }
119
- return %StringParseInt(string, radix);
120
- }
121
-
122
-
123
- // ECMA-262 - 15.1.2.3
124
- function GlobalParseFloat(string) {
125
- string = TO_STRING_INLINE(string);
126
- if (%_HasCachedArrayIndex(string)) return %_GetCachedArrayIndex(string);
127
- return %StringParseFloat(string);
128
- }
129
-
130
-
131
- function GlobalEval(x) {
132
- if (!IS_STRING(x)) return x;
133
-
134
- var global_receiver = %GlobalReceiver(global);
135
- var this_is_global_receiver = (this === global_receiver);
136
- var global_is_detached = (global === global_receiver);
137
-
138
- if (!this_is_global_receiver || global_is_detached) {
139
- throw new $EvalError('The "this" object passed to eval must ' +
140
- 'be the global object from which eval originated');
141
- }
142
-
143
- var f = %CompileString(x);
144
- if (!IS_FUNCTION(f)) return f;
145
-
146
- return %_CallFunction(this, f);
147
- }
148
-
149
-
150
- // execScript for IE compatibility.
151
- function GlobalExecScript(expr, lang) {
152
- // NOTE: We don't care about the character casing.
153
- if (!lang || /javascript/i.test(lang)) {
154
- var f = %CompileString(ToString(expr));
155
- %_CallFunction(%GlobalReceiver(global), f);
156
- }
157
- return null;
158
- }
159
-
160
-
161
- // ----------------------------------------------------------------------------
162
-
163
-
164
- function SetupGlobal() {
165
- // ECMA 262 - 15.1.1.1.
166
- %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE);
167
-
168
- // ECMA-262 - 15.1.1.2.
169
- %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE);
170
-
171
- // ECMA-262 - 15.1.1.3.
172
- %SetProperty(global, "undefined", void 0, DONT_ENUM | DONT_DELETE);
173
-
174
- // Setup non-enumerable function on the global object.
175
- InstallFunctions(global, DONT_ENUM, $Array(
176
- "isNaN", GlobalIsNaN,
177
- "isFinite", GlobalIsFinite,
178
- "parseInt", GlobalParseInt,
179
- "parseFloat", GlobalParseFloat,
180
- "eval", GlobalEval,
181
- "execScript", GlobalExecScript
182
- ));
183
- }
184
-
185
- SetupGlobal();
186
-
187
-
188
- // ----------------------------------------------------------------------------
189
- // Boolean (first part of definition)
190
-
191
-
192
- %SetCode($Boolean, function(x) {
193
- if (%_IsConstructCall()) {
194
- %_SetValueOf(this, ToBoolean(x));
195
- } else {
196
- return ToBoolean(x);
197
- }
198
- });
199
-
200
- %FunctionSetPrototype($Boolean, new $Boolean(false));
201
-
202
- %SetProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM);
203
-
204
- // ----------------------------------------------------------------------------
205
- // Object
206
-
207
- $Object.prototype.constructor = $Object;
208
-
209
- // ECMA-262 - 15.2.4.2
210
- function ObjectToString() {
211
- return "[object " + %_ClassOf(ToObject(this)) + "]";
212
- }
213
-
214
-
215
- // ECMA-262 - 15.2.4.3
216
- function ObjectToLocaleString() {
217
- return this.toString();
218
- }
219
-
220
-
221
- // ECMA-262 - 15.2.4.4
222
- function ObjectValueOf() {
223
- return ToObject(this);
224
- }
225
-
226
-
227
- // ECMA-262 - 15.2.4.5
228
- function ObjectHasOwnProperty(V) {
229
- return %HasLocalProperty(ToObject(this), ToString(V));
230
- }
231
-
232
-
233
- // ECMA-262 - 15.2.4.6
234
- function ObjectIsPrototypeOf(V) {
235
- if (!IS_SPEC_OBJECT(V)) return false;
236
- return %IsInPrototypeChain(this, V);
237
- }
238
-
239
-
240
- // ECMA-262 - 15.2.4.6
241
- function ObjectPropertyIsEnumerable(V) {
242
- return %IsPropertyEnumerable(ToObject(this), ToString(V));
243
- }
244
-
245
-
246
- // Extensions for providing property getters and setters.
247
- function ObjectDefineGetter(name, fun) {
248
- if (this == null && !IS_UNDETECTABLE(this)) {
249
- throw new $TypeError('Object.prototype.__defineGetter__: this is Null');
250
- }
251
- if (!IS_FUNCTION(fun)) {
252
- throw new $TypeError('Object.prototype.__defineGetter__: Expecting function');
253
- }
254
- var desc = new PropertyDescriptor();
255
- desc.setGet(fun);
256
- desc.setEnumerable(true);
257
- desc.setConfigurable(true);
258
- DefineOwnProperty(ToObject(this), ToString(name), desc, false);
259
- }
260
-
261
-
262
- function ObjectLookupGetter(name) {
263
- if (this == null && !IS_UNDETECTABLE(this)) {
264
- throw new $TypeError('Object.prototype.__lookupGetter__: this is Null');
265
- }
266
- return %LookupAccessor(ToObject(this), ToString(name), GETTER);
267
- }
268
-
269
-
270
- function ObjectDefineSetter(name, fun) {
271
- if (this == null && !IS_UNDETECTABLE(this)) {
272
- throw new $TypeError('Object.prototype.__defineSetter__: this is Null');
273
- }
274
- if (!IS_FUNCTION(fun)) {
275
- throw new $TypeError(
276
- 'Object.prototype.__defineSetter__: Expecting function');
277
- }
278
- var desc = new PropertyDescriptor();
279
- desc.setSet(fun);
280
- desc.setEnumerable(true);
281
- desc.setConfigurable(true);
282
- DefineOwnProperty(ToObject(this), ToString(name), desc, false);
283
- }
284
-
285
-
286
- function ObjectLookupSetter(name) {
287
- if (this == null && !IS_UNDETECTABLE(this)) {
288
- throw new $TypeError('Object.prototype.__lookupSetter__: this is Null');
289
- }
290
- return %LookupAccessor(ToObject(this), ToString(name), SETTER);
291
- }
292
-
293
-
294
- function ObjectKeys(obj) {
295
- if (!IS_SPEC_OBJECT(obj))
296
- throw MakeTypeError("obj_ctor_property_non_object", ["keys"]);
297
- return %LocalKeys(obj);
298
- }
299
-
300
-
301
- // ES5 8.10.1.
302
- function IsAccessorDescriptor(desc) {
303
- if (IS_UNDEFINED(desc)) return false;
304
- return desc.hasGetter_ || desc.hasSetter_;
305
- }
306
-
307
-
308
- // ES5 8.10.2.
309
- function IsDataDescriptor(desc) {
310
- if (IS_UNDEFINED(desc)) return false;
311
- return desc.hasValue_ || desc.hasWritable_;
312
- }
313
-
314
-
315
- // ES5 8.10.3.
316
- function IsGenericDescriptor(desc) {
317
- return !(IsAccessorDescriptor(desc) || IsDataDescriptor(desc));
318
- }
319
-
320
-
321
- function IsInconsistentDescriptor(desc) {
322
- return IsAccessorDescriptor(desc) && IsDataDescriptor(desc);
323
- }
324
-
325
- // ES5 8.10.4
326
- function FromPropertyDescriptor(desc) {
327
- if (IS_UNDEFINED(desc)) return desc;
328
- var obj = new $Object();
329
- if (IsDataDescriptor(desc)) {
330
- obj.value = desc.getValue();
331
- obj.writable = desc.isWritable();
332
- }
333
- if (IsAccessorDescriptor(desc)) {
334
- obj.get = desc.getGet();
335
- obj.set = desc.getSet();
336
- }
337
- obj.enumerable = desc.isEnumerable();
338
- obj.configurable = desc.isConfigurable();
339
- return obj;
340
- }
341
-
342
- // ES5 8.10.5.
343
- function ToPropertyDescriptor(obj) {
344
- if (!IS_SPEC_OBJECT(obj)) {
345
- throw MakeTypeError("property_desc_object", [obj]);
346
- }
347
- var desc = new PropertyDescriptor();
348
-
349
- if ("enumerable" in obj) {
350
- desc.setEnumerable(ToBoolean(obj.enumerable));
351
- }
352
-
353
- if ("configurable" in obj) {
354
- desc.setConfigurable(ToBoolean(obj.configurable));
355
- }
356
-
357
- if ("value" in obj) {
358
- desc.setValue(obj.value);
359
- }
360
-
361
- if ("writable" in obj) {
362
- desc.setWritable(ToBoolean(obj.writable));
363
- }
364
-
365
- if ("get" in obj) {
366
- var get = obj.get;
367
- if (!IS_UNDEFINED(get) && !IS_FUNCTION(get)) {
368
- throw MakeTypeError("getter_must_be_callable", [get]);
369
- }
370
- desc.setGet(get);
371
- }
372
-
373
- if ("set" in obj) {
374
- var set = obj.set;
375
- if (!IS_UNDEFINED(set) && !IS_FUNCTION(set)) {
376
- throw MakeTypeError("setter_must_be_callable", [set]);
377
- }
378
- desc.setSet(set);
379
- }
380
-
381
- if (IsInconsistentDescriptor(desc)) {
382
- throw MakeTypeError("value_and_accessor", [obj]);
383
- }
384
- return desc;
385
- }
386
-
387
-
388
- function PropertyDescriptor() {
389
- // Initialize here so they are all in-object and have the same map.
390
- // Default values from ES5 8.6.1.
391
- this.value_ = void 0;
392
- this.hasValue_ = false;
393
- this.writable_ = false;
394
- this.hasWritable_ = false;
395
- this.enumerable_ = false;
396
- this.hasEnumerable_ = false;
397
- this.configurable_ = false;
398
- this.hasConfigurable_ = false;
399
- this.get_ = void 0;
400
- this.hasGetter_ = false;
401
- this.set_ = void 0;
402
- this.hasSetter_ = false;
403
- }
404
-
405
- PropertyDescriptor.prototype.__proto__ = null;
406
- PropertyDescriptor.prototype.toString = function() {
407
- return "[object PropertyDescriptor]";
408
- };
409
-
410
- PropertyDescriptor.prototype.setValue = function(value) {
411
- this.value_ = value;
412
- this.hasValue_ = true;
413
- }
414
-
415
-
416
- PropertyDescriptor.prototype.getValue = function() {
417
- return this.value_;
418
- }
419
-
420
-
421
- PropertyDescriptor.prototype.hasValue = function() {
422
- return this.hasValue_;
423
- }
424
-
425
-
426
- PropertyDescriptor.prototype.setEnumerable = function(enumerable) {
427
- this.enumerable_ = enumerable;
428
- this.hasEnumerable_ = true;
429
- }
430
-
431
-
432
- PropertyDescriptor.prototype.isEnumerable = function () {
433
- return this.enumerable_;
434
- }
435
-
436
-
437
- PropertyDescriptor.prototype.hasEnumerable = function() {
438
- return this.hasEnumerable_;
439
- }
440
-
441
-
442
- PropertyDescriptor.prototype.setWritable = function(writable) {
443
- this.writable_ = writable;
444
- this.hasWritable_ = true;
445
- }
446
-
447
-
448
- PropertyDescriptor.prototype.isWritable = function() {
449
- return this.writable_;
450
- }
451
-
452
-
453
- PropertyDescriptor.prototype.hasWritable = function() {
454
- return this.hasWritable_;
455
- }
456
-
457
-
458
- PropertyDescriptor.prototype.setConfigurable = function(configurable) {
459
- this.configurable_ = configurable;
460
- this.hasConfigurable_ = true;
461
- }
462
-
463
-
464
- PropertyDescriptor.prototype.hasConfigurable = function() {
465
- return this.hasConfigurable_;
466
- }
467
-
468
-
469
- PropertyDescriptor.prototype.isConfigurable = function() {
470
- return this.configurable_;
471
- }
472
-
473
-
474
- PropertyDescriptor.prototype.setGet = function(get) {
475
- this.get_ = get;
476
- this.hasGetter_ = true;
477
- }
478
-
479
-
480
- PropertyDescriptor.prototype.getGet = function() {
481
- return this.get_;
482
- }
483
-
484
-
485
- PropertyDescriptor.prototype.hasGetter = function() {
486
- return this.hasGetter_;
487
- }
488
-
489
-
490
- PropertyDescriptor.prototype.setSet = function(set) {
491
- this.set_ = set;
492
- this.hasSetter_ = true;
493
- }
494
-
495
-
496
- PropertyDescriptor.prototype.getSet = function() {
497
- return this.set_;
498
- }
499
-
500
-
501
- PropertyDescriptor.prototype.hasSetter = function() {
502
- return this.hasSetter_;
503
- }
504
-
505
-
506
- // Converts an array returned from Runtime_GetOwnProperty to an actual
507
- // property descriptor. For a description of the array layout please
508
- // see the runtime.cc file.
509
- function ConvertDescriptorArrayToDescriptor(desc_array) {
510
- if (desc_array === false) {
511
- throw 'Internal error: invalid desc_array';
512
- }
513
-
514
- if (IS_UNDEFINED(desc_array)) {
515
- return void 0;
516
- }
517
-
518
- var desc = new PropertyDescriptor();
519
- // This is an accessor.
520
- if (desc_array[IS_ACCESSOR_INDEX]) {
521
- desc.setGet(desc_array[GETTER_INDEX]);
522
- desc.setSet(desc_array[SETTER_INDEX]);
523
- } else {
524
- desc.setValue(desc_array[VALUE_INDEX]);
525
- desc.setWritable(desc_array[WRITABLE_INDEX]);
526
- }
527
- desc.setEnumerable(desc_array[ENUMERABLE_INDEX]);
528
- desc.setConfigurable(desc_array[CONFIGURABLE_INDEX]);
529
-
530
- return desc;
531
- }
532
-
533
-
534
- // ES5 section 8.12.2.
535
- function GetProperty(obj, p) {
536
- var prop = GetOwnProperty(obj);
537
- if (!IS_UNDEFINED(prop)) return prop;
538
- var proto = obj.__proto__;
539
- if (IS_NULL(proto)) return void 0;
540
- return GetProperty(proto, p);
541
- }
542
-
543
-
544
- // ES5 section 8.12.6
545
- function HasProperty(obj, p) {
546
- var desc = GetProperty(obj, p);
547
- return IS_UNDEFINED(desc) ? false : true;
548
- }
549
-
550
-
551
- // ES5 section 8.12.1.
552
- function GetOwnProperty(obj, p) {
553
- // GetOwnProperty returns an array indexed by the constants
554
- // defined in macros.py.
555
- // If p is not a property on obj undefined is returned.
556
- var props = %GetOwnProperty(ToObject(obj), ToString(p));
557
-
558
- // A false value here means that access checks failed.
559
- if (props === false) return void 0;
560
-
561
- return ConvertDescriptorArrayToDescriptor(props);
562
- }
563
-
564
-
565
- // ES5 8.12.9.
566
- function DefineOwnProperty(obj, p, desc, should_throw) {
567
- var current_or_access = %GetOwnProperty(ToObject(obj), ToString(p));
568
- // A false value here means that access checks failed.
569
- if (current_or_access === false) return void 0;
570
-
571
- var current = ConvertDescriptorArrayToDescriptor(current_or_access);
572
- var extensible = %IsExtensible(ToObject(obj));
573
-
574
- // Error handling according to spec.
575
- // Step 3
576
- if (IS_UNDEFINED(current) && !extensible) {
577
- if (should_throw) {
578
- throw MakeTypeError("define_disallowed", ["defineProperty"]);
579
- } else {
580
- return;
581
- }
582
- }
583
-
584
- if (!IS_UNDEFINED(current)) {
585
- // Step 5 and 6
586
- if ((IsGenericDescriptor(desc) ||
587
- IsDataDescriptor(desc) == IsDataDescriptor(current)) &&
588
- (!desc.hasEnumerable() ||
589
- SameValue(desc.isEnumerable(), current.isEnumerable())) &&
590
- (!desc.hasConfigurable() ||
591
- SameValue(desc.isConfigurable(), current.isConfigurable())) &&
592
- (!desc.hasWritable() ||
593
- SameValue(desc.isWritable(), current.isWritable())) &&
594
- (!desc.hasValue() ||
595
- SameValue(desc.getValue(), current.getValue())) &&
596
- (!desc.hasGetter() ||
597
- SameValue(desc.getGet(), current.getGet())) &&
598
- (!desc.hasSetter() ||
599
- SameValue(desc.getSet(), current.getSet()))) {
600
- return true;
601
- }
602
- if (!current.isConfigurable()) {
603
- // Step 7
604
- if (desc.isConfigurable() ||
605
- (desc.hasEnumerable() &&
606
- desc.isEnumerable() != current.isEnumerable())) {
607
- if (should_throw) {
608
- throw MakeTypeError("redefine_disallowed", ["defineProperty"]);
609
- } else {
610
- return;
611
- }
612
- }
613
- // Step 8
614
- if (!IsGenericDescriptor(desc)) {
615
- // Step 9a
616
- if (IsDataDescriptor(current) != IsDataDescriptor(desc)) {
617
- if (should_throw) {
618
- throw MakeTypeError("redefine_disallowed", ["defineProperty"]);
619
- } else {
620
- return;
621
- }
622
- }
623
- // Step 10a
624
- if (IsDataDescriptor(current) && IsDataDescriptor(desc)) {
625
- if (!current.isWritable() && desc.isWritable()) {
626
- if (should_throw) {
627
- throw MakeTypeError("redefine_disallowed", ["defineProperty"]);
628
- } else {
629
- return;
630
- }
631
- }
632
- if (!current.isWritable() && desc.hasValue() &&
633
- !SameValue(desc.getValue(), current.getValue())) {
634
- if (should_throw) {
635
- throw MakeTypeError("redefine_disallowed", ["defineProperty"]);
636
- } else {
637
- return;
638
- }
639
- }
640
- }
641
- // Step 11
642
- if (IsAccessorDescriptor(desc) && IsAccessorDescriptor(current)) {
643
- if (desc.hasSetter() && !SameValue(desc.getSet(), current.getSet())) {
644
- if (should_throw) {
645
- throw MakeTypeError("redefine_disallowed", ["defineProperty"]);
646
- } else {
647
- return;
648
- }
649
- }
650
- if (desc.hasGetter() && !SameValue(desc.getGet(),current.getGet())) {
651
- if (should_throw) {
652
- throw MakeTypeError("redefine_disallowed", ["defineProperty"]);
653
- } else {
654
- return;
655
- }
656
- }
657
- }
658
- }
659
- }
660
- }
661
-
662
- // Send flags - enumerable and configurable are common - writable is
663
- // only send to the data descriptor.
664
- // Take special care if enumerable and configurable is not defined on
665
- // desc (we need to preserve the existing values from current).
666
- var flag = NONE;
667
- if (desc.hasEnumerable()) {
668
- flag |= desc.isEnumerable() ? 0 : DONT_ENUM;
669
- } else if (!IS_UNDEFINED(current)) {
670
- flag |= current.isEnumerable() ? 0 : DONT_ENUM;
671
- } else {
672
- flag |= DONT_ENUM;
673
- }
674
-
675
- if (desc.hasConfigurable()) {
676
- flag |= desc.isConfigurable() ? 0 : DONT_DELETE;
677
- } else if (!IS_UNDEFINED(current)) {
678
- flag |= current.isConfigurable() ? 0 : DONT_DELETE;
679
- } else
680
- flag |= DONT_DELETE;
681
-
682
- if (IsDataDescriptor(desc) ||
683
- (IsGenericDescriptor(desc) &&
684
- (IS_UNDEFINED(current) || IsDataDescriptor(current)))) {
685
- // There are 3 cases that lead here:
686
- // Step 4a - defining a new data property.
687
- // Steps 9b & 12 - replacing an existing accessor property with a data
688
- // property.
689
- // Step 12 - updating an existing data property with a data or generic
690
- // descriptor.
691
-
692
- if (desc.hasWritable()) {
693
- flag |= desc.isWritable() ? 0 : READ_ONLY;
694
- } else if (!IS_UNDEFINED(current)) {
695
- flag |= current.isWritable() ? 0 : READ_ONLY;
696
- } else {
697
- flag |= READ_ONLY;
698
- }
699
-
700
- var value = void 0; // Default value is undefined.
701
- if (desc.hasValue()) {
702
- value = desc.getValue();
703
- } else if (!IS_UNDEFINED(current) && IsDataDescriptor(current)) {
704
- value = current.getValue();
705
- }
706
-
707
- %DefineOrRedefineDataProperty(obj, p, value, flag);
708
- } else if (IsGenericDescriptor(desc)) {
709
- // Step 12 - updating an existing accessor property with generic
710
- // descriptor. Changing flags only.
711
- %DefineOrRedefineAccessorProperty(obj, p, GETTER, current.getGet(), flag);
712
- } else {
713
- // There are 3 cases that lead here:
714
- // Step 4b - defining a new accessor property.
715
- // Steps 9c & 12 - replacing an existing data property with an accessor
716
- // property.
717
- // Step 12 - updating an existing accessor property with an accessor
718
- // descriptor.
719
- if (desc.hasGetter()) {
720
- %DefineOrRedefineAccessorProperty(obj, p, GETTER, desc.getGet(), flag);
721
- }
722
- if (desc.hasSetter()) {
723
- %DefineOrRedefineAccessorProperty(obj, p, SETTER, desc.getSet(), flag);
724
- }
725
- }
726
- return true;
727
- }
728
-
729
-
730
- // ES5 section 15.2.3.2.
731
- function ObjectGetPrototypeOf(obj) {
732
- if (!IS_SPEC_OBJECT(obj))
733
- throw MakeTypeError("obj_ctor_property_non_object", ["getPrototypeOf"]);
734
- return obj.__proto__;
735
- }
736
-
737
-
738
- // ES5 section 15.2.3.3
739
- function ObjectGetOwnPropertyDescriptor(obj, p) {
740
- if (!IS_SPEC_OBJECT(obj))
741
- throw MakeTypeError("obj_ctor_property_non_object", ["getOwnPropertyDescriptor"]);
742
- var desc = GetOwnProperty(obj, p);
743
- return FromPropertyDescriptor(desc);
744
- }
745
-
746
-
747
- // ES5 section 15.2.3.4.
748
- function ObjectGetOwnPropertyNames(obj) {
749
- if (!IS_SPEC_OBJECT(obj))
750
- throw MakeTypeError("obj_ctor_property_non_object", ["getOwnPropertyNames"]);
751
-
752
- // Find all the indexed properties.
753
-
754
- // Get the local element names.
755
- var propertyNames = %GetLocalElementNames(obj);
756
-
757
- // Get names for indexed interceptor properties.
758
- if (%GetInterceptorInfo(obj) & 1) {
759
- var indexedInterceptorNames =
760
- %GetIndexedInterceptorElementNames(obj);
761
- if (indexedInterceptorNames)
762
- propertyNames = propertyNames.concat(indexedInterceptorNames);
763
- }
764
-
765
- // Find all the named properties.
766
-
767
- // Get the local property names.
768
- propertyNames = propertyNames.concat(%GetLocalPropertyNames(obj));
769
-
770
- // Get names for named interceptor properties if any.
771
-
772
- if (%GetInterceptorInfo(obj) & 2) {
773
- var namedInterceptorNames =
774
- %GetNamedInterceptorPropertyNames(obj);
775
- if (namedInterceptorNames) {
776
- propertyNames = propertyNames.concat(namedInterceptorNames);
777
- }
778
- }
779
-
780
- // Property names are expected to be unique strings.
781
- var propertySet = {};
782
- var j = 0;
783
- for (var i = 0; i < propertyNames.length; ++i) {
784
- var name = ToString(propertyNames[i]);
785
- // We need to check for the exact property value since for intrinsic
786
- // properties like toString if(propertySet["toString"]) will always
787
- // succeed.
788
- if (propertySet[name] === true)
789
- continue;
790
- propertySet[name] = true;
791
- propertyNames[j++] = name;
792
- }
793
- propertyNames.length = j;
794
-
795
- return propertyNames;
796
- }
797
-
798
-
799
- // ES5 section 15.2.3.5.
800
- function ObjectCreate(proto, properties) {
801
- if (!IS_SPEC_OBJECT(proto) && proto !== null) {
802
- throw MakeTypeError("proto_object_or_null", [proto]);
803
- }
804
- var obj = new $Object();
805
- obj.__proto__ = proto;
806
- if (!IS_UNDEFINED(properties)) ObjectDefineProperties(obj, properties);
807
- return obj;
808
- }
809
-
810
-
811
- // ES5 section 15.2.3.6.
812
- function ObjectDefineProperty(obj, p, attributes) {
813
- if (!IS_SPEC_OBJECT(obj)) {
814
- throw MakeTypeError("obj_ctor_property_non_object", ["defineProperty"]);
815
- }
816
- var name = ToString(p);
817
- var desc = ToPropertyDescriptor(attributes);
818
- DefineOwnProperty(obj, name, desc, true);
819
- return obj;
820
- }
821
-
822
-
823
- // ES5 section 15.2.3.7.
824
- function ObjectDefineProperties(obj, properties) {
825
- if (!IS_SPEC_OBJECT(obj))
826
- throw MakeTypeError("obj_ctor_property_non_object", ["defineProperties"]);
827
- var props = ToObject(properties);
828
- var key_values = [];
829
- for (var key in props) {
830
- if (%HasLocalProperty(props, key)) {
831
- key_values.push(key);
832
- var value = props[key];
833
- var desc = ToPropertyDescriptor(value);
834
- key_values.push(desc);
835
- }
836
- }
837
- for (var i = 0; i < key_values.length; i += 2) {
838
- var key = key_values[i];
839
- var desc = key_values[i + 1];
840
- DefineOwnProperty(obj, key, desc, true);
841
- }
842
- return obj;
843
- }
844
-
845
-
846
- // ES5 section 15.2.3.8.
847
- function ObjectSeal(obj) {
848
- if (!IS_SPEC_OBJECT(obj)) {
849
- throw MakeTypeError("obj_ctor_property_non_object", ["seal"]);
850
- }
851
- var names = ObjectGetOwnPropertyNames(obj);
852
- for (var i = 0; i < names.length; i++) {
853
- var name = names[i];
854
- var desc = GetOwnProperty(obj, name);
855
- if (desc.isConfigurable()) desc.setConfigurable(false);
856
- DefineOwnProperty(obj, name, desc, true);
857
- }
858
- return ObjectPreventExtension(obj);
859
- }
860
-
861
-
862
- // ES5 section 15.2.3.9.
863
- function ObjectFreeze(obj) {
864
- if (!IS_SPEC_OBJECT(obj)) {
865
- throw MakeTypeError("obj_ctor_property_non_object", ["freeze"]);
866
- }
867
- var names = ObjectGetOwnPropertyNames(obj);
868
- for (var i = 0; i < names.length; i++) {
869
- var name = names[i];
870
- var desc = GetOwnProperty(obj, name);
871
- if (IsDataDescriptor(desc)) desc.setWritable(false);
872
- if (desc.isConfigurable()) desc.setConfigurable(false);
873
- DefineOwnProperty(obj, name, desc, true);
874
- }
875
- return ObjectPreventExtension(obj);
876
- }
877
-
878
-
879
- // ES5 section 15.2.3.10
880
- function ObjectPreventExtension(obj) {
881
- if (!IS_SPEC_OBJECT(obj)) {
882
- throw MakeTypeError("obj_ctor_property_non_object", ["preventExtension"]);
883
- }
884
- %PreventExtensions(obj);
885
- return obj;
886
- }
887
-
888
-
889
- // ES5 section 15.2.3.11
890
- function ObjectIsSealed(obj) {
891
- if (!IS_SPEC_OBJECT(obj)) {
892
- throw MakeTypeError("obj_ctor_property_non_object", ["isSealed"]);
893
- }
894
- var names = ObjectGetOwnPropertyNames(obj);
895
- for (var i = 0; i < names.length; i++) {
896
- var name = names[i];
897
- var desc = GetOwnProperty(obj, name);
898
- if (desc.isConfigurable()) return false;
899
- }
900
- if (!ObjectIsExtensible(obj)) {
901
- return true;
902
- }
903
- return false;
904
- }
905
-
906
-
907
- // ES5 section 15.2.3.12
908
- function ObjectIsFrozen(obj) {
909
- if (!IS_SPEC_OBJECT(obj)) {
910
- throw MakeTypeError("obj_ctor_property_non_object", ["isFrozen"]);
911
- }
912
- var names = ObjectGetOwnPropertyNames(obj);
913
- for (var i = 0; i < names.length; i++) {
914
- var name = names[i];
915
- var desc = GetOwnProperty(obj, name);
916
- if (IsDataDescriptor(desc) && desc.isWritable()) return false;
917
- if (desc.isConfigurable()) return false;
918
- }
919
- if (!ObjectIsExtensible(obj)) {
920
- return true;
921
- }
922
- return false;
923
- }
924
-
925
-
926
- // ES5 section 15.2.3.13
927
- function ObjectIsExtensible(obj) {
928
- if (!IS_SPEC_OBJECT(obj)) {
929
- throw MakeTypeError("obj_ctor_property_non_object", ["preventExtension"]);
930
- }
931
- return %IsExtensible(obj);
932
- }
933
-
934
-
935
- %SetCode($Object, function(x) {
936
- if (%_IsConstructCall()) {
937
- if (x == null) return this;
938
- return ToObject(x);
939
- } else {
940
- if (x == null) return { };
941
- return ToObject(x);
942
- }
943
- });
944
-
945
- %SetExpectedNumberOfProperties($Object, 4);
946
-
947
- // ----------------------------------------------------------------------------
948
-
949
-
950
- function SetupObject() {
951
- // Setup non-enumerable functions on the Object.prototype object.
952
- InstallFunctions($Object.prototype, DONT_ENUM, $Array(
953
- "toString", ObjectToString,
954
- "toLocaleString", ObjectToLocaleString,
955
- "valueOf", ObjectValueOf,
956
- "hasOwnProperty", ObjectHasOwnProperty,
957
- "isPrototypeOf", ObjectIsPrototypeOf,
958
- "propertyIsEnumerable", ObjectPropertyIsEnumerable,
959
- "__defineGetter__", ObjectDefineGetter,
960
- "__lookupGetter__", ObjectLookupGetter,
961
- "__defineSetter__", ObjectDefineSetter,
962
- "__lookupSetter__", ObjectLookupSetter
963
- ));
964
- InstallFunctions($Object, DONT_ENUM, $Array(
965
- "keys", ObjectKeys,
966
- "create", ObjectCreate,
967
- "defineProperty", ObjectDefineProperty,
968
- "defineProperties", ObjectDefineProperties,
969
- "freeze", ObjectFreeze,
970
- "getPrototypeOf", ObjectGetPrototypeOf,
971
- "getOwnPropertyDescriptor", ObjectGetOwnPropertyDescriptor,
972
- "getOwnPropertyNames", ObjectGetOwnPropertyNames,
973
- "isExtensible", ObjectIsExtensible,
974
- "isFrozen", ObjectIsFrozen,
975
- "isSealed", ObjectIsSealed,
976
- "preventExtensions", ObjectPreventExtension,
977
- "seal", ObjectSeal
978
- ));
979
- }
980
-
981
- SetupObject();
982
-
983
-
984
- // ----------------------------------------------------------------------------
985
- // Boolean
986
-
987
- function BooleanToString() {
988
- // NOTE: Both Boolean objects and values can enter here as
989
- // 'this'. This is not as dictated by ECMA-262.
990
- var b = this;
991
- if (!IS_BOOLEAN(b)) {
992
- if (!IS_BOOLEAN_WRAPPER(b)) {
993
- throw new $TypeError('Boolean.prototype.toString is not generic');
994
- }
995
- b = %_ValueOf(b);
996
- }
997
- return b ? 'true' : 'false';
998
- }
999
-
1000
-
1001
- function BooleanValueOf() {
1002
- // NOTE: Both Boolean objects and values can enter here as
1003
- // 'this'. This is not as dictated by ECMA-262.
1004
- if (!IS_BOOLEAN(this) && !IS_BOOLEAN_WRAPPER(this))
1005
- throw new $TypeError('Boolean.prototype.valueOf is not generic');
1006
- return %_ValueOf(this);
1007
- }
1008
-
1009
-
1010
- // ----------------------------------------------------------------------------
1011
-
1012
-
1013
- function SetupBoolean() {
1014
- InstallFunctions($Boolean.prototype, DONT_ENUM, $Array(
1015
- "toString", BooleanToString,
1016
- "valueOf", BooleanValueOf
1017
- ));
1018
- }
1019
-
1020
- SetupBoolean();
1021
-
1022
- // ----------------------------------------------------------------------------
1023
- // Number
1024
-
1025
- // Set the Number function and constructor.
1026
- %SetCode($Number, function(x) {
1027
- var value = %_ArgumentsLength() == 0 ? 0 : ToNumber(x);
1028
- if (%_IsConstructCall()) {
1029
- %_SetValueOf(this, value);
1030
- } else {
1031
- return value;
1032
- }
1033
- });
1034
-
1035
- %FunctionSetPrototype($Number, new $Number(0));
1036
-
1037
- // ECMA-262 section 15.7.4.2.
1038
- function NumberToString(radix) {
1039
- // NOTE: Both Number objects and values can enter here as
1040
- // 'this'. This is not as dictated by ECMA-262.
1041
- var number = this;
1042
- if (!IS_NUMBER(this)) {
1043
- if (!IS_NUMBER_WRAPPER(this))
1044
- throw new $TypeError('Number.prototype.toString is not generic');
1045
- // Get the value of this number in case it's an object.
1046
- number = %_ValueOf(this);
1047
- }
1048
- // Fast case: Convert number in radix 10.
1049
- if (IS_UNDEFINED(radix) || radix === 10) {
1050
- return %_NumberToString(number);
1051
- }
1052
-
1053
- // Convert the radix to an integer and check the range.
1054
- radix = TO_INTEGER(radix);
1055
- if (radix < 2 || radix > 36) {
1056
- throw new $RangeError('toString() radix argument must be between 2 and 36');
1057
- }
1058
- // Convert the number to a string in the given radix.
1059
- return %NumberToRadixString(number, radix);
1060
- }
1061
-
1062
-
1063
- // ECMA-262 section 15.7.4.3
1064
- function NumberToLocaleString() {
1065
- return this.toString();
1066
- }
1067
-
1068
-
1069
- // ECMA-262 section 15.7.4.4
1070
- function NumberValueOf() {
1071
- // NOTE: Both Number objects and values can enter here as
1072
- // 'this'. This is not as dictated by ECMA-262.
1073
- if (!IS_NUMBER(this) && !IS_NUMBER_WRAPPER(this))
1074
- throw new $TypeError('Number.prototype.valueOf is not generic');
1075
- return %_ValueOf(this);
1076
- }
1077
-
1078
-
1079
- // ECMA-262 section 15.7.4.5
1080
- function NumberToFixed(fractionDigits) {
1081
- var f = TO_INTEGER(fractionDigits);
1082
- if (f < 0 || f > 20) {
1083
- throw new $RangeError("toFixed() digits argument must be between 0 and 20");
1084
- }
1085
- var x = ToNumber(this);
1086
- return %NumberToFixed(x, f);
1087
- }
1088
-
1089
-
1090
- // ECMA-262 section 15.7.4.6
1091
- function NumberToExponential(fractionDigits) {
1092
- var f = -1;
1093
- if (!IS_UNDEFINED(fractionDigits)) {
1094
- f = TO_INTEGER(fractionDigits);
1095
- if (f < 0 || f > 20) {
1096
- throw new $RangeError("toExponential() argument must be between 0 and 20");
1097
- }
1098
- }
1099
- var x = ToNumber(this);
1100
- return %NumberToExponential(x, f);
1101
- }
1102
-
1103
-
1104
- // ECMA-262 section 15.7.4.7
1105
- function NumberToPrecision(precision) {
1106
- if (IS_UNDEFINED(precision)) return ToString(%_ValueOf(this));
1107
- var p = TO_INTEGER(precision);
1108
- if (p < 1 || p > 21) {
1109
- throw new $RangeError("toPrecision() argument must be between 1 and 21");
1110
- }
1111
- var x = ToNumber(this);
1112
- return %NumberToPrecision(x, p);
1113
- }
1114
-
1115
-
1116
- // ----------------------------------------------------------------------------
1117
-
1118
- function SetupNumber() {
1119
- %OptimizeObjectForAddingMultipleProperties($Number.prototype, 8);
1120
- // Setup the constructor property on the Number prototype object.
1121
- %SetProperty($Number.prototype, "constructor", $Number, DONT_ENUM);
1122
-
1123
- %OptimizeObjectForAddingMultipleProperties($Number, 5);
1124
- // ECMA-262 section 15.7.3.1.
1125
- %SetProperty($Number,
1126
- "MAX_VALUE",
1127
- 1.7976931348623157e+308,
1128
- DONT_ENUM | DONT_DELETE | READ_ONLY);
1129
-
1130
- // ECMA-262 section 15.7.3.2.
1131
- %SetProperty($Number, "MIN_VALUE", 5e-324, DONT_ENUM | DONT_DELETE | READ_ONLY);
1132
-
1133
- // ECMA-262 section 15.7.3.3.
1134
- %SetProperty($Number, "NaN", $NaN, DONT_ENUM | DONT_DELETE | READ_ONLY);
1135
-
1136
- // ECMA-262 section 15.7.3.4.
1137
- %SetProperty($Number,
1138
- "NEGATIVE_INFINITY",
1139
- -1/0,
1140
- DONT_ENUM | DONT_DELETE | READ_ONLY);
1141
-
1142
- // ECMA-262 section 15.7.3.5.
1143
- %SetProperty($Number,
1144
- "POSITIVE_INFINITY",
1145
- 1/0,
1146
- DONT_ENUM | DONT_DELETE | READ_ONLY);
1147
- %ToFastProperties($Number);
1148
-
1149
- // Setup non-enumerable functions on the Number prototype object.
1150
- InstallFunctions($Number.prototype, DONT_ENUM, $Array(
1151
- "toString", NumberToString,
1152
- "toLocaleString", NumberToLocaleString,
1153
- "valueOf", NumberValueOf,
1154
- "toFixed", NumberToFixed,
1155
- "toExponential", NumberToExponential,
1156
- "toPrecision", NumberToPrecision
1157
- ));
1158
- }
1159
-
1160
- SetupNumber();
1161
-
1162
-
1163
- // ----------------------------------------------------------------------------
1164
- // Function
1165
-
1166
- $Function.prototype.constructor = $Function;
1167
-
1168
- function FunctionSourceString(func) {
1169
- if (!IS_FUNCTION(func)) {
1170
- throw new $TypeError('Function.prototype.toString is not generic');
1171
- }
1172
-
1173
- var source = %FunctionGetSourceCode(func);
1174
- if (!IS_STRING(source) || %FunctionIsBuiltin(func)) {
1175
- var name = %FunctionGetName(func);
1176
- if (name) {
1177
- // Mimic what KJS does.
1178
- return 'function ' + name + '() { [native code] }';
1179
- } else {
1180
- return 'function () { [native code] }';
1181
- }
1182
- }
1183
-
1184
- var name = %FunctionGetName(func);
1185
- return 'function ' + name + source;
1186
- }
1187
-
1188
-
1189
- function FunctionToString() {
1190
- return FunctionSourceString(this);
1191
- }
1192
-
1193
-
1194
- // ES5 15.3.4.5
1195
- function FunctionBind(this_arg) { // Length is 1.
1196
- if (!IS_FUNCTION(this)) {
1197
- throw new $TypeError('Bind must be called on a function');
1198
- }
1199
- // this_arg is not an argument that should be bound.
1200
- var argc_bound = (%_ArgumentsLength() || 1) - 1;
1201
- var fn = this;
1202
- if (argc_bound == 0) {
1203
- var result = function() {
1204
- if (%_IsConstructCall()) {
1205
- // %NewObjectFromBound implicitly uses arguments passed to this
1206
- // function. We do not pass the arguments object explicitly to avoid
1207
- // materializing it and guarantee that this function will be optimized.
1208
- return %NewObjectFromBound(fn, null);
1209
- }
1210
-
1211
- return fn.apply(this_arg, arguments);
1212
- };
1213
- } else {
1214
- var bound_args = new InternalArray(argc_bound);
1215
- for(var i = 0; i < argc_bound; i++) {
1216
- bound_args[i] = %_Arguments(i+1);
1217
- }
1218
-
1219
- var result = function() {
1220
- // If this is a construct call we use a special runtime method
1221
- // to generate the actual object using the bound function.
1222
- if (%_IsConstructCall()) {
1223
- // %NewObjectFromBound implicitly uses arguments passed to this
1224
- // function. We do not pass the arguments object explicitly to avoid
1225
- // materializing it and guarantee that this function will be optimized.
1226
- return %NewObjectFromBound(fn, bound_args);
1227
- }
1228
-
1229
- // Combine the args we got from the bind call with the args
1230
- // given as argument to the invocation.
1231
- var argc = %_ArgumentsLength();
1232
- var args = new InternalArray(argc + argc_bound);
1233
- // Add bound arguments.
1234
- for (var i = 0; i < argc_bound; i++) {
1235
- args[i] = bound_args[i];
1236
- }
1237
- // Add arguments from call.
1238
- for (var i = 0; i < argc; i++) {
1239
- args[argc_bound + i] = %_Arguments(i);
1240
- }
1241
- return fn.apply(this_arg, args);
1242
- };
1243
- }
1244
-
1245
- // We already have caller and arguments properties on functions,
1246
- // which are non-configurable. It therefore makes no sence to
1247
- // try to redefine these as defined by the spec. The spec says
1248
- // that bind should make these throw a TypeError if get or set
1249
- // is called and make them non-enumerable and non-configurable.
1250
- // To be consistent with our normal functions we leave this as it is.
1251
-
1252
- // Set the correct length.
1253
- var length = (this.length - argc_bound) > 0 ? this.length - argc_bound : 0;
1254
- %FunctionSetLength(result, length);
1255
-
1256
- return result;
1257
- }
1258
-
1259
-
1260
- function NewFunction(arg1) { // length == 1
1261
- var n = %_ArgumentsLength();
1262
- var p = '';
1263
- if (n > 1) {
1264
- p = new InternalArray(n - 1);
1265
- for (var i = 0; i < n - 1; i++) p[i] = %_Arguments(i);
1266
- p = Join(p, n - 1, ',', NonStringToString);
1267
- // If the formal parameters string include ) - an illegal
1268
- // character - it may make the combined function expression
1269
- // compile. We avoid this problem by checking for this early on.
1270
- if (p.indexOf(')') != -1) throw MakeSyntaxError('unable_to_parse',[]);
1271
- }
1272
- var body = (n > 0) ? ToString(%_Arguments(n - 1)) : '';
1273
- var source = '(function(' + p + ') {\n' + body + '\n})';
1274
-
1275
- // The call to SetNewFunctionAttributes will ensure the prototype
1276
- // property of the resulting function is enumerable (ECMA262, 15.3.5.2).
1277
- var f = %CompileString(source)();
1278
- %FunctionSetName(f, "anonymous");
1279
- return %SetNewFunctionAttributes(f);
1280
- }
1281
-
1282
- %SetCode($Function, NewFunction);
1283
-
1284
- // ----------------------------------------------------------------------------
1285
-
1286
- function SetupFunction() {
1287
- InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1288
- "bind", FunctionBind,
1289
- "toString", FunctionToString
1290
- ));
1291
- }
1292
-
1293
- SetupFunction();