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
@@ -28,42 +28,143 @@
28
28
  #ifndef V8_VIRTUAL_FRAME_LIGHT_INL_H_
29
29
  #define V8_VIRTUAL_FRAME_LIGHT_INL_H_
30
30
 
31
- #include "type-info.h"
31
+ #include "codegen.h"
32
32
  #include "register-allocator.h"
33
33
  #include "scopes.h"
34
+ #include "type-info.h"
35
+
36
+ #include "codegen-inl.h"
37
+ #include "jump-target-light-inl.h"
34
38
 
35
39
  namespace v8 {
36
40
  namespace internal {
37
41
 
42
+ VirtualFrame::VirtualFrame(InvalidVirtualFrameInitializer* dummy)
43
+ : element_count_(0),
44
+ top_of_stack_state_(NO_TOS_REGISTERS),
45
+ register_allocation_map_(0),
46
+ tos_known_smi_map_(0) { }
47
+
48
+
38
49
  // On entry to a function, the virtual frame already contains the receiver,
39
50
  // the parameters, and a return address. All frame elements are in memory.
40
51
  VirtualFrame::VirtualFrame()
41
52
  : element_count_(parameter_count() + 2),
42
53
  top_of_stack_state_(NO_TOS_REGISTERS),
43
- register_allocation_map_(0) { }
54
+ register_allocation_map_(0),
55
+ tos_known_smi_map_(0) { }
44
56
 
45
57
 
46
58
  // When cloned, a frame is a deep copy of the original.
47
59
  VirtualFrame::VirtualFrame(VirtualFrame* original)
48
60
  : element_count_(original->element_count()),
49
61
  top_of_stack_state_(original->top_of_stack_state_),
50
- register_allocation_map_(original->register_allocation_map_) { }
62
+ register_allocation_map_(original->register_allocation_map_),
63
+ tos_known_smi_map_(0) { }
51
64
 
52
65
 
53
- bool VirtualFrame::Equals(VirtualFrame* other) {
66
+ bool VirtualFrame::Equals(const VirtualFrame* other) {
54
67
  ASSERT(element_count() == other->element_count());
55
68
  if (top_of_stack_state_ != other->top_of_stack_state_) return false;
56
69
  if (register_allocation_map_ != other->register_allocation_map_) return false;
70
+ if (tos_known_smi_map_ != other->tos_known_smi_map_) return false;
57
71
 
58
72
  return true;
59
73
  }
60
74
 
61
75
 
62
76
  void VirtualFrame::PrepareForReturn() {
63
- SpillAll();
77
+ // Don't bother flushing tos registers as returning does not require more
78
+ // access to the expression stack.
79
+ top_of_stack_state_ = NO_TOS_REGISTERS;
80
+ }
81
+
82
+
83
+ VirtualFrame::RegisterAllocationScope::RegisterAllocationScope(
84
+ CodeGenerator* cgen)
85
+ : cgen_(cgen),
86
+ old_is_spilled_(SpilledScope::is_spilled_) {
87
+ SpilledScope::is_spilled_ = false;
88
+ if (old_is_spilled_) {
89
+ VirtualFrame* frame = cgen->frame();
90
+ if (frame != NULL) {
91
+ frame->AssertIsSpilled();
92
+ }
93
+ }
94
+ }
95
+
96
+
97
+ VirtualFrame::RegisterAllocationScope::~RegisterAllocationScope() {
98
+ SpilledScope::is_spilled_ = old_is_spilled_;
99
+ if (old_is_spilled_) {
100
+ VirtualFrame* frame = cgen_->frame();
101
+ if (frame != NULL) {
102
+ frame->SpillAll();
103
+ }
104
+ }
105
+ }
106
+
107
+
108
+ CodeGenerator* VirtualFrame::cgen() const {
109
+ return CodeGeneratorScope::Current();
110
+ }
111
+
112
+
113
+ MacroAssembler* VirtualFrame::masm() { return cgen()->masm(); }
114
+
115
+
116
+ void VirtualFrame::CallStub(CodeStub* stub, int arg_count) {
117
+ if (arg_count != 0) Forget(arg_count);
118
+ ASSERT(cgen()->HasValidEntryRegisters());
119
+ masm()->CallStub(stub);
120
+ }
121
+
122
+
123
+ int VirtualFrame::parameter_count() const {
124
+ return cgen()->scope()->num_parameters();
64
125
  }
65
126
 
66
127
 
128
+ int VirtualFrame::local_count() const {
129
+ return cgen()->scope()->num_stack_slots();
130
+ }
131
+
132
+
133
+ int VirtualFrame::frame_pointer() const { return parameter_count() + 3; }
134
+
135
+
136
+ int VirtualFrame::context_index() { return frame_pointer() - 1; }
137
+
138
+
139
+ int VirtualFrame::function_index() { return frame_pointer() - 2; }
140
+
141
+
142
+ int VirtualFrame::local0_index() const { return frame_pointer() + 2; }
143
+
144
+
145
+ int VirtualFrame::fp_relative(int index) {
146
+ ASSERT(index < element_count());
147
+ ASSERT(frame_pointer() < element_count()); // FP is on the frame.
148
+ return (frame_pointer() - index) * kPointerSize;
149
+ }
150
+
151
+
152
+ int VirtualFrame::expression_base_index() const {
153
+ return local0_index() + local_count();
154
+ }
155
+
156
+
157
+ int VirtualFrame::height() const {
158
+ return element_count() - expression_base_index();
159
+ }
160
+
161
+
162
+ MemOperand VirtualFrame::LocalAt(int index) {
163
+ ASSERT(0 <= index);
164
+ ASSERT(index < local_count());
165
+ return MemOperand(fp, kLocal0Offset - index * kPointerSize);
166
+ }
167
+
67
168
  } } // namespace v8::internal
68
169
 
69
170
  #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_
@@ -36,7 +36,7 @@ namespace internal {
36
36
 
37
37
  void VirtualFrame::Adjust(int count) {
38
38
  ASSERT(count >= 0);
39
- element_count_ += count;
39
+ RaiseHeight(count, 0);
40
40
  }
41
41
 
42
42
 
@@ -46,4 +46,7 @@ Register VirtualFrame::SpillAnyRegister() {
46
46
  return no_reg;
47
47
  }
48
48
 
49
+
50
+ InvalidVirtualFrameInitializer* kInvalidVirtualFrameInitializer = NULL;
51
+
49
52
  } } // namespace v8::internal
@@ -74,8 +74,10 @@ VMState::VMState(StateTag state)
74
74
  if (state == EXTERNAL) state = OTHER;
75
75
  #endif
76
76
  state_ = state;
77
- previous_ = current_state_; // Save the previous state.
78
- current_state_ = this; // Install the new state.
77
+ // Save the previous state.
78
+ previous_ = reinterpret_cast<VMState*>(current_state_);
79
+ // Install the new state.
80
+ OS::ReleaseStore(&current_state_, reinterpret_cast<AtomicWord>(this));
79
81
 
80
82
  #ifdef ENABLE_LOGGING_AND_PROFILING
81
83
  if (FLAG_log_state_changes) {
@@ -103,7 +105,8 @@ VMState::VMState(StateTag state)
103
105
 
104
106
  VMState::~VMState() {
105
107
  if (disabled_) return;
106
- current_state_ = previous_; // Return to the previous state.
108
+ // Return to the previous state.
109
+ OS::ReleaseStore(&current_state_, reinterpret_cast<AtomicWord>(previous_));
107
110
 
108
111
  #ifdef ENABLE_LOGGING_AND_PROFILING
109
112
  if (FLAG_log_state_changes) {
@@ -33,7 +33,7 @@ namespace v8 {
33
33
  namespace internal {
34
34
 
35
35
  #ifdef ENABLE_VMSTATE_TRACKING
36
- VMState* VMState::current_state_ = NULL;
36
+ AtomicWord VMState::current_state_ = 0;
37
37
  #endif
38
38
 
39
39
  } } // namespace v8::internal
@@ -44,15 +44,17 @@ class VMState BASE_EMBEDDED {
44
44
 
45
45
  // Used for debug asserts.
46
46
  static bool is_outermost_external() {
47
- return current_state_ == NULL;
47
+ return current_state_ == 0;
48
48
  }
49
49
 
50
50
  static StateTag current_state() {
51
- return current_state_ ? current_state_->state() : EXTERNAL;
51
+ VMState* state = reinterpret_cast<VMState*>(current_state_);
52
+ return state ? state->state() : EXTERNAL;
52
53
  }
53
54
 
54
55
  static Address external_callback() {
55
- return current_state_ ? current_state_->external_callback_ : NULL;
56
+ VMState* state = reinterpret_cast<VMState*>(current_state_);
57
+ return state ? state->external_callback_ : NULL;
56
58
  }
57
59
 
58
60
  private:
@@ -62,7 +64,7 @@ class VMState BASE_EMBEDDED {
62
64
  Address external_callback_;
63
65
 
64
66
  // A stack of VM states.
65
- static VMState* current_state_;
67
+ static AtomicWord current_state_;
66
68
  #else
67
69
  public:
68
70
  explicit VMState(StateTag state) {}
@@ -29,21 +29,17 @@
29
29
  #define V8_X64_ASSEMBLER_X64_INL_H_
30
30
 
31
31
  #include "cpu.h"
32
+ #include "debug.h"
32
33
  #include "memory.h"
33
34
 
34
35
  namespace v8 {
35
36
  namespace internal {
36
37
 
37
- Condition NegateCondition(Condition cc) {
38
- return static_cast<Condition>(cc ^ 1);
39
- }
40
-
41
38
 
42
39
  // -----------------------------------------------------------------------------
43
40
  // Implementation of Assembler
44
41
 
45
42
 
46
-
47
43
  void Assembler::emitl(uint32_t x) {
48
44
  Memory::uint32_at(pc_) = x;
49
45
  pc_ += sizeof(uint32_t);
@@ -209,6 +205,10 @@ void RelocInfo::apply(intptr_t delta) {
209
205
  // Special handling of js_return when a break point is set (call
210
206
  // instruction has been inserted).
211
207
  Memory::int32_at(pc_ + 1) -= static_cast<int32_t>(delta); // relocate entry
208
+ } else if (rmode_ == DEBUG_BREAK_SLOT && IsPatchedDebugBreakSlotSequence()) {
209
+ // Special handling of debug break slot when a break point is set (call
210
+ // instruction has been inserted).
211
+ Memory::int32_at(pc_ + 1) -= static_cast<int32_t>(delta); // relocate entry
212
212
  }
213
213
  }
214
214
 
@@ -229,6 +229,15 @@ Address RelocInfo::target_address_address() {
229
229
  }
230
230
 
231
231
 
232
+ int RelocInfo::target_address_size() {
233
+ if (IsCodedSpecially()) {
234
+ return Assembler::kCallTargetSize;
235
+ } else {
236
+ return Assembler::kExternalTargetSize;
237
+ }
238
+ }
239
+
240
+
232
241
  void RelocInfo::set_target_address(Address target) {
233
242
  ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
234
243
  if (IsCodeTarget(rmode_)) {
@@ -288,6 +297,11 @@ bool RelocInfo::IsPatchedReturnSequence() {
288
297
  }
289
298
 
290
299
 
300
+ bool RelocInfo::IsPatchedDebugBreakSlotSequence() {
301
+ return !Assembler::IsNop(pc());
302
+ }
303
+
304
+
291
305
  Address RelocInfo::call_address() {
292
306
  ASSERT(IsPatchedReturnSequence());
293
307
  return Memory::Address_at(
@@ -320,6 +334,29 @@ Object** RelocInfo::call_object_address() {
320
334
  pc_ + Assembler::kPatchReturnSequenceAddressOffset);
321
335
  }
322
336
 
337
+
338
+ void RelocInfo::Visit(ObjectVisitor* visitor) {
339
+ RelocInfo::Mode mode = rmode();
340
+ if (mode == RelocInfo::EMBEDDED_OBJECT) {
341
+ visitor->VisitPointer(target_object_address());
342
+ } else if (RelocInfo::IsCodeTarget(mode)) {
343
+ visitor->VisitCodeTarget(this);
344
+ } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
345
+ visitor->VisitExternalReference(target_reference_address());
346
+ #ifdef ENABLE_DEBUGGER_SUPPORT
347
+ } else if (Debug::has_break_points() &&
348
+ ((RelocInfo::IsJSReturn(mode) &&
349
+ IsPatchedReturnSequence()) ||
350
+ (RelocInfo::IsDebugBreakSlot(mode) &&
351
+ IsPatchedDebugBreakSlotSequence()))) {
352
+ visitor->VisitDebugTarget(this);
353
+ #endif
354
+ } else if (mode == RelocInfo::RUNTIME_ENTRY) {
355
+ visitor->VisitRuntimeEntry(this);
356
+ }
357
+ }
358
+
359
+
323
360
  // -----------------------------------------------------------------------------
324
361
  // Implementation of Operand
325
362
 
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_X64)
31
+
30
32
  #include "macro-assembler.h"
31
33
  #include "serialize.h"
32
34
 
@@ -117,7 +119,6 @@ void CpuFeatures::Probe() {
117
119
  CodeDesc desc;
118
120
  assm.GetCode(&desc);
119
121
  Object* code = Heap::CreateCode(desc,
120
- NULL,
121
122
  Code::ComputeFlags(Code::STUB),
122
123
  Handle<Object>());
123
124
  if (!code->IsCode()) return;
@@ -237,6 +238,52 @@ Operand::Operand(Register index,
237
238
  }
238
239
 
239
240
 
241
+ Operand::Operand(const Operand& operand, int32_t offset) {
242
+ ASSERT(operand.len_ >= 1);
243
+ // Operand encodes REX ModR/M [SIB] [Disp].
244
+ byte modrm = operand.buf_[0];
245
+ ASSERT(modrm < 0xC0); // Disallow mode 3 (register target).
246
+ bool has_sib = ((modrm & 0x07) == 0x04);
247
+ byte mode = modrm & 0xC0;
248
+ int disp_offset = has_sib ? 2 : 1;
249
+ int base_reg = (has_sib ? operand.buf_[1] : modrm) & 0x07;
250
+ // Mode 0 with rbp/r13 as ModR/M or SIB base register always has a 32-bit
251
+ // displacement.
252
+ bool is_baseless = (mode == 0) && (base_reg == 0x05); // No base or RIP base.
253
+ int32_t disp_value = 0;
254
+ if (mode == 0x80 || is_baseless) {
255
+ // Mode 2 or mode 0 with rbp/r13 as base: Word displacement.
256
+ disp_value = *reinterpret_cast<const int32_t*>(&operand.buf_[disp_offset]);
257
+ } else if (mode == 0x40) {
258
+ // Mode 1: Byte displacement.
259
+ disp_value = static_cast<signed char>(operand.buf_[disp_offset]);
260
+ }
261
+
262
+ // Write new operand with same registers, but with modified displacement.
263
+ ASSERT(offset >= 0 ? disp_value + offset > disp_value
264
+ : disp_value + offset < disp_value); // No overflow.
265
+ disp_value += offset;
266
+ rex_ = operand.rex_;
267
+ if (!is_int8(disp_value) || is_baseless) {
268
+ // Need 32 bits of displacement, mode 2 or mode 1 with register rbp/r13.
269
+ buf_[0] = (modrm & 0x3f) | (is_baseless ? 0x00 : 0x80);
270
+ len_ = disp_offset + 4;
271
+ Memory::int32_at(&buf_[disp_offset]) = disp_value;
272
+ } else if (disp_value != 0 || (base_reg == 0x05)) {
273
+ // Need 8 bits of displacement.
274
+ buf_[0] = (modrm & 0x3f) | 0x40; // Mode 1.
275
+ len_ = disp_offset + 1;
276
+ buf_[disp_offset] = static_cast<byte>(disp_value);
277
+ } else {
278
+ // Need no displacement.
279
+ buf_[0] = (modrm & 0x3f); // Mode 0.
280
+ len_ = disp_offset;
281
+ }
282
+ if (has_sib) {
283
+ buf_[1] = operand.buf_[1];
284
+ }
285
+ }
286
+
240
287
  // -----------------------------------------------------------------------------
241
288
  // Implementation of Assembler.
242
289
 
@@ -328,12 +375,22 @@ void Assembler::GetCode(CodeDesc* desc) {
328
375
 
329
376
  void Assembler::Align(int m) {
330
377
  ASSERT(IsPowerOf2(m));
331
- while ((pc_offset() & (m - 1)) != 0) {
332
- nop();
378
+ int delta = (m - (pc_offset() & (m - 1))) & (m - 1);
379
+ while (delta >= 9) {
380
+ nop(9);
381
+ delta -= 9;
382
+ }
383
+ if (delta > 0) {
384
+ nop(delta);
333
385
  }
334
386
  }
335
387
 
336
388
 
389
+ void Assembler::CodeTargetAlign() {
390
+ Align(16); // Preferred alignment of jump targets on x64.
391
+ }
392
+
393
+
337
394
  void Assembler::bind_to(Label* L, int pos) {
338
395
  ASSERT(!L->is_bound()); // Label may only be bound once.
339
396
  last_pc_ = NULL;
@@ -458,19 +515,36 @@ void Assembler::arithmetic_op(byte opcode, Register reg, const Operand& op) {
458
515
  void Assembler::arithmetic_op(byte opcode, Register reg, Register rm_reg) {
459
516
  EnsureSpace ensure_space(this);
460
517
  last_pc_ = pc_;
461
- emit_rex_64(reg, rm_reg);
462
- emit(opcode);
463
- emit_modrm(reg, rm_reg);
518
+ ASSERT((opcode & 0xC6) == 2);
519
+ if (rm_reg.low_bits() == 4) { // Forces SIB byte.
520
+ // Swap reg and rm_reg and change opcode operand order.
521
+ emit_rex_64(rm_reg, reg);
522
+ emit(opcode ^ 0x02);
523
+ emit_modrm(rm_reg, reg);
524
+ } else {
525
+ emit_rex_64(reg, rm_reg);
526
+ emit(opcode);
527
+ emit_modrm(reg, rm_reg);
528
+ }
464
529
  }
465
530
 
466
531
 
467
532
  void Assembler::arithmetic_op_16(byte opcode, Register reg, Register rm_reg) {
468
533
  EnsureSpace ensure_space(this);
469
534
  last_pc_ = pc_;
470
- emit(0x66);
471
- emit_optional_rex_32(reg, rm_reg);
472
- emit(opcode);
473
- emit_modrm(reg, rm_reg);
535
+ ASSERT((opcode & 0xC6) == 2);
536
+ if (rm_reg.low_bits() == 4) { // Forces SIB byte.
537
+ // Swap reg and rm_reg and change opcode operand order.
538
+ emit(0x66);
539
+ emit_optional_rex_32(rm_reg, reg);
540
+ emit(opcode ^ 0x02);
541
+ emit_modrm(rm_reg, reg);
542
+ } else {
543
+ emit(0x66);
544
+ emit_optional_rex_32(reg, rm_reg);
545
+ emit(opcode);
546
+ emit_modrm(reg, rm_reg);
547
+ }
474
548
  }
475
549
 
476
550
 
@@ -489,9 +563,17 @@ void Assembler::arithmetic_op_16(byte opcode,
489
563
  void Assembler::arithmetic_op_32(byte opcode, Register reg, Register rm_reg) {
490
564
  EnsureSpace ensure_space(this);
491
565
  last_pc_ = pc_;
492
- emit_optional_rex_32(reg, rm_reg);
493
- emit(opcode);
494
- emit_modrm(reg, rm_reg);
566
+ ASSERT((opcode & 0xC6) == 2);
567
+ if (rm_reg.low_bits() == 4) { // Forces SIB byte.
568
+ // Swap reg and rm_reg and change opcode operand order.
569
+ emit_optional_rex_32(rm_reg, reg);
570
+ emit(opcode ^ 0x02); // E.g. 0x03 -> 0x01 for ADD.
571
+ emit_modrm(rm_reg, reg);
572
+ } else {
573
+ emit_optional_rex_32(reg, rm_reg);
574
+ emit(opcode);
575
+ emit_modrm(reg, rm_reg);
576
+ }
495
577
  }
496
578
 
497
579
 
@@ -759,9 +841,7 @@ void Assembler::call(Register adr) {
759
841
  EnsureSpace ensure_space(this);
760
842
  last_pc_ = pc_;
761
843
  // Opcode: FF /2 r64.
762
- if (adr.high_bit()) {
763
- emit_rex_64(adr);
764
- }
844
+ emit_optional_rex_32(adr);
765
845
  emit(0xFF);
766
846
  emit_modrm(0x2, adr);
767
847
  }
@@ -771,9 +851,9 @@ void Assembler::call(const Operand& op) {
771
851
  EnsureSpace ensure_space(this);
772
852
  last_pc_ = pc_;
773
853
  // Opcode: FF /2 m64.
774
- emit_rex_64(op);
854
+ emit_optional_rex_32(op);
775
855
  emit(0xFF);
776
- emit_operand(2, op);
856
+ emit_operand(0x2, op);
777
857
  }
778
858
 
779
859
 
@@ -1075,6 +1155,15 @@ void Assembler::incl(const Operand& dst) {
1075
1155
  }
1076
1156
 
1077
1157
 
1158
+ void Assembler::incl(Register dst) {
1159
+ EnsureSpace ensure_space(this);
1160
+ last_pc_ = pc_;
1161
+ emit_optional_rex_32(dst);
1162
+ emit(0xFF);
1163
+ emit_modrm(0, dst);
1164
+ }
1165
+
1166
+
1078
1167
  void Assembler::int3() {
1079
1168
  EnsureSpace ensure_space(this);
1080
1169
  last_pc_ = pc_;
@@ -1183,9 +1272,7 @@ void Assembler::jmp(Register target) {
1183
1272
  EnsureSpace ensure_space(this);
1184
1273
  last_pc_ = pc_;
1185
1274
  // Opcode FF/4 r64.
1186
- if (target.high_bit()) {
1187
- emit_rex_64(target);
1188
- }
1275
+ emit_optional_rex_32(target);
1189
1276
  emit(0xFF);
1190
1277
  emit_modrm(0x4, target);
1191
1278
  }
@@ -1290,9 +1377,15 @@ void Assembler::movl(Register dst, const Operand& src) {
1290
1377
  void Assembler::movl(Register dst, Register src) {
1291
1378
  EnsureSpace ensure_space(this);
1292
1379
  last_pc_ = pc_;
1293
- emit_optional_rex_32(dst, src);
1294
- emit(0x8B);
1295
- emit_modrm(dst, src);
1380
+ if (src.low_bits() == 4) {
1381
+ emit_optional_rex_32(src, dst);
1382
+ emit(0x89);
1383
+ emit_modrm(src, dst);
1384
+ } else {
1385
+ emit_optional_rex_32(dst, src);
1386
+ emit(0x8B);
1387
+ emit_modrm(dst, src);
1388
+ }
1296
1389
  }
1297
1390
 
1298
1391
 
@@ -1337,9 +1430,15 @@ void Assembler::movq(Register dst, const Operand& src) {
1337
1430
  void Assembler::movq(Register dst, Register src) {
1338
1431
  EnsureSpace ensure_space(this);
1339
1432
  last_pc_ = pc_;
1340
- emit_rex_64(dst, src);
1341
- emit(0x8B);
1342
- emit_modrm(dst, src);
1433
+ if (src.low_bits() == 4) {
1434
+ emit_rex_64(src, dst);
1435
+ emit(0x89);
1436
+ emit_modrm(src, dst);
1437
+ } else {
1438
+ emit_rex_64(dst, src);
1439
+ emit(0x8B);
1440
+ emit_modrm(dst, src);
1441
+ }
1343
1442
  }
1344
1443
 
1345
1444
 
@@ -1463,7 +1562,7 @@ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) {
1463
1562
  void Assembler::movsxbq(Register dst, const Operand& src) {
1464
1563
  EnsureSpace ensure_space(this);
1465
1564
  last_pc_ = pc_;
1466
- emit_rex_32(dst, src);
1565
+ emit_rex_64(dst, src);
1467
1566
  emit(0x0F);
1468
1567
  emit(0xBE);
1469
1568
  emit_operand(dst, src);
@@ -1501,7 +1600,7 @@ void Assembler::movsxlq(Register dst, const Operand& src) {
1501
1600
  void Assembler::movzxbq(Register dst, const Operand& src) {
1502
1601
  EnsureSpace ensure_space(this);
1503
1602
  last_pc_ = pc_;
1504
- emit_rex_64(dst, src);
1603
+ emit_optional_rex_32(dst, src);
1505
1604
  emit(0x0F);
1506
1605
  emit(0xB6);
1507
1606
  emit_operand(dst, src);
@@ -1521,7 +1620,7 @@ void Assembler::movzxbl(Register dst, const Operand& src) {
1521
1620
  void Assembler::movzxwq(Register dst, const Operand& src) {
1522
1621
  EnsureSpace ensure_space(this);
1523
1622
  last_pc_ = pc_;
1524
- emit_rex_64(dst, src);
1623
+ emit_optional_rex_32(dst, src);
1525
1624
  emit(0x0F);
1526
1625
  emit(0xB7);
1527
1626
  emit_operand(dst, src);
@@ -1732,9 +1831,7 @@ void Assembler::nop(int n) {
1732
1831
  void Assembler::pop(Register dst) {
1733
1832
  EnsureSpace ensure_space(this);
1734
1833
  last_pc_ = pc_;
1735
- if (dst.high_bit()) {
1736
- emit_rex_64(dst);
1737
- }
1834
+ emit_optional_rex_32(dst);
1738
1835
  emit(0x58 | dst.low_bits());
1739
1836
  }
1740
1837
 
@@ -1742,7 +1839,7 @@ void Assembler::pop(Register dst) {
1742
1839
  void Assembler::pop(const Operand& dst) {
1743
1840
  EnsureSpace ensure_space(this);
1744
1841
  last_pc_ = pc_;
1745
- emit_rex_64(dst); // Could be omitted in some cases.
1842
+ emit_optional_rex_32(dst);
1746
1843
  emit(0x8F);
1747
1844
  emit_operand(0, dst);
1748
1845
  }
@@ -1758,9 +1855,7 @@ void Assembler::popfq() {
1758
1855
  void Assembler::push(Register src) {
1759
1856
  EnsureSpace ensure_space(this);
1760
1857
  last_pc_ = pc_;
1761
- if (src.high_bit()) {
1762
- emit_rex_64(src);
1763
- }
1858
+ emit_optional_rex_32(src);
1764
1859
  emit(0x50 | src.low_bits());
1765
1860
  }
1766
1861
 
@@ -1768,7 +1863,7 @@ void Assembler::push(Register src) {
1768
1863
  void Assembler::push(const Operand& src) {
1769
1864
  EnsureSpace ensure_space(this);
1770
1865
  last_pc_ = pc_;
1771
- emit_rex_64(src); // Could be omitted in some cases.
1866
+ emit_optional_rex_32(src);
1772
1867
  emit(0xFF);
1773
1868
  emit_operand(6, src);
1774
1869
  }
@@ -1860,6 +1955,10 @@ void Assembler::xchg(Register dst, Register src) {
1860
1955
  Register other = src.is(rax) ? dst : src;
1861
1956
  emit_rex_64(other);
1862
1957
  emit(0x90 | other.low_bits());
1958
+ } else if (dst.low_bits() == 4) {
1959
+ emit_rex_64(dst, src);
1960
+ emit(0x87);
1961
+ emit_modrm(dst, src);
1863
1962
  } else {
1864
1963
  emit_rex_64(src, dst);
1865
1964
  emit(0x87);
@@ -1885,12 +1984,18 @@ void Assembler::store_rax(ExternalReference ref) {
1885
1984
  void Assembler::testb(Register dst, Register src) {
1886
1985
  EnsureSpace ensure_space(this);
1887
1986
  last_pc_ = pc_;
1888
- if (dst.code() > 3 || src.code() > 3) {
1889
- // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1890
- emit_rex_32(dst, src);
1987
+ if (src.low_bits() == 4) {
1988
+ emit_rex_32(src, dst);
1989
+ emit(0x84);
1990
+ emit_modrm(src, dst);
1991
+ } else {
1992
+ if (dst.code() > 3 || src.code() > 3) {
1993
+ // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1994
+ emit_rex_32(dst, src);
1995
+ }
1996
+ emit(0x84);
1997
+ emit_modrm(dst, src);
1891
1998
  }
1892
- emit(0x84);
1893
- emit_modrm(dst, src);
1894
1999
  }
1895
2000
 
1896
2001
 
@@ -1941,9 +2046,15 @@ void Assembler::testb(const Operand& op, Register reg) {
1941
2046
  void Assembler::testl(Register dst, Register src) {
1942
2047
  EnsureSpace ensure_space(this);
1943
2048
  last_pc_ = pc_;
1944
- emit_optional_rex_32(dst, src);
1945
- emit(0x85);
1946
- emit_modrm(dst, src);
2049
+ if (src.low_bits() == 4) {
2050
+ emit_optional_rex_32(src, dst);
2051
+ emit(0x85);
2052
+ emit_modrm(src, dst);
2053
+ } else {
2054
+ emit_optional_rex_32(dst, src);
2055
+ emit(0x85);
2056
+ emit_modrm(dst, src);
2057
+ }
1947
2058
  }
1948
2059
 
1949
2060
 
@@ -1994,9 +2105,15 @@ void Assembler::testq(const Operand& op, Register reg) {
1994
2105
  void Assembler::testq(Register dst, Register src) {
1995
2106
  EnsureSpace ensure_space(this);
1996
2107
  last_pc_ = pc_;
1997
- emit_rex_64(dst, src);
1998
- emit(0x85);
1999
- emit_modrm(dst, src);
2108
+ if (src.low_bits() == 4) {
2109
+ emit_rex_64(src, dst);
2110
+ emit(0x85);
2111
+ emit_modrm(src, dst);
2112
+ } else {
2113
+ emit_rex_64(dst, src);
2114
+ emit(0x85);
2115
+ emit_modrm(dst, src);
2116
+ }
2000
2117
  }
2001
2118
 
2002
2119
 
@@ -2488,6 +2605,28 @@ void Assembler::movsd(XMMRegister dst, const Operand& src) {
2488
2605
  }
2489
2606
 
2490
2607
 
2608
+ void Assembler::movss(XMMRegister dst, const Operand& src) {
2609
+ EnsureSpace ensure_space(this);
2610
+ last_pc_ = pc_;
2611
+ emit(0xF3); // single
2612
+ emit_optional_rex_32(dst, src);
2613
+ emit(0x0F);
2614
+ emit(0x10); // load
2615
+ emit_sse_operand(dst, src);
2616
+ }
2617
+
2618
+
2619
+ void Assembler::movss(const Operand& src, XMMRegister dst) {
2620
+ EnsureSpace ensure_space(this);
2621
+ last_pc_ = pc_;
2622
+ emit(0xF3); // single
2623
+ emit_optional_rex_32(dst, src);
2624
+ emit(0x0F);
2625
+ emit(0x11); // store
2626
+ emit_sse_operand(dst, src);
2627
+ }
2628
+
2629
+
2491
2630
  void Assembler::cvttss2si(Register dst, const Operand& src) {
2492
2631
  EnsureSpace ensure_space(this);
2493
2632
  last_pc_ = pc_;
@@ -2510,6 +2649,17 @@ void Assembler::cvttsd2si(Register dst, const Operand& src) {
2510
2649
  }
2511
2650
 
2512
2651
 
2652
+ void Assembler::cvttsd2siq(Register dst, XMMRegister src) {
2653
+ EnsureSpace ensure_space(this);
2654
+ last_pc_ = pc_;
2655
+ emit(0xF2);
2656
+ emit_rex_64(dst, src);
2657
+ emit(0x0F);
2658
+ emit(0x2C);
2659
+ emit_sse_operand(dst, src);
2660
+ }
2661
+
2662
+
2513
2663
  void Assembler::cvtlsi2sd(XMMRegister dst, const Operand& src) {
2514
2664
  EnsureSpace ensure_space(this);
2515
2665
  last_pc_ = pc_;
@@ -2532,6 +2682,17 @@ void Assembler::cvtlsi2sd(XMMRegister dst, Register src) {
2532
2682
  }
2533
2683
 
2534
2684
 
2685
+ void Assembler::cvtlsi2ss(XMMRegister dst, Register src) {
2686
+ EnsureSpace ensure_space(this);
2687
+ last_pc_ = pc_;
2688
+ emit(0xF3);
2689
+ emit_optional_rex_32(dst, src);
2690
+ emit(0x0F);
2691
+ emit(0x2A);
2692
+ emit_sse_operand(dst, src);
2693
+ }
2694
+
2695
+
2535
2696
  void Assembler::cvtqsi2sd(XMMRegister dst, Register src) {
2536
2697
  EnsureSpace ensure_space(this);
2537
2698
  last_pc_ = pc_;
@@ -2554,6 +2715,50 @@ void Assembler::cvtss2sd(XMMRegister dst, XMMRegister src) {
2554
2715
  }
2555
2716
 
2556
2717
 
2718
+ void Assembler::cvtss2sd(XMMRegister dst, const Operand& src) {
2719
+ EnsureSpace ensure_space(this);
2720
+ last_pc_ = pc_;
2721
+ emit(0xF3);
2722
+ emit_optional_rex_32(dst, src);
2723
+ emit(0x0F);
2724
+ emit(0x5A);
2725
+ emit_sse_operand(dst, src);
2726
+ }
2727
+
2728
+
2729
+ void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
2730
+ EnsureSpace ensure_space(this);
2731
+ last_pc_ = pc_;
2732
+ emit(0xF2);
2733
+ emit_optional_rex_32(dst, src);
2734
+ emit(0x0F);
2735
+ emit(0x5A);
2736
+ emit_sse_operand(dst, src);
2737
+ }
2738
+
2739
+
2740
+ void Assembler::cvtsd2si(Register dst, XMMRegister src) {
2741
+ EnsureSpace ensure_space(this);
2742
+ last_pc_ = pc_;
2743
+ emit(0xF2);
2744
+ emit_optional_rex_32(dst, src);
2745
+ emit(0x0F);
2746
+ emit(0x2D);
2747
+ emit_sse_operand(dst, src);
2748
+ }
2749
+
2750
+
2751
+ void Assembler::cvtsd2siq(Register dst, XMMRegister src) {
2752
+ EnsureSpace ensure_space(this);
2753
+ last_pc_ = pc_;
2754
+ emit(0xF2);
2755
+ emit_rex_64(dst, src);
2756
+ emit(0x0F);
2757
+ emit(0x2D);
2758
+ emit_sse_operand(dst, src);
2759
+ }
2760
+
2761
+
2557
2762
  void Assembler::addsd(XMMRegister dst, XMMRegister src) {
2558
2763
  EnsureSpace ensure_space(this);
2559
2764
  last_pc_ = pc_;
@@ -2620,18 +2825,18 @@ void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
2620
2825
  }
2621
2826
 
2622
2827
 
2623
- void Assembler::comisd(XMMRegister dst, XMMRegister src) {
2828
+ void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
2624
2829
  EnsureSpace ensure_space(this);
2625
2830
  last_pc_ = pc_;
2626
2831
  emit(0x66);
2627
2832
  emit_optional_rex_32(dst, src);
2628
2833
  emit(0x0f);
2629
- emit(0x2f);
2834
+ emit(0x2e);
2630
2835
  emit_sse_operand(dst, src);
2631
2836
  }
2632
2837
 
2633
2838
 
2634
- void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
2839
+ void Assembler::ucomisd(XMMRegister dst, const Operand& src) {
2635
2840
  EnsureSpace ensure_space(this);
2636
2841
  last_pc_ = pc_;
2637
2842
  emit(0x66);
@@ -2642,6 +2847,7 @@ void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
2642
2847
  }
2643
2848
 
2644
2849
 
2850
+
2645
2851
  void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) {
2646
2852
  Register ireg = { reg.code() };
2647
2853
  emit_operand(ireg, adr);
@@ -2682,6 +2888,13 @@ void Assembler::RecordJSReturn() {
2682
2888
  }
2683
2889
 
2684
2890
 
2891
+ void Assembler::RecordDebugBreakSlot() {
2892
+ WriteRecordedPositions();
2893
+ EnsureSpace ensure_space(this);
2894
+ RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
2895
+ }
2896
+
2897
+
2685
2898
  void Assembler::RecordComment(const char* msg) {
2686
2899
  if (FLAG_debug_code) {
2687
2900
  EnsureSpace ensure_space(this);
@@ -2704,13 +2917,16 @@ void Assembler::RecordStatementPosition(int pos) {
2704
2917
  }
2705
2918
 
2706
2919
 
2707
- void Assembler::WriteRecordedPositions() {
2920
+ bool Assembler::WriteRecordedPositions() {
2921
+ bool written = false;
2922
+
2708
2923
  // Write the statement position if it is different from what was written last
2709
2924
  // time.
2710
2925
  if (current_statement_position_ != written_statement_position_) {
2711
2926
  EnsureSpace ensure_space(this);
2712
2927
  RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_);
2713
2928
  written_statement_position_ = current_statement_position_;
2929
+ written = true;
2714
2930
  }
2715
2931
 
2716
2932
  // Write the position if it is different from what was written last time and
@@ -2720,7 +2936,11 @@ void Assembler::WriteRecordedPositions() {
2720
2936
  EnsureSpace ensure_space(this);
2721
2937
  RecordRelocInfo(RelocInfo::POSITION, current_position_);
2722
2938
  written_position_ = current_position_;
2939
+ written = true;
2723
2940
  }
2941
+
2942
+ // Return whether something was written.
2943
+ return written;
2724
2944
  }
2725
2945
 
2726
2946
 
@@ -2728,4 +2948,16 @@ const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
2728
2948
  1 << RelocInfo::INTERNAL_REFERENCE |
2729
2949
  1 << RelocInfo::JS_RETURN;
2730
2950
 
2951
+
2952
+ bool RelocInfo::IsCodedSpecially() {
2953
+ // The deserializer needs to know whether a pointer is specially coded. Being
2954
+ // specially coded on x64 means that it is a relative 32 bit address, as used
2955
+ // by branch instructions.
2956
+ return (1 << rmode_) & kApplyMask;
2957
+ }
2958
+
2959
+
2960
+
2731
2961
  } } // namespace v8::internal
2962
+
2963
+ #endif // V8_TARGET_ARCH_X64