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
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_X64)
31
+
30
32
  #include "codegen-inl.h"
31
33
  #include "register-allocator-inl.h"
32
34
  #include "scopes.h"
@@ -113,25 +115,45 @@ void VirtualFrame::AllocateStackSlots() {
113
115
  Handle<Object> undefined = Factory::undefined_value();
114
116
  FrameElement initial_value =
115
117
  FrameElement::ConstantElement(undefined, FrameElement::SYNCED);
116
- if (count == 1) {
117
- __ Push(undefined);
118
- } else if (count < kLocalVarBound) {
119
- // For less locals the unrolled loop is more compact.
120
- __ movq(kScratchRegister, undefined, RelocInfo::EMBEDDED_OBJECT);
118
+ if (count < kLocalVarBound) {
119
+ // For fewer locals the unrolled loop is more compact.
120
+
121
+ // Hope for one of the first eight registers, where the push operation
122
+ // takes only one byte (kScratchRegister needs the REX.W bit).
123
+ Result tmp = cgen()->allocator()->Allocate();
124
+ ASSERT(tmp.is_valid());
125
+ __ movq(tmp.reg(), undefined, RelocInfo::EMBEDDED_OBJECT);
121
126
  for (int i = 0; i < count; i++) {
122
- __ push(kScratchRegister);
127
+ __ push(tmp.reg());
123
128
  }
124
129
  } else {
125
130
  // For more locals a loop in generated code is more compact.
126
131
  Label alloc_locals_loop;
127
132
  Result cnt = cgen()->allocator()->Allocate();
128
133
  ASSERT(cnt.is_valid());
129
- __ movq(cnt.reg(), Immediate(count));
130
134
  __ movq(kScratchRegister, undefined, RelocInfo::EMBEDDED_OBJECT);
135
+ #ifdef DEBUG
136
+ Label loop_size;
137
+ __ bind(&loop_size);
138
+ #endif
139
+ if (is_uint8(count)) {
140
+ // Loading imm8 is shorter than loading imm32.
141
+ // Loading only partial byte register, and using decb below.
142
+ __ movb(cnt.reg(), Immediate(count));
143
+ } else {
144
+ __ movl(cnt.reg(), Immediate(count));
145
+ }
131
146
  __ bind(&alloc_locals_loop);
132
147
  __ push(kScratchRegister);
133
- __ decl(cnt.reg());
148
+ if (is_uint8(count)) {
149
+ __ decb(cnt.reg());
150
+ } else {
151
+ __ decl(cnt.reg());
152
+ }
134
153
  __ j(not_zero, &alloc_locals_loop);
154
+ #ifdef DEBUG
155
+ CHECK(masm()->SizeOfCodeGeneratedSince(&loop_size) < kLocalVarBound);
156
+ #endif
135
157
  }
136
158
  for (int i = 0; i < count; i++) {
137
159
  elements_.Add(initial_value);
@@ -959,107 +981,208 @@ void VirtualFrame::SyncRange(int begin, int end) {
959
981
  // Sync elements below the range if they have not been materialized
960
982
  // on the stack.
961
983
  int start = Min(begin, stack_pointer_ + 1);
984
+ int end_or_stack_pointer = Min(stack_pointer_, end);
985
+ // Emit normal push instructions for elements above stack pointer
986
+ // and use mov instructions if we are below stack pointer.
987
+ int i = start;
962
988
 
963
- // If positive we have to adjust the stack pointer.
964
- int delta = end - stack_pointer_;
965
- if (delta > 0) {
966
- stack_pointer_ = end;
967
- __ subq(rsp, Immediate(delta * kPointerSize));
968
- }
969
-
970
- for (int i = start; i <= end; i++) {
989
+ while (i <= end_or_stack_pointer) {
971
990
  if (!elements_[i].is_synced()) SyncElementBelowStackPointer(i);
991
+ i++;
992
+ }
993
+ while (i <= end) {
994
+ SyncElementByPushing(i);
995
+ i++;
972
996
  }
973
997
  }
974
998
 
975
999
 
976
- Result VirtualFrame::InvokeBuiltin(Builtins::JavaScript id,
977
- InvokeFlag flag,
978
- int arg_count) {
1000
+ //------------------------------------------------------------------------------
1001
+ // Virtual frame stub and IC calling functions.
1002
+
1003
+ Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) {
979
1004
  PrepareForCall(arg_count, arg_count);
980
1005
  ASSERT(cgen()->HasValidEntryRegisters());
981
- __ InvokeBuiltin(id, flag);
1006
+ __ CallRuntime(f, arg_count);
982
1007
  Result result = cgen()->allocator()->Allocate(rax);
983
1008
  ASSERT(result.is_valid());
984
1009
  return result;
985
1010
  }
986
1011
 
987
1012
 
988
- //------------------------------------------------------------------------------
989
- // Virtual frame stub and IC calling functions.
990
-
991
- Result VirtualFrame::RawCallCodeObject(Handle<Code> code,
992
- RelocInfo::Mode rmode) {
1013
+ Result VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) {
1014
+ PrepareForCall(arg_count, arg_count);
993
1015
  ASSERT(cgen()->HasValidEntryRegisters());
994
- __ Call(code, rmode);
1016
+ __ CallRuntime(id, arg_count);
995
1017
  Result result = cgen()->allocator()->Allocate(rax);
996
1018
  ASSERT(result.is_valid());
997
1019
  return result;
998
1020
  }
999
1021
 
1000
1022
 
1001
- Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) {
1002
- PrepareForCall(arg_count, arg_count);
1023
+ #ifdef ENABLE_DEBUGGER_SUPPORT
1024
+ void VirtualFrame::DebugBreak() {
1025
+ PrepareForCall(0, 0);
1003
1026
  ASSERT(cgen()->HasValidEntryRegisters());
1004
- __ CallRuntime(f, arg_count);
1027
+ __ DebugBreak();
1005
1028
  Result result = cgen()->allocator()->Allocate(rax);
1006
1029
  ASSERT(result.is_valid());
1007
- return result;
1008
1030
  }
1031
+ #endif
1009
1032
 
1010
1033
 
1011
- Result VirtualFrame::CallRuntime(Runtime::FunctionId id, int arg_count) {
1034
+ Result VirtualFrame::InvokeBuiltin(Builtins::JavaScript id,
1035
+ InvokeFlag flag,
1036
+ int arg_count) {
1012
1037
  PrepareForCall(arg_count, arg_count);
1013
1038
  ASSERT(cgen()->HasValidEntryRegisters());
1014
- __ CallRuntime(id, arg_count);
1039
+ __ InvokeBuiltin(id, flag);
1015
1040
  Result result = cgen()->allocator()->Allocate(rax);
1016
1041
  ASSERT(result.is_valid());
1017
1042
  return result;
1018
1043
  }
1019
1044
 
1020
1045
 
1021
- #ifdef ENABLE_DEBUGGER_SUPPORT
1022
- void VirtualFrame::DebugBreak() {
1023
- PrepareForCall(0, 0);
1046
+ Result VirtualFrame::RawCallCodeObject(Handle<Code> code,
1047
+ RelocInfo::Mode rmode) {
1024
1048
  ASSERT(cgen()->HasValidEntryRegisters());
1025
- __ DebugBreak();
1049
+ __ Call(code, rmode);
1026
1050
  Result result = cgen()->allocator()->Allocate(rax);
1027
1051
  ASSERT(result.is_valid());
1052
+ return result;
1053
+ }
1054
+
1055
+
1056
+ // This function assumes that the only results that could be in a_reg or b_reg
1057
+ // are a and b. Other results can be live, but must not be in a_reg or b_reg.
1058
+ void VirtualFrame::MoveResultsToRegisters(Result* a,
1059
+ Result* b,
1060
+ Register a_reg,
1061
+ Register b_reg) {
1062
+ ASSERT(!a_reg.is(b_reg));
1063
+ // Assert that cgen()->allocator()->count(a_reg) is accounted for by a and b.
1064
+ ASSERT(cgen()->allocator()->count(a_reg) <= 2);
1065
+ ASSERT(cgen()->allocator()->count(a_reg) != 2 || a->reg().is(a_reg));
1066
+ ASSERT(cgen()->allocator()->count(a_reg) != 2 || b->reg().is(a_reg));
1067
+ ASSERT(cgen()->allocator()->count(a_reg) != 1 ||
1068
+ (a->is_register() && a->reg().is(a_reg)) ||
1069
+ (b->is_register() && b->reg().is(a_reg)));
1070
+ // Assert that cgen()->allocator()->count(b_reg) is accounted for by a and b.
1071
+ ASSERT(cgen()->allocator()->count(b_reg) <= 2);
1072
+ ASSERT(cgen()->allocator()->count(b_reg) != 2 || a->reg().is(b_reg));
1073
+ ASSERT(cgen()->allocator()->count(b_reg) != 2 || b->reg().is(b_reg));
1074
+ ASSERT(cgen()->allocator()->count(b_reg) != 1 ||
1075
+ (a->is_register() && a->reg().is(b_reg)) ||
1076
+ (b->is_register() && b->reg().is(b_reg)));
1077
+
1078
+ if (a->is_register() && a->reg().is(a_reg)) {
1079
+ b->ToRegister(b_reg);
1080
+ } else if (!cgen()->allocator()->is_used(a_reg)) {
1081
+ a->ToRegister(a_reg);
1082
+ b->ToRegister(b_reg);
1083
+ } else if (cgen()->allocator()->is_used(b_reg)) {
1084
+ // a must be in b_reg, b in a_reg.
1085
+ __ xchg(a_reg, b_reg);
1086
+ // Results a and b will be invalidated, so it is ok if they are switched.
1087
+ } else {
1088
+ b->ToRegister(b_reg);
1089
+ a->ToRegister(a_reg);
1090
+ }
1091
+ a->Unuse();
1092
+ b->Unuse();
1028
1093
  }
1029
- #endif
1030
1094
 
1031
1095
 
1032
1096
  Result VirtualFrame::CallLoadIC(RelocInfo::Mode mode) {
1033
- // Name and receiver are on the top of the frame. The IC expects
1034
- // name in rcx and receiver on the stack. It does not drop the
1035
- // receiver.
1097
+ // Name and receiver are on the top of the frame. Both are dropped.
1098
+ // The IC expects name in rcx and receiver in rax.
1036
1099
  Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
1037
1100
  Result name = Pop();
1038
- PrepareForCall(1, 0); // One stack arg, not callee-dropped.
1039
- name.ToRegister(rcx);
1040
- name.Unuse();
1101
+ Result receiver = Pop();
1102
+ PrepareForCall(0, 0);
1103
+ MoveResultsToRegisters(&name, &receiver, rcx, rax);
1104
+
1041
1105
  return RawCallCodeObject(ic, mode);
1042
1106
  }
1043
1107
 
1044
1108
 
1045
1109
  Result VirtualFrame::CallKeyedLoadIC(RelocInfo::Mode mode) {
1046
- // Key and receiver are on top of the frame. The IC expects them on
1047
- // the stack. It does not drop them.
1110
+ // Key and receiver are on top of the frame. Put them in rax and rdx.
1111
+ Result key = Pop();
1112
+ Result receiver = Pop();
1113
+ PrepareForCall(0, 0);
1114
+ MoveResultsToRegisters(&key, &receiver, rax, rdx);
1115
+
1048
1116
  Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
1049
- PrepareForCall(2, 0); // Two stack args, neither callee-dropped.
1050
1117
  return RawCallCodeObject(ic, mode);
1051
1118
  }
1052
1119
 
1053
1120
 
1121
+ Result VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) {
1122
+ // Value and (if not contextual) receiver are on top of the frame.
1123
+ // The IC expects name in rcx, value in rax, and receiver in rdx.
1124
+ Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
1125
+ Result value = Pop();
1126
+ if (is_contextual) {
1127
+ PrepareForCall(0, 0);
1128
+ value.ToRegister(rax);
1129
+ __ movq(rdx, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)));
1130
+ value.Unuse();
1131
+ } else {
1132
+ Result receiver = Pop();
1133
+ PrepareForCall(0, 0);
1134
+ MoveResultsToRegisters(&value, &receiver, rax, rdx);
1135
+ }
1136
+ __ Move(rcx, name);
1137
+ return RawCallCodeObject(ic, RelocInfo::CODE_TARGET);
1138
+ }
1139
+
1140
+
1054
1141
  Result VirtualFrame::CallKeyedStoreIC() {
1055
1142
  // Value, key, and receiver are on the top of the frame. The IC
1056
- // expects value in rax and key and receiver on the stack. It does
1057
- // not drop the key and receiver.
1058
- Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
1143
+ // expects value in rax, key in rcx, and receiver in rdx.
1059
1144
  Result value = Pop();
1060
- PrepareForCall(2, 0); // Two stack args, neither callee-dropped.
1061
- value.ToRegister(rax);
1062
- value.Unuse();
1145
+ Result key = Pop();
1146
+ Result receiver = Pop();
1147
+ PrepareForCall(0, 0);
1148
+ if (!cgen()->allocator()->is_used(rax) ||
1149
+ (value.is_register() && value.reg().is(rax))) {
1150
+ if (!cgen()->allocator()->is_used(rax)) {
1151
+ value.ToRegister(rax);
1152
+ }
1153
+ MoveResultsToRegisters(&key, &receiver, rcx, rdx);
1154
+ value.Unuse();
1155
+ } else if (!cgen()->allocator()->is_used(rcx) ||
1156
+ (key.is_register() && key.reg().is(rcx))) {
1157
+ if (!cgen()->allocator()->is_used(rcx)) {
1158
+ key.ToRegister(rcx);
1159
+ }
1160
+ MoveResultsToRegisters(&value, &receiver, rax, rdx);
1161
+ key.Unuse();
1162
+ } else if (!cgen()->allocator()->is_used(rdx) ||
1163
+ (receiver.is_register() && receiver.reg().is(rdx))) {
1164
+ if (!cgen()->allocator()->is_used(rdx)) {
1165
+ receiver.ToRegister(rdx);
1166
+ }
1167
+ MoveResultsToRegisters(&key, &value, rcx, rax);
1168
+ receiver.Unuse();
1169
+ } else {
1170
+ // All three registers are used, and no value is in the correct place.
1171
+ // We have one of the two circular permutations of rax, rcx, rdx.
1172
+ ASSERT(value.is_register());
1173
+ if (value.reg().is(rcx)) {
1174
+ __ xchg(rax, rdx);
1175
+ __ xchg(rax, rcx);
1176
+ } else {
1177
+ __ xchg(rax, rcx);
1178
+ __ xchg(rax, rdx);
1179
+ }
1180
+ value.Unuse();
1181
+ key.Unuse();
1182
+ receiver.Unuse();
1183
+ }
1184
+
1185
+ Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
1063
1186
  return RawCallCodeObject(ic, RelocInfo::CODE_TARGET);
1064
1187
  }
1065
1188
 
@@ -1082,6 +1205,25 @@ Result VirtualFrame::CallCallIC(RelocInfo::Mode mode,
1082
1205
  }
1083
1206
 
1084
1207
 
1208
+ Result VirtualFrame::CallKeyedCallIC(RelocInfo::Mode mode,
1209
+ int arg_count,
1210
+ int loop_nesting) {
1211
+ // Function name, arguments, and receiver are found on top of the frame
1212
+ // and dropped by the call. The IC expects the name in rcx and the rest
1213
+ // on the stack, and drops them all.
1214
+ InLoopFlag in_loop = loop_nesting > 0 ? IN_LOOP : NOT_IN_LOOP;
1215
+ Handle<Code> ic =
1216
+ cgen()->ComputeKeyedCallInitialize(arg_count, in_loop);
1217
+ Result name = Pop();
1218
+ // Spill args, receiver, and function. The call will drop args and
1219
+ // receiver.
1220
+ PrepareForCall(arg_count + 1, arg_count + 1);
1221
+ name.ToRegister(rcx);
1222
+ name.Unuse();
1223
+ return RawCallCodeObject(ic, mode);
1224
+ }
1225
+
1226
+
1085
1227
  Result VirtualFrame::CallConstructor(int arg_count) {
1086
1228
  // Arguments, receiver, and function are on top of the frame. The
1087
1229
  // IC expects arg count in rax, function in rdi, and the arguments
@@ -1098,7 +1240,7 @@ Result VirtualFrame::CallConstructor(int arg_count) {
1098
1240
  // call trampolines per different arguments counts encountered.
1099
1241
  Result num_args = cgen()->allocator()->Allocate(rax);
1100
1242
  ASSERT(num_args.is_valid());
1101
- __ movq(num_args.reg(), Immediate(arg_count));
1243
+ __ Set(num_args.reg(), arg_count);
1102
1244
 
1103
1245
  function.Unuse();
1104
1246
  num_args.Unuse();
@@ -1106,51 +1248,6 @@ Result VirtualFrame::CallConstructor(int arg_count) {
1106
1248
  }
1107
1249
 
1108
1250
 
1109
- Result VirtualFrame::CallStoreIC() {
1110
- // Name, value, and receiver are on top of the frame. The IC
1111
- // expects name in rcx, value in rax, and receiver in edx.
1112
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
1113
- Result name = Pop();
1114
- Result value = Pop();
1115
- Result receiver = Pop();
1116
- PrepareForCall(0, 0);
1117
-
1118
- // Optimized for case in which name is a constant value.
1119
- if (name.is_register() && (name.reg().is(rdx) || name.reg().is(rax))) {
1120
- if (!is_used(rcx)) {
1121
- name.ToRegister(rcx);
1122
- } else if (!is_used(rbx)) {
1123
- name.ToRegister(rbx);
1124
- } else {
1125
- ASSERT(!is_used(rdi)); // Only three results are live, so rdi is free.
1126
- name.ToRegister(rdi);
1127
- }
1128
- }
1129
- // Now name is not in edx or eax, so we can fix them, then move name to ecx.
1130
- if (value.is_register() && value.reg().is(rdx)) {
1131
- if (receiver.is_register() && receiver.reg().is(rax)) {
1132
- // Wrong registers.
1133
- __ xchg(rax, rdx);
1134
- } else {
1135
- // Register rax is free for value, which frees rcx for receiver.
1136
- value.ToRegister(rax);
1137
- receiver.ToRegister(rdx);
1138
- }
1139
- } else {
1140
- // Register rcx is free for receiver, which guarantees rax is free for
1141
- // value.
1142
- receiver.ToRegister(rdx);
1143
- value.ToRegister(rax);
1144
- }
1145
- // Receiver and value are in the right place, so rcx is free for name.
1146
- name.ToRegister(rcx);
1147
- name.Unuse();
1148
- value.Unuse();
1149
- receiver.Unuse();
1150
- return RawCallCodeObject(ic, RelocInfo::CODE_TARGET);
1151
- }
1152
-
1153
-
1154
1251
  void VirtualFrame::PushTryHandler(HandlerType type) {
1155
1252
  ASSERT(cgen()->HasValidEntryRegisters());
1156
1253
  // Grow the expression stack by handler size less one (the return
@@ -1163,3 +1260,5 @@ void VirtualFrame::PushTryHandler(HandlerType type) {
1163
1260
  #undef __
1164
1261
 
1165
1262
  } } // namespace v8::internal
1263
+
1264
+ #endif // V8_TARGET_ARCH_X64
@@ -31,6 +31,7 @@
31
31
  #include "type-info.h"
32
32
  #include "register-allocator.h"
33
33
  #include "scopes.h"
34
+ #include "codegen.h"
34
35
 
35
36
  namespace v8 {
36
37
  namespace internal {
@@ -98,23 +99,16 @@ class VirtualFrame : public ZoneObject {
98
99
  return register_locations_[num];
99
100
  }
100
101
 
101
- int register_location(Register reg) {
102
- return register_locations_[RegisterAllocator::ToNumber(reg)];
103
- }
102
+ inline int register_location(Register reg);
104
103
 
105
- void set_register_location(Register reg, int index) {
106
- register_locations_[RegisterAllocator::ToNumber(reg)] = index;
107
- }
104
+ inline void set_register_location(Register reg, int index);
108
105
 
109
106
  bool is_used(int num) {
110
107
  ASSERT(num >= 0 && num < RegisterAllocator::kNumRegisters);
111
108
  return register_locations_[num] != kIllegalIndex;
112
109
  }
113
110
 
114
- bool is_used(Register reg) {
115
- return register_locations_[RegisterAllocator::ToNumber(reg)]
116
- != kIllegalIndex;
117
- }
111
+ inline bool is_used(Register reg);
118
112
 
119
113
  // Add extra in-memory elements to the top of the frame to match an actual
120
114
  // frame (eg, the frame after an exception handler is pushed). No code is
@@ -151,6 +145,9 @@ class VirtualFrame : public ZoneObject {
151
145
  // (ie, they all have frame-external references).
152
146
  Register SpillAnyRegister();
153
147
 
148
+ // Spill the top element of the frame to memory.
149
+ void SpillTop() { SpillElementAt(element_count() - 1); }
150
+
154
151
  // Sync the range of elements in [begin, end] with memory.
155
152
  void SyncRange(int begin, int end);
156
153
 
@@ -203,7 +200,7 @@ class VirtualFrame : public ZoneObject {
203
200
  inline void PrepareForReturn();
204
201
 
205
202
  // Number of local variables after when we use a loop for allocating.
206
- static const int kLocalVarBound = 7;
203
+ static const int kLocalVarBound = 14;
207
204
 
208
205
  // Allocate and initialize the frame-allocated locals.
209
206
  void AllocateStackSlots();
@@ -218,10 +215,7 @@ class VirtualFrame : public ZoneObject {
218
215
  void SetElementAt(int index, Result* value);
219
216
 
220
217
  // Set a frame element to a constant. The index is frame-top relative.
221
- void SetElementAt(int index, Handle<Object> value) {
222
- Result temp(value);
223
- SetElementAt(index, &temp);
224
- }
218
+ inline void SetElementAt(int index, Handle<Object> value);
225
219
 
226
220
  void PushElementAt(int index) {
227
221
  PushFrameSlotAt(element_count() - index - 1);
@@ -302,10 +296,7 @@ class VirtualFrame : public ZoneObject {
302
296
 
303
297
  // Call stub given the number of arguments it expects on (and
304
298
  // removes from) the stack.
305
- Result CallStub(CodeStub* stub, int arg_count) {
306
- PrepareForCall(arg_count, arg_count);
307
- return RawCallStub(stub);
308
- }
299
+ inline Result CallStub(CodeStub* stub, int arg_count);
309
300
 
310
301
  // Call stub that takes a single argument passed in eax. The
311
302
  // argument is given as a result which does not have to be eax or
@@ -338,19 +329,19 @@ class VirtualFrame : public ZoneObject {
338
329
  int arg_count);
339
330
 
340
331
  // Call load IC. Name and receiver are found on top of the frame.
341
- // Receiver is not dropped.
332
+ // Both are dropped.
342
333
  Result CallLoadIC(RelocInfo::Mode mode);
343
334
 
344
335
  // Call keyed load IC. Key and receiver are found on top of the
345
- // frame. They are not dropped.
336
+ // frame. Both are dropped.
346
337
  Result CallKeyedLoadIC(RelocInfo::Mode mode);
347
338
 
348
- // Call store IC. Name, value, and receiver are found on top of the
349
- // frame. Receiver is not dropped.
350
- Result CallStoreIC();
339
+ // Call store IC. If the load is contextual, value is found on top of the
340
+ // frame. If not, value and receiver are on the frame. Both are dropped.
341
+ Result CallStoreIC(Handle<String> name, bool is_contextual);
351
342
 
352
343
  // Call keyed store IC. Value, key, and receiver are found on top
353
- // of the frame. Key and receiver are not dropped.
344
+ // of the frame. All three are dropped.
354
345
  Result CallKeyedStoreIC();
355
346
 
356
347
  // Call call IC. Function name, arguments, and receiver are found on top
@@ -358,6 +349,9 @@ class VirtualFrame : public ZoneObject {
358
349
  // The argument count does not include the receiver.
359
350
  Result CallCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting);
360
351
 
352
+ // Call keyed call IC. Same calling convention as CallCallIC.
353
+ Result CallKeyedCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting);
354
+
361
355
  // Allocate and call JS function as constructor. Arguments,
362
356
  // receiver (global object), and function are found on top of the
363
357
  // frame. Function is not dropped. The argument count does not
@@ -375,6 +369,13 @@ class VirtualFrame : public ZoneObject {
375
369
  // Duplicate the top element of the frame.
376
370
  void Dup() { PushFrameSlotAt(element_count() - 1); }
377
371
 
372
+ // Duplicate the n'th element from the top of the frame.
373
+ // Dup(1) is equivalent to Dup().
374
+ void Dup(int n) {
375
+ ASSERT(n > 0);
376
+ PushFrameSlotAt(element_count() - n);
377
+ }
378
+
378
379
  // Pop an element from the top of the expression stack. Returns a
379
380
  // Result, which may be a constant or a register.
380
381
  Result Pop();
@@ -446,8 +447,8 @@ class VirtualFrame : public ZoneObject {
446
447
  int register_locations_[RegisterAllocator::kNumRegisters];
447
448
 
448
449
  // The number of frame-allocated locals and parameters respectively.
449
- int parameter_count() { return cgen()->scope()->num_parameters(); }
450
- int local_count() { return cgen()->scope()->num_stack_slots(); }
450
+ inline int parameter_count();
451
+ inline int local_count();
451
452
 
452
453
  // The index of the element that is at the processor's frame pointer
453
454
  // (the ebp register). The parameters, receiver, and return address
@@ -560,6 +561,14 @@ class VirtualFrame : public ZoneObject {
560
561
  // Register counts are correctly updated.
561
562
  int InvalidateFrameSlotAt(int index);
562
563
 
564
+ // This function assumes that a and b are the only results that could be in
565
+ // the registers a_reg or b_reg. Other results can be live, but must not
566
+ // be in the registers a_reg or b_reg. The results a and b are invalidated.
567
+ void MoveResultsToRegisters(Result* a,
568
+ Result* b,
569
+ Register a_reg,
570
+ Register b_reg);
571
+
563
572
  // Call a code stub that has already been prepared for calling (via
564
573
  // PrepareForCall).
565
574
  Result RawCallStub(CodeStub* stub);
@@ -571,7 +580,7 @@ class VirtualFrame : public ZoneObject {
571
580
  inline bool Equals(VirtualFrame* other);
572
581
 
573
582
  // Classes that need raw access to the elements_ array.
574
- friend class DeferredCode;
583
+ friend class FrameRegisterState;
575
584
  friend class JumpTarget;
576
585
  };
577
586