therubyracer 0.7.4 → 0.7.5

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 (482) hide show
  1. data/History.txt +11 -0
  2. data/Rakefile +1 -1
  3. data/ext/v8/extconf.rb +0 -18
  4. data/ext/v8/rr.cpp +2 -2
  5. data/ext/v8/upstream/{2.1.10 → 2.3.3}/AUTHORS +1 -0
  6. data/ext/v8/upstream/{2.1.10 → 2.3.3}/ChangeLog +239 -0
  7. data/ext/v8/upstream/{2.1.10 → 2.3.3}/LICENSE +0 -0
  8. data/ext/v8/upstream/{2.1.10 → 2.3.3}/SConstruct +29 -17
  9. data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8-debug.h +61 -3
  10. data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8-profiler.h +182 -5
  11. data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8.h +458 -257
  12. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/SConscript +2 -5
  13. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/accessors.cc +2 -2
  14. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/accessors.h +0 -0
  15. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/allocation.cc +0 -0
  16. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/allocation.h +0 -0
  17. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/api.cc +574 -30
  18. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/api.h +12 -10
  19. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/apinatives.js +0 -0
  20. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/apiutils.h +0 -0
  21. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arguments.h +0 -0
  22. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm-inl.h +38 -15
  23. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm.cc +646 -101
  24. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm.h +174 -15
  25. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/builtins-arm.cc +56 -47
  26. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +48 -0
  27. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/codegen-arm.cc +2957 -1448
  28. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/codegen-arm.h +230 -74
  29. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/constants-arm.cc +25 -1
  30. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/constants-arm.h +16 -1
  31. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/cpu-arm.cc +4 -0
  32. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/debug-arm.cc +76 -6
  33. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/disasm-arm.cc +168 -20
  34. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/fast-codegen-arm.cc +5 -2
  35. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/frames-arm.cc +4 -4
  36. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/frames-arm.h +0 -0
  37. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/full-codegen-arm.cc +1558 -248
  38. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +2258 -0
  39. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/jump-target-arm.cc +55 -103
  40. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/macro-assembler-arm.cc +358 -185
  41. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/macro-assembler-arm.h +136 -41
  42. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/regexp-macro-assembler-arm.cc +26 -5
  43. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/regexp-macro-assembler-arm.h +0 -0
  44. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm-inl.h +0 -0
  45. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm.cc +4 -0
  46. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm.h +0 -0
  47. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/simulator-arm.cc +203 -22
  48. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/simulator-arm.h +7 -0
  49. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/stub-cache-arm.cc +531 -324
  50. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm-inl.h +59 -0
  51. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/virtual-frame-arm.cc +247 -81
  52. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/virtual-frame-arm.h +99 -83
  53. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/array.js +2 -2
  54. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/assembler.cc +6 -13
  55. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/assembler.h +36 -10
  56. data/ext/v8/upstream/2.3.3/src/ast-inl.h +81 -0
  57. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ast.cc +14 -0
  58. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ast.h +20 -35
  59. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bootstrapper.cc +32 -1
  60. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bootstrapper.h +0 -4
  61. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/builtins.cc +50 -33
  62. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/builtins.h +2 -0
  63. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bytecodes-irregexp.h +0 -0
  64. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cached-powers.h +0 -0
  65. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/char-predicates-inl.h +0 -0
  66. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/char-predicates.h +0 -0
  67. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/checks.cc +0 -0
  68. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/checks.h +8 -6
  69. data/ext/v8/upstream/2.3.3/src/circular-queue-inl.h +53 -0
  70. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/circular-queue.cc +0 -0
  71. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/circular-queue.h +0 -26
  72. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code-stubs.cc +2 -4
  73. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code-stubs.h +1 -0
  74. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code.h +0 -0
  75. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen-inl.h +0 -0
  76. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen.cc +44 -13
  77. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen.h +310 -31
  78. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compilation-cache.cc +28 -0
  79. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compilation-cache.h +3 -0
  80. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compiler.cc +45 -14
  81. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compiler.h +0 -0
  82. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/contexts.cc +11 -11
  83. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/contexts.h +0 -0
  84. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions-inl.h +0 -0
  85. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions.cc +25 -11
  86. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions.h +0 -0
  87. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/counters.cc +0 -0
  88. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/counters.h +0 -0
  89. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler-inl.h +2 -1
  90. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler.cc +68 -24
  91. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler.h +19 -11
  92. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu.h +0 -0
  93. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-debug.cc +0 -0
  94. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-debug.h +0 -0
  95. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-posix.cc +0 -0
  96. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-readline.cc +0 -0
  97. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-windows.cc +0 -0
  98. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.cc +3 -0
  99. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.h +0 -0
  100. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.js +55 -2
  101. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/data-flow.cc +3 -0
  102. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/data-flow.h +0 -0
  103. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/date.js +68 -137
  104. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser-inl.h +0 -0
  105. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser.cc +2 -8
  106. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser.h +0 -0
  107. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-agent.cc +3 -3
  108. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-agent.h +0 -0
  109. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-debugger.js +81 -23
  110. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug.cc +275 -81
  111. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug.h +85 -6
  112. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disasm.h +0 -0
  113. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disassembler.cc +1 -1
  114. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disassembler.h +0 -0
  115. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/diy-fp.cc +0 -0
  116. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/diy-fp.h +0 -0
  117. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/double.h +0 -0
  118. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dtoa-config.c +0 -0
  119. data/ext/v8/upstream/2.3.3/src/dtoa.cc +77 -0
  120. data/ext/v8/upstream/2.3.3/src/dtoa.h +81 -0
  121. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/execution.cc +111 -3
  122. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/execution.h +12 -1
  123. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/factory.cc +25 -3
  124. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/factory.h +16 -9
  125. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-codegen.cc +0 -0
  126. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-codegen.h +0 -0
  127. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-dtoa.cc +2 -9
  128. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-dtoa.h +1 -2
  129. data/ext/v8/upstream/2.3.3/src/fixed-dtoa.cc +405 -0
  130. data/ext/v8/upstream/{2.1.10/src/jump-target-light.cc → 2.3.3/src/fixed-dtoa.h} +22 -53
  131. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flag-definitions.h +14 -6
  132. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flags.cc +5 -9
  133. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flags.h +0 -0
  134. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flow-graph.cc +0 -0
  135. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flow-graph.h +0 -0
  136. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frame-element.cc +0 -0
  137. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frame-element.h +0 -0
  138. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames-inl.h +0 -0
  139. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames.cc +5 -2
  140. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames.h +1 -0
  141. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/full-codegen.cc +387 -20
  142. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/full-codegen.h +102 -5
  143. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/func-name-inferrer.cc +0 -0
  144. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/func-name-inferrer.h +0 -0
  145. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/global-handles.cc +8 -4
  146. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/global-handles.h +0 -0
  147. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/globals.h +44 -7
  148. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles-inl.h +0 -0
  149. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles.cc +19 -0
  150. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles.h +8 -0
  151. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/hashmap.cc +0 -0
  152. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/hashmap.h +0 -0
  153. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-inl.h +56 -14
  154. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-profiler.cc +85 -1
  155. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-profiler.h +45 -1
  156. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap.cc +994 -396
  157. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap.h +220 -65
  158. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32-inl.h +41 -12
  159. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32.cc +94 -24
  160. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32.h +32 -4
  161. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/builtins-ia32.cc +42 -30
  162. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32-inl.h +0 -0
  163. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32.cc +1758 -916
  164. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32.h +67 -74
  165. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/cpu-ia32.cc +4 -0
  166. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/debug-ia32.cc +46 -0
  167. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/disasm-ia32.cc +37 -6
  168. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/fast-codegen-ia32.cc +4 -0
  169. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/fast-codegen-ia32.h +0 -0
  170. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/frames-ia32.cc +4 -0
  171. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/frames-ia32.h +0 -0
  172. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/full-codegen-ia32.cc +1465 -198
  173. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/ic-ia32.cc +688 -367
  174. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/jump-target-ia32.cc +4 -0
  175. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/macro-assembler-ia32.cc +82 -180
  176. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/macro-assembler-ia32.h +41 -25
  177. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/regexp-macro-assembler-ia32.cc +68 -24
  178. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/regexp-macro-assembler-ia32.h +1 -2
  179. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32-inl.h +0 -0
  180. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32.cc +4 -0
  181. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32.h +0 -0
  182. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/simulator-ia32.cc +0 -0
  183. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/simulator-ia32.h +0 -0
  184. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/stub-cache-ia32.cc +649 -302
  185. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/virtual-frame-ia32.cc +23 -1
  186. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/virtual-frame-ia32.h +18 -27
  187. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic-inl.h +30 -3
  188. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic.cc +384 -66
  189. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic.h +65 -24
  190. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/interpreter-irregexp.cc +0 -0
  191. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/interpreter-irregexp.h +0 -0
  192. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/json.js +3 -3
  193. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jsregexp.cc +20 -4
  194. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jsregexp.h +0 -0
  195. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-heavy-inl.h +0 -0
  196. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-heavy.cc +79 -13
  197. data/ext/v8/upstream/{2.1.10/src/jump-target.h → 2.3.3/src/jump-target-heavy.h} +5 -47
  198. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-inl.h +0 -0
  199. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-light-inl.h +16 -2
  200. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +110 -0
  201. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +192 -0
  202. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target.cc +0 -64
  203. data/ext/v8/upstream/2.3.3/src/jump-target.h +90 -0
  204. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/list-inl.h +0 -0
  205. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/list.h +0 -0
  206. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit-debugger.js +141 -28
  207. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit.cc +19 -7
  208. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit.h +0 -0
  209. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-inl.h +0 -0
  210. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-utils.cc +0 -0
  211. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-utils.h +0 -0
  212. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log.cc +12 -11
  213. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log.h +12 -0
  214. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/macro-assembler.h +0 -16
  215. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/macros.py +21 -0
  216. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mark-compact.cc +120 -109
  217. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mark-compact.h +25 -37
  218. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/math.js +0 -0
  219. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/memory.h +0 -0
  220. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.cc +8 -3
  221. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.h +2 -1
  222. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.js +15 -7
  223. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips-inl.h +0 -0
  224. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips.cc +12 -1
  225. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips.h +4 -1
  226. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/builtins-mips.cc +3 -0
  227. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips-inl.h +0 -0
  228. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips.cc +9 -0
  229. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips.h +1 -0
  230. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/constants-mips.cc +5 -0
  231. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/constants-mips.h +0 -0
  232. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/cpu-mips.cc +4 -0
  233. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/debug-mips.cc +3 -0
  234. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/disasm-mips.cc +3 -0
  235. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/fast-codegen-mips.cc +3 -0
  236. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/frames-mips.cc +3 -0
  237. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/frames-mips.h +0 -0
  238. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/full-codegen-mips.cc +5 -1
  239. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/ic-mips.cc +3 -0
  240. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/jump-target-mips.cc +3 -0
  241. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/macro-assembler-mips.cc +3 -0
  242. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/macro-assembler-mips.h +0 -0
  243. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips-inl.h +0 -0
  244. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips.cc +3 -0
  245. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips.h +0 -0
  246. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/simulator-mips.cc +3 -0
  247. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/simulator-mips.h +0 -0
  248. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/stub-cache-mips.cc +3 -0
  249. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/virtual-frame-mips.cc +3 -0
  250. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/virtual-frame-mips.h +0 -0
  251. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mirror-debugger.js +46 -4
  252. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mksnapshot.cc +0 -0
  253. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/natives.h +0 -0
  254. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects-debug.cc +8 -1
  255. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects-inl.h +235 -62
  256. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects.cc +497 -231
  257. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects.h +355 -149
  258. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/oprofile-agent.cc +0 -0
  259. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/oprofile-agent.h +0 -0
  260. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/parser.cc +31 -6
  261. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/parser.h +1 -1
  262. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-freebsd.cc +9 -6
  263. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-linux.cc +26 -6
  264. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-macos.cc +11 -6
  265. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-nullos.cc +0 -0
  266. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-openbsd.cc +6 -0
  267. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-posix.cc +0 -0
  268. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-solaris.cc +69 -23
  269. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-win32.cc +15 -11
  270. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform.h +10 -6
  271. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/powers-ten.h +0 -0
  272. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/prettyprinter.cc +0 -0
  273. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/prettyprinter.h +0 -0
  274. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/profile-generator-inl.h +26 -2
  275. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +1830 -0
  276. data/ext/v8/upstream/2.3.3/src/profile-generator.h +853 -0
  277. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/property.cc +0 -0
  278. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/property.h +0 -0
  279. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  280. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp.cc +0 -0
  281. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp.h +0 -0
  282. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-tracer.cc +0 -0
  283. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-tracer.h +0 -0
  284. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler.cc +1 -3
  285. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler.h +0 -0
  286. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-stack.cc +0 -0
  287. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-stack.h +0 -0
  288. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp.js +25 -4
  289. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator-inl.h +0 -0
  290. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator.cc +4 -3
  291. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator.h +0 -0
  292. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/rewriter.cc +85 -8
  293. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/rewriter.h +0 -0
  294. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.cc +547 -221
  295. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.h +5 -1
  296. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.js +23 -31
  297. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scanner.cc +12 -6
  298. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scanner.h +60 -53
  299. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopeinfo.cc +156 -168
  300. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopeinfo.h +58 -62
  301. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopes.cc +0 -0
  302. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopes.h +0 -0
  303. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/serialize.cc +320 -242
  304. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/serialize.h +81 -48
  305. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/shell.h +0 -0
  306. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/simulator.h +0 -0
  307. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/smart-pointer.h +0 -0
  308. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot-common.cc +0 -0
  309. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot-empty.cc +0 -0
  310. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot.h +0 -0
  311. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces-inl.h +177 -74
  312. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces.cc +138 -315
  313. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces.h +155 -124
  314. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/splay-tree-inl.h +0 -0
  315. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/splay-tree.h +0 -0
  316. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string-stream.cc +0 -0
  317. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string-stream.h +0 -0
  318. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string.js +113 -119
  319. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/stub-cache.cc +242 -97
  320. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/stub-cache.h +118 -55
  321. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/dtoa/COPYING +0 -0
  322. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/dtoa/dtoa.c +4 -0
  323. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/valgrind/valgrind.h +0 -0
  324. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/token.cc +0 -0
  325. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/token.h +0 -0
  326. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/top.cc +107 -26
  327. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/top.h +9 -4
  328. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/type-info.cc +0 -0
  329. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/type-info.h +2 -2
  330. data/ext/v8/upstream/2.3.3/src/unbound-queue-inl.h +95 -0
  331. data/ext/v8/upstream/2.3.3/src/unbound-queue.h +67 -0
  332. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode-inl.h +0 -0
  333. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode.cc +0 -0
  334. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode.h +0 -0
  335. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/uri.js +0 -0
  336. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/utils.cc +0 -0
  337. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/utils.h +83 -1
  338. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8-counters.cc +0 -0
  339. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8-counters.h +20 -0
  340. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8.cc +5 -1
  341. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8.h +0 -0
  342. data/ext/v8/upstream/2.3.3/src/v8dll-main.cc +39 -0
  343. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8natives.js +210 -33
  344. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8threads.cc +1 -1
  345. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8threads.h +1 -1
  346. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/variables.cc +0 -0
  347. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/variables.h +0 -0
  348. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/version.cc +3 -3
  349. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/version.h +0 -0
  350. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-heavy-inl.h +40 -0
  351. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-heavy.cc +0 -0
  352. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-inl.h +0 -0
  353. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-light-inl.h +106 -5
  354. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-light.cc +4 -1
  355. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame.cc +0 -0
  356. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame.h +0 -0
  357. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state-inl.h +6 -3
  358. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state.cc +1 -1
  359. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state.h +6 -4
  360. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64-inl.h +42 -5
  361. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64.cc +285 -53
  362. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64.h +54 -18
  363. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/builtins-x64.cc +31 -33
  364. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64-inl.h +0 -0
  365. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64.cc +9787 -8722
  366. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64.h +82 -47
  367. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/cpu-x64.cc +4 -0
  368. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/debug-x64.cc +55 -6
  369. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/disasm-x64.cc +42 -19
  370. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/fast-codegen-x64.cc +4 -0
  371. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/frames-x64.cc +4 -0
  372. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/frames-x64.h +4 -0
  373. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/full-codegen-x64.cc +1487 -210
  374. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +1907 -0
  375. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/jump-target-x64.cc +4 -0
  376. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/macro-assembler-x64.cc +366 -338
  377. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/macro-assembler-x64.h +83 -38
  378. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/regexp-macro-assembler-x64.cc +82 -23
  379. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/regexp-macro-assembler-x64.h +1 -2
  380. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64-inl.h +6 -5
  381. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64.cc +4 -0
  382. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64.h +1 -1
  383. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/simulator-x64.cc +0 -0
  384. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/simulator-x64.h +0 -0
  385. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/stub-cache-x64.cc +556 -377
  386. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/virtual-frame-x64.cc +197 -98
  387. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/virtual-frame-x64.h +37 -28
  388. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone-inl.h +0 -0
  389. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone.cc +0 -0
  390. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone.h +0 -0
  391. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/codemap.js +0 -0
  392. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/consarray.js +0 -0
  393. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/csvparser.js +0 -0
  394. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +317 -0
  395. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/generate-ten-powers.scm +0 -0
  396. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/gyp/v8.gyp +87 -20
  397. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/js2c.py +19 -15
  398. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/jsmin.py +0 -0
  399. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/linux-tick-processor +0 -0
  400. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/linux-tick-processor.py +0 -0
  401. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/logreader.js +0 -0
  402. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/mac-nm +0 -0
  403. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/mac-tick-processor +0 -0
  404. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/annotate +0 -0
  405. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/common +0 -0
  406. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/dump +0 -0
  407. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/report +0 -0
  408. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/reset +0 -0
  409. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/run +0 -0
  410. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/shutdown +0 -0
  411. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/start +0 -0
  412. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/presubmit.py +0 -0
  413. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/process-heap-prof.py +0 -0
  414. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/profile.js +0 -0
  415. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/profile_view.js +0 -0
  416. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/run-valgrind.py +0 -0
  417. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/splaytree.js +0 -0
  418. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/splaytree.py +0 -0
  419. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/stats-viewer.py +25 -13
  420. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/test.py +0 -0
  421. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor-driver.js +0 -0
  422. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor.js +0 -0
  423. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor.py +0 -0
  424. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/utils.py +0 -0
  425. data/ext/v8/upstream/2.3.3/tools/v8.xcodeproj/project.pbxproj +1855 -0
  426. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/README.txt +0 -0
  427. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/arm.vsprops +0 -0
  428. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/common.vsprops +0 -0
  429. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8.vcproj +0 -0
  430. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8_arm.vcproj +0 -0
  431. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8_x64.vcproj +0 -0
  432. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8js2c.cmd +0 -0
  433. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/debug.vsprops +0 -0
  434. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/ia32.vsprops +0 -0
  435. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/js2c.cmd +0 -0
  436. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/release.vsprops +0 -0
  437. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8.sln +0 -0
  438. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8.vcproj +0 -0
  439. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_arm.sln +0 -0
  440. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_arm.vcproj +0 -0
  441. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base.vcproj +40 -0
  442. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base_arm.vcproj +20 -0
  443. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base_x64.vcproj +16 -0
  444. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest.vcproj +4 -0
  445. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  446. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  447. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  448. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  449. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  450. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  451. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  452. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample.vcproj +0 -0
  453. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -0
  454. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -0
  455. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  456. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  457. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  458. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  459. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_x64.sln +0 -0
  460. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_x64.vcproj +0 -0
  461. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/x64.vsprops +0 -0
  462. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/windows-tick-processor.bat +0 -0
  463. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/windows-tick-processor.py +0 -0
  464. data/ext/v8/upstream/Makefile +1 -1
  465. data/ext/v8/v8_template.cpp +94 -2
  466. data/ext/v8/v8_try_catch.cpp +2 -2
  467. data/lib/v8.rb +1 -1
  468. data/lib/v8/access.rb +93 -40
  469. data/lib/v8/cli.rb +1 -1
  470. data/lib/v8/function.rb +14 -2
  471. data/spec/redjs/jsapi_spec.rb +231 -42
  472. data/therubyracer.gemspec +3 -3
  473. metadata +463 -453
  474. data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2-inl.h +0 -263
  475. data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2.cc +0 -1878
  476. data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2.h +0 -1036
  477. data/ext/v8/upstream/2.1.10/src/arm/codegen-arm-inl.h +0 -72
  478. data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +0 -1833
  479. data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +0 -101
  480. data/ext/v8/upstream/2.1.10/src/profile-generator.cc +0 -583
  481. data/ext/v8/upstream/2.1.10/src/profile-generator.h +0 -364
  482. data/ext/v8/upstream/2.1.10/src/x64/ic-x64.cc +0 -1621
@@ -159,6 +159,7 @@ class Simulator {
159
159
  // instruction.
160
160
  void set_register(int reg, int32_t value);
161
161
  int32_t get_register(int reg) const;
162
+ void set_dw_register(int dreg, const int* dbl);
162
163
 
163
164
  // Support for VFP.
164
165
  void set_s_register(int reg, unsigned int value);
@@ -252,6 +253,9 @@ class Simulator {
252
253
  inline int ReadW(int32_t addr, Instr* instr);
253
254
  inline void WriteW(int32_t addr, int value, Instr* instr);
254
255
 
256
+ int32_t* ReadDW(int32_t addr);
257
+ void WriteDW(int32_t addr, int32_t value1, int32_t value2);
258
+
255
259
  // Executing is handled based on the instruction type.
256
260
  void DecodeType01(Instr* instr); // both type 0 and type 1 rolled into one
257
261
  void DecodeType2(Instr* instr);
@@ -290,6 +294,9 @@ class Simulator {
290
294
  void TrashCallerSaveRegisters();
291
295
 
292
296
  // Architecture state.
297
+ // Saturating instructions require a Q flag to indicate saturation.
298
+ // There is currently no way to read the CPSR directly, and thus read the Q
299
+ // flag, so this is left unimplemented.
293
300
  int32_t registers_[16];
294
301
  bool n_flag_;
295
302
  bool z_flag_;
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_ARM)
31
+
30
32
  #include "ic-inl.h"
31
33
  #include "codegen-inl.h"
32
34
  #include "stub-cache.h"
@@ -81,6 +83,119 @@ static void ProbeTable(MacroAssembler* masm,
81
83
  }
82
84
 
83
85
 
86
+ // Helper function used to check that the dictionary doesn't contain
87
+ // the property. This function may return false negatives, so miss_label
88
+ // must always call a backup property check that is complete.
89
+ // This function is safe to call if the receiver has fast properties.
90
+ // Name must be a symbol and receiver must be a heap object.
91
+ static void GenerateDictionaryNegativeLookup(MacroAssembler* masm,
92
+ Label* miss_label,
93
+ Register receiver,
94
+ String* name,
95
+ Register scratch0,
96
+ Register scratch1) {
97
+ ASSERT(name->IsSymbol());
98
+ __ IncrementCounter(&Counters::negative_lookups, 1, scratch0, scratch1);
99
+ __ IncrementCounter(&Counters::negative_lookups_miss, 1, scratch0, scratch1);
100
+
101
+ Label done;
102
+
103
+ const int kInterceptorOrAccessCheckNeededMask =
104
+ (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded);
105
+
106
+ // Bail out if the receiver has a named interceptor or requires access checks.
107
+ Register map = scratch1;
108
+ __ ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset));
109
+ __ ldrb(scratch0, FieldMemOperand(map, Map::kBitFieldOffset));
110
+ __ tst(scratch0, Operand(kInterceptorOrAccessCheckNeededMask));
111
+ __ b(ne, miss_label);
112
+
113
+ // Check that receiver is a JSObject.
114
+ __ ldrb(scratch0, FieldMemOperand(map, Map::kInstanceTypeOffset));
115
+ __ cmp(scratch0, Operand(FIRST_JS_OBJECT_TYPE));
116
+ __ b(lt, miss_label);
117
+
118
+ // Load properties array.
119
+ Register properties = scratch0;
120
+ __ ldr(properties, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
121
+ // Check that the properties array is a dictionary.
122
+ __ ldr(map, FieldMemOperand(properties, HeapObject::kMapOffset));
123
+ Register tmp = properties;
124
+ __ LoadRoot(tmp, Heap::kHashTableMapRootIndex);
125
+ __ cmp(map, tmp);
126
+ __ b(ne, miss_label);
127
+
128
+ // Restore the temporarily used register.
129
+ __ ldr(properties, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
130
+
131
+ // Compute the capacity mask.
132
+ const int kCapacityOffset =
133
+ StringDictionary::kHeaderSize +
134
+ StringDictionary::kCapacityIndex * kPointerSize;
135
+
136
+ // Generate an unrolled loop that performs a few probes before
137
+ // giving up.
138
+ static const int kProbes = 4;
139
+ const int kElementsStartOffset =
140
+ StringDictionary::kHeaderSize +
141
+ StringDictionary::kElementsStartIndex * kPointerSize;
142
+
143
+ // If names of slots in range from 1 to kProbes - 1 for the hash value are
144
+ // not equal to the name and kProbes-th slot is not used (its name is the
145
+ // undefined value), it guarantees the hash table doesn't contain the
146
+ // property. It's true even if some slots represent deleted properties
147
+ // (their names are the null value).
148
+ for (int i = 0; i < kProbes; i++) {
149
+ // scratch0 points to properties hash.
150
+ // Compute the masked index: (hash + i + i * i) & mask.
151
+ Register index = scratch1;
152
+ // Capacity is smi 2^n.
153
+ __ ldr(index, FieldMemOperand(properties, kCapacityOffset));
154
+ __ sub(index, index, Operand(1));
155
+ __ and_(index, index, Operand(
156
+ Smi::FromInt(name->Hash() + StringDictionary::GetProbeOffset(i))));
157
+
158
+ // Scale the index by multiplying by the entry size.
159
+ ASSERT(StringDictionary::kEntrySize == 3);
160
+ __ add(index, index, Operand(index, LSL, 1)); // index *= 3.
161
+
162
+ Register entity_name = scratch1;
163
+ // Having undefined at this place means the name is not contained.
164
+ ASSERT_EQ(kSmiTagSize, 1);
165
+ Register tmp = properties;
166
+ __ add(tmp, properties, Operand(index, LSL, 1));
167
+ __ ldr(entity_name, FieldMemOperand(tmp, kElementsStartOffset));
168
+
169
+ ASSERT(!tmp.is(entity_name));
170
+ __ LoadRoot(tmp, Heap::kUndefinedValueRootIndex);
171
+ __ cmp(entity_name, tmp);
172
+ if (i != kProbes - 1) {
173
+ __ b(eq, &done);
174
+
175
+ // Stop if found the property.
176
+ __ cmp(entity_name, Operand(Handle<String>(name)));
177
+ __ b(eq, miss_label);
178
+
179
+ // Check if the entry name is not a symbol.
180
+ __ ldr(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset));
181
+ __ ldrb(entity_name,
182
+ FieldMemOperand(entity_name, Map::kInstanceTypeOffset));
183
+ __ tst(entity_name, Operand(kIsSymbolMask));
184
+ __ b(eq, miss_label);
185
+
186
+ // Restore the properties.
187
+ __ ldr(properties,
188
+ FieldMemOperand(receiver, JSObject::kPropertiesOffset));
189
+ } else {
190
+ // Give up probing if still not found the undefined value.
191
+ __ b(ne, miss_label);
192
+ }
193
+ }
194
+ __ bind(&done);
195
+ __ DecrementCounter(&Counters::negative_lookups_miss, 1, scratch0, scratch1);
196
+ }
197
+
198
+
84
199
  void StubCache::GenerateProbe(MacroAssembler* masm,
85
200
  Code::Flags flags,
86
201
  Register receiver,
@@ -150,6 +265,17 @@ void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
150
265
  }
151
266
 
152
267
 
268
+ void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype(
269
+ MacroAssembler* masm, int index, Register prototype) {
270
+ // Get the global function with the given index.
271
+ JSFunction* function = JSFunction::cast(Top::global_context()->get(index));
272
+ // Load its initial map. The global functions all have initial maps.
273
+ __ Move(prototype, Handle<Map>(function->initial_map()));
274
+ // Load the prototype from the initial map.
275
+ __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset));
276
+ }
277
+
278
+
153
279
  // Load a fast property out of a holder object (src). In-object properties
154
280
  // are loaded directly otherwise the property is loaded from the properties
155
281
  // fixed array.
@@ -323,9 +449,8 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
323
449
  __ b(eq, &exit);
324
450
 
325
451
  // Update the write barrier for the array address.
326
- // Pass the value being stored in the now unused name_reg.
327
- __ mov(name_reg, Operand(offset));
328
- __ RecordWrite(receiver_reg, name_reg, scratch);
452
+ // Pass the now unused name_reg as a scratch register.
453
+ __ RecordWrite(receiver_reg, Operand(offset), name_reg, scratch);
329
454
  } else {
330
455
  // Write to the properties array.
331
456
  int offset = index * kPointerSize + FixedArray::kHeaderSize;
@@ -339,8 +464,7 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
339
464
 
340
465
  // Update the write barrier for the array address.
341
466
  // Ok to clobber receiver_reg and name_reg, since we return.
342
- __ mov(name_reg, Operand(offset));
343
- __ RecordWrite(scratch, name_reg, receiver_reg);
467
+ __ RecordWrite(scratch, Operand(offset), name_reg, receiver_reg);
344
468
  }
345
469
 
346
470
  // Return the value (register r0).
@@ -424,177 +548,6 @@ static void CompileCallLoadPropertyWithInterceptor(MacroAssembler* masm,
424
548
  }
425
549
 
426
550
 
427
- class LoadInterceptorCompiler BASE_EMBEDDED {
428
- public:
429
- explicit LoadInterceptorCompiler(Register name) : name_(name) {}
430
-
431
- void CompileCacheable(MacroAssembler* masm,
432
- StubCompiler* stub_compiler,
433
- Register receiver,
434
- Register holder,
435
- Register scratch1,
436
- Register scratch2,
437
- JSObject* holder_obj,
438
- LookupResult* lookup,
439
- String* name,
440
- Label* miss_label) {
441
- AccessorInfo* callback = NULL;
442
- bool optimize = false;
443
- // So far the most popular follow ups for interceptor loads are FIELD
444
- // and CALLBACKS, so inline only them, other cases may be added
445
- // later.
446
- if (lookup->type() == FIELD) {
447
- optimize = true;
448
- } else if (lookup->type() == CALLBACKS) {
449
- Object* callback_object = lookup->GetCallbackObject();
450
- if (callback_object->IsAccessorInfo()) {
451
- callback = AccessorInfo::cast(callback_object);
452
- optimize = callback->getter() != NULL;
453
- }
454
- }
455
-
456
- if (!optimize) {
457
- CompileRegular(masm, receiver, holder, scratch2, holder_obj, miss_label);
458
- return;
459
- }
460
-
461
- // Note: starting a frame here makes GC aware of pointers pushed below.
462
- __ EnterInternalFrame();
463
-
464
- __ push(receiver);
465
- __ Push(holder, name_);
466
-
467
- CompileCallLoadPropertyWithInterceptor(masm,
468
- receiver,
469
- holder,
470
- name_,
471
- holder_obj);
472
-
473
- Label interceptor_failed;
474
- // Compare with no_interceptor_result_sentinel.
475
- __ LoadRoot(scratch1, Heap::kNoInterceptorResultSentinelRootIndex);
476
- __ cmp(r0, scratch1);
477
- __ b(eq, &interceptor_failed);
478
- __ LeaveInternalFrame();
479
- __ Ret();
480
-
481
- __ bind(&interceptor_failed);
482
- __ pop(name_);
483
- __ pop(holder);
484
- __ pop(receiver);
485
-
486
- __ LeaveInternalFrame();
487
-
488
- if (lookup->type() == FIELD) {
489
- holder = stub_compiler->CheckPrototypes(holder_obj,
490
- holder,
491
- lookup->holder(),
492
- scratch1,
493
- scratch2,
494
- name,
495
- miss_label);
496
- stub_compiler->GenerateFastPropertyLoad(masm,
497
- r0,
498
- holder,
499
- lookup->holder(),
500
- lookup->GetFieldIndex());
501
- __ Ret();
502
- } else {
503
- ASSERT(lookup->type() == CALLBACKS);
504
- ASSERT(lookup->GetCallbackObject()->IsAccessorInfo());
505
- ASSERT(callback != NULL);
506
- ASSERT(callback->getter() != NULL);
507
-
508
- Label cleanup;
509
- __ pop(scratch2);
510
- __ Push(receiver, scratch2);
511
-
512
- holder = stub_compiler->CheckPrototypes(holder_obj, holder,
513
- lookup->holder(), scratch1,
514
- scratch2,
515
- name,
516
- &cleanup);
517
-
518
- __ push(holder);
519
- __ Move(holder, Handle<AccessorInfo>(callback));
520
- __ push(holder);
521
- __ ldr(scratch1, FieldMemOperand(holder, AccessorInfo::kDataOffset));
522
- __ Push(scratch1, name_);
523
-
524
- ExternalReference ref =
525
- ExternalReference(IC_Utility(IC::kLoadCallbackProperty));
526
- __ TailCallExternalReference(ref, 5, 1);
527
-
528
- __ bind(&cleanup);
529
- __ pop(scratch1);
530
- __ pop(scratch2);
531
- __ push(scratch1);
532
- }
533
- }
534
-
535
-
536
- void CompileRegular(MacroAssembler* masm,
537
- Register receiver,
538
- Register holder,
539
- Register scratch,
540
- JSObject* holder_obj,
541
- Label* miss_label) {
542
- PushInterceptorArguments(masm, receiver, holder, name_, holder_obj);
543
-
544
- ExternalReference ref = ExternalReference(
545
- IC_Utility(IC::kLoadPropertyWithInterceptorForLoad));
546
- __ TailCallExternalReference(ref, 5, 1);
547
- }
548
-
549
- private:
550
- Register name_;
551
- };
552
-
553
-
554
- static void CompileLoadInterceptor(LoadInterceptorCompiler* compiler,
555
- StubCompiler* stub_compiler,
556
- MacroAssembler* masm,
557
- JSObject* object,
558
- JSObject* holder,
559
- String* name,
560
- LookupResult* lookup,
561
- Register receiver,
562
- Register scratch1,
563
- Register scratch2,
564
- Label* miss) {
565
- ASSERT(holder->HasNamedInterceptor());
566
- ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined());
567
-
568
- // Check that the receiver isn't a smi.
569
- __ BranchOnSmi(receiver, miss);
570
-
571
- // Check that the maps haven't changed.
572
- Register reg =
573
- stub_compiler->CheckPrototypes(object, receiver, holder,
574
- scratch1, scratch2, name, miss);
575
-
576
- if (lookup->IsProperty() && lookup->IsCacheable()) {
577
- compiler->CompileCacheable(masm,
578
- stub_compiler,
579
- receiver,
580
- reg,
581
- scratch1,
582
- scratch2,
583
- holder,
584
- lookup,
585
- name,
586
- miss);
587
- } else {
588
- compiler->CompileRegular(masm,
589
- receiver,
590
- reg,
591
- scratch2,
592
- holder,
593
- miss);
594
- }
595
- }
596
-
597
-
598
551
  // Reserves space for the extra arguments to FastHandleApiCall in the
599
552
  // caller's frame.
600
553
  //
@@ -677,6 +630,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
677
630
  Register receiver,
678
631
  Register scratch1,
679
632
  Register scratch2,
633
+ Register scratch3,
680
634
  Label* miss) {
681
635
  ASSERT(holder->HasNamedInterceptor());
682
636
  ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined());
@@ -692,6 +646,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
692
646
  receiver,
693
647
  scratch1,
694
648
  scratch2,
649
+ scratch3,
695
650
  holder,
696
651
  lookup,
697
652
  name,
@@ -703,6 +658,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
703
658
  receiver,
704
659
  scratch1,
705
660
  scratch2,
661
+ scratch3,
706
662
  name,
707
663
  holder,
708
664
  miss);
@@ -715,7 +671,8 @@ class CallInterceptorCompiler BASE_EMBEDDED {
715
671
  Register receiver,
716
672
  Register scratch1,
717
673
  Register scratch2,
718
- JSObject* holder_obj,
674
+ Register scratch3,
675
+ JSObject* interceptor_holder,
719
676
  LookupResult* lookup,
720
677
  String* name,
721
678
  const CallOptimization& optimization,
@@ -728,10 +685,13 @@ class CallInterceptorCompiler BASE_EMBEDDED {
728
685
  bool can_do_fast_api_call = false;
729
686
  if (optimization.is_simple_api_call() &&
730
687
  !lookup->holder()->IsGlobalObject()) {
731
- depth1 = optimization.GetPrototypeDepthOfExpectedType(object, holder_obj);
688
+ depth1 =
689
+ optimization.GetPrototypeDepthOfExpectedType(object,
690
+ interceptor_holder);
732
691
  if (depth1 == kInvalidProtoDepth) {
733
- depth2 = optimization.GetPrototypeDepthOfExpectedType(holder_obj,
734
- lookup->holder());
692
+ depth2 =
693
+ optimization.GetPrototypeDepthOfExpectedType(interceptor_holder,
694
+ lookup->holder());
735
695
  }
736
696
  can_do_fast_api_call = (depth1 != kInvalidProtoDepth) ||
737
697
  (depth2 != kInvalidProtoDepth);
@@ -746,23 +706,39 @@ class CallInterceptorCompiler BASE_EMBEDDED {
746
706
  ReserveSpaceForFastApiCall(masm, scratch1);
747
707
  }
748
708
 
709
+ // Check that the maps from receiver to interceptor's holder
710
+ // haven't changed and thus we can invoke interceptor.
749
711
  Label miss_cleanup;
750
712
  Label* miss = can_do_fast_api_call ? &miss_cleanup : miss_label;
751
713
  Register holder =
752
- stub_compiler_->CheckPrototypes(object, receiver, holder_obj, scratch1,
753
- scratch2, name, depth1, miss);
714
+ stub_compiler_->CheckPrototypes(object, receiver,
715
+ interceptor_holder, scratch1,
716
+ scratch2, scratch3, name, depth1, miss);
754
717
 
718
+ // Invoke an interceptor and if it provides a value,
719
+ // branch to |regular_invoke|.
755
720
  Label regular_invoke;
756
- LoadWithInterceptor(masm, receiver, holder, holder_obj, scratch2,
721
+ LoadWithInterceptor(masm, receiver, holder, interceptor_holder, scratch2,
757
722
  &regular_invoke);
758
723
 
759
- // Generate code for the failed interceptor case.
724
+ // Interceptor returned nothing for this property. Try to use cached
725
+ // constant function.
760
726
 
761
- // Check the lookup is still valid.
762
- stub_compiler_->CheckPrototypes(holder_obj, receiver,
763
- lookup->holder(), scratch1,
764
- scratch2, name, depth2, miss);
727
+ // Check that the maps from interceptor's holder to constant function's
728
+ // holder haven't changed and thus we can use cached constant function.
729
+ if (interceptor_holder != lookup->holder()) {
730
+ stub_compiler_->CheckPrototypes(interceptor_holder, receiver,
731
+ lookup->holder(), scratch1,
732
+ scratch2, scratch3, name, depth2, miss);
733
+ } else {
734
+ // CheckPrototypes has a side effect of fetching a 'holder'
735
+ // for API (object which is instanceof for the signature). It's
736
+ // safe to omit it here, as if present, it should be fetched
737
+ // by the previous CheckPrototypes.
738
+ ASSERT(depth2 == kInvalidProtoDepth);
739
+ }
765
740
 
741
+ // Invoke function.
766
742
  if (can_do_fast_api_call) {
767
743
  GenerateFastApiCall(masm, optimization, arguments_.immediate());
768
744
  } else {
@@ -770,12 +746,14 @@ class CallInterceptorCompiler BASE_EMBEDDED {
770
746
  JUMP_FUNCTION);
771
747
  }
772
748
 
749
+ // Deferred code for fast API call case---clean preallocated space.
773
750
  if (can_do_fast_api_call) {
774
751
  __ bind(&miss_cleanup);
775
752
  FreeSpaceForFastApiCall(masm);
776
753
  __ b(miss_label);
777
754
  }
778
755
 
756
+ // Invoke a regular function.
779
757
  __ bind(&regular_invoke);
780
758
  if (can_do_fast_api_call) {
781
759
  FreeSpaceForFastApiCall(masm);
@@ -787,12 +765,13 @@ class CallInterceptorCompiler BASE_EMBEDDED {
787
765
  Register receiver,
788
766
  Register scratch1,
789
767
  Register scratch2,
768
+ Register scratch3,
790
769
  String* name,
791
- JSObject* holder_obj,
770
+ JSObject* interceptor_holder,
792
771
  Label* miss_label) {
793
772
  Register holder =
794
- stub_compiler_->CheckPrototypes(object, receiver, holder_obj,
795
- scratch1, scratch2, name,
773
+ stub_compiler_->CheckPrototypes(object, receiver, interceptor_holder,
774
+ scratch1, scratch2, scratch3, name,
796
775
  miss_label);
797
776
 
798
777
  // Call a runtime function to load the interceptor property.
@@ -804,7 +783,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
804
783
  receiver,
805
784
  holder,
806
785
  name_,
807
- holder_obj);
786
+ interceptor_holder);
808
787
 
809
788
  __ CallExternalReference(
810
789
  ExternalReference(
@@ -877,35 +856,134 @@ Register StubCompiler::CheckPrototypes(JSObject* object,
877
856
  Register object_reg,
878
857
  JSObject* holder,
879
858
  Register holder_reg,
880
- Register scratch,
859
+ Register scratch1,
860
+ Register scratch2,
881
861
  String* name,
882
862
  int save_at_depth,
883
863
  Label* miss) {
884
- // Check that the maps haven't changed.
885
- Register result =
886
- masm()->CheckMaps(object, object_reg, holder, holder_reg, scratch,
887
- save_at_depth, miss);
864
+ // Make sure there's no overlap between holder and object registers.
865
+ ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg));
866
+ ASSERT(!scratch2.is(object_reg) && !scratch2.is(holder_reg)
867
+ && !scratch2.is(scratch1));
868
+
869
+ // Keep track of the current object in register reg.
870
+ Register reg = object_reg;
871
+ int depth = 0;
872
+
873
+ if (save_at_depth == depth) {
874
+ __ str(reg, MemOperand(sp));
875
+ }
876
+
877
+ // Check the maps in the prototype chain.
878
+ // Traverse the prototype chain from the object and do map checks.
879
+ JSObject* current = object;
880
+ while (current != holder) {
881
+ depth++;
882
+
883
+ // Only global objects and objects that do not require access
884
+ // checks are allowed in stubs.
885
+ ASSERT(current->IsJSGlobalProxy() || !current->IsAccessCheckNeeded());
886
+
887
+ JSObject* prototype = JSObject::cast(current->GetPrototype());
888
+ if (!current->HasFastProperties() &&
889
+ !current->IsJSGlobalObject() &&
890
+ !current->IsJSGlobalProxy()) {
891
+ if (!name->IsSymbol()) {
892
+ Object* lookup_result = Heap::LookupSymbol(name);
893
+ if (lookup_result->IsFailure()) {
894
+ set_failure(Failure::cast(lookup_result));
895
+ return reg;
896
+ } else {
897
+ name = String::cast(lookup_result);
898
+ }
899
+ }
900
+ ASSERT(current->property_dictionary()->FindEntry(name) ==
901
+ StringDictionary::kNotFound);
902
+
903
+ GenerateDictionaryNegativeLookup(masm(),
904
+ miss,
905
+ reg,
906
+ name,
907
+ scratch1,
908
+ scratch2);
909
+ __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
910
+ reg = holder_reg; // from now the object is in holder_reg
911
+ __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset));
912
+ } else {
913
+ // Get the map of the current object.
914
+ __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
915
+ __ cmp(scratch1, Operand(Handle<Map>(current->map())));
916
+
917
+ // Branch on the result of the map check.
918
+ __ b(ne, miss);
919
+
920
+ // Check access rights to the global object. This has to happen
921
+ // after the map check so that we know that the object is
922
+ // actually a global object.
923
+ if (current->IsJSGlobalProxy()) {
924
+ __ CheckAccessGlobalProxy(reg, scratch1, miss);
925
+ // Restore scratch register to be the map of the object. In the
926
+ // new space case below, we load the prototype from the map in
927
+ // the scratch register.
928
+ __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
929
+ }
930
+
931
+ reg = holder_reg; // from now the object is in holder_reg
932
+ if (Heap::InNewSpace(prototype)) {
933
+ // The prototype is in new space; we cannot store a reference
934
+ // to it in the code. Load it from the map.
935
+ __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset));
936
+ } else {
937
+ // The prototype is in old space; load it directly.
938
+ __ mov(reg, Operand(Handle<JSObject>(prototype)));
939
+ }
940
+ }
941
+
942
+ if (save_at_depth == depth) {
943
+ __ str(reg, MemOperand(sp));
944
+ }
945
+
946
+ // Go to the next object in the prototype chain.
947
+ current = prototype;
948
+ }
949
+
950
+ // Check the holder map.
951
+ __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
952
+ __ cmp(scratch1, Operand(Handle<Map>(current->map())));
953
+ __ b(ne, miss);
954
+
955
+ // Log the check depth.
956
+ LOG(IntEvent("check-maps-depth", depth + 1));
957
+
958
+ // Perform security check for access to the global object and return
959
+ // the holder register.
960
+ ASSERT(current == holder);
961
+ ASSERT(current->IsJSGlobalProxy() || !current->IsAccessCheckNeeded());
962
+ if (current->IsJSGlobalProxy()) {
963
+ __ CheckAccessGlobalProxy(reg, scratch1, miss);
964
+ }
888
965
 
889
966
  // If we've skipped any global objects, it's not enough to verify
890
967
  // that their maps haven't changed. We also need to check that the
891
968
  // property cell for the property is still empty.
892
- while (object != holder) {
893
- if (object->IsGlobalObject()) {
969
+ current = object;
970
+ while (current != holder) {
971
+ if (current->IsGlobalObject()) {
894
972
  Object* cell = GenerateCheckPropertyCell(masm(),
895
- GlobalObject::cast(object),
973
+ GlobalObject::cast(current),
896
974
  name,
897
- scratch,
975
+ scratch1,
898
976
  miss);
899
977
  if (cell->IsFailure()) {
900
978
  set_failure(Failure::cast(cell));
901
- return result;
979
+ return reg;
902
980
  }
903
981
  }
904
- object = JSObject::cast(object->GetPrototype());
982
+ current = JSObject::cast(current->GetPrototype());
905
983
  }
906
984
 
907
985
  // Return the register containing the holder.
908
- return result;
986
+ return reg;
909
987
  }
910
988
 
911
989
 
@@ -914,6 +992,7 @@ void StubCompiler::GenerateLoadField(JSObject* object,
914
992
  Register receiver,
915
993
  Register scratch1,
916
994
  Register scratch2,
995
+ Register scratch3,
917
996
  int index,
918
997
  String* name,
919
998
  Label* miss) {
@@ -923,7 +1002,8 @@ void StubCompiler::GenerateLoadField(JSObject* object,
923
1002
 
924
1003
  // Check that the maps haven't changed.
925
1004
  Register reg =
926
- CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss);
1005
+ CheckPrototypes(object, receiver, holder, scratch1, scratch2, scratch3,
1006
+ name, miss);
927
1007
  GenerateFastPropertyLoad(masm(), r0, reg, holder, index);
928
1008
  __ Ret();
929
1009
  }
@@ -934,6 +1014,7 @@ void StubCompiler::GenerateLoadConstant(JSObject* object,
934
1014
  Register receiver,
935
1015
  Register scratch1,
936
1016
  Register scratch2,
1017
+ Register scratch3,
937
1018
  Object* value,
938
1019
  String* name,
939
1020
  Label* miss) {
@@ -943,7 +1024,8 @@ void StubCompiler::GenerateLoadConstant(JSObject* object,
943
1024
 
944
1025
  // Check that the maps haven't changed.
945
1026
  Register reg =
946
- CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss);
1027
+ CheckPrototypes(object, receiver, holder,
1028
+ scratch1, scratch2, scratch3, name, miss);
947
1029
 
948
1030
  // Return the constant value.
949
1031
  __ mov(r0, Operand(Handle<Object>(value)));
@@ -957,6 +1039,7 @@ bool StubCompiler::GenerateLoadCallback(JSObject* object,
957
1039
  Register name_reg,
958
1040
  Register scratch1,
959
1041
  Register scratch2,
1042
+ Register scratch3,
960
1043
  AccessorInfo* callback,
961
1044
  String* name,
962
1045
  Label* miss,
@@ -967,7 +1050,8 @@ bool StubCompiler::GenerateLoadCallback(JSObject* object,
967
1050
 
968
1051
  // Check that the maps haven't changed.
969
1052
  Register reg =
970
- CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss);
1053
+ CheckPrototypes(object, receiver, holder, scratch1, scratch2, scratch3,
1054
+ name, miss);
971
1055
 
972
1056
  // Push the arguments on the JS stack of the caller.
973
1057
  __ push(receiver); // Receiver.
@@ -986,26 +1070,145 @@ bool StubCompiler::GenerateLoadCallback(JSObject* object,
986
1070
 
987
1071
 
988
1072
  void StubCompiler::GenerateLoadInterceptor(JSObject* object,
989
- JSObject* holder,
1073
+ JSObject* interceptor_holder,
990
1074
  LookupResult* lookup,
991
1075
  Register receiver,
992
1076
  Register name_reg,
993
1077
  Register scratch1,
994
1078
  Register scratch2,
1079
+ Register scratch3,
995
1080
  String* name,
996
1081
  Label* miss) {
997
- LoadInterceptorCompiler compiler(name_reg);
998
- CompileLoadInterceptor(&compiler,
999
- this,
1000
- masm(),
1001
- object,
1002
- holder,
1003
- name,
1004
- lookup,
1005
- receiver,
1006
- scratch1,
1007
- scratch2,
1008
- miss);
1082
+ ASSERT(interceptor_holder->HasNamedInterceptor());
1083
+ ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined());
1084
+
1085
+ // Check that the receiver isn't a smi.
1086
+ __ BranchOnSmi(receiver, miss);
1087
+
1088
+ // So far the most popular follow ups for interceptor loads are FIELD
1089
+ // and CALLBACKS, so inline only them, other cases may be added
1090
+ // later.
1091
+ bool compile_followup_inline = false;
1092
+ if (lookup->IsProperty() && lookup->IsCacheable()) {
1093
+ if (lookup->type() == FIELD) {
1094
+ compile_followup_inline = true;
1095
+ } else if (lookup->type() == CALLBACKS &&
1096
+ lookup->GetCallbackObject()->IsAccessorInfo() &&
1097
+ AccessorInfo::cast(lookup->GetCallbackObject())->getter() != NULL) {
1098
+ compile_followup_inline = true;
1099
+ }
1100
+ }
1101
+
1102
+ if (compile_followup_inline) {
1103
+ // Compile the interceptor call, followed by inline code to load the
1104
+ // property from further up the prototype chain if the call fails.
1105
+ // Check that the maps haven't changed.
1106
+ Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder,
1107
+ scratch1, scratch2, scratch3,
1108
+ name, miss);
1109
+ ASSERT(holder_reg.is(receiver) || holder_reg.is(scratch1));
1110
+
1111
+ // Save necessary data before invoking an interceptor.
1112
+ // Requires a frame to make GC aware of pushed pointers.
1113
+ __ EnterInternalFrame();
1114
+
1115
+ if (lookup->type() == CALLBACKS && !receiver.is(holder_reg)) {
1116
+ // CALLBACKS case needs a receiver to be passed into C++ callback.
1117
+ __ Push(receiver, holder_reg, name_reg);
1118
+ } else {
1119
+ __ Push(holder_reg, name_reg);
1120
+ }
1121
+
1122
+ // Invoke an interceptor. Note: map checks from receiver to
1123
+ // interceptor's holder has been compiled before (see a caller
1124
+ // of this method.)
1125
+ CompileCallLoadPropertyWithInterceptor(masm(),
1126
+ receiver,
1127
+ holder_reg,
1128
+ name_reg,
1129
+ interceptor_holder);
1130
+
1131
+ // Check if interceptor provided a value for property. If it's
1132
+ // the case, return immediately.
1133
+ Label interceptor_failed;
1134
+ __ LoadRoot(scratch1, Heap::kNoInterceptorResultSentinelRootIndex);
1135
+ __ cmp(r0, scratch1);
1136
+ __ b(eq, &interceptor_failed);
1137
+ __ LeaveInternalFrame();
1138
+ __ Ret();
1139
+
1140
+ __ bind(&interceptor_failed);
1141
+ __ pop(name_reg);
1142
+ __ pop(holder_reg);
1143
+ if (lookup->type() == CALLBACKS && !receiver.is(holder_reg)) {
1144
+ __ pop(receiver);
1145
+ }
1146
+
1147
+ __ LeaveInternalFrame();
1148
+
1149
+ // Check that the maps from interceptor's holder to lookup's holder
1150
+ // haven't changed. And load lookup's holder into |holder| register.
1151
+ if (interceptor_holder != lookup->holder()) {
1152
+ holder_reg = CheckPrototypes(interceptor_holder,
1153
+ holder_reg,
1154
+ lookup->holder(),
1155
+ scratch1,
1156
+ scratch2,
1157
+ scratch3,
1158
+ name,
1159
+ miss);
1160
+ }
1161
+
1162
+ if (lookup->type() == FIELD) {
1163
+ // We found FIELD property in prototype chain of interceptor's holder.
1164
+ // Retrieve a field from field's holder.
1165
+ GenerateFastPropertyLoad(masm(), r0, holder_reg,
1166
+ lookup->holder(), lookup->GetFieldIndex());
1167
+ __ Ret();
1168
+ } else {
1169
+ // We found CALLBACKS property in prototype chain of interceptor's
1170
+ // holder.
1171
+ ASSERT(lookup->type() == CALLBACKS);
1172
+ ASSERT(lookup->GetCallbackObject()->IsAccessorInfo());
1173
+ AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject());
1174
+ ASSERT(callback != NULL);
1175
+ ASSERT(callback->getter() != NULL);
1176
+
1177
+ // Tail call to runtime.
1178
+ // Important invariant in CALLBACKS case: the code above must be
1179
+ // structured to never clobber |receiver| register.
1180
+ __ Move(scratch2, Handle<AccessorInfo>(callback));
1181
+ // holder_reg is either receiver or scratch1.
1182
+ if (!receiver.is(holder_reg)) {
1183
+ ASSERT(scratch1.is(holder_reg));
1184
+ __ Push(receiver, holder_reg, scratch2);
1185
+ __ ldr(scratch1,
1186
+ FieldMemOperand(holder_reg, AccessorInfo::kDataOffset));
1187
+ __ Push(scratch1, name_reg);
1188
+ } else {
1189
+ __ push(receiver);
1190
+ __ ldr(scratch1,
1191
+ FieldMemOperand(holder_reg, AccessorInfo::kDataOffset));
1192
+ __ Push(holder_reg, scratch2, scratch1, name_reg);
1193
+ }
1194
+
1195
+ ExternalReference ref =
1196
+ ExternalReference(IC_Utility(IC::kLoadCallbackProperty));
1197
+ __ TailCallExternalReference(ref, 5, 1);
1198
+ }
1199
+ } else { // !compile_followup_inline
1200
+ // Call the runtime system to load the interceptor.
1201
+ // Check that the maps haven't changed.
1202
+ Register holder_reg = CheckPrototypes(object, receiver, interceptor_holder,
1203
+ scratch1, scratch2, scratch3,
1204
+ name, miss);
1205
+ PushInterceptorArguments(masm(), receiver, holder_reg,
1206
+ name_reg, interceptor_holder);
1207
+
1208
+ ExternalReference ref = ExternalReference(
1209
+ IC_Utility(IC::kLoadPropertyWithInterceptorForLoad));
1210
+ __ TailCallExternalReference(ref, 5, 1);
1211
+ }
1009
1212
  }
1010
1213
 
1011
1214
 
@@ -1041,6 +1244,20 @@ Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
1041
1244
  }
1042
1245
 
1043
1246
 
1247
+ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
1248
+ if (kind_ == Code::KEYED_CALL_IC) {
1249
+ __ cmp(r2, Operand(Handle<String>(name)));
1250
+ __ b(ne, miss);
1251
+ }
1252
+ }
1253
+
1254
+
1255
+ void CallStubCompiler::GenerateMissBranch() {
1256
+ Handle<Code> ic = ComputeCallMiss(arguments().immediate(), kind_);
1257
+ __ Jump(ic, RelocInfo::CODE_TARGET);
1258
+ }
1259
+
1260
+
1044
1261
  Object* CallStubCompiler::CompileCallField(JSObject* object,
1045
1262
  JSObject* holder,
1046
1263
  int index,
@@ -1051,6 +1268,8 @@ Object* CallStubCompiler::CompileCallField(JSObject* object,
1051
1268
  // -----------------------------------
1052
1269
  Label miss;
1053
1270
 
1271
+ GenerateNameCheck(name, &miss);
1272
+
1054
1273
  const int argc = arguments().immediate();
1055
1274
 
1056
1275
  // Get the receiver of the function from the stack into r0.
@@ -1060,15 +1279,14 @@ Object* CallStubCompiler::CompileCallField(JSObject* object,
1060
1279
  __ b(eq, &miss);
1061
1280
 
1062
1281
  // Do the right check and compute the holder register.
1063
- Register reg = CheckPrototypes(object, r0, holder, r1, r3, name, &miss);
1282
+ Register reg = CheckPrototypes(object, r0, holder, r1, r3, r4, name, &miss);
1064
1283
  GenerateFastPropertyLoad(masm(), r1, reg, holder, index);
1065
1284
 
1066
1285
  GenerateCallFunction(masm(), object, arguments(), &miss);
1067
1286
 
1068
1287
  // Handle call cache miss.
1069
1288
  __ bind(&miss);
1070
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
1071
- __ Jump(ic, RelocInfo::CODE_TARGET);
1289
+ GenerateMissBranch();
1072
1290
 
1073
1291
  // Return the generated code.
1074
1292
  return GetCode(FIELD, name);
@@ -1095,6 +1313,8 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
1095
1313
 
1096
1314
  Label miss;
1097
1315
 
1316
+ GenerateNameCheck(name, &miss);
1317
+
1098
1318
  // Get the receiver from the stack
1099
1319
  const int argc = arguments().immediate();
1100
1320
  __ ldr(r1, MemOperand(sp, argc * kPointerSize));
@@ -1104,7 +1324,7 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
1104
1324
  __ b(eq, &miss);
1105
1325
 
1106
1326
  // Check that the maps haven't changed.
1107
- CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, name, &miss);
1327
+ CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, r4, name, &miss);
1108
1328
 
1109
1329
  if (object->IsGlobalObject()) {
1110
1330
  __ ldr(r3, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset));
@@ -1117,15 +1337,10 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
1117
1337
 
1118
1338
  // Handle call cache miss.
1119
1339
  __ bind(&miss);
1120
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
1121
- __ Jump(ic, RelocInfo::CODE_TARGET);
1340
+ GenerateMissBranch();
1122
1341
 
1123
1342
  // Return the generated code.
1124
- String* function_name = NULL;
1125
- if (function->shared()->name()->IsString()) {
1126
- function_name = String::cast(function->shared()->name());
1127
- }
1128
- return GetCode(CONSTANT_FUNCTION, function_name);
1343
+ return GetCode(function);
1129
1344
  }
1130
1345
 
1131
1346
 
@@ -1149,6 +1364,8 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
1149
1364
 
1150
1365
  Label miss;
1151
1366
 
1367
+ GenerateNameCheck(name, &miss);
1368
+
1152
1369
  // Get the receiver from the stack
1153
1370
  const int argc = arguments().immediate();
1154
1371
  __ ldr(r1, MemOperand(sp, argc * kPointerSize));
@@ -1158,7 +1375,7 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
1158
1375
  __ b(eq, &miss);
1159
1376
 
1160
1377
  // Check that the maps haven't changed.
1161
- CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, name, &miss);
1378
+ CheckPrototypes(JSObject::cast(object), r1, holder, r3, r0, r4, name, &miss);
1162
1379
 
1163
1380
  if (object->IsGlobalObject()) {
1164
1381
  __ ldr(r3, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset));
@@ -1171,15 +1388,30 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
1171
1388
 
1172
1389
  // Handle call cache miss.
1173
1390
  __ bind(&miss);
1174
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
1175
- __ Jump(ic, RelocInfo::CODE_TARGET);
1391
+ GenerateMissBranch();
1176
1392
 
1177
1393
  // Return the generated code.
1178
- String* function_name = NULL;
1179
- if (function->shared()->name()->IsString()) {
1180
- function_name = String::cast(function->shared()->name());
1181
- }
1182
- return GetCode(CONSTANT_FUNCTION, function_name);
1394
+ return GetCode(function);
1395
+ }
1396
+
1397
+
1398
+ Object* CallStubCompiler::CompileStringCharCodeAtCall(Object* object,
1399
+ JSObject* holder,
1400
+ JSFunction* function,
1401
+ String* name,
1402
+ CheckType check) {
1403
+ // TODO(722): implement this.
1404
+ return Heap::undefined_value();
1405
+ }
1406
+
1407
+
1408
+ Object* CallStubCompiler::CompileStringCharAtCall(Object* object,
1409
+ JSObject* holder,
1410
+ JSFunction* function,
1411
+ String* name,
1412
+ CheckType check) {
1413
+ // TODO(722): implement this.
1414
+ return Heap::undefined_value();
1183
1415
  }
1184
1416
 
1185
1417
 
@@ -1194,9 +1426,9 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1194
1426
  // -----------------------------------
1195
1427
  SharedFunctionInfo* function_info = function->shared();
1196
1428
  if (function_info->HasCustomCallGenerator()) {
1197
- CustomCallGenerator generator =
1198
- ToCData<CustomCallGenerator>(function_info->function_data());
1199
- Object* result = generator(this, object, holder, function, name, check);
1429
+ const int id = function_info->custom_call_generator_id();
1430
+ Object* result =
1431
+ CompileCustomCall(id, object, holder, function, name, check);
1200
1432
  // undefined means bail out to regular compiler.
1201
1433
  if (!result->IsUndefined()) {
1202
1434
  return result;
@@ -1205,6 +1437,8 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1205
1437
 
1206
1438
  Label miss_in_smi_check;
1207
1439
 
1440
+ GenerateNameCheck(name, &miss_in_smi_check);
1441
+
1208
1442
  // Get the receiver from the stack
1209
1443
  const int argc = arguments().immediate();
1210
1444
  __ ldr(r1, MemOperand(sp, argc * kPointerSize));
@@ -1238,7 +1472,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1238
1472
  }
1239
1473
 
1240
1474
  // Check that the maps haven't changed.
1241
- CheckPrototypes(JSObject::cast(object), r1, holder, r0, r3, name,
1475
+ CheckPrototypes(JSObject::cast(object), r1, holder, r0, r3, r4, name,
1242
1476
  depth, &miss);
1243
1477
 
1244
1478
  // Patch the receiver on the stack with the global proxy if
@@ -1259,11 +1493,10 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1259
1493
  __ CompareObjectType(r1, r3, r3, FIRST_NONSTRING_TYPE);
1260
1494
  __ b(hs, &miss);
1261
1495
  // Check that the maps starting from the prototype haven't changed.
1262
- GenerateLoadGlobalFunctionPrototype(masm(),
1263
- Context::STRING_FUNCTION_INDEX,
1264
- r0);
1496
+ GenerateDirectLoadGlobalFunctionPrototype(
1497
+ masm(), Context::STRING_FUNCTION_INDEX, r0);
1265
1498
  CheckPrototypes(JSObject::cast(object->GetPrototype()), r0, holder, r3,
1266
- r1, name, &miss);
1499
+ r1, r4, name, &miss);
1267
1500
  }
1268
1501
  break;
1269
1502
 
@@ -1280,11 +1513,10 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1280
1513
  __ b(ne, &miss);
1281
1514
  __ bind(&fast);
1282
1515
  // Check that the maps starting from the prototype haven't changed.
1283
- GenerateLoadGlobalFunctionPrototype(masm(),
1284
- Context::NUMBER_FUNCTION_INDEX,
1285
- r0);
1516
+ GenerateDirectLoadGlobalFunctionPrototype(
1517
+ masm(), Context::NUMBER_FUNCTION_INDEX, r0);
1286
1518
  CheckPrototypes(JSObject::cast(object->GetPrototype()), r0, holder, r3,
1287
- r1, name, &miss);
1519
+ r1, r4, name, &miss);
1288
1520
  }
1289
1521
  break;
1290
1522
  }
@@ -1304,11 +1536,10 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1304
1536
  __ b(ne, &miss);
1305
1537
  __ bind(&fast);
1306
1538
  // Check that the maps starting from the prototype haven't changed.
1307
- GenerateLoadGlobalFunctionPrototype(masm(),
1308
- Context::BOOLEAN_FUNCTION_INDEX,
1309
- r0);
1539
+ GenerateDirectLoadGlobalFunctionPrototype(
1540
+ masm(), Context::BOOLEAN_FUNCTION_INDEX, r0);
1310
1541
  CheckPrototypes(JSObject::cast(object->GetPrototype()), r0, holder, r3,
1311
- r1, name, &miss);
1542
+ r1, r4, name, &miss);
1312
1543
  }
1313
1544
  break;
1314
1545
  }
@@ -1330,15 +1561,10 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
1330
1561
  }
1331
1562
 
1332
1563
  __ bind(&miss_in_smi_check);
1333
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
1334
- __ Jump(ic, RelocInfo::CODE_TARGET);
1564
+ GenerateMissBranch();
1335
1565
 
1336
1566
  // Return the generated code.
1337
- String* function_name = NULL;
1338
- if (function->shared()->name()->IsString()) {
1339
- function_name = String::cast(function->shared()->name());
1340
- }
1341
- return GetCode(CONSTANT_FUNCTION, function_name);
1567
+ return GetCode(function);
1342
1568
  }
1343
1569
 
1344
1570
 
@@ -1352,6 +1578,8 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
1352
1578
 
1353
1579
  Label miss;
1354
1580
 
1581
+ GenerateNameCheck(name, &miss);
1582
+
1355
1583
  // Get the number of arguments.
1356
1584
  const int argc = arguments().immediate();
1357
1585
 
@@ -1370,6 +1598,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
1370
1598
  r1,
1371
1599
  r3,
1372
1600
  r4,
1601
+ r0,
1373
1602
  &miss);
1374
1603
 
1375
1604
  // Move returned value, the function to call, to r1.
@@ -1381,8 +1610,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
1381
1610
 
1382
1611
  // Handle call cache miss.
1383
1612
  __ bind(&miss);
1384
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
1385
- __ Jump(ic, RelocInfo::CODE_TARGET);
1613
+ GenerateMissBranch();
1386
1614
 
1387
1615
  // Return the generated code.
1388
1616
  return GetCode(INTERCEPTOR, name);
@@ -1400,6 +1628,8 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
1400
1628
  // -----------------------------------
1401
1629
  Label miss;
1402
1630
 
1631
+ GenerateNameCheck(name, &miss);
1632
+
1403
1633
  // Get the number of arguments.
1404
1634
  const int argc = arguments().immediate();
1405
1635
 
@@ -1415,7 +1645,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
1415
1645
  }
1416
1646
 
1417
1647
  // Check that the maps haven't changed.
1418
- CheckPrototypes(object, r0, holder, r3, r1, name, &miss);
1648
+ CheckPrototypes(object, r0, holder, r3, r1, r4, name, &miss);
1419
1649
 
1420
1650
  // Get the value from the cell.
1421
1651
  __ mov(r3, Operand(Handle<JSGlobalPropertyCell>(cell)));
@@ -1464,8 +1694,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
1464
1694
  // Handle call cache miss.
1465
1695
  __ bind(&miss);
1466
1696
  __ IncrementCounter(&Counters::call_global_inline_miss, 1, r1, r3);
1467
- Handle<Code> ic = ComputeCallMiss(arguments().immediate());
1468
- __ Jump(ic, RelocInfo::CODE_TARGET);
1697
+ GenerateMissBranch();
1469
1698
 
1470
1699
  // Return the generated code.
1471
1700
  return GetCode(NORMAL, name);
@@ -1630,21 +1859,17 @@ Object* LoadStubCompiler::CompileLoadNonexistent(String* name,
1630
1859
  JSObject* object,
1631
1860
  JSObject* last) {
1632
1861
  // ----------- S t a t e -------------
1633
- // -- r2 : name
1862
+ // -- r0 : receiver
1634
1863
  // -- lr : return address
1635
- // -- [sp] : receiver
1636
1864
  // -----------------------------------
1637
1865
  Label miss;
1638
1866
 
1639
- // Load receiver.
1640
- __ ldr(r0, MemOperand(sp, 0));
1641
-
1642
1867
  // Check that receiver is not a smi.
1643
1868
  __ tst(r0, Operand(kSmiTagMask));
1644
1869
  __ b(eq, &miss);
1645
1870
 
1646
1871
  // Check the maps of the full prototype chain.
1647
- CheckPrototypes(object, r0, last, r3, r1, name, &miss);
1872
+ CheckPrototypes(object, r0, last, r3, r1, r4, name, &miss);
1648
1873
 
1649
1874
  // If the last object in the prototype chain is a global object,
1650
1875
  // check that the global property cell is empty.
@@ -1675,15 +1900,13 @@ Object* LoadStubCompiler::CompileLoadField(JSObject* object,
1675
1900
  int index,
1676
1901
  String* name) {
1677
1902
  // ----------- S t a t e -------------
1903
+ // -- r0 : receiver
1678
1904
  // -- r2 : name
1679
1905
  // -- lr : return address
1680
- // -- [sp] : receiver
1681
1906
  // -----------------------------------
1682
1907
  Label miss;
1683
1908
 
1684
- __ ldr(r0, MemOperand(sp, 0));
1685
-
1686
- GenerateLoadField(object, holder, r0, r3, r1, index, name, &miss);
1909
+ GenerateLoadField(object, holder, r0, r3, r1, r4, index, name, &miss);
1687
1910
  __ bind(&miss);
1688
1911
  GenerateLoadMiss(masm(), Code::LOAD_IC);
1689
1912
 
@@ -1697,15 +1920,14 @@ Object* LoadStubCompiler::CompileLoadCallback(String* name,
1697
1920
  JSObject* holder,
1698
1921
  AccessorInfo* callback) {
1699
1922
  // ----------- S t a t e -------------
1923
+ // -- r0 : receiver
1700
1924
  // -- r2 : name
1701
1925
  // -- lr : return address
1702
- // -- [sp] : receiver
1703
1926
  // -----------------------------------
1704
1927
  Label miss;
1705
1928
 
1706
- __ ldr(r0, MemOperand(sp, 0));
1707
1929
  Failure* failure = Failure::InternalError();
1708
- bool success = GenerateLoadCallback(object, holder, r0, r2, r3, r1,
1930
+ bool success = GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4,
1709
1931
  callback, name, &miss, &failure);
1710
1932
  if (!success) return failure;
1711
1933
 
@@ -1722,15 +1944,13 @@ Object* LoadStubCompiler::CompileLoadConstant(JSObject* object,
1722
1944
  Object* value,
1723
1945
  String* name) {
1724
1946
  // ----------- S t a t e -------------
1947
+ // -- r0 : receiver
1725
1948
  // -- r2 : name
1726
1949
  // -- lr : return address
1727
- // -- [sp] : receiver
1728
1950
  // -----------------------------------
1729
1951
  Label miss;
1730
1952
 
1731
- __ ldr(r0, MemOperand(sp, 0));
1732
-
1733
- GenerateLoadConstant(object, holder, r0, r3, r1, value, name, &miss);
1953
+ GenerateLoadConstant(object, holder, r0, r3, r1, r4, value, name, &miss);
1734
1954
  __ bind(&miss);
1735
1955
  GenerateLoadMiss(masm(), Code::LOAD_IC);
1736
1956
 
@@ -1743,14 +1963,12 @@ Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* object,
1743
1963
  JSObject* holder,
1744
1964
  String* name) {
1745
1965
  // ----------- S t a t e -------------
1966
+ // -- r0 : receiver
1746
1967
  // -- r2 : name
1747
1968
  // -- lr : return address
1748
- // -- [sp] : receiver
1749
1969
  // -----------------------------------
1750
1970
  Label miss;
1751
1971
 
1752
- __ ldr(r0, MemOperand(sp, 0));
1753
-
1754
1972
  LookupResult lookup;
1755
1973
  LookupPostInterceptor(holder, name, &lookup);
1756
1974
  GenerateLoadInterceptor(object,
@@ -1760,6 +1978,7 @@ Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* object,
1760
1978
  r2,
1761
1979
  r3,
1762
1980
  r1,
1981
+ r4,
1763
1982
  name,
1764
1983
  &miss);
1765
1984
  __ bind(&miss);
@@ -1776,10 +1995,9 @@ Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
1776
1995
  String* name,
1777
1996
  bool is_dont_delete) {
1778
1997
  // ----------- S t a t e -------------
1998
+ // -- r0 : receiver
1779
1999
  // -- r2 : name
1780
2000
  // -- lr : return address
1781
- // -- r0 : receiver
1782
- // -- sp[0] : receiver
1783
2001
  // -----------------------------------
1784
2002
  Label miss;
1785
2003
 
@@ -1792,7 +2010,7 @@ Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
1792
2010
  }
1793
2011
 
1794
2012
  // Check that the map of the global has not changed.
1795
- CheckPrototypes(object, r0, holder, r3, r4, name, &miss);
2013
+ CheckPrototypes(object, r0, holder, r3, r4, r1, name, &miss);
1796
2014
 
1797
2015
  // Get the value from the cell.
1798
2016
  __ mov(r3, Operand(Handle<JSGlobalPropertyCell>(cell)));
@@ -1825,8 +2043,7 @@ Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
1825
2043
  // ----------- S t a t e -------------
1826
2044
  // -- lr : return address
1827
2045
  // -- r0 : key
1828
- // -- sp[0] : key
1829
- // -- sp[4] : receiver
2046
+ // -- r1 : receiver
1830
2047
  // -----------------------------------
1831
2048
  Label miss;
1832
2049
 
@@ -1834,8 +2051,7 @@ Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
1834
2051
  __ cmp(r0, Operand(Handle<String>(name)));
1835
2052
  __ b(ne, &miss);
1836
2053
 
1837
- __ ldr(r1, MemOperand(sp, kPointerSize)); // Receiver.
1838
- GenerateLoadField(receiver, holder, r1, r2, r3, index, name, &miss);
2054
+ GenerateLoadField(receiver, holder, r1, r2, r3, r4, index, name, &miss);
1839
2055
  __ bind(&miss);
1840
2056
  GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1841
2057
 
@@ -1850,8 +2066,7 @@ Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
1850
2066
  // ----------- S t a t e -------------
1851
2067
  // -- lr : return address
1852
2068
  // -- r0 : key
1853
- // -- sp[0] : key
1854
- // -- sp[4] : receiver
2069
+ // -- r1 : receiver
1855
2070
  // -----------------------------------
1856
2071
  Label miss;
1857
2072
 
@@ -1860,8 +2075,7 @@ Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
1860
2075
  __ b(ne, &miss);
1861
2076
 
1862
2077
  Failure* failure = Failure::InternalError();
1863
- __ ldr(r1, MemOperand(sp, kPointerSize)); // Receiver.
1864
- bool success = GenerateLoadCallback(receiver, holder, r1, r0, r2, r3,
2078
+ bool success = GenerateLoadCallback(receiver, holder, r1, r0, r2, r3, r4,
1865
2079
  callback, name, &miss, &failure);
1866
2080
  if (!success) return failure;
1867
2081
 
@@ -1879,8 +2093,7 @@ Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
1879
2093
  // ----------- S t a t e -------------
1880
2094
  // -- lr : return address
1881
2095
  // -- r0 : key
1882
- // -- sp[0] : key
1883
- // -- sp[4] : receiver
2096
+ // -- r1 : receiver
1884
2097
  // -----------------------------------
1885
2098
  Label miss;
1886
2099
 
@@ -1888,8 +2101,7 @@ Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
1888
2101
  __ cmp(r0, Operand(Handle<String>(name)));
1889
2102
  __ b(ne, &miss);
1890
2103
 
1891
- __ ldr(r1, MemOperand(sp, kPointerSize)); // Receiver.
1892
- GenerateLoadConstant(receiver, holder, r1, r2, r3, value, name, &miss);
2104
+ GenerateLoadConstant(receiver, holder, r1, r2, r3, r4, value, name, &miss);
1893
2105
  __ bind(&miss);
1894
2106
  GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1895
2107
 
@@ -1904,8 +2116,7 @@ Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
1904
2116
  // ----------- S t a t e -------------
1905
2117
  // -- lr : return address
1906
2118
  // -- r0 : key
1907
- // -- sp[0] : key
1908
- // -- sp[4] : receiver
2119
+ // -- r1 : receiver
1909
2120
  // -----------------------------------
1910
2121
  Label miss;
1911
2122
 
@@ -1915,7 +2126,6 @@ Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
1915
2126
 
1916
2127
  LookupResult lookup;
1917
2128
  LookupPostInterceptor(holder, name, &lookup);
1918
- __ ldr(r1, MemOperand(sp, kPointerSize)); // Receiver.
1919
2129
  GenerateLoadInterceptor(receiver,
1920
2130
  holder,
1921
2131
  &lookup,
@@ -1923,6 +2133,7 @@ Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
1923
2133
  r0,
1924
2134
  r2,
1925
2135
  r3,
2136
+ r4,
1926
2137
  name,
1927
2138
  &miss);
1928
2139
  __ bind(&miss);
@@ -1936,8 +2147,7 @@ Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
1936
2147
  // ----------- S t a t e -------------
1937
2148
  // -- lr : return address
1938
2149
  // -- r0 : key
1939
- // -- sp[0] : key
1940
- // -- sp[4] : receiver
2150
+ // -- r1 : receiver
1941
2151
  // -----------------------------------
1942
2152
  Label miss;
1943
2153
 
@@ -1945,7 +2155,6 @@ Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
1945
2155
  __ cmp(r0, Operand(Handle<String>(name)));
1946
2156
  __ b(ne, &miss);
1947
2157
 
1948
- __ ldr(r1, MemOperand(sp, kPointerSize)); // Receiver.
1949
2158
  GenerateLoadArrayLength(masm(), r1, r2, &miss);
1950
2159
  __ bind(&miss);
1951
2160
  GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
@@ -1958,8 +2167,7 @@ Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
1958
2167
  // ----------- S t a t e -------------
1959
2168
  // -- lr : return address
1960
2169
  // -- r0 : key
1961
- // -- sp[0] : key
1962
- // -- sp[4] : receiver
2170
+ // -- r1 : receiver
1963
2171
  // -----------------------------------
1964
2172
  Label miss;
1965
2173
  __ IncrementCounter(&Counters::keyed_load_string_length, 1, r1, r3);
@@ -1968,7 +2176,6 @@ Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
1968
2176
  __ cmp(r0, Operand(Handle<String>(name)));
1969
2177
  __ b(ne, &miss);
1970
2178
 
1971
- __ ldr(r1, MemOperand(sp, kPointerSize)); // Receiver.
1972
2179
  GenerateLoadStringLength(masm(), r1, r2, r3, &miss);
1973
2180
  __ bind(&miss);
1974
2181
  __ DecrementCounter(&Counters::keyed_load_string_length, 1, r1, r3);
@@ -1984,8 +2191,7 @@ Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
1984
2191
  // ----------- S t a t e -------------
1985
2192
  // -- lr : return address
1986
2193
  // -- r0 : key
1987
- // -- sp[0] : key
1988
- // -- sp[4] : receiver
2194
+ // -- r1 : receiver
1989
2195
  // -----------------------------------
1990
2196
  GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1991
2197
 
@@ -1999,32 +2205,31 @@ Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
1999
2205
  String* name) {
2000
2206
  // ----------- S t a t e -------------
2001
2207
  // -- r0 : value
2002
- // -- r2 : name
2208
+ // -- r1 : key
2209
+ // -- r2 : receiver
2003
2210
  // -- lr : return address
2004
- // -- [sp] : receiver
2005
2211
  // -----------------------------------
2006
2212
  Label miss;
2007
2213
 
2008
- __ IncrementCounter(&Counters::keyed_store_field, 1, r1, r3);
2214
+ __ IncrementCounter(&Counters::keyed_store_field, 1, r3, r4);
2009
2215
 
2010
2216
  // Check that the name has not changed.
2011
- __ cmp(r2, Operand(Handle<String>(name)));
2217
+ __ cmp(r1, Operand(Handle<String>(name)));
2012
2218
  __ b(ne, &miss);
2013
2219
 
2014
- // Load receiver from the stack.
2015
- __ ldr(r3, MemOperand(sp));
2016
- // r1 is used as scratch register, r3 and r2 might be clobbered.
2220
+ // r3 is used as scratch register. r1 and r2 keep their values if a jump to
2221
+ // the miss label is generated.
2017
2222
  GenerateStoreField(masm(),
2018
2223
  object,
2019
2224
  index,
2020
2225
  transition,
2021
- r3, r2, r1,
2226
+ r2, r1, r3,
2022
2227
  &miss);
2023
2228
  __ bind(&miss);
2024
2229
 
2025
- __ DecrementCounter(&Counters::keyed_store_field, 1, r1, r3);
2026
- __ mov(r2, Operand(Handle<String>(name))); // restore name register.
2230
+ __ DecrementCounter(&Counters::keyed_store_field, 1, r3, r4);
2027
2231
  Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss));
2232
+
2028
2233
  __ Jump(ic, RelocInfo::CODE_TARGET);
2029
2234
 
2030
2235
  // Return the generated code.
@@ -2085,7 +2290,7 @@ Object* ConstructStubCompiler::CompileConstructStub(
2085
2290
  r5,
2086
2291
  r6,
2087
2292
  &generic_stub_call,
2088
- NO_ALLOCATION_FLAGS);
2293
+ SIZE_IN_WORDS);
2089
2294
 
2090
2295
  // Allocated the JSObject, now initialize the fields. Map is set to initial
2091
2296
  // map and properties and elements are set to empty fixed array.
@@ -2178,3 +2383,5 @@ Object* ConstructStubCompiler::CompileConstructStub(
2178
2383
  #undef __
2179
2384
 
2180
2385
  } } // namespace v8::internal
2386
+
2387
+ #endif // V8_TARGET_ARCH_ARM