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,43 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifndef V8_X64_REGISTER_ALLOCATOR_X64_H_
29
- #define V8_X64_REGISTER_ALLOCATOR_X64_H_
30
-
31
- namespace v8 {
32
- namespace internal {
33
-
34
- class RegisterAllocatorConstants : public AllStatic {
35
- public:
36
- static const int kNumRegisters = 11;
37
- static const int kInvalidRegister = -1;
38
- };
39
-
40
-
41
- } } // namespace v8::internal
42
-
43
- #endif // V8_X64_REGISTER_ALLOCATOR_X64_H_
@@ -1,27 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
@@ -1,63 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifndef V8_X64_SIMULATOR_X64_H_
29
- #define V8_X64_SIMULATOR_X64_H_
30
-
31
- #include "allocation.h"
32
-
33
- // Since there is no simulator for the ia32 architecture the only thing we can
34
- // do is to call the entry directly.
35
- // TODO(X64): Don't pass p0, since it isn't used?
36
- #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
37
- entry(p0, p1, p2, p3, p4);
38
-
39
- // The stack limit beyond which we will throw stack overflow errors in
40
- // generated code. Because generated code on x64 uses the C stack, we
41
- // just use the C stack limit.
42
- class SimulatorStack : public v8::internal::AllStatic {
43
- public:
44
- static inline uintptr_t JsLimitFromCLimit(uintptr_t c_limit) {
45
- return c_limit;
46
- }
47
-
48
- static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) {
49
- return try_catch_address;
50
- }
51
-
52
- static inline void UnregisterCTryCatch() { }
53
- };
54
-
55
- // Call the generated regexp code directly. The entry function pointer should
56
- // expect eight int/pointer sized arguments and return an int.
57
- #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
58
- entry(p0, p1, p2, p3, p4, p5, p6, p7)
59
-
60
- #define TRY_CATCH_FROM_ADDRESS(try_catch_address) \
61
- reinterpret_cast<TryCatch*>(try_catch_address)
62
-
63
- #endif // V8_X64_SIMULATOR_X64_H_
@@ -1,1884 +0,0 @@
1
- // Copyright 2009 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
-
29
- #include "v8.h"
30
-
31
- #include "ic-inl.h"
32
- #include "codegen-inl.h"
33
- #include "stub-cache.h"
34
- #include "macro-assembler-x64.h"
35
-
36
- namespace v8 {
37
- namespace internal {
38
-
39
- //-----------------------------------------------------------------------------
40
- // StubCompiler static helper functions
41
-
42
- #define __ ACCESS_MASM(masm)
43
-
44
-
45
- static void ProbeTable(MacroAssembler* masm,
46
- Code::Flags flags,
47
- StubCache::Table table,
48
- Register name,
49
- Register offset) {
50
- ASSERT_EQ(8, kPointerSize);
51
- ASSERT_EQ(16, sizeof(StubCache::Entry));
52
- // The offset register holds the entry offset times four (due to masking
53
- // and shifting optimizations).
54
- ExternalReference key_offset(SCTableReference::keyReference(table));
55
- Label miss;
56
-
57
- __ movq(kScratchRegister, key_offset);
58
- // Check that the key in the entry matches the name.
59
- // Multiply entry offset by 16 to get the entry address. Since the
60
- // offset register already holds the entry offset times four, multiply
61
- // by a further four.
62
- __ cmpl(name, Operand(kScratchRegister, offset, times_4, 0));
63
- __ j(not_equal, &miss);
64
- // Get the code entry from the cache.
65
- // Use key_offset + kPointerSize, rather than loading value_offset.
66
- __ movq(kScratchRegister,
67
- Operand(kScratchRegister, offset, times_4, kPointerSize));
68
- // Check that the flags match what we're looking for.
69
- __ movl(offset, FieldOperand(kScratchRegister, Code::kFlagsOffset));
70
- __ and_(offset, Immediate(~Code::kFlagsNotUsedInLookup));
71
- __ cmpl(offset, Immediate(flags));
72
- __ j(not_equal, &miss);
73
-
74
- // Jump to the first instruction in the code stub.
75
- __ addq(kScratchRegister, Immediate(Code::kHeaderSize - kHeapObjectTag));
76
- __ jmp(kScratchRegister);
77
-
78
- __ bind(&miss);
79
- }
80
-
81
-
82
- void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
83
- ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC);
84
- Code* code = NULL;
85
- if (kind == Code::LOAD_IC) {
86
- code = Builtins::builtin(Builtins::LoadIC_Miss);
87
- } else {
88
- code = Builtins::builtin(Builtins::KeyedLoadIC_Miss);
89
- }
90
-
91
- Handle<Code> ic(code);
92
- __ Jump(ic, RelocInfo::CODE_TARGET);
93
- }
94
-
95
-
96
- void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
97
- int index,
98
- Register prototype) {
99
- // Load the global or builtins object from the current context.
100
- __ movq(prototype,
101
- Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)));
102
- // Load the global context from the global or builtins object.
103
- __ movq(prototype,
104
- FieldOperand(prototype, GlobalObject::kGlobalContextOffset));
105
- // Load the function from the global context.
106
- __ movq(prototype, Operand(prototype, Context::SlotOffset(index)));
107
- // Load the initial map. The global functions all have initial maps.
108
- __ movq(prototype,
109
- FieldOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset));
110
- // Load the prototype from the initial map.
111
- __ movq(prototype, FieldOperand(prototype, Map::kPrototypeOffset));
112
- }
113
-
114
-
115
- // Load a fast property out of a holder object (src). In-object properties
116
- // are loaded directly otherwise the property is loaded from the properties
117
- // fixed array.
118
- void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
119
- Register dst, Register src,
120
- JSObject* holder, int index) {
121
- // Adjust for the number of properties stored in the holder.
122
- index -= holder->map()->inobject_properties();
123
- if (index < 0) {
124
- // Get the property straight out of the holder.
125
- int offset = holder->map()->instance_size() + (index * kPointerSize);
126
- __ movq(dst, FieldOperand(src, offset));
127
- } else {
128
- // Calculate the offset into the properties array.
129
- int offset = index * kPointerSize + FixedArray::kHeaderSize;
130
- __ movq(dst, FieldOperand(src, JSObject::kPropertiesOffset));
131
- __ movq(dst, FieldOperand(dst, offset));
132
- }
133
- }
134
-
135
-
136
- template <typename Pushable>
137
- static void PushInterceptorArguments(MacroAssembler* masm,
138
- Register receiver,
139
- Register holder,
140
- Pushable name,
141
- JSObject* holder_obj) {
142
- __ push(receiver);
143
- __ push(holder);
144
- __ push(name);
145
- InterceptorInfo* interceptor = holder_obj->GetNamedInterceptor();
146
- __ movq(kScratchRegister, Handle<Object>(interceptor),
147
- RelocInfo::EMBEDDED_OBJECT);
148
- __ push(kScratchRegister);
149
- __ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset));
150
- }
151
-
152
-
153
- void StubCache::GenerateProbe(MacroAssembler* masm,
154
- Code::Flags flags,
155
- Register receiver,
156
- Register name,
157
- Register scratch,
158
- Register extra) {
159
- Label miss;
160
- USE(extra); // The register extra is not used on the X64 platform.
161
- // Make sure that code is valid. The shifting code relies on the
162
- // entry size being 16.
163
- ASSERT(sizeof(Entry) == 16);
164
-
165
- // Make sure the flags do not name a specific type.
166
- ASSERT(Code::ExtractTypeFromFlags(flags) == 0);
167
-
168
- // Make sure that there are no register conflicts.
169
- ASSERT(!scratch.is(receiver));
170
- ASSERT(!scratch.is(name));
171
-
172
- // Check that the receiver isn't a smi.
173
- __ JumpIfSmi(receiver, &miss);
174
-
175
- // Get the map of the receiver and compute the hash.
176
- __ movl(scratch, FieldOperand(name, String::kHashFieldOffset));
177
- // Use only the low 32 bits of the map pointer.
178
- __ addl(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
179
- __ xor_(scratch, Immediate(flags));
180
- __ and_(scratch, Immediate((kPrimaryTableSize - 1) << kHeapObjectTagSize));
181
-
182
- // Probe the primary table.
183
- ProbeTable(masm, flags, kPrimary, name, scratch);
184
-
185
- // Primary miss: Compute hash for secondary probe.
186
- __ movl(scratch, FieldOperand(name, String::kHashFieldOffset));
187
- __ addl(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
188
- __ xor_(scratch, Immediate(flags));
189
- __ and_(scratch, Immediate((kPrimaryTableSize - 1) << kHeapObjectTagSize));
190
- __ subl(scratch, name);
191
- __ addl(scratch, Immediate(flags));
192
- __ and_(scratch, Immediate((kSecondaryTableSize - 1) << kHeapObjectTagSize));
193
-
194
- // Probe the secondary table.
195
- ProbeTable(masm, flags, kSecondary, name, scratch);
196
-
197
- // Cache miss: Fall-through and let caller handle the miss by
198
- // entering the runtime system.
199
- __ bind(&miss);
200
- }
201
-
202
-
203
- void StubCompiler::GenerateStoreField(MacroAssembler* masm,
204
- Builtins::Name storage_extend,
205
- JSObject* object,
206
- int index,
207
- Map* transition,
208
- Register receiver_reg,
209
- Register name_reg,
210
- Register scratch,
211
- Label* miss_label) {
212
- // Check that the object isn't a smi.
213
- __ JumpIfSmi(receiver_reg, miss_label);
214
-
215
- // Check that the map of the object hasn't changed.
216
- __ Cmp(FieldOperand(receiver_reg, HeapObject::kMapOffset),
217
- Handle<Map>(object->map()));
218
- __ j(not_equal, miss_label);
219
-
220
- // Perform global security token check if needed.
221
- if (object->IsJSGlobalProxy()) {
222
- __ CheckAccessGlobalProxy(receiver_reg, scratch, miss_label);
223
- }
224
-
225
- // Stub never generated for non-global objects that require access
226
- // checks.
227
- ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
228
-
229
- // Perform map transition for the receiver if necessary.
230
- if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) {
231
- // The properties must be extended before we can store the value.
232
- // We jump to a runtime call that extends the properties array.
233
- __ Move(rcx, Handle<Map>(transition));
234
- Handle<Code> ic(Builtins::builtin(storage_extend));
235
- __ Jump(ic, RelocInfo::CODE_TARGET);
236
- return;
237
- }
238
-
239
- if (transition != NULL) {
240
- // Update the map of the object; no write barrier updating is
241
- // needed because the map is never in new space.
242
- __ Move(FieldOperand(receiver_reg, HeapObject::kMapOffset),
243
- Handle<Map>(transition));
244
- }
245
-
246
- // Adjust for the number of properties stored in the object. Even in the
247
- // face of a transition we can use the old map here because the size of the
248
- // object and the number of in-object properties is not going to change.
249
- index -= object->map()->inobject_properties();
250
-
251
- if (index < 0) {
252
- // Set the property straight into the object.
253
- int offset = object->map()->instance_size() + (index * kPointerSize);
254
- __ movq(FieldOperand(receiver_reg, offset), rax);
255
-
256
- // Update the write barrier for the array address.
257
- // Pass the value being stored in the now unused name_reg.
258
- __ movq(name_reg, rax);
259
- __ RecordWrite(receiver_reg, offset, name_reg, scratch);
260
- } else {
261
- // Write to the properties array.
262
- int offset = index * kPointerSize + FixedArray::kHeaderSize;
263
- // Get the properties array (optimistically).
264
- __ movq(scratch, FieldOperand(receiver_reg, JSObject::kPropertiesOffset));
265
- __ movq(FieldOperand(scratch, offset), rax);
266
-
267
- // Update the write barrier for the array address.
268
- // Pass the value being stored in the now unused name_reg.
269
- __ movq(name_reg, rax);
270
- __ RecordWrite(scratch, offset, name_reg, receiver_reg);
271
- }
272
-
273
- // Return the value (register rax).
274
- __ ret(0);
275
- }
276
-
277
-
278
- void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
279
- Register receiver,
280
- Register scratch,
281
- Label* miss_label) {
282
- // Check that the receiver isn't a smi.
283
- __ JumpIfSmi(receiver, miss_label);
284
-
285
- // Check that the object is a JS array.
286
- __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch);
287
- __ j(not_equal, miss_label);
288
-
289
- // Load length directly from the JS array.
290
- __ movq(rax, FieldOperand(receiver, JSArray::kLengthOffset));
291
- __ ret(0);
292
- }
293
-
294
-
295
- // Generate code to check if an object is a string. If the object is
296
- // a string, the map's instance type is left in the scratch register.
297
- static void GenerateStringCheck(MacroAssembler* masm,
298
- Register receiver,
299
- Register scratch,
300
- Label* smi,
301
- Label* non_string_object) {
302
- // Check that the object isn't a smi.
303
- __ JumpIfSmi(receiver, smi);
304
-
305
- // Check that the object is a string.
306
- __ movq(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
307
- __ movzxbq(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset));
308
- ASSERT(kNotStringTag != 0);
309
- __ testl(scratch, Immediate(kNotStringTag));
310
- __ j(not_zero, non_string_object);
311
- }
312
-
313
-
314
- void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
315
- Register receiver,
316
- Register scratch,
317
- Label* miss) {
318
- Label load_length, check_wrapper;
319
-
320
- // Check if the object is a string leaving the instance type in the
321
- // scratch register.
322
- GenerateStringCheck(masm, receiver, scratch, miss, &check_wrapper);
323
-
324
- // Load length directly from the string.
325
- __ bind(&load_length);
326
- __ movl(rax, FieldOperand(receiver, String::kLengthOffset));
327
- __ Integer32ToSmi(rax, rax);
328
- __ ret(0);
329
-
330
- // Check if the object is a JSValue wrapper.
331
- __ bind(&check_wrapper);
332
- __ cmpl(scratch, Immediate(JS_VALUE_TYPE));
333
- __ j(not_equal, miss);
334
-
335
- // Check if the wrapped value is a string and load the length
336
- // directly if it is.
337
- __ movq(receiver, FieldOperand(receiver, JSValue::kValueOffset));
338
- GenerateStringCheck(masm, receiver, scratch, miss, miss);
339
- __ jmp(&load_length);
340
- }
341
-
342
-
343
- template <class Pushable>
344
- static void CompileCallLoadPropertyWithInterceptor(MacroAssembler* masm,
345
- Register receiver,
346
- Register holder,
347
- Pushable name,
348
- JSObject* holder_obj) {
349
- PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
350
-
351
- ExternalReference ref =
352
- ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly));
353
- __ movq(rax, Immediate(5));
354
- __ movq(rbx, ref);
355
-
356
- CEntryStub stub(1);
357
- __ CallStub(&stub);
358
- }
359
-
360
-
361
-
362
- void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
363
- Register receiver,
364
- Register result,
365
- Register scratch,
366
- Label* miss_label) {
367
- __ TryGetFunctionPrototype(receiver, result, miss_label);
368
- if (!result.is(rax)) __ movq(rax, result);
369
- __ ret(0);
370
- }
371
-
372
-
373
- static void LookupPostInterceptor(JSObject* holder,
374
- String* name,
375
- LookupResult* lookup) {
376
- holder->LocalLookupRealNamedProperty(name, lookup);
377
- if (lookup->IsNotFound()) {
378
- Object* proto = holder->GetPrototype();
379
- if (proto != Heap::null_value()) {
380
- proto->Lookup(name, lookup);
381
- }
382
- }
383
- }
384
-
385
-
386
- class LoadInterceptorCompiler BASE_EMBEDDED {
387
- public:
388
- explicit LoadInterceptorCompiler(Register name) : name_(name) {}
389
-
390
- void CompileCacheable(MacroAssembler* masm,
391
- StubCompiler* stub_compiler,
392
- Register receiver,
393
- Register holder,
394
- Register scratch1,
395
- Register scratch2,
396
- JSObject* holder_obj,
397
- LookupResult* lookup,
398
- String* name,
399
- Label* miss_label) {
400
- AccessorInfo* callback = 0;
401
- bool optimize = false;
402
- // So far the most popular follow ups for interceptor loads are FIELD
403
- // and CALLBACKS, so inline only them, other cases may be added
404
- // later.
405
- if (lookup->type() == FIELD) {
406
- optimize = true;
407
- } else if (lookup->type() == CALLBACKS) {
408
- Object* callback_object = lookup->GetCallbackObject();
409
- if (callback_object->IsAccessorInfo()) {
410
- callback = AccessorInfo::cast(callback_object);
411
- optimize = callback->getter() != NULL;
412
- }
413
- }
414
-
415
- if (!optimize) {
416
- CompileRegular(masm, receiver, holder, scratch2, holder_obj, miss_label);
417
- return;
418
- }
419
-
420
- // Note: starting a frame here makes GC aware of pointers pushed below.
421
- __ EnterInternalFrame();
422
-
423
- if (lookup->type() == CALLBACKS) {
424
- __ push(receiver);
425
- }
426
- __ push(holder);
427
- __ push(name_);
428
-
429
- CompileCallLoadPropertyWithInterceptor(masm,
430
- receiver,
431
- holder,
432
- name_,
433
- holder_obj);
434
-
435
- Label interceptor_failed;
436
- __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex);
437
- __ j(equal, &interceptor_failed);
438
- __ LeaveInternalFrame();
439
- __ ret(0);
440
-
441
- __ bind(&interceptor_failed);
442
- __ pop(name_);
443
- __ pop(holder);
444
- if (lookup->type() == CALLBACKS) {
445
- __ pop(receiver);
446
- }
447
-
448
- __ LeaveInternalFrame();
449
-
450
- if (lookup->type() == FIELD) {
451
- holder = stub_compiler->CheckPrototypes(holder_obj,
452
- holder,
453
- lookup->holder(),
454
- scratch1,
455
- scratch2,
456
- name,
457
- miss_label);
458
- stub_compiler->GenerateFastPropertyLoad(masm,
459
- rax,
460
- holder,
461
- lookup->holder(),
462
- lookup->GetFieldIndex());
463
- __ ret(0);
464
- } else {
465
- ASSERT(lookup->type() == CALLBACKS);
466
- ASSERT(lookup->GetCallbackObject()->IsAccessorInfo());
467
- ASSERT(callback != NULL);
468
- ASSERT(callback->getter() != NULL);
469
-
470
- Label cleanup;
471
- __ pop(scratch2);
472
- __ push(receiver);
473
- __ push(scratch2);
474
-
475
- holder = stub_compiler->CheckPrototypes(holder_obj, holder,
476
- lookup->holder(), scratch1,
477
- scratch2,
478
- name,
479
- &cleanup);
480
-
481
- __ pop(scratch2); // save old return address
482
- __ push(holder);
483
- __ Move(holder, Handle<AccessorInfo>(callback));
484
- __ push(holder);
485
- __ push(FieldOperand(holder, AccessorInfo::kDataOffset));
486
- __ push(name_);
487
- __ push(scratch2); // restore old return address
488
-
489
- ExternalReference ref =
490
- ExternalReference(IC_Utility(IC::kLoadCallbackProperty));
491
- __ TailCallRuntime(ref, 5, 1);
492
-
493
- __ bind(&cleanup);
494
- __ pop(scratch1);
495
- __ pop(scratch2);
496
- __ push(scratch1);
497
- }
498
- }
499
-
500
-
501
- void CompileRegular(MacroAssembler* masm,
502
- Register receiver,
503
- Register holder,
504
- Register scratch,
505
- JSObject* holder_obj,
506
- Label* miss_label) {
507
- __ pop(scratch); // save old return address
508
- PushInterceptorArguments(masm, receiver, holder, name_, holder_obj);
509
- __ push(scratch); // restore old return address
510
-
511
- ExternalReference ref = ExternalReference(
512
- IC_Utility(IC::kLoadPropertyWithInterceptorForLoad));
513
- __ TailCallRuntime(ref, 5, 1);
514
- }
515
-
516
- private:
517
- Register name_;
518
- };
519
-
520
-
521
- template <class Compiler>
522
- static void CompileLoadInterceptor(Compiler* compiler,
523
- StubCompiler* stub_compiler,
524
- MacroAssembler* masm,
525
- JSObject* object,
526
- JSObject* holder,
527
- String* name,
528
- LookupResult* lookup,
529
- Register receiver,
530
- Register scratch1,
531
- Register scratch2,
532
- Label* miss) {
533
- ASSERT(holder->HasNamedInterceptor());
534
- ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined());
535
-
536
- // Check that the receiver isn't a smi.
537
- __ JumpIfSmi(receiver, miss);
538
-
539
- // Check that the maps haven't changed.
540
- Register reg =
541
- stub_compiler->CheckPrototypes(object, receiver, holder,
542
- scratch1, scratch2, name, miss);
543
-
544
- if (lookup->IsValid() && lookup->IsCacheable()) {
545
- compiler->CompileCacheable(masm,
546
- stub_compiler,
547
- receiver,
548
- reg,
549
- scratch1,
550
- scratch2,
551
- holder,
552
- lookup,
553
- name,
554
- miss);
555
- } else {
556
- compiler->CompileRegular(masm,
557
- receiver,
558
- reg,
559
- scratch2,
560
- holder,
561
- miss);
562
- }
563
- }
564
-
565
-
566
- class CallInterceptorCompiler BASE_EMBEDDED {
567
- public:
568
- explicit CallInterceptorCompiler(const ParameterCount& arguments)
569
- : arguments_(arguments), argc_(arguments.immediate()) {}
570
-
571
- void CompileCacheable(MacroAssembler* masm,
572
- StubCompiler* stub_compiler,
573
- Register receiver,
574
- Register holder,
575
- Register scratch1,
576
- Register scratch2,
577
- JSObject* holder_obj,
578
- LookupResult* lookup,
579
- String* name,
580
- Label* miss_label) {
581
- JSFunction* function = 0;
582
- bool optimize = false;
583
- // So far the most popular case for failed interceptor is
584
- // CONSTANT_FUNCTION sitting below.
585
- if (lookup->type() == CONSTANT_FUNCTION) {
586
- function = lookup->GetConstantFunction();
587
- // JSArray holder is a special case for call constant function
588
- // (see the corresponding code).
589
- if (function->is_compiled() && !holder_obj->IsJSArray()) {
590
- optimize = true;
591
- }
592
- }
593
-
594
- if (!optimize) {
595
- CompileRegular(masm, receiver, holder, scratch2, holder_obj, miss_label);
596
- return;
597
- }
598
-
599
- __ EnterInternalFrame();
600
- __ push(holder); // save the holder
601
-
602
- CompileCallLoadPropertyWithInterceptor(
603
- masm,
604
- receiver,
605
- holder,
606
- // Under EnterInternalFrame this refers to name.
607
- Operand(rbp, (argc_ + 3) * kPointerSize),
608
- holder_obj);
609
-
610
- __ pop(receiver); // restore holder
611
- __ LeaveInternalFrame();
612
-
613
- __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex);
614
- Label invoke;
615
- __ j(not_equal, &invoke);
616
-
617
- stub_compiler->CheckPrototypes(holder_obj, receiver,
618
- lookup->holder(), scratch1,
619
- scratch2,
620
- name,
621
- miss_label);
622
- if (lookup->holder()->IsGlobalObject()) {
623
- __ movq(rdx, Operand(rsp, (argc_ + 1) * kPointerSize));
624
- __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset));
625
- __ movq(Operand(rsp, (argc_ + 1) * kPointerSize), rdx);
626
- }
627
-
628
- ASSERT(function->is_compiled());
629
- // Get the function and setup the context.
630
- __ Move(rdi, Handle<JSFunction>(function));
631
- __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
632
-
633
- // Jump to the cached code (tail call).
634
- ASSERT(function->is_compiled());
635
- Handle<Code> code(function->code());
636
- ParameterCount expected(function->shared()->formal_parameter_count());
637
- __ InvokeCode(code, expected, arguments_,
638
- RelocInfo::CODE_TARGET, JUMP_FUNCTION);
639
-
640
- __ bind(&invoke);
641
- }
642
-
643
- void CompileRegular(MacroAssembler* masm,
644
- Register receiver,
645
- Register holder,
646
- Register scratch,
647
- JSObject* holder_obj,
648
- Label* miss_label) {
649
- __ EnterInternalFrame();
650
-
651
- PushInterceptorArguments(masm,
652
- receiver,
653
- holder,
654
- Operand(rbp, (argc_ + 3) * kPointerSize),
655
- holder_obj);
656
-
657
- ExternalReference ref = ExternalReference(
658
- IC_Utility(IC::kLoadPropertyWithInterceptorForCall));
659
- __ movq(rax, Immediate(5));
660
- __ movq(rbx, ref);
661
-
662
- CEntryStub stub(1);
663
- __ CallStub(&stub);
664
-
665
- __ LeaveInternalFrame();
666
- }
667
-
668
- private:
669
- const ParameterCount& arguments_;
670
- int argc_;
671
- };
672
-
673
-
674
- #undef __
675
-
676
- #define __ ACCESS_MASM((masm()))
677
-
678
-
679
- Object* CallStubCompiler::CompileCallConstant(Object* object,
680
- JSObject* holder,
681
- JSFunction* function,
682
- String* name,
683
- StubCompiler::CheckType check) {
684
- // ----------- S t a t e -------------
685
- // -----------------------------------
686
- // rsp[0] return address
687
- // rsp[8] argument argc
688
- // rsp[16] argument argc - 1
689
- // ...
690
- // rsp[argc * 8] argument 1
691
- // rsp[(argc + 1) * 8] argument 0 = reciever
692
- // rsp[(argc + 2) * 8] function name
693
-
694
- Label miss;
695
-
696
- // Get the receiver from the stack.
697
- const int argc = arguments().immediate();
698
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
699
-
700
- // Check that the receiver isn't a smi.
701
- if (check != NUMBER_CHECK) {
702
- __ JumpIfSmi(rdx, &miss);
703
- }
704
-
705
- // Make sure that it's okay not to patch the on stack receiver
706
- // unless we're doing a receiver map check.
707
- ASSERT(!object->IsGlobalObject() || check == RECEIVER_MAP_CHECK);
708
-
709
- switch (check) {
710
- case RECEIVER_MAP_CHECK:
711
- // Check that the maps haven't changed.
712
- CheckPrototypes(JSObject::cast(object), rdx, holder,
713
- rbx, rcx, name, &miss);
714
-
715
- // Patch the receiver on the stack with the global proxy if
716
- // necessary.
717
- if (object->IsGlobalObject()) {
718
- __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset));
719
- __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx);
720
- }
721
- break;
722
-
723
- case STRING_CHECK:
724
- // Check that the object is a two-byte string or a symbol.
725
- __ CmpObjectType(rdx, FIRST_NONSTRING_TYPE, rcx);
726
- __ j(above_equal, &miss);
727
- // Check that the maps starting from the prototype haven't changed.
728
- GenerateLoadGlobalFunctionPrototype(masm(),
729
- Context::STRING_FUNCTION_INDEX,
730
- rcx);
731
- CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder,
732
- rbx, rdx, name, &miss);
733
- break;
734
-
735
- case NUMBER_CHECK: {
736
- Label fast;
737
- // Check that the object is a smi or a heap number.
738
- __ JumpIfSmi(rdx, &fast);
739
- __ CmpObjectType(rdx, HEAP_NUMBER_TYPE, rcx);
740
- __ j(not_equal, &miss);
741
- __ bind(&fast);
742
- // Check that the maps starting from the prototype haven't changed.
743
- GenerateLoadGlobalFunctionPrototype(masm(),
744
- Context::NUMBER_FUNCTION_INDEX,
745
- rcx);
746
- CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder,
747
- rbx, rdx, name, &miss);
748
- break;
749
- }
750
-
751
- case BOOLEAN_CHECK: {
752
- Label fast;
753
- // Check that the object is a boolean.
754
- __ CompareRoot(rdx, Heap::kTrueValueRootIndex);
755
- __ j(equal, &fast);
756
- __ CompareRoot(rdx, Heap::kFalseValueRootIndex);
757
- __ j(not_equal, &miss);
758
- __ bind(&fast);
759
- // Check that the maps starting from the prototype haven't changed.
760
- GenerateLoadGlobalFunctionPrototype(masm(),
761
- Context::BOOLEAN_FUNCTION_INDEX,
762
- rcx);
763
- CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder,
764
- rbx, rdx, name, &miss);
765
- break;
766
- }
767
-
768
- case JSARRAY_HAS_FAST_ELEMENTS_CHECK:
769
- CheckPrototypes(JSObject::cast(object), rdx, holder,
770
- rbx, rcx, name, &miss);
771
- // Make sure object->HasFastElements().
772
- // Get the elements array of the object.
773
- __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
774
- // Check that the object is in fast mode (not dictionary).
775
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
776
- Factory::fixed_array_map());
777
- __ j(not_equal, &miss);
778
- break;
779
-
780
- default:
781
- UNREACHABLE();
782
- }
783
-
784
- // Get the function and setup the context.
785
- __ Move(rdi, Handle<JSFunction>(function));
786
- __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
787
-
788
- // Jump to the cached code (tail call).
789
- ASSERT(function->is_compiled());
790
- Handle<Code> code(function->code());
791
- ParameterCount expected(function->shared()->formal_parameter_count());
792
- __ InvokeCode(code, expected, arguments(),
793
- RelocInfo::CODE_TARGET, JUMP_FUNCTION);
794
-
795
- // Handle call cache miss.
796
- __ bind(&miss);
797
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
798
- __ Jump(ic, RelocInfo::CODE_TARGET);
799
-
800
- // Return the generated code.
801
- String* function_name = NULL;
802
- if (function->shared()->name()->IsString()) {
803
- function_name = String::cast(function->shared()->name());
804
- }
805
- return GetCode(CONSTANT_FUNCTION, function_name);
806
- }
807
-
808
-
809
- Object* CallStubCompiler::CompileCallField(Object* object,
810
- JSObject* holder,
811
- int index,
812
- String* name) {
813
- // ----------- S t a t e -------------
814
- // -----------------------------------
815
- // rsp[0] return address
816
- // rsp[8] argument argc
817
- // rsp[16] argument argc - 1
818
- // ...
819
- // rsp[argc * 8] argument 1
820
- // rsp[(argc + 1) * 8] argument 0 = receiver
821
- // rsp[(argc + 2) * 8] function name
822
- Label miss;
823
-
824
- // Get the receiver from the stack.
825
- const int argc = arguments().immediate();
826
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
827
-
828
- // Check that the receiver isn't a smi.
829
- __ JumpIfSmi(rdx, &miss);
830
-
831
- // Do the right check and compute the holder register.
832
- Register reg =
833
- CheckPrototypes(JSObject::cast(object), rdx, holder,
834
- rbx, rcx, name, &miss);
835
-
836
- GenerateFastPropertyLoad(masm(), rdi, reg, holder, index);
837
-
838
- // Check that the function really is a function.
839
- __ JumpIfSmi(rdi, &miss);
840
- __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rbx);
841
- __ j(not_equal, &miss);
842
-
843
- // Patch the receiver on the stack with the global proxy if
844
- // necessary.
845
- if (object->IsGlobalObject()) {
846
- __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset));
847
- __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx);
848
- }
849
-
850
- // Invoke the function.
851
- __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION);
852
-
853
- // Handle call cache miss.
854
- __ bind(&miss);
855
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
856
- __ Jump(ic, RelocInfo::CODE_TARGET);
857
-
858
- // Return the generated code.
859
- return GetCode(FIELD, name);
860
- }
861
-
862
-
863
- Object* CallStubCompiler::CompileCallInterceptor(Object* object,
864
- JSObject* holder,
865
- String* name) {
866
- // ----------- S t a t e -------------
867
- // -----------------------------------
868
- Label miss;
869
-
870
- // Get the number of arguments.
871
- const int argc = arguments().immediate();
872
-
873
- LookupResult lookup;
874
- LookupPostInterceptor(holder, name, &lookup);
875
-
876
- // Get the receiver from the stack.
877
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
878
-
879
- CallInterceptorCompiler compiler(arguments());
880
- CompileLoadInterceptor(&compiler,
881
- this,
882
- masm(),
883
- JSObject::cast(object),
884
- holder,
885
- name,
886
- &lookup,
887
- rdx,
888
- rbx,
889
- rcx,
890
- &miss);
891
-
892
- // Restore receiver.
893
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
894
-
895
- // Check that the function really is a function.
896
- __ JumpIfSmi(rax, &miss);
897
- __ CmpObjectType(rax, JS_FUNCTION_TYPE, rbx);
898
- __ j(not_equal, &miss);
899
-
900
- // Patch the receiver on the stack with the global proxy if
901
- // necessary.
902
- if (object->IsGlobalObject()) {
903
- __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset));
904
- __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx);
905
- }
906
-
907
- // Invoke the function.
908
- __ movq(rdi, rax);
909
- __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION);
910
-
911
- // Handle load cache miss.
912
- __ bind(&miss);
913
- Handle<Code> ic = ComputeCallMiss(argc);
914
- __ Jump(ic, RelocInfo::CODE_TARGET);
915
-
916
- // Return the generated code.
917
- return GetCode(INTERCEPTOR, name);
918
- }
919
-
920
-
921
-
922
- Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
923
- GlobalObject* holder,
924
- JSGlobalPropertyCell* cell,
925
- JSFunction* function,
926
- String* name) {
927
- // ----------- S t a t e -------------
928
- // -----------------------------------
929
- // rsp[0] return address
930
- // rsp[8] argument argc
931
- // rsp[16] argument argc - 1
932
- // ...
933
- // rsp[argc * 8] argument 1
934
- // rsp[(argc + 1) * 8] argument 0 = receiver
935
- // rsp[(argc + 2) * 8] function name
936
- Label miss;
937
-
938
- // Get the number of arguments.
939
- const int argc = arguments().immediate();
940
-
941
- // Get the receiver from the stack.
942
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
943
-
944
- // If the object is the holder then we know that it's a global
945
- // object which can only happen for contextual calls. In this case,
946
- // the receiver cannot be a smi.
947
- if (object != holder) {
948
- __ JumpIfSmi(rdx, &miss);
949
- }
950
-
951
- // Check that the maps haven't changed.
952
- CheckPrototypes(object, rdx, holder, rbx, rcx, name, &miss);
953
-
954
- // Get the value from the cell.
955
- __ Move(rdi, Handle<JSGlobalPropertyCell>(cell));
956
- __ movq(rdi, FieldOperand(rdi, JSGlobalPropertyCell::kValueOffset));
957
-
958
- // Check that the cell contains the same function.
959
- if (Heap::InNewSpace(function)) {
960
- // We can't embed a pointer to a function in new space so we have
961
- // to verify that the shared function info is unchanged. This has
962
- // the nice side effect that multiple closures based on the same
963
- // function can all use this call IC. Before we load through the
964
- // function, we have to verify that it still is a function.
965
- __ JumpIfSmi(rdi, &miss);
966
- __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx);
967
- __ j(not_equal, &miss);
968
-
969
- // Check the shared function info. Make sure it hasn't changed.
970
- __ Move(rcx, Handle<SharedFunctionInfo>(function->shared()));
971
- __ cmpq(FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset), rcx);
972
- __ j(not_equal, &miss);
973
- } else {
974
- __ Cmp(rdi, Handle<JSFunction>(function));
975
- __ j(not_equal, &miss);
976
- }
977
-
978
- // Patch the receiver on the stack with the global proxy.
979
- if (object->IsGlobalObject()) {
980
- __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset));
981
- __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx);
982
- }
983
-
984
- // Setup the context (function already in edi).
985
- __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
986
-
987
- // Jump to the cached code (tail call).
988
- __ IncrementCounter(&Counters::call_global_inline, 1);
989
- ASSERT(function->is_compiled());
990
- Handle<Code> code(function->code());
991
- ParameterCount expected(function->shared()->formal_parameter_count());
992
- __ InvokeCode(code, expected, arguments(),
993
- RelocInfo::CODE_TARGET, JUMP_FUNCTION);
994
-
995
- // Handle call cache miss.
996
- __ bind(&miss);
997
- __ IncrementCounter(&Counters::call_global_inline_miss, 1);
998
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
999
- __ Jump(ic, RelocInfo::CODE_TARGET);
1000
-
1001
- // Return the generated code.
1002
- return GetCode(NORMAL, name);
1003
- }
1004
-
1005
-
1006
- Object* LoadStubCompiler::CompileLoadCallback(String* name,
1007
- JSObject* object,
1008
- JSObject* holder,
1009
- AccessorInfo* callback) {
1010
- // ----------- S t a t e -------------
1011
- // -- rcx : name
1012
- // -- rsp[0] : return address
1013
- // -- rsp[8] : receiver
1014
- // -----------------------------------
1015
- Label miss;
1016
-
1017
- __ movq(rax, Operand(rsp, kPointerSize));
1018
- Failure* failure = Failure::InternalError();
1019
- bool success = GenerateLoadCallback(object, holder, rax, rcx, rbx, rdx,
1020
- callback, name, &miss, &failure);
1021
- if (!success) return failure;
1022
-
1023
- __ bind(&miss);
1024
- GenerateLoadMiss(masm(), Code::LOAD_IC);
1025
-
1026
- // Return the generated code.
1027
- return GetCode(CALLBACKS, name);
1028
- }
1029
-
1030
-
1031
- Object* LoadStubCompiler::CompileLoadConstant(JSObject* object,
1032
- JSObject* holder,
1033
- Object* value,
1034
- String* name) {
1035
- // ----------- S t a t e -------------
1036
- // -- rcx : name
1037
- // -- rsp[0] : return address
1038
- // -- rsp[8] : receiver
1039
- // -----------------------------------
1040
- Label miss;
1041
-
1042
- __ movq(rax, Operand(rsp, kPointerSize));
1043
- GenerateLoadConstant(object, holder, rax, rbx, rdx, value, name, &miss);
1044
- __ bind(&miss);
1045
- GenerateLoadMiss(masm(), Code::LOAD_IC);
1046
-
1047
- // Return the generated code.
1048
- return GetCode(CONSTANT_FUNCTION, name);
1049
- }
1050
-
1051
-
1052
- Object* LoadStubCompiler::CompileLoadField(JSObject* object,
1053
- JSObject* holder,
1054
- int index,
1055
- String* name) {
1056
- // ----------- S t a t e -------------
1057
- // -- rcx : name
1058
- // -- rsp[0] : return address
1059
- // -- rsp[8] : receiver
1060
- // -----------------------------------
1061
- Label miss;
1062
-
1063
- __ movq(rax, Operand(rsp, kPointerSize));
1064
- GenerateLoadField(object, holder, rax, rbx, rdx, index, name, &miss);
1065
- __ bind(&miss);
1066
- GenerateLoadMiss(masm(), Code::LOAD_IC);
1067
-
1068
- // Return the generated code.
1069
- return GetCode(FIELD, name);
1070
- }
1071
-
1072
-
1073
- Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
1074
- JSObject* holder,
1075
- String* name) {
1076
- // ----------- S t a t e -------------
1077
- // -- rcx : name
1078
- // -- rsp[0] : return address
1079
- // -- rsp[8] : receiver
1080
- // -----------------------------------
1081
- Label miss;
1082
-
1083
- LookupResult lookup;
1084
- LookupPostInterceptor(holder, name, &lookup);
1085
-
1086
- __ movq(rax, Operand(rsp, kPointerSize));
1087
- // TODO(368): Compile in the whole chain: all the interceptors in
1088
- // prototypes and ultimate answer.
1089
- GenerateLoadInterceptor(receiver,
1090
- holder,
1091
- &lookup,
1092
- rax,
1093
- rcx,
1094
- rdx,
1095
- rbx,
1096
- name,
1097
- &miss);
1098
-
1099
- __ bind(&miss);
1100
- GenerateLoadMiss(masm(), Code::LOAD_IC);
1101
-
1102
- // Return the generated code.
1103
- return GetCode(INTERCEPTOR, name);
1104
- }
1105
-
1106
-
1107
- Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
1108
- GlobalObject* holder,
1109
- JSGlobalPropertyCell* cell,
1110
- String* name,
1111
- bool is_dont_delete) {
1112
- // ----------- S t a t e -------------
1113
- // -- rcx : name
1114
- // -- rsp[0] : return address
1115
- // -- rsp[8] : receiver
1116
- // -----------------------------------
1117
- Label miss;
1118
-
1119
- // Get the receiver from the stack.
1120
- __ movq(rax, Operand(rsp, kPointerSize));
1121
-
1122
- // If the object is the holder then we know that it's a global
1123
- // object which can only happen for contextual loads. In this case,
1124
- // the receiver cannot be a smi.
1125
- if (object != holder) {
1126
- __ JumpIfSmi(rax, &miss);
1127
- }
1128
-
1129
- // Check that the maps haven't changed.
1130
- CheckPrototypes(object, rax, holder, rbx, rdx, name, &miss);
1131
-
1132
- // Get the value from the cell.
1133
- __ Move(rax, Handle<JSGlobalPropertyCell>(cell));
1134
- __ movq(rax, FieldOperand(rax, JSGlobalPropertyCell::kValueOffset));
1135
-
1136
- // Check for deleted property if property can actually be deleted.
1137
- if (!is_dont_delete) {
1138
- __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
1139
- __ j(equal, &miss);
1140
- } else if (FLAG_debug_code) {
1141
- __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
1142
- __ Check(not_equal, "DontDelete cells can't contain the hole");
1143
- }
1144
-
1145
- __ IncrementCounter(&Counters::named_load_global_inline, 1);
1146
- __ ret(0);
1147
-
1148
- __ bind(&miss);
1149
- __ IncrementCounter(&Counters::named_load_global_inline_miss, 1);
1150
- GenerateLoadMiss(masm(), Code::LOAD_IC);
1151
-
1152
- // Return the generated code.
1153
- return GetCode(NORMAL, name);
1154
- }
1155
-
1156
-
1157
- Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
1158
- JSObject* receiver,
1159
- JSObject* holder,
1160
- AccessorInfo* callback) {
1161
- // ----------- S t a t e -------------
1162
- // -- rsp[0] : return address
1163
- // -- rsp[8] : name
1164
- // -- rsp[16] : receiver
1165
- // -----------------------------------
1166
- Label miss;
1167
-
1168
- __ movq(rax, Operand(rsp, kPointerSize));
1169
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1170
- __ IncrementCounter(&Counters::keyed_load_callback, 1);
1171
-
1172
- // Check that the name has not changed.
1173
- __ Cmp(rax, Handle<String>(name));
1174
- __ j(not_equal, &miss);
1175
-
1176
- Failure* failure = Failure::InternalError();
1177
- bool success = GenerateLoadCallback(receiver, holder, rcx, rax, rbx, rdx,
1178
- callback, name, &miss, &failure);
1179
- if (!success) return failure;
1180
-
1181
- __ bind(&miss);
1182
- __ DecrementCounter(&Counters::keyed_load_callback, 1);
1183
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1184
-
1185
- // Return the generated code.
1186
- return GetCode(CALLBACKS, name);
1187
- }
1188
-
1189
-
1190
- Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
1191
- // ----------- S t a t e -------------
1192
- // -- rsp[0] : return address
1193
- // -- rsp[8] : name
1194
- // -- rsp[16] : receiver
1195
- // -----------------------------------
1196
- Label miss;
1197
-
1198
- __ movq(rax, Operand(rsp, kPointerSize));
1199
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1200
- __ IncrementCounter(&Counters::keyed_load_array_length, 1);
1201
-
1202
- // Check that the name has not changed.
1203
- __ Cmp(rax, Handle<String>(name));
1204
- __ j(not_equal, &miss);
1205
-
1206
- GenerateLoadArrayLength(masm(), rcx, rdx, &miss);
1207
- __ bind(&miss);
1208
- __ DecrementCounter(&Counters::keyed_load_array_length, 1);
1209
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1210
-
1211
- // Return the generated code.
1212
- return GetCode(CALLBACKS, name);
1213
- }
1214
-
1215
-
1216
- Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
1217
- JSObject* receiver,
1218
- JSObject* holder,
1219
- Object* value) {
1220
- // ----------- S t a t e -------------
1221
- // -- rsp[0] : return address
1222
- // -- rsp[8] : name
1223
- // -- rsp[16] : receiver
1224
- // -----------------------------------
1225
- Label miss;
1226
-
1227
- __ movq(rax, Operand(rsp, kPointerSize));
1228
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1229
- __ IncrementCounter(&Counters::keyed_load_constant_function, 1);
1230
-
1231
- // Check that the name has not changed.
1232
- __ Cmp(rax, Handle<String>(name));
1233
- __ j(not_equal, &miss);
1234
-
1235
- GenerateLoadConstant(receiver, holder, rcx, rbx, rdx,
1236
- value, name, &miss);
1237
- __ bind(&miss);
1238
- __ DecrementCounter(&Counters::keyed_load_constant_function, 1);
1239
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1240
-
1241
- // Return the generated code.
1242
- return GetCode(CONSTANT_FUNCTION, name);
1243
- }
1244
-
1245
-
1246
- Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
1247
- // ----------- S t a t e -------------
1248
- // -- rsp[0] : return address
1249
- // -- rsp[8] : name
1250
- // -- rsp[16] : receiver
1251
- // -----------------------------------
1252
- Label miss;
1253
-
1254
- __ movq(rax, Operand(rsp, kPointerSize));
1255
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1256
- __ IncrementCounter(&Counters::keyed_load_function_prototype, 1);
1257
-
1258
- // Check that the name has not changed.
1259
- __ Cmp(rax, Handle<String>(name));
1260
- __ j(not_equal, &miss);
1261
-
1262
- GenerateLoadFunctionPrototype(masm(), rcx, rdx, rbx, &miss);
1263
- __ bind(&miss);
1264
- __ DecrementCounter(&Counters::keyed_load_function_prototype, 1);
1265
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1266
-
1267
- // Return the generated code.
1268
- return GetCode(CALLBACKS, name);
1269
- }
1270
-
1271
-
1272
- Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
1273
- JSObject* holder,
1274
- String* name) {
1275
- // ----------- S t a t e -------------
1276
- // -- rsp[0] : return address
1277
- // -- rsp[8] : name
1278
- // -- rsp[16] : receiver
1279
- // -----------------------------------
1280
- Label miss;
1281
-
1282
- __ movq(rax, Operand(rsp, kPointerSize));
1283
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1284
- __ IncrementCounter(&Counters::keyed_load_interceptor, 1);
1285
-
1286
- // Check that the name has not changed.
1287
- __ Cmp(rax, Handle<String>(name));
1288
- __ j(not_equal, &miss);
1289
-
1290
- LookupResult lookup;
1291
- LookupPostInterceptor(holder, name, &lookup);
1292
- GenerateLoadInterceptor(receiver,
1293
- holder,
1294
- &lookup,
1295
- rcx,
1296
- rax,
1297
- rdx,
1298
- rbx,
1299
- name,
1300
- &miss);
1301
- __ bind(&miss);
1302
- __ DecrementCounter(&Counters::keyed_load_interceptor, 1);
1303
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1304
-
1305
- // Return the generated code.
1306
- return GetCode(INTERCEPTOR, name);
1307
- }
1308
-
1309
-
1310
- Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
1311
- // ----------- S t a t e -------------
1312
- // -- rsp[0] : return address
1313
- // -- rsp[8] : name
1314
- // -- rsp[16] : receiver
1315
- // -----------------------------------
1316
- Label miss;
1317
-
1318
- __ movq(rax, Operand(rsp, kPointerSize));
1319
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1320
- __ IncrementCounter(&Counters::keyed_load_string_length, 1);
1321
-
1322
- // Check that the name has not changed.
1323
- __ Cmp(rax, Handle<String>(name));
1324
- __ j(not_equal, &miss);
1325
-
1326
- GenerateLoadStringLength(masm(), rcx, rdx, &miss);
1327
- __ bind(&miss);
1328
- __ DecrementCounter(&Counters::keyed_load_string_length, 1);
1329
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1330
-
1331
- // Return the generated code.
1332
- return GetCode(CALLBACKS, name);
1333
- }
1334
-
1335
-
1336
- Object* StoreStubCompiler::CompileStoreCallback(JSObject* object,
1337
- AccessorInfo* callback,
1338
- String* name) {
1339
- // ----------- S t a t e -------------
1340
- // -- rax : value
1341
- // -- rcx : name
1342
- // -- rsp[0] : return address
1343
- // -- rsp[8] : receiver
1344
- // -----------------------------------
1345
- Label miss;
1346
-
1347
- // Get the object from the stack.
1348
- __ movq(rbx, Operand(rsp, 1 * kPointerSize));
1349
-
1350
- // Check that the object isn't a smi.
1351
- __ JumpIfSmi(rbx, &miss);
1352
-
1353
- // Check that the map of the object hasn't changed.
1354
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
1355
- Handle<Map>(object->map()));
1356
- __ j(not_equal, &miss);
1357
-
1358
- // Perform global security token check if needed.
1359
- if (object->IsJSGlobalProxy()) {
1360
- __ CheckAccessGlobalProxy(rbx, rdx, &miss);
1361
- }
1362
-
1363
- // Stub never generated for non-global objects that require access
1364
- // checks.
1365
- ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
1366
-
1367
- __ pop(rbx); // remove the return address
1368
- __ push(Operand(rsp, 0)); // receiver
1369
- __ Push(Handle<AccessorInfo>(callback)); // callback info
1370
- __ push(rcx); // name
1371
- __ push(rax); // value
1372
- __ push(rbx); // restore return address
1373
-
1374
- // Do tail-call to the runtime system.
1375
- ExternalReference store_callback_property =
1376
- ExternalReference(IC_Utility(IC::kStoreCallbackProperty));
1377
- __ TailCallRuntime(store_callback_property, 4, 1);
1378
-
1379
- // Handle store cache miss.
1380
- __ bind(&miss);
1381
- __ Move(rcx, Handle<String>(name)); // restore name
1382
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss));
1383
- __ Jump(ic, RelocInfo::CODE_TARGET);
1384
-
1385
- // Return the generated code.
1386
- return GetCode(CALLBACKS, name);
1387
- }
1388
-
1389
-
1390
- Object* StoreStubCompiler::CompileStoreField(JSObject* object,
1391
- int index,
1392
- Map* transition,
1393
- String* name) {
1394
- // ----------- S t a t e -------------
1395
- // -- rax : value
1396
- // -- rcx : name
1397
- // -- rsp[0] : return address
1398
- // -- rsp[8] : receiver
1399
- // -----------------------------------
1400
- Label miss;
1401
-
1402
- // Get the object from the stack.
1403
- __ movq(rbx, Operand(rsp, 1 * kPointerSize));
1404
-
1405
- // Generate store field code. Trashes the name register.
1406
- GenerateStoreField(masm(),
1407
- Builtins::StoreIC_ExtendStorage,
1408
- object,
1409
- index,
1410
- transition,
1411
- rbx, rcx, rdx,
1412
- &miss);
1413
-
1414
- // Handle store cache miss.
1415
- __ bind(&miss);
1416
- __ Move(rcx, Handle<String>(name)); // restore name
1417
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss));
1418
- __ Jump(ic, RelocInfo::CODE_TARGET);
1419
-
1420
- // Return the generated code.
1421
- return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name);
1422
- }
1423
-
1424
-
1425
- Object* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
1426
- String* name) {
1427
- // ----------- S t a t e -------------
1428
- // -- rax : value
1429
- // -- rcx : name
1430
- // -- rsp[0] : return address
1431
- // -- rsp[8] : receiver
1432
- // -----------------------------------
1433
- Label miss;
1434
-
1435
- // Get the object from the stack.
1436
- __ movq(rbx, Operand(rsp, 1 * kPointerSize));
1437
-
1438
- // Check that the object isn't a smi.
1439
- __ JumpIfSmi(rbx, &miss);
1440
-
1441
- // Check that the map of the object hasn't changed.
1442
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
1443
- Handle<Map>(receiver->map()));
1444
- __ j(not_equal, &miss);
1445
-
1446
- // Perform global security token check if needed.
1447
- if (receiver->IsJSGlobalProxy()) {
1448
- __ CheckAccessGlobalProxy(rbx, rdx, &miss);
1449
- }
1450
-
1451
- // Stub never generated for non-global objects that require access
1452
- // checks.
1453
- ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded());
1454
-
1455
- __ pop(rbx); // remove the return address
1456
- __ push(Operand(rsp, 0)); // receiver
1457
- __ push(rcx); // name
1458
- __ push(rax); // value
1459
- __ push(rbx); // restore return address
1460
-
1461
- // Do tail-call to the runtime system.
1462
- ExternalReference store_ic_property =
1463
- ExternalReference(IC_Utility(IC::kStoreInterceptorProperty));
1464
- __ TailCallRuntime(store_ic_property, 3, 1);
1465
-
1466
- // Handle store cache miss.
1467
- __ bind(&miss);
1468
- __ Move(rcx, Handle<String>(name)); // restore name
1469
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss));
1470
- __ Jump(ic, RelocInfo::CODE_TARGET);
1471
-
1472
- // Return the generated code.
1473
- return GetCode(INTERCEPTOR, name);
1474
- }
1475
-
1476
-
1477
- Object* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
1478
- JSGlobalPropertyCell* cell,
1479
- String* name) {
1480
- // ----------- S t a t e -------------
1481
- // -- rax : value
1482
- // -- rcx : name
1483
- // -- rsp[0] : return address
1484
- // -- rsp[8] : receiver
1485
- // -----------------------------------
1486
- Label miss;
1487
-
1488
- // Check that the map of the global has not changed.
1489
- __ movq(rbx, Operand(rsp, kPointerSize));
1490
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
1491
- Handle<Map>(object->map()));
1492
- __ j(not_equal, &miss);
1493
-
1494
- // Store the value in the cell.
1495
- __ Move(rcx, Handle<JSGlobalPropertyCell>(cell));
1496
- __ movq(FieldOperand(rcx, JSGlobalPropertyCell::kValueOffset), rax);
1497
-
1498
- // Return the value (register rax).
1499
- __ IncrementCounter(&Counters::named_store_global_inline, 1);
1500
- __ ret(0);
1501
-
1502
- // Handle store cache miss.
1503
- __ bind(&miss);
1504
- __ IncrementCounter(&Counters::named_store_global_inline_miss, 1);
1505
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss));
1506
- __ Jump(ic, RelocInfo::CODE_TARGET);
1507
-
1508
- // Return the generated code.
1509
- return GetCode(NORMAL, name);
1510
- }
1511
-
1512
-
1513
- Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
1514
- JSObject* receiver,
1515
- JSObject* holder,
1516
- int index) {
1517
- // ----------- S t a t e -------------
1518
- // -- rsp[0] : return address
1519
- // -- rsp[8] : name
1520
- // -- rsp[16] : receiver
1521
- // -----------------------------------
1522
- Label miss;
1523
-
1524
- __ movq(rax, Operand(rsp, kPointerSize));
1525
- __ movq(rcx, Operand(rsp, 2 * kPointerSize));
1526
- __ IncrementCounter(&Counters::keyed_load_field, 1);
1527
-
1528
- // Check that the name has not changed.
1529
- __ Cmp(rax, Handle<String>(name));
1530
- __ j(not_equal, &miss);
1531
-
1532
- GenerateLoadField(receiver, holder, rcx, rbx, rdx, index, name, &miss);
1533
-
1534
- __ bind(&miss);
1535
- __ DecrementCounter(&Counters::keyed_load_field, 1);
1536
- GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1537
-
1538
- // Return the generated code.
1539
- return GetCode(FIELD, name);
1540
- }
1541
-
1542
-
1543
- Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
1544
- int index,
1545
- Map* transition,
1546
- String* name) {
1547
- // ----------- S t a t e -------------
1548
- // -- rax : value
1549
- // -- rsp[0] : return address
1550
- // -- rsp[8] : key
1551
- // -- rsp[16] : receiver
1552
- // -----------------------------------
1553
- Label miss;
1554
-
1555
- __ IncrementCounter(&Counters::keyed_store_field, 1);
1556
-
1557
- // Get the name from the stack.
1558
- __ movq(rcx, Operand(rsp, 1 * kPointerSize));
1559
- // Check that the name has not changed.
1560
- __ Cmp(rcx, Handle<String>(name));
1561
- __ j(not_equal, &miss);
1562
-
1563
- // Get the object from the stack.
1564
- __ movq(rbx, Operand(rsp, 2 * kPointerSize));
1565
-
1566
- // Generate store field code. Trashes the name register.
1567
- GenerateStoreField(masm(),
1568
- Builtins::KeyedStoreIC_ExtendStorage,
1569
- object,
1570
- index,
1571
- transition,
1572
- rbx, rcx, rdx,
1573
- &miss);
1574
-
1575
- // Handle store cache miss.
1576
- __ bind(&miss);
1577
- __ DecrementCounter(&Counters::keyed_store_field, 1);
1578
- Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss));
1579
- __ Jump(ic, RelocInfo::CODE_TARGET);
1580
-
1581
- // Return the generated code.
1582
- return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name);
1583
- }
1584
-
1585
-
1586
- // TODO(1241006): Avoid having lazy compile stubs specialized by the
1587
- // number of arguments. It is not needed anymore.
1588
- Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
1589
- // Enter an internal frame.
1590
- __ EnterInternalFrame();
1591
-
1592
- // Push a copy of the function onto the stack.
1593
- __ push(rdi);
1594
-
1595
- __ push(rdi); // function is also the parameter to the runtime call
1596
- __ CallRuntime(Runtime::kLazyCompile, 1);
1597
- __ pop(rdi);
1598
-
1599
- // Tear down temporary frame.
1600
- __ LeaveInternalFrame();
1601
-
1602
- // Do a tail-call of the compiled function.
1603
- __ lea(rcx, FieldOperand(rax, Code::kHeaderSize));
1604
- __ jmp(rcx);
1605
-
1606
- return GetCodeWithFlags(flags, "LazyCompileStub");
1607
- }
1608
-
1609
-
1610
-
1611
- void StubCompiler::GenerateLoadInterceptor(JSObject* object,
1612
- JSObject* holder,
1613
- LookupResult* lookup,
1614
- Register receiver,
1615
- Register name_reg,
1616
- Register scratch1,
1617
- Register scratch2,
1618
- String* name,
1619
- Label* miss) {
1620
- LoadInterceptorCompiler compiler(name_reg);
1621
- CompileLoadInterceptor(&compiler,
1622
- this,
1623
- masm(),
1624
- object,
1625
- holder,
1626
- name,
1627
- lookup,
1628
- receiver,
1629
- scratch1,
1630
- scratch2,
1631
- miss);
1632
- }
1633
-
1634
-
1635
- bool StubCompiler::GenerateLoadCallback(JSObject* object,
1636
- JSObject* holder,
1637
- Register receiver,
1638
- Register name_reg,
1639
- Register scratch1,
1640
- Register scratch2,
1641
- AccessorInfo* callback,
1642
- String* name,
1643
- Label* miss,
1644
- Failure** failure) {
1645
- // Check that the receiver isn't a smi.
1646
- __ JumpIfSmi(receiver, miss);
1647
-
1648
- // Check that the maps haven't changed.
1649
- Register reg =
1650
- CheckPrototypes(object, receiver, holder,
1651
- scratch1, scratch2, name, miss);
1652
-
1653
- // Push the arguments on the JS stack of the caller.
1654
- __ pop(scratch2); // remove return address
1655
- __ push(receiver); // receiver
1656
- __ push(reg); // holder
1657
- __ Move(reg, Handle<AccessorInfo>(callback)); // callback data
1658
- __ push(reg);
1659
- __ push(FieldOperand(reg, AccessorInfo::kDataOffset));
1660
- __ push(name_reg); // name
1661
- __ push(scratch2); // restore return address
1662
-
1663
- // Do tail-call to the runtime system.
1664
- ExternalReference load_callback_property =
1665
- ExternalReference(IC_Utility(IC::kLoadCallbackProperty));
1666
- __ TailCallRuntime(load_callback_property, 5, 1);
1667
-
1668
- return true;
1669
- }
1670
-
1671
-
1672
- Register StubCompiler::CheckPrototypes(JSObject* object,
1673
- Register object_reg,
1674
- JSObject* holder,
1675
- Register holder_reg,
1676
- Register scratch,
1677
- String* name,
1678
- Label* miss) {
1679
- // Check that the maps haven't changed.
1680
- Register result =
1681
- __ CheckMaps(object, object_reg, holder, holder_reg, scratch, miss);
1682
-
1683
- // If we've skipped any global objects, it's not enough to verify
1684
- // that their maps haven't changed.
1685
- while (object != holder) {
1686
- if (object->IsGlobalObject()) {
1687
- GlobalObject* global = GlobalObject::cast(object);
1688
- Object* probe = global->EnsurePropertyCell(name);
1689
- if (probe->IsFailure()) {
1690
- set_failure(Failure::cast(probe));
1691
- return result;
1692
- }
1693
- JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(probe);
1694
- ASSERT(cell->value()->IsTheHole());
1695
- __ Move(scratch, Handle<Object>(cell));
1696
- __ Cmp(FieldOperand(scratch, JSGlobalPropertyCell::kValueOffset),
1697
- Factory::the_hole_value());
1698
- __ j(not_equal, miss);
1699
- }
1700
- object = JSObject::cast(object->GetPrototype());
1701
- }
1702
-
1703
- // Return the register containing the holder.
1704
- return result;
1705
- }
1706
-
1707
-
1708
- void StubCompiler::GenerateLoadField(JSObject* object,
1709
- JSObject* holder,
1710
- Register receiver,
1711
- Register scratch1,
1712
- Register scratch2,
1713
- int index,
1714
- String* name,
1715
- Label* miss) {
1716
- // Check that the receiver isn't a smi.
1717
- __ JumpIfSmi(receiver, miss);
1718
-
1719
- // Check the prototype chain.
1720
- Register reg =
1721
- CheckPrototypes(object, receiver, holder,
1722
- scratch1, scratch2, name, miss);
1723
-
1724
- // Get the value from the properties.
1725
- GenerateFastPropertyLoad(masm(), rax, reg, holder, index);
1726
- __ ret(0);
1727
- }
1728
-
1729
-
1730
- void StubCompiler::GenerateLoadConstant(JSObject* object,
1731
- JSObject* holder,
1732
- Register receiver,
1733
- Register scratch1,
1734
- Register scratch2,
1735
- Object* value,
1736
- String* name,
1737
- Label* miss) {
1738
- // Check that the receiver isn't a smi.
1739
- __ JumpIfSmi(receiver, miss);
1740
-
1741
- // Check that the maps haven't changed.
1742
- Register reg =
1743
- CheckPrototypes(object, receiver, holder,
1744
- scratch1, scratch2, name, miss);
1745
-
1746
- // Return the constant value.
1747
- __ Move(rax, Handle<Object>(value));
1748
- __ ret(0);
1749
- }
1750
-
1751
-
1752
- // Specialized stub for constructing objects from functions which only have only
1753
- // simple assignments of the form this.x = ...; in their body.
1754
- Object* ConstructStubCompiler::CompileConstructStub(
1755
- SharedFunctionInfo* shared) {
1756
- // ----------- S t a t e -------------
1757
- // -- rax : argc
1758
- // -- rdi : constructor
1759
- // -- rsp[0] : return address
1760
- // -- rsp[4] : last argument
1761
- // -----------------------------------
1762
- Label generic_stub_call;
1763
-
1764
- // Use r8 for holding undefined which is used in several places below.
1765
- __ Move(r8, Factory::undefined_value());
1766
-
1767
- #ifdef ENABLE_DEBUGGER_SUPPORT
1768
- // Check to see whether there are any break points in the function code. If
1769
- // there are jump to the generic constructor stub which calls the actual
1770
- // code for the function thereby hitting the break points.
1771
- __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
1772
- __ movq(rbx, FieldOperand(rbx, SharedFunctionInfo::kDebugInfoOffset));
1773
- __ cmpq(rbx, r8);
1774
- __ j(not_equal, &generic_stub_call);
1775
- #endif
1776
-
1777
- // Load the initial map and verify that it is in fact a map.
1778
- __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
1779
- // Will both indicate a NULL and a Smi.
1780
- ASSERT(kSmiTag == 0);
1781
- __ JumpIfSmi(rbx, &generic_stub_call);
1782
- __ CmpObjectType(rbx, MAP_TYPE, rcx);
1783
- __ j(not_equal, &generic_stub_call);
1784
-
1785
- #ifdef DEBUG
1786
- // Cannot construct functions this way.
1787
- // rdi: constructor
1788
- // rbx: initial map
1789
- __ CmpInstanceType(rbx, JS_FUNCTION_TYPE);
1790
- __ Assert(not_equal, "Function constructed by construct stub.");
1791
- #endif
1792
-
1793
- // Now allocate the JSObject in new space.
1794
- // rdi: constructor
1795
- // rbx: initial map
1796
- __ movzxbq(rcx, FieldOperand(rbx, Map::kInstanceSizeOffset));
1797
- __ shl(rcx, Immediate(kPointerSizeLog2));
1798
- __ AllocateInNewSpace(rcx,
1799
- rdx,
1800
- rcx,
1801
- no_reg,
1802
- &generic_stub_call,
1803
- NO_ALLOCATION_FLAGS);
1804
-
1805
- // Allocated the JSObject, now initialize the fields and add the heap tag.
1806
- // rbx: initial map
1807
- // rdx: JSObject (untagged)
1808
- __ movq(Operand(rdx, JSObject::kMapOffset), rbx);
1809
- __ Move(rbx, Factory::empty_fixed_array());
1810
- __ movq(Operand(rdx, JSObject::kPropertiesOffset), rbx);
1811
- __ movq(Operand(rdx, JSObject::kElementsOffset), rbx);
1812
-
1813
- // rax: argc
1814
- // rdx: JSObject (untagged)
1815
- // Load the address of the first in-object property into r9.
1816
- __ lea(r9, Operand(rdx, JSObject::kHeaderSize));
1817
- // Calculate the location of the first argument. The stack contains only the
1818
- // return address on top of the argc arguments.
1819
- __ lea(rcx, Operand(rsp, rax, times_pointer_size, 0));
1820
-
1821
- // rax: argc
1822
- // rcx: first argument
1823
- // rdx: JSObject (untagged)
1824
- // r8: undefined
1825
- // r9: first in-object property of the JSObject
1826
- // Fill the initialized properties with a constant value or a passed argument
1827
- // depending on the this.x = ...; assignment in the function.
1828
- for (int i = 0; i < shared->this_property_assignments_count(); i++) {
1829
- if (shared->IsThisPropertyAssignmentArgument(i)) {
1830
- // Check if the argument assigned to the property is actually passed.
1831
- // If argument is not passed the property is set to undefined,
1832
- // otherwise find it on the stack.
1833
- int arg_number = shared->GetThisPropertyAssignmentArgument(i);
1834
- __ movq(rbx, r8);
1835
- __ cmpq(rax, Immediate(arg_number));
1836
- __ cmovq(above, rbx, Operand(rcx, arg_number * -kPointerSize));
1837
- // Store value in the property.
1838
- __ movq(Operand(r9, i * kPointerSize), rbx);
1839
- } else {
1840
- // Set the property to the constant value.
1841
- Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i));
1842
- __ Move(Operand(r9, i * kPointerSize), constant);
1843
- }
1844
- }
1845
-
1846
- // Fill the unused in-object property fields with undefined.
1847
- for (int i = shared->this_property_assignments_count();
1848
- i < shared->CalculateInObjectProperties();
1849
- i++) {
1850
- __ movq(Operand(r9, i * kPointerSize), r8);
1851
- }
1852
-
1853
- // rax: argc
1854
- // rdx: JSObject (untagged)
1855
- // Move argc to rbx and the JSObject to return to rax and tag it.
1856
- __ movq(rbx, rax);
1857
- __ movq(rax, rdx);
1858
- __ or_(rax, Immediate(kHeapObjectTag));
1859
-
1860
- // rax: JSObject
1861
- // rbx: argc
1862
- // Remove caller arguments and receiver from the stack and return.
1863
- __ pop(rcx);
1864
- __ lea(rsp, Operand(rsp, rbx, times_pointer_size, 1 * kPointerSize));
1865
- __ push(rcx);
1866
- __ IncrementCounter(&Counters::constructed_objects, 1);
1867
- __ IncrementCounter(&Counters::constructed_objects_stub, 1);
1868
- __ ret(0);
1869
-
1870
- // Jump to the generic stub in case the specialized code cannot handle the
1871
- // construction.
1872
- __ bind(&generic_stub_call);
1873
- Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric);
1874
- Handle<Code> generic_construct_stub(code);
1875
- __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1876
-
1877
- // Return the generated code.
1878
- return GetCode();
1879
- }
1880
-
1881
-
1882
- #undef __
1883
-
1884
- } } // namespace v8::internal