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
@@ -1,4 +1,4 @@
1
- // Copyright 2006-2008 the V8 project authors. All rights reserved.
1
+ // Copyright 2010 the V8 project authors. All rights reserved.
2
2
  // Redistribution and use in source and binary forms, with or without
3
3
  // modification, are permitted provided that the following conditions are
4
4
  // met:
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_IA32)
31
+
30
32
  #include "codegen-inl.h"
31
33
  #include "ic-inl.h"
32
34
  #include "runtime.h"
@@ -43,70 +45,77 @@ namespace internal {
43
45
  #define __ ACCESS_MASM(masm)
44
46
 
45
47
 
46
- // Helper function used to load a property from a dictionary backing storage.
47
- // This function may return false negatives, so miss_label
48
- // must always call a backup property load that is complete.
49
- // This function is safe to call if the receiver has fast properties,
50
- // or if name is not a symbol, and will jump to the miss_label in that case.
51
- static void GenerateDictionaryLoad(MacroAssembler* masm,
52
- Label* miss_label,
53
- Register receiver,
54
- Register name,
55
- Register r0,
56
- Register r1,
57
- Register r2,
58
- DictionaryCheck check_dictionary) {
59
- // Register use:
60
- //
61
- // name - holds the name of the property and is unchanged.
62
- // receiver - holds the receiver and is unchanged.
63
- // Scratch registers:
64
- // r0 - used to hold the property dictionary.
65
- //
66
- // r1 - used for the index into the property dictionary
67
- // - holds the result on exit.
68
- //
69
- // r2 - used to hold the capacity of the property dictionary.
48
+ static void GenerateGlobalInstanceTypeCheck(MacroAssembler* masm,
49
+ Register type,
50
+ Label* global_object) {
51
+ // Register usage:
52
+ // type: holds the receiver instance type on entry.
53
+ __ cmp(type, JS_GLOBAL_OBJECT_TYPE);
54
+ __ j(equal, global_object, not_taken);
55
+ __ cmp(type, JS_BUILTINS_OBJECT_TYPE);
56
+ __ j(equal, global_object, not_taken);
57
+ __ cmp(type, JS_GLOBAL_PROXY_TYPE);
58
+ __ j(equal, global_object, not_taken);
59
+ }
70
60
 
71
- Label done;
72
61
 
73
- // Check for the absence of an interceptor.
74
- // Load the map into r0.
75
- __ mov(r0, FieldOperand(receiver, JSObject::kMapOffset));
62
+ // Generated code falls through if the receiver is a regular non-global
63
+ // JS object with slow properties and no interceptors.
64
+ static void GenerateStringDictionaryReceiverCheck(MacroAssembler* masm,
65
+ Register receiver,
66
+ Register r0,
67
+ Register r1,
68
+ Label* miss) {
69
+ // Register usage:
70
+ // receiver: holds the receiver on entry and is unchanged.
71
+ // r0: used to hold receiver instance type.
72
+ // Holds the property dictionary on fall through.
73
+ // r1: used to hold receivers map.
76
74
 
77
- // Bail out if the receiver has a named interceptor.
78
- __ test(FieldOperand(r0, Map::kBitFieldOffset),
79
- Immediate(1 << Map::kHasNamedInterceptor));
80
- __ j(not_zero, miss_label, not_taken);
75
+ // Check that the receiver isn't a smi.
76
+ __ test(receiver, Immediate(kSmiTagMask));
77
+ __ j(zero, miss, not_taken);
78
+
79
+ // Check that the receiver is a valid JS object.
80
+ __ mov(r1, FieldOperand(receiver, HeapObject::kMapOffset));
81
+ __ movzx_b(r0, FieldOperand(r1, Map::kInstanceTypeOffset));
82
+ __ cmp(r0, FIRST_JS_OBJECT_TYPE);
83
+ __ j(below, miss, not_taken);
81
84
 
82
- // Bail out if we have a JS global proxy object.
83
- __ movzx_b(r0, FieldOperand(r0, Map::kInstanceTypeOffset));
84
- __ cmp(r0, JS_GLOBAL_PROXY_TYPE);
85
- __ j(equal, miss_label, not_taken);
85
+ // If this assert fails, we have to check upper bound too.
86
+ ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
87
+
88
+ GenerateGlobalInstanceTypeCheck(masm, r0, miss);
86
89
 
87
- // Possible work-around for http://crbug.com/16276.
88
- __ cmp(r0, JS_GLOBAL_OBJECT_TYPE);
89
- __ j(equal, miss_label, not_taken);
90
- __ cmp(r0, JS_BUILTINS_OBJECT_TYPE);
91
- __ j(equal, miss_label, not_taken);
90
+ // Check for non-global object that requires access check.
91
+ __ test_b(FieldOperand(r1, Map::kBitFieldOffset),
92
+ (1 << Map::kIsAccessCheckNeeded) |
93
+ (1 << Map::kHasNamedInterceptor));
94
+ __ j(not_zero, miss, not_taken);
92
95
 
93
- // Load properties array.
94
96
  __ mov(r0, FieldOperand(receiver, JSObject::kPropertiesOffset));
97
+ __ CheckMap(r0, Factory::hash_table_map(), miss, true);
98
+ }
95
99
 
96
- // Check that the properties array is a dictionary.
97
- if (check_dictionary == CHECK_DICTIONARY) {
98
- __ cmp(FieldOperand(r0, HeapObject::kMapOffset),
99
- Immediate(Factory::hash_table_map()));
100
- __ j(not_equal, miss_label);
101
- }
102
100
 
101
+ // Probe the string dictionary in the |elements| register. Jump to the
102
+ // |done| label if a property with the given name is found leaving the
103
+ // index into the dictionary in |r0|. Jump to the |miss| label
104
+ // otherwise.
105
+ static void GenerateStringDictionaryProbes(MacroAssembler* masm,
106
+ Label* miss,
107
+ Label* done,
108
+ Register elements,
109
+ Register name,
110
+ Register r0,
111
+ Register r1) {
103
112
  // Compute the capacity mask.
104
113
  const int kCapacityOffset =
105
114
  StringDictionary::kHeaderSize +
106
115
  StringDictionary::kCapacityIndex * kPointerSize;
107
- __ mov(r2, FieldOperand(r0, kCapacityOffset));
108
- __ shr(r2, kSmiTagSize); // convert smi to int
109
- __ dec(r2);
116
+ __ mov(r1, FieldOperand(elements, kCapacityOffset));
117
+ __ shr(r1, kSmiTagSize); // convert smi to int
118
+ __ dec(r1);
110
119
 
111
120
  // Generate an unrolled loop that performs a few probes before
112
121
  // giving up. Measurements done on Gmail indicate that 2 probes
@@ -117,37 +126,147 @@ static void GenerateDictionaryLoad(MacroAssembler* masm,
117
126
  StringDictionary::kElementsStartIndex * kPointerSize;
118
127
  for (int i = 0; i < kProbes; i++) {
119
128
  // Compute the masked index: (hash + i + i * i) & mask.
120
- __ mov(r1, FieldOperand(name, String::kHashFieldOffset));
121
- __ shr(r1, String::kHashShift);
129
+ __ mov(r0, FieldOperand(name, String::kHashFieldOffset));
130
+ __ shr(r0, String::kHashShift);
122
131
  if (i > 0) {
123
- __ add(Operand(r1), Immediate(StringDictionary::GetProbeOffset(i)));
132
+ __ add(Operand(r0), Immediate(StringDictionary::GetProbeOffset(i)));
124
133
  }
125
- __ and_(r1, Operand(r2));
134
+ __ and_(r0, Operand(r1));
126
135
 
127
136
  // Scale the index by multiplying by the entry size.
128
137
  ASSERT(StringDictionary::kEntrySize == 3);
129
- __ lea(r1, Operand(r1, r1, times_2, 0)); // r1 = r1 * 3
138
+ __ lea(r0, Operand(r0, r0, times_2, 0)); // r0 = r0 * 3
130
139
 
131
140
  // Check if the key is identical to the name.
132
- __ cmp(name,
133
- Operand(r0, r1, times_4, kElementsStartOffset - kHeapObjectTag));
141
+ __ cmp(name, Operand(elements, r0, times_4,
142
+ kElementsStartOffset - kHeapObjectTag));
134
143
  if (i != kProbes - 1) {
135
- __ j(equal, &done, taken);
144
+ __ j(equal, done, taken);
136
145
  } else {
137
- __ j(not_equal, miss_label, not_taken);
146
+ __ j(not_equal, miss, not_taken);
138
147
  }
139
148
  }
149
+ }
150
+
151
+
152
+
153
+ // Helper function used to load a property from a dictionary backing
154
+ // storage. This function may fail to load a property even though it is
155
+ // in the dictionary, so code at miss_label must always call a backup
156
+ // property load that is complete. This function is safe to call if
157
+ // name is not a symbol, and will jump to the miss_label in that
158
+ // case. The generated code assumes that the receiver has slow
159
+ // properties, is not a global object and does not have interceptors.
160
+ static void GenerateDictionaryLoad(MacroAssembler* masm,
161
+ Label* miss_label,
162
+ Register elements,
163
+ Register name,
164
+ Register r0,
165
+ Register r1,
166
+ Register result) {
167
+ // Register use:
168
+ //
169
+ // elements - holds the property dictionary on entry and is unchanged.
170
+ //
171
+ // name - holds the name of the property on entry and is unchanged.
172
+ //
173
+ // Scratch registers:
174
+ //
175
+ // r0 - used for the index into the property dictionary
176
+ //
177
+ // r1 - used to hold the capacity of the property dictionary.
178
+ //
179
+ // result - holds the result on exit.
140
180
 
141
- // Check that the value is a normal property.
181
+ Label done;
182
+
183
+ // Probe the dictionary.
184
+ GenerateStringDictionaryProbes(masm,
185
+ miss_label,
186
+ &done,
187
+ elements,
188
+ name,
189
+ r0,
190
+ r1);
191
+
192
+ // If probing finds an entry in the dictionary, r0 contains the
193
+ // index into the dictionary. Check that the value is a normal
194
+ // property.
142
195
  __ bind(&done);
196
+ const int kElementsStartOffset =
197
+ StringDictionary::kHeaderSize +
198
+ StringDictionary::kElementsStartIndex * kPointerSize;
143
199
  const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
144
- __ test(Operand(r0, r1, times_4, kDetailsOffset - kHeapObjectTag),
200
+ __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag),
145
201
  Immediate(PropertyDetails::TypeField::mask() << kSmiTagSize));
146
202
  __ j(not_zero, miss_label, not_taken);
147
203
 
148
204
  // Get the value at the masked, scaled index.
149
205
  const int kValueOffset = kElementsStartOffset + kPointerSize;
150
- __ mov(r1, Operand(r0, r1, times_4, kValueOffset - kHeapObjectTag));
206
+ __ mov(result, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag));
207
+ }
208
+
209
+
210
+ // Helper function used to store a property to a dictionary backing
211
+ // storage. This function may fail to store a property eventhough it
212
+ // is in the dictionary, so code at miss_label must always call a
213
+ // backup property store that is complete. This function is safe to
214
+ // call if name is not a symbol, and will jump to the miss_label in
215
+ // that case. The generated code assumes that the receiver has slow
216
+ // properties, is not a global object and does not have interceptors.
217
+ static void GenerateDictionaryStore(MacroAssembler* masm,
218
+ Label* miss_label,
219
+ Register elements,
220
+ Register name,
221
+ Register value,
222
+ Register r0,
223
+ Register r1) {
224
+ // Register use:
225
+ //
226
+ // elements - holds the property dictionary on entry and is clobbered.
227
+ //
228
+ // name - holds the name of the property on entry and is unchanged.
229
+ //
230
+ // value - holds the value to store and is unchanged.
231
+ //
232
+ // r0 - used for index into the property dictionary and is clobbered.
233
+ //
234
+ // r1 - used to hold the capacity of the property dictionary and is clobbered.
235
+ Label done;
236
+
237
+
238
+ // Probe the dictionary.
239
+ GenerateStringDictionaryProbes(masm,
240
+ miss_label,
241
+ &done,
242
+ elements,
243
+ name,
244
+ r0,
245
+ r1);
246
+
247
+ // If probing finds an entry in the dictionary, r0 contains the
248
+ // index into the dictionary. Check that the value is a normal
249
+ // property that is not read only.
250
+ __ bind(&done);
251
+ const int kElementsStartOffset =
252
+ StringDictionary::kHeaderSize +
253
+ StringDictionary::kElementsStartIndex * kPointerSize;
254
+ const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
255
+ const int kTypeAndReadOnlyMask
256
+ = (PropertyDetails::TypeField::mask() |
257
+ PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize;
258
+ __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag),
259
+ Immediate(kTypeAndReadOnlyMask));
260
+ __ j(not_zero, miss_label, not_taken);
261
+
262
+ // Store the value at the masked, scaled index.
263
+ const int kValueOffset = kElementsStartOffset + kPointerSize;
264
+ __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag));
265
+ __ mov(Operand(r0, 0), value);
266
+
267
+ // Update write barrier. Make sure not to clobber the value.
268
+ __ mov(r1, value);
269
+ __ RecordWrite(elements, r0, r1);
151
270
  }
152
271
 
153
272
 
@@ -157,14 +276,13 @@ static void GenerateNumberDictionaryLoad(MacroAssembler* masm,
157
276
  Register key,
158
277
  Register r0,
159
278
  Register r1,
160
- Register r2) {
279
+ Register r2,
280
+ Register result) {
161
281
  // Register use:
162
282
  //
163
283
  // elements - holds the slow-case elements of the receiver and is unchanged.
164
284
  //
165
- // key - holds the smi key on entry and is unchanged if a branch is
166
- // performed to the miss label. If the load succeeds and we
167
- // fall through, key holds the result on exit.
285
+ // key - holds the smi key on entry and is unchanged.
168
286
  //
169
287
  // Scratch registers:
170
288
  //
@@ -173,6 +291,9 @@ static void GenerateNumberDictionaryLoad(MacroAssembler* masm,
173
291
  // r1 - used to hold the capacity mask of the dictionary
174
292
  //
175
293
  // r2 - used for the index into the dictionary.
294
+ //
295
+ // result - holds the result on exit if the load succeeds and we fall through.
296
+
176
297
  Label done;
177
298
 
178
299
  // Compute the hash code from the untagged key. This must be kept in sync
@@ -244,7 +365,7 @@ static void GenerateNumberDictionaryLoad(MacroAssembler* masm,
244
365
  // Get the value at the masked, scaled index.
245
366
  const int kValueOffset =
246
367
  NumberDictionary::kElementsStartOffset + kPointerSize;
247
- __ mov(key, FieldOperand(elements, r2, times_pointer_size, kValueOffset));
368
+ __ mov(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset));
248
369
  }
249
370
 
250
371
 
@@ -296,63 +417,164 @@ void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
296
417
  }
297
418
 
298
419
 
299
- void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
300
- // ----------- S t a t e -------------
301
- // -- eax : key
302
- // -- edx : receiver
303
- // -- esp[0] : return address
304
- // -----------------------------------
305
- Label slow, check_string, index_int, index_string;
306
- Label check_pixel_array, probe_dictionary;
307
- Label check_number_dictionary;
420
+ // Checks the receiver for special cases (value type, slow case bits).
421
+ // Falls through for regular JS object.
422
+ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
423
+ Register receiver,
424
+ Register map,
425
+ int interceptor_bit,
426
+ Label* slow) {
427
+ // Register use:
428
+ // receiver - holds the receiver and is unchanged.
429
+ // Scratch registers:
430
+ // map - used to hold the map of the receiver.
308
431
 
309
432
  // Check that the object isn't a smi.
310
- __ test(edx, Immediate(kSmiTagMask));
311
- __ j(zero, &slow, not_taken);
433
+ __ test(receiver, Immediate(kSmiTagMask));
434
+ __ j(zero, slow, not_taken);
312
435
 
313
436
  // Get the map of the receiver.
314
- __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset));
437
+ __ mov(map, FieldOperand(receiver, HeapObject::kMapOffset));
315
438
 
316
439
  // Check bit field.
317
- __ movzx_b(ebx, FieldOperand(ecx, Map::kBitFieldOffset));
318
- __ test(ebx, Immediate(kSlowCaseBitFieldMask));
319
- __ j(not_zero, &slow, not_taken);
440
+ __ test_b(FieldOperand(map, Map::kBitFieldOffset),
441
+ (1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit));
442
+ __ j(not_zero, slow, not_taken);
320
443
  // Check that the object is some kind of JS object EXCEPT JS Value type.
321
444
  // In the case that the object is a value-wrapper object,
322
445
  // we enter the runtime system to make sure that indexing
323
- // into string objects work as intended.
446
+ // into string objects works as intended.
324
447
  ASSERT(JS_OBJECT_TYPE > JS_VALUE_TYPE);
325
- __ CmpInstanceType(ecx, JS_OBJECT_TYPE);
326
- __ j(below, &slow, not_taken);
327
- // Check that the key is a smi.
328
- __ test(eax, Immediate(kSmiTagMask));
329
- __ j(not_zero, &check_string, not_taken);
330
- __ mov(ebx, eax);
331
- __ SmiUntag(ebx);
332
- // Get the elements array of the object.
333
- __ bind(&index_int);
334
- __ mov(ecx, FieldOperand(edx, JSObject::kElementsOffset));
448
+
449
+ __ CmpInstanceType(map, JS_OBJECT_TYPE);
450
+ __ j(below, slow, not_taken);
451
+ }
452
+
453
+
454
+ // Loads an indexed element from a fast case array.
455
+ static void GenerateFastArrayLoad(MacroAssembler* masm,
456
+ Register receiver,
457
+ Register key,
458
+ Register scratch,
459
+ Register result,
460
+ Label* not_fast_array,
461
+ Label* out_of_range) {
462
+ // Register use:
463
+ // receiver - holds the receiver and is unchanged.
464
+ // key - holds the key and is unchanged (must be a smi).
465
+ // Scratch registers:
466
+ // scratch - used to hold elements of the receiver and the loaded value.
467
+ // result - holds the result on exit if the load succeeds and
468
+ // we fall through.
469
+
470
+ __ mov(scratch, FieldOperand(receiver, JSObject::kElementsOffset));
335
471
  // Check that the object is in fast mode (not dictionary).
336
- __ CheckMap(ecx, Factory::fixed_array_map(), &check_pixel_array, true);
472
+ __ CheckMap(scratch, Factory::fixed_array_map(), not_fast_array, true);
337
473
  // Check that the key (index) is within bounds.
338
- __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset));
339
- __ j(above_equal, &slow);
474
+ __ cmp(key, FieldOperand(scratch, FixedArray::kLengthOffset));
475
+ __ j(above_equal, out_of_range);
340
476
  // Fast case: Do the load.
341
- __ mov(ecx, FieldOperand(ecx, ebx, times_4, FixedArray::kHeaderSize));
342
- __ cmp(Operand(ecx), Immediate(Factory::the_hole_value()));
477
+ ASSERT((kPointerSize == 4) && (kSmiTagSize == 1) && (kSmiTag == 0));
478
+ __ mov(scratch, FieldOperand(scratch, key, times_2, FixedArray::kHeaderSize));
479
+ __ cmp(Operand(scratch), Immediate(Factory::the_hole_value()));
343
480
  // In case the loaded value is the_hole we have to consult GetProperty
344
481
  // to ensure the prototype chain is searched.
345
- __ j(equal, &slow);
346
- __ mov(eax, ecx);
482
+ __ j(equal, out_of_range);
483
+ if (!result.is(scratch)) {
484
+ __ mov(result, scratch);
485
+ }
486
+ }
487
+
488
+
489
+ // Checks whether a key is an array index string or a symbol string.
490
+ // Falls through if the key is a symbol.
491
+ static void GenerateKeyStringCheck(MacroAssembler* masm,
492
+ Register key,
493
+ Register map,
494
+ Register hash,
495
+ Label* index_string,
496
+ Label* not_symbol) {
497
+ // Register use:
498
+ // key - holds the key and is unchanged. Assumed to be non-smi.
499
+ // Scratch registers:
500
+ // map - used to hold the map of the key.
501
+ // hash - used to hold the hash of the key.
502
+ __ CmpObjectType(key, FIRST_NONSTRING_TYPE, map);
503
+ __ j(above_equal, not_symbol);
504
+
505
+ // Is the string an array index, with cached numeric value?
506
+ __ mov(hash, FieldOperand(key, String::kHashFieldOffset));
507
+ __ test(hash, Immediate(String::kContainsCachedArrayIndexMask));
508
+ __ j(zero, index_string, not_taken);
509
+
510
+ // Is the string a symbol?
511
+ ASSERT(kSymbolTag != 0);
512
+ __ test_b(FieldOperand(map, Map::kInstanceTypeOffset), kIsSymbolMask);
513
+ __ j(zero, not_symbol, not_taken);
514
+ }
515
+
516
+
517
+ // Picks out an array index from the hash field.
518
+ static void GenerateIndexFromHash(MacroAssembler* masm,
519
+ Register key,
520
+ Register hash) {
521
+ // Register use:
522
+ // key - holds the overwritten key on exit.
523
+ // hash - holds the key's hash. Clobbered.
524
+
525
+ // The assert checks that the constants for the maximum number of digits
526
+ // for an array index cached in the hash field and the number of bits
527
+ // reserved for it does not conflict.
528
+ ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) <
529
+ (1 << String::kArrayIndexValueBits));
530
+ // We want the smi-tagged index in key. kArrayIndexValueMask has zeros in
531
+ // the low kHashShift bits.
532
+ ASSERT(String::kHashShift >= kSmiTagSize);
533
+ __ and_(hash, String::kArrayIndexValueMask);
534
+ __ shr(hash, String::kHashShift - kSmiTagSize);
535
+ // Here we actually clobber the key which will be used if calling into
536
+ // runtime later. However as the new key is the numeric value of a string key
537
+ // there is no difference in using either key.
538
+ __ mov(key, hash);
539
+ }
540
+
541
+
542
+ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
543
+ // ----------- S t a t e -------------
544
+ // -- eax : key
545
+ // -- edx : receiver
546
+ // -- esp[0] : return address
547
+ // -----------------------------------
548
+ Label slow, check_string, index_smi, index_string;
549
+ Label check_pixel_array, probe_dictionary, check_number_dictionary;
550
+
551
+ // Check that the key is a smi.
552
+ __ test(eax, Immediate(kSmiTagMask));
553
+ __ j(not_zero, &check_string, not_taken);
554
+ __ bind(&index_smi);
555
+ // Now the key is known to be a smi. This place is also jumped to from
556
+ // where a numeric string is converted to a smi.
557
+
558
+ GenerateKeyedLoadReceiverCheck(
559
+ masm, edx, ecx, Map::kHasIndexedInterceptor, &slow);
560
+
561
+ GenerateFastArrayLoad(masm,
562
+ edx,
563
+ eax,
564
+ ecx,
565
+ eax,
566
+ &check_pixel_array,
567
+ &slow);
347
568
  __ IncrementCounter(&Counters::keyed_load_generic_smi, 1);
348
569
  __ ret(0);
349
570
 
350
571
  __ bind(&check_pixel_array);
351
572
  // Check whether the elements is a pixel array.
352
573
  // edx: receiver
353
- // ebx: untagged index
354
574
  // eax: key
355
575
  // ecx: elements
576
+ __ mov(ebx, eax);
577
+ __ SmiUntag(ebx);
356
578
  __ CheckMap(ecx, Factory::pixel_array_map(), &check_number_dictionary, true);
357
579
  __ cmp(ebx, FieldOperand(ecx, PixelArray::kLengthOffset));
358
580
  __ j(above_equal, &slow);
@@ -378,7 +600,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
378
600
  eax,
379
601
  ebx,
380
602
  edx,
381
- edi);
603
+ edi,
604
+ eax);
382
605
  // Pop receiver before returning.
383
606
  __ pop(edx);
384
607
  __ ret(0);
@@ -395,22 +618,10 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
395
618
  GenerateRuntimeGetProperty(masm);
396
619
 
397
620
  __ bind(&check_string);
398
- // The key is not a smi.
399
- // Is it a string?
400
- // edx: receiver
401
- // eax: key
402
- __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx);
403
- __ j(above_equal, &slow);
404
- // Is the string an array index, with cached numeric value?
405
- __ mov(ebx, FieldOperand(eax, String::kHashFieldOffset));
406
- __ test(ebx, Immediate(String::kIsArrayIndexMask));
407
- __ j(not_zero, &index_string, not_taken);
621
+ GenerateKeyStringCheck(masm, eax, ecx, ebx, &index_string, &slow);
408
622
 
409
- // Is the string a symbol?
410
- __ movzx_b(ebx, FieldOperand(ecx, Map::kInstanceTypeOffset));
411
- ASSERT(kSymbolTag != 0);
412
- __ test(ebx, Immediate(kIsSymbolMask));
413
- __ j(zero, &slow, not_taken);
623
+ GenerateKeyedLoadReceiverCheck(
624
+ masm, edx, ecx, Map::kHasNamedInterceptor, &slow);
414
625
 
415
626
  // If the receiver is a fast-case object, check the keyed lookup
416
627
  // cache. Otherwise probe the dictionary.
@@ -451,41 +662,32 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
451
662
  __ mov(edi,
452
663
  Operand::StaticArray(ecx, times_pointer_size, cache_field_offsets));
453
664
  __ movzx_b(ecx, FieldOperand(ebx, Map::kInObjectPropertiesOffset));
454
- __ cmp(edi, Operand(ecx));
665
+ __ sub(edi, Operand(ecx));
455
666
  __ j(above_equal, &slow);
456
667
 
457
668
  // Load in-object property.
458
- __ sub(edi, Operand(ecx));
459
669
  __ movzx_b(ecx, FieldOperand(ebx, Map::kInstanceSizeOffset));
460
670
  __ add(ecx, Operand(edi));
461
671
  __ mov(eax, FieldOperand(edx, ecx, times_pointer_size, 0));
672
+ __ IncrementCounter(&Counters::keyed_load_generic_lookup_cache, 1);
462
673
  __ ret(0);
463
674
 
464
675
  // Do a quick inline probe of the receiver's dictionary, if it
465
676
  // exists.
466
677
  __ bind(&probe_dictionary);
467
- GenerateDictionaryLoad(masm,
468
- &slow,
469
- edx,
470
- eax,
471
- ebx,
472
- ecx,
473
- edi,
474
- DICTIONARY_CHECK_DONE);
475
- __ mov(eax, ecx);
678
+
679
+ __ mov(ecx, FieldOperand(edx, JSObject::kMapOffset));
680
+ __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset));
681
+ GenerateGlobalInstanceTypeCheck(masm, ecx, &slow);
682
+
683
+ GenerateDictionaryLoad(masm, &slow, ebx, eax, ecx, edi, eax);
476
684
  __ IncrementCounter(&Counters::keyed_load_generic_symbol, 1);
477
685
  __ ret(0);
478
686
 
479
- // If the hash field contains an array index pick it out. The assert checks
480
- // that the constants for the maximum number of digits for an array index
481
- // cached in the hash field and the number of bits reserved for it does not
482
- // conflict.
483
- ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) <
484
- (1 << String::kArrayIndexValueBits));
485
687
  __ bind(&index_string);
486
- __ and_(ebx, String::kArrayIndexHashMask);
487
- __ shr(ebx, String::kHashShift);
488
- __ jmp(&index_int);
688
+ GenerateIndexFromHash(masm, eax, ebx);
689
+ // Now jump to the place where smi keys are handled.
690
+ __ jmp(&index_smi);
489
691
  }
490
692
 
491
693
 
@@ -496,60 +698,29 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
496
698
  // -- esp[0] : return address
497
699
  // -----------------------------------
498
700
  Label miss;
499
- Label index_not_smi;
500
701
  Label index_out_of_range;
501
- Label slow_char_code;
502
- Label got_char_code;
503
702
 
504
703
  Register receiver = edx;
505
704
  Register index = eax;
506
- Register code = ebx;
507
- Register scratch = ecx;
508
-
509
- StringHelper::GenerateFastCharCodeAt(masm,
510
- receiver,
511
- index,
512
- scratch,
513
- code,
514
- &miss, // When not a string.
515
- &index_not_smi,
516
- &index_out_of_range,
517
- &slow_char_code);
518
- // If we didn't bail out, code register contains smi tagged char
519
- // code.
520
- __ bind(&got_char_code);
521
- StringHelper::GenerateCharFromCode(masm, code, eax, JUMP_FUNCTION);
522
- #ifdef DEBUG
523
- __ Abort("Unexpected fall-through from char from code tail call");
524
- #endif
525
-
526
- // Check if key is a heap number.
527
- __ bind(&index_not_smi);
528
- __ CheckMap(index, Factory::heap_number_map(), &miss, true);
529
-
530
- // Push receiver and key on the stack (now that we know they are a
531
- // string and a number), and call runtime.
532
- __ bind(&slow_char_code);
533
- __ EnterInternalFrame();
534
- __ push(receiver);
535
- __ push(index);
536
- __ CallRuntime(Runtime::kStringCharCodeAt, 2);
537
- ASSERT(!code.is(eax));
538
- __ mov(code, eax);
539
- __ LeaveInternalFrame();
705
+ Register scratch1 = ebx;
706
+ Register scratch2 = ecx;
707
+ Register result = eax;
708
+
709
+ StringCharAtGenerator char_at_generator(receiver,
710
+ index,
711
+ scratch1,
712
+ scratch2,
713
+ result,
714
+ &miss, // When not a string.
715
+ &miss, // When not a number.
716
+ &index_out_of_range,
717
+ STRING_INDEX_IS_ARRAY_INDEX);
718
+ char_at_generator.GenerateFast(masm);
719
+ __ ret(0);
720
+
721
+ ICRuntimeCallHelper call_helper;
722
+ char_at_generator.GenerateSlow(masm, call_helper);
540
723
 
541
- // Check if the runtime call returned NaN char code. If yes, return
542
- // undefined. Otherwise, we can continue.
543
- if (FLAG_debug_code) {
544
- ASSERT(kSmiTag == 0);
545
- __ test(code, Immediate(kSmiTagMask));
546
- __ j(zero, &got_char_code);
547
- __ mov(scratch, FieldOperand(code, HeapObject::kMapOffset));
548
- __ cmp(scratch, Factory::heap_number_map());
549
- __ Assert(equal, "StringCharCodeAt must return smi or heap number");
550
- }
551
- __ cmp(code, Factory::nan_value());
552
- __ j(not_equal, &got_char_code);
553
724
  __ bind(&index_out_of_range);
554
725
  __ Set(eax, Immediate(Factory::undefined_value()));
555
726
  __ ret(0);
@@ -581,8 +752,8 @@ void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm,
581
752
  // Check that the receiver does not require access checks. We need
582
753
  // to check this explicitly since this generic stub does not perform
583
754
  // map checks.
584
- __ movzx_b(ebx, FieldOperand(ecx, Map::kBitFieldOffset));
585
- __ test(ebx, Immediate(1 << Map::kIsAccessCheckNeeded));
755
+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset),
756
+ 1 << Map::kIsAccessCheckNeeded);
586
757
  __ j(not_zero, &slow, not_taken);
587
758
 
588
759
  __ CmpInstanceType(ecx, JS_OBJECT_TYPE);
@@ -706,7 +877,7 @@ void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm,
706
877
  __ fincstp();
707
878
  // Fall through to slow case.
708
879
 
709
- // Slow case: Load key and receiver from stack and jump to runtime.
880
+ // Slow case: Jump to runtime.
710
881
  __ bind(&slow);
711
882
  __ IncrementCounter(&Counters::keyed_load_external_array_slow, 1);
712
883
  GenerateRuntimeGetProperty(masm);
@@ -771,8 +942,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
771
942
  __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset));
772
943
  // Check that the receiver does not require access checks. We need
773
944
  // to do this because this generic stub does not perform map checks.
774
- __ movzx_b(ebx, FieldOperand(edi, Map::kBitFieldOffset));
775
- __ test(ebx, Immediate(1 << Map::kIsAccessCheckNeeded));
945
+ __ test_b(FieldOperand(edi, Map::kBitFieldOffset),
946
+ 1 << Map::kIsAccessCheckNeeded);
776
947
  __ j(not_zero, &slow, not_taken);
777
948
  // Check that the key is a smi.
778
949
  __ test(ecx, Immediate(kSmiTagMask));
@@ -790,9 +961,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
790
961
  __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset));
791
962
  // Check that the object is in fast mode (not dictionary).
792
963
  __ CheckMap(edi, Factory::fixed_array_map(), &check_pixel_array, true);
793
- __ mov(ebx, Operand(ecx));
794
- __ SmiUntag(ebx);
795
- __ cmp(ebx, FieldOperand(edi, Array::kLengthOffset));
964
+ __ cmp(ecx, FieldOperand(edi, FixedArray::kLengthOffset));
796
965
  __ j(below, &fast, taken);
797
966
 
798
967
  // Slow case: call runtime.
@@ -802,7 +971,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
802
971
  // Check whether the elements is a pixel array.
803
972
  __ bind(&check_pixel_array);
804
973
  // eax: value
805
- // ecx: key
974
+ // ecx: key (a smi)
806
975
  // edx: receiver
807
976
  // edi: elements array
808
977
  __ CheckMap(edi, Factory::pixel_array_map(), &slow, true);
@@ -838,13 +1007,11 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
838
1007
  // edi: receiver->elements, a FixedArray
839
1008
  // flags: compare (ecx, edx.length())
840
1009
  __ j(not_equal, &slow, not_taken); // do not leave holes in the array
841
- __ mov(ebx, ecx);
842
- __ SmiUntag(ebx); // untag
843
- __ cmp(ebx, FieldOperand(edi, Array::kLengthOffset));
1010
+ __ cmp(ecx, FieldOperand(edi, FixedArray::kLengthOffset));
844
1011
  __ j(above_equal, &slow, not_taken);
845
1012
  // Add 1 to receiver->length, and go to fast array write.
846
1013
  __ add(FieldOperand(edx, JSArray::kLengthOffset),
847
- Immediate(1 << kSmiTagSize));
1014
+ Immediate(Smi::FromInt(1)));
848
1015
  __ jmp(&fast);
849
1016
 
850
1017
  // Array case: Get the length and the elements array from the JS
@@ -868,7 +1035,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
868
1035
  // ecx: key (a smi)
869
1036
  // edx: receiver
870
1037
  // edi: FixedArray receiver->elements
871
- __ mov(FieldOperand(edi, ecx, times_2, FixedArray::kHeaderSize), eax);
1038
+ __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax);
872
1039
  // Update write barrier for the elements array address.
873
1040
  __ mov(edx, Operand(eax));
874
1041
  __ RecordWrite(edi, 0, edx, ecx);
@@ -893,8 +1060,8 @@ void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm,
893
1060
  __ mov(edi, FieldOperand(edx, HeapObject::kMapOffset));
894
1061
  // Check that the receiver does not require access checks. We need
895
1062
  // to do this because this generic stub does not perform map checks.
896
- __ movzx_b(ebx, FieldOperand(edi, Map::kBitFieldOffset));
897
- __ test(ebx, Immediate(1 << Map::kIsAccessCheckNeeded));
1063
+ __ test_b(FieldOperand(edi, Map::kBitFieldOffset),
1064
+ 1 << Map::kIsAccessCheckNeeded);
898
1065
  __ j(not_zero, &slow);
899
1066
  // Check that the key is a smi.
900
1067
  __ test(ecx, Immediate(kSmiTagMask));
@@ -1067,22 +1234,20 @@ void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm,
1067
1234
  // Defined in ic.cc.
1068
1235
  Object* CallIC_Miss(Arguments args);
1069
1236
 
1070
- void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
1237
+ // The generated code does not accept smi keys.
1238
+ // The generated code falls through if both probes miss.
1239
+ static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
1240
+ int argc,
1241
+ Code::Kind kind) {
1071
1242
  // ----------- S t a t e -------------
1072
1243
  // -- ecx : name
1073
- // -- esp[0] : return address
1074
- // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1075
- // -- ...
1076
- // -- esp[(argc + 1) * 4] : receiver
1244
+ // -- edx : receiver
1077
1245
  // -----------------------------------
1078
1246
  Label number, non_number, non_string, boolean, probe, miss;
1079
1247
 
1080
- // Get the receiver of the function from the stack; 1 ~ return address.
1081
- __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1082
-
1083
1248
  // Probe the stub cache.
1084
1249
  Code::Flags flags =
1085
- Code::ComputeFlags(Code::CALL_IC, NOT_IN_LOOP, MONOMORPHIC, NORMAL, argc);
1250
+ Code::ComputeFlags(kind, NOT_IN_LOOP, MONOMORPHIC, NORMAL, argc);
1086
1251
  StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, eax);
1087
1252
 
1088
1253
  // If the stub cache probing failed, the receiver might be a value.
@@ -1102,7 +1267,7 @@ void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
1102
1267
 
1103
1268
  // Check for string.
1104
1269
  __ bind(&non_number);
1105
- __ cmp(ebx, FIRST_NONSTRING_TYPE);
1270
+ __ CmpInstanceType(ebx, FIRST_NONSTRING_TYPE);
1106
1271
  __ j(above_equal, &non_string, taken);
1107
1272
  StubCompiler::GenerateLoadGlobalFunctionPrototype(
1108
1273
  masm, Context::STRING_FUNCTION_INDEX, edx);
@@ -1121,30 +1286,22 @@ void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
1121
1286
  // Probe the stub cache for the value object.
1122
1287
  __ bind(&probe);
1123
1288
  StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg);
1124
-
1125
- // Cache miss: Jump to runtime.
1126
1289
  __ bind(&miss);
1127
- GenerateMiss(masm, argc);
1128
1290
  }
1129
1291
 
1130
1292
 
1131
- static void GenerateNormalHelper(MacroAssembler* masm,
1132
- int argc,
1133
- bool is_global_object,
1134
- Label* miss) {
1293
+ static void GenerateFunctionTailCall(MacroAssembler* masm,
1294
+ int argc,
1295
+ Label* miss) {
1135
1296
  // ----------- S t a t e -------------
1136
1297
  // -- ecx : name
1137
- // -- edx : receiver
1298
+ // -- edi : function
1138
1299
  // -- esp[0] : return address
1139
1300
  // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1140
1301
  // -- ...
1141
1302
  // -- esp[(argc + 1) * 4] : receiver
1142
1303
  // -----------------------------------
1143
1304
 
1144
- // Search dictionary - put result in register edi.
1145
- __ mov(edi, edx);
1146
- GenerateDictionaryLoad(masm, miss, edx, ecx, eax, edi, ebx, CHECK_DICTIONARY);
1147
-
1148
1305
  // Check that the result is not a smi.
1149
1306
  __ test(edi, Immediate(kSmiTagMask));
1150
1307
  __ j(zero, miss, not_taken);
@@ -1153,19 +1310,13 @@ static void GenerateNormalHelper(MacroAssembler* masm,
1153
1310
  __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax);
1154
1311
  __ j(not_equal, miss, not_taken);
1155
1312
 
1156
- // Patch the receiver on stack with the global proxy if necessary.
1157
- if (is_global_object) {
1158
- __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset));
1159
- __ mov(Operand(esp, (argc + 1) * kPointerSize), edx);
1160
- }
1161
-
1162
1313
  // Invoke the function.
1163
1314
  ParameterCount actual(argc);
1164
1315
  __ InvokeFunction(edi, actual, JUMP_FUNCTION);
1165
1316
  }
1166
1317
 
1167
-
1168
- void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
1318
+ // The generated code falls through if the call should be handled by runtime.
1319
+ static void GenerateCallNormal(MacroAssembler* masm, int argc) {
1169
1320
  // ----------- S t a t e -------------
1170
1321
  // -- ecx : name
1171
1322
  // -- esp[0] : return address
@@ -1173,63 +1324,23 @@ void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
1173
1324
  // -- ...
1174
1325
  // -- esp[(argc + 1) * 4] : receiver
1175
1326
  // -----------------------------------
1176
- Label miss, global_object, non_global_object;
1327
+ Label miss;
1177
1328
 
1178
1329
  // Get the receiver of the function from the stack; 1 ~ return address.
1179
1330
  __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1180
1331
 
1181
- // Check that the receiver isn't a smi.
1182
- __ test(edx, Immediate(kSmiTagMask));
1183
- __ j(zero, &miss, not_taken);
1184
-
1185
- // Check that the receiver is a valid JS object.
1186
- __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
1187
- __ movzx_b(eax, FieldOperand(ebx, Map::kInstanceTypeOffset));
1188
- __ cmp(eax, FIRST_JS_OBJECT_TYPE);
1189
- __ j(below, &miss, not_taken);
1190
-
1191
- // If this assert fails, we have to check upper bound too.
1192
- ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
1193
-
1194
- // Check for access to global object.
1195
- __ cmp(eax, JS_GLOBAL_OBJECT_TYPE);
1196
- __ j(equal, &global_object);
1197
- __ cmp(eax, JS_BUILTINS_OBJECT_TYPE);
1198
- __ j(not_equal, &non_global_object);
1199
-
1200
- // Accessing global object: Load and invoke.
1201
- __ bind(&global_object);
1202
- // Check that the global object does not require access checks.
1203
- __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset));
1204
- __ test(ebx, Immediate(1 << Map::kIsAccessCheckNeeded));
1205
- __ j(not_equal, &miss, not_taken);
1206
- GenerateNormalHelper(masm, argc, true, &miss);
1207
-
1208
- // Accessing non-global object: Check for access to global proxy.
1209
- Label global_proxy, invoke;
1210
- __ bind(&non_global_object);
1211
- __ cmp(eax, JS_GLOBAL_PROXY_TYPE);
1212
- __ j(equal, &global_proxy, not_taken);
1213
- // Check that the non-global, non-global-proxy object does not
1214
- // require access checks.
1215
- __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset));
1216
- __ test(ebx, Immediate(1 << Map::kIsAccessCheckNeeded));
1217
- __ j(not_equal, &miss, not_taken);
1218
- __ bind(&invoke);
1219
- GenerateNormalHelper(masm, argc, false, &miss);
1332
+ GenerateStringDictionaryReceiverCheck(masm, edx, eax, ebx, &miss);
1220
1333
 
1221
- // Global object proxy access: Check access rights.
1222
- __ bind(&global_proxy);
1223
- __ CheckAccessGlobalProxy(edx, eax, &miss);
1224
- __ jmp(&invoke);
1334
+ // eax: elements
1335
+ // Search the dictionary placing the result in edi.
1336
+ GenerateDictionaryLoad(masm, &miss, eax, ecx, edi, ebx, edi);
1337
+ GenerateFunctionTailCall(masm, argc, &miss);
1225
1338
 
1226
- // Cache miss: Jump to runtime.
1227
1339
  __ bind(&miss);
1228
- GenerateMiss(masm, argc);
1229
1340
  }
1230
1341
 
1231
1342
 
1232
- void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1343
+ static void GenerateCallMiss(MacroAssembler* masm, int argc, IC::UtilityId id) {
1233
1344
  // ----------- S t a t e -------------
1234
1345
  // -- ecx : name
1235
1346
  // -- esp[0] : return address
@@ -1238,6 +1349,12 @@ void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1238
1349
  // -- esp[(argc + 1) * 4] : receiver
1239
1350
  // -----------------------------------
1240
1351
 
1352
+ if (id == IC::kCallIC_Miss) {
1353
+ __ IncrementCounter(&Counters::call_miss, 1);
1354
+ } else {
1355
+ __ IncrementCounter(&Counters::keyed_call_miss, 1);
1356
+ }
1357
+
1241
1358
  // Get the receiver of the function from the stack; 1 ~ return address.
1242
1359
  __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1243
1360
 
@@ -1251,7 +1368,7 @@ void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1251
1368
  // Call the entry.
1252
1369
  CEntryStub stub(1);
1253
1370
  __ mov(eax, Immediate(2));
1254
- __ mov(ebx, Immediate(ExternalReference(IC_Utility(kCallIC_Miss))));
1371
+ __ mov(ebx, Immediate(ExternalReference(IC_Utility(id))));
1255
1372
  __ CallStub(&stub);
1256
1373
 
1257
1374
  // Move result to edi and exit the internal frame.
@@ -1259,29 +1376,209 @@ void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1259
1376
  __ LeaveInternalFrame();
1260
1377
 
1261
1378
  // Check if the receiver is a global object of some sort.
1262
- Label invoke, global;
1263
- __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); // receiver
1264
- __ test(edx, Immediate(kSmiTagMask));
1265
- __ j(zero, &invoke, not_taken);
1266
- __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
1267
- __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
1268
- __ cmp(ebx, JS_GLOBAL_OBJECT_TYPE);
1269
- __ j(equal, &global);
1270
- __ cmp(ebx, JS_BUILTINS_OBJECT_TYPE);
1271
- __ j(not_equal, &invoke);
1272
-
1273
- // Patch the receiver on the stack.
1274
- __ bind(&global);
1275
- __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset));
1276
- __ mov(Operand(esp, (argc + 1) * kPointerSize), edx);
1379
+ // This can happen only for regular CallIC but not KeyedCallIC.
1380
+ if (id == IC::kCallIC_Miss) {
1381
+ Label invoke, global;
1382
+ __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); // receiver
1383
+ __ test(edx, Immediate(kSmiTagMask));
1384
+ __ j(zero, &invoke, not_taken);
1385
+ __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
1386
+ __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
1387
+ __ cmp(ebx, JS_GLOBAL_OBJECT_TYPE);
1388
+ __ j(equal, &global);
1389
+ __ cmp(ebx, JS_BUILTINS_OBJECT_TYPE);
1390
+ __ j(not_equal, &invoke);
1391
+
1392
+ // Patch the receiver on the stack.
1393
+ __ bind(&global);
1394
+ __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset));
1395
+ __ mov(Operand(esp, (argc + 1) * kPointerSize), edx);
1396
+ __ bind(&invoke);
1397
+ }
1277
1398
 
1278
1399
  // Invoke the function.
1279
1400
  ParameterCount actual(argc);
1280
- __ bind(&invoke);
1281
1401
  __ InvokeFunction(edi, actual, JUMP_FUNCTION);
1282
1402
  }
1283
1403
 
1284
1404
 
1405
+ void CallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
1406
+ // ----------- S t a t e -------------
1407
+ // -- ecx : name
1408
+ // -- esp[0] : return address
1409
+ // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1410
+ // -- ...
1411
+ // -- esp[(argc + 1) * 4] : receiver
1412
+ // -----------------------------------
1413
+
1414
+ // Get the receiver of the function from the stack; 1 ~ return address.
1415
+ __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1416
+ GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC);
1417
+ GenerateMiss(masm, argc);
1418
+ }
1419
+
1420
+
1421
+ void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
1422
+ // ----------- S t a t e -------------
1423
+ // -- ecx : name
1424
+ // -- esp[0] : return address
1425
+ // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1426
+ // -- ...
1427
+ // -- esp[(argc + 1) * 4] : receiver
1428
+ // -----------------------------------
1429
+
1430
+ GenerateCallNormal(masm, argc);
1431
+ GenerateMiss(masm, argc);
1432
+ }
1433
+
1434
+
1435
+ void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1436
+ // ----------- S t a t e -------------
1437
+ // -- ecx : name
1438
+ // -- esp[0] : return address
1439
+ // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1440
+ // -- ...
1441
+ // -- esp[(argc + 1) * 4] : receiver
1442
+ // -----------------------------------
1443
+
1444
+ GenerateCallMiss(masm, argc, IC::kCallIC_Miss);
1445
+ }
1446
+
1447
+
1448
+ void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) {
1449
+ // ----------- S t a t e -------------
1450
+ // -- ecx : name
1451
+ // -- esp[0] : return address
1452
+ // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1453
+ // -- ...
1454
+ // -- esp[(argc + 1) * 4] : receiver
1455
+ // -----------------------------------
1456
+
1457
+ // Get the receiver of the function from the stack; 1 ~ return address.
1458
+ __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1459
+
1460
+ Label do_call, slow_call, slow_load, slow_reload_receiver;
1461
+ Label check_number_dictionary, check_string, lookup_monomorphic_cache;
1462
+ Label index_smi, index_string;
1463
+
1464
+ // Check that the key is a smi.
1465
+ __ test(ecx, Immediate(kSmiTagMask));
1466
+ __ j(not_zero, &check_string, not_taken);
1467
+
1468
+ __ bind(&index_smi);
1469
+ // Now the key is known to be a smi. This place is also jumped to from
1470
+ // where a numeric string is converted to a smi.
1471
+
1472
+ GenerateKeyedLoadReceiverCheck(
1473
+ masm, edx, eax, Map::kHasIndexedInterceptor, &slow_call);
1474
+
1475
+ GenerateFastArrayLoad(
1476
+ masm, edx, ecx, eax, edi, &check_number_dictionary, &slow_load);
1477
+ __ IncrementCounter(&Counters::keyed_call_generic_smi_fast, 1);
1478
+
1479
+ __ bind(&do_call);
1480
+ // receiver in edx is not used after this point.
1481
+ // ecx: key
1482
+ // edi: function
1483
+ GenerateFunctionTailCall(masm, argc, &slow_call);
1484
+
1485
+ __ bind(&check_number_dictionary);
1486
+ // eax: elements
1487
+ // ecx: smi key
1488
+ // Check whether the elements is a number dictionary.
1489
+ __ CheckMap(eax, Factory::hash_table_map(), &slow_load, true);
1490
+ __ mov(ebx, ecx);
1491
+ __ SmiUntag(ebx);
1492
+ // ebx: untagged index
1493
+ // Receiver in edx will be clobbered, need to reload it on miss.
1494
+ GenerateNumberDictionaryLoad(
1495
+ masm, &slow_reload_receiver, eax, ecx, ebx, edx, edi, edi);
1496
+ __ IncrementCounter(&Counters::keyed_call_generic_smi_dict, 1);
1497
+ __ jmp(&do_call);
1498
+
1499
+ __ bind(&slow_reload_receiver);
1500
+ __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1501
+
1502
+ __ bind(&slow_load);
1503
+ // This branch is taken when calling KeyedCallIC_Miss is neither required
1504
+ // nor beneficial.
1505
+ __ IncrementCounter(&Counters::keyed_call_generic_slow_load, 1);
1506
+ __ EnterInternalFrame();
1507
+ __ push(ecx); // save the key
1508
+ __ push(edx); // pass the receiver
1509
+ __ push(ecx); // pass the key
1510
+ __ CallRuntime(Runtime::kKeyedGetProperty, 2);
1511
+ __ pop(ecx); // restore the key
1512
+ __ LeaveInternalFrame();
1513
+ __ mov(edi, eax);
1514
+ __ jmp(&do_call);
1515
+
1516
+ __ bind(&check_string);
1517
+ GenerateKeyStringCheck(masm, ecx, eax, ebx, &index_string, &slow_call);
1518
+
1519
+ // The key is known to be a symbol.
1520
+ // If the receiver is a regular JS object with slow properties then do
1521
+ // a quick inline probe of the receiver's dictionary.
1522
+ // Otherwise do the monomorphic cache probe.
1523
+ GenerateKeyedLoadReceiverCheck(
1524
+ masm, edx, eax, Map::kHasNamedInterceptor, &lookup_monomorphic_cache);
1525
+
1526
+ __ mov(ebx, FieldOperand(edx, JSObject::kPropertiesOffset));
1527
+ __ CheckMap(ebx, Factory::hash_table_map(), &lookup_monomorphic_cache, true);
1528
+
1529
+ GenerateDictionaryLoad(masm, &slow_load, ebx, ecx, eax, edi, edi);
1530
+ __ IncrementCounter(&Counters::keyed_call_generic_lookup_dict, 1);
1531
+ __ jmp(&do_call);
1532
+
1533
+ __ bind(&lookup_monomorphic_cache);
1534
+ __ IncrementCounter(&Counters::keyed_call_generic_lookup_cache, 1);
1535
+ GenerateMonomorphicCacheProbe(masm, argc, Code::KEYED_CALL_IC);
1536
+ // Fall through on miss.
1537
+
1538
+ __ bind(&slow_call);
1539
+ // This branch is taken if:
1540
+ // - the receiver requires boxing or access check,
1541
+ // - the key is neither smi nor symbol,
1542
+ // - the value loaded is not a function,
1543
+ // - there is hope that the runtime will create a monomorphic call stub
1544
+ // that will get fetched next time.
1545
+ __ IncrementCounter(&Counters::keyed_call_generic_slow, 1);
1546
+ GenerateMiss(masm, argc);
1547
+
1548
+ __ bind(&index_string);
1549
+ GenerateIndexFromHash(masm, ecx, ebx);
1550
+ // Now jump to the place where smi keys are handled.
1551
+ __ jmp(&index_smi);
1552
+ }
1553
+
1554
+
1555
+ void KeyedCallIC::GenerateNormal(MacroAssembler* masm, int argc) {
1556
+ // ----------- S t a t e -------------
1557
+ // -- ecx : name
1558
+ // -- esp[0] : return address
1559
+ // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1560
+ // -- ...
1561
+ // -- esp[(argc + 1) * 4] : receiver
1562
+ // -----------------------------------
1563
+
1564
+ GenerateCallNormal(masm, argc);
1565
+ GenerateMiss(masm, argc);
1566
+ }
1567
+
1568
+
1569
+ void KeyedCallIC::GenerateMiss(MacroAssembler* masm, int argc) {
1570
+ // ----------- S t a t e -------------
1571
+ // -- ecx : name
1572
+ // -- esp[0] : return address
1573
+ // -- esp[(argc - n) * 4] : arg[n] (zero-based)
1574
+ // -- ...
1575
+ // -- esp[(argc + 1) * 4] : receiver
1576
+ // -----------------------------------
1577
+
1578
+ GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss);
1579
+ }
1580
+
1581
+
1285
1582
  // Defined in ic.cc.
1286
1583
  Object* LoadIC_Miss(Arguments args);
1287
1584
 
@@ -1309,49 +1606,16 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) {
1309
1606
  // -- ecx : name
1310
1607
  // -- esp[0] : return address
1311
1608
  // -----------------------------------
1312
- Label miss, probe, global;
1313
-
1314
- // Check that the receiver isn't a smi.
1315
- __ test(eax, Immediate(kSmiTagMask));
1316
- __ j(zero, &miss, not_taken);
1317
-
1318
- // Check that the receiver is a valid JS object.
1319
- __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
1320
- __ movzx_b(edx, FieldOperand(ebx, Map::kInstanceTypeOffset));
1321
- __ cmp(edx, FIRST_JS_OBJECT_TYPE);
1322
- __ j(less, &miss, not_taken);
1323
-
1324
- // If this assert fails, we have to check upper bound too.
1325
- ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
1326
-
1327
- // Check for access to global object (unlikely).
1328
- __ cmp(edx, JS_GLOBAL_PROXY_TYPE);
1329
- __ j(equal, &global, not_taken);
1609
+ Label miss;
1330
1610
 
1331
- // Check for non-global object that requires access check.
1332
- __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset));
1333
- __ test(ebx, Immediate(1 << Map::kIsAccessCheckNeeded));
1334
- __ j(not_zero, &miss, not_taken);
1611
+ GenerateStringDictionaryReceiverCheck(masm, eax, edx, ebx, &miss);
1335
1612
 
1613
+ // edx: elements
1336
1614
  // Search the dictionary placing the result in eax.
1337
- __ bind(&probe);
1338
- GenerateDictionaryLoad(masm,
1339
- &miss,
1340
- eax,
1341
- ecx,
1342
- edx,
1343
- edi,
1344
- ebx,
1345
- CHECK_DICTIONARY);
1346
- __ mov(eax, edi);
1615
+ GenerateDictionaryLoad(masm, &miss, edx, ecx, edi, ebx, eax);
1347
1616
  __ ret(0);
1348
1617
 
1349
- // Global object access: Check access rights.
1350
- __ bind(&global);
1351
- __ CheckAccessGlobalProxy(eax, edx, &miss);
1352
- __ jmp(&probe);
1353
-
1354
- // Cache miss: Restore receiver from stack and jump to runtime.
1618
+ // Cache miss: Jump to runtime.
1355
1619
  __ bind(&miss);
1356
1620
  GenerateMiss(masm);
1357
1621
  }
@@ -1364,6 +1628,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
1364
1628
  // -- esp[0] : return address
1365
1629
  // -----------------------------------
1366
1630
 
1631
+ __ IncrementCounter(&Counters::load_miss, 1);
1632
+
1367
1633
  __ pop(ebx);
1368
1634
  __ push(eax); // receiver
1369
1635
  __ push(ecx); // name
@@ -1378,37 +1644,6 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
1378
1644
  // One byte opcode for test eax,0xXXXXXXXX.
1379
1645
  static const byte kTestEaxByte = 0xA9;
1380
1646
 
1381
-
1382
- void LoadIC::ClearInlinedVersion(Address address) {
1383
- // Reset the map check of the inlined inobject property load (if
1384
- // present) to guarantee failure by holding an invalid map (the null
1385
- // value). The offset can be patched to anything.
1386
- PatchInlinedLoad(address, Heap::null_value(), kMaxInt);
1387
- }
1388
-
1389
-
1390
- void KeyedLoadIC::ClearInlinedVersion(Address address) {
1391
- // Insert null as the map to check for to make sure the map check fails
1392
- // sending control flow to the IC instead of the inlined version.
1393
- PatchInlinedLoad(address, Heap::null_value());
1394
- }
1395
-
1396
-
1397
- void KeyedStoreIC::ClearInlinedVersion(Address address) {
1398
- // Insert null as the elements map to check for. This will make
1399
- // sure that the elements fast-case map check fails so that control
1400
- // flows to the IC instead of the inlined version.
1401
- PatchInlinedStore(address, Heap::null_value());
1402
- }
1403
-
1404
-
1405
- void KeyedStoreIC::RestoreInlinedVersion(Address address) {
1406
- // Restore the fast-case elements map check so that the inlined
1407
- // version can be used again.
1408
- PatchInlinedStore(address, Heap::fixed_array_map());
1409
- }
1410
-
1411
-
1412
1647
  bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) {
1413
1648
  // The address of the instruction following the call.
1414
1649
  Address test_instruction_address =
@@ -1437,6 +1672,52 @@ bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) {
1437
1672
  }
1438
1673
 
1439
1674
 
1675
+ bool StoreIC::PatchInlinedStore(Address address, Object* map, int offset) {
1676
+ // The address of the instruction following the call.
1677
+ Address test_instruction_address =
1678
+ address + Assembler::kCallTargetAddressOffset;
1679
+
1680
+ // If the instruction following the call is not a test eax, nothing
1681
+ // was inlined.
1682
+ if (*test_instruction_address != kTestEaxByte) return false;
1683
+
1684
+ // Extract the encoded deltas from the test eax instruction.
1685
+ Address encoded_offsets_address = test_instruction_address + 1;
1686
+ int encoded_offsets = *reinterpret_cast<int*>(encoded_offsets_address);
1687
+ int delta_to_map_check = -(encoded_offsets & 0xFFFF);
1688
+ int delta_to_record_write = encoded_offsets >> 16;
1689
+
1690
+ // Patch the map to check. The map address is the last 4 bytes of
1691
+ // the 7-byte operand-immediate compare instruction.
1692
+ Address map_check_address = test_instruction_address + delta_to_map_check;
1693
+ Address map_address = map_check_address + 3;
1694
+ *(reinterpret_cast<Object**>(map_address)) = map;
1695
+
1696
+ // Patch the offset in the store instruction. The offset is in the
1697
+ // last 4 bytes of a six byte register-to-memory move instruction.
1698
+ Address offset_address =
1699
+ map_check_address + StoreIC::kOffsetToStoreInstruction + 2;
1700
+ // The offset should have initial value (kMaxInt - 1), cleared value
1701
+ // (-1) or we should be clearing the inlined version.
1702
+ ASSERT(*reinterpret_cast<int*>(offset_address) == kMaxInt - 1 ||
1703
+ *reinterpret_cast<int*>(offset_address) == -1 ||
1704
+ (offset == 0 && map == Heap::null_value()));
1705
+ *reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag;
1706
+
1707
+ // Patch the offset in the write-barrier code. The offset is the
1708
+ // last 4 bytes of a six byte lea instruction.
1709
+ offset_address = map_check_address + delta_to_record_write + 2;
1710
+ // The offset should have initial value (kMaxInt), cleared value
1711
+ // (-1) or we should be clearing the inlined version.
1712
+ ASSERT(*reinterpret_cast<int*>(offset_address) == kMaxInt ||
1713
+ *reinterpret_cast<int*>(offset_address) == -1 ||
1714
+ (offset == 0 && map == Heap::null_value()));
1715
+ *reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag;
1716
+
1717
+ return true;
1718
+ }
1719
+
1720
+
1440
1721
  static bool PatchInlinedMapCheck(Address address, Object* map) {
1441
1722
  Address test_instruction_address =
1442
1723
  address + Assembler::kCallTargetAddressOffset;
@@ -1480,6 +1761,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
1480
1761
  // -- esp[0] : return address
1481
1762
  // -----------------------------------
1482
1763
 
1764
+ __ IncrementCounter(&Counters::keyed_load_miss, 1);
1765
+
1483
1766
  __ pop(ebx);
1484
1767
  __ push(edx); // receiver
1485
1768
  __ push(eax); // name
@@ -1546,6 +1829,12 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
1546
1829
  }
1547
1830
 
1548
1831
 
1832
+ // The offset from the inlined patch site to the start of the inlined
1833
+ // store instruction. It is 7 bytes (test reg, imm) plus 6 bytes (jne
1834
+ // slow_label).
1835
+ const int StoreIC::kOffsetToStoreInstruction = 13;
1836
+
1837
+
1549
1838
  void StoreIC::GenerateArrayLength(MacroAssembler* masm) {
1550
1839
  // ----------- S t a t e -------------
1551
1840
  // -- eax : value
@@ -1598,6 +1887,36 @@ void StoreIC::GenerateArrayLength(MacroAssembler* masm) {
1598
1887
  }
1599
1888
 
1600
1889
 
1890
+ void StoreIC::GenerateNormal(MacroAssembler* masm) {
1891
+ // ----------- S t a t e -------------
1892
+ // -- eax : value
1893
+ // -- ecx : name
1894
+ // -- edx : receiver
1895
+ // -- esp[0] : return address
1896
+ // -----------------------------------
1897
+
1898
+ Label miss, restore_miss;
1899
+
1900
+ GenerateStringDictionaryReceiverCheck(masm, edx, ebx, edi, &miss);
1901
+
1902
+ // A lot of registers are needed for storing to slow case
1903
+ // objects. Push and restore receiver but rely on
1904
+ // GenerateDictionaryStore preserving the value and name.
1905
+ __ push(edx);
1906
+ GenerateDictionaryStore(masm, &restore_miss, ebx, ecx, eax, edx, edi);
1907
+ __ Drop(1);
1908
+ __ IncrementCounter(&Counters::store_normal_hit, 1);
1909
+ __ ret(0);
1910
+
1911
+ __ bind(&restore_miss);
1912
+ __ pop(edx);
1913
+
1914
+ __ bind(&miss);
1915
+ __ IncrementCounter(&Counters::store_normal_miss, 1);
1916
+ GenerateMiss(masm);
1917
+ }
1918
+
1919
+
1601
1920
  // Defined in ic.cc.
1602
1921
  Object* KeyedStoreIC_Miss(Arguments args);
1603
1922
 
@@ -1643,3 +1962,5 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
1643
1962
 
1644
1963
 
1645
1964
  } } // namespace v8::internal
1965
+
1966
+ #endif // V8_TARGET_ARCH_IA32