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
@@ -52,6 +52,32 @@ enum InvokeJSFlags {
52
52
  };
53
53
 
54
54
 
55
+ // Flags used for the AllocateInNewSpace functions.
56
+ enum AllocationFlags {
57
+ // No special flags.
58
+ NO_ALLOCATION_FLAGS = 0,
59
+ // Return the pointer to the allocated already tagged as a heap object.
60
+ TAG_OBJECT = 1 << 0,
61
+ // The content of the result register already contains the allocation top in
62
+ // new space.
63
+ RESULT_CONTAINS_TOP = 1 << 1,
64
+ // Specify that the requested size of the space to allocate is specified in
65
+ // words instead of bytes.
66
+ SIZE_IN_WORDS = 1 << 2
67
+ };
68
+
69
+
70
+ // Flags used for the ObjectToDoubleVFPRegister function.
71
+ enum ObjectToDoubleFlags {
72
+ // No special flags.
73
+ NO_OBJECT_TO_DOUBLE_FLAGS = 0,
74
+ // Object is known to be a non smi.
75
+ OBJECT_NOT_SMI = 1 << 0,
76
+ // Don't load NaNs or infinities, branch to the non number case instead.
77
+ AVOID_NANS_AND_INFINITIES = 1 << 1
78
+ };
79
+
80
+
55
81
  // MacroAssembler implements a collection of frequently used macros.
56
82
  class MacroAssembler: public Assembler {
57
83
  public:
@@ -73,7 +99,21 @@ class MacroAssembler: public Assembler {
73
99
 
74
100
  // Swap two registers. If the scratch register is omitted then a slightly
75
101
  // less efficient form using xor instead of mov is emitted.
76
- void Swap(Register reg1, Register reg2, Register scratch = no_reg);
102
+ void Swap(Register reg1,
103
+ Register reg2,
104
+ Register scratch = no_reg,
105
+ Condition cond = al);
106
+
107
+
108
+ void And(Register dst, Register src1, const Operand& src2,
109
+ Condition cond = al);
110
+ void Ubfx(Register dst, Register src, int lsb, int width,
111
+ Condition cond = al);
112
+ void Sbfx(Register dst, Register src, int lsb, int width,
113
+ Condition cond = al);
114
+ void Bfc(Register dst, int lsb, int width, Condition cond = al);
115
+ void Usat(Register dst, int satpos, const Operand& src,
116
+ Condition cond = al);
77
117
 
78
118
  void Call(Label* target);
79
119
  void Move(Register dst, Handle<Object> value);
@@ -85,6 +125,10 @@ class MacroAssembler: public Assembler {
85
125
  void LoadRoot(Register destination,
86
126
  Heap::RootListIndex index,
87
127
  Condition cond = al);
128
+ // Store an object to the root table.
129
+ void StoreRoot(Register source,
130
+ Heap::RootListIndex index,
131
+ Condition cond = al);
88
132
 
89
133
 
90
134
  // Check if object is in new space.
@@ -95,17 +139,31 @@ class MacroAssembler: public Assembler {
95
139
  Label* branch);
96
140
 
97
141
 
98
- // Set the remebered set bit for an offset into an
99
- // object. RecordWriteHelper only works if the object is not in new
100
- // space.
101
- void RecordWriteHelper(Register object, Register offset, Register scracth);
102
-
103
- // Sets the remembered set bit for [address+offset], where address is the
104
- // address of the heap object 'object'. The address must be in the first 8K
105
- // of an allocated page. The 'scratch' register is used in the
106
- // implementation and all 3 registers are clobbered by the operation, as
107
- // well as the ip register.
108
- void RecordWrite(Register object, Register offset, Register scratch);
142
+ // For the page containing |object| mark the region covering [address]
143
+ // dirty. The object address must be in the first 8K of an allocated page.
144
+ void RecordWriteHelper(Register object,
145
+ Register address,
146
+ Register scratch);
147
+
148
+ // For the page containing |object| mark the region covering
149
+ // [object+offset] dirty. The object address must be in the first 8K
150
+ // of an allocated page. The 'scratch' registers are used in the
151
+ // implementation and all 3 registers are clobbered by the
152
+ // operation, as well as the ip register. RecordWrite updates the
153
+ // write barrier even when storing smis.
154
+ void RecordWrite(Register object,
155
+ Operand offset,
156
+ Register scratch0,
157
+ Register scratch1);
158
+
159
+ // For the page containing |object| mark the region covering
160
+ // [address] dirty. The object address must be in the first 8K of an
161
+ // allocated page. All 3 registers are clobbered by the operation,
162
+ // as well as the ip register. RecordWrite updates the write barrier
163
+ // even when storing smis.
164
+ void RecordWrite(Register object,
165
+ Register address,
166
+ Register scratch);
109
167
 
110
168
  // Push two registers. Pushes leftmost register first (to highest address).
111
169
  void Push(Register src1, Register src2, Condition cond = al) {
@@ -166,6 +224,18 @@ class MacroAssembler: public Assembler {
166
224
  }
167
225
  }
168
226
 
227
+ // Load two consecutive registers with two consecutive memory locations.
228
+ void Ldrd(Register dst1,
229
+ Register dst2,
230
+ const MemOperand& src,
231
+ Condition cond = al);
232
+
233
+ // Store two consecutive registers to two consecutive memory locations.
234
+ void Strd(Register src1,
235
+ Register src2,
236
+ const MemOperand& dst,
237
+ Condition cond = al);
238
+
169
239
  // ---------------------------------------------------------------------------
170
240
  // Stack limit support
171
241
 
@@ -248,24 +318,6 @@ class MacroAssembler: public Assembler {
248
318
  // ---------------------------------------------------------------------------
249
319
  // Inline caching support
250
320
 
251
- // Generates code that verifies that the maps of objects in the
252
- // prototype chain of object hasn't changed since the code was
253
- // generated and branches to the miss label if any map has. If
254
- // necessary the function also generates code for security check
255
- // in case of global object holders. The scratch and holder
256
- // registers are always clobbered, but the object register is only
257
- // clobbered if it the same as the holder register. The function
258
- // returns a register containing the holder - either object_reg or
259
- // holder_reg.
260
- // The function can optionally (when save_at_depth !=
261
- // kInvalidProtoDepth) save the object at the given depth by moving
262
- // it to [sp].
263
- Register CheckMaps(JSObject* object, Register object_reg,
264
- JSObject* holder, Register holder_reg,
265
- Register scratch,
266
- int save_at_depth,
267
- Label* miss);
268
-
269
321
  // Generate code for checking access rights - used for security checks
270
322
  // on access to global objects across environments. The holder register
271
323
  // is left untouched, whereas both scratch registers are clobbered.
@@ -280,7 +332,9 @@ class MacroAssembler: public Assembler {
280
332
  // Allocate an object in new space. The object_size is specified in words (not
281
333
  // bytes). If the new space is exhausted control continues at the gc_required
282
334
  // label. The allocated object is returned in result. If the flag
283
- // tag_allocated_object is true the result is tagged as as a heap object.
335
+ // tag_allocated_object is true the result is tagged as as a heap object. All
336
+ // registers are clobbered also when control continues at the gc_required
337
+ // label.
284
338
  void AllocateInNewSpace(int object_size,
285
339
  Register result,
286
340
  Register scratch1,
@@ -324,12 +378,21 @@ class MacroAssembler: public Assembler {
324
378
  Register scratch2,
325
379
  Label* gc_required);
326
380
 
327
- // Allocates a heap number or jumps to the need_gc label if the young space
328
- // is full and a scavenge is needed.
381
+ // Allocates a heap number or jumps to the gc_required label if the young
382
+ // space is full and a scavenge is needed. All registers are clobbered also
383
+ // when control continues at the gc_required label.
329
384
  void AllocateHeapNumber(Register result,
330
385
  Register scratch1,
331
386
  Register scratch2,
387
+ Register heap_number_map,
332
388
  Label* gc_required);
389
+ void AllocateHeapNumberWithValue(Register result,
390
+ DwVfpRegister value,
391
+ Register scratch1,
392
+ Register scratch2,
393
+ Register heap_number_map,
394
+ Label* gc_required);
395
+
333
396
 
334
397
  // ---------------------------------------------------------------------------
335
398
  // Support functions.
@@ -366,15 +429,23 @@ class MacroAssembler: public Assembler {
366
429
  InstanceType type);
367
430
 
368
431
 
369
- // Check if the map of an object is equal to a specified map and
370
- // branch to label if not. Skip the smi check if not required
371
- // (object is known to be a heap object)
432
+ // Check if the map of an object is equal to a specified map (either
433
+ // given directly or as an index into the root list) and branch to
434
+ // label if not. Skip the smi check if not required (object is known
435
+ // to be a heap object)
372
436
  void CheckMap(Register obj,
373
437
  Register scratch,
374
438
  Handle<Map> map,
375
439
  Label* fail,
376
440
  bool is_heap_object);
377
441
 
442
+ void CheckMap(Register obj,
443
+ Register scratch,
444
+ Heap::RootListIndex index,
445
+ Label* fail,
446
+ bool is_heap_object);
447
+
448
+
378
449
  // Load and check the instance type of an object for being a string.
379
450
  // Loads the type into the second argument register.
380
451
  // Returns a condition that will be enabled if the object was a string.
@@ -410,12 +481,35 @@ class MacroAssembler: public Assembler {
410
481
  Register outHighReg,
411
482
  Register outLowReg);
412
483
 
484
+ // Load the value of a number object into a VFP double register. If the object
485
+ // is not a number a jump to the label not_number is performed and the VFP
486
+ // double register is unchanged.
487
+ void ObjectToDoubleVFPRegister(
488
+ Register object,
489
+ DwVfpRegister value,
490
+ Register scratch1,
491
+ Register scratch2,
492
+ Register heap_number_map,
493
+ SwVfpRegister scratch3,
494
+ Label* not_number,
495
+ ObjectToDoubleFlags flags = NO_OBJECT_TO_DOUBLE_FLAGS);
496
+
497
+ // Load the value of a smi object into a VFP double register. The register
498
+ // scratch1 can be the same register as smi in which case smi will hold the
499
+ // untagged value afterwards.
500
+ void SmiToDoubleVFPRegister(Register smi,
501
+ DwVfpRegister value,
502
+ Register scratch1,
503
+ SwVfpRegister scratch2);
504
+
413
505
  // Count leading zeros in a 32 bit word. On ARM5 and later it uses the clz
414
506
  // instruction. On pre-ARM5 hardware this routine gives the wrong answer
415
- // for 0 (31 instead of 32).
416
- void CountLeadingZeros(Register source,
417
- Register scratch,
418
- Register zeros);
507
+ // for 0 (31 instead of 32). Source and scratch can be the same in which case
508
+ // the source is clobbered. Source and zeros can also be the same in which
509
+ // case scratch should be a different register.
510
+ void CountLeadingZeros(Register zeros,
511
+ Register source,
512
+ Register scratch);
419
513
 
420
514
  // ---------------------------------------------------------------------------
421
515
  // Runtime calls
@@ -427,7 +521,7 @@ class MacroAssembler: public Assembler {
427
521
  void TailCallStub(CodeStub* stub, Condition cond = al);
428
522
 
429
523
  // Return from a code stub after popping its arguments.
430
- void StubReturn(int argc);
524
+ void StubReturn(int argc, Condition cond = al);
431
525
 
432
526
  // Call a runtime routine.
433
527
  void CallRuntime(Runtime::Function* f, int num_arguments);
@@ -500,6 +594,7 @@ class MacroAssembler: public Assembler {
500
594
  // Calls Abort(msg) if the condition cc is not satisfied.
501
595
  // Use --debug_code to enable.
502
596
  void Assert(Condition cc, const char* msg);
597
+ void AssertRegisterIsRoot(Register reg, Heap::RootListIndex index);
503
598
 
504
599
  // Like Assert(), but always enabled.
505
600
  void Check(Condition cc, const char* msg);
@@ -26,6 +26,9 @@
26
26
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  #include "v8.h"
29
+
30
+ #if defined(V8_TARGET_ARCH_ARM)
31
+
29
32
  #include "unicode.h"
30
33
  #include "log.h"
31
34
  #include "ast.h"
@@ -796,7 +799,6 @@ Handle<Object> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
796
799
  CodeDesc code_desc;
797
800
  masm_->GetCode(&code_desc);
798
801
  Handle<Code> code = Factory::NewCode(code_desc,
799
- NULL,
800
802
  Code::ComputeFlags(Code::REGEXP),
801
803
  masm_->CodeObject());
802
804
  PROFILE(RegExpCodeCreateEvent(*code, *source));
@@ -1210,14 +1212,31 @@ void RegExpMacroAssemblerARM::LoadCurrentCharacterUnchecked(int cp_offset,
1210
1212
  __ add(r0, current_input_offset(), Operand(cp_offset * char_size()));
1211
1213
  offset = r0;
1212
1214
  }
1213
- // We assume that we cannot do unaligned loads on ARM, so this function
1214
- // must only be used to load a single character at a time.
1215
+ // The ldr, str, ldrh, strh instructions can do unaligned accesses, if the CPU
1216
+ // and the operating system running on the target allow it.
1217
+ // If unaligned load/stores are not supported then this function must only
1218
+ // be used to load a single character at a time.
1219
+ #if !V8_TARGET_CAN_READ_UNALIGNED
1215
1220
  ASSERT(characters == 1);
1221
+ #endif
1222
+
1216
1223
  if (mode_ == ASCII) {
1217
- __ ldrb(current_character(), MemOperand(end_of_input_address(), offset));
1224
+ if (characters == 4) {
1225
+ __ ldr(current_character(), MemOperand(end_of_input_address(), offset));
1226
+ } else if (characters == 2) {
1227
+ __ ldrh(current_character(), MemOperand(end_of_input_address(), offset));
1228
+ } else {
1229
+ ASSERT(characters == 1);
1230
+ __ ldrb(current_character(), MemOperand(end_of_input_address(), offset));
1231
+ }
1218
1232
  } else {
1219
1233
  ASSERT(mode_ == UC16);
1220
- __ ldrh(current_character(), MemOperand(end_of_input_address(), offset));
1234
+ if (characters == 2) {
1235
+ __ ldr(current_character(), MemOperand(end_of_input_address(), offset));
1236
+ } else {
1237
+ ASSERT(characters == 1);
1238
+ __ ldrh(current_character(), MemOperand(end_of_input_address(), offset));
1239
+ }
1221
1240
  }
1222
1241
  }
1223
1242
 
@@ -1238,3 +1257,5 @@ void RegExpCEntryStub::Generate(MacroAssembler* masm_) {
1238
1257
  #endif // V8_INTERPRETED_REGEXP
1239
1258
 
1240
1259
  }} // namespace v8::internal
1260
+
1261
+ #endif // V8_TARGET_ARCH_ARM
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_ARM)
31
+
30
32
  #include "codegen-inl.h"
31
33
  #include "register-allocator-inl.h"
32
34
 
@@ -57,3 +59,5 @@ Result RegisterAllocator::AllocateByteRegisterWithoutSpilling() {
57
59
 
58
60
 
59
61
  } } // namespace v8::internal
62
+
63
+ #endif // V8_TARGET_ARCH_ARM
@@ -26,9 +26,12 @@
26
26
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  #include <stdlib.h>
29
+ #include <math.h>
29
30
  #include <cstdarg>
30
31
  #include "v8.h"
31
32
 
33
+ #if defined(V8_TARGET_ARCH_ARM)
34
+
32
35
  #include "disasm.h"
33
36
  #include "assembler.h"
34
37
  #include "arm/constants-arm.h"
@@ -728,6 +731,13 @@ int32_t Simulator::get_register(int reg) const {
728
731
  }
729
732
 
730
733
 
734
+ void Simulator::set_dw_register(int dreg, const int* dbl) {
735
+ ASSERT((dreg >= 0) && (dreg < num_d_registers));
736
+ registers_[dreg] = dbl[0];
737
+ registers_[dreg + 1] = dbl[1];
738
+ }
739
+
740
+
731
741
  // Raw access to the PC register.
732
742
  void Simulator::set_pc(int32_t value) {
733
743
  pc_modified_ = true;
@@ -864,27 +874,42 @@ void Simulator::TrashCallerSaveRegisters() {
864
874
  registers_[12] = 0x50Bad4U;
865
875
  }
866
876
 
867
-
868
- // The ARM cannot do unaligned reads and writes. On some ARM platforms an
869
- // interrupt is caused. On others it does a funky rotation thing. For now we
870
- // simply disallow unaligned reads, but at some point we may want to move to
871
- // emulating the rotate behaviour. Note that simulator runs have the runtime
877
+ // Some Operating Systems allow unaligned access on ARMv7 targets. We
878
+ // assume that unaligned accesses are not allowed unless the v8 build system
879
+ // defines the CAN_USE_UNALIGNED_ACCESSES macro to be non-zero.
880
+ // The following statements below describes the behavior of the ARM CPUs
881
+ // that don't support unaligned access.
882
+ // Some ARM platforms raise an interrupt on detecting unaligned access.
883
+ // On others it does a funky rotation thing. For now we
884
+ // simply disallow unaligned reads. Note that simulator runs have the runtime
872
885
  // system running directly on the host system and only generated code is
873
886
  // executed in the simulator. Since the host is typically IA32 we will not
874
- // get the correct ARM-like behaviour on unaligned accesses.
887
+ // get the correct ARM-like behaviour on unaligned accesses for those ARM
888
+ // targets that don't support unaligned loads and stores.
889
+
875
890
 
876
891
  int Simulator::ReadW(int32_t addr, Instr* instr) {
892
+ #if V8_TARGET_CAN_READ_UNALIGNED
893
+ intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
894
+ return *ptr;
895
+ #else
877
896
  if ((addr & 3) == 0) {
878
897
  intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
879
898
  return *ptr;
880
899
  }
881
- PrintF("Unaligned read at 0x%08x\n", addr);
900
+ PrintF("Unaligned read at 0x%08x, pc=%p\n", addr, instr);
882
901
  UNIMPLEMENTED();
883
902
  return 0;
903
+ #endif
884
904
  }
885
905
 
886
906
 
887
907
  void Simulator::WriteW(int32_t addr, int value, Instr* instr) {
908
+ #if V8_TARGET_CAN_READ_UNALIGNED
909
+ intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
910
+ *ptr = value;
911
+ return;
912
+ #else
888
913
  if ((addr & 3) == 0) {
889
914
  intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
890
915
  *ptr = value;
@@ -892,10 +917,15 @@ void Simulator::WriteW(int32_t addr, int value, Instr* instr) {
892
917
  }
893
918
  PrintF("Unaligned write at 0x%08x, pc=%p\n", addr, instr);
894
919
  UNIMPLEMENTED();
920
+ #endif
895
921
  }
896
922
 
897
923
 
898
924
  uint16_t Simulator::ReadHU(int32_t addr, Instr* instr) {
925
+ #if V8_TARGET_CAN_READ_UNALIGNED
926
+ uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
927
+ return *ptr;
928
+ #else
899
929
  if ((addr & 1) == 0) {
900
930
  uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
901
931
  return *ptr;
@@ -903,10 +933,15 @@ uint16_t Simulator::ReadHU(int32_t addr, Instr* instr) {
903
933
  PrintF("Unaligned unsigned halfword read at 0x%08x, pc=%p\n", addr, instr);
904
934
  UNIMPLEMENTED();
905
935
  return 0;
936
+ #endif
906
937
  }
907
938
 
908
939
 
909
940
  int16_t Simulator::ReadH(int32_t addr, Instr* instr) {
941
+ #if V8_TARGET_CAN_READ_UNALIGNED
942
+ int16_t* ptr = reinterpret_cast<int16_t*>(addr);
943
+ return *ptr;
944
+ #else
910
945
  if ((addr & 1) == 0) {
911
946
  int16_t* ptr = reinterpret_cast<int16_t*>(addr);
912
947
  return *ptr;
@@ -914,10 +949,16 @@ int16_t Simulator::ReadH(int32_t addr, Instr* instr) {
914
949
  PrintF("Unaligned signed halfword read at 0x%08x\n", addr);
915
950
  UNIMPLEMENTED();
916
951
  return 0;
952
+ #endif
917
953
  }
918
954
 
919
955
 
920
956
  void Simulator::WriteH(int32_t addr, uint16_t value, Instr* instr) {
957
+ #if V8_TARGET_CAN_READ_UNALIGNED
958
+ uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
959
+ *ptr = value;
960
+ return;
961
+ #else
921
962
  if ((addr & 1) == 0) {
922
963
  uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
923
964
  *ptr = value;
@@ -925,10 +966,16 @@ void Simulator::WriteH(int32_t addr, uint16_t value, Instr* instr) {
925
966
  }
926
967
  PrintF("Unaligned unsigned halfword write at 0x%08x, pc=%p\n", addr, instr);
927
968
  UNIMPLEMENTED();
969
+ #endif
928
970
  }
929
971
 
930
972
 
931
973
  void Simulator::WriteH(int32_t addr, int16_t value, Instr* instr) {
974
+ #if V8_TARGET_CAN_READ_UNALIGNED
975
+ int16_t* ptr = reinterpret_cast<int16_t*>(addr);
976
+ *ptr = value;
977
+ return;
978
+ #else
932
979
  if ((addr & 1) == 0) {
933
980
  int16_t* ptr = reinterpret_cast<int16_t*>(addr);
934
981
  *ptr = value;
@@ -936,6 +983,7 @@ void Simulator::WriteH(int32_t addr, int16_t value, Instr* instr) {
936
983
  }
937
984
  PrintF("Unaligned halfword write at 0x%08x, pc=%p\n", addr, instr);
938
985
  UNIMPLEMENTED();
986
+ #endif
939
987
  }
940
988
 
941
989
 
@@ -963,6 +1011,41 @@ void Simulator::WriteB(int32_t addr, int8_t value) {
963
1011
  }
964
1012
 
965
1013
 
1014
+ int32_t* Simulator::ReadDW(int32_t addr) {
1015
+ #if V8_TARGET_CAN_READ_UNALIGNED
1016
+ int32_t* ptr = reinterpret_cast<int32_t*>(addr);
1017
+ return ptr;
1018
+ #else
1019
+ if ((addr & 3) == 0) {
1020
+ int32_t* ptr = reinterpret_cast<int32_t*>(addr);
1021
+ return ptr;
1022
+ }
1023
+ PrintF("Unaligned read at 0x%08x\n", addr);
1024
+ UNIMPLEMENTED();
1025
+ return 0;
1026
+ #endif
1027
+ }
1028
+
1029
+
1030
+ void Simulator::WriteDW(int32_t addr, int32_t value1, int32_t value2) {
1031
+ #if V8_TARGET_CAN_READ_UNALIGNED
1032
+ int32_t* ptr = reinterpret_cast<int32_t*>(addr);
1033
+ *ptr++ = value1;
1034
+ *ptr = value2;
1035
+ return;
1036
+ #else
1037
+ if ((addr & 3) == 0) {
1038
+ int32_t* ptr = reinterpret_cast<int32_t*>(addr);
1039
+ *ptr++ = value1;
1040
+ *ptr = value2;
1041
+ return;
1042
+ }
1043
+ PrintF("Unaligned write at 0x%08x\n", addr);
1044
+ UNIMPLEMENTED();
1045
+ #endif
1046
+ }
1047
+
1048
+
966
1049
  // Returns the limit of the stack area to enable checking for stack overflows.
967
1050
  uintptr_t Simulator::StackLimit() const {
968
1051
  // Leave a safety margin of 256 bytes to prevent overrunning the stack when
@@ -1590,7 +1673,19 @@ void Simulator::DecodeType01(Instr* instr) {
1590
1673
  }
1591
1674
  }
1592
1675
  }
1593
- if (instr->HasH()) {
1676
+ if (((instr->Bits(7, 4) & 0xd) == 0xd) && (instr->Bit(20) == 0)) {
1677
+ ASSERT((rd % 2) == 0);
1678
+ if (instr->HasH()) {
1679
+ // The strd instruction.
1680
+ int32_t value1 = get_register(rd);
1681
+ int32_t value2 = get_register(rd+1);
1682
+ WriteDW(addr, value1, value2);
1683
+ } else {
1684
+ // The ldrd instruction.
1685
+ int* rn_data = ReadDW(addr);
1686
+ set_dw_register(rd, rn_data);
1687
+ }
1688
+ } else if (instr->HasH()) {
1594
1689
  if (instr->HasSign()) {
1595
1690
  if (instr->HasL()) {
1596
1691
  int16_t val = ReadH(addr, instr);
@@ -1765,7 +1860,9 @@ void Simulator::DecodeType01(Instr* instr) {
1765
1860
  SetNZFlags(alu_out);
1766
1861
  SetCFlag(shifter_carry_out);
1767
1862
  } else {
1768
- UNIMPLEMENTED();
1863
+ // Format(instr, "movw'cond 'rd, 'imm").
1864
+ alu_out = instr->ImmedMovwMovtField();
1865
+ set_register(rd, alu_out);
1769
1866
  }
1770
1867
  break;
1771
1868
  }
@@ -1794,7 +1891,10 @@ void Simulator::DecodeType01(Instr* instr) {
1794
1891
  SetCFlag(!BorrowFrom(rn_val, shifter_operand));
1795
1892
  SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, false));
1796
1893
  } else {
1797
- UNIMPLEMENTED();
1894
+ // Format(instr, "movt'cond 'rd, 'imm").
1895
+ alu_out = (get_register(rd) & 0xffff) |
1896
+ (instr->ImmedMovwMovtField() << 16);
1897
+ set_register(rd, alu_out);
1798
1898
  }
1799
1899
  break;
1800
1900
  }
@@ -1937,7 +2037,6 @@ void Simulator::DecodeType2(Instr* instr) {
1937
2037
 
1938
2038
 
1939
2039
  void Simulator::DecodeType3(Instr* instr) {
1940
- ASSERT(instr->Bits(6, 4) == 0x5 || instr->Bit(4) == 0);
1941
2040
  int rd = instr->RdField();
1942
2041
  int rn = instr->RnField();
1943
2042
  int32_t rn_val = get_register(rn);
@@ -1948,11 +2047,41 @@ void Simulator::DecodeType3(Instr* instr) {
1948
2047
  case 0: {
1949
2048
  ASSERT(!instr->HasW());
1950
2049
  Format(instr, "'memop'cond'b 'rd, ['rn], -'shift_rm");
2050
+ UNIMPLEMENTED();
1951
2051
  break;
1952
2052
  }
1953
2053
  case 1: {
1954
- ASSERT(!instr->HasW());
1955
- Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
2054
+ if (instr->HasW()) {
2055
+ ASSERT(instr->Bits(5, 4) == 0x1);
2056
+
2057
+ if (instr->Bit(22) == 0x1) { // USAT.
2058
+ int32_t sat_pos = instr->Bits(20, 16);
2059
+ int32_t sat_val = (1 << sat_pos) - 1;
2060
+ int32_t shift = instr->Bits(11, 7);
2061
+ int32_t shift_type = instr->Bit(6);
2062
+ int32_t rm_val = get_register(instr->RmField());
2063
+ if (shift_type == 0) { // LSL
2064
+ rm_val <<= shift;
2065
+ } else { // ASR
2066
+ rm_val >>= shift;
2067
+ }
2068
+ // If saturation occurs, the Q flag should be set in the CPSR.
2069
+ // There is no Q flag yet, and no instruction (MRS) to read the
2070
+ // CPSR directly.
2071
+ if (rm_val > sat_val) {
2072
+ rm_val = sat_val;
2073
+ } else if (rm_val < 0) {
2074
+ rm_val = 0;
2075
+ }
2076
+ set_register(rd, rm_val);
2077
+ } else { // SSAT.
2078
+ UNIMPLEMENTED();
2079
+ }
2080
+ return;
2081
+ } else {
2082
+ Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
2083
+ UNIMPLEMENTED();
2084
+ }
1956
2085
  break;
1957
2086
  }
1958
2087
  case 2: {
@@ -1964,17 +2093,47 @@ void Simulator::DecodeType3(Instr* instr) {
1964
2093
  break;
1965
2094
  }
1966
2095
  case 3: {
1967
- // UBFX.
1968
2096
  if (instr->HasW() && (instr->Bits(6, 4) == 0x5)) {
1969
2097
  uint32_t widthminus1 = static_cast<uint32_t>(instr->Bits(20, 16));
1970
- uint32_t lsbit = static_cast<uint32_t>(instr->ShiftAmountField());
2098
+ uint32_t lsbit = static_cast<uint32_t>(instr->Bits(11, 7));
1971
2099
  uint32_t msbit = widthminus1 + lsbit;
1972
2100
  if (msbit <= 31) {
1973
- uint32_t rm_val =
1974
- static_cast<uint32_t>(get_register(instr->RmField()));
1975
- uint32_t extr_val = rm_val << (31 - msbit);
1976
- extr_val = extr_val >> (31 - widthminus1);
1977
- set_register(instr->RdField(), extr_val);
2101
+ if (instr->Bit(22)) {
2102
+ // ubfx - unsigned bitfield extract.
2103
+ uint32_t rm_val =
2104
+ static_cast<uint32_t>(get_register(instr->RmField()));
2105
+ uint32_t extr_val = rm_val << (31 - msbit);
2106
+ extr_val = extr_val >> (31 - widthminus1);
2107
+ set_register(instr->RdField(), extr_val);
2108
+ } else {
2109
+ // sbfx - signed bitfield extract.
2110
+ int32_t rm_val = get_register(instr->RmField());
2111
+ int32_t extr_val = rm_val << (31 - msbit);
2112
+ extr_val = extr_val >> (31 - widthminus1);
2113
+ set_register(instr->RdField(), extr_val);
2114
+ }
2115
+ } else {
2116
+ UNREACHABLE();
2117
+ }
2118
+ return;
2119
+ } else if (!instr->HasW() && (instr->Bits(6, 4) == 0x1)) {
2120
+ uint32_t lsbit = static_cast<uint32_t>(instr->Bits(11, 7));
2121
+ uint32_t msbit = static_cast<uint32_t>(instr->Bits(20, 16));
2122
+ if (msbit >= lsbit) {
2123
+ // bfc or bfi - bitfield clear/insert.
2124
+ uint32_t rd_val =
2125
+ static_cast<uint32_t>(get_register(instr->RdField()));
2126
+ uint32_t bitcount = msbit - lsbit + 1;
2127
+ uint32_t mask = (1 << bitcount) - 1;
2128
+ rd_val &= ~(mask << lsbit);
2129
+ if (instr->RmField() != 15) {
2130
+ // bfi - bitfield insert.
2131
+ uint32_t rm_val =
2132
+ static_cast<uint32_t>(get_register(instr->RmField()));
2133
+ rm_val &= mask;
2134
+ rd_val |= rm_val << lsbit;
2135
+ }
2136
+ set_register(instr->RdField(), rd_val);
1978
2137
  } else {
1979
2138
  UNREACHABLE();
1980
2139
  }
@@ -2134,7 +2293,8 @@ static int GlueRegCode(bool last_bit, int vm, int m) {
2134
2293
  // Dd = vmul(Dn, Dm)
2135
2294
  // Dd = vdiv(Dn, Dm)
2136
2295
  // vcmp(Dd, Dm)
2137
- // VMRS
2296
+ // vmrs
2297
+ // Dd = vsqrt(Dm)
2138
2298
  void Simulator::DecodeTypeVFP(Instr* instr) {
2139
2299
  ASSERT((instr->TypeField() == 7) && (instr->Bit(24) == 0x0) );
2140
2300
  ASSERT(instr->Bits(11, 9) == 0x5);
@@ -2146,7 +2306,14 @@ void Simulator::DecodeTypeVFP(Instr* instr) {
2146
2306
  if (instr->Bit(4) == 0) {
2147
2307
  if (instr->Opc1Field() == 0x7) {
2148
2308
  // Other data processing instructions
2149
- if ((instr->Opc2Field() == 0x7) && (instr->Opc3Field() == 0x3)) {
2309
+ if ((instr->Opc2Field() == 0x0) && (instr->Opc3Field() == 0x1)) {
2310
+ // vmov register to register.
2311
+ if (instr->SzField() == 0x1) {
2312
+ set_d_register_from_double(vd, get_double_from_d_register(vm));
2313
+ } else {
2314
+ set_s_register_from_float(vd, get_float_from_s_register(vm));
2315
+ }
2316
+ } else if ((instr->Opc2Field() == 0x7) && (instr->Opc3Field() == 0x3)) {
2150
2317
  DecodeVCVTBetweenDoubleAndSingle(instr);
2151
2318
  } else if ((instr->Opc2Field() == 0x8) && (instr->Opc3Field() & 0x1)) {
2152
2319
  DecodeVCVTBetweenFloatingPointAndInteger(instr);
@@ -2156,6 +2323,18 @@ void Simulator::DecodeTypeVFP(Instr* instr) {
2156
2323
  } else if (((instr->Opc2Field() == 0x4) || (instr->Opc2Field() == 0x5)) &&
2157
2324
  (instr->Opc3Field() & 0x1)) {
2158
2325
  DecodeVCMP(instr);
2326
+ } else if (((instr->Opc2Field() == 0x1)) && (instr->Opc3Field() == 0x3)) {
2327
+ // vsqrt
2328
+ double dm_value = get_double_from_d_register(vm);
2329
+ double dd_value = sqrt(dm_value);
2330
+ set_d_register_from_double(vd, dd_value);
2331
+ } else if (instr->Opc3Field() == 0x0) {
2332
+ // vmov immediate.
2333
+ if (instr->SzField() == 0x1) {
2334
+ set_d_register_from_double(vd, instr->DoubleImmedVmov());
2335
+ } else {
2336
+ UNREACHABLE(); // Not used by v8.
2337
+ }
2159
2338
  } else {
2160
2339
  UNREACHABLE(); // Not used by V8.
2161
2340
  }
@@ -2639,3 +2818,5 @@ uintptr_t Simulator::PopAddress() {
2639
2818
  } } // namespace assembler::arm
2640
2819
 
2641
2820
  #endif // __arm__
2821
+
2822
+ #endif // V8_TARGET_ARCH_ARM