therubyracer 0.5.0-x86-linux → 0.11.0beta5-x86-linux

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 (721) hide show
  1. data/.gitignore +23 -11
  2. data/.travis.yml +10 -0
  3. data/Changelog.md +242 -0
  4. data/Gemfile +16 -0
  5. data/README.md +185 -0
  6. data/Rakefile +42 -51
  7. data/benchmarks.rb +217 -0
  8. data/ext/v8/accessor.cc +181 -0
  9. data/ext/v8/array.cc +26 -0
  10. data/ext/v8/backref.cc +56 -0
  11. data/ext/v8/build.rb +52 -0
  12. data/ext/v8/constants.cc +34 -0
  13. data/ext/v8/constraints.cc +52 -0
  14. data/ext/v8/context.cc +130 -0
  15. data/ext/v8/date.cc +18 -0
  16. data/ext/v8/exception.cc +38 -0
  17. data/ext/v8/extconf.rb +16 -29
  18. data/ext/v8/external.cc +43 -0
  19. data/ext/v8/function.cc +58 -0
  20. data/ext/v8/gc.cc +43 -0
  21. data/ext/v8/handles.cc +34 -0
  22. data/ext/v8/heap.cc +31 -0
  23. data/ext/v8/init.cc +39 -0
  24. data/ext/v8/init.so +0 -0
  25. data/ext/v8/invocation.cc +86 -0
  26. data/ext/v8/locker.cc +77 -0
  27. data/ext/v8/message.cc +51 -0
  28. data/ext/v8/object.cc +334 -0
  29. data/ext/v8/primitive.cc +8 -0
  30. data/ext/v8/rr.cc +83 -0
  31. data/ext/v8/rr.h +883 -0
  32. data/ext/v8/script.cc +80 -0
  33. data/ext/v8/signature.cc +18 -0
  34. data/ext/v8/stack.cc +75 -0
  35. data/ext/v8/string.cc +47 -0
  36. data/ext/v8/template.cc +175 -0
  37. data/ext/v8/trycatch.cc +86 -0
  38. data/ext/v8/v8.cc +87 -0
  39. data/ext/v8/value.cc +239 -0
  40. data/lib/v8.rb +30 -9
  41. data/lib/v8/access.rb +5 -0
  42. data/lib/v8/access/indices.rb +40 -0
  43. data/lib/v8/access/invocation.rb +47 -0
  44. data/lib/v8/access/names.rb +65 -0
  45. data/lib/v8/array.rb +26 -0
  46. data/lib/v8/context.rb +217 -75
  47. data/lib/v8/conversion.rb +35 -0
  48. data/lib/v8/conversion/array.rb +11 -0
  49. data/lib/v8/conversion/class.rb +120 -0
  50. data/lib/v8/conversion/code.rb +38 -0
  51. data/lib/v8/conversion/fundamental.rb +11 -0
  52. data/lib/v8/conversion/hash.rb +11 -0
  53. data/lib/v8/conversion/indentity.rb +31 -0
  54. data/lib/v8/conversion/method.rb +26 -0
  55. data/lib/v8/conversion/object.rb +28 -0
  56. data/lib/v8/conversion/primitive.rb +7 -0
  57. data/lib/v8/conversion/proc.rb +5 -0
  58. data/lib/v8/conversion/reference.rb +16 -0
  59. data/lib/v8/conversion/string.rb +12 -0
  60. data/lib/v8/conversion/symbol.rb +7 -0
  61. data/lib/v8/conversion/time.rb +13 -0
  62. data/lib/v8/error.rb +25 -0
  63. data/lib/v8/error/protect.rb +20 -0
  64. data/lib/v8/error/try.rb +15 -0
  65. data/lib/v8/function.rb +28 -0
  66. data/lib/v8/object.rb +69 -28
  67. data/lib/v8/util/weakcell.rb +29 -0
  68. data/lib/v8/version.rb +3 -0
  69. data/spec/c/array_spec.rb +17 -0
  70. data/spec/c/constants_spec.rb +20 -0
  71. data/spec/c/exception_spec.rb +26 -0
  72. data/spec/c/external_spec.rb +9 -0
  73. data/spec/c/function_spec.rb +46 -0
  74. data/spec/c/handles_spec.rb +35 -0
  75. data/spec/c/locker_spec.rb +38 -0
  76. data/spec/c/object_spec.rb +46 -0
  77. data/spec/c/script_spec.rb +28 -0
  78. data/spec/c/string_spec.rb +16 -0
  79. data/spec/c/template_spec.rb +30 -0
  80. data/spec/c/trycatch_spec.rb +51 -0
  81. data/spec/mem/blunt_spec.rb +42 -0
  82. data/spec/redjs_spec.rb +10 -0
  83. data/spec/spec_helper.rb +43 -12
  84. data/spec/threading_spec.rb +52 -0
  85. data/spec/v8/context_spec.rb +19 -0
  86. data/spec/v8/conversion_spec.rb +9 -0
  87. data/spec/v8/error_spec.rb +21 -0
  88. data/spec/v8/function_spec.rb +9 -0
  89. data/spec/v8/object_spec.rb +15 -0
  90. data/thefrontside.png +0 -0
  91. data/therubyracer.gemspec +15 -676
  92. metadata +146 -680
  93. data/.gitmodules +0 -3
  94. data/Doxyfile +0 -1514
  95. data/History.txt +0 -51
  96. data/README.rdoc +0 -158
  97. data/docs/data_conversion.txt +0 -18
  98. data/ext/v8/callbacks.cpp +0 -160
  99. data/ext/v8/callbacks.h +0 -14
  100. data/ext/v8/convert_ruby.cpp +0 -8
  101. data/ext/v8/convert_ruby.h +0 -99
  102. data/ext/v8/convert_string.cpp +0 -10
  103. data/ext/v8/convert_string.h +0 -73
  104. data/ext/v8/convert_v8.cpp +0 -9
  105. data/ext/v8/convert_v8.h +0 -121
  106. data/ext/v8/converters.cpp +0 -83
  107. data/ext/v8/converters.h +0 -23
  108. data/ext/v8/upstream/2.0.6/.gitignore +0 -26
  109. data/ext/v8/upstream/2.0.6/AUTHORS +0 -23
  110. data/ext/v8/upstream/2.0.6/ChangeLog +0 -1479
  111. data/ext/v8/upstream/2.0.6/LICENSE +0 -55
  112. data/ext/v8/upstream/2.0.6/SConstruct +0 -1028
  113. data/ext/v8/upstream/2.0.6/include/v8-debug.h +0 -275
  114. data/ext/v8/upstream/2.0.6/include/v8.h +0 -3236
  115. data/ext/v8/upstream/2.0.6/src/SConscript +0 -283
  116. data/ext/v8/upstream/2.0.6/src/accessors.cc +0 -695
  117. data/ext/v8/upstream/2.0.6/src/accessors.h +0 -114
  118. data/ext/v8/upstream/2.0.6/src/allocation.cc +0 -198
  119. data/ext/v8/upstream/2.0.6/src/allocation.h +0 -169
  120. data/ext/v8/upstream/2.0.6/src/api.cc +0 -3831
  121. data/ext/v8/upstream/2.0.6/src/api.h +0 -479
  122. data/ext/v8/upstream/2.0.6/src/apinatives.js +0 -110
  123. data/ext/v8/upstream/2.0.6/src/apiutils.h +0 -69
  124. data/ext/v8/upstream/2.0.6/src/arguments.h +0 -97
  125. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +0 -277
  126. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +0 -1821
  127. data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +0 -1027
  128. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +0 -267
  129. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +0 -1821
  130. data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +0 -1027
  131. data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +0 -1271
  132. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +0 -74
  133. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +0 -6682
  134. data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +0 -535
  135. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +0 -112
  136. data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +0 -347
  137. data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +0 -132
  138. data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +0 -213
  139. data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +0 -1166
  140. data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +0 -1698
  141. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +0 -123
  142. data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +0 -162
  143. data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +0 -849
  144. data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +0 -238
  145. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +0 -1259
  146. data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +0 -423
  147. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +0 -1266
  148. data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +0 -282
  149. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +0 -103
  150. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +0 -59
  151. data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +0 -43
  152. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +0 -2264
  153. data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +0 -306
  154. data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +0 -1516
  155. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +0 -412
  156. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +0 -532
  157. data/ext/v8/upstream/2.0.6/src/array.js +0 -1154
  158. data/ext/v8/upstream/2.0.6/src/assembler.cc +0 -772
  159. data/ext/v8/upstream/2.0.6/src/assembler.h +0 -525
  160. data/ext/v8/upstream/2.0.6/src/ast.cc +0 -512
  161. data/ext/v8/upstream/2.0.6/src/ast.h +0 -1820
  162. data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +0 -1680
  163. data/ext/v8/upstream/2.0.6/src/bootstrapper.h +0 -103
  164. data/ext/v8/upstream/2.0.6/src/builtins.cc +0 -851
  165. data/ext/v8/upstream/2.0.6/src/builtins.h +0 -245
  166. data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +0 -104
  167. data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +0 -86
  168. data/ext/v8/upstream/2.0.6/src/char-predicates.h +0 -65
  169. data/ext/v8/upstream/2.0.6/src/checks.cc +0 -100
  170. data/ext/v8/upstream/2.0.6/src/checks.h +0 -284
  171. data/ext/v8/upstream/2.0.6/src/code-stubs.cc +0 -164
  172. data/ext/v8/upstream/2.0.6/src/code-stubs.h +0 -164
  173. data/ext/v8/upstream/2.0.6/src/code.h +0 -68
  174. data/ext/v8/upstream/2.0.6/src/codegen-inl.h +0 -88
  175. data/ext/v8/upstream/2.0.6/src/codegen.cc +0 -504
  176. data/ext/v8/upstream/2.0.6/src/codegen.h +0 -522
  177. data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +0 -490
  178. data/ext/v8/upstream/2.0.6/src/compilation-cache.h +0 -98
  179. data/ext/v8/upstream/2.0.6/src/compiler.cc +0 -1132
  180. data/ext/v8/upstream/2.0.6/src/compiler.h +0 -107
  181. data/ext/v8/upstream/2.0.6/src/contexts.cc +0 -256
  182. data/ext/v8/upstream/2.0.6/src/contexts.h +0 -345
  183. data/ext/v8/upstream/2.0.6/src/conversions-inl.h +0 -95
  184. data/ext/v8/upstream/2.0.6/src/conversions.cc +0 -709
  185. data/ext/v8/upstream/2.0.6/src/conversions.h +0 -118
  186. data/ext/v8/upstream/2.0.6/src/counters.cc +0 -78
  187. data/ext/v8/upstream/2.0.6/src/counters.h +0 -239
  188. data/ext/v8/upstream/2.0.6/src/cpu.h +0 -65
  189. data/ext/v8/upstream/2.0.6/src/d8-debug.cc +0 -345
  190. data/ext/v8/upstream/2.0.6/src/d8-debug.h +0 -155
  191. data/ext/v8/upstream/2.0.6/src/d8-posix.cc +0 -675
  192. data/ext/v8/upstream/2.0.6/src/d8-readline.cc +0 -128
  193. data/ext/v8/upstream/2.0.6/src/d8-windows.cc +0 -42
  194. data/ext/v8/upstream/2.0.6/src/d8.cc +0 -776
  195. data/ext/v8/upstream/2.0.6/src/d8.h +0 -225
  196. data/ext/v8/upstream/2.0.6/src/d8.js +0 -1625
  197. data/ext/v8/upstream/2.0.6/src/date-delay.js +0 -1138
  198. data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +0 -114
  199. data/ext/v8/upstream/2.0.6/src/dateparser.cc +0 -186
  200. data/ext/v8/upstream/2.0.6/src/dateparser.h +0 -240
  201. data/ext/v8/upstream/2.0.6/src/debug-agent.cc +0 -425
  202. data/ext/v8/upstream/2.0.6/src/debug-agent.h +0 -129
  203. data/ext/v8/upstream/2.0.6/src/debug-delay.js +0 -2073
  204. data/ext/v8/upstream/2.0.6/src/debug.cc +0 -2751
  205. data/ext/v8/upstream/2.0.6/src/debug.h +0 -866
  206. data/ext/v8/upstream/2.0.6/src/disasm.h +0 -77
  207. data/ext/v8/upstream/2.0.6/src/disassembler.cc +0 -318
  208. data/ext/v8/upstream/2.0.6/src/disassembler.h +0 -56
  209. data/ext/v8/upstream/2.0.6/src/dtoa-config.c +0 -91
  210. data/ext/v8/upstream/2.0.6/src/execution.cc +0 -701
  211. data/ext/v8/upstream/2.0.6/src/execution.h +0 -312
  212. data/ext/v8/upstream/2.0.6/src/factory.cc +0 -957
  213. data/ext/v8/upstream/2.0.6/src/factory.h +0 -393
  214. data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +0 -725
  215. data/ext/v8/upstream/2.0.6/src/fast-codegen.h +0 -371
  216. data/ext/v8/upstream/2.0.6/src/flag-definitions.h +0 -426
  217. data/ext/v8/upstream/2.0.6/src/flags.cc +0 -555
  218. data/ext/v8/upstream/2.0.6/src/flags.h +0 -81
  219. data/ext/v8/upstream/2.0.6/src/frame-element.cc +0 -45
  220. data/ext/v8/upstream/2.0.6/src/frame-element.h +0 -235
  221. data/ext/v8/upstream/2.0.6/src/frames-inl.h +0 -215
  222. data/ext/v8/upstream/2.0.6/src/frames.cc +0 -749
  223. data/ext/v8/upstream/2.0.6/src/frames.h +0 -659
  224. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +0 -76
  225. data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +0 -135
  226. data/ext/v8/upstream/2.0.6/src/global-handles.cc +0 -516
  227. data/ext/v8/upstream/2.0.6/src/global-handles.h +0 -180
  228. data/ext/v8/upstream/2.0.6/src/globals.h +0 -608
  229. data/ext/v8/upstream/2.0.6/src/handles-inl.h +0 -76
  230. data/ext/v8/upstream/2.0.6/src/handles.cc +0 -811
  231. data/ext/v8/upstream/2.0.6/src/handles.h +0 -367
  232. data/ext/v8/upstream/2.0.6/src/hashmap.cc +0 -226
  233. data/ext/v8/upstream/2.0.6/src/hashmap.h +0 -120
  234. data/ext/v8/upstream/2.0.6/src/heap-inl.h +0 -407
  235. data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +0 -695
  236. data/ext/v8/upstream/2.0.6/src/heap-profiler.h +0 -277
  237. data/ext/v8/upstream/2.0.6/src/heap.cc +0 -4204
  238. data/ext/v8/upstream/2.0.6/src/heap.h +0 -1704
  239. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +0 -325
  240. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +0 -2375
  241. data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +0 -914
  242. data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +0 -1222
  243. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +0 -46
  244. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +0 -9770
  245. data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +0 -834
  246. data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +0 -79
  247. data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +0 -208
  248. data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +0 -1357
  249. data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +0 -1813
  250. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +0 -111
  251. data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +0 -135
  252. data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +0 -1490
  253. data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +0 -432
  254. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +0 -1517
  255. data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +0 -528
  256. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +0 -1219
  257. data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +0 -230
  258. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +0 -82
  259. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +0 -99
  260. data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +0 -43
  261. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +0 -30
  262. data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +0 -62
  263. data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +0 -1961
  264. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +0 -1105
  265. data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +0 -580
  266. data/ext/v8/upstream/2.0.6/src/ic-inl.h +0 -93
  267. data/ext/v8/upstream/2.0.6/src/ic.cc +0 -1426
  268. data/ext/v8/upstream/2.0.6/src/ic.h +0 -443
  269. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +0 -646
  270. data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +0 -48
  271. data/ext/v8/upstream/2.0.6/src/json-delay.js +0 -254
  272. data/ext/v8/upstream/2.0.6/src/jsregexp.cc +0 -5234
  273. data/ext/v8/upstream/2.0.6/src/jsregexp.h +0 -1439
  274. data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +0 -49
  275. data/ext/v8/upstream/2.0.6/src/jump-target.cc +0 -383
  276. data/ext/v8/upstream/2.0.6/src/jump-target.h +0 -280
  277. data/ext/v8/upstream/2.0.6/src/list-inl.h +0 -166
  278. data/ext/v8/upstream/2.0.6/src/list.h +0 -158
  279. data/ext/v8/upstream/2.0.6/src/log-inl.h +0 -126
  280. data/ext/v8/upstream/2.0.6/src/log-utils.cc +0 -503
  281. data/ext/v8/upstream/2.0.6/src/log-utils.h +0 -292
  282. data/ext/v8/upstream/2.0.6/src/log.cc +0 -1457
  283. data/ext/v8/upstream/2.0.6/src/log.h +0 -371
  284. data/ext/v8/upstream/2.0.6/src/macro-assembler.h +0 -93
  285. data/ext/v8/upstream/2.0.6/src/macros.py +0 -137
  286. data/ext/v8/upstream/2.0.6/src/mark-compact.cc +0 -2007
  287. data/ext/v8/upstream/2.0.6/src/mark-compact.h +0 -442
  288. data/ext/v8/upstream/2.0.6/src/math.js +0 -263
  289. data/ext/v8/upstream/2.0.6/src/memory.h +0 -74
  290. data/ext/v8/upstream/2.0.6/src/messages.cc +0 -177
  291. data/ext/v8/upstream/2.0.6/src/messages.h +0 -112
  292. data/ext/v8/upstream/2.0.6/src/messages.js +0 -937
  293. data/ext/v8/upstream/2.0.6/src/mirror-delay.js +0 -2332
  294. data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +0 -169
  295. data/ext/v8/upstream/2.0.6/src/natives.h +0 -63
  296. data/ext/v8/upstream/2.0.6/src/objects-debug.cc +0 -1317
  297. data/ext/v8/upstream/2.0.6/src/objects-inl.h +0 -3044
  298. data/ext/v8/upstream/2.0.6/src/objects.cc +0 -8306
  299. data/ext/v8/upstream/2.0.6/src/objects.h +0 -4960
  300. data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +0 -116
  301. data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +0 -69
  302. data/ext/v8/upstream/2.0.6/src/parser.cc +0 -4810
  303. data/ext/v8/upstream/2.0.6/src/parser.h +0 -195
  304. data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +0 -645
  305. data/ext/v8/upstream/2.0.6/src/platform-linux.cc +0 -808
  306. data/ext/v8/upstream/2.0.6/src/platform-macos.cc +0 -643
  307. data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +0 -454
  308. data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +0 -597
  309. data/ext/v8/upstream/2.0.6/src/platform-posix.cc +0 -380
  310. data/ext/v8/upstream/2.0.6/src/platform-win32.cc +0 -1908
  311. data/ext/v8/upstream/2.0.6/src/platform.h +0 -556
  312. data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +0 -1511
  313. data/ext/v8/upstream/2.0.6/src/prettyprinter.h +0 -219
  314. data/ext/v8/upstream/2.0.6/src/property.cc +0 -96
  315. data/ext/v8/upstream/2.0.6/src/property.h +0 -327
  316. data/ext/v8/upstream/2.0.6/src/regexp-delay.js +0 -406
  317. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +0 -78
  318. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +0 -464
  319. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +0 -141
  320. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +0 -356
  321. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +0 -103
  322. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +0 -240
  323. data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +0 -220
  324. data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +0 -103
  325. data/ext/v8/upstream/2.0.6/src/regexp-stack.h +0 -123
  326. data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +0 -74
  327. data/ext/v8/upstream/2.0.6/src/register-allocator.cc +0 -100
  328. data/ext/v8/upstream/2.0.6/src/register-allocator.h +0 -295
  329. data/ext/v8/upstream/2.0.6/src/rewriter.cc +0 -855
  330. data/ext/v8/upstream/2.0.6/src/rewriter.h +0 -54
  331. data/ext/v8/upstream/2.0.6/src/runtime.cc +0 -8163
  332. data/ext/v8/upstream/2.0.6/src/runtime.h +0 -432
  333. data/ext/v8/upstream/2.0.6/src/runtime.js +0 -626
  334. data/ext/v8/upstream/2.0.6/src/scanner.cc +0 -1098
  335. data/ext/v8/upstream/2.0.6/src/scanner.h +0 -425
  336. data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +0 -649
  337. data/ext/v8/upstream/2.0.6/src/scopeinfo.h +0 -236
  338. data/ext/v8/upstream/2.0.6/src/scopes.cc +0 -963
  339. data/ext/v8/upstream/2.0.6/src/scopes.h +0 -401
  340. data/ext/v8/upstream/2.0.6/src/serialize.cc +0 -1260
  341. data/ext/v8/upstream/2.0.6/src/serialize.h +0 -404
  342. data/ext/v8/upstream/2.0.6/src/shell.h +0 -55
  343. data/ext/v8/upstream/2.0.6/src/simulator.h +0 -41
  344. data/ext/v8/upstream/2.0.6/src/smart-pointer.h +0 -109
  345. data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +0 -97
  346. data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +0 -40
  347. data/ext/v8/upstream/2.0.6/src/snapshot.h +0 -59
  348. data/ext/v8/upstream/2.0.6/src/spaces-inl.h +0 -372
  349. data/ext/v8/upstream/2.0.6/src/spaces.cc +0 -2864
  350. data/ext/v8/upstream/2.0.6/src/spaces.h +0 -2072
  351. data/ext/v8/upstream/2.0.6/src/string-stream.cc +0 -584
  352. data/ext/v8/upstream/2.0.6/src/string-stream.h +0 -189
  353. data/ext/v8/upstream/2.0.6/src/string.js +0 -901
  354. data/ext/v8/upstream/2.0.6/src/stub-cache.cc +0 -1108
  355. data/ext/v8/upstream/2.0.6/src/stub-cache.h +0 -578
  356. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +0 -15
  357. data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +0 -3330
  358. data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +0 -3925
  359. data/ext/v8/upstream/2.0.6/src/token.cc +0 -56
  360. data/ext/v8/upstream/2.0.6/src/token.h +0 -270
  361. data/ext/v8/upstream/2.0.6/src/top.cc +0 -991
  362. data/ext/v8/upstream/2.0.6/src/top.h +0 -459
  363. data/ext/v8/upstream/2.0.6/src/unicode-inl.h +0 -238
  364. data/ext/v8/upstream/2.0.6/src/unicode.cc +0 -749
  365. data/ext/v8/upstream/2.0.6/src/unicode.h +0 -279
  366. data/ext/v8/upstream/2.0.6/src/uri.js +0 -415
  367. data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +0 -426
  368. data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +0 -40
  369. data/ext/v8/upstream/2.0.6/src/utils.cc +0 -322
  370. data/ext/v8/upstream/2.0.6/src/utils.h +0 -592
  371. data/ext/v8/upstream/2.0.6/src/v8-counters.cc +0 -55
  372. data/ext/v8/upstream/2.0.6/src/v8-counters.h +0 -198
  373. data/ext/v8/upstream/2.0.6/src/v8.cc +0 -193
  374. data/ext/v8/upstream/2.0.6/src/v8.h +0 -119
  375. data/ext/v8/upstream/2.0.6/src/v8natives.js +0 -846
  376. data/ext/v8/upstream/2.0.6/src/v8threads.cc +0 -450
  377. data/ext/v8/upstream/2.0.6/src/v8threads.h +0 -144
  378. data/ext/v8/upstream/2.0.6/src/variables.cc +0 -163
  379. data/ext/v8/upstream/2.0.6/src/variables.h +0 -235
  380. data/ext/v8/upstream/2.0.6/src/version.cc +0 -88
  381. data/ext/v8/upstream/2.0.6/src/version.h +0 -64
  382. data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +0 -381
  383. data/ext/v8/upstream/2.0.6/src/virtual-frame.h +0 -44
  384. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +0 -352
  385. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +0 -2539
  386. data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +0 -1399
  387. data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +0 -1255
  388. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +0 -46
  389. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +0 -8223
  390. data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +0 -785
  391. data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +0 -79
  392. data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +0 -202
  393. data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +0 -1596
  394. data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +0 -1820
  395. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +0 -109
  396. data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +0 -121
  397. data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +0 -1392
  398. data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +0 -432
  399. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +0 -2409
  400. data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +0 -765
  401. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +0 -1337
  402. data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +0 -295
  403. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +0 -86
  404. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +0 -84
  405. data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +0 -43
  406. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +0 -27
  407. data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +0 -63
  408. data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +0 -1884
  409. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +0 -1089
  410. data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +0 -560
  411. data/ext/v8/upstream/2.0.6/src/zone-inl.h +0 -297
  412. data/ext/v8/upstream/2.0.6/src/zone.cc +0 -193
  413. data/ext/v8/upstream/2.0.6/src/zone.h +0 -305
  414. data/ext/v8/upstream/2.0.6/tools/codemap.js +0 -258
  415. data/ext/v8/upstream/2.0.6/tools/consarray.js +0 -93
  416. data/ext/v8/upstream/2.0.6/tools/csvparser.js +0 -98
  417. data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +0 -620
  418. data/ext/v8/upstream/2.0.6/tools/js2c.py +0 -376
  419. data/ext/v8/upstream/2.0.6/tools/jsmin.py +0 -280
  420. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +0 -24
  421. data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +0 -78
  422. data/ext/v8/upstream/2.0.6/tools/logreader.js +0 -320
  423. data/ext/v8/upstream/2.0.6/tools/mac-nm +0 -18
  424. data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +0 -6
  425. data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +0 -7
  426. data/ext/v8/upstream/2.0.6/tools/oprofile/common +0 -19
  427. data/ext/v8/upstream/2.0.6/tools/oprofile/dump +0 -7
  428. data/ext/v8/upstream/2.0.6/tools/oprofile/report +0 -7
  429. data/ext/v8/upstream/2.0.6/tools/oprofile/reset +0 -7
  430. data/ext/v8/upstream/2.0.6/tools/oprofile/run +0 -14
  431. data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +0 -7
  432. data/ext/v8/upstream/2.0.6/tools/oprofile/start +0 -7
  433. data/ext/v8/upstream/2.0.6/tools/presubmit.py +0 -299
  434. data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +0 -120
  435. data/ext/v8/upstream/2.0.6/tools/profile.js +0 -621
  436. data/ext/v8/upstream/2.0.6/tools/profile_view.js +0 -224
  437. data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +0 -77
  438. data/ext/v8/upstream/2.0.6/tools/splaytree.js +0 -322
  439. data/ext/v8/upstream/2.0.6/tools/splaytree.py +0 -226
  440. data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +0 -456
  441. data/ext/v8/upstream/2.0.6/tools/test.py +0 -1370
  442. data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +0 -53
  443. data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +0 -731
  444. data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +0 -535
  445. data/ext/v8/upstream/2.0.6/tools/utils.py +0 -82
  446. data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +0 -71
  447. data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +0 -14
  448. data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +0 -35
  449. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +0 -199
  450. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +0 -199
  451. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +0 -201
  452. data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +0 -6
  453. data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +0 -17
  454. data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +0 -13
  455. data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +0 -6
  456. data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +0 -24
  457. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +0 -101
  458. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +0 -223
  459. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +0 -74
  460. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +0 -223
  461. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +0 -971
  462. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +0 -983
  463. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +0 -959
  464. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +0 -255
  465. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +0 -243
  466. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +0 -257
  467. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +0 -151
  468. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -151
  469. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +0 -151
  470. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +0 -151
  471. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +0 -151
  472. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +0 -151
  473. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -151
  474. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -153
  475. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +0 -142
  476. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +0 -92
  477. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -92
  478. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +0 -142
  479. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +0 -101
  480. data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +0 -223
  481. data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +0 -13
  482. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +0 -5
  483. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +0 -137
  484. data/ext/v8/upstream/Makefile +0 -32
  485. data/ext/v8/upstream/fpic-on-linux-amd64.patch +0 -13
  486. data/ext/v8/upstream/no-strict-aliasing.patch +0 -13
  487. data/ext/v8/upstream/scons/CHANGES.txt +0 -5183
  488. data/ext/v8/upstream/scons/LICENSE.txt +0 -20
  489. data/ext/v8/upstream/scons/MANIFEST +0 -202
  490. data/ext/v8/upstream/scons/PKG-INFO +0 -13
  491. data/ext/v8/upstream/scons/README.txt +0 -273
  492. data/ext/v8/upstream/scons/RELEASE.txt +0 -1040
  493. data/ext/v8/upstream/scons/engine/SCons/Action.py +0 -1256
  494. data/ext/v8/upstream/scons/engine/SCons/Builder.py +0 -868
  495. data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +0 -217
  496. data/ext/v8/upstream/scons/engine/SCons/Conftest.py +0 -794
  497. data/ext/v8/upstream/scons/engine/SCons/Debug.py +0 -237
  498. data/ext/v8/upstream/scons/engine/SCons/Defaults.py +0 -485
  499. data/ext/v8/upstream/scons/engine/SCons/Environment.py +0 -2327
  500. data/ext/v8/upstream/scons/engine/SCons/Errors.py +0 -207
  501. data/ext/v8/upstream/scons/engine/SCons/Executor.py +0 -636
  502. data/ext/v8/upstream/scons/engine/SCons/Job.py +0 -435
  503. data/ext/v8/upstream/scons/engine/SCons/Memoize.py +0 -292
  504. data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +0 -153
  505. data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +0 -3220
  506. data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +0 -128
  507. data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +0 -1341
  508. data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +0 -50
  509. data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +0 -50
  510. data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +0 -50
  511. data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +0 -50
  512. data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +0 -76
  513. data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +0 -74
  514. data/ext/v8/upstream/scons/engine/SCons/PathList.py +0 -232
  515. data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +0 -236
  516. data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +0 -70
  517. data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +0 -55
  518. data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +0 -46
  519. data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +0 -46
  520. data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +0 -44
  521. data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +0 -58
  522. data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +0 -264
  523. data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +0 -50
  524. data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +0 -386
  525. data/ext/v8/upstream/scons/engine/SCons/SConf.py +0 -1038
  526. data/ext/v8/upstream/scons/engine/SCons/SConsign.py +0 -381
  527. data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +0 -132
  528. data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +0 -74
  529. data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +0 -111
  530. data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +0 -320
  531. data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +0 -48
  532. data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +0 -378
  533. data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +0 -103
  534. data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +0 -55
  535. data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +0 -415
  536. data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +0 -386
  537. data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +0 -1360
  538. data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +0 -944
  539. data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +0 -642
  540. data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +0 -414
  541. data/ext/v8/upstream/scons/engine/SCons/Sig.py +0 -63
  542. data/ext/v8/upstream/scons/engine/SCons/Subst.py +0 -911
  543. data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +0 -1030
  544. data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +0 -61
  545. data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +0 -65
  546. data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +0 -73
  547. data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +0 -247
  548. data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +0 -324
  549. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +0 -56
  550. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +0 -61
  551. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +0 -210
  552. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +0 -84
  553. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +0 -321
  554. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +0 -367
  555. data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +0 -497
  556. data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +0 -104
  557. data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +0 -138
  558. data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +0 -64
  559. data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +0 -64
  560. data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +0 -71
  561. data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +0 -675
  562. data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +0 -82
  563. data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +0 -74
  564. data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +0 -80
  565. data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +0 -76
  566. data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +0 -71
  567. data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +0 -63
  568. data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +0 -78
  569. data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +0 -82
  570. data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +0 -99
  571. data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +0 -114
  572. data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +0 -58
  573. data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +0 -50
  574. data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +0 -224
  575. data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +0 -64
  576. data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +0 -125
  577. data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +0 -94
  578. data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +0 -62
  579. data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +0 -62
  580. data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +0 -63
  581. data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +0 -98
  582. data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +0 -63
  583. data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +0 -90
  584. data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +0 -73
  585. data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +0 -53
  586. data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +0 -80
  587. data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +0 -64
  588. data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +0 -63
  589. data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +0 -81
  590. data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +0 -85
  591. data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +0 -53
  592. data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +0 -77
  593. data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +0 -59
  594. data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +0 -52
  595. data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +0 -72
  596. data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +0 -90
  597. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +0 -59
  598. data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +0 -60
  599. data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +0 -229
  600. data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +0 -490
  601. data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +0 -71
  602. data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +0 -110
  603. data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +0 -234
  604. data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +0 -138
  605. data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +0 -79
  606. data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +0 -99
  607. data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +0 -121
  608. data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +0 -112
  609. data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +0 -63
  610. data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +0 -77
  611. data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +0 -90
  612. data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +0 -159
  613. data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +0 -64
  614. data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +0 -266
  615. data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +0 -50
  616. data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +0 -269
  617. data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +0 -1439
  618. data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +0 -208
  619. data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +0 -107
  620. data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +0 -72
  621. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +0 -314
  622. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +0 -185
  623. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +0 -526
  624. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +0 -367
  625. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +0 -43
  626. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +0 -43
  627. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +0 -43
  628. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +0 -44
  629. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +0 -44
  630. data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +0 -44
  631. data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +0 -78
  632. data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +0 -83
  633. data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +0 -108
  634. data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +0 -336
  635. data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +0 -121
  636. data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +0 -70
  637. data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +0 -132
  638. data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +0 -68
  639. data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +0 -58
  640. data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +0 -53
  641. data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +0 -63
  642. data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +0 -67
  643. data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +0 -142
  644. data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +0 -58
  645. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +0 -63
  646. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +0 -64
  647. data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +0 -64
  648. data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +0 -77
  649. data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +0 -186
  650. data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +0 -73
  651. data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +0 -805
  652. data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +0 -175
  653. data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +0 -53
  654. data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +0 -100
  655. data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +0 -131
  656. data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +0 -100
  657. data/ext/v8/upstream/scons/engine/SCons/Util.py +0 -1645
  658. data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +0 -91
  659. data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +0 -107
  660. data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +0 -139
  661. data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +0 -109
  662. data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +0 -147
  663. data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +0 -317
  664. data/ext/v8/upstream/scons/engine/SCons/Warnings.py +0 -228
  665. data/ext/v8/upstream/scons/engine/SCons/__init__.py +0 -49
  666. data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +0 -302
  667. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +0 -98
  668. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +0 -91
  669. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +0 -124
  670. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +0 -1725
  671. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +0 -583
  672. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +0 -176
  673. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +0 -325
  674. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +0 -1296
  675. data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +0 -382
  676. data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +0 -187
  677. data/ext/v8/upstream/scons/engine/SCons/cpp.py +0 -598
  678. data/ext/v8/upstream/scons/engine/SCons/dblite.py +0 -248
  679. data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +0 -77
  680. data/ext/v8/upstream/scons/os_spawnv_fix.diff +0 -83
  681. data/ext/v8/upstream/scons/scons-time.1 +0 -1017
  682. data/ext/v8/upstream/scons/scons.1 +0 -15179
  683. data/ext/v8/upstream/scons/sconsign.1 +0 -208
  684. data/ext/v8/upstream/scons/script/scons +0 -184
  685. data/ext/v8/upstream/scons/script/scons-time +0 -1529
  686. data/ext/v8/upstream/scons/script/scons.bat +0 -31
  687. data/ext/v8/upstream/scons/script/sconsign +0 -508
  688. data/ext/v8/upstream/scons/setup.cfg +0 -6
  689. data/ext/v8/upstream/scons/setup.py +0 -427
  690. data/ext/v8/v8.cpp +0 -89
  691. data/ext/v8/v8_cxt.cpp +0 -92
  692. data/ext/v8/v8_cxt.h +0 -20
  693. data/ext/v8/v8_func.cpp +0 -10
  694. data/ext/v8/v8_func.h +0 -11
  695. data/ext/v8/v8_msg.cpp +0 -54
  696. data/ext/v8/v8_msg.h +0 -18
  697. data/ext/v8/v8_obj.cpp +0 -52
  698. data/ext/v8/v8_obj.h +0 -13
  699. data/ext/v8/v8_ref.cpp +0 -26
  700. data/ext/v8/v8_ref.h +0 -31
  701. data/ext/v8/v8_script.cpp +0 -20
  702. data/ext/v8/v8_script.h +0 -8
  703. data/ext/v8/v8_standalone.cpp +0 -69
  704. data/ext/v8/v8_standalone.h +0 -31
  705. data/ext/v8/v8_str.cpp +0 -17
  706. data/ext/v8/v8_str.h +0 -9
  707. data/ext/v8/v8_template.cpp +0 -53
  708. data/ext/v8/v8_template.h +0 -13
  709. data/lib/v8/to.rb +0 -33
  710. data/lib/v8/v8.so +0 -0
  711. data/script/console +0 -10
  712. data/script/destroy +0 -14
  713. data/script/generate +0 -14
  714. data/spec/ext/cxt_spec.rb +0 -25
  715. data/spec/ext/obj_spec.rb +0 -13
  716. data/spec/redjs/jsapi_spec.rb +0 -405
  717. data/spec/redjs/tap.rb +0 -8
  718. data/spec/redjs_helper.rb +0 -3
  719. data/spec/spec.opts +0 -1
  720. data/spec/v8/to_spec.rb +0 -15
  721. data/tasks/rspec.rake +0 -21
@@ -1,1271 +0,0 @@
1
- // Copyright 2006-2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #include "v8.h"
29
-
30
- #include "codegen-inl.h"
31
- #include "debug.h"
32
- #include "runtime.h"
33
-
34
- namespace v8 {
35
- namespace internal {
36
-
37
-
38
- #define __ ACCESS_MASM(masm)
39
-
40
-
41
- void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) {
42
- // TODO(428): Don't pass the function in a static variable.
43
- __ mov(ip, Operand(ExternalReference::builtin_passed_function()));
44
- __ str(r1, MemOperand(ip, 0));
45
-
46
- // The actual argument count has already been loaded into register
47
- // r0, but JumpToRuntime expects r0 to contain the number of
48
- // arguments including the receiver.
49
- __ add(r0, r0, Operand(1));
50
- __ JumpToRuntime(ExternalReference(id));
51
- }
52
-
53
-
54
- // Load the built-in Array function from the current context.
55
- static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) {
56
- // Load the global context.
57
-
58
- __ ldr(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
59
- __ ldr(result,
60
- FieldMemOperand(result, GlobalObject::kGlobalContextOffset));
61
- // Load the Array function from the global context.
62
- __ ldr(result,
63
- MemOperand(result,
64
- Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
65
- }
66
-
67
-
68
- // This constant has the same value as JSArray::kPreallocatedArrayElements and
69
- // if JSArray::kPreallocatedArrayElements is changed handling of loop unfolding
70
- // below should be reconsidered.
71
- static const int kLoopUnfoldLimit = 4;
72
-
73
-
74
- // Allocate an empty JSArray. The allocated array is put into the result
75
- // register. An elements backing store is allocated with size initial_capacity
76
- // and filled with the hole values.
77
- static void AllocateEmptyJSArray(MacroAssembler* masm,
78
- Register array_function,
79
- Register result,
80
- Register scratch1,
81
- Register scratch2,
82
- Register scratch3,
83
- int initial_capacity,
84
- Label* gc_required) {
85
- ASSERT(initial_capacity > 0);
86
- // Load the initial map from the array function.
87
- __ ldr(scratch1, FieldMemOperand(array_function,
88
- JSFunction::kPrototypeOrInitialMapOffset));
89
-
90
- // Allocate the JSArray object together with space for a fixed array with the
91
- // requested elements.
92
- int size = JSArray::kSize + FixedArray::SizeFor(initial_capacity);
93
- __ AllocateInNewSpace(size / kPointerSize,
94
- result,
95
- scratch2,
96
- scratch3,
97
- gc_required,
98
- TAG_OBJECT);
99
-
100
- // Allocated the JSArray. Now initialize the fields except for the elements
101
- // array.
102
- // result: JSObject
103
- // scratch1: initial map
104
- // scratch2: start of next object
105
- __ str(scratch1, FieldMemOperand(result, JSObject::kMapOffset));
106
- __ LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex);
107
- __ str(scratch1, FieldMemOperand(result, JSArray::kPropertiesOffset));
108
- // Field JSArray::kElementsOffset is initialized later.
109
- __ mov(scratch3, Operand(0));
110
- __ str(scratch3, FieldMemOperand(result, JSArray::kLengthOffset));
111
-
112
- // Calculate the location of the elements array and set elements array member
113
- // of the JSArray.
114
- // result: JSObject
115
- // scratch2: start of next object
116
- __ lea(scratch1, MemOperand(result, JSArray::kSize));
117
- __ str(scratch1, FieldMemOperand(result, JSArray::kElementsOffset));
118
-
119
- // Clear the heap tag on the elements array.
120
- __ and_(scratch1, scratch1, Operand(~kHeapObjectTagMask));
121
-
122
- // Initialize the FixedArray and fill it with holes. FixedArray length is not
123
- // stored as a smi.
124
- // result: JSObject
125
- // scratch1: elements array (untagged)
126
- // scratch2: start of next object
127
- __ LoadRoot(scratch3, Heap::kFixedArrayMapRootIndex);
128
- ASSERT_EQ(0 * kPointerSize, FixedArray::kMapOffset);
129
- __ str(scratch3, MemOperand(scratch1, kPointerSize, PostIndex));
130
- __ mov(scratch3, Operand(initial_capacity));
131
- ASSERT_EQ(1 * kPointerSize, FixedArray::kLengthOffset);
132
- __ str(scratch3, MemOperand(scratch1, kPointerSize, PostIndex));
133
-
134
- // Fill the FixedArray with the hole value.
135
- ASSERT_EQ(2 * kPointerSize, FixedArray::kHeaderSize);
136
- ASSERT(initial_capacity <= kLoopUnfoldLimit);
137
- __ LoadRoot(scratch3, Heap::kTheHoleValueRootIndex);
138
- for (int i = 0; i < initial_capacity; i++) {
139
- __ str(scratch3, MemOperand(scratch1, kPointerSize, PostIndex));
140
- }
141
- }
142
-
143
- // Allocate a JSArray with the number of elements stored in a register. The
144
- // register array_function holds the built-in Array function and the register
145
- // array_size holds the size of the array as a smi. The allocated array is put
146
- // into the result register and beginning and end of the FixedArray elements
147
- // storage is put into registers elements_array_storage and elements_array_end
148
- // (see below for when that is not the case). If the parameter fill_with_holes
149
- // is true the allocated elements backing store is filled with the hole values
150
- // otherwise it is left uninitialized. When the backing store is filled the
151
- // register elements_array_storage is scratched.
152
- static void AllocateJSArray(MacroAssembler* masm,
153
- Register array_function, // Array function.
154
- Register array_size, // As a smi.
155
- Register result,
156
- Register elements_array_storage,
157
- Register elements_array_end,
158
- Register scratch1,
159
- Register scratch2,
160
- bool fill_with_hole,
161
- Label* gc_required) {
162
- Label not_empty, allocated;
163
-
164
- // Load the initial map from the array function.
165
- __ ldr(elements_array_storage,
166
- FieldMemOperand(array_function,
167
- JSFunction::kPrototypeOrInitialMapOffset));
168
-
169
- // Check whether an empty sized array is requested.
170
- __ tst(array_size, array_size);
171
- __ b(nz, &not_empty);
172
-
173
- // If an empty array is requested allocate a small elements array anyway. This
174
- // keeps the code below free of special casing for the empty array.
175
- int size = JSArray::kSize +
176
- FixedArray::SizeFor(JSArray::kPreallocatedArrayElements);
177
- __ AllocateInNewSpace(size / kPointerSize,
178
- result,
179
- elements_array_end,
180
- scratch1,
181
- gc_required,
182
- TAG_OBJECT);
183
- __ jmp(&allocated);
184
-
185
- // Allocate the JSArray object together with space for a FixedArray with the
186
- // requested number of elements.
187
- __ bind(&not_empty);
188
- ASSERT(kSmiTagSize == 1 && kSmiTag == 0);
189
- __ mov(elements_array_end,
190
- Operand((JSArray::kSize + FixedArray::kHeaderSize) / kPointerSize));
191
- __ add(elements_array_end,
192
- elements_array_end,
193
- Operand(array_size, ASR, kSmiTagSize));
194
- __ AllocateInNewSpace(elements_array_end,
195
- result,
196
- scratch1,
197
- scratch2,
198
- gc_required,
199
- TAG_OBJECT);
200
-
201
- // Allocated the JSArray. Now initialize the fields except for the elements
202
- // array.
203
- // result: JSObject
204
- // elements_array_storage: initial map
205
- // array_size: size of array (smi)
206
- __ bind(&allocated);
207
- __ str(elements_array_storage, FieldMemOperand(result, JSObject::kMapOffset));
208
- __ LoadRoot(elements_array_storage, Heap::kEmptyFixedArrayRootIndex);
209
- __ str(elements_array_storage,
210
- FieldMemOperand(result, JSArray::kPropertiesOffset));
211
- // Field JSArray::kElementsOffset is initialized later.
212
- __ str(array_size, FieldMemOperand(result, JSArray::kLengthOffset));
213
-
214
- // Calculate the location of the elements array and set elements array member
215
- // of the JSArray.
216
- // result: JSObject
217
- // array_size: size of array (smi)
218
- __ add(elements_array_storage, result, Operand(JSArray::kSize));
219
- __ str(elements_array_storage,
220
- FieldMemOperand(result, JSArray::kElementsOffset));
221
-
222
- // Clear the heap tag on the elements array.
223
- __ and_(elements_array_storage,
224
- elements_array_storage,
225
- Operand(~kHeapObjectTagMask));
226
- // Initialize the fixed array and fill it with holes. FixedArray length is not
227
- // stored as a smi.
228
- // result: JSObject
229
- // elements_array_storage: elements array (untagged)
230
- // array_size: size of array (smi)
231
- ASSERT(kSmiTag == 0);
232
- __ LoadRoot(scratch1, Heap::kFixedArrayMapRootIndex);
233
- ASSERT_EQ(0 * kPointerSize, FixedArray::kMapOffset);
234
- __ str(scratch1, MemOperand(elements_array_storage, kPointerSize, PostIndex));
235
- // Convert array_size from smi to value.
236
- __ mov(array_size,
237
- Operand(array_size, ASR, kSmiTagSize));
238
- __ tst(array_size, array_size);
239
- // Length of the FixedArray is the number of pre-allocated elements if
240
- // the actual JSArray has length 0 and the size of the JSArray for non-empty
241
- // JSArrays. The length of a FixedArray is not stored as a smi.
242
- __ mov(array_size, Operand(JSArray::kPreallocatedArrayElements), LeaveCC, eq);
243
- ASSERT_EQ(1 * kPointerSize, FixedArray::kLengthOffset);
244
- __ str(array_size,
245
- MemOperand(elements_array_storage, kPointerSize, PostIndex));
246
-
247
- // Calculate elements array and elements array end.
248
- // result: JSObject
249
- // elements_array_storage: elements array element storage
250
- // array_size: size of elements array
251
- __ add(elements_array_end,
252
- elements_array_storage,
253
- Operand(array_size, LSL, kPointerSizeLog2));
254
-
255
- // Fill the allocated FixedArray with the hole value if requested.
256
- // result: JSObject
257
- // elements_array_storage: elements array element storage
258
- // elements_array_end: start of next object
259
- if (fill_with_hole) {
260
- Label loop, entry;
261
- __ LoadRoot(scratch1, Heap::kTheHoleValueRootIndex);
262
- __ jmp(&entry);
263
- __ bind(&loop);
264
- __ str(scratch1,
265
- MemOperand(elements_array_storage, kPointerSize, PostIndex));
266
- __ bind(&entry);
267
- __ cmp(elements_array_storage, elements_array_end);
268
- __ b(lt, &loop);
269
- }
270
- }
271
-
272
- // Create a new array for the built-in Array function. This function allocates
273
- // the JSArray object and the FixedArray elements array and initializes these.
274
- // If the Array cannot be constructed in native code the runtime is called. This
275
- // function assumes the following state:
276
- // r0: argc
277
- // r1: constructor (built-in Array function)
278
- // lr: return address
279
- // sp[0]: last argument
280
- // This function is used for both construct and normal calls of Array. The only
281
- // difference between handling a construct call and a normal call is that for a
282
- // construct call the constructor function in r1 needs to be preserved for
283
- // entering the generic code. In both cases argc in r0 needs to be preserved.
284
- // Both registers are preserved by this code so no need to differentiate between
285
- // construct call and normal call.
286
- static void ArrayNativeCode(MacroAssembler* masm,
287
- Label* call_generic_code) {
288
- Label argc_one_or_more, argc_two_or_more;
289
-
290
- // Check for array construction with zero arguments or one.
291
- __ cmp(r0, Operand(0));
292
- __ b(ne, &argc_one_or_more);
293
-
294
- // Handle construction of an empty array.
295
- AllocateEmptyJSArray(masm,
296
- r1,
297
- r2,
298
- r3,
299
- r4,
300
- r5,
301
- JSArray::kPreallocatedArrayElements,
302
- call_generic_code);
303
- __ IncrementCounter(&Counters::array_function_native, 1, r3, r4);
304
- // Setup return value, remove receiver from stack and return.
305
- __ mov(r0, r2);
306
- __ add(sp, sp, Operand(kPointerSize));
307
- __ Jump(lr);
308
-
309
- // Check for one argument. Bail out if argument is not smi or if it is
310
- // negative.
311
- __ bind(&argc_one_or_more);
312
- __ cmp(r0, Operand(1));
313
- __ b(ne, &argc_two_or_more);
314
- ASSERT(kSmiTag == 0);
315
- __ ldr(r2, MemOperand(sp)); // Get the argument from the stack.
316
- __ and_(r3, r2, Operand(kIntptrSignBit | kSmiTagMask), SetCC);
317
- __ b(ne, call_generic_code);
318
-
319
- // Handle construction of an empty array of a certain size. Bail out if size
320
- // is too large to actually allocate an elements array.
321
- ASSERT(kSmiTag == 0);
322
- __ cmp(r2, Operand(JSObject::kInitialMaxFastElementArray << kSmiTagSize));
323
- __ b(ge, call_generic_code);
324
-
325
- // r0: argc
326
- // r1: constructor
327
- // r2: array_size (smi)
328
- // sp[0]: argument
329
- AllocateJSArray(masm,
330
- r1,
331
- r2,
332
- r3,
333
- r4,
334
- r5,
335
- r6,
336
- r7,
337
- true,
338
- call_generic_code);
339
- __ IncrementCounter(&Counters::array_function_native, 1, r2, r4);
340
- // Setup return value, remove receiver and argument from stack and return.
341
- __ mov(r0, r3);
342
- __ add(sp, sp, Operand(2 * kPointerSize));
343
- __ Jump(lr);
344
-
345
- // Handle construction of an array from a list of arguments.
346
- __ bind(&argc_two_or_more);
347
- __ mov(r2, Operand(r0, LSL, kSmiTagSize)); // Convet argc to a smi.
348
-
349
- // r0: argc
350
- // r1: constructor
351
- // r2: array_size (smi)
352
- // sp[0]: last argument
353
- AllocateJSArray(masm,
354
- r1,
355
- r2,
356
- r3,
357
- r4,
358
- r5,
359
- r6,
360
- r7,
361
- false,
362
- call_generic_code);
363
- __ IncrementCounter(&Counters::array_function_native, 1, r2, r6);
364
-
365
- // Fill arguments as array elements. Copy from the top of the stack (last
366
- // element) to the array backing store filling it backwards. Note:
367
- // elements_array_end points after the backing store therefore PreIndex is
368
- // used when filling the backing store.
369
- // r0: argc
370
- // r3: JSArray
371
- // r4: elements_array storage start (untagged)
372
- // r5: elements_array_end (untagged)
373
- // sp[0]: last argument
374
- Label loop, entry;
375
- __ jmp(&entry);
376
- __ bind(&loop);
377
- __ ldr(r2, MemOperand(sp, kPointerSize, PostIndex));
378
- __ str(r2, MemOperand(r5, -kPointerSize, PreIndex));
379
- __ bind(&entry);
380
- __ cmp(r4, r5);
381
- __ b(lt, &loop);
382
-
383
- // Remove caller arguments and receiver from the stack, setup return value and
384
- // return.
385
- // r0: argc
386
- // r3: JSArray
387
- // sp[0]: receiver
388
- __ add(sp, sp, Operand(kPointerSize));
389
- __ mov(r0, r3);
390
- __ Jump(lr);
391
- }
392
-
393
-
394
- void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
395
- // ----------- S t a t e -------------
396
- // -- r0 : number of arguments
397
- // -- lr : return address
398
- // -- sp[...]: constructor arguments
399
- // -----------------------------------
400
- Label generic_array_code, one_or_more_arguments, two_or_more_arguments;
401
-
402
- // Get the Array function.
403
- GenerateLoadArrayFunction(masm, r1);
404
-
405
- if (FLAG_debug_code) {
406
- // Initial map for the builtin Array function shoud be a map.
407
- __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
408
- __ tst(r2, Operand(kSmiTagMask));
409
- __ Assert(ne, "Unexpected initial map for Array function");
410
- __ CompareObjectType(r2, r3, r4, MAP_TYPE);
411
- __ Assert(eq, "Unexpected initial map for Array function");
412
- }
413
-
414
- // Run the native code for the Array function called as a normal function.
415
- ArrayNativeCode(masm, &generic_array_code);
416
-
417
- // Jump to the generic array code if the specialized code cannot handle
418
- // the construction.
419
- __ bind(&generic_array_code);
420
- Code* code = Builtins::builtin(Builtins::ArrayCodeGeneric);
421
- Handle<Code> array_code(code);
422
- __ Jump(array_code, RelocInfo::CODE_TARGET);
423
- }
424
-
425
-
426
- void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
427
- // ----------- S t a t e -------------
428
- // -- r0 : number of arguments
429
- // -- r1 : constructor function
430
- // -- lr : return address
431
- // -- sp[...]: constructor arguments
432
- // -----------------------------------
433
- Label generic_constructor;
434
-
435
- if (FLAG_debug_code) {
436
- // The array construct code is only set for the builtin Array function which
437
- // always have a map.
438
- GenerateLoadArrayFunction(masm, r2);
439
- __ cmp(r1, r2);
440
- __ Assert(eq, "Unexpected Array function");
441
- // Initial map for the builtin Array function should be a map.
442
- __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
443
- __ tst(r2, Operand(kSmiTagMask));
444
- __ Assert(ne, "Unexpected initial map for Array function");
445
- __ CompareObjectType(r2, r3, r4, MAP_TYPE);
446
- __ Assert(eq, "Unexpected initial map for Array function");
447
- }
448
-
449
- // Run the native code for the Array function called as a constructor.
450
- ArrayNativeCode(masm, &generic_constructor);
451
-
452
- // Jump to the generic construct code in case the specialized code cannot
453
- // handle the construction.
454
- __ bind(&generic_constructor);
455
- Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric);
456
- Handle<Code> generic_construct_stub(code);
457
- __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
458
- }
459
-
460
-
461
- void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
462
- // ----------- S t a t e -------------
463
- // -- r0 : number of arguments
464
- // -- r1 : constructor function
465
- // -- lr : return address
466
- // -- sp[...]: constructor arguments
467
- // -----------------------------------
468
-
469
- Label non_function_call;
470
- // Check that the function is not a smi.
471
- __ tst(r1, Operand(kSmiTagMask));
472
- __ b(eq, &non_function_call);
473
- // Check that the function is a JSFunction.
474
- __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE);
475
- __ b(ne, &non_function_call);
476
-
477
- // Jump to the function-specific construct stub.
478
- __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
479
- __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kConstructStubOffset));
480
- __ add(pc, r2, Operand(Code::kHeaderSize - kHeapObjectTag));
481
-
482
- // r0: number of arguments
483
- // r1: called object
484
- __ bind(&non_function_call);
485
-
486
- // Set expected number of arguments to zero (not changing r0).
487
- __ mov(r2, Operand(0));
488
- __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
489
- __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
490
- RelocInfo::CODE_TARGET);
491
- }
492
-
493
-
494
- void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
495
- // Enter a construct frame.
496
- __ EnterConstructFrame();
497
-
498
- // Preserve the two incoming parameters on the stack.
499
- __ mov(r0, Operand(r0, LSL, kSmiTagSize));
500
- __ push(r0); // Smi-tagged arguments count.
501
- __ push(r1); // Constructor function.
502
-
503
- // Use r7 for holding undefined which is used in several places below.
504
- __ LoadRoot(r7, Heap::kUndefinedValueRootIndex);
505
-
506
- // Try to allocate the object without transitioning into C code. If any of the
507
- // preconditions is not met, the code bails out to the runtime call.
508
- Label rt_call, allocated;
509
- if (FLAG_inline_new) {
510
- Label undo_allocation;
511
- #ifdef ENABLE_DEBUGGER_SUPPORT
512
- ExternalReference debug_step_in_fp =
513
- ExternalReference::debug_step_in_fp_address();
514
- __ mov(r2, Operand(debug_step_in_fp));
515
- __ ldr(r2, MemOperand(r2));
516
- __ tst(r2, r2);
517
- __ b(nz, &rt_call);
518
- #endif
519
-
520
- // Load the initial map and verify that it is in fact a map.
521
- // r1: constructor function
522
- // r7: undefined
523
- __ ldr(r2, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
524
- __ tst(r2, Operand(kSmiTagMask));
525
- __ b(eq, &rt_call);
526
- __ CompareObjectType(r2, r3, r4, MAP_TYPE);
527
- __ b(ne, &rt_call);
528
-
529
- // Check that the constructor is not constructing a JSFunction (see comments
530
- // in Runtime_NewObject in runtime.cc). In which case the initial map's
531
- // instance type would be JS_FUNCTION_TYPE.
532
- // r1: constructor function
533
- // r2: initial map
534
- // r7: undefined
535
- __ CompareInstanceType(r2, r3, JS_FUNCTION_TYPE);
536
- __ b(eq, &rt_call);
537
-
538
- // Now allocate the JSObject on the heap.
539
- // r1: constructor function
540
- // r2: initial map
541
- // r7: undefined
542
- __ ldrb(r3, FieldMemOperand(r2, Map::kInstanceSizeOffset));
543
- __ AllocateInNewSpace(r3, r4, r5, r6, &rt_call, NO_ALLOCATION_FLAGS);
544
-
545
- // Allocated the JSObject, now initialize the fields. Map is set to initial
546
- // map and properties and elements are set to empty fixed array.
547
- // r1: constructor function
548
- // r2: initial map
549
- // r3: object size
550
- // r4: JSObject (not tagged)
551
- // r7: undefined
552
- __ LoadRoot(r6, Heap::kEmptyFixedArrayRootIndex);
553
- __ mov(r5, r4);
554
- ASSERT_EQ(0 * kPointerSize, JSObject::kMapOffset);
555
- __ str(r2, MemOperand(r5, kPointerSize, PostIndex));
556
- ASSERT_EQ(1 * kPointerSize, JSObject::kPropertiesOffset);
557
- __ str(r6, MemOperand(r5, kPointerSize, PostIndex));
558
- ASSERT_EQ(2 * kPointerSize, JSObject::kElementsOffset);
559
- __ str(r6, MemOperand(r5, kPointerSize, PostIndex));
560
-
561
- // Fill all the in-object properties with undefined.
562
- // r1: constructor function
563
- // r2: initial map
564
- // r3: object size (in words)
565
- // r4: JSObject (not tagged)
566
- // r5: First in-object property of JSObject (not tagged)
567
- // r7: undefined
568
- __ add(r6, r4, Operand(r3, LSL, kPointerSizeLog2)); // End of object.
569
- ASSERT_EQ(3 * kPointerSize, JSObject::kHeaderSize);
570
- { Label loop, entry;
571
- __ b(&entry);
572
- __ bind(&loop);
573
- __ str(r7, MemOperand(r5, kPointerSize, PostIndex));
574
- __ bind(&entry);
575
- __ cmp(r5, Operand(r6));
576
- __ b(lt, &loop);
577
- }
578
-
579
- // Add the object tag to make the JSObject real, so that we can continue and
580
- // jump into the continuation code at any time from now on. Any failures
581
- // need to undo the allocation, so that the heap is in a consistent state
582
- // and verifiable.
583
- __ add(r4, r4, Operand(kHeapObjectTag));
584
-
585
- // Check if a non-empty properties array is needed. Continue with allocated
586
- // object if not fall through to runtime call if it is.
587
- // r1: constructor function
588
- // r4: JSObject
589
- // r5: start of next object (not tagged)
590
- // r7: undefined
591
- __ ldrb(r3, FieldMemOperand(r2, Map::kUnusedPropertyFieldsOffset));
592
- // The field instance sizes contains both pre-allocated property fields and
593
- // in-object properties.
594
- __ ldr(r0, FieldMemOperand(r2, Map::kInstanceSizesOffset));
595
- __ and_(r6,
596
- r0,
597
- Operand(0x000000FF << Map::kPreAllocatedPropertyFieldsByte * 8));
598
- __ add(r3, r3, Operand(r6, LSR, Map::kPreAllocatedPropertyFieldsByte * 8));
599
- __ and_(r6, r0, Operand(0x000000FF << Map::kInObjectPropertiesByte * 8));
600
- __ sub(r3, r3, Operand(r6, LSR, Map::kInObjectPropertiesByte * 8), SetCC);
601
-
602
- // Done if no extra properties are to be allocated.
603
- __ b(eq, &allocated);
604
- __ Assert(pl, "Property allocation count failed.");
605
-
606
- // Scale the number of elements by pointer size and add the header for
607
- // FixedArrays to the start of the next object calculation from above.
608
- // r1: constructor
609
- // r3: number of elements in properties array
610
- // r4: JSObject
611
- // r5: start of next object
612
- // r7: undefined
613
- __ add(r0, r3, Operand(FixedArray::kHeaderSize / kPointerSize));
614
- __ AllocateInNewSpace(r0,
615
- r5,
616
- r6,
617
- r2,
618
- &undo_allocation,
619
- RESULT_CONTAINS_TOP);
620
-
621
- // Initialize the FixedArray.
622
- // r1: constructor
623
- // r3: number of elements in properties array
624
- // r4: JSObject
625
- // r5: FixedArray (not tagged)
626
- // r7: undefined
627
- __ LoadRoot(r6, Heap::kFixedArrayMapRootIndex);
628
- __ mov(r2, r5);
629
- ASSERT_EQ(0 * kPointerSize, JSObject::kMapOffset);
630
- __ str(r6, MemOperand(r2, kPointerSize, PostIndex));
631
- ASSERT_EQ(1 * kPointerSize, Array::kLengthOffset);
632
- __ str(r3, MemOperand(r2, kPointerSize, PostIndex));
633
-
634
- // Initialize the fields to undefined.
635
- // r1: constructor function
636
- // r2: First element of FixedArray (not tagged)
637
- // r3: number of elements in properties array
638
- // r4: JSObject
639
- // r5: FixedArray (not tagged)
640
- // r7: undefined
641
- __ add(r6, r2, Operand(r3, LSL, kPointerSizeLog2)); // End of object.
642
- ASSERT_EQ(2 * kPointerSize, FixedArray::kHeaderSize);
643
- { Label loop, entry;
644
- __ b(&entry);
645
- __ bind(&loop);
646
- __ str(r7, MemOperand(r2, kPointerSize, PostIndex));
647
- __ bind(&entry);
648
- __ cmp(r2, Operand(r6));
649
- __ b(lt, &loop);
650
- }
651
-
652
- // Store the initialized FixedArray into the properties field of
653
- // the JSObject
654
- // r1: constructor function
655
- // r4: JSObject
656
- // r5: FixedArray (not tagged)
657
- __ add(r5, r5, Operand(kHeapObjectTag)); // Add the heap tag.
658
- __ str(r5, FieldMemOperand(r4, JSObject::kPropertiesOffset));
659
-
660
- // Continue with JSObject being successfully allocated
661
- // r1: constructor function
662
- // r4: JSObject
663
- __ jmp(&allocated);
664
-
665
- // Undo the setting of the new top so that the heap is verifiable. For
666
- // example, the map's unused properties potentially do not match the
667
- // allocated objects unused properties.
668
- // r4: JSObject (previous new top)
669
- __ bind(&undo_allocation);
670
- __ UndoAllocationInNewSpace(r4, r5);
671
- }
672
-
673
- // Allocate the new receiver object using the runtime call.
674
- // r1: constructor function
675
- __ bind(&rt_call);
676
- __ push(r1); // argument for Runtime_NewObject
677
- __ CallRuntime(Runtime::kNewObject, 1);
678
- __ mov(r4, r0);
679
-
680
- // Receiver for constructor call allocated.
681
- // r4: JSObject
682
- __ bind(&allocated);
683
- __ push(r4);
684
-
685
- // Push the function and the allocated receiver from the stack.
686
- // sp[0]: receiver (newly allocated object)
687
- // sp[1]: constructor function
688
- // sp[2]: number of arguments (smi-tagged)
689
- __ ldr(r1, MemOperand(sp, kPointerSize));
690
- __ push(r1); // Constructor function.
691
- __ push(r4); // Receiver.
692
-
693
- // Reload the number of arguments from the stack.
694
- // r1: constructor function
695
- // sp[0]: receiver
696
- // sp[1]: constructor function
697
- // sp[2]: receiver
698
- // sp[3]: constructor function
699
- // sp[4]: number of arguments (smi-tagged)
700
- __ ldr(r3, MemOperand(sp, 4 * kPointerSize));
701
-
702
- // Setup pointer to last argument.
703
- __ add(r2, fp, Operand(StandardFrameConstants::kCallerSPOffset));
704
-
705
- // Setup number of arguments for function call below
706
- __ mov(r0, Operand(r3, LSR, kSmiTagSize));
707
-
708
- // Copy arguments and receiver to the expression stack.
709
- // r0: number of arguments
710
- // r2: address of last argument (caller sp)
711
- // r1: constructor function
712
- // r3: number of arguments (smi-tagged)
713
- // sp[0]: receiver
714
- // sp[1]: constructor function
715
- // sp[2]: receiver
716
- // sp[3]: constructor function
717
- // sp[4]: number of arguments (smi-tagged)
718
- Label loop, entry;
719
- __ b(&entry);
720
- __ bind(&loop);
721
- __ ldr(ip, MemOperand(r2, r3, LSL, kPointerSizeLog2 - 1));
722
- __ push(ip);
723
- __ bind(&entry);
724
- __ sub(r3, r3, Operand(2), SetCC);
725
- __ b(ge, &loop);
726
-
727
- // Call the function.
728
- // r0: number of arguments
729
- // r1: constructor function
730
- ParameterCount actual(r0);
731
- __ InvokeFunction(r1, actual, CALL_FUNCTION);
732
-
733
- // Pop the function from the stack.
734
- // sp[0]: constructor function
735
- // sp[2]: receiver
736
- // sp[3]: constructor function
737
- // sp[4]: number of arguments (smi-tagged)
738
- __ pop();
739
-
740
- // Restore context from the frame.
741
- // r0: result
742
- // sp[0]: receiver
743
- // sp[1]: constructor function
744
- // sp[2]: number of arguments (smi-tagged)
745
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
746
-
747
- // If the result is an object (in the ECMA sense), we should get rid
748
- // of the receiver and use the result; see ECMA-262 section 13.2.2-7
749
- // on page 74.
750
- Label use_receiver, exit;
751
-
752
- // If the result is a smi, it is *not* an object in the ECMA sense.
753
- // r0: result
754
- // sp[0]: receiver (newly allocated object)
755
- // sp[1]: constructor function
756
- // sp[2]: number of arguments (smi-tagged)
757
- __ tst(r0, Operand(kSmiTagMask));
758
- __ b(eq, &use_receiver);
759
-
760
- // If the type of the result (stored in its map) is less than
761
- // FIRST_JS_OBJECT_TYPE, it is not an object in the ECMA sense.
762
- __ CompareObjectType(r0, r3, r3, FIRST_JS_OBJECT_TYPE);
763
- __ b(ge, &exit);
764
-
765
- // Throw away the result of the constructor invocation and use the
766
- // on-stack receiver as the result.
767
- __ bind(&use_receiver);
768
- __ ldr(r0, MemOperand(sp));
769
-
770
- // Remove receiver from the stack, remove caller arguments, and
771
- // return.
772
- __ bind(&exit);
773
- // r0: result
774
- // sp[0]: receiver (newly allocated object)
775
- // sp[1]: constructor function
776
- // sp[2]: number of arguments (smi-tagged)
777
- __ ldr(r1, MemOperand(sp, 2 * kPointerSize));
778
- __ LeaveConstructFrame();
779
- __ add(sp, sp, Operand(r1, LSL, kPointerSizeLog2 - 1));
780
- __ add(sp, sp, Operand(kPointerSize));
781
- __ IncrementCounter(&Counters::constructed_objects, 1, r1, r2);
782
- __ Jump(lr);
783
- }
784
-
785
-
786
- static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
787
- bool is_construct) {
788
- // Called from Generate_JS_Entry
789
- // r0: code entry
790
- // r1: function
791
- // r2: receiver
792
- // r3: argc
793
- // r4: argv
794
- // r5-r7, cp may be clobbered
795
-
796
- // Clear the context before we push it when entering the JS frame.
797
- __ mov(cp, Operand(0));
798
-
799
- // Enter an internal frame.
800
- __ EnterInternalFrame();
801
-
802
- // Set up the context from the function argument.
803
- __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
804
-
805
- // Set up the roots register.
806
- ExternalReference roots_address = ExternalReference::roots_address();
807
- __ mov(r10, Operand(roots_address));
808
-
809
- // Push the function and the receiver onto the stack.
810
- __ push(r1);
811
- __ push(r2);
812
-
813
- // Copy arguments to the stack in a loop.
814
- // r1: function
815
- // r3: argc
816
- // r4: argv, i.e. points to first arg
817
- Label loop, entry;
818
- __ add(r2, r4, Operand(r3, LSL, kPointerSizeLog2));
819
- // r2 points past last arg.
820
- __ b(&entry);
821
- __ bind(&loop);
822
- __ ldr(r0, MemOperand(r4, kPointerSize, PostIndex)); // read next parameter
823
- __ ldr(r0, MemOperand(r0)); // dereference handle
824
- __ push(r0); // push parameter
825
- __ bind(&entry);
826
- __ cmp(r4, Operand(r2));
827
- __ b(ne, &loop);
828
-
829
- // Initialize all JavaScript callee-saved registers, since they will be seen
830
- // by the garbage collector as part of handlers.
831
- __ LoadRoot(r4, Heap::kUndefinedValueRootIndex);
832
- __ mov(r5, Operand(r4));
833
- __ mov(r6, Operand(r4));
834
- __ mov(r7, Operand(r4));
835
- if (kR9Available == 1) {
836
- __ mov(r9, Operand(r4));
837
- }
838
-
839
- // Invoke the code and pass argc as r0.
840
- __ mov(r0, Operand(r3));
841
- if (is_construct) {
842
- __ Call(Handle<Code>(Builtins::builtin(Builtins::JSConstructCall)),
843
- RelocInfo::CODE_TARGET);
844
- } else {
845
- ParameterCount actual(r0);
846
- __ InvokeFunction(r1, actual, CALL_FUNCTION);
847
- }
848
-
849
- // Exit the JS frame and remove the parameters (except function), and return.
850
- // Respect ABI stack constraint.
851
- __ LeaveInternalFrame();
852
- __ Jump(lr);
853
-
854
- // r0: result
855
- }
856
-
857
-
858
- void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) {
859
- Generate_JSEntryTrampolineHelper(masm, false);
860
- }
861
-
862
-
863
- void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
864
- Generate_JSEntryTrampolineHelper(masm, true);
865
- }
866
-
867
-
868
- void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
869
- // 1. Make sure we have at least one argument.
870
- // r0: actual number of argument
871
- { Label done;
872
- __ tst(r0, Operand(r0));
873
- __ b(ne, &done);
874
- __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
875
- __ push(r2);
876
- __ add(r0, r0, Operand(1));
877
- __ bind(&done);
878
- }
879
-
880
- // 2. Get the function to call from the stack.
881
- // r0: actual number of argument
882
- { Label done, non_function, function;
883
- __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2));
884
- __ tst(r1, Operand(kSmiTagMask));
885
- __ b(eq, &non_function);
886
- __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE);
887
- __ b(eq, &function);
888
-
889
- // Non-function called: Clear the function to force exception.
890
- __ bind(&non_function);
891
- __ mov(r1, Operand(0));
892
- __ b(&done);
893
-
894
- // Change the context eagerly because it will be used below to get the
895
- // right global object.
896
- __ bind(&function);
897
- __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
898
-
899
- __ bind(&done);
900
- }
901
-
902
- // 3. Make sure first argument is an object; convert if necessary.
903
- // r0: actual number of arguments
904
- // r1: function
905
- { Label call_to_object, use_global_receiver, patch_receiver, done;
906
- __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2));
907
- __ ldr(r2, MemOperand(r2, -kPointerSize));
908
-
909
- // r0: actual number of arguments
910
- // r1: function
911
- // r2: first argument
912
- __ tst(r2, Operand(kSmiTagMask));
913
- __ b(eq, &call_to_object);
914
-
915
- __ LoadRoot(r3, Heap::kNullValueRootIndex);
916
- __ cmp(r2, r3);
917
- __ b(eq, &use_global_receiver);
918
- __ LoadRoot(r3, Heap::kUndefinedValueRootIndex);
919
- __ cmp(r2, r3);
920
- __ b(eq, &use_global_receiver);
921
-
922
- __ CompareObjectType(r2, r3, r3, FIRST_JS_OBJECT_TYPE);
923
- __ b(lt, &call_to_object);
924
- __ cmp(r3, Operand(LAST_JS_OBJECT_TYPE));
925
- __ b(le, &done);
926
-
927
- __ bind(&call_to_object);
928
- __ EnterInternalFrame();
929
-
930
- // Store number of arguments and function across the call into the runtime.
931
- __ mov(r0, Operand(r0, LSL, kSmiTagSize));
932
- __ push(r0);
933
- __ push(r1);
934
-
935
- __ push(r2);
936
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS);
937
- __ mov(r2, r0);
938
-
939
- // Restore number of arguments and function.
940
- __ pop(r1);
941
- __ pop(r0);
942
- __ mov(r0, Operand(r0, ASR, kSmiTagSize));
943
-
944
- __ LeaveInternalFrame();
945
- __ b(&patch_receiver);
946
-
947
- // Use the global receiver object from the called function as the receiver.
948
- __ bind(&use_global_receiver);
949
- const int kGlobalIndex =
950
- Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize;
951
- __ ldr(r2, FieldMemOperand(cp, kGlobalIndex));
952
- __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalContextOffset));
953
- __ ldr(r2, FieldMemOperand(r2, kGlobalIndex));
954
- __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset));
955
-
956
- __ bind(&patch_receiver);
957
- __ add(r3, sp, Operand(r0, LSL, kPointerSizeLog2));
958
- __ str(r2, MemOperand(r3, -kPointerSize));
959
-
960
- __ bind(&done);
961
- }
962
-
963
- // 4. Shift stuff one slot down the stack
964
- // r0: actual number of arguments (including call() receiver)
965
- // r1: function
966
- { Label loop;
967
- // Calculate the copy start address (destination). Copy end address is sp.
968
- __ add(r2, sp, Operand(r0, LSL, kPointerSizeLog2));
969
- __ add(r2, r2, Operand(kPointerSize)); // copy receiver too
970
-
971
- __ bind(&loop);
972
- __ ldr(ip, MemOperand(r2, -kPointerSize));
973
- __ str(ip, MemOperand(r2));
974
- __ sub(r2, r2, Operand(kPointerSize));
975
- __ cmp(r2, sp);
976
- __ b(ne, &loop);
977
- }
978
-
979
- // 5. Adjust the actual number of arguments and remove the top element.
980
- // r0: actual number of arguments (including call() receiver)
981
- // r1: function
982
- __ sub(r0, r0, Operand(1));
983
- __ add(sp, sp, Operand(kPointerSize));
984
-
985
- // 6. Get the code for the function or the non-function builtin.
986
- // If number of expected arguments matches, then call. Otherwise restart
987
- // the arguments adaptor stub.
988
- // r0: actual number of arguments
989
- // r1: function
990
- { Label invoke;
991
- __ tst(r1, r1);
992
- __ b(ne, &invoke);
993
- __ mov(r2, Operand(0)); // expected arguments is 0 for CALL_NON_FUNCTION
994
- __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
995
- __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
996
- RelocInfo::CODE_TARGET);
997
-
998
- __ bind(&invoke);
999
- __ ldr(r3, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
1000
- __ ldr(r2,
1001
- FieldMemOperand(r3,
1002
- SharedFunctionInfo::kFormalParameterCountOffset));
1003
- __ ldr(r3,
1004
- MemOperand(r3, SharedFunctionInfo::kCodeOffset - kHeapObjectTag));
1005
- __ add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag));
1006
- __ cmp(r2, r0); // Check formal and actual parameter counts.
1007
- __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
1008
- RelocInfo::CODE_TARGET, ne);
1009
-
1010
- // 7. Jump to the code in r3 without checking arguments.
1011
- ParameterCount expected(0);
1012
- __ InvokeCode(r3, expected, expected, JUMP_FUNCTION);
1013
- }
1014
- }
1015
-
1016
-
1017
- void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
1018
- const int kIndexOffset = -5 * kPointerSize;
1019
- const int kLimitOffset = -4 * kPointerSize;
1020
- const int kArgsOffset = 2 * kPointerSize;
1021
- const int kRecvOffset = 3 * kPointerSize;
1022
- const int kFunctionOffset = 4 * kPointerSize;
1023
-
1024
- __ EnterInternalFrame();
1025
-
1026
- __ ldr(r0, MemOperand(fp, kFunctionOffset)); // get the function
1027
- __ push(r0);
1028
- __ ldr(r0, MemOperand(fp, kArgsOffset)); // get the args array
1029
- __ push(r0);
1030
- __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_JS);
1031
-
1032
- // Check the stack for overflow. We are not trying need to catch
1033
- // interruptions (e.g. debug break and preemption) here, so the "real stack
1034
- // limit" is checked.
1035
- Label okay;
1036
- __ LoadRoot(r2, Heap::kRealStackLimitRootIndex);
1037
- // Make r2 the space we have left. The stack might already be overflowed
1038
- // here which will cause r2 to become negative.
1039
- __ sub(r2, sp, r2);
1040
- // Check if the arguments will overflow the stack.
1041
- __ cmp(r2, Operand(r0, LSL, kPointerSizeLog2 - kSmiTagSize));
1042
- __ b(gt, &okay); // Signed comparison.
1043
-
1044
- // Out of stack space.
1045
- __ ldr(r1, MemOperand(fp, kFunctionOffset));
1046
- __ push(r1);
1047
- __ push(r0);
1048
- __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_JS);
1049
- // End of stack check.
1050
-
1051
- // Push current limit and index.
1052
- __ bind(&okay);
1053
- __ push(r0); // limit
1054
- __ mov(r1, Operand(0)); // initial index
1055
- __ push(r1);
1056
-
1057
- // Change context eagerly to get the right global object if necessary.
1058
- __ ldr(r0, MemOperand(fp, kFunctionOffset));
1059
- __ ldr(cp, FieldMemOperand(r0, JSFunction::kContextOffset));
1060
-
1061
- // Compute the receiver.
1062
- Label call_to_object, use_global_receiver, push_receiver;
1063
- __ ldr(r0, MemOperand(fp, kRecvOffset));
1064
- __ tst(r0, Operand(kSmiTagMask));
1065
- __ b(eq, &call_to_object);
1066
- __ LoadRoot(r1, Heap::kNullValueRootIndex);
1067
- __ cmp(r0, r1);
1068
- __ b(eq, &use_global_receiver);
1069
- __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
1070
- __ cmp(r0, r1);
1071
- __ b(eq, &use_global_receiver);
1072
-
1073
- // Check if the receiver is already a JavaScript object.
1074
- // r0: receiver
1075
- __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE);
1076
- __ b(lt, &call_to_object);
1077
- __ cmp(r1, Operand(LAST_JS_OBJECT_TYPE));
1078
- __ b(le, &push_receiver);
1079
-
1080
- // Convert the receiver to a regular object.
1081
- // r0: receiver
1082
- __ bind(&call_to_object);
1083
- __ push(r0);
1084
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS);
1085
- __ b(&push_receiver);
1086
-
1087
- // Use the current global receiver object as the receiver.
1088
- __ bind(&use_global_receiver);
1089
- const int kGlobalOffset =
1090
- Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize;
1091
- __ ldr(r0, FieldMemOperand(cp, kGlobalOffset));
1092
- __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalContextOffset));
1093
- __ ldr(r0, FieldMemOperand(r0, kGlobalOffset));
1094
- __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalReceiverOffset));
1095
-
1096
- // Push the receiver.
1097
- // r0: receiver
1098
- __ bind(&push_receiver);
1099
- __ push(r0);
1100
-
1101
- // Copy all arguments from the array to the stack.
1102
- Label entry, loop;
1103
- __ ldr(r0, MemOperand(fp, kIndexOffset));
1104
- __ b(&entry);
1105
-
1106
- // Load the current argument from the arguments array and push it to the
1107
- // stack.
1108
- // r0: current argument index
1109
- __ bind(&loop);
1110
- __ ldr(r1, MemOperand(fp, kArgsOffset));
1111
- __ push(r1);
1112
- __ push(r0);
1113
-
1114
- // Call the runtime to access the property in the arguments array.
1115
- __ CallRuntime(Runtime::kGetProperty, 2);
1116
- __ push(r0);
1117
-
1118
- // Use inline caching to access the arguments.
1119
- __ ldr(r0, MemOperand(fp, kIndexOffset));
1120
- __ add(r0, r0, Operand(1 << kSmiTagSize));
1121
- __ str(r0, MemOperand(fp, kIndexOffset));
1122
-
1123
- // Test if the copy loop has finished copying all the elements from the
1124
- // arguments object.
1125
- __ bind(&entry);
1126
- __ ldr(r1, MemOperand(fp, kLimitOffset));
1127
- __ cmp(r0, r1);
1128
- __ b(ne, &loop);
1129
-
1130
- // Invoke the function.
1131
- ParameterCount actual(r0);
1132
- __ mov(r0, Operand(r0, ASR, kSmiTagSize));
1133
- __ ldr(r1, MemOperand(fp, kFunctionOffset));
1134
- __ InvokeFunction(r1, actual, CALL_FUNCTION);
1135
-
1136
- // Tear down the internal frame and remove function, receiver and args.
1137
- __ LeaveInternalFrame();
1138
- __ add(sp, sp, Operand(3 * kPointerSize));
1139
- __ Jump(lr);
1140
- }
1141
-
1142
-
1143
- static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
1144
- __ mov(r0, Operand(r0, LSL, kSmiTagSize));
1145
- __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
1146
- __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | fp.bit() | lr.bit());
1147
- __ add(fp, sp, Operand(3 * kPointerSize));
1148
- }
1149
-
1150
-
1151
- static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) {
1152
- // ----------- S t a t e -------------
1153
- // -- r0 : result being passed through
1154
- // -----------------------------------
1155
- // Get the number of arguments passed (as a smi), tear down the frame and
1156
- // then tear down the parameters.
1157
- __ ldr(r1, MemOperand(fp, -3 * kPointerSize));
1158
- __ mov(sp, fp);
1159
- __ ldm(ia_w, sp, fp.bit() | lr.bit());
1160
- __ add(sp, sp, Operand(r1, LSL, kPointerSizeLog2 - kSmiTagSize));
1161
- __ add(sp, sp, Operand(kPointerSize)); // adjust for receiver
1162
- }
1163
-
1164
-
1165
- void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
1166
- // ----------- S t a t e -------------
1167
- // -- r0 : actual number of arguments
1168
- // -- r1 : function (passed through to callee)
1169
- // -- r2 : expected number of arguments
1170
- // -- r3 : code entry to call
1171
- // -----------------------------------
1172
-
1173
- Label invoke, dont_adapt_arguments;
1174
-
1175
- Label enough, too_few;
1176
- __ cmp(r0, Operand(r2));
1177
- __ b(lt, &too_few);
1178
- __ cmp(r2, Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel));
1179
- __ b(eq, &dont_adapt_arguments);
1180
-
1181
- { // Enough parameters: actual >= expected
1182
- __ bind(&enough);
1183
- EnterArgumentsAdaptorFrame(masm);
1184
-
1185
- // Calculate copy start address into r0 and copy end address into r2.
1186
- // r0: actual number of arguments as a smi
1187
- // r1: function
1188
- // r2: expected number of arguments
1189
- // r3: code entry to call
1190
- __ add(r0, fp, Operand(r0, LSL, kPointerSizeLog2 - kSmiTagSize));
1191
- // adjust for return address and receiver
1192
- __ add(r0, r0, Operand(2 * kPointerSize));
1193
- __ sub(r2, r0, Operand(r2, LSL, kPointerSizeLog2));
1194
-
1195
- // Copy the arguments (including the receiver) to the new stack frame.
1196
- // r0: copy start address
1197
- // r1: function
1198
- // r2: copy end address
1199
- // r3: code entry to call
1200
-
1201
- Label copy;
1202
- __ bind(&copy);
1203
- __ ldr(ip, MemOperand(r0, 0));
1204
- __ push(ip);
1205
- __ cmp(r0, r2); // Compare before moving to next argument.
1206
- __ sub(r0, r0, Operand(kPointerSize));
1207
- __ b(ne, &copy);
1208
-
1209
- __ b(&invoke);
1210
- }
1211
-
1212
- { // Too few parameters: Actual < expected
1213
- __ bind(&too_few);
1214
- EnterArgumentsAdaptorFrame(masm);
1215
-
1216
- // Calculate copy start address into r0 and copy end address is fp.
1217
- // r0: actual number of arguments as a smi
1218
- // r1: function
1219
- // r2: expected number of arguments
1220
- // r3: code entry to call
1221
- __ add(r0, fp, Operand(r0, LSL, kPointerSizeLog2 - kSmiTagSize));
1222
-
1223
- // Copy the arguments (including the receiver) to the new stack frame.
1224
- // r0: copy start address
1225
- // r1: function
1226
- // r2: expected number of arguments
1227
- // r3: code entry to call
1228
- Label copy;
1229
- __ bind(&copy);
1230
- // Adjust load for return address and receiver.
1231
- __ ldr(ip, MemOperand(r0, 2 * kPointerSize));
1232
- __ push(ip);
1233
- __ cmp(r0, fp); // Compare before moving to next argument.
1234
- __ sub(r0, r0, Operand(kPointerSize));
1235
- __ b(ne, &copy);
1236
-
1237
- // Fill the remaining expected arguments with undefined.
1238
- // r1: function
1239
- // r2: expected number of arguments
1240
- // r3: code entry to call
1241
- __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
1242
- __ sub(r2, fp, Operand(r2, LSL, kPointerSizeLog2));
1243
- __ sub(r2, r2, Operand(4 * kPointerSize)); // Adjust for frame.
1244
-
1245
- Label fill;
1246
- __ bind(&fill);
1247
- __ push(ip);
1248
- __ cmp(sp, r2);
1249
- __ b(ne, &fill);
1250
- }
1251
-
1252
- // Call the entry point.
1253
- __ bind(&invoke);
1254
- __ Call(r3);
1255
-
1256
- // Exit frame and return.
1257
- LeaveArgumentsAdaptorFrame(masm);
1258
- __ Jump(lr);
1259
-
1260
-
1261
- // -------------------------------------------
1262
- // Dont adapt arguments.
1263
- // -------------------------------------------
1264
- __ bind(&dont_adapt_arguments);
1265
- __ Jump(r3);
1266
- }
1267
-
1268
-
1269
- #undef __
1270
-
1271
- } } // namespace v8::internal