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
@@ -98,6 +98,7 @@ enum BuiltinExtraArguments {
98
98
  \
99
99
  V(StoreIC_Initialize, STORE_IC, UNINITIALIZED) \
100
100
  V(StoreIC_ArrayLength, STORE_IC, MONOMORPHIC) \
101
+ V(StoreIC_Normal, STORE_IC, MONOMORPHIC) \
101
102
  V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC) \
102
103
  \
103
104
  V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED) \
@@ -127,6 +128,7 @@ enum BuiltinExtraArguments {
127
128
  V(KeyedLoadIC_DebugBreak, KEYED_LOAD_IC, DEBUG_BREAK) \
128
129
  V(StoreIC_DebugBreak, STORE_IC, DEBUG_BREAK) \
129
130
  V(KeyedStoreIC_DebugBreak, KEYED_STORE_IC, DEBUG_BREAK) \
131
+ V(Slot_DebugBreak, BUILTIN, DEBUG_BREAK) \
130
132
  V(PlainReturn_LiveEdit, BUILTIN, DEBUG_BREAK) \
131
133
  V(FrameDropper_LiveEdit, BUILTIN, DEBUG_BREAK)
132
134
  #else
File without changes
@@ -155,9 +155,9 @@ static inline void CheckNonEqualsHelper(const char* file,
155
155
  static inline void CheckEqualsHelper(const char* file,
156
156
  int line,
157
157
  const char* expected_source,
158
- void* expected,
158
+ const void* expected,
159
159
  const char* value_source,
160
- void* value) {
160
+ const void* value) {
161
161
  if (expected != value) {
162
162
  V8_Fatal(file, line,
163
163
  "CHECK_EQ(%s, %s) failed\n# Expected: %p\n# Found: %p",
@@ -170,9 +170,9 @@ static inline void CheckEqualsHelper(const char* file,
170
170
  static inline void CheckNonEqualsHelper(const char* file,
171
171
  int line,
172
172
  const char* expected_source,
173
- void* expected,
173
+ const void* expected,
174
174
  const char* value_source,
175
- void* value) {
175
+ const void* value) {
176
176
  if (expected == value) {
177
177
  V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %p",
178
178
  expected_source, value_source, value);
@@ -285,14 +285,16 @@ template <int> class StaticAssertionHelper { };
285
285
  #define ASSERT_RESULT(expr) CHECK(expr)
286
286
  #define ASSERT(condition) CHECK(condition)
287
287
  #define ASSERT_EQ(v1, v2) CHECK_EQ(v1, v2)
288
- #define ASSERT_NE(v1, v2) CHECK_NE(v1, v2)
288
+ #define ASSERT_NE(v1, v2) CHECK_NE(v1, v2)
289
+ #define ASSERT_GE(v1, v2) CHECK_GE(v1, v2)
289
290
  #define STATIC_ASSERT(test) STATIC_CHECK(test)
290
291
  #define SLOW_ASSERT(condition) if (FLAG_enable_slow_asserts) CHECK(condition)
291
292
  #else
292
293
  #define ASSERT_RESULT(expr) (expr)
293
294
  #define ASSERT(condition) ((void) 0)
294
295
  #define ASSERT_EQ(v1, v2) ((void) 0)
295
- #define ASSERT_NE(v1, v2) ((void) 0)
296
+ #define ASSERT_NE(v1, v2) ((void) 0)
297
+ #define ASSERT_GE(v1, v2) ((void) 0)
296
298
  #define STATIC_ASSERT(test) ((void) 0)
297
299
  #define SLOW_ASSERT(condition) ((void) 0)
298
300
  #endif
@@ -0,0 +1,53 @@
1
+ // Copyright 2010 the V8 project authors. All rights reserved.
2
+ // Redistribution and use in source and binary forms, with or without
3
+ // modification, are permitted provided that the following conditions are
4
+ // met:
5
+ //
6
+ // * Redistributions of source code must retain the above copyright
7
+ // notice, this list of conditions and the following disclaimer.
8
+ // * Redistributions in binary form must reproduce the above
9
+ // copyright notice, this list of conditions and the following
10
+ // disclaimer in the documentation and/or other materials provided
11
+ // with the distribution.
12
+ // * Neither the name of Google Inc. nor the names of its
13
+ // contributors may be used to endorse or promote products derived
14
+ // from this software without specific prior written permission.
15
+ //
16
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ #ifndef V8_CIRCULAR_BUFFER_INL_H_
29
+ #define V8_CIRCULAR_BUFFER_INL_H_
30
+
31
+ #include "circular-queue.h"
32
+
33
+ namespace v8 {
34
+ namespace internal {
35
+
36
+
37
+ void* SamplingCircularQueue::Enqueue() {
38
+ WrapPositionIfNeeded(&producer_pos_->enqueue_pos);
39
+ void* result = producer_pos_->enqueue_pos;
40
+ producer_pos_->enqueue_pos += record_size_;
41
+ return result;
42
+ }
43
+
44
+
45
+ void SamplingCircularQueue::WrapPositionIfNeeded(
46
+ SamplingCircularQueue::Cell** pos) {
47
+ if (**pos == kEnd) *pos = buffer_;
48
+ }
49
+
50
+
51
+ } } // namespace v8::internal
52
+
53
+ #endif // V8_CIRCULAR_BUFFER_INL_H_
@@ -32,32 +32,6 @@ namespace v8 {
32
32
  namespace internal {
33
33
 
34
34
 
35
- // Lock-based blocking circular queue for small records. Intended for
36
- // transfer of small records between a single producer and a single
37
- // consumer. Blocks on enqueue operation if the queue is full.
38
- template<typename Record>
39
- class CircularQueue {
40
- public:
41
- inline explicit CircularQueue(int desired_buffer_size_in_bytes);
42
- inline ~CircularQueue();
43
-
44
- INLINE(void Dequeue(Record* rec));
45
- INLINE(void Enqueue(const Record& rec));
46
- INLINE(bool IsEmpty()) { return enqueue_pos_ == dequeue_pos_; }
47
-
48
- private:
49
- INLINE(Record* Next(Record* curr));
50
-
51
- Record* buffer_;
52
- Record* const buffer_end_;
53
- Semaphore* enqueue_semaphore_;
54
- Record* enqueue_pos_;
55
- Record* dequeue_pos_;
56
-
57
- DISALLOW_COPY_AND_ASSIGN(CircularQueue);
58
- };
59
-
60
-
61
35
  // Lock-free cache-friendly sampling circular queue for large
62
36
  // records. Intended for fast transfer of large records between a
63
37
  // single producer and a single consumer. If the queue is full,
@@ -102,8 +102,7 @@ Handle<Code> CodeStub::GetCode() {
102
102
  static_cast<Code::Kind>(GetCodeKind()),
103
103
  InLoop(),
104
104
  GetICState());
105
- Handle<Code> new_object =
106
- Factory::NewCode(desc, NULL, flags, masm.CodeObject());
105
+ Handle<Code> new_object = Factory::NewCode(desc, flags, masm.CodeObject());
107
106
  RecordCodeGeneration(*new_object, &masm);
108
107
 
109
108
  if (has_custom_cache()) {
@@ -140,8 +139,7 @@ Object* CodeStub::TryGetCode() {
140
139
  static_cast<Code::Kind>(GetCodeKind()),
141
140
  InLoop(),
142
141
  GetICState());
143
- Object* new_object =
144
- Heap::CreateCode(desc, NULL, flags, masm.CodeObject());
142
+ Object* new_object = Heap::CreateCode(desc, flags, masm.CodeObject());
145
143
  if (new_object->IsFailure()) return new_object;
146
144
  code = Code::cast(new_object);
147
145
  RecordCodeGeneration(code, &masm);
@@ -46,6 +46,7 @@ namespace internal {
46
46
  V(RecordWrite) \
47
47
  V(ConvertToDouble) \
48
48
  V(WriteInt32ToHeapNumber) \
49
+ V(IntegerMod) \
49
50
  V(StackCheck) \
50
51
  V(FastNewClosure) \
51
52
  V(FastNewContext) \
File without changes
File without changes
@@ -162,9 +162,7 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
162
162
  // Allocate and install the code.
163
163
  CodeDesc desc;
164
164
  masm->GetCode(&desc);
165
- ZoneScopeInfo sinfo(info->scope());
166
- Handle<Code> code =
167
- Factory::NewCode(desc, &sinfo, flags, masm->CodeObject());
165
+ Handle<Code> code = Factory::NewCode(desc, flags, masm->CodeObject());
168
166
 
169
167
  #ifdef ENABLE_DISASSEMBLER
170
168
  bool print_code = Bootstrapper::IsActive()
@@ -254,10 +252,28 @@ Handle<Code> CodeGenerator::ComputeCallInitialize(
254
252
  // that it needs so we need to ensure it is generated already.
255
253
  ComputeCallInitialize(argc, NOT_IN_LOOP);
256
254
  }
257
- CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc, in_loop), Code);
255
+ CALL_HEAP_FUNCTION(
256
+ StubCache::ComputeCallInitialize(argc, in_loop, Code::CALL_IC),
257
+ Code);
258
258
  }
259
259
 
260
260
 
261
+ Handle<Code> CodeGenerator::ComputeKeyedCallInitialize(
262
+ int argc,
263
+ InLoopFlag in_loop) {
264
+ if (in_loop == IN_LOOP) {
265
+ // Force the creation of the corresponding stub outside loops,
266
+ // because it may be used when clearing the ICs later - it is
267
+ // possible for a series of IC transitions to lose the in-loop
268
+ // information, and the IC clearing code can't generate a stub
269
+ // that it needs so we need to ensure it is generated already.
270
+ ComputeKeyedCallInitialize(argc, NOT_IN_LOOP);
271
+ }
272
+ CALL_HEAP_FUNCTION(
273
+ StubCache::ComputeCallInitialize(argc, in_loop, Code::KEYED_CALL_IC),
274
+ Code);
275
+ }
276
+
261
277
  void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) {
262
278
  int length = declarations->length();
263
279
  int globals = 0;
@@ -397,32 +413,41 @@ CodeGenerator::ConditionAnalysis CodeGenerator::AnalyzeCondition(
397
413
  }
398
414
 
399
415
 
400
- void CodeGenerator::RecordPositions(MacroAssembler* masm, int pos) {
416
+ bool CodeGenerator::RecordPositions(MacroAssembler* masm,
417
+ int pos,
418
+ bool right_here) {
401
419
  if (pos != RelocInfo::kNoPosition) {
402
420
  masm->RecordStatementPosition(pos);
403
421
  masm->RecordPosition(pos);
422
+ if (right_here) {
423
+ return masm->WriteRecordedPositions();
424
+ }
404
425
  }
426
+ return false;
405
427
  }
406
428
 
407
429
 
408
430
  void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) {
409
- if (FLAG_debug_info) RecordPositions(masm(), fun->start_position());
431
+ if (FLAG_debug_info) RecordPositions(masm(), fun->start_position(), false);
410
432
  }
411
433
 
412
434
 
413
435
  void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) {
414
- if (FLAG_debug_info) RecordPositions(masm(), fun->end_position());
436
+ if (FLAG_debug_info) RecordPositions(masm(), fun->end_position(), false);
415
437
  }
416
438
 
417
439
 
418
440
  void CodeGenerator::CodeForStatementPosition(Statement* stmt) {
419
- if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos());
441
+ if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos(), false);
420
442
  }
421
443
 
444
+
422
445
  void CodeGenerator::CodeForDoWhileConditionPosition(DoWhileStatement* stmt) {
423
- if (FLAG_debug_info) RecordPositions(masm(), stmt->condition_position());
446
+ if (FLAG_debug_info)
447
+ RecordPositions(masm(), stmt->condition_position(), false);
424
448
  }
425
449
 
450
+
426
451
  void CodeGenerator::CodeForSourcePosition(int pos) {
427
452
  if (FLAG_debug_info && pos != RelocInfo::kNoPosition) {
428
453
  masm()->RecordPosition(pos);
@@ -433,11 +458,17 @@ void CodeGenerator::CodeForSourcePosition(int pos) {
433
458
  const char* GenericUnaryOpStub::GetName() {
434
459
  switch (op_) {
435
460
  case Token::SUB:
436
- return overwrite_
437
- ? "GenericUnaryOpStub_SUB_Overwrite"
438
- : "GenericUnaryOpStub_SUB_Alloc";
461
+ if (negative_zero_ == kStrictNegativeZero) {
462
+ return overwrite_ == UNARY_OVERWRITE
463
+ ? "GenericUnaryOpStub_SUB_Overwrite_Strict0"
464
+ : "GenericUnaryOpStub_SUB_Alloc_Strict0";
465
+ } else {
466
+ return overwrite_ == UNARY_OVERWRITE
467
+ ? "GenericUnaryOpStub_SUB_Overwrite_Ignore0"
468
+ : "GenericUnaryOpStub_SUB_Alloc_Ignore0";
469
+ }
439
470
  case Token::BIT_NOT:
440
- return overwrite_
471
+ return overwrite_ == UNARY_OVERWRITE
441
472
  ? "GenericUnaryOpStub_BIT_NOT_Overwrite"
442
473
  : "GenericUnaryOpStub_BIT_NOT_Alloc";
443
474
  default:
@@ -28,7 +28,6 @@
28
28
  #ifndef V8_CODEGEN_H_
29
29
  #define V8_CODEGEN_H_
30
30
 
31
- #include "ast.h"
32
31
  #include "code-stubs.h"
33
32
  #include "runtime.h"
34
33
  #include "type-info.h"
@@ -76,6 +75,7 @@
76
75
 
77
76
  // Mode to overwrite BinaryExpression values.
78
77
  enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
78
+ enum UnaryOverwriteMode { UNARY_OVERWRITE, UNARY_NO_OVERWRITE };
79
79
 
80
80
  // Types of uncatchable exceptions.
81
81
  enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION };
@@ -111,14 +111,16 @@ namespace internal {
111
111
  F(ClassOf, 1, 1) \
112
112
  F(ValueOf, 1, 1) \
113
113
  F(SetValueOf, 2, 1) \
114
- F(FastCharCodeAt, 2, 1) \
115
- F(CharFromCode, 1, 1) \
114
+ F(StringCharCodeAt, 2, 1) \
115
+ F(StringCharFromCode, 1, 1) \
116
+ F(StringCharAt, 2, 1) \
116
117
  F(ObjectEquals, 2, 1) \
117
118
  F(Log, 3, 1) \
118
- F(RandomHeapNumber, 0, 1) \
119
+ F(RandomHeapNumber, 0, 1) \
119
120
  F(IsObject, 1, 1) \
120
121
  F(IsFunction, 1, 1) \
121
122
  F(IsUndetectableObject, 1, 1) \
123
+ F(IsSpecObject, 1, 1) \
122
124
  F(StringAdd, 2, 1) \
123
125
  F(SubString, 3, 1) \
124
126
  F(StringCompare, 2, 1) \
@@ -179,6 +181,110 @@ class CodeGeneratorScope BASE_EMBEDDED {
179
181
  CodeGenerator* previous_;
180
182
  };
181
183
 
184
+ #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
185
+
186
+ // State of used registers in a virtual frame.
187
+ class FrameRegisterState {
188
+ public:
189
+ // Captures the current state of the given frame.
190
+ explicit FrameRegisterState(VirtualFrame* frame);
191
+
192
+ // Saves the state in the stack.
193
+ void Save(MacroAssembler* masm) const;
194
+
195
+ // Restores the state from the stack.
196
+ void Restore(MacroAssembler* masm) const;
197
+
198
+ private:
199
+ // Constants indicating special actions. They should not be multiples
200
+ // of kPointerSize so they will not collide with valid offsets from
201
+ // the frame pointer.
202
+ static const int kIgnore = -1;
203
+ static const int kPush = 1;
204
+
205
+ // This flag is ored with a valid offset from the frame pointer, so
206
+ // it should fit in the low zero bits of a valid offset.
207
+ static const int kSyncedFlag = 2;
208
+
209
+ int registers_[RegisterAllocator::kNumRegisters];
210
+ };
211
+
212
+ #elif V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
213
+
214
+
215
+ class FrameRegisterState {
216
+ public:
217
+ inline FrameRegisterState(VirtualFrame frame) : frame_(frame) { }
218
+
219
+ inline const VirtualFrame* frame() const { return &frame_; }
220
+
221
+ private:
222
+ VirtualFrame frame_;
223
+ };
224
+
225
+ #else
226
+
227
+ #error Unsupported target architecture.
228
+
229
+ #endif
230
+
231
+
232
+ // Helper interface to prepare to/restore after making runtime calls.
233
+ class RuntimeCallHelper {
234
+ public:
235
+ virtual ~RuntimeCallHelper() {}
236
+
237
+ virtual void BeforeCall(MacroAssembler* masm) const = 0;
238
+
239
+ virtual void AfterCall(MacroAssembler* masm) const = 0;
240
+
241
+ protected:
242
+ RuntimeCallHelper() {}
243
+
244
+ private:
245
+ DISALLOW_COPY_AND_ASSIGN(RuntimeCallHelper);
246
+ };
247
+
248
+
249
+ // RuntimeCallHelper implementation that saves/restores state of a
250
+ // virtual frame.
251
+ class VirtualFrameRuntimeCallHelper : public RuntimeCallHelper {
252
+ public:
253
+ // Does not take ownership of |frame_state|.
254
+ explicit VirtualFrameRuntimeCallHelper(const FrameRegisterState* frame_state)
255
+ : frame_state_(frame_state) {}
256
+
257
+ virtual void BeforeCall(MacroAssembler* masm) const;
258
+
259
+ virtual void AfterCall(MacroAssembler* masm) const;
260
+
261
+ private:
262
+ const FrameRegisterState* frame_state_;
263
+ };
264
+
265
+
266
+ // RuntimeCallHelper implementation used in IC stubs: enters/leaves a
267
+ // newly created internal frame before/after the runtime call.
268
+ class ICRuntimeCallHelper : public RuntimeCallHelper {
269
+ public:
270
+ ICRuntimeCallHelper() {}
271
+
272
+ virtual void BeforeCall(MacroAssembler* masm) const;
273
+
274
+ virtual void AfterCall(MacroAssembler* masm) const;
275
+ };
276
+
277
+
278
+ // Trivial RuntimeCallHelper implementation.
279
+ class NopRuntimeCallHelper : public RuntimeCallHelper {
280
+ public:
281
+ NopRuntimeCallHelper() {}
282
+
283
+ virtual void BeforeCall(MacroAssembler* masm) const {}
284
+
285
+ virtual void AfterCall(MacroAssembler* masm) const {}
286
+ };
287
+
182
288
 
183
289
  // Deferred code objects are small pieces of code that are compiled
184
290
  // out of line. They are used to defer the compilation of uncommon
@@ -210,6 +316,8 @@ class DeferredCode: public ZoneObject {
210
316
  inline void Branch(Condition cc);
211
317
  void BindExit() { masm_->bind(&exit_label_); }
212
318
 
319
+ const FrameRegisterState* frame_state() const { return &frame_state_; }
320
+
213
321
  void SaveRegisters();
214
322
  void RestoreRegisters();
215
323
 
@@ -217,28 +325,13 @@ class DeferredCode: public ZoneObject {
217
325
  MacroAssembler* masm_;
218
326
 
219
327
  private:
220
- // Constants indicating special actions. They should not be multiples
221
- // of kPointerSize so they will not collide with valid offsets from
222
- // the frame pointer.
223
- static const int kIgnore = -1;
224
- static const int kPush = 1;
225
-
226
- // This flag is ored with a valid offset from the frame pointer, so
227
- // it should fit in the low zero bits of a valid offset.
228
- static const int kSyncedFlag = 2;
229
-
230
328
  int statement_position_;
231
329
  int position_;
232
330
 
233
331
  Label entry_label_;
234
332
  Label exit_label_;
235
333
 
236
- // C++ doesn't allow zero length arrays, so we make the array length 1 even
237
- // if we don't need it.
238
- static const int kRegistersArrayLength =
239
- (RegisterAllocator::kNumRegisters == 0) ?
240
- 1 : RegisterAllocator::kNumRegisters;
241
- int registers_[kRegistersArrayLength];
334
+ FrameRegisterState frame_state_;
242
335
 
243
336
  #ifdef DEBUG
244
337
  const char* comment_;
@@ -322,21 +415,33 @@ class InstanceofStub: public CodeStub {
322
415
  };
323
416
 
324
417
 
418
+ enum NegativeZeroHandling {
419
+ kStrictNegativeZero,
420
+ kIgnoreNegativeZero
421
+ };
422
+
423
+
325
424
  class GenericUnaryOpStub : public CodeStub {
326
425
  public:
327
- GenericUnaryOpStub(Token::Value op, bool overwrite)
328
- : op_(op), overwrite_(overwrite) { }
426
+ GenericUnaryOpStub(Token::Value op,
427
+ UnaryOverwriteMode overwrite,
428
+ NegativeZeroHandling negative_zero = kStrictNegativeZero)
429
+ : op_(op), overwrite_(overwrite), negative_zero_(negative_zero) { }
329
430
 
330
431
  private:
331
432
  Token::Value op_;
332
- bool overwrite_;
433
+ UnaryOverwriteMode overwrite_;
434
+ NegativeZeroHandling negative_zero_;
333
435
 
334
- class OverwriteField: public BitField<int, 0, 1> {};
335
- class OpField: public BitField<Token::Value, 1, kMinorBits - 1> {};
436
+ class OverwriteField: public BitField<UnaryOverwriteMode, 0, 1> {};
437
+ class NegativeZeroField: public BitField<NegativeZeroHandling, 1, 1> {};
438
+ class OpField: public BitField<Token::Value, 2, kMinorBits - 2> {};
336
439
 
337
440
  Major MajorKey() { return GenericUnaryOp; }
338
441
  int MinorKey() {
339
- return OpField::encode(op_) | OverwriteField::encode(overwrite_);
442
+ return OpField::encode(op_) |
443
+ OverwriteField::encode(overwrite_) |
444
+ NegativeZeroField::encode(negative_zero_);
340
445
  }
341
446
 
342
447
  void Generate(MacroAssembler* masm);
@@ -356,11 +461,15 @@ class CompareStub: public CodeStub {
356
461
  CompareStub(Condition cc,
357
462
  bool strict,
358
463
  NaNInformation nan_info = kBothCouldBeNaN,
359
- bool include_number_compare = true) :
464
+ bool include_number_compare = true,
465
+ Register lhs = no_reg,
466
+ Register rhs = no_reg) :
360
467
  cc_(cc),
361
468
  strict_(strict),
362
469
  never_nan_nan_(nan_info == kCantBothBeNaN),
363
470
  include_number_compare_(include_number_compare),
471
+ lhs_(lhs),
472
+ rhs_(rhs),
364
473
  name_(NULL) { }
365
474
 
366
475
  void Generate(MacroAssembler* masm);
@@ -378,12 +487,19 @@ class CompareStub: public CodeStub {
378
487
  // comparison code is used when the number comparison has been inlined, and
379
488
  // the stub will be called if one of the operands is not a number.
380
489
  bool include_number_compare_;
381
-
382
- // Encoding of the minor key CCCCCCCCCCCCCCNS.
490
+ // Register holding the left hand side of the comparison if the stub gives
491
+ // a choice, no_reg otherwise.
492
+ Register lhs_;
493
+ // Register holding the right hand side of the comparison if the stub gives
494
+ // a choice, no_reg otherwise.
495
+ Register rhs_;
496
+
497
+ // Encoding of the minor key CCCCCCCCCCCCRCNS.
383
498
  class StrictField: public BitField<bool, 0, 1> {};
384
499
  class NeverNanNanField: public BitField<bool, 1, 1> {};
385
500
  class IncludeNumberCompareField: public BitField<bool, 2, 1> {};
386
- class ConditionField: public BitField<int, 3, 13> {};
501
+ class RegisterField: public BitField<bool, 3, 1> {};
502
+ class ConditionField: public BitField<int, 4, 12> {};
387
503
 
388
504
  Major MajorKey() { return Compare; }
389
505
 
@@ -402,11 +518,17 @@ class CompareStub: public CodeStub {
402
518
  #ifdef DEBUG
403
519
  void Print() {
404
520
  PrintF("CompareStub (cc %d), (strict %s), "
405
- "(never_nan_nan %s), (number_compare %s)\n",
521
+ "(never_nan_nan %s), (number_compare %s) ",
406
522
  static_cast<int>(cc_),
407
523
  strict_ ? "true" : "false",
408
524
  never_nan_nan_ ? "true" : "false",
409
525
  include_number_compare_ ? "included" : "not included");
526
+
527
+ if (!lhs_.is(no_reg) && !rhs_.is(no_reg)) {
528
+ PrintF("(lhs r%d), (rhs r%d)\n", lhs_.code(), rhs_.code());
529
+ } else {
530
+ PrintF("\n");
531
+ }
410
532
  }
411
533
  #endif
412
534
  };
@@ -612,6 +734,163 @@ class ToBooleanStub: public CodeStub {
612
734
  };
613
735
 
614
736
 
737
+ enum StringIndexFlags {
738
+ // Accepts smis or heap numbers.
739
+ STRING_INDEX_IS_NUMBER,
740
+
741
+ // Accepts smis or heap numbers that are valid array indices
742
+ // (ECMA-262 15.4). Invalid indices are reported as being out of
743
+ // range.
744
+ STRING_INDEX_IS_ARRAY_INDEX
745
+ };
746
+
747
+
748
+ // Generates code implementing String.prototype.charCodeAt.
749
+ //
750
+ // Only supports the case when the receiver is a string and the index
751
+ // is a number (smi or heap number) that is a valid index into the
752
+ // string. Additional index constraints are specified by the
753
+ // flags. Otherwise, bails out to the provided labels.
754
+ //
755
+ // Register usage: |object| may be changed to another string in a way
756
+ // that doesn't affect charCodeAt/charAt semantics, |index| is
757
+ // preserved, |scratch| and |result| are clobbered.
758
+ class StringCharCodeAtGenerator {
759
+ public:
760
+ StringCharCodeAtGenerator(Register object,
761
+ Register index,
762
+ Register scratch,
763
+ Register result,
764
+ Label* receiver_not_string,
765
+ Label* index_not_number,
766
+ Label* index_out_of_range,
767
+ StringIndexFlags index_flags)
768
+ : object_(object),
769
+ index_(index),
770
+ scratch_(scratch),
771
+ result_(result),
772
+ receiver_not_string_(receiver_not_string),
773
+ index_not_number_(index_not_number),
774
+ index_out_of_range_(index_out_of_range),
775
+ index_flags_(index_flags) {
776
+ ASSERT(!scratch_.is(object_));
777
+ ASSERT(!scratch_.is(index_));
778
+ ASSERT(!scratch_.is(result_));
779
+ ASSERT(!result_.is(object_));
780
+ ASSERT(!result_.is(index_));
781
+ }
782
+
783
+ // Generates the fast case code. On the fallthrough path |result|
784
+ // register contains the result.
785
+ void GenerateFast(MacroAssembler* masm);
786
+
787
+ // Generates the slow case code. Must not be naturally
788
+ // reachable. Expected to be put after a ret instruction (e.g., in
789
+ // deferred code). Always jumps back to the fast case.
790
+ void GenerateSlow(MacroAssembler* masm,
791
+ const RuntimeCallHelper& call_helper);
792
+
793
+ private:
794
+ Register object_;
795
+ Register index_;
796
+ Register scratch_;
797
+ Register result_;
798
+
799
+ Label* receiver_not_string_;
800
+ Label* index_not_number_;
801
+ Label* index_out_of_range_;
802
+
803
+ StringIndexFlags index_flags_;
804
+
805
+ Label call_runtime_;
806
+ Label index_not_smi_;
807
+ Label got_smi_index_;
808
+ Label exit_;
809
+
810
+ DISALLOW_COPY_AND_ASSIGN(StringCharCodeAtGenerator);
811
+ };
812
+
813
+
814
+ // Generates code for creating a one-char string from a char code.
815
+ class StringCharFromCodeGenerator {
816
+ public:
817
+ StringCharFromCodeGenerator(Register code,
818
+ Register result)
819
+ : code_(code),
820
+ result_(result) {
821
+ ASSERT(!code_.is(result_));
822
+ }
823
+
824
+ // Generates the fast case code. On the fallthrough path |result|
825
+ // register contains the result.
826
+ void GenerateFast(MacroAssembler* masm);
827
+
828
+ // Generates the slow case code. Must not be naturally
829
+ // reachable. Expected to be put after a ret instruction (e.g., in
830
+ // deferred code). Always jumps back to the fast case.
831
+ void GenerateSlow(MacroAssembler* masm,
832
+ const RuntimeCallHelper& call_helper);
833
+
834
+ private:
835
+ Register code_;
836
+ Register result_;
837
+
838
+ Label slow_case_;
839
+ Label exit_;
840
+
841
+ DISALLOW_COPY_AND_ASSIGN(StringCharFromCodeGenerator);
842
+ };
843
+
844
+
845
+ // Generates code implementing String.prototype.charAt.
846
+ //
847
+ // Only supports the case when the receiver is a string and the index
848
+ // is a number (smi or heap number) that is a valid index into the
849
+ // string. Additional index constraints are specified by the
850
+ // flags. Otherwise, bails out to the provided labels.
851
+ //
852
+ // Register usage: |object| may be changed to another string in a way
853
+ // that doesn't affect charCodeAt/charAt semantics, |index| is
854
+ // preserved, |scratch1|, |scratch2|, and |result| are clobbered.
855
+ class StringCharAtGenerator {
856
+ public:
857
+ StringCharAtGenerator(Register object,
858
+ Register index,
859
+ Register scratch1,
860
+ Register scratch2,
861
+ Register result,
862
+ Label* receiver_not_string,
863
+ Label* index_not_number,
864
+ Label* index_out_of_range,
865
+ StringIndexFlags index_flags)
866
+ : char_code_at_generator_(object,
867
+ index,
868
+ scratch1,
869
+ scratch2,
870
+ receiver_not_string,
871
+ index_not_number,
872
+ index_out_of_range,
873
+ index_flags),
874
+ char_from_code_generator_(scratch2, result) {}
875
+
876
+ // Generates the fast case code. On the fallthrough path |result|
877
+ // register contains the result.
878
+ void GenerateFast(MacroAssembler* masm);
879
+
880
+ // Generates the slow case code. Must not be naturally
881
+ // reachable. Expected to be put after a ret instruction (e.g., in
882
+ // deferred code). Always jumps back to the fast case.
883
+ void GenerateSlow(MacroAssembler* masm,
884
+ const RuntimeCallHelper& call_helper);
885
+
886
+ private:
887
+ StringCharCodeAtGenerator char_code_at_generator_;
888
+ StringCharFromCodeGenerator char_from_code_generator_;
889
+
890
+ DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
891
+ };
892
+
893
+
615
894
  } // namespace internal
616
895
  } // namespace v8
617
896