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
@@ -33,14 +33,10 @@ namespace v8 {
33
33
  namespace internal {
34
34
 
35
35
  bool DateParser::DayComposer::Write(FixedArray* output) {
36
- // Set year to 0 by default.
37
- if (index_ < 1) {
38
- comp_[index_++] = 1;
39
- }
40
-
36
+ if (index_ < 1) return false;
41
37
  // Day and month defaults to 1.
42
38
  while (index_ < kSize) {
43
- comp_[index_++] = 1;
39
+ comp_[index_++] = 1;
44
40
  }
45
41
 
46
42
  int year = 0; // Default year is 0 (=> 2000) for KJS compatibility.
@@ -48,7 +44,6 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
48
44
  int day = kNone;
49
45
 
50
46
  if (named_month_ == kNone) {
51
- if (index_ < 2) return false;
52
47
  if (index_ == 3 && !IsDay(comp_[0])) {
53
48
  // YMD
54
49
  year = comp_[0];
@@ -62,7 +57,6 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
62
57
  }
63
58
  } else {
64
59
  month = named_month_;
65
- if (index_ < 1) return false;
66
60
  if (index_ == 1) {
67
61
  // MD or DM
68
62
  day = comp_[0];
File without changes
@@ -181,15 +181,15 @@ void DebuggerAgentSession::Run() {
181
181
  buf.GetNext();
182
182
  len++;
183
183
  }
184
- int16_t* temp = NewArray<int16_t>(len + 1);
184
+ ScopedVector<int16_t> temp(len + 1);
185
185
  buf.Reset(*message, StrLength(*message));
186
186
  for (int i = 0; i < len; i++) {
187
187
  temp[i] = buf.GetNext();
188
188
  }
189
189
 
190
190
  // Send the request received to the debugger.
191
- v8::Debug::SendCommand(reinterpret_cast<const uint16_t *>(temp), len);
192
- DeleteArray(temp);
191
+ v8::Debug::SendCommand(reinterpret_cast<const uint16_t *>(temp.start()),
192
+ len);
193
193
  }
194
194
  }
195
195
 
File without changes
@@ -236,6 +236,7 @@ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
236
236
  this.active_ = true;
237
237
  this.condition_ = null;
238
238
  this.ignoreCount_ = 0;
239
+ this.break_points_ = [];
239
240
  }
240
241
 
241
242
 
@@ -289,13 +290,21 @@ ScriptBreakPoint.prototype.column = function() {
289
290
  };
290
291
 
291
292
 
293
+ ScriptBreakPoint.prototype.actual_locations = function() {
294
+ var locations = [];
295
+ for (var i = 0; i < this.break_points_.length; i++) {
296
+ locations.push(this.break_points_[i].actual_location);
297
+ }
298
+ return locations;
299
+ }
300
+
301
+
292
302
  ScriptBreakPoint.prototype.update_positions = function(line, column) {
293
303
  this.line_ = line;
294
304
  this.column_ = column;
295
305
  }
296
306
 
297
307
 
298
-
299
308
  ScriptBreakPoint.prototype.hit_count = function() {
300
309
  return this.hit_count_;
301
310
  };
@@ -335,10 +344,8 @@ ScriptBreakPoint.prototype.setIgnoreCount = function(ignoreCount) {
335
344
  this.ignoreCount_ = ignoreCount;
336
345
 
337
346
  // Set ignore count on all break points created from this script break point.
338
- for (var i = 0; i < break_points.length; i++) {
339
- if (break_points[i].script_break_point() === this) {
340
- break_points[i].setIgnoreCount(ignoreCount);
341
- }
347
+ for (var i = 0; i < this.break_points_.length; i++) {
348
+ this.break_points_[i].setIgnoreCount(ignoreCount);
342
349
  }
343
350
  };
344
351
 
@@ -380,17 +387,23 @@ ScriptBreakPoint.prototype.set = function (script) {
380
387
  }
381
388
 
382
389
  // Convert the line and column into an absolute position within the script.
383
- var pos = Debug.findScriptSourcePosition(script, this.line(), column);
390
+ var position = Debug.findScriptSourcePosition(script, this.line(), column);
384
391
 
385
392
  // If the position is not found in the script (the script might be shorter
386
393
  // than it used to be) just ignore it.
387
- if (pos === null) return;
394
+ if (position === null) return;
388
395
 
389
396
  // Create a break point object and set the break point.
390
- break_point = MakeBreakPoint(pos, this.line(), this.column(), this);
397
+ break_point = MakeBreakPoint(position, this.line(), this.column(), this);
391
398
  break_point.setIgnoreCount(this.ignoreCount());
392
- %SetScriptBreakPoint(script, pos, break_point);
393
-
399
+ var actual_position = %SetScriptBreakPoint(script, position, break_point);
400
+ if (IS_UNDEFINED(actual_position)) {
401
+ actual_position = position;
402
+ }
403
+ var actual_location = script.locationFromPosition(actual_position, true);
404
+ break_point.actual_location = { line: actual_location.line,
405
+ column: actual_location.column };
406
+ this.break_points_.push(break_point);
394
407
  return break_point;
395
408
  };
396
409
 
@@ -407,6 +420,7 @@ ScriptBreakPoint.prototype.clear = function () {
407
420
  }
408
421
  }
409
422
  break_points = remaining_break_points;
423
+ this.break_points_ = [];
410
424
  };
411
425
 
412
426
 
@@ -552,6 +566,19 @@ Debug.findBreakPoint = function(break_point_number, remove) {
552
566
  }
553
567
  };
554
568
 
569
+ Debug.findBreakPointActualLocations = function(break_point_number) {
570
+ for (var i = 0; i < script_break_points.length; i++) {
571
+ if (script_break_points[i].number() == break_point_number) {
572
+ return script_break_points[i].actual_locations();
573
+ }
574
+ }
575
+ for (var i = 0; i < break_points.length; i++) {
576
+ if (break_points[i].number() == break_point_number) {
577
+ return [break_points[i].actual_location];
578
+ }
579
+ }
580
+ return [];
581
+ }
555
582
 
556
583
  Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
557
584
  if (!IS_FUNCTION(func)) throw new Error('Parameters have wrong types.');
@@ -583,7 +610,12 @@ Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
583
610
  } else {
584
611
  // Set a break point directly on the function.
585
612
  var break_point = MakeBreakPoint(source_position, opt_line, opt_column);
586
- %SetFunctionBreakPoint(func, source_position, break_point);
613
+ var actual_position =
614
+ %SetFunctionBreakPoint(func, source_position, break_point);
615
+ actual_position += this.sourcePosition(func);
616
+ var actual_location = script.locationFromPosition(actual_position, true);
617
+ break_point.actual_location = { line: actual_location.line,
618
+ column: actual_location.column };
587
619
  break_point.setCondition(opt_condition);
588
620
  return break_point.number();
589
621
  }
@@ -1266,6 +1298,8 @@ DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
1266
1298
  this.clearBreakPointRequest_(request, response);
1267
1299
  } else if (request.command == 'clearbreakpointgroup') {
1268
1300
  this.clearBreakPointGroupRequest_(request, response);
1301
+ } else if (request.command == 'listbreakpoints') {
1302
+ this.listBreakpointsRequest_(request, response);
1269
1303
  } else if (request.command == 'backtrace') {
1270
1304
  this.backtraceRequest_(request, response);
1271
1305
  } else if (request.command == 'frame') {
@@ -1478,8 +1512,10 @@ DebugCommandProcessor.prototype.setBreakPointRequest_ =
1478
1512
  }
1479
1513
  response.body.line = break_point.line();
1480
1514
  response.body.column = break_point.column();
1515
+ response.body.actual_locations = break_point.actual_locations();
1481
1516
  } else {
1482
1517
  response.body.type = 'function';
1518
+ response.body.actual_locations = [break_point.actual_location];
1483
1519
  }
1484
1520
  };
1485
1521
 
@@ -1581,6 +1617,36 @@ DebugCommandProcessor.prototype.clearBreakPointRequest_ = function(request, resp
1581
1617
  response.body = { breakpoint: break_point }
1582
1618
  }
1583
1619
 
1620
+ DebugCommandProcessor.prototype.listBreakpointsRequest_ = function(request, response) {
1621
+ var array = [];
1622
+ for (var i = 0; i < script_break_points.length; i++) {
1623
+ var break_point = script_break_points[i];
1624
+
1625
+ var description = {
1626
+ number: break_point.number(),
1627
+ line: break_point.line(),
1628
+ column: break_point.column(),
1629
+ groupId: break_point.groupId(),
1630
+ hit_count: break_point.hit_count(),
1631
+ active: break_point.active(),
1632
+ condition: break_point.condition(),
1633
+ ignoreCount: break_point.ignoreCount(),
1634
+ actual_locations: break_point.actual_locations()
1635
+ }
1636
+
1637
+ if (break_point.type() == Debug.ScriptBreakPointType.ScriptId) {
1638
+ description.type = 'scriptId';
1639
+ description.script_id = break_point.script_id();
1640
+ } else {
1641
+ description.type = 'scriptName';
1642
+ description.script_name = break_point.script_name();
1643
+ }
1644
+ array.push(description);
1645
+ }
1646
+
1647
+ response.body = { breakpoints: array }
1648
+ }
1649
+
1584
1650
 
1585
1651
  DebugCommandProcessor.prototype.backtraceRequest_ = function(request, response) {
1586
1652
  // Get the number of frames.
@@ -2004,6 +2070,7 @@ DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response)
2004
2070
  return response.failed('Missing arguments');
2005
2071
  }
2006
2072
  var script_id = request.arguments.script_id;
2073
+ var preview_only = !!request.arguments.preview_only;
2007
2074
 
2008
2075
  var scripts = %DebugGetLoadedScripts();
2009
2076
 
@@ -2026,18 +2093,9 @@ DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response)
2026
2093
 
2027
2094
  var new_source = request.arguments.new_source;
2028
2095
 
2029
- try {
2030
- Debug.LiveEdit.SetScriptSource(the_script, new_source, change_log);
2031
- } catch (e) {
2032
- if (e instanceof Debug.LiveEdit.Failure) {
2033
- // Let's treat it as a "success" so that body with change_log will be
2034
- // sent back. "change_log" will have "failure" field set.
2035
- change_log.push( { failure: true, message: e.toString() } );
2036
- } else {
2037
- throw e;
2038
- }
2039
- }
2040
- response.body = {change_log: change_log};
2096
+ var result_description = Debug.LiveEdit.SetScriptSource(the_script,
2097
+ new_source, preview_only, change_log);
2098
+ response.body = {change_log: change_log, result: result_description};
2041
2099
  };
2042
2100
 
2043
2101
 
@@ -52,24 +52,35 @@ namespace internal {
52
52
  #ifdef ENABLE_DEBUGGER_SUPPORT
53
53
  static void PrintLn(v8::Local<v8::Value> value) {
54
54
  v8::Local<v8::String> s = value->ToString();
55
- char* data = NewArray<char>(s->Length() + 1);
56
- if (data == NULL) {
55
+ ScopedVector<char> data(s->Length() + 1);
56
+ if (data.start() == NULL) {
57
57
  V8::FatalProcessOutOfMemory("PrintLn");
58
58
  return;
59
59
  }
60
- s->WriteAscii(data);
61
- PrintF("%s\n", data);
62
- DeleteArray(data);
60
+ s->WriteAscii(data.start());
61
+ PrintF("%s\n", data.start());
63
62
  }
64
63
 
65
64
 
66
- static Handle<Code> ComputeCallDebugBreak(int argc) {
67
- CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugBreak(argc), Code);
65
+ static Handle<Code> ComputeCallDebugBreak(int argc, Code::Kind kind) {
66
+ CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugBreak(argc, kind), Code);
68
67
  }
69
68
 
70
69
 
71
- static Handle<Code> ComputeCallDebugPrepareStepIn(int argc) {
72
- CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugPrepareStepIn(argc), Code);
70
+ static Handle<Code> ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind) {
71
+ CALL_HEAP_FUNCTION(
72
+ StubCache::ComputeCallDebugPrepareStepIn(argc, kind), Code);
73
+ }
74
+
75
+
76
+ static v8::Handle<v8::Context> GetDebugEventContext() {
77
+ Handle<Context> context = Debug::debugger_entry()->GetContext();
78
+ // Top::context() may have been NULL when "script collected" event occured.
79
+ if (*context == NULL) {
80
+ return v8::Local<v8::Context>();
81
+ }
82
+ Handle<Context> global_context(context->global_context());
83
+ return v8::Utils::ToLocal(global_context);
73
84
  }
74
85
 
75
86
 
@@ -118,10 +129,14 @@ void BreakLocationIterator::Next() {
118
129
  ASSERT(statement_position_ >= 0);
119
130
  }
120
131
 
121
- // Check for breakable code target. Look in the original code as setting
122
- // break points can cause the code targets in the running (debugged) code to
123
- // be of a different kind than in the original code.
124
- if (RelocInfo::IsCodeTarget(rmode())) {
132
+ if (IsDebugBreakSlot()) {
133
+ // There is always a possible break point at a debug break slot.
134
+ break_point_++;
135
+ return;
136
+ } else if (RelocInfo::IsCodeTarget(rmode())) {
137
+ // Check for breakable code target. Look in the original code as setting
138
+ // break points can cause the code targets in the running (debugged) code
139
+ // to be of a different kind than in the original code.
125
140
  Address target = original_rinfo()->target_address();
126
141
  Code* code = Code::GetCodeFromTargetAddress(target);
127
142
  if ((code->is_inline_cache_stub() &&
@@ -318,6 +333,9 @@ void BreakLocationIterator::SetDebugBreak() {
318
333
  if (RelocInfo::IsJSReturn(rmode())) {
319
334
  // Patch the frame exit code with a break point.
320
335
  SetDebugBreakAtReturn();
336
+ } else if (IsDebugBreakSlot()) {
337
+ // Patch the code in the break slot.
338
+ SetDebugBreakAtSlot();
321
339
  } else {
322
340
  // Patch the IC call.
323
341
  SetDebugBreakAtIC();
@@ -335,6 +353,9 @@ void BreakLocationIterator::ClearDebugBreak() {
335
353
  if (RelocInfo::IsJSReturn(rmode())) {
336
354
  // Restore the frame exit code.
337
355
  ClearDebugBreakAtReturn();
356
+ } else if (IsDebugBreakSlot()) {
357
+ // Restore the code in the break slot.
358
+ ClearDebugBreakAtSlot();
338
359
  } else {
339
360
  // Patch the IC call.
340
361
  ClearDebugBreakAtIC();
@@ -350,13 +371,14 @@ void BreakLocationIterator::PrepareStepIn() {
350
371
  // construct call or CallFunction stub call.
351
372
  Address target = rinfo()->target_address();
352
373
  Handle<Code> code(Code::GetCodeFromTargetAddress(target));
353
- if (code->is_call_stub()) {
374
+ if (code->is_call_stub() || code->is_keyed_call_stub()) {
354
375
  // Step in through IC call is handled by the runtime system. Therefore make
355
376
  // sure that the any current IC is cleared and the runtime system is
356
377
  // called. If the executing code has a debug break at the location change
357
378
  // the call in the original code as it is the code there that will be
358
379
  // executed in place of the debug break call.
359
- Handle<Code> stub = ComputeCallDebugPrepareStepIn(code->arguments_count());
380
+ Handle<Code> stub = ComputeCallDebugPrepareStepIn(code->arguments_count(),
381
+ code->kind());
360
382
  if (IsDebugBreak()) {
361
383
  original_rinfo()->set_target_address(stub->entry());
362
384
  } else {
@@ -405,6 +427,8 @@ bool BreakLocationIterator::HasBreakPoint() {
405
427
  bool BreakLocationIterator::IsDebugBreak() {
406
428
  if (RelocInfo::IsJSReturn(rmode())) {
407
429
  return IsDebugBreakAtReturn();
430
+ } else if (IsDebugBreakSlot()) {
431
+ return IsDebugBreakAtSlot();
408
432
  } else {
409
433
  return Debug::IsDebugBreak(rinfo()->target_address());
410
434
  }
@@ -431,8 +455,13 @@ void BreakLocationIterator::SetDebugBreakAtIC() {
431
455
  // is set the patching performed by the runtime system will take place in
432
456
  // the code copy and will therefore have no effect on the running code
433
457
  // keeping it from using the inlined code.
434
- if (code->is_keyed_load_stub()) KeyedLoadIC::ClearInlinedVersion(pc());
435
- if (code->is_keyed_store_stub()) KeyedStoreIC::ClearInlinedVersion(pc());
458
+ if (code->is_keyed_load_stub()) {
459
+ KeyedLoadIC::ClearInlinedVersion(pc());
460
+ } else if (code->is_keyed_store_stub()) {
461
+ KeyedStoreIC::ClearInlinedVersion(pc());
462
+ } else if (code->is_load_stub()) {
463
+ LoadIC::ClearInlinedVersion(pc());
464
+ }
436
465
  }
437
466
  }
438
467
 
@@ -443,8 +472,9 @@ void BreakLocationIterator::ClearDebugBreakAtIC() {
443
472
 
444
473
  RelocInfo::Mode mode = rmode();
445
474
  if (RelocInfo::IsCodeTarget(mode)) {
475
+ AssertNoAllocation nogc;
446
476
  Address target = original_rinfo()->target_address();
447
- Handle<Code> code(Code::GetCodeFromTargetAddress(target));
477
+ Code* code = Code::GetCodeFromTargetAddress(target);
448
478
 
449
479
  // Restore the inlined version of keyed stores to get back to the
450
480
  // fast case. We need to patch back the keyed store because no
@@ -461,6 +491,11 @@ bool BreakLocationIterator::IsDebuggerStatement() {
461
491
  }
462
492
 
463
493
 
494
+ bool BreakLocationIterator::IsDebugBreakSlot() {
495
+ return RelocInfo::DEBUG_BREAK_SLOT == rmode();
496
+ }
497
+
498
+
464
499
  Object* BreakLocationIterator::BreakPointObjects() {
465
500
  return debug_info_->GetBreakPointObjects(code_position());
466
501
  }
@@ -556,6 +591,7 @@ bool Debug::break_on_uncaught_exception_ = true;
556
591
 
557
592
  Handle<Context> Debug::debug_context_ = Handle<Context>();
558
593
  Code* Debug::debug_break_return_ = NULL;
594
+ Code* Debug::debug_break_slot_ = NULL;
559
595
 
560
596
 
561
597
  void ScriptCache::Add(Handle<Script> script) {
@@ -639,12 +675,22 @@ void Debug::Setup(bool create_heap_objects) {
639
675
  debug_break_return_ =
640
676
  Builtins::builtin(Builtins::Return_DebugBreak);
641
677
  ASSERT(debug_break_return_->IsCode());
678
+ // Get code to handle debug break in debug break slots.
679
+ debug_break_slot_ =
680
+ Builtins::builtin(Builtins::Slot_DebugBreak);
681
+ ASSERT(debug_break_slot_->IsCode());
642
682
  }
643
683
  }
644
684
 
645
685
 
646
686
  void Debug::HandleWeakDebugInfo(v8::Persistent<v8::Value> obj, void* data) {
647
687
  DebugInfoListNode* node = reinterpret_cast<DebugInfoListNode*>(data);
688
+ // We need to clear all breakpoints associated with the function to restore
689
+ // original code and avoid patching the code twice later because
690
+ // the function will live in the heap until next gc, and can be found by
691
+ // Runtime::FindSharedFunctionInfoInScript.
692
+ BreakLocationIterator it(node->debug_info(), ALL_BREAK_LOCATIONS);
693
+ it.ClearAllDebugBreak();
648
694
  RemoveDebugInfo(node->debug_info());
649
695
  #ifdef DEBUG
650
696
  node = Debug::debug_info_list_;
@@ -713,7 +759,7 @@ bool Debug::CompileDebuggerScript(int index) {
713
759
  if (caught_exception) {
714
760
  Handle<Object> message = MessageHandler::MakeMessageObject(
715
761
  "error_loading_debugger", NULL, Vector<Handle<Object> >::empty(),
716
- Handle<String>());
762
+ Handle<String>(), Handle<JSArray>());
717
763
  MessageHandler::ReportMessage(NULL, message);
718
764
  return false;
719
765
  }
@@ -807,6 +853,7 @@ void Debug::PreemptionWhileInDebugger() {
807
853
 
808
854
  void Debug::Iterate(ObjectVisitor* v) {
809
855
  v->VisitPointer(BitCast<Object**, Code**>(&(debug_break_return_)));
856
+ v->VisitPointer(BitCast<Object**, Code**>(&(debug_break_slot_)));
810
857
  }
811
858
 
812
859
 
@@ -814,7 +861,7 @@ Object* Debug::Break(Arguments args) {
814
861
  HandleScope scope;
815
862
  ASSERT(args.length() == 0);
816
863
 
817
- thread_local_.frames_are_dropped_ = false;
864
+ thread_local_.frame_drop_mode_ = FRAMES_UNTOUCHED;
818
865
 
819
866
  // Get the top-most JavaScript frame.
820
867
  JavaScriptFrameIterator it;
@@ -892,12 +939,22 @@ Object* Debug::Break(Arguments args) {
892
939
  PrepareStep(step_action, step_count);
893
940
  }
894
941
 
895
- if (thread_local_.frames_are_dropped_) {
896
- // We must have been calling IC stub. Do not return there anymore.
942
+ if (thread_local_.frame_drop_mode_ == FRAMES_UNTOUCHED) {
943
+ SetAfterBreakTarget(frame);
944
+ } else if (thread_local_.frame_drop_mode_ == FRAME_DROPPED_IN_IC_CALL) {
945
+ // We must have been calling IC stub. Do not go there anymore.
897
946
  Code* plain_return = Builtins::builtin(Builtins::PlainReturn_LiveEdit);
898
947
  thread_local_.after_break_target_ = plain_return->entry();
948
+ } else if (thread_local_.frame_drop_mode_ ==
949
+ FRAME_DROPPED_IN_DEBUG_SLOT_CALL) {
950
+ // Debug break slot stub does not return normally, instead it manually
951
+ // cleans the stack and jumps. We should patch the jump address.
952
+ Code* plain_return = Builtins::builtin(Builtins::FrameDropper_LiveEdit);
953
+ thread_local_.after_break_target_ = plain_return->entry();
954
+ } else if (thread_local_.frame_drop_mode_ == FRAME_DROPPED_IN_DIRECT_CALL) {
955
+ // Nothing to do, after_break_target is not used here.
899
956
  } else {
900
- SetAfterBreakTarget(frame);
957
+ UNREACHABLE();
901
958
  }
902
959
 
903
960
  return Heap::undefined_value();
@@ -988,8 +1045,8 @@ Handle<DebugInfo> Debug::GetDebugInfo(Handle<SharedFunctionInfo> shared) {
988
1045
 
989
1046
 
990
1047
  void Debug::SetBreakPoint(Handle<SharedFunctionInfo> shared,
991
- int source_position,
992
- Handle<Object> break_point_object) {
1048
+ Handle<Object> break_point_object,
1049
+ int* source_position) {
993
1050
  HandleScope scope;
994
1051
 
995
1052
  if (!EnsureDebugInfo(shared)) {
@@ -1003,9 +1060,11 @@ void Debug::SetBreakPoint(Handle<SharedFunctionInfo> shared,
1003
1060
 
1004
1061
  // Find the break point and change it.
1005
1062
  BreakLocationIterator it(debug_info, SOURCE_BREAK_LOCATIONS);
1006
- it.FindBreakLocationFromPosition(source_position);
1063
+ it.FindBreakLocationFromPosition(*source_position);
1007
1064
  it.SetBreakPoint(break_point_object);
1008
1065
 
1066
+ *source_position = it.position();
1067
+
1009
1068
  // At least one active break point now.
1010
1069
  ASSERT(debug_info->GetBreakPointCount() > 0);
1011
1070
  }
@@ -1172,7 +1231,7 @@ void Debug::PrepareStep(StepAction step_action, int step_count) {
1172
1231
  if (RelocInfo::IsCodeTarget(it.rinfo()->rmode())) {
1173
1232
  Address target = it.rinfo()->target_address();
1174
1233
  Code* code = Code::GetCodeFromTargetAddress(target);
1175
- if (code->is_call_stub()) {
1234
+ if (code->is_call_stub() || code->is_keyed_call_stub()) {
1176
1235
  is_call_target = true;
1177
1236
  }
1178
1237
  if (code->is_inline_cache_stub()) {
@@ -1358,7 +1417,8 @@ Handle<Code> Debug::FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode) {
1358
1417
  if (code->is_inline_cache_stub()) {
1359
1418
  switch (code->kind()) {
1360
1419
  case Code::CALL_IC:
1361
- return ComputeCallDebugBreak(code->arguments_count());
1420
+ case Code::KEYED_CALL_IC:
1421
+ return ComputeCallDebugBreak(code->arguments_count(), code->kind());
1362
1422
 
1363
1423
  case Code::LOAD_IC:
1364
1424
  return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak));
@@ -1613,16 +1673,21 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) {
1613
1673
  // break point is still active after processing the break point.
1614
1674
  Address addr = frame->pc() - Assembler::kCallTargetAddressOffset;
1615
1675
 
1616
- // Check if the location is at JS exit.
1676
+ // Check if the location is at JS exit or debug break slot.
1617
1677
  bool at_js_return = false;
1618
1678
  bool break_at_js_return_active = false;
1679
+ bool at_debug_break_slot = false;
1619
1680
  RelocIterator it(debug_info->code());
1620
- while (!it.done()) {
1681
+ while (!it.done() && !at_js_return && !at_debug_break_slot) {
1621
1682
  if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) {
1622
1683
  at_js_return = (it.rinfo()->pc() ==
1623
1684
  addr - Assembler::kPatchReturnSequenceAddressOffset);
1624
1685
  break_at_js_return_active = it.rinfo()->IsPatchedReturnSequence();
1625
1686
  }
1687
+ if (RelocInfo::IsDebugBreakSlot(it.rinfo()->rmode())) {
1688
+ at_debug_break_slot = (it.rinfo()->pc() ==
1689
+ addr - Assembler::kPatchDebugBreakSlotAddressOffset);
1690
+ }
1626
1691
  it.next();
1627
1692
  }
1628
1693
 
@@ -1639,31 +1704,71 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) {
1639
1704
  // Move back to where the call instruction sequence started.
1640
1705
  thread_local_.after_break_target_ =
1641
1706
  addr - Assembler::kPatchReturnSequenceAddressOffset;
1642
- } else {
1643
- // Check if there still is a debug break call at the target address. If the
1644
- // break point has been removed it will have disappeared. If it have
1645
- // disappeared don't try to look in the original code as the running code
1646
- // will have the right address. This takes care of the case where the last
1647
- // break point is removed from the function and therefore no "original code"
1648
- // is available. If the debug break call is still there find the address in
1649
- // the original code.
1650
- if (IsDebugBreak(Assembler::target_address_at(addr))) {
1651
- // If the break point is still there find the call address which was
1652
- // overwritten in the original code by the call to DebugBreakXXX.
1653
-
1654
- // Find the corresponding address in the original code.
1655
- addr += original_code->instruction_start() - code->instruction_start();
1656
- }
1707
+ } else if (at_debug_break_slot) {
1708
+ // Address of where the debug break slot starts.
1709
+ addr = addr - Assembler::kPatchDebugBreakSlotAddressOffset;
1710
+
1711
+ // Continue just after the slot.
1712
+ thread_local_.after_break_target_ = addr + Assembler::kDebugBreakSlotLength;
1713
+ } else if (IsDebugBreak(Assembler::target_address_at(addr))) {
1714
+ // We now know that there is still a debug break call at the target address,
1715
+ // so the break point is still there and the original code will hold the
1716
+ // address to jump to in order to complete the call which is replaced by a
1717
+ // call to DebugBreakXXX.
1718
+
1719
+ // Find the corresponding address in the original code.
1720
+ addr += original_code->instruction_start() - code->instruction_start();
1657
1721
 
1658
1722
  // Install jump to the call address in the original code. This will be the
1659
1723
  // call which was overwritten by the call to DebugBreakXXX.
1660
1724
  thread_local_.after_break_target_ = Assembler::target_address_at(addr);
1725
+ } else {
1726
+ // There is no longer a break point present. Don't try to look in the
1727
+ // original code as the running code will have the right address. This takes
1728
+ // care of the case where the last break point is removed from the function
1729
+ // and therefore no "original code" is available.
1730
+ thread_local_.after_break_target_ = Assembler::target_address_at(addr);
1661
1731
  }
1662
1732
  }
1663
1733
 
1664
1734
 
1665
- void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id) {
1666
- thread_local_.frames_are_dropped_ = true;
1735
+ bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) {
1736
+ HandleScope scope;
1737
+
1738
+ // Get the executing function in which the debug break occurred.
1739
+ Handle<SharedFunctionInfo> shared =
1740
+ Handle<SharedFunctionInfo>(JSFunction::cast(frame->function())->shared());
1741
+ if (!EnsureDebugInfo(shared)) {
1742
+ // Return if we failed to retrieve the debug info.
1743
+ return false;
1744
+ }
1745
+ Handle<DebugInfo> debug_info = GetDebugInfo(shared);
1746
+ Handle<Code> code(debug_info->code());
1747
+ #ifdef DEBUG
1748
+ // Get the code which is actually executing.
1749
+ Handle<Code> frame_code(frame->code());
1750
+ ASSERT(frame_code.is_identical_to(code));
1751
+ #endif
1752
+
1753
+ // Find the call address in the running code.
1754
+ Address addr = frame->pc() - Assembler::kCallTargetAddressOffset;
1755
+
1756
+ // Check if the location is at JS return.
1757
+ RelocIterator it(debug_info->code());
1758
+ while (!it.done()) {
1759
+ if (RelocInfo::IsJSReturn(it.rinfo()->rmode())) {
1760
+ return (it.rinfo()->pc() ==
1761
+ addr - Assembler::kPatchReturnSequenceAddressOffset);
1762
+ }
1763
+ it.next();
1764
+ }
1765
+ return false;
1766
+ }
1767
+
1768
+
1769
+ void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
1770
+ FrameDropMode mode) {
1771
+ thread_local_.frame_drop_mode_ = mode;
1667
1772
  thread_local_.break_frame_id_ = new_break_frame_id;
1668
1773
  }
1669
1774
 
@@ -1777,6 +1882,7 @@ int Debugger::host_dispatch_micros_ = 100 * 1000;
1777
1882
  DebuggerAgent* Debugger::agent_ = NULL;
1778
1883
  LockingCommandMessageQueue Debugger::command_queue_(kQueueInitialSize);
1779
1884
  Semaphore* Debugger::command_received_ = OS::CreateSemaphore(0);
1885
+ LockingCommandMessageQueue Debugger::event_command_queue_(kQueueInitialSize);
1780
1886
 
1781
1887
 
1782
1888
  Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name,
@@ -2102,37 +2208,75 @@ void Debugger::ProcessDebugEvent(v8::DebugEvent event,
2102
2208
  event_data,
2103
2209
  auto_continue);
2104
2210
  }
2105
- // Notify registered debug event listener. This can be either a C or a
2106
- // JavaScript function.
2107
- if (!event_listener_.is_null()) {
2108
- if (event_listener_->IsProxy()) {
2109
- // C debug event listener.
2110
- Handle<Proxy> callback_obj(Handle<Proxy>::cast(event_listener_));
2111
- v8::Debug::EventCallback callback =
2112
- FUNCTION_CAST<v8::Debug::EventCallback>(callback_obj->proxy());
2113
- callback(event,
2114
- v8::Utils::ToLocal(Handle<JSObject>::cast(exec_state)),
2115
- v8::Utils::ToLocal(event_data),
2116
- v8::Utils::ToLocal(Handle<Object>::cast(event_listener_data_)));
2117
- } else {
2118
- // JavaScript debug event listener.
2119
- ASSERT(event_listener_->IsJSFunction());
2120
- Handle<JSFunction> fun(Handle<JSFunction>::cast(event_listener_));
2121
-
2122
- // Invoke the JavaScript debug event listener.
2123
- const int argc = 4;
2124
- Object** argv[argc] = { Handle<Object>(Smi::FromInt(event)).location(),
2125
- exec_state.location(),
2126
- Handle<Object>::cast(event_data).location(),
2127
- event_listener_data_.location() };
2128
- Handle<Object> result = Execution::TryCall(fun, Top::global(),
2129
- argc, argv, &caught_exception);
2130
- // Silently ignore exceptions from debug event listeners.
2211
+ // Notify registered debug event listener. This can be either a C or
2212
+ // a JavaScript function. Don't call event listener for v8::Break
2213
+ // here, if it's only a debug command -- they will be processed later.
2214
+ if ((event != v8::Break || !auto_continue) && !event_listener_.is_null()) {
2215
+ CallEventCallback(event, exec_state, event_data, NULL);
2216
+ }
2217
+ // Process pending debug commands.
2218
+ if (event == v8::Break) {
2219
+ while (!event_command_queue_.IsEmpty()) {
2220
+ CommandMessage command = event_command_queue_.Get();
2221
+ if (!event_listener_.is_null()) {
2222
+ CallEventCallback(v8::BreakForCommand,
2223
+ exec_state,
2224
+ event_data,
2225
+ command.client_data());
2226
+ }
2227
+ command.Dispose();
2131
2228
  }
2132
2229
  }
2133
2230
  }
2134
2231
 
2135
2232
 
2233
+ void Debugger::CallEventCallback(v8::DebugEvent event,
2234
+ Handle<Object> exec_state,
2235
+ Handle<Object> event_data,
2236
+ v8::Debug::ClientData* client_data) {
2237
+ if (event_listener_->IsProxy()) {
2238
+ CallCEventCallback(event, exec_state, event_data, client_data);
2239
+ } else {
2240
+ CallJSEventCallback(event, exec_state, event_data);
2241
+ }
2242
+ }
2243
+
2244
+
2245
+ void Debugger::CallCEventCallback(v8::DebugEvent event,
2246
+ Handle<Object> exec_state,
2247
+ Handle<Object> event_data,
2248
+ v8::Debug::ClientData* client_data) {
2249
+ Handle<Proxy> callback_obj(Handle<Proxy>::cast(event_listener_));
2250
+ v8::Debug::EventCallback2 callback =
2251
+ FUNCTION_CAST<v8::Debug::EventCallback2>(callback_obj->proxy());
2252
+ EventDetailsImpl event_details(
2253
+ event,
2254
+ Handle<JSObject>::cast(exec_state),
2255
+ Handle<JSObject>::cast(event_data),
2256
+ event_listener_data_,
2257
+ client_data);
2258
+ callback(event_details);
2259
+ }
2260
+
2261
+
2262
+ void Debugger::CallJSEventCallback(v8::DebugEvent event,
2263
+ Handle<Object> exec_state,
2264
+ Handle<Object> event_data) {
2265
+ ASSERT(event_listener_->IsJSFunction());
2266
+ Handle<JSFunction> fun(Handle<JSFunction>::cast(event_listener_));
2267
+
2268
+ // Invoke the JavaScript debug event listener.
2269
+ const int argc = 4;
2270
+ Object** argv[argc] = { Handle<Object>(Smi::FromInt(event)).location(),
2271
+ exec_state.location(),
2272
+ Handle<Object>::cast(event_data).location(),
2273
+ event_listener_data_.location() };
2274
+ bool caught_exception = false;
2275
+ Execution::TryCall(fun, Top::global(), argc, argv, &caught_exception);
2276
+ // Silently ignore exceptions from debug event listeners.
2277
+ }
2278
+
2279
+
2136
2280
  Handle<Context> Debugger::GetDebugContext() {
2137
2281
  never_unload_debugger_ = true;
2138
2282
  EnterDebugger debugger;
@@ -2166,6 +2310,7 @@ void Debugger::NotifyMessageHandler(v8::DebugEvent event,
2166
2310
  bool sendEventMessage = false;
2167
2311
  switch (event) {
2168
2312
  case v8::Break:
2313
+ case v8::BreakForCommand:
2169
2314
  sendEventMessage = !auto_continue;
2170
2315
  break;
2171
2316
  case v8::Exception:
@@ -2453,6 +2598,17 @@ bool Debugger::HasCommands() {
2453
2598
  }
2454
2599
 
2455
2600
 
2601
+ void Debugger::EnqueueDebugCommand(v8::Debug::ClientData* client_data) {
2602
+ CommandMessage message = CommandMessage::New(Vector<uint16_t>(), client_data);
2603
+ event_command_queue_.Put(message);
2604
+
2605
+ // Set the debug command break flag to have the command processed.
2606
+ if (!Debug::InDebugger()) {
2607
+ StackGuard::DebugCommand();
2608
+ }
2609
+ }
2610
+
2611
+
2456
2612
  bool Debugger::IsDebuggerActive() {
2457
2613
  ScopedLock with(debugger_access_);
2458
2614
 
@@ -2639,14 +2795,10 @@ v8::Handle<v8::String> MessageImpl::GetJSON() const {
2639
2795
 
2640
2796
 
2641
2797
  v8::Handle<v8::Context> MessageImpl::GetEventContext() const {
2642
- Handle<Context> context = Debug::debugger_entry()->GetContext();
2643
- // Top::context() may have been NULL when "script collected" event occured.
2644
- if (*context == NULL) {
2645
- ASSERT(event_ == v8::ScriptCollected);
2646
- return v8::Local<v8::Context>();
2647
- }
2648
- Handle<Context> global_context(context->global_context());
2649
- return v8::Utils::ToLocal(global_context);
2798
+ v8::Handle<v8::Context> context = GetDebugEventContext();
2799
+ // Top::context() may be NULL when "script collected" event occures.
2800
+ ASSERT(!context.IsEmpty() || event_ == v8::ScriptCollected);
2801
+ return GetDebugEventContext();
2650
2802
  }
2651
2803
 
2652
2804
 
@@ -2655,6 +2807,48 @@ v8::Debug::ClientData* MessageImpl::GetClientData() const {
2655
2807
  }
2656
2808
 
2657
2809
 
2810
+ EventDetailsImpl::EventDetailsImpl(DebugEvent event,
2811
+ Handle<JSObject> exec_state,
2812
+ Handle<JSObject> event_data,
2813
+ Handle<Object> callback_data,
2814
+ v8::Debug::ClientData* client_data)
2815
+ : event_(event),
2816
+ exec_state_(exec_state),
2817
+ event_data_(event_data),
2818
+ callback_data_(callback_data),
2819
+ client_data_(client_data) {}
2820
+
2821
+
2822
+ DebugEvent EventDetailsImpl::GetEvent() const {
2823
+ return event_;
2824
+ }
2825
+
2826
+
2827
+ v8::Handle<v8::Object> EventDetailsImpl::GetExecutionState() const {
2828
+ return v8::Utils::ToLocal(exec_state_);
2829
+ }
2830
+
2831
+
2832
+ v8::Handle<v8::Object> EventDetailsImpl::GetEventData() const {
2833
+ return v8::Utils::ToLocal(event_data_);
2834
+ }
2835
+
2836
+
2837
+ v8::Handle<v8::Context> EventDetailsImpl::GetEventContext() const {
2838
+ return GetDebugEventContext();
2839
+ }
2840
+
2841
+
2842
+ v8::Handle<v8::Value> EventDetailsImpl::GetCallbackData() const {
2843
+ return v8::Utils::ToLocal(callback_data_);
2844
+ }
2845
+
2846
+
2847
+ v8::Debug::ClientData* EventDetailsImpl::GetClientData() const {
2848
+ return client_data_;
2849
+ }
2850
+
2851
+
2658
2852
  CommandMessage::CommandMessage() : text_(Vector<uint16_t>::empty()),
2659
2853
  client_data_(NULL) {
2660
2854
  }