therubyracer 0.6.3 → 0.7.0.pre

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 (520) hide show
  1. data/Rakefile +10 -9
  2. data/ext/v8/callbacks.cpp +15 -8
  3. data/ext/v8/converters.cpp +7 -8
  4. data/ext/v8/converters.h +0 -2
  5. data/ext/v8/extconf.rb +2 -0
  6. data/ext/v8/rr.cpp +169 -0
  7. data/ext/v8/rr.h +34 -0
  8. data/ext/v8/upstream/{2.0.6 → 2.1.10}/AUTHORS +8 -1
  9. data/ext/v8/upstream/{2.0.6 → 2.1.10}/ChangeLog +198 -0
  10. data/ext/v8/upstream/{2.0.6 → 2.1.10}/LICENSE +0 -0
  11. data/ext/v8/upstream/{2.0.6 → 2.1.10}/SConstruct +152 -38
  12. data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8-debug.h +52 -4
  13. data/ext/v8/upstream/2.1.10/include/v8-profiler.h +176 -0
  14. data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8.h +227 -48
  15. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/SConscript +60 -10
  16. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.cc +5 -39
  17. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.h +0 -0
  18. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.cc +0 -0
  19. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.h +0 -0
  20. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.cc +477 -57
  21. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.h +8 -4
  22. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apinatives.js +1 -1
  23. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apiutils.h +0 -0
  24. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arguments.h +5 -6
  25. data/ext/v8/upstream/{2.0.6/src/arm/assembler-thumb2-inl.h → 2.1.10/src/arm/assembler-arm-inl.h} +42 -27
  26. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.cc +430 -216
  27. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.h +199 -110
  28. data/ext/v8/upstream/{2.0.6/src/arm/assembler-arm-inl.h → 2.1.10/src/arm/assembler-thumb2-inl.h} +4 -18
  29. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.cc +142 -85
  30. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.h +18 -9
  31. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/builtins-arm.cc +127 -87
  32. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm-inl.h +3 -5
  33. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm.cc +4634 -1427
  34. data/ext/v8/upstream/2.1.10/src/arm/codegen-arm.h +946 -0
  35. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.cc +21 -3
  36. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.h +39 -13
  37. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/cpu-arm.cc +9 -3
  38. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/debug-arm.cc +34 -8
  39. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/disasm-arm.cc +262 -117
  40. data/ext/v8/upstream/2.1.10/src/arm/fast-codegen-arm.cc +238 -0
  41. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.cc +0 -0
  42. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.h +0 -0
  43. data/ext/v8/upstream/{2.0.6/src/arm/fast-codegen-arm.cc → 2.1.10/src/arm/full-codegen-arm.cc} +453 -283
  44. data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +1833 -0
  45. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/jump-target-arm.cc +3 -29
  46. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.cc +564 -104
  47. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.h +255 -46
  48. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.cc +78 -104
  49. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.h +6 -22
  50. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm-inl.h +0 -3
  51. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.cc +0 -0
  52. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.h +2 -1
  53. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.cc +557 -180
  54. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.h +52 -4
  55. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/stub-cache-arm.cc +904 -240
  56. data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.cc +668 -0
  57. data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.h +503 -0
  58. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/array.js +82 -109
  59. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.cc +49 -13
  60. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.h +27 -5
  61. data/ext/v8/upstream/2.1.10/src/ast.cc +1138 -0
  62. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ast.h +354 -53
  63. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.cc +609 -501
  64. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.h +27 -8
  65. data/ext/v8/upstream/2.1.10/src/builtins.cc +1512 -0
  66. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/builtins.h +41 -25
  67. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bytecodes-irregexp.h +0 -0
  68. data/ext/v8/upstream/2.1.10/src/cached-powers.h +119 -0
  69. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates-inl.h +0 -0
  70. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates.h +0 -0
  71. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.cc +0 -0
  72. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.h +25 -1
  73. data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +101 -0
  74. data/ext/v8/upstream/2.1.10/src/circular-queue.cc +121 -0
  75. data/ext/v8/upstream/2.1.10/src/circular-queue.h +129 -0
  76. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.cc +23 -8
  77. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.h +16 -4
  78. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code.h +0 -0
  79. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen-inl.h +6 -34
  80. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.cc +73 -92
  81. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.h +164 -68
  82. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.cc +117 -73
  83. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.h +18 -17
  84. data/ext/v8/upstream/2.1.10/src/compiler.cc +623 -0
  85. data/ext/v8/upstream/2.1.10/src/compiler.h +299 -0
  86. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.cc +0 -0
  87. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.h +8 -11
  88. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions-inl.h +28 -13
  89. data/ext/v8/upstream/2.1.10/src/conversions.cc +1105 -0
  90. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions.h +9 -4
  91. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.cc +0 -0
  92. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.h +1 -1
  93. data/ext/v8/upstream/2.1.10/src/cpu-profiler-inl.h +99 -0
  94. data/ext/v8/upstream/2.1.10/src/cpu-profiler.cc +494 -0
  95. data/ext/v8/upstream/2.1.10/src/cpu-profiler.h +277 -0
  96. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/cpu.h +0 -0
  97. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.cc +15 -4
  98. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.h +0 -0
  99. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-posix.cc +18 -0
  100. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-readline.cc +2 -2
  101. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-windows.cc +0 -0
  102. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.cc +10 -6
  103. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.h +2 -0
  104. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.js +43 -38
  105. data/ext/v8/upstream/2.1.10/src/data-flow.cc +755 -0
  106. data/ext/v8/upstream/2.1.10/src/data-flow.h +278 -0
  107. data/ext/v8/upstream/{2.0.6/src/date-delay.js → 2.1.10/src/date.js} +100 -110
  108. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser-inl.h +11 -2
  109. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.cc +24 -26
  110. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.h +8 -4
  111. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.cc +3 -1
  112. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.h +0 -0
  113. data/ext/v8/upstream/{2.0.6/src/debug-delay.js → 2.1.10/src/debug-debugger.js} +111 -15
  114. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.cc +156 -96
  115. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.h +53 -5
  116. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disasm.h +0 -0
  117. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.cc +2 -8
  118. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.h +0 -0
  119. data/ext/v8/upstream/2.1.10/src/diy-fp.cc +58 -0
  120. data/ext/v8/upstream/2.1.10/src/diy-fp.h +117 -0
  121. data/ext/v8/upstream/2.1.10/src/double.h +169 -0
  122. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dtoa-config.c +4 -3
  123. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.cc +22 -22
  124. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.h +17 -4
  125. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.cc +70 -46
  126. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.h +27 -17
  127. data/ext/v8/upstream/2.1.10/src/fast-codegen.cc +746 -0
  128. data/ext/v8/upstream/2.1.10/src/fast-codegen.h +161 -0
  129. data/ext/v8/upstream/2.1.10/src/fast-dtoa.cc +512 -0
  130. data/ext/v8/upstream/2.1.10/src/fast-dtoa.h +59 -0
  131. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flag-definitions.h +32 -11
  132. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.cc +0 -0
  133. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.h +0 -0
  134. data/ext/v8/upstream/2.1.10/src/flow-graph.cc +763 -0
  135. data/ext/v8/upstream/2.1.10/src/flow-graph.h +180 -0
  136. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.cc +1 -4
  137. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.h +49 -11
  138. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames-inl.h +2 -0
  139. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.cc +91 -17
  140. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.h +24 -2
  141. data/ext/v8/upstream/{2.0.6/src/fast-codegen.cc → 2.1.10/src/full-codegen.cc} +549 -198
  142. data/ext/v8/upstream/{2.0.6/src/fast-codegen.h → 2.1.10/src/full-codegen.h} +109 -29
  143. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.cc +0 -0
  144. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.h +0 -0
  145. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.cc +0 -0
  146. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.h +0 -0
  147. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/globals.h +67 -43
  148. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles-inl.h +0 -0
  149. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.cc +124 -129
  150. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.h +33 -15
  151. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.cc +0 -0
  152. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.h +0 -0
  153. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-inl.h +56 -12
  154. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.cc +2 -2
  155. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.h +2 -0
  156. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.cc +413 -221
  157. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.h +192 -67
  158. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32-inl.h +6 -0
  159. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.cc +187 -32
  160. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.h +31 -4
  161. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/builtins-ia32.cc +160 -133
  162. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32-inl.h +0 -0
  163. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32.cc +5533 -2177
  164. data/ext/v8/upstream/{2.0.6/src/x64/codegen-x64.h → 2.1.10/src/ia32/codegen-ia32.h} +453 -134
  165. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/cpu-ia32.cc +0 -0
  166. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/debug-ia32.cc +63 -8
  167. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/disasm-ia32.cc +99 -16
  168. data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.cc +950 -0
  169. data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.h +155 -0
  170. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.cc +0 -0
  171. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.h +0 -0
  172. data/ext/v8/upstream/{2.0.6/src/ia32/fast-codegen-ia32.cc → 2.1.10/src/ia32/full-codegen-ia32.cc} +454 -253
  173. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/ic-ia32.cc +545 -390
  174. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/jump-target-ia32.cc +1 -0
  175. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.cc +330 -139
  176. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.h +96 -30
  177. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.cc +73 -89
  178. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.h +6 -21
  179. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32-inl.h +0 -0
  180. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.cc +59 -5
  181. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.h +0 -0
  182. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.cc +0 -0
  183. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.h +2 -2
  184. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/stub-cache-ia32.cc +745 -303
  185. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.cc +278 -71
  186. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.h +78 -22
  187. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic-inl.h +0 -0
  188. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.cc +172 -89
  189. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.h +51 -20
  190. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.cc +0 -0
  191. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.h +0 -0
  192. data/ext/v8/upstream/{2.0.6/src/json-delay.js → 2.1.10/src/json.js} +26 -12
  193. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.cc +151 -118
  194. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.h +31 -7
  195. data/ext/v8/upstream/2.1.10/src/jump-target-heavy-inl.h +51 -0
  196. data/ext/v8/upstream/{2.0.6/src/jump-target.cc → 2.1.10/src/jump-target-heavy.cc} +164 -184
  197. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target-inl.h +8 -9
  198. data/ext/v8/upstream/{2.0.6/src/usage-analyzer.h → 2.1.10/src/jump-target-light-inl.h} +9 -7
  199. data/ext/v8/upstream/2.1.10/src/jump-target-light.cc +86 -0
  200. data/ext/v8/upstream/2.1.10/src/jump-target.cc +155 -0
  201. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target.h +6 -0
  202. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list-inl.h +0 -0
  203. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list.h +2 -1
  204. data/ext/v8/upstream/2.1.10/src/liveedit-debugger.js +944 -0
  205. data/ext/v8/upstream/2.1.10/src/liveedit.cc +1468 -0
  206. data/ext/v8/upstream/2.1.10/src/liveedit.h +170 -0
  207. data/ext/v8/upstream/2.1.10/src/log-inl.h +59 -0
  208. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.cc +3 -9
  209. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.h +1 -4
  210. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.cc +198 -95
  211. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.h +50 -49
  212. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macro-assembler.h +9 -0
  213. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macros.py +30 -11
  214. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.cc +464 -152
  215. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.h +41 -20
  216. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/math.js +9 -8
  217. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/memory.h +0 -0
  218. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.cc +1 -0
  219. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.h +0 -0
  220. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.js +46 -9
  221. data/ext/v8/upstream/2.1.10/src/mips/assembler-mips-inl.h +215 -0
  222. data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.cc +1208 -0
  223. data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.h +665 -0
  224. data/ext/v8/upstream/2.1.10/src/mips/builtins-mips.cc +202 -0
  225. data/ext/v8/upstream/2.1.10/src/mips/codegen-mips-inl.h +70 -0
  226. data/ext/v8/upstream/2.1.10/src/mips/codegen-mips.cc +1428 -0
  227. data/ext/v8/upstream/{2.0.6/src/arm/codegen-arm.h → 2.1.10/src/mips/codegen-mips.h} +103 -205
  228. data/ext/v8/upstream/2.1.10/src/mips/constants-mips.cc +323 -0
  229. data/ext/v8/upstream/2.1.10/src/mips/constants-mips.h +525 -0
  230. data/ext/v8/upstream/2.1.10/src/mips/cpu-mips.cc +69 -0
  231. data/ext/v8/upstream/2.1.10/src/mips/debug-mips.cc +128 -0
  232. data/ext/v8/upstream/2.1.10/src/mips/disasm-mips.cc +784 -0
  233. data/ext/v8/upstream/2.1.10/src/mips/fast-codegen-mips.cc +74 -0
  234. data/ext/v8/upstream/2.1.10/src/mips/frames-mips.cc +99 -0
  235. data/ext/v8/upstream/2.1.10/src/mips/frames-mips.h +164 -0
  236. data/ext/v8/upstream/2.1.10/src/mips/full-codegen-mips.cc +273 -0
  237. data/ext/v8/upstream/2.1.10/src/mips/ic-mips.cc +217 -0
  238. data/ext/v8/upstream/2.1.10/src/mips/jump-target-mips.cc +172 -0
  239. data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.cc +1323 -0
  240. data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.h +461 -0
  241. data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips-inl.h +137 -0
  242. data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.cc +60 -0
  243. data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.h +46 -0
  244. data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.cc +1648 -0
  245. data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.h +311 -0
  246. data/ext/v8/upstream/2.1.10/src/mips/stub-cache-mips.cc +400 -0
  247. data/ext/v8/upstream/2.1.10/src/mips/virtual-frame-mips.cc +316 -0
  248. data/ext/v8/upstream/{2.0.6/src/arm/virtual-frame-arm.h → 2.1.10/src/mips/virtual-frame-mips.h} +87 -71
  249. data/ext/v8/upstream/{2.0.6/src/mirror-delay.js → 2.1.10/src/mirror-debugger.js} +51 -45
  250. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mksnapshot.cc +97 -10
  251. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/natives.h +6 -6
  252. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-debug.cc +47 -5
  253. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-inl.h +154 -38
  254. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.cc +528 -280
  255. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.h +302 -95
  256. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.cc +25 -33
  257. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.h +9 -1
  258. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.cc +444 -72
  259. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.h +4 -2
  260. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-freebsd.cc +32 -13
  261. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-linux.cc +59 -25
  262. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-macos.cc +30 -13
  263. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-nullos.cc +0 -0
  264. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-openbsd.cc +21 -2
  265. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-posix.cc +0 -18
  266. data/ext/v8/upstream/2.1.10/src/platform-solaris.cc +607 -0
  267. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-win32.cc +16 -17
  268. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform.h +25 -8
  269. data/ext/v8/upstream/2.1.10/src/powers-ten.h +2461 -0
  270. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.cc +49 -29
  271. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.h +3 -1
  272. data/ext/v8/upstream/2.1.10/src/profile-generator-inl.h +124 -0
  273. data/ext/v8/upstream/2.1.10/src/profile-generator.cc +583 -0
  274. data/ext/v8/upstream/2.1.10/src/profile-generator.h +364 -0
  275. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.cc +1 -1
  276. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.h +12 -24
  277. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp-inl.h +2 -2
  278. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.cc +2 -2
  279. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.h +2 -2
  280. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.cc +2 -2
  281. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.h +0 -0
  282. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.cc +33 -10
  283. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.h +12 -4
  284. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.cc +0 -0
  285. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.h +0 -0
  286. data/ext/v8/upstream/{2.0.6/src/regexp-delay.js → 2.1.10/src/regexp.js} +180 -58
  287. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator-inl.h +68 -1
  288. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.cc +5 -2
  289. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.h +42 -17
  290. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.cc +110 -4
  291. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.h +0 -0
  292. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.cc +2733 -623
  293. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.h +43 -20
  294. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.js +46 -35
  295. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.cc +278 -36
  296. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.h +97 -26
  297. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.cc +3 -3
  298. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.h +1 -0
  299. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.cc +11 -12
  300. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.h +0 -1
  301. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.cc +298 -175
  302. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.h +184 -40
  303. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/shell.h +0 -0
  304. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/simulator.h +2 -0
  305. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/smart-pointer.h +0 -0
  306. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot-common.cc +16 -31
  307. data/ext/v8/upstream/2.1.10/src/snapshot-empty.cc +50 -0
  308. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot.h +13 -1
  309. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces-inl.h +35 -27
  310. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.cc +256 -42
  311. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.h +136 -42
  312. data/ext/v8/upstream/{2.0.6/src/zone-inl.h → 2.1.10/src/splay-tree-inl.h} +102 -89
  313. data/ext/v8/upstream/2.1.10/src/splay-tree.h +203 -0
  314. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.cc +0 -0
  315. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.h +0 -0
  316. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string.js +260 -149
  317. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.cc +195 -69
  318. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.h +127 -12
  319. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/COPYING +0 -0
  320. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/dtoa.c +0 -0
  321. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/valgrind/valgrind.h +0 -0
  322. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.cc +0 -0
  323. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.h +0 -0
  324. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.cc +26 -31
  325. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.h +3 -4
  326. data/ext/v8/upstream/2.1.10/src/type-info.cc +53 -0
  327. data/ext/v8/upstream/2.1.10/src/type-info.h +244 -0
  328. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode-inl.h +0 -0
  329. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.cc +0 -0
  330. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.h +0 -0
  331. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/uri.js +6 -6
  332. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.cc +0 -37
  333. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.h +121 -50
  334. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.cc +0 -0
  335. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.h +130 -98
  336. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.cc +42 -11
  337. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.h +4 -2
  338. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8natives.js +202 -37
  339. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.cc +11 -0
  340. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.h +15 -0
  341. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.cc +7 -51
  342. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.h +5 -35
  343. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.cc +3 -3
  344. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.h +0 -0
  345. data/ext/v8/upstream/2.1.10/src/virtual-frame-heavy-inl.h +152 -0
  346. data/ext/v8/upstream/{2.0.6/src/virtual-frame.cc → 2.1.10/src/virtual-frame-heavy.cc} +107 -176
  347. data/ext/v8/upstream/2.1.10/src/virtual-frame-inl.h +39 -0
  348. data/ext/v8/upstream/2.1.10/src/virtual-frame-light-inl.h +69 -0
  349. data/ext/v8/upstream/2.1.10/src/virtual-frame-light.cc +49 -0
  350. data/ext/v8/upstream/2.1.10/src/virtual-frame.cc +49 -0
  351. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/virtual-frame.h +2 -0
  352. data/ext/v8/upstream/{2.0.6/src/log-inl.h → 2.1.10/src/vm-state-inl.h} +28 -20
  353. data/ext/v8/upstream/{2.0.6/src/snapshot-empty.cc → 2.1.10/src/vm-state.cc} +5 -6
  354. data/ext/v8/upstream/2.1.10/src/vm-state.h +75 -0
  355. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64-inl.h +11 -0
  356. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.cc +285 -93
  357. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.h +81 -78
  358. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/builtins-x64.cc +130 -87
  359. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64-inl.h +0 -0
  360. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64.cc +4520 -1317
  361. data/ext/v8/upstream/{2.0.6/src/ia32/codegen-ia32.h → 2.1.10/src/x64/codegen-x64.h} +362 -141
  362. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/cpu-x64.cc +0 -0
  363. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/debug-x64.cc +20 -4
  364. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/disasm-x64.cc +121 -44
  365. data/ext/v8/upstream/2.1.10/src/x64/fast-codegen-x64.cc +246 -0
  366. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.cc +0 -0
  367. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.h +0 -0
  368. data/ext/v8/upstream/{2.0.6/src/x64/fast-codegen-x64.cc → 2.1.10/src/x64/full-codegen-x64.cc} +404 -231
  369. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/ic-x64.cc +346 -117
  370. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/jump-target-x64.cc +1 -0
  371. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.cc +537 -181
  372. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.h +140 -34
  373. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.cc +74 -96
  374. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.h +8 -25
  375. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64-inl.h +1 -1
  376. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.cc +3 -0
  377. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.h +0 -0
  378. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.cc +0 -0
  379. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.h +2 -2
  380. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/stub-cache-x64.cc +785 -288
  381. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.cc +128 -52
  382. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.h +40 -19
  383. data/ext/v8/upstream/2.1.10/src/zone-inl.h +82 -0
  384. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.cc +1 -0
  385. data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.h +6 -90
  386. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/codemap.js +12 -0
  387. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/consarray.js +0 -0
  388. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/csvparser.js +22 -37
  389. data/ext/v8/upstream/2.1.10/tools/generate-ten-powers.scm +286 -0
  390. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/gyp/v8.gyp +86 -24
  391. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/js2c.py +22 -22
  392. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/jsmin.py +0 -0
  393. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor +10 -1
  394. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor.py +0 -0
  395. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/logreader.js +34 -16
  396. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-nm +0 -0
  397. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-tick-processor +0 -0
  398. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/annotate +0 -0
  399. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/common +0 -0
  400. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/dump +0 -0
  401. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/report +0 -0
  402. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/reset +0 -0
  403. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/run +0 -0
  404. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/shutdown +0 -0
  405. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/start +0 -0
  406. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/presubmit.py +0 -0
  407. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/process-heap-prof.py +0 -0
  408. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile.js +70 -0
  409. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile_view.js +0 -0
  410. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/run-valgrind.py +0 -0
  411. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.js +0 -0
  412. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.py +0 -0
  413. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/stats-viewer.py +0 -0
  414. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/test.py +7 -7
  415. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor-driver.js +7 -1
  416. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.js +140 -9
  417. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.py +40 -4
  418. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/utils.py +6 -0
  419. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/README.txt +0 -0
  420. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/arm.vsprops +1 -1
  421. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/common.vsprops +1 -2
  422. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8.vcproj +0 -6
  423. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_arm.vcproj +193 -199
  424. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_x64.vcproj +16 -8
  425. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8js2c.cmd +0 -0
  426. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/debug.vsprops +0 -0
  427. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/ia32.vsprops +5 -1
  428. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/js2c.cmd +1 -1
  429. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/release.vsprops +0 -0
  430. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.sln +0 -0
  431. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.vcproj +11 -7
  432. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.sln +0 -0
  433. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.vcproj +227 -223
  434. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base.vcproj +137 -5
  435. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_arm.vcproj +116 -4
  436. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_x64.vcproj +125 -4
  437. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest.vcproj +12 -6
  438. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_arm.vcproj +12 -6
  439. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_x64.vcproj +11 -11
  440. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot.vcproj +0 -6
  441. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -6
  442. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample.vcproj +0 -6
  443. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_arm.vcproj +145 -151
  444. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_x64.vcproj +16 -6
  445. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample.vcproj +0 -6
  446. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_arm.vcproj +145 -151
  447. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_x64.vcproj +16 -8
  448. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  449. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  450. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  451. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  452. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.sln +0 -0
  453. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.vcproj +11 -7
  454. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/x64.vsprops +5 -1
  455. data/ext/v8/upstream/2.1.10/tools/windows-tick-processor.bat +29 -0
  456. data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/windows-tick-processor.py +0 -0
  457. data/ext/v8/upstream/Makefile +8 -2
  458. data/ext/v8/v8.cpp +21 -73
  459. data/ext/v8/v8_array.cpp +56 -0
  460. data/ext/v8/v8_array.h +8 -0
  461. data/ext/v8/v8_callbacks.cpp +121 -0
  462. data/ext/v8/v8_callbacks.h +8 -0
  463. data/ext/v8/v8_cxt.cpp +74 -77
  464. data/ext/v8/v8_cxt.h +2 -9
  465. data/ext/v8/v8_date.cpp +26 -0
  466. data/ext/v8/v8_date.h +6 -0
  467. data/ext/v8/v8_exception.cpp +55 -0
  468. data/ext/v8/v8_exception.h +6 -0
  469. data/ext/v8/v8_external.cpp +50 -0
  470. data/ext/v8/v8_external.h +8 -0
  471. data/ext/v8/v8_func.cpp +76 -18
  472. data/ext/v8/v8_func.h +5 -4
  473. data/ext/v8/v8_msg.cpp +55 -46
  474. data/ext/v8/v8_msg.h +3 -11
  475. data/ext/v8/v8_obj.cpp +67 -36
  476. data/ext/v8/v8_obj.h +6 -8
  477. data/ext/v8/v8_ref.cpp +25 -9
  478. data/ext/v8/v8_ref.h +3 -5
  479. data/ext/v8/v8_script.cpp +17 -10
  480. data/ext/v8/v8_script.h +3 -3
  481. data/ext/v8/v8_str.cpp +34 -6
  482. data/ext/v8/v8_str.h +4 -2
  483. data/ext/v8/v8_template.cpp +195 -33
  484. data/ext/v8/v8_template.h +4 -5
  485. data/ext/v8/v8_try_catch.cpp +99 -0
  486. data/ext/v8/v8_try_catch.h +5 -0
  487. data/ext/v8/v8_value.cpp +164 -0
  488. data/ext/v8/v8_value.h +10 -0
  489. data/lib/v8.rb +3 -1
  490. data/lib/v8/access.rb +60 -0
  491. data/lib/v8/array.rb +15 -0
  492. data/lib/v8/callbacks.rb +88 -0
  493. data/lib/v8/cli.rb +1 -1
  494. data/lib/v8/context.rb +55 -66
  495. data/lib/v8/function.rb +20 -2
  496. data/lib/v8/object.rb +14 -12
  497. data/lib/v8/ruby_error.rb +3 -0
  498. data/lib/v8/to.rb +59 -7
  499. data/spec/ext/cxt_spec.rb +2 -15
  500. data/spec/ext/func_spec.rb +17 -10
  501. data/spec/ext/try_catch_spec.rb +32 -0
  502. data/spec/foo.rb +17 -0
  503. data/spec/redjs/jsapi_spec.rb +173 -96
  504. data/spec/spec_helper.rb +7 -0
  505. data/spec/v8/to_spec.rb +0 -1
  506. data/therubyracer.gemspec +6 -6
  507. metadata +493 -386
  508. data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +0 -849
  509. data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +0 -412
  510. data/ext/v8/upstream/2.0.6/src/ast.cc +0 -512
  511. data/ext/v8/upstream/2.0.6/src/builtins.cc +0 -851
  512. data/ext/v8/upstream/2.0.6/src/compiler.cc +0 -1132
  513. data/ext/v8/upstream/2.0.6/src/compiler.h +0 -107
  514. data/ext/v8/upstream/2.0.6/src/conversions.cc +0 -709
  515. data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +0 -426
  516. data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +0 -5
  517. data/ext/v8/upstream/no-strict-aliasing.patch +0 -13
  518. data/ext/v8/v8_standalone.cpp +0 -69
  519. data/ext/v8/v8_standalone.h +0 -31
  520. data/spec/ext/obj_spec.rb +0 -13
@@ -54,16 +54,25 @@ bool DateParser::Parse(Vector<Char> str, FixedArray* out) {
54
54
  } else {
55
55
  // n + ":"
56
56
  if (!time.Add(n)) return false;
57
+ in.Skip('.');
57
58
  }
59
+ } else if (in.Skip('.') && time.IsExpecting(n)) {
60
+ time.Add(n);
61
+ if (!in.IsAsciiDigit()) return false;
62
+ int n = in.ReadUnsignedNumber();
63
+ time.AddFinal(n);
58
64
  } else if (tz.IsExpecting(n)) {
59
65
  tz.SetAbsoluteMinute(n);
60
66
  } else if (time.IsExpecting(n)) {
61
67
  time.AddFinal(n);
62
- // Require end or white space immediately after finalizing time.
63
- if (!in.IsEnd() && !in.SkipWhiteSpace()) return false;
68
+ // Require end, white space or Z immediately after finalizing time.
69
+ if (!in.IsEnd() && !in.SkipWhiteSpace() && !in.Is('Z')) return false;
64
70
  } else {
65
71
  if (!day.Add(n)) return false;
66
72
  in.Skip('-'); // Ignore suffix '-' for year, month, or day.
73
+ // Skip trailing 'T' for ECMAScript 5 date string format but make
74
+ // sure that it is followed by a digit (for the time).
75
+ if (in.Skip('T') && !in.IsAsciiDigit()) return false;
67
76
  }
68
77
  } else if (in.IsAsciiAlphaOrAbove()) {
69
78
  // Parse a "word" (sequence of chars. >= 'A').
@@ -33,6 +33,16 @@ 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
+
41
+ // Day and month defaults to 1.
42
+ while (index_ < kSize) {
43
+ comp_[index_++] = 1;
44
+ }
45
+
36
46
  int year = 0; // Default year is 0 (=> 2000) for KJS compatibility.
37
47
  int month = kNone;
38
48
  int day = kNone;
@@ -72,15 +82,9 @@ bool DateParser::DayComposer::Write(FixedArray* output) {
72
82
 
73
83
  if (!Smi::IsValid(year) || !IsMonth(month) || !IsDay(day)) return false;
74
84
 
75
- output->set(YEAR,
76
- Smi::FromInt(year),
77
- SKIP_WRITE_BARRIER);
78
- output->set(MONTH,
79
- Smi::FromInt(month - 1),
80
- SKIP_WRITE_BARRIER); // 0-based
81
- output->set(DAY,
82
- Smi::FromInt(day),
83
- SKIP_WRITE_BARRIER);
85
+ output->set(YEAR, Smi::FromInt(year));
86
+ output->set(MONTH, Smi::FromInt(month - 1)); // 0-based
87
+ output->set(DAY, Smi::FromInt(day));
84
88
  return true;
85
89
  }
86
90
 
@@ -94,6 +98,7 @@ bool DateParser::TimeComposer::Write(FixedArray* output) {
94
98
  int& hour = comp_[0];
95
99
  int& minute = comp_[1];
96
100
  int& second = comp_[2];
101
+ int& millisecond = comp_[3];
97
102
 
98
103
  if (hour_offset_ != kNone) {
99
104
  if (!IsHour12(hour)) return false;
@@ -101,17 +106,13 @@ bool DateParser::TimeComposer::Write(FixedArray* output) {
101
106
  hour += hour_offset_;
102
107
  }
103
108
 
104
- if (!IsHour(hour) || !IsMinute(minute) || !IsSecond(second)) return false;
105
-
106
- output->set(HOUR,
107
- Smi::FromInt(hour),
108
- SKIP_WRITE_BARRIER);
109
- output->set(MINUTE,
110
- Smi::FromInt(minute),
111
- SKIP_WRITE_BARRIER);
112
- output->set(SECOND,
113
- Smi::FromInt(second),
114
- SKIP_WRITE_BARRIER);
109
+ if (!IsHour(hour) || !IsMinute(minute) ||
110
+ !IsSecond(second) || !IsMillisecond(millisecond)) return false;
111
+
112
+ output->set(HOUR, Smi::FromInt(hour));
113
+ output->set(MINUTE, Smi::FromInt(minute));
114
+ output->set(SECOND, Smi::FromInt(second));
115
+ output->set(MILLISECOND, Smi::FromInt(millisecond));
115
116
  return true;
116
117
  }
117
118
 
@@ -121,13 +122,9 @@ bool DateParser::TimeZoneComposer::Write(FixedArray* output) {
121
122
  if (minute_ == kNone) minute_ = 0;
122
123
  int total_seconds = sign_ * (hour_ * 3600 + minute_ * 60);
123
124
  if (!Smi::IsValid(total_seconds)) return false;
124
- output->set(UTC_OFFSET,
125
- Smi::FromInt(total_seconds),
126
- SKIP_WRITE_BARRIER);
125
+ output->set(UTC_OFFSET, Smi::FromInt(total_seconds));
127
126
  } else {
128
- output->set(UTC_OFFSET,
129
- Heap::null_value(),
130
- SKIP_WRITE_BARRIER);
127
+ output->set_null(UTC_OFFSET);
131
128
  }
132
129
  return true;
133
130
  }
@@ -150,6 +147,7 @@ const int8_t DateParser::KeywordTable::
150
147
  {'p', 'm', '\0', DateParser::AM_PM, 12},
151
148
  {'u', 't', '\0', DateParser::TIME_ZONE_NAME, 0},
152
149
  {'u', 't', 'c', DateParser::TIME_ZONE_NAME, 0},
150
+ {'z', '\0', '\0', DateParser::TIME_ZONE_NAME, 0},
153
151
  {'g', 'm', 't', DateParser::TIME_ZONE_NAME, 0},
154
152
  {'c', 'd', 't', DateParser::TIME_ZONE_NAME, -5},
155
153
  {'c', 's', 't', DateParser::TIME_ZONE_NAME, -6},
@@ -44,13 +44,14 @@ class DateParser : public AllStatic {
44
44
  // [3]: hour
45
45
  // [4]: minute
46
46
  // [5]: second
47
- // [6]: UTC offset in seconds, or null value if no timezone specified
47
+ // [6]: millisecond
48
+ // [7]: UTC offset in seconds, or null value if no timezone specified
48
49
  // If parsing fails, return false (content of output array is not defined).
49
50
  template <typename Char>
50
51
  static bool Parse(Vector<Char> str, FixedArray* output);
51
52
 
52
53
  enum {
53
- YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, UTC_OFFSET, OUTPUT_SIZE
54
+ YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, MILLISECOND, UTC_OFFSET, OUTPUT_SIZE
54
55
  };
55
56
 
56
57
  private:
@@ -189,7 +190,9 @@ class DateParser : public AllStatic {
189
190
  TimeComposer() : index_(0), hour_offset_(kNone) {}
190
191
  bool IsEmpty() const { return index_ == 0; }
191
192
  bool IsExpecting(int n) const {
192
- return (index_ == 1 && IsMinute(n)) || (index_ == 2 && IsSecond(n));
193
+ return (index_ == 1 && IsMinute(n)) ||
194
+ (index_ == 2 && IsSecond(n)) ||
195
+ (index_ == 3 && IsMillisecond(n));
193
196
  }
194
197
  bool Add(int n) {
195
198
  return index_ < kSize ? (comp_[index_++] = n, true) : false;
@@ -207,8 +210,9 @@ class DateParser : public AllStatic {
207
210
  static bool IsHour(int x) { return Between(x, 0, 23); }
208
211
  static bool IsHour12(int x) { return Between(x, 0, 12); }
209
212
  static bool IsSecond(int x) { return Between(x, 0, 59); }
213
+ static bool IsMillisecond(int x) { return Between(x, 0, 999); }
210
214
 
211
- static const int kSize = 3;
215
+ static const int kSize = 4;
212
216
  int comp_[kSize];
213
217
  int index_;
214
218
  int hour_offset_;
@@ -54,10 +54,12 @@ void DebuggerAgent::Run() {
54
54
  while (!bound && !terminate_) {
55
55
  bound = server_->Bind(port_);
56
56
 
57
- // If an error occoured wait a bit before retrying. The most common error
57
+ // If an error occurred wait a bit before retrying. The most common error
58
58
  // would be that the port is already in use so this avoids a busy loop and
59
59
  // make the agent take over the port when it becomes free.
60
60
  if (!bound) {
61
+ PrintF("Failed to open socket on port %d, "
62
+ "waiting %d ms before retrying\n", port_, kOneSecondInMicros / 1000);
61
63
  terminate_now_->Wait(kOneSecondInMicros);
62
64
  }
63
65
  }
@@ -239,6 +239,21 @@ function ScriptBreakPoint(type, script_id_or_name, opt_line, opt_column,
239
239
  }
240
240
 
241
241
 
242
+ //Creates a clone of script breakpoint that is linked to another script.
243
+ ScriptBreakPoint.prototype.cloneForOtherScript = function (other_script) {
244
+ var copy = new ScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId,
245
+ other_script.id, this.line_, this.column_, this.groupId_);
246
+ copy.number_ = next_break_point_number++;
247
+ script_break_points.push(copy);
248
+
249
+ copy.hit_count_ = this.hit_count_;
250
+ copy.active_ = this.active_;
251
+ copy.condition_ = this.condition_;
252
+ copy.ignoreCount_ = this.ignoreCount_;
253
+ return copy;
254
+ }
255
+
256
+
242
257
  ScriptBreakPoint.prototype.number = function() {
243
258
  return this.number_;
244
259
  };
@@ -274,6 +289,13 @@ ScriptBreakPoint.prototype.column = function() {
274
289
  };
275
290
 
276
291
 
292
+ ScriptBreakPoint.prototype.update_positions = function(line, column) {
293
+ this.line_ = line;
294
+ this.column_ = column;
295
+ }
296
+
297
+
298
+
277
299
  ScriptBreakPoint.prototype.hit_count = function() {
278
300
  return this.hit_count_;
279
301
  };
@@ -327,7 +349,7 @@ ScriptBreakPoint.prototype.matchesScript = function(script) {
327
349
  if (this.type_ == Debug.ScriptBreakPointType.ScriptId) {
328
350
  return this.script_id_ == script.id;
329
351
  } else { // this.type_ == Debug.ScriptBreakPointType.ScriptName
330
- return this.script_name_ == script.name &&
352
+ return this.script_name_ == script.nameOrSourceURL() &&
331
353
  script.line_offset <= this.line_ &&
332
354
  this.line_ < script.line_offset + script.lineCount();
333
355
  }
@@ -400,6 +422,17 @@ function UpdateScriptBreakPoints(script) {
400
422
  }
401
423
 
402
424
 
425
+ function GetScriptBreakPoints(script) {
426
+ var result = [];
427
+ for (var i = 0; i < script_break_points.length; i++) {
428
+ if (script_break_points[i].matchesScript(script)) {
429
+ result.push(script_break_points[i]);
430
+ }
431
+ }
432
+ return result;
433
+ }
434
+
435
+
403
436
  Debug.setListener = function(listener, opt_data) {
404
437
  if (!IS_FUNCTION(listener) && !IS_UNDEFINED(listener) && !IS_NULL(listener)) {
405
438
  throw new Error('Parameters have wrong types.');
@@ -474,6 +507,11 @@ Debug.disassembleConstructor = function(f) {
474
507
  return %DebugDisassembleConstructor(f);
475
508
  };
476
509
 
510
+ Debug.ExecuteInDebugContext = function(f, without_debugger) {
511
+ if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
512
+ return %ExecuteInDebugContext(f, !!without_debugger);
513
+ };
514
+
477
515
  Debug.sourcePosition = function(f) {
478
516
  if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.');
479
517
  return %FunctionGetScriptSourcePosition(f);
@@ -778,6 +816,8 @@ ExecutionState.prototype.threadCount = function() {
778
816
  ExecutionState.prototype.frame = function(opt_index) {
779
817
  // If no index supplied return the selected frame.
780
818
  if (opt_index == null) opt_index = this.selected_frame;
819
+ if (opt_index < 0 || opt_index >= this.frameCount())
820
+ throw new Error('Illegal frame index.');
781
821
  return new FrameMirror(this.break_id, opt_index);
782
822
  };
783
823
 
@@ -1202,11 +1242,16 @@ DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
1202
1242
  throw new Error('Command not specified');
1203
1243
  }
1204
1244
 
1205
- // TODO(yurys): remove request.arguments.compactFormat check once
1206
- // ChromeDevTools are switched to 'inlineRefs'
1207
- if (request.arguments && (request.arguments.inlineRefs ||
1208
- request.arguments.compactFormat)) {
1209
- response.setOption('inlineRefs', true);
1245
+ if (request.arguments) {
1246
+ var args = request.arguments;
1247
+ // TODO(yurys): remove request.arguments.compactFormat check once
1248
+ // ChromeDevTools are switched to 'inlineRefs'
1249
+ if (args.inlineRefs || args.compactFormat) {
1250
+ response.setOption('inlineRefs', true);
1251
+ }
1252
+ if (!IS_UNDEFINED(args.maxStringLength)) {
1253
+ response.setOption('maxStringLength', args.maxStringLength);
1254
+ }
1210
1255
  }
1211
1256
 
1212
1257
  if (request.command == 'continue') {
@@ -1246,7 +1291,9 @@ DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
1246
1291
  } else if (request.command == 'version') {
1247
1292
  this.versionRequest_(request, response);
1248
1293
  } else if (request.command == 'profile') {
1249
- this.profileRequest_(request, response);
1294
+ this.profileRequest_(request, response);
1295
+ } else if (request.command == 'changelive') {
1296
+ this.changeLiveRequest_(request, response);
1250
1297
  } else {
1251
1298
  throw new Error('Unknown command "' + request.command + '" in request');
1252
1299
  }
@@ -1265,7 +1312,7 @@ DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
1265
1312
  // Response controls running state.
1266
1313
  this.running_ = response.running;
1267
1314
  }
1268
- response.running = this.running_;
1315
+ response.running = this.running_;
1269
1316
  return response.toJSONProtocol();
1270
1317
  } catch (e) {
1271
1318
  // Failed to generate response - return generic error.
@@ -1704,7 +1751,7 @@ DebugCommandProcessor.prototype.evaluateRequest_ = function(request, response) {
1704
1751
  if (global) {
1705
1752
  // Evaluate in the global context.
1706
1753
  response.body =
1707
- this.exec_state_.evaluateGlobal(expression), Boolean(disable_break);
1754
+ this.exec_state_.evaluateGlobal(expression, Boolean(disable_break));
1708
1755
  return;
1709
1756
  }
1710
1757
 
@@ -1861,12 +1908,12 @@ DebugCommandProcessor.prototype.scriptsRequest_ = function(request, response) {
1861
1908
  return response.failed('Invalid types "' + request.arguments.types + '"');
1862
1909
  }
1863
1910
  }
1864
-
1911
+
1865
1912
  if (!IS_UNDEFINED(request.arguments.includeSource)) {
1866
1913
  includeSource = %ToBoolean(request.arguments.includeSource);
1867
1914
  response.setOption('includeSource', includeSource);
1868
1915
  }
1869
-
1916
+
1870
1917
  if (IS_ARRAY(request.arguments.ids)) {
1871
1918
  idsToInclude = {};
1872
1919
  var ids = request.arguments.ids;
@@ -1934,10 +1981,14 @@ DebugCommandProcessor.prototype.profileRequest_ = function(request, response) {
1934
1981
  if (isNaN(modules)) {
1935
1982
  return response.failed('Modules is not an integer');
1936
1983
  }
1984
+ var tag = parseInt(request.arguments.tag);
1985
+ if (isNaN(tag)) {
1986
+ tag = 0;
1987
+ }
1937
1988
  if (request.arguments.command == 'resume') {
1938
- %ProfilerResume(modules);
1989
+ %ProfilerResume(modules, tag);
1939
1990
  } else if (request.arguments.command == 'pause') {
1940
- %ProfilerPause(modules);
1991
+ %ProfilerPause(modules, tag);
1941
1992
  } else {
1942
1993
  return response.failed('Unknown command');
1943
1994
  }
@@ -1945,6 +1996,51 @@ DebugCommandProcessor.prototype.profileRequest_ = function(request, response) {
1945
1996
  };
1946
1997
 
1947
1998
 
1999
+ DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response) {
2000
+ if (!Debug.LiveEdit) {
2001
+ return response.failed('LiveEdit feature is not supported');
2002
+ }
2003
+ if (!request.arguments) {
2004
+ return response.failed('Missing arguments');
2005
+ }
2006
+ var script_id = request.arguments.script_id;
2007
+
2008
+ var scripts = %DebugGetLoadedScripts();
2009
+
2010
+ var the_script = null;
2011
+ for (var i = 0; i < scripts.length; i++) {
2012
+ if (scripts[i].id == script_id) {
2013
+ the_script = scripts[i];
2014
+ }
2015
+ }
2016
+ if (!the_script) {
2017
+ response.failed('Script not found');
2018
+ return;
2019
+ }
2020
+
2021
+ var change_log = new Array();
2022
+
2023
+ if (!IS_STRING(request.arguments.new_source)) {
2024
+ throw "new_source argument expected";
2025
+ }
2026
+
2027
+ var new_source = request.arguments.new_source;
2028
+
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};
2041
+ };
2042
+
2043
+
1948
2044
  // Check whether the previously processed command caused the VM to become
1949
2045
  // running.
1950
2046
  DebugCommandProcessor.prototype.isRunning = function() {
@@ -2017,7 +2113,7 @@ function ObjectToProtocolObject_(object, mirror_serializer) {
2017
2113
  }
2018
2114
  }
2019
2115
  }
2020
-
2116
+
2021
2117
  return content;
2022
2118
  }
2023
2119
 
@@ -2040,7 +2136,7 @@ function ArrayToProtocolArray_(array, mirror_serializer) {
2040
2136
 
2041
2137
 
2042
2138
  /**
2043
- * Convert a value to its debugger protocol representation.
2139
+ * Convert a value to its debugger protocol representation.
2044
2140
  * @param {*} value The value to format as protocol value.
2045
2141
  * @param {MirrorSerializer} mirror_serializer The serializer to use if any
2046
2142
  * mirror objects are encountered.
@@ -31,6 +31,7 @@
31
31
  #include "arguments.h"
32
32
  #include "bootstrapper.h"
33
33
  #include "code-stubs.h"
34
+ #include "codegen.h"
34
35
  #include "compilation-cache.h"
35
36
  #include "compiler.h"
36
37
  #include "debug.h"
@@ -38,6 +39,7 @@
38
39
  #include "global-handles.h"
39
40
  #include "ic.h"
40
41
  #include "ic-inl.h"
42
+ #include "messages.h"
41
43
  #include "natives.h"
42
44
  #include "stub-cache.h"
43
45
  #include "log.h"
@@ -75,9 +77,6 @@ BreakLocationIterator::BreakLocationIterator(Handle<DebugInfo> debug_info,
75
77
  BreakLocatorType type) {
76
78
  debug_info_ = debug_info;
77
79
  type_ = type;
78
- // Get the stub early to avoid possible GC during iterations. We may need
79
- // this stub to detect debugger calls generated from debugger statements.
80
- debug_break_stub_ = RuntimeStub(Runtime::kDebugBreak, 0).GetCode();
81
80
  reloc_iterator_ = NULL;
82
81
  reloc_iterator_original_ = NULL;
83
82
  Reset(); // Initialize the rest of the member variables.
@@ -125,7 +124,9 @@ void BreakLocationIterator::Next() {
125
124
  if (RelocInfo::IsCodeTarget(rmode())) {
126
125
  Address target = original_rinfo()->target_address();
127
126
  Code* code = Code::GetCodeFromTargetAddress(target);
128
- if (code->is_inline_cache_stub() || RelocInfo::IsConstructCall(rmode())) {
127
+ if ((code->is_inline_cache_stub() &&
128
+ code->kind() != Code::BINARY_OP_IC) ||
129
+ RelocInfo::IsConstructCall(rmode())) {
129
130
  break_point_++;
130
131
  return;
131
132
  }
@@ -456,17 +457,7 @@ void BreakLocationIterator::ClearDebugBreakAtIC() {
456
457
 
457
458
 
458
459
  bool BreakLocationIterator::IsDebuggerStatement() {
459
- if (RelocInfo::IsCodeTarget(rmode())) {
460
- Address target = original_rinfo()->target_address();
461
- Code* code = Code::GetCodeFromTargetAddress(target);
462
- if (code->kind() == Code::STUB) {
463
- CodeStub::Major major_key = code->major_key();
464
- if (major_key == CodeStub::Runtime) {
465
- return (*debug_break_stub_ == code);
466
- }
467
- }
468
- }
469
- return false;
460
+ return RelocInfo::DEBUG_BREAK == rmode();
470
461
  }
471
462
 
472
463
 
@@ -694,22 +685,26 @@ bool Debug::CompileDebuggerScript(int index) {
694
685
  // Compile the script.
695
686
  bool allow_natives_syntax = FLAG_allow_natives_syntax;
696
687
  FLAG_allow_natives_syntax = true;
697
- Handle<JSFunction> boilerplate;
698
- boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL);
688
+ Handle<SharedFunctionInfo> function_info;
689
+ function_info = Compiler::Compile(source_code,
690
+ script_name,
691
+ 0, 0, NULL, NULL,
692
+ Handle<String>::null(),
693
+ NATIVES_CODE);
699
694
  FLAG_allow_natives_syntax = allow_natives_syntax;
700
695
 
701
696
  // Silently ignore stack overflows during compilation.
702
- if (boilerplate.is_null()) {
697
+ if (function_info.is_null()) {
703
698
  ASSERT(Top::has_pending_exception());
704
699
  Top::clear_pending_exception();
705
700
  return false;
706
701
  }
707
702
 
708
- // Execute the boilerplate function in the debugger context.
703
+ // Execute the shared function in the debugger context.
709
704
  Handle<Context> context = Top::global_context();
710
705
  bool caught_exception = false;
711
706
  Handle<JSFunction> function =
712
- Factory::NewFunctionFromBoilerplate(boilerplate, context);
707
+ Factory::NewFunctionFromSharedFunctionInfo(function_info, context);
713
708
  Handle<Object> result =
714
709
  Execution::TryCall(function, Handle<Object>(context->global()),
715
710
  0, NULL, &caught_exception);
@@ -766,6 +761,12 @@ bool Debug::Load() {
766
761
  bool caught_exception =
767
762
  !CompileDebuggerScript(Natives::GetIndex("mirror")) ||
768
763
  !CompileDebuggerScript(Natives::GetIndex("debug"));
764
+
765
+ if (FLAG_enable_liveedit) {
766
+ caught_exception = caught_exception ||
767
+ !CompileDebuggerScript(Natives::GetIndex("liveedit"));
768
+ }
769
+
769
770
  Debugger::set_compiling_natives(false);
770
771
 
771
772
  // Make sure we mark the debugger as not loading before we might
@@ -805,7 +806,7 @@ void Debug::PreemptionWhileInDebugger() {
805
806
 
806
807
 
807
808
  void Debug::Iterate(ObjectVisitor* v) {
808
- v->VisitPointer(bit_cast<Object**, Code**>(&(debug_break_return_)));
809
+ v->VisitPointer(BitCast<Object**, Code**>(&(debug_break_return_)));
809
810
  }
810
811
 
811
812
 
@@ -813,6 +814,8 @@ Object* Debug::Break(Arguments args) {
813
814
  HandleScope scope;
814
815
  ASSERT(args.length() == 0);
815
816
 
817
+ thread_local_.frames_are_dropped_ = false;
818
+
816
819
  // Get the top-most JavaScript frame.
817
820
  JavaScriptFrameIterator it;
818
821
  JavaScriptFrame* frame = it.frame();
@@ -889,8 +892,13 @@ Object* Debug::Break(Arguments args) {
889
892
  PrepareStep(step_action, step_count);
890
893
  }
891
894
 
892
- // Install jump to the call address which was overwritten.
893
- SetAfterBreakTarget(frame);
895
+ if (thread_local_.frames_are_dropped_) {
896
+ // We must have been calling IC stub. Do not return there anymore.
897
+ Code* plain_return = Builtins::builtin(Builtins::PlainReturn_LiveEdit);
898
+ thread_local_.after_break_target_ = plain_return->entry();
899
+ } else {
900
+ SetAfterBreakTarget(frame);
901
+ }
894
902
 
895
903
  return Heap::undefined_value();
896
904
  }
@@ -1241,12 +1249,14 @@ void Debug::PrepareStep(StepAction step_action, int step_count) {
1241
1249
  uint32_t key = Smi::cast(*obj)->value();
1242
1250
  // Argc in the stub is the number of arguments passed - not the
1243
1251
  // expected arguments of the called function.
1244
- int call_function_arg_count = CodeStub::MinorKeyFromKey(key);
1252
+ int call_function_arg_count =
1253
+ CallFunctionStub::ExtractArgcFromMinorKey(
1254
+ CodeStub::MinorKeyFromKey(key));
1245
1255
  ASSERT(call_function_stub->major_key() ==
1246
1256
  CodeStub::MajorKeyFromKey(key));
1247
1257
 
1248
1258
  // Find target function on the expression stack.
1249
- // Expression stack lools like this (top to bottom):
1259
+ // Expression stack looks like this (top to bottom):
1250
1260
  // argN
1251
1261
  // ...
1252
1262
  // arg0
@@ -1346,24 +1356,26 @@ Handle<Code> Debug::FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode) {
1346
1356
  // Find the builtin debug break function matching the calling convention
1347
1357
  // used by the call site.
1348
1358
  if (code->is_inline_cache_stub()) {
1349
- if (code->is_call_stub()) {
1350
- return ComputeCallDebugBreak(code->arguments_count());
1351
- }
1352
- if (code->is_load_stub()) {
1353
- return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak));
1354
- }
1355
- if (code->is_store_stub()) {
1356
- return Handle<Code>(Builtins::builtin(Builtins::StoreIC_DebugBreak));
1357
- }
1358
- if (code->is_keyed_load_stub()) {
1359
- Handle<Code> result =
1360
- Handle<Code>(Builtins::builtin(Builtins::KeyedLoadIC_DebugBreak));
1361
- return result;
1362
- }
1363
- if (code->is_keyed_store_stub()) {
1364
- Handle<Code> result =
1365
- Handle<Code>(Builtins::builtin(Builtins::KeyedStoreIC_DebugBreak));
1366
- return result;
1359
+ switch (code->kind()) {
1360
+ case Code::CALL_IC:
1361
+ return ComputeCallDebugBreak(code->arguments_count());
1362
+
1363
+ case Code::LOAD_IC:
1364
+ return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak));
1365
+
1366
+ case Code::STORE_IC:
1367
+ return Handle<Code>(Builtins::builtin(Builtins::StoreIC_DebugBreak));
1368
+
1369
+ case Code::KEYED_LOAD_IC:
1370
+ return Handle<Code>(
1371
+ Builtins::builtin(Builtins::KeyedLoadIC_DebugBreak));
1372
+
1373
+ case Code::KEYED_STORE_IC:
1374
+ return Handle<Code>(
1375
+ Builtins::builtin(Builtins::KeyedStoreIC_DebugBreak));
1376
+
1377
+ default:
1378
+ UNREACHABLE();
1367
1379
  }
1368
1380
  }
1369
1381
  if (RelocInfo::IsConstructCall(mode)) {
@@ -1524,19 +1536,13 @@ void Debug::ClearStepNext() {
1524
1536
  }
1525
1537
 
1526
1538
 
1527
- bool Debug::EnsureCompiled(Handle<SharedFunctionInfo> shared) {
1528
- if (shared->is_compiled()) return true;
1529
- return CompileLazyShared(shared, CLEAR_EXCEPTION, 0);
1530
- }
1531
-
1532
-
1533
1539
  // Ensures the debug information is present for shared.
1534
1540
  bool Debug::EnsureDebugInfo(Handle<SharedFunctionInfo> shared) {
1535
1541
  // Return if we already have the debug info for shared.
1536
1542
  if (HasDebugInfo(shared)) return true;
1537
1543
 
1538
1544
  // Ensure shared in compiled. Return false if this failed.
1539
- if (!EnsureCompiled(shared)) return false;
1545
+ if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) return false;
1540
1546
 
1541
1547
  // Create the debug info object.
1542
1548
  Handle<DebugInfo> debug_info = Factory::NewDebugInfo(shared);
@@ -1656,6 +1662,12 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) {
1656
1662
  }
1657
1663
 
1658
1664
 
1665
+ void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id) {
1666
+ thread_local_.frames_are_dropped_ = true;
1667
+ thread_local_.break_frame_id_ = new_break_frame_id;
1668
+ }
1669
+
1670
+
1659
1671
  bool Debug::IsDebugGlobal(GlobalObject* global) {
1660
1672
  return IsLoaded() && global == Debug::debug_context()->global();
1661
1673
  }
@@ -1683,7 +1695,7 @@ void Debug::CreateScriptCache() {
1683
1695
 
1684
1696
  // Perform two GCs to get rid of all unreferenced scripts. The first GC gets
1685
1697
  // rid of all the cached script wrappers and the second gets rid of the
1686
- // scripts which is no longer referenced.
1698
+ // scripts which are no longer referenced.
1687
1699
  Heap::CollectAllGarbage(false);
1688
1700
  Heap::CollectAllGarbage(false);
1689
1701
 
@@ -1693,9 +1705,7 @@ void Debug::CreateScriptCache() {
1693
1705
  // Scan heap for Script objects.
1694
1706
  int count = 0;
1695
1707
  HeapIterator iterator;
1696
- while (iterator.has_next()) {
1697
- HeapObject* obj = iterator.next();
1698
- ASSERT(obj != NULL);
1708
+ for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1699
1709
  if (obj->IsScript() && Script::cast(obj)->HasValidSource()) {
1700
1710
  script_cache_->Add(Handle<Script>(Script::cast(obj)));
1701
1711
  count++;
@@ -1759,8 +1769,10 @@ bool Debugger::never_unload_debugger_ = false;
1759
1769
  v8::Debug::MessageHandler2 Debugger::message_handler_ = NULL;
1760
1770
  bool Debugger::debugger_unload_pending_ = false;
1761
1771
  v8::Debug::HostDispatchHandler Debugger::host_dispatch_handler_ = NULL;
1772
+ Mutex* Debugger::dispatch_handler_access_ = OS::CreateMutex();
1762
1773
  v8::Debug::DebugMessageDispatchHandler
1763
1774
  Debugger::debug_message_dispatch_handler_ = NULL;
1775
+ MessageDispatchHelperThread* Debugger::message_dispatch_helper_thread_ = NULL;
1764
1776
  int Debugger::host_dispatch_micros_ = 100 * 1000;
1765
1777
  DebuggerAgent* Debugger::agent_ = NULL;
1766
1778
  LockingCommandMessageQueue Debugger::command_queue_(kQueueInitialSize);
@@ -1974,7 +1986,8 @@ void Debugger::OnBeforeCompile(Handle<Script> script) {
1974
1986
 
1975
1987
 
1976
1988
  // Handle debugger actions when a new script is compiled.
1977
- void Debugger::OnAfterCompile(Handle<Script> script, Handle<JSFunction> fun) {
1989
+ void Debugger::OnAfterCompile(Handle<Script> script,
1990
+ AfterCompileFlags after_compile_flags) {
1978
1991
  HandleScope scope;
1979
1992
 
1980
1993
  // Add the newly compiled script to the script cache.
@@ -1996,7 +2009,7 @@ void Debugger::OnAfterCompile(Handle<Script> script, Handle<JSFunction> fun) {
1996
2009
  // If debugging there might be script break points registered for this
1997
2010
  // script. Make sure that these break points are set.
1998
2011
 
1999
- // Get the function UpdateScriptBreakPoints (defined in debug-delay.js).
2012
+ // Get the function UpdateScriptBreakPoints (defined in debug-debugger.js).
2000
2013
  Handle<Object> update_script_break_points =
2001
2014
  Handle<Object>(Debug::debug_context()->global()->GetProperty(
2002
2015
  *Factory::LookupAsciiSymbol("UpdateScriptBreakPoints")));
@@ -2021,7 +2034,7 @@ void Debugger::OnAfterCompile(Handle<Script> script, Handle<JSFunction> fun) {
2021
2034
  return;
2022
2035
  }
2023
2036
  // Bail out based on state or if there is no listener for this event
2024
- if (in_debugger) return;
2037
+ if (in_debugger && (after_compile_flags & SEND_WHEN_DEBUGGING) == 0) return;
2025
2038
  if (!Debugger::EventActive(v8::AfterCompile)) return;
2026
2039
 
2027
2040
  // Create the compile state object.
@@ -2039,31 +2052,6 @@ void Debugger::OnAfterCompile(Handle<Script> script, Handle<JSFunction> fun) {
2039
2052
  }
2040
2053
 
2041
2054
 
2042
- void Debugger::OnNewFunction(Handle<JSFunction> function) {
2043
- return;
2044
- HandleScope scope;
2045
-
2046
- // Bail out based on state or if there is no listener for this event
2047
- if (Debug::InDebugger()) return;
2048
- if (compiling_natives()) return;
2049
- if (!Debugger::EventActive(v8::NewFunction)) return;
2050
-
2051
- // Enter the debugger.
2052
- EnterDebugger debugger;
2053
- if (debugger.FailedToEnter()) return;
2054
-
2055
- // Create the event object.
2056
- bool caught_exception = false;
2057
- Handle<Object> event_data = MakeNewFunctionEvent(function, &caught_exception);
2058
- // Bail out and don't call debugger if exception.
2059
- if (caught_exception) {
2060
- return;
2061
- }
2062
- // Process debug event.
2063
- ProcessDebugEvent(v8::NewFunction, Handle<JSObject>::cast(event_data), true);
2064
- }
2065
-
2066
-
2067
2055
  void Debugger::OnScriptCollected(int id) {
2068
2056
  HandleScope scope;
2069
2057
 
@@ -2145,6 +2133,13 @@ void Debugger::ProcessDebugEvent(v8::DebugEvent event,
2145
2133
  }
2146
2134
 
2147
2135
 
2136
+ Handle<Context> Debugger::GetDebugContext() {
2137
+ never_unload_debugger_ = true;
2138
+ EnterDebugger debugger;
2139
+ return Debug::debug_context();
2140
+ }
2141
+
2142
+
2148
2143
  void Debugger::UnloadDebugger() {
2149
2144
  // Make sure that there are no breakpoints left.
2150
2145
  Debug::ClearAllBreakPoints();
@@ -2379,17 +2374,12 @@ void Debugger::ListenersChanged() {
2379
2374
  if (IsDebuggerActive()) {
2380
2375
  // Disable the compilation cache when the debugger is active.
2381
2376
  CompilationCache::Disable();
2377
+ debugger_unload_pending_ = false;
2382
2378
  } else {
2383
2379
  CompilationCache::Enable();
2384
-
2385
2380
  // Unload the debugger if event listener and message handler cleared.
2386
- if (Debug::InDebugger()) {
2387
- // If we are in debugger set the flag to unload the debugger when last
2388
- // EnterDebugger on the current stack is destroyed.
2389
- debugger_unload_pending_ = true;
2390
- } else {
2391
- UnloadDebugger();
2392
- }
2381
+ // Schedule this for later, because we may be in non-V8 thread.
2382
+ debugger_unload_pending_ = true;
2393
2383
  }
2394
2384
  }
2395
2385
 
@@ -2402,8 +2392,14 @@ void Debugger::SetHostDispatchHandler(v8::Debug::HostDispatchHandler handler,
2402
2392
 
2403
2393
 
2404
2394
  void Debugger::SetDebugMessageDispatchHandler(
2405
- v8::Debug::DebugMessageDispatchHandler handler) {
2395
+ v8::Debug::DebugMessageDispatchHandler handler, bool provide_locker) {
2396
+ ScopedLock with(dispatch_handler_access_);
2406
2397
  debug_message_dispatch_handler_ = handler;
2398
+
2399
+ if (provide_locker && message_dispatch_helper_thread_ == NULL) {
2400
+ message_dispatch_helper_thread_ = new MessageDispatchHelperThread;
2401
+ message_dispatch_helper_thread_->Start();
2402
+ }
2407
2403
  }
2408
2404
 
2409
2405
 
@@ -2438,8 +2434,16 @@ void Debugger::ProcessCommand(Vector<const uint16_t> command,
2438
2434
  StackGuard::DebugCommand();
2439
2435
  }
2440
2436
 
2441
- if (Debugger::debug_message_dispatch_handler_ != NULL) {
2442
- Debugger::debug_message_dispatch_handler_();
2437
+ MessageDispatchHelperThread* dispatch_thread;
2438
+ {
2439
+ ScopedLock with(dispatch_handler_access_);
2440
+ dispatch_thread = message_dispatch_helper_thread_;
2441
+ }
2442
+
2443
+ if (dispatch_thread == NULL) {
2444
+ CallMessageDispatchHandler();
2445
+ } else {
2446
+ dispatch_thread->Schedule();
2443
2447
  }
2444
2448
  }
2445
2449
 
@@ -2464,7 +2468,7 @@ Handle<Object> Debugger::Call(Handle<JSFunction> fun,
2464
2468
 
2465
2469
  // Enter the debugger.
2466
2470
  EnterDebugger debugger;
2467
- if (debugger.FailedToEnter() || !debugger.HasJavaScriptFrames()) {
2471
+ if (debugger.FailedToEnter()) {
2468
2472
  return Factory::undefined_value();
2469
2473
  }
2470
2474
 
@@ -2477,8 +2481,12 @@ Handle<Object> Debugger::Call(Handle<JSFunction> fun,
2477
2481
 
2478
2482
  static const int kArgc = 2;
2479
2483
  Object** argv[kArgc] = { exec_state.location(), data.location() };
2480
- Handle<Object> result = Execution::Call(fun, Factory::undefined_value(),
2481
- kArgc, argv, pending_exception);
2484
+ Handle<Object> result = Execution::Call(
2485
+ fun,
2486
+ Handle<Object>(Debug::debug_context_->global_proxy()),
2487
+ kArgc,
2488
+ argv,
2489
+ pending_exception);
2482
2490
  return result;
2483
2491
  }
2484
2492
 
@@ -2526,6 +2534,19 @@ void Debugger::WaitForAgent() {
2526
2534
  agent_->WaitUntilListening();
2527
2535
  }
2528
2536
 
2537
+
2538
+ void Debugger::CallMessageDispatchHandler() {
2539
+ v8::Debug::DebugMessageDispatchHandler handler;
2540
+ {
2541
+ ScopedLock with(dispatch_handler_access_);
2542
+ handler = Debugger::debug_message_dispatch_handler_;
2543
+ }
2544
+ if (handler != NULL) {
2545
+ handler();
2546
+ }
2547
+ }
2548
+
2549
+
2529
2550
  MessageImpl MessageImpl::NewEvent(DebugEvent event,
2530
2551
  bool running,
2531
2552
  Handle<JSObject> exec_state,
@@ -2746,6 +2767,45 @@ void LockingCommandMessageQueue::Clear() {
2746
2767
  queue_.Clear();
2747
2768
  }
2748
2769
 
2770
+
2771
+ MessageDispatchHelperThread::MessageDispatchHelperThread()
2772
+ : sem_(OS::CreateSemaphore(0)), mutex_(OS::CreateMutex()),
2773
+ already_signalled_(false) {
2774
+ }
2775
+
2776
+
2777
+ MessageDispatchHelperThread::~MessageDispatchHelperThread() {
2778
+ delete mutex_;
2779
+ delete sem_;
2780
+ }
2781
+
2782
+
2783
+ void MessageDispatchHelperThread::Schedule() {
2784
+ {
2785
+ ScopedLock lock(mutex_);
2786
+ if (already_signalled_) {
2787
+ return;
2788
+ }
2789
+ already_signalled_ = true;
2790
+ }
2791
+ sem_->Signal();
2792
+ }
2793
+
2794
+
2795
+ void MessageDispatchHelperThread::Run() {
2796
+ while (true) {
2797
+ sem_->Wait();
2798
+ {
2799
+ ScopedLock lock(mutex_);
2800
+ already_signalled_ = false;
2801
+ }
2802
+ {
2803
+ Locker locker;
2804
+ Debugger::CallMessageDispatchHandler();
2805
+ }
2806
+ }
2807
+ }
2808
+
2749
2809
  #endif // ENABLE_DEBUGGER_SUPPORT
2750
2810
 
2751
2811
  } } // namespace v8::internal