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
@@ -79,6 +79,8 @@ class CompilationSubCache {
79
79
  // young generation.
80
80
  void Age();
81
81
 
82
+ bool HasFunction(SharedFunctionInfo* function_info);
83
+
82
84
  // GC support.
83
85
  void Iterate(ObjectVisitor* v);
84
86
 
@@ -204,6 +206,27 @@ Handle<CompilationCacheTable> CompilationSubCache::GetTable(int generation) {
204
206
  }
205
207
 
206
208
 
209
+ bool CompilationSubCache::HasFunction(SharedFunctionInfo* function_info) {
210
+ if (function_info->script()->IsUndefined() ||
211
+ Script::cast(function_info->script())->source()->IsUndefined()) {
212
+ return false;
213
+ }
214
+
215
+ String* source =
216
+ String::cast(Script::cast(function_info->script())->source());
217
+ // Check all generations.
218
+ for (int generation = 0; generation < generations(); generation++) {
219
+ if (tables_[generation]->IsUndefined()) continue;
220
+
221
+ CompilationCacheTable* table =
222
+ CompilationCacheTable::cast(tables_[generation]);
223
+ Object* object = table->Lookup(source);
224
+ if (object->IsSharedFunctionInfo()) return true;
225
+ }
226
+ return false;
227
+ }
228
+
229
+
207
230
  void CompilationSubCache::Age() {
208
231
  // Age the generations implicitly killing off the oldest.
209
232
  for (int i = generations_ - 1; i > 0; i--) {
@@ -506,6 +529,11 @@ void CompilationCache::Clear() {
506
529
  }
507
530
 
508
531
 
532
+ bool CompilationCache::HasFunction(SharedFunctionInfo* function_info) {
533
+ return script.HasFunction(function_info);
534
+ }
535
+
536
+
509
537
  void CompilationCache::Iterate(ObjectVisitor* v) {
510
538
  for (int i = 0; i < kSubCacheCount; i++) {
511
539
  subcaches[i]->Iterate(v);
@@ -79,6 +79,9 @@ class CompilationCache {
79
79
  // Clear the cache - also used to initialize the cache at startup.
80
80
  static void Clear();
81
81
 
82
+
83
+ static bool HasFunction(SharedFunctionInfo* function_info);
84
+
82
85
  // GC support.
83
86
  static void Iterate(ObjectVisitor* v);
84
87
 
@@ -40,10 +40,23 @@
40
40
  #include "oprofile-agent.h"
41
41
  #include "rewriter.h"
42
42
  #include "scopes.h"
43
+ #include "scopeinfo.h"
43
44
 
44
45
  namespace v8 {
45
46
  namespace internal {
46
47
 
48
+ // For normal operation the syntax checker is used to determine whether to
49
+ // use the full compiler for top level code or not. However if the flag
50
+ // --always-full-compiler is specified or debugging is active the full
51
+ // compiler will be used for all code.
52
+ static bool AlwaysFullCompiler() {
53
+ #ifdef ENABLE_DEBUGGER_SUPPORT
54
+ return FLAG_always_full_compiler || Debugger::IsDebuggerActive();
55
+ #else
56
+ return FLAG_always_full_compiler;
57
+ #endif
58
+ }
59
+
47
60
 
48
61
  static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) {
49
62
  FunctionLiteral* function = info->function();
@@ -120,7 +133,9 @@ static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) {
120
133
  ? info->scope()->is_global_scope()
121
134
  : (shared->is_toplevel() || shared->try_full_codegen());
122
135
 
123
- if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) {
136
+ if (AlwaysFullCompiler()) {
137
+ return FullCodeGenerator::MakeCode(info);
138
+ } else if (FLAG_full_compiler && is_run_once) {
124
139
  FullCodeGenSyntaxChecker checker;
125
140
  checker.Check(function);
126
141
  if (checker.has_supported_syntax()) {
@@ -142,7 +157,12 @@ static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) {
142
157
  #ifdef ENABLE_DEBUGGER_SUPPORT
143
158
  Handle<Code> MakeCodeForLiveEdit(CompilationInfo* info) {
144
159
  Handle<Context> context = Handle<Context>::null();
145
- return MakeCode(context, info);
160
+ Handle<Code> code = MakeCode(context, info);
161
+ if (!info->shared_info().is_null()) {
162
+ info->shared_info()->set_scope_info(
163
+ *SerializedScopeInfo::Create(info->scope()));
164
+ }
165
+ return code;
146
166
  }
147
167
  #endif
148
168
 
@@ -238,9 +258,11 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(bool is_global,
238
258
 
239
259
  // Allocate function.
240
260
  Handle<SharedFunctionInfo> result =
241
- Factory::NewSharedFunctionInfo(lit->name(),
242
- lit->materialized_literal_count(),
243
- code);
261
+ Factory::NewSharedFunctionInfo(
262
+ lit->name(),
263
+ lit->materialized_literal_count(),
264
+ code,
265
+ SerializedScopeInfo::Create(info.scope()));
244
266
 
245
267
  ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position());
246
268
  Compiler::SetFunctionInfo(result, lit, true, script);
@@ -261,9 +283,6 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(bool is_global,
261
283
  }
262
284
 
263
285
 
264
- static StaticResource<SafeStringInputBuffer> safe_string_input_buffer;
265
-
266
-
267
286
  Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
268
287
  Handle<Object> script_name,
269
288
  int line_offset,
@@ -292,9 +311,7 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
292
311
  // No cache entry found. Do pre-parsing and compile the script.
293
312
  ScriptDataImpl* pre_data = input_pre_data;
294
313
  if (pre_data == NULL && source_length >= FLAG_min_preparse_length) {
295
- Access<SafeStringInputBuffer> buf(&safe_string_input_buffer);
296
- buf->Reset(source.location());
297
- pre_data = PreParse(source, buf.value(), extension);
314
+ pre_data = PreParse(source, NULL, extension);
298
315
  }
299
316
 
300
317
  // Create a script object describing the script to be compiled.
@@ -431,7 +448,12 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
431
448
  info->script(),
432
449
  code);
433
450
 
434
- // Update the shared function info with the compiled code.
451
+ // Update the shared function info with the compiled code and the scope info.
452
+ // Please note, that the order of the sharedfunction initialization is
453
+ // important since set_scope_info might trigger a GC, causing the ASSERT
454
+ // below to be invalid if the code was flushed. By settting the code
455
+ // object last we avoid this.
456
+ shared->set_scope_info(*SerializedScopeInfo::Create(info->scope()));
435
457
  shared->set_code(*code);
436
458
 
437
459
  // Set the expected number of properties for instances.
@@ -467,6 +489,8 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
467
489
  bool allow_lazy = literal->AllowsLazyCompilation() &&
468
490
  !LiveEditFunctionTracker::IsActive();
469
491
 
492
+ Handle<SerializedScopeInfo> scope_info(SerializedScopeInfo::Empty());
493
+
470
494
  // Generate code
471
495
  Handle<Code> code;
472
496
  if (FLAG_lazy && allow_lazy) {
@@ -507,7 +531,11 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
507
531
  CHECK(!FLAG_always_full_compiler || !FLAG_always_fast_compiler);
508
532
  bool is_run_once = literal->try_full_codegen();
509
533
  bool is_compiled = false;
510
- if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) {
534
+
535
+ if (AlwaysFullCompiler()) {
536
+ code = FullCodeGenerator::MakeCode(&info);
537
+ is_compiled = true;
538
+ } else if (FLAG_full_compiler && is_run_once) {
511
539
  FullCodeGenSyntaxChecker checker;
512
540
  checker.Check(literal);
513
541
  if (checker.has_supported_syntax()) {
@@ -544,13 +572,15 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
544
572
  literal->start_position(),
545
573
  script,
546
574
  code);
575
+ scope_info = SerializedScopeInfo::Create(info.scope());
547
576
  }
548
577
 
549
578
  // Create a shared function info object.
550
579
  Handle<SharedFunctionInfo> result =
551
580
  Factory::NewSharedFunctionInfo(literal->name(),
552
581
  literal->materialized_literal_count(),
553
- code);
582
+ code,
583
+ scope_info);
554
584
  SetFunctionInfo(result, literal, false, script);
555
585
 
556
586
  // Set the expected number of properties for instances and return
@@ -583,6 +613,7 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
583
613
  lit->has_only_simple_this_property_assignments(),
584
614
  *lit->this_property_assignments());
585
615
  function_info->set_try_full_codegen(lit->try_full_codegen());
616
+ function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
586
617
  }
587
618
 
588
619
 
File without changes
@@ -120,9 +120,10 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
120
120
  // we have context-local slots
121
121
 
122
122
  // check non-parameter locals in context
123
- Handle<Code> code(context->closure()->code());
123
+ Handle<SerializedScopeInfo> scope_info(
124
+ context->closure()->shared()->scope_info());
124
125
  Variable::Mode mode;
125
- int index = ScopeInfo<>::ContextSlotIndex(*code, *name, &mode);
126
+ int index = scope_info->ContextSlotIndex(*name, &mode);
126
127
  ASSERT(index < 0 || index >= MIN_CONTEXT_SLOTS);
127
128
  if (index >= 0) {
128
129
  // slot found
@@ -150,13 +151,11 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
150
151
  }
151
152
 
152
153
  // check parameter locals in context
153
- int param_index = ScopeInfo<>::ParameterIndex(*code, *name);
154
+ int param_index = scope_info->ParameterIndex(*name);
154
155
  if (param_index >= 0) {
155
156
  // slot found.
156
157
  int index =
157
- ScopeInfo<>::ContextSlotIndex(*code,
158
- Heap::arguments_shadow_symbol(),
159
- NULL);
158
+ scope_info->ContextSlotIndex(Heap::arguments_shadow_symbol(), NULL);
160
159
  ASSERT(index >= 0); // arguments must exist and be in the heap context
161
160
  Handle<JSObject> arguments(JSObject::cast(context->get(index)));
162
161
  ASSERT(arguments->HasLocalProperty(Heap::length_symbol()));
@@ -170,7 +169,7 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
170
169
 
171
170
  // check intermediate context (holding only the function name variable)
172
171
  if (follow_context_chain) {
173
- int index = ScopeInfo<>::FunctionContextSlotIndex(*code, *name);
172
+ int index = scope_info->FunctionContextSlotIndex(*name);
174
173
  if (index >= 0) {
175
174
  // slot found
176
175
  if (FLAG_trace_contexts) {
@@ -216,18 +215,19 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
216
215
  ASSERT(context->is_function_context());
217
216
 
218
217
  // Check non-parameter locals.
219
- Handle<Code> code(context->closure()->code());
218
+ Handle<SerializedScopeInfo> scope_info(
219
+ context->closure()->shared()->scope_info());
220
220
  Variable::Mode mode;
221
- int index = ScopeInfo<>::ContextSlotIndex(*code, *name, &mode);
221
+ int index = scope_info->ContextSlotIndex(*name, &mode);
222
222
  ASSERT(index < 0 || index >= MIN_CONTEXT_SLOTS);
223
223
  if (index >= 0) return false;
224
224
 
225
225
  // Check parameter locals.
226
- int param_index = ScopeInfo<>::ParameterIndex(*code, *name);
226
+ int param_index = scope_info->ParameterIndex(*name);
227
227
  if (param_index >= 0) return false;
228
228
 
229
229
  // Check context only holding the function name variable.
230
- index = ScopeInfo<>::FunctionContextSlotIndex(*code, *name);
230
+ index = scope_info->FunctionContextSlotIndex(*name);
231
231
  if (index >= 0) return false;
232
232
  context = Context::cast(context->closure()->context());
233
233
  }
File without changes
@@ -31,8 +31,8 @@
31
31
  #include "v8.h"
32
32
 
33
33
  #include "conversions-inl.h"
34
+ #include "dtoa.h"
34
35
  #include "factory.h"
35
- #include "fast-dtoa.h"
36
36
  #include "scanner.h"
37
37
 
38
38
  namespace v8 {
@@ -766,15 +766,16 @@ const char* DoubleToCString(double v, Vector<char> buffer) {
766
766
  default: {
767
767
  int decimal_point;
768
768
  int sign;
769
-
770
769
  char* decimal_rep;
771
770
  bool used_gay_dtoa = false;
772
- const int kFastDtoaBufferCapacity = kFastDtoaMaximalLength + 1;
773
- char fast_dtoa_buffer[kFastDtoaBufferCapacity];
771
+ const int kV8DtoaBufferCapacity = kBase10MaximalLength + 1;
772
+ char v8_dtoa_buffer[kV8DtoaBufferCapacity];
774
773
  int length;
775
- if (FastDtoa(v, Vector<char>(fast_dtoa_buffer, kFastDtoaBufferCapacity),
776
- &sign, &length, &decimal_point)) {
777
- decimal_rep = fast_dtoa_buffer;
774
+
775
+ if (DoubleToAscii(v, DTOA_SHORTEST, 0,
776
+ Vector<char>(v8_dtoa_buffer, kV8DtoaBufferCapacity),
777
+ &sign, &length, &decimal_point)) {
778
+ decimal_rep = v8_dtoa_buffer;
778
779
  } else {
779
780
  decimal_rep = dtoa(v, 0, 0, &decimal_point, &sign, NULL);
780
781
  used_gay_dtoa = true;
@@ -842,7 +843,11 @@ const char* IntToCString(int n, Vector<char> buffer) {
842
843
 
843
844
 
844
845
  char* DoubleToFixedCString(double value, int f) {
846
+ const int kMaxDigitsBeforePoint = 20;
847
+ const double kFirstNonFixed = 1e21;
848
+ const int kMaxDigitsAfterPoint = 20;
845
849
  ASSERT(f >= 0);
850
+ ASSERT(f <= kMaxDigitsAfterPoint);
846
851
 
847
852
  bool negative = false;
848
853
  double abs_value = value;
@@ -851,7 +856,9 @@ char* DoubleToFixedCString(double value, int f) {
851
856
  negative = true;
852
857
  }
853
858
 
854
- if (abs_value >= 1e21) {
859
+ // If abs_value has more than kMaxDigitsBeforePoint digits before the point
860
+ // use the non-fixed conversion routine.
861
+ if (abs_value >= kFirstNonFixed) {
855
862
  char arr[100];
856
863
  Vector<char> buffer(arr, ARRAY_SIZE(arr));
857
864
  return StrDup(DoubleToCString(value, buffer));
@@ -860,8 +867,16 @@ char* DoubleToFixedCString(double value, int f) {
860
867
  // Find a sufficiently precise decimal representation of n.
861
868
  int decimal_point;
862
869
  int sign;
863
- char* decimal_rep = dtoa(abs_value, 3, f, &decimal_point, &sign, NULL);
864
- int decimal_rep_length = StrLength(decimal_rep);
870
+ // Add space for the '.' and the '\0' byte.
871
+ const int kDecimalRepCapacity =
872
+ kMaxDigitsBeforePoint + kMaxDigitsAfterPoint + 2;
873
+ char decimal_rep[kDecimalRepCapacity];
874
+ int decimal_rep_length;
875
+ bool status = DoubleToAscii(value, DTOA_FIXED, f,
876
+ Vector<char>(decimal_rep, kDecimalRepCapacity),
877
+ &sign, &decimal_rep_length, &decimal_point);
878
+ USE(status);
879
+ ASSERT(status);
865
880
 
866
881
  // Create a representation that is padded with zeros if needed.
867
882
  int zero_prefix_length = 0;
@@ -884,7 +899,6 @@ char* DoubleToFixedCString(double value, int f) {
884
899
  rep_builder.AddString(decimal_rep);
885
900
  rep_builder.AddPadding('0', zero_postfix_length);
886
901
  char* rep = rep_builder.Finalize();
887
- freedtoa(decimal_rep);
888
902
 
889
903
  // Create the result string by appending a minus and putting in a
890
904
  // decimal point if needed.
File without changes
File without changes
File without changes
@@ -34,6 +34,7 @@
34
34
 
35
35
  #include "circular-queue-inl.h"
36
36
  #include "profile-generator-inl.h"
37
+ #include "unbound-queue-inl.h"
37
38
 
38
39
  namespace v8 {
39
40
  namespace internal {
@@ -54,7 +55,7 @@ void CodeDeleteEventRecord::UpdateCodeMap(CodeMap* code_map) {
54
55
 
55
56
 
56
57
  void CodeAliasEventRecord::UpdateCodeMap(CodeMap* code_map) {
57
- code_map->AddAlias(alias, start);
58
+ code_map->AddAlias(start, entry, code_start);
58
59
  }
59
60
 
60
61
 
@@ -31,6 +31,7 @@
31
31
 
32
32
  #ifdef ENABLE_LOGGING_AND_PROFILING
33
33
 
34
+ #include "frames-inl.h"
34
35
  #include "log-inl.h"
35
36
 
36
37
  #include "../include/v8-profiler.h"
@@ -46,11 +47,11 @@ static const int kTickSamplesBufferChunksCount = 16;
46
47
  ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator)
47
48
  : generator_(generator),
48
49
  running_(false),
49
- events_buffer_(kEventsBufferSize),
50
50
  ticks_buffer_(sizeof(TickSampleEventRecord),
51
51
  kTickSamplesBufferChunkSize,
52
52
  kTickSamplesBufferChunksCount),
53
- enqueue_order_(0) { }
53
+ enqueue_order_(0) {
54
+ }
54
55
 
55
56
 
56
57
  void ProfilerEventsProcessor::CallbackCreateEvent(Logger::LogEventsAndTags tag,
@@ -141,13 +142,15 @@ void ProfilerEventsProcessor::CodeDeleteEvent(Address from) {
141
142
 
142
143
 
143
144
  void ProfilerEventsProcessor::FunctionCreateEvent(Address alias,
144
- Address start) {
145
+ Address start,
146
+ int security_token_id) {
145
147
  CodeEventsContainer evt_rec;
146
148
  CodeAliasEventRecord* rec = &evt_rec.CodeAliasEventRecord_;
147
149
  rec->type = CodeEventRecord::CODE_ALIAS;
148
150
  rec->order = ++enqueue_order_;
149
- rec->alias = alias;
150
- rec->start = start;
151
+ rec->start = alias;
152
+ rec->entry = generator_->NewCodeEntry(security_token_id);
153
+ rec->code_start = start;
151
154
  events_buffer_.Enqueue(evt_rec);
152
155
  }
153
156
 
@@ -180,6 +183,24 @@ void ProfilerEventsProcessor::RegExpCodeCreateEvent(
180
183
  }
181
184
 
182
185
 
186
+ void ProfilerEventsProcessor::AddCurrentStack() {
187
+ TickSampleEventRecord record;
188
+ TickSample* sample = &record.sample;
189
+ sample->state = VMState::current_state();
190
+ sample->pc = reinterpret_cast<Address>(sample); // Not NULL.
191
+ sample->frames_count = 0;
192
+ for (StackTraceFrameIterator it;
193
+ !it.done() && sample->frames_count < TickSample::kMaxFramesCount;
194
+ it.Advance()) {
195
+ JavaScriptFrame* frame = it.frame();
196
+ sample->stack[sample->frames_count++] =
197
+ reinterpret_cast<Address>(frame->function());
198
+ }
199
+ record.order = enqueue_order_;
200
+ ticks_from_vm_buffer_.Enqueue(record);
201
+ }
202
+
203
+
183
204
  bool ProfilerEventsProcessor::ProcessCodeEvent(unsigned* dequeue_order) {
184
205
  if (!events_buffer_.IsEmpty()) {
185
206
  CodeEventsContainer record;
@@ -204,9 +225,16 @@ bool ProfilerEventsProcessor::ProcessCodeEvent(unsigned* dequeue_order) {
204
225
 
205
226
  bool ProfilerEventsProcessor::ProcessTicks(unsigned dequeue_order) {
206
227
  while (true) {
228
+ if (!ticks_from_vm_buffer_.IsEmpty()
229
+ && ticks_from_vm_buffer_.Peek()->order == dequeue_order) {
230
+ TickSampleEventRecord record;
231
+ ticks_from_vm_buffer_.Dequeue(&record);
232
+ generator_->RecordTickSample(record.sample);
233
+ }
234
+
207
235
  const TickSampleEventRecord* rec =
208
236
  TickSampleEventRecord::cast(ticks_buffer_.StartDequeue());
209
- if (rec == NULL) return false;
237
+ if (rec == NULL) return !ticks_from_vm_buffer_.IsEmpty();
210
238
  if (rec->order == dequeue_order) {
211
239
  generator_->RecordTickSample(rec->sample);
212
240
  ticks_buffer_.FinishDequeue();
@@ -257,26 +285,31 @@ CpuProfile* CpuProfiler::StopProfiling(const char* title) {
257
285
  }
258
286
 
259
287
 
260
- CpuProfile* CpuProfiler::StopProfiling(String* title) {
261
- return is_profiling() ? singleton_->StopCollectingProfile(title) : NULL;
288
+ CpuProfile* CpuProfiler::StopProfiling(Object* security_token, String* title) {
289
+ return is_profiling() ?
290
+ singleton_->StopCollectingProfile(security_token, title) : NULL;
262
291
  }
263
292
 
264
293
 
265
294
  int CpuProfiler::GetProfilesCount() {
266
295
  ASSERT(singleton_ != NULL);
267
- return singleton_->profiles_->profiles()->length();
296
+ // The count of profiles doesn't depend on a security token.
297
+ return singleton_->profiles_->Profiles(
298
+ TokenEnumerator::kNoSecurityToken)->length();
268
299
  }
269
300
 
270
301
 
271
- CpuProfile* CpuProfiler::GetProfile(int index) {
302
+ CpuProfile* CpuProfiler::GetProfile(Object* security_token, int index) {
272
303
  ASSERT(singleton_ != NULL);
273
- return singleton_->profiles_->profiles()->at(index);
304
+ const int token = singleton_->token_enumerator_->GetTokenId(security_token);
305
+ return singleton_->profiles_->Profiles(token)->at(index);
274
306
  }
275
307
 
276
308
 
277
- CpuProfile* CpuProfiler::FindProfile(unsigned uid) {
309
+ CpuProfile* CpuProfiler::FindProfile(Object* security_token, unsigned uid) {
278
310
  ASSERT(singleton_ != NULL);
279
- return singleton_->profiles_->GetProfile(uid);
311
+ const int token = singleton_->token_enumerator_->GetTokenId(security_token);
312
+ return singleton_->profiles_->GetProfile(token, uid);
280
313
  }
281
314
 
282
315
 
@@ -348,8 +381,15 @@ void CpuProfiler::CodeDeleteEvent(Address from) {
348
381
 
349
382
 
350
383
  void CpuProfiler::FunctionCreateEvent(JSFunction* function) {
384
+ int security_token_id = TokenEnumerator::kNoSecurityToken;
385
+ if (function->unchecked_context()->IsContext()) {
386
+ security_token_id = singleton_->token_enumerator_->GetTokenId(
387
+ function->context()->global_context()->security_token());
388
+ }
351
389
  singleton_->processor_->FunctionCreateEvent(
352
- function->address(), function->code()->address());
390
+ function->address(),
391
+ function->code()->address(),
392
+ security_token_id);
353
393
  }
354
394
 
355
395
 
@@ -388,12 +428,14 @@ void CpuProfiler::SetterCallbackEvent(String* name, Address entry_point) {
388
428
  CpuProfiler::CpuProfiler()
389
429
  : profiles_(new CpuProfilesCollection()),
390
430
  next_profile_uid_(1),
431
+ token_enumerator_(new TokenEnumerator()),
391
432
  generator_(NULL),
392
433
  processor_(NULL) {
393
434
  }
394
435
 
395
436
 
396
437
  CpuProfiler::~CpuProfiler() {
438
+ delete token_enumerator_;
397
439
  delete profiles_;
398
440
  }
399
441
 
@@ -402,13 +444,12 @@ void CpuProfiler::StartCollectingProfile(const char* title) {
402
444
  if (profiles_->StartProfiling(title, next_profile_uid_++)) {
403
445
  StartProcessorIfNotStarted();
404
446
  }
447
+ processor_->AddCurrentStack();
405
448
  }
406
449
 
407
450
 
408
451
  void CpuProfiler::StartCollectingProfile(String* title) {
409
- if (profiles_->StartProfiling(title, next_profile_uid_++)) {
410
- StartProcessorIfNotStarted();
411
- }
452
+ StartCollectingProfile(profiles_->GetName(title));
412
453
  }
413
454
 
414
455
 
@@ -420,10 +461,6 @@ void CpuProfiler::StartProcessorIfNotStarted() {
420
461
  generator_ = new ProfileGenerator(profiles_);
421
462
  processor_ = new ProfilerEventsProcessor(generator_);
422
463
  processor_->Start();
423
- // Enable stack sampling.
424
- // It is important to have it started prior to logging, see issue 683:
425
- // http://code.google.com/p/v8/issues/detail?id=683
426
- reinterpret_cast<Sampler*>(Logger::ticker_)->Start();
427
464
  // Enumerate stuff we already have in the heap.
428
465
  if (Heap::HasBeenSetup()) {
429
466
  Logger::LogCodeObjects();
@@ -431,6 +468,8 @@ void CpuProfiler::StartProcessorIfNotStarted() {
431
468
  Logger::LogFunctionObjects();
432
469
  Logger::LogAccessorCallbacks();
433
470
  }
471
+ // Enable stack sampling.
472
+ reinterpret_cast<Sampler*>(Logger::ticker_)->Start();
434
473
  }
435
474
  }
436
475
 
@@ -438,7 +477,10 @@ void CpuProfiler::StartProcessorIfNotStarted() {
438
477
  CpuProfile* CpuProfiler::StopCollectingProfile(const char* title) {
439
478
  const double actual_sampling_rate = generator_->actual_sampling_rate();
440
479
  StopProcessorIfLastProfile();
441
- CpuProfile* result = profiles_->StopProfiling(title, actual_sampling_rate);
480
+ CpuProfile* result =
481
+ profiles_->StopProfiling(TokenEnumerator::kNoSecurityToken,
482
+ title,
483
+ actual_sampling_rate);
442
484
  if (result != NULL) {
443
485
  result->Print();
444
486
  }
@@ -446,10 +488,12 @@ CpuProfile* CpuProfiler::StopCollectingProfile(const char* title) {
446
488
  }
447
489
 
448
490
 
449
- CpuProfile* CpuProfiler::StopCollectingProfile(String* title) {
491
+ CpuProfile* CpuProfiler::StopCollectingProfile(Object* security_token,
492
+ String* title) {
450
493
  const double actual_sampling_rate = generator_->actual_sampling_rate();
451
494
  StopProcessorIfLastProfile();
452
- return profiles_->StopProfiling(title, actual_sampling_rate);
495
+ int token = token_enumerator_->GetTokenId(security_token);
496
+ return profiles_->StopProfiling(token, title, actual_sampling_rate);
453
497
  }
454
498
 
455
499