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
@@ -1,4 +1,4 @@
1
- // Copyright 2006-2008 the V8 project authors. All rights reserved.
1
+ // Copyright 2010 the V8 project authors. All rights reserved.
2
2
  // Redistribution and use in source and binary forms, with or without
3
3
  // modification, are permitted provided that the following conditions are
4
4
  // met:
@@ -73,7 +73,7 @@ namespace internal {
73
73
 
74
74
  #define EXPRESSION_NODE_LIST(V) \
75
75
  V(FunctionLiteral) \
76
- V(FunctionBoilerplateLiteral) \
76
+ V(SharedFunctionInfoLiteral) \
77
77
  V(Conditional) \
78
78
  V(Slot) \
79
79
  V(VariableProxy) \
@@ -102,6 +102,8 @@ namespace internal {
102
102
  // Forward declarations
103
103
  class TargetCollector;
104
104
  class MaterializedLiteral;
105
+ class DefinitionInfo;
106
+ class BitVector;
105
107
 
106
108
  #define DEF_FORWARD_DECLARATION(type) class type;
107
109
  AST_NODE_LIST(DEF_FORWARD_DECLARATION)
@@ -116,11 +118,18 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
116
118
 
117
119
  class AstNode: public ZoneObject {
118
120
  public:
121
+ static const int kNoNumber = -1;
122
+
123
+ AstNode() : num_(kNoNumber) {}
124
+
125
+ explicit AstNode(AstNode* other);
126
+
119
127
  virtual ~AstNode() { }
120
128
  virtual void Accept(AstVisitor* v) = 0;
121
129
 
122
130
  // Type testing & conversion.
123
131
  virtual Statement* AsStatement() { return NULL; }
132
+ virtual Block* AsBlock() { return NULL; }
124
133
  virtual ExpressionStatement* AsExpressionStatement() { return NULL; }
125
134
  virtual EmptyStatement* AsEmptyStatement() { return NULL; }
126
135
  virtual Expression* AsExpression() { return NULL; }
@@ -132,7 +141,9 @@ class AstNode: public ZoneObject {
132
141
  virtual TargetCollector* AsTargetCollector() { return NULL; }
133
142
  virtual BreakableStatement* AsBreakableStatement() { return NULL; }
134
143
  virtual IterationStatement* AsIterationStatement() { return NULL; }
144
+ virtual ForStatement* AsForStatement() { return NULL; }
135
145
  virtual UnaryOperation* AsUnaryOperation() { return NULL; }
146
+ virtual CountOperation* AsCountOperation() { return NULL; }
136
147
  virtual BinaryOperation* AsBinaryOperation() { return NULL; }
137
148
  virtual Assignment* AsAssignment() { return NULL; }
138
149
  virtual FunctionLiteral* AsFunctionLiteral() { return NULL; }
@@ -140,6 +151,20 @@ class AstNode: public ZoneObject {
140
151
  virtual ObjectLiteral* AsObjectLiteral() { return NULL; }
141
152
  virtual ArrayLiteral* AsArrayLiteral() { return NULL; }
142
153
  virtual CompareOperation* AsCompareOperation() { return NULL; }
154
+
155
+ // True if the AST node is critical (its execution is needed or externally
156
+ // visible in some way).
157
+ virtual bool IsCritical() {
158
+ UNREACHABLE();
159
+ return true;
160
+ }
161
+
162
+ int num() { return num_; }
163
+ void set_num(int n) { num_ = n; }
164
+
165
+ private:
166
+ // Support for ast node numbering.
167
+ int num_;
143
168
  };
144
169
 
145
170
 
@@ -147,9 +172,14 @@ class Statement: public AstNode {
147
172
  public:
148
173
  Statement() : statement_pos_(RelocInfo::kNoPosition) {}
149
174
 
175
+ explicit Statement(Statement* other);
176
+
150
177
  virtual Statement* AsStatement() { return this; }
151
178
  virtual ReturnStatement* AsReturnStatement() { return NULL; }
152
179
 
180
+ virtual Assignment* StatementAsSimpleAssignment() { return NULL; }
181
+ virtual CountOperation* StatementAsCountOperation() { return NULL; }
182
+
153
183
  bool IsEmpty() { return AsEmptyStatement() != NULL; }
154
184
 
155
185
  void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; }
@@ -180,18 +210,34 @@ class Expression: public AstNode {
180
210
  kTestValue
181
211
  };
182
212
 
183
- Expression() : context_(kUninitialized) {}
213
+ Expression() : bitfields_(0) {}
214
+
215
+ explicit Expression(Expression* other);
184
216
 
185
217
  virtual Expression* AsExpression() { return this; }
186
218
 
187
- virtual bool IsValidJSON() { return false; }
188
219
  virtual bool IsValidLeftHandSide() { return false; }
189
220
 
221
+ virtual Variable* AssignedVariable() { return NULL; }
222
+
190
223
  // Symbols that cannot be parsed as array indices are considered property
191
224
  // names. We do not treat symbols that can be array indexes as property
192
225
  // names because [] for string objects is handled only by keyed ICs.
193
226
  virtual bool IsPropertyName() { return false; }
194
227
 
228
+ // True if the expression does not have (evaluated) subexpressions.
229
+ // Function literals are leaves because their subexpressions are not
230
+ // evaluated.
231
+ virtual bool IsLeaf() { return false; }
232
+
233
+ // True if the expression has no side effects and is safe to
234
+ // evaluate out of order.
235
+ virtual bool IsTrivial() { return false; }
236
+
237
+ // True if the expression always has one of the non-Object JS types
238
+ // (Undefined, Null, Boolean, String, or Number).
239
+ virtual bool IsPrimitive() = 0;
240
+
195
241
  // Mark the expression as being compiled as an expression
196
242
  // statement. This is used to transform postfix increments to
197
243
  // (faster) prefix increments.
@@ -200,12 +246,66 @@ class Expression: public AstNode {
200
246
  // Static type information for this expression.
201
247
  StaticType* type() { return &type_; }
202
248
 
203
- Context context() { return context_; }
204
- void set_context(Context context) { context_ = context; }
249
+ // True if the expression is a loop condition.
250
+ bool is_loop_condition() const {
251
+ return LoopConditionField::decode(bitfields_);
252
+ }
253
+ void set_is_loop_condition(bool flag) {
254
+ bitfields_ = (bitfields_ & ~LoopConditionField::mask()) |
255
+ LoopConditionField::encode(flag);
256
+ }
257
+
258
+ // The value of the expression is guaranteed to be a smi, because the
259
+ // top operation is a bit operation with a mask, or a shift.
260
+ bool GuaranteedSmiResult();
261
+
262
+ // AST analysis results
263
+
264
+ // True if the expression rooted at this node can be compiled by the
265
+ // side-effect free compiler.
266
+ bool side_effect_free() { return SideEffectFreeField::decode(bitfields_); }
267
+ void set_side_effect_free(bool is_side_effect_free) {
268
+ bitfields_ &= ~SideEffectFreeField::mask();
269
+ bitfields_ |= SideEffectFreeField::encode(is_side_effect_free);
270
+ }
271
+
272
+ // Will the use of this expression treat -0 the same as 0 in all cases?
273
+ // If so, we can return 0 instead of -0 if we want to, to optimize code.
274
+ bool no_negative_zero() { return NoNegativeZeroField::decode(bitfields_); }
275
+ void set_no_negative_zero(bool no_negative_zero) {
276
+ bitfields_ &= ~NoNegativeZeroField::mask();
277
+ bitfields_ |= NoNegativeZeroField::encode(no_negative_zero);
278
+ }
279
+
280
+ // Will ToInt32 (ECMA 262-3 9.5) or ToUint32 (ECMA 262-3 9.6)
281
+ // be applied to the value of this expression?
282
+ // If so, we may be able to optimize the calculation of the value.
283
+ bool to_int32() { return ToInt32Field::decode(bitfields_); }
284
+ void set_to_int32(bool to_int32) {
285
+ bitfields_ &= ~ToInt32Field::mask();
286
+ bitfields_ |= ToInt32Field::encode(to_int32);
287
+ }
288
+
289
+ // How many bitwise logical or shift operators are used in this expression?
290
+ int num_bit_ops() { return NumBitOpsField::decode(bitfields_); }
291
+ void set_num_bit_ops(int num_bit_ops) {
292
+ bitfields_ &= ~NumBitOpsField::mask();
293
+ num_bit_ops = Min(num_bit_ops, kMaxNumBitOps);
294
+ bitfields_ |= NumBitOpsField::encode(num_bit_ops);
295
+ }
205
296
 
206
297
  private:
298
+ static const int kMaxNumBitOps = (1 << 5) - 1;
299
+
300
+ uint32_t bitfields_;
207
301
  StaticType type_;
208
- Context context_;
302
+
303
+ // Using template BitField<type, start, size>.
304
+ class SideEffectFreeField : public BitField<bool, 0, 1> {};
305
+ class NoNegativeZeroField : public BitField<bool, 1, 1> {};
306
+ class ToInt32Field : public BitField<bool, 2, 1> {};
307
+ class NumBitOpsField : public BitField<int, 3, 5> {};
308
+ class LoopConditionField: public BitField<bool, 8, 1> {};
209
309
  };
210
310
 
211
311
 
@@ -219,6 +319,12 @@ class ValidLeftHandSideSentinel: public Expression {
219
319
  virtual bool IsValidLeftHandSide() { return true; }
220
320
  virtual void Accept(AstVisitor* v) { UNREACHABLE(); }
221
321
  static ValidLeftHandSideSentinel* instance() { return &instance_; }
322
+
323
+ virtual bool IsPrimitive() {
324
+ UNREACHABLE();
325
+ return false;
326
+ }
327
+
222
328
  private:
223
329
  static ValidLeftHandSideSentinel instance_;
224
330
  };
@@ -250,6 +356,8 @@ class BreakableStatement: public Statement {
250
356
  ASSERT(labels == NULL || labels->length() > 0);
251
357
  }
252
358
 
359
+ explicit BreakableStatement(BreakableStatement* other);
360
+
253
361
  private:
254
362
  ZoneStringList* labels_;
255
363
  Type type_;
@@ -264,8 +372,24 @@ class Block: public BreakableStatement {
264
372
  statements_(capacity),
265
373
  is_initializer_block_(is_initializer_block) { }
266
374
 
375
+ // Construct a clone initialized from the original block and
376
+ // a deep copy of all statements of the original block.
377
+ Block(Block* other, ZoneList<Statement*>* statements);
378
+
267
379
  virtual void Accept(AstVisitor* v);
268
380
 
381
+ virtual Block* AsBlock() { return this; }
382
+
383
+ virtual Assignment* StatementAsSimpleAssignment() {
384
+ if (statements_.length() != 1) return NULL;
385
+ return statements_[0]->StatementAsSimpleAssignment();
386
+ }
387
+
388
+ virtual CountOperation* StatementAsCountOperation() {
389
+ if (statements_.length() != 1) return NULL;
390
+ return statements_[0]->StatementAsCountOperation();
391
+ }
392
+
269
393
  void AddStatement(Statement* statement) { statements_.Add(statement); }
270
394
 
271
395
  ZoneList<Statement*>* statements() { return &statements_; }
@@ -307,6 +431,7 @@ class IterationStatement: public BreakableStatement {
307
431
  virtual IterationStatement* AsIterationStatement() { return this; }
308
432
 
309
433
  Statement* body() const { return body_; }
434
+ void set_body(Statement* stmt) { body_ = stmt; }
310
435
 
311
436
  // Code generation
312
437
  BreakTarget* continue_target() { return &continue_target_; }
@@ -315,6 +440,10 @@ class IterationStatement: public BreakableStatement {
315
440
  explicit IterationStatement(ZoneStringList* labels)
316
441
  : BreakableStatement(labels, TARGET_FOR_ANONYMOUS), body_(NULL) { }
317
442
 
443
+ // Construct a clone initialized from original and
444
+ // a deep copy of the original body.
445
+ IterationStatement(IterationStatement* other, Statement* body);
446
+
318
447
  void Initialize(Statement* body) {
319
448
  body_ = body;
320
449
  }
@@ -387,8 +516,19 @@ class ForStatement: public IterationStatement {
387
516
  init_(NULL),
388
517
  cond_(NULL),
389
518
  next_(NULL),
390
- may_have_function_literal_(true) {
391
- }
519
+ may_have_function_literal_(true),
520
+ loop_variable_(NULL),
521
+ peel_this_loop_(false) {}
522
+
523
+ // Construct a for-statement initialized from another for-statement
524
+ // and deep copies of all parts of the original statement.
525
+ ForStatement(ForStatement* other,
526
+ Statement* init,
527
+ Expression* cond,
528
+ Statement* next,
529
+ Statement* body);
530
+
531
+ virtual ForStatement* AsForStatement() { return this; }
392
532
 
393
533
  void Initialize(Statement* init,
394
534
  Expression* cond,
@@ -403,18 +543,30 @@ class ForStatement: public IterationStatement {
403
543
  virtual void Accept(AstVisitor* v);
404
544
 
405
545
  Statement* init() const { return init_; }
546
+ void set_init(Statement* stmt) { init_ = stmt; }
406
547
  Expression* cond() const { return cond_; }
548
+ void set_cond(Expression* expr) { cond_ = expr; }
407
549
  Statement* next() const { return next_; }
550
+ void set_next(Statement* stmt) { next_ = stmt; }
408
551
  bool may_have_function_literal() const {
409
552
  return may_have_function_literal_;
410
553
  }
411
554
 
555
+ bool is_fast_smi_loop() { return loop_variable_ != NULL; }
556
+ Variable* loop_variable() { return loop_variable_; }
557
+ void set_loop_variable(Variable* var) { loop_variable_ = var; }
558
+
559
+ bool peel_this_loop() { return peel_this_loop_; }
560
+ void set_peel_this_loop(bool b) { peel_this_loop_ = b; }
561
+
412
562
  private:
413
563
  Statement* init_;
414
564
  Expression* cond_;
415
565
  Statement* next_;
416
566
  // True if there is a function literal subexpression in the condition.
417
567
  bool may_have_function_literal_;
568
+ Variable* loop_variable_;
569
+ bool peel_this_loop_;
418
570
 
419
571
  friend class AstOptimizer;
420
572
  };
@@ -447,11 +599,18 @@ class ExpressionStatement: public Statement {
447
599
  explicit ExpressionStatement(Expression* expression)
448
600
  : expression_(expression) { }
449
601
 
602
+ // Construct an expression statement initialized from another
603
+ // expression statement and a deep copy of the original expression.
604
+ ExpressionStatement(ExpressionStatement* other, Expression* expression);
605
+
450
606
  virtual void Accept(AstVisitor* v);
451
607
 
452
608
  // Type testing & conversion.
453
609
  virtual ExpressionStatement* AsExpressionStatement() { return this; }
454
610
 
611
+ virtual Assignment* StatementAsSimpleAssignment();
612
+ virtual CountOperation* StatementAsCountOperation();
613
+
455
614
  void set_expression(Expression* e) { expression_ = e; }
456
615
  Expression* expression() { return expression_; }
457
616
 
@@ -586,6 +745,13 @@ class IfStatement: public Statement {
586
745
  then_statement_(then_statement),
587
746
  else_statement_(else_statement) { }
588
747
 
748
+ // Construct an if-statement initialized from another if-statement
749
+ // and deep copies of all parts of the original.
750
+ IfStatement(IfStatement* other,
751
+ Expression* condition,
752
+ Statement* then_statement,
753
+ Statement* else_statement);
754
+
589
755
  virtual void Accept(AstVisitor* v);
590
756
 
591
757
  bool HasThenStatement() const { return !then_statement()->IsEmpty(); }
@@ -593,7 +759,9 @@ class IfStatement: public Statement {
593
759
 
594
760
  Expression* condition() const { return condition_; }
595
761
  Statement* then_statement() const { return then_statement_; }
762
+ void set_then_statement(Statement* stmt) { then_statement_ = stmt; }
596
763
  Statement* else_statement() const { return else_statement_; }
764
+ void set_else_statement(Statement* stmt) { else_statement_ = stmt; }
597
765
 
598
766
  private:
599
767
  Expression* condition_;
@@ -688,6 +856,10 @@ class DebuggerStatement: public Statement {
688
856
 
689
857
  class EmptyStatement: public Statement {
690
858
  public:
859
+ EmptyStatement() {}
860
+
861
+ explicit EmptyStatement(EmptyStatement* other);
862
+
691
863
  virtual void Accept(AstVisitor* v);
692
864
 
693
865
  // Type testing & conversion.
@@ -709,8 +881,6 @@ class Literal: public Expression {
709
881
  return handle_.is_identical_to(other->handle_);
710
882
  }
711
883
 
712
- virtual bool IsValidJSON() { return true; }
713
-
714
884
  virtual bool IsPropertyName() {
715
885
  if (handle_->IsSymbol()) {
716
886
  uint32_t ignored;
@@ -719,6 +889,11 @@ class Literal: public Expression {
719
889
  return false;
720
890
  }
721
891
 
892
+ virtual bool IsLeaf() { return true; }
893
+ virtual bool IsTrivial() { return true; }
894
+ virtual bool IsPrimitive();
895
+ virtual bool IsCritical();
896
+
722
897
  // Identity testers.
723
898
  bool IsNull() const { return handle_.is_identical_to(Factory::null_value()); }
724
899
  bool IsTrue() const { return handle_.is_identical_to(Factory::true_value()); }
@@ -747,8 +922,6 @@ class MaterializedLiteral: public Expression {
747
922
  // constants and simple object and array literals.
748
923
  bool is_simple() const { return is_simple_; }
749
924
 
750
- virtual bool IsValidJSON() { return true; }
751
-
752
925
  int depth() const { return depth_; }
753
926
 
754
927
  private:
@@ -795,23 +968,31 @@ class ObjectLiteral: public MaterializedLiteral {
795
968
  ZoneList<Property*>* properties,
796
969
  int literal_index,
797
970
  bool is_simple,
971
+ bool fast_elements,
798
972
  int depth)
799
973
  : MaterializedLiteral(literal_index, is_simple, depth),
800
974
  constant_properties_(constant_properties),
801
- properties_(properties) {}
975
+ properties_(properties),
976
+ fast_elements_(fast_elements) {}
802
977
 
803
978
  virtual ObjectLiteral* AsObjectLiteral() { return this; }
804
979
  virtual void Accept(AstVisitor* v);
805
- virtual bool IsValidJSON();
980
+
981
+ virtual bool IsLeaf() { return properties()->is_empty(); }
982
+
983
+ virtual bool IsPrimitive();
806
984
 
807
985
  Handle<FixedArray> constant_properties() const {
808
986
  return constant_properties_;
809
987
  }
810
988
  ZoneList<Property*>* properties() const { return properties_; }
811
989
 
990
+ bool fast_elements() const { return fast_elements_; }
991
+
812
992
  private:
813
993
  Handle<FixedArray> constant_properties_;
814
994
  ZoneList<Property*>* properties_;
995
+ bool fast_elements_;
815
996
  };
816
997
 
817
998
 
@@ -827,6 +1008,10 @@ class RegExpLiteral: public MaterializedLiteral {
827
1008
 
828
1009
  virtual void Accept(AstVisitor* v);
829
1010
 
1011
+ virtual bool IsLeaf() { return true; }
1012
+
1013
+ virtual bool IsPrimitive();
1014
+
830
1015
  Handle<String> pattern() const { return pattern_; }
831
1016
  Handle<String> flags() const { return flags_; }
832
1017
 
@@ -850,7 +1035,10 @@ class ArrayLiteral: public MaterializedLiteral {
850
1035
 
851
1036
  virtual void Accept(AstVisitor* v);
852
1037
  virtual ArrayLiteral* AsArrayLiteral() { return this; }
853
- virtual bool IsValidJSON();
1038
+
1039
+ virtual bool IsLeaf() { return values()->is_empty(); }
1040
+
1041
+ virtual bool IsPrimitive();
854
1042
 
855
1043
  Handle<FixedArray> constant_elements() const { return constant_elements_; }
856
1044
  ZoneList<Expression*>* values() const { return values_; }
@@ -872,6 +1060,8 @@ class CatchExtensionObject: public Expression {
872
1060
 
873
1061
  virtual void Accept(AstVisitor* v);
874
1062
 
1063
+ virtual bool IsPrimitive();
1064
+
875
1065
  Literal* key() const { return key_; }
876
1066
  VariableProxy* value() const { return value_; }
877
1067
 
@@ -899,6 +1089,20 @@ class VariableProxy: public Expression {
899
1089
  return var_ == NULL ? true : var_->IsValidLeftHandSide();
900
1090
  }
901
1091
 
1092
+ virtual bool IsLeaf() {
1093
+ ASSERT(var_ != NULL); // Variable must be resolved.
1094
+ return var()->is_global() || var()->rewrite()->IsLeaf();
1095
+ }
1096
+
1097
+ // Reading from a mutable variable is a side effect, but 'this' is
1098
+ // immutable.
1099
+ virtual bool IsTrivial() { return is_trivial_; }
1100
+
1101
+ virtual bool IsPrimitive();
1102
+ virtual bool IsCritical();
1103
+
1104
+ void SetIsPrimitive(bool value) { is_primitive_ = value; }
1105
+
902
1106
  bool IsVariable(Handle<String> n) {
903
1107
  return !is_this() && name().is_identical_to(n);
904
1108
  }
@@ -910,10 +1114,13 @@ class VariableProxy: public Expression {
910
1114
 
911
1115
  Handle<String> name() const { return name_; }
912
1116
  Variable* var() const { return var_; }
913
- UseCount* var_uses() { return &var_uses_; }
914
- UseCount* obj_uses() { return &obj_uses_; }
915
1117
  bool is_this() const { return is_this_; }
916
1118
  bool inside_with() const { return inside_with_; }
1119
+ bool is_trivial() { return is_trivial_; }
1120
+ void set_is_trivial(bool b) { is_trivial_ = b; }
1121
+
1122
+ BitVector* reaching_definitions() { return reaching_definitions_; }
1123
+ void set_reaching_definitions(BitVector* rd) { reaching_definitions_ = rd; }
917
1124
 
918
1125
  // Bind this proxy to the variable var.
919
1126
  void BindTo(Variable* var);
@@ -923,10 +1130,9 @@ class VariableProxy: public Expression {
923
1130
  Variable* var_; // resolved variable, or NULL
924
1131
  bool is_this_;
925
1132
  bool inside_with_;
926
-
927
- // VariableProxy usage info.
928
- UseCount var_uses_; // uses of the variable value
929
- UseCount obj_uses_; // uses of the object the variable points to
1133
+ bool is_trivial_;
1134
+ BitVector* reaching_definitions_;
1135
+ bool is_primitive_;
930
1136
 
931
1137
  VariableProxy(Handle<String> name, bool is_this, bool inside_with);
932
1138
  explicit VariableProxy(bool is_this);
@@ -943,6 +1149,11 @@ class VariableProxySentinel: public VariableProxy {
943
1149
  return &identifier_proxy_;
944
1150
  }
945
1151
 
1152
+ virtual bool IsPrimitive() {
1153
+ UNREACHABLE();
1154
+ return false;
1155
+ }
1156
+
946
1157
  private:
947
1158
  explicit VariableProxySentinel(bool is_this) : VariableProxy(is_this) { }
948
1159
  static VariableProxySentinel this_proxy_;
@@ -984,6 +1195,15 @@ class Slot: public Expression {
984
1195
  // Type testing & conversion
985
1196
  virtual Slot* AsSlot() { return this; }
986
1197
 
1198
+ virtual bool IsLeaf() { return true; }
1199
+
1200
+ virtual bool IsPrimitive() {
1201
+ UNREACHABLE();
1202
+ return false;
1203
+ }
1204
+
1205
+ bool IsStackAllocated() { return type_ == PARAMETER || type_ == LOCAL; }
1206
+
987
1207
  // Accessors
988
1208
  Variable* var() const { return var_; }
989
1209
  Type type() const { return type_; }
@@ -1007,6 +1227,8 @@ class Property: public Expression {
1007
1227
  Property(Expression* obj, Expression* key, int pos, Type type = NORMAL)
1008
1228
  : obj_(obj), key_(key), pos_(pos), type_(type) { }
1009
1229
 
1230
+ Property(Property* other, Expression* obj, Expression* key);
1231
+
1010
1232
  virtual void Accept(AstVisitor* v);
1011
1233
 
1012
1234
  // Type testing & conversion
@@ -1014,6 +1236,9 @@ class Property: public Expression {
1014
1236
 
1015
1237
  virtual bool IsValidLeftHandSide() { return true; }
1016
1238
 
1239
+ virtual bool IsPrimitive();
1240
+ virtual bool IsCritical();
1241
+
1017
1242
  Expression* obj() const { return obj_; }
1018
1243
  Expression* key() const { return key_; }
1019
1244
  int position() const { return pos_; }
@@ -1039,11 +1264,16 @@ class Call: public Expression {
1039
1264
  Call(Expression* expression, ZoneList<Expression*>* arguments, int pos)
1040
1265
  : expression_(expression), arguments_(arguments), pos_(pos) { }
1041
1266
 
1267
+ Call(Call* other, Expression* expression, ZoneList<Expression*>* arguments);
1268
+
1042
1269
  virtual void Accept(AstVisitor* v);
1043
1270
 
1044
1271
  // Type testing and conversion.
1045
1272
  virtual Call* AsCall() { return this; }
1046
1273
 
1274
+ virtual bool IsPrimitive();
1275
+ virtual bool IsCritical();
1276
+
1047
1277
  Expression* expression() const { return expression_; }
1048
1278
  ZoneList<Expression*>* arguments() const { return arguments_; }
1049
1279
  int position() { return pos_; }
@@ -1066,6 +1296,8 @@ class CallNew: public Expression {
1066
1296
 
1067
1297
  virtual void Accept(AstVisitor* v);
1068
1298
 
1299
+ virtual bool IsPrimitive();
1300
+
1069
1301
  Expression* expression() const { return expression_; }
1070
1302
  ZoneList<Expression*>* arguments() const { return arguments_; }
1071
1303
  int position() { return pos_; }
@@ -1090,6 +1322,8 @@ class CallRuntime: public Expression {
1090
1322
 
1091
1323
  virtual void Accept(AstVisitor* v);
1092
1324
 
1325
+ virtual bool IsPrimitive();
1326
+
1093
1327
  Handle<String> name() const { return name_; }
1094
1328
  Runtime::Function* function() const { return function_; }
1095
1329
  ZoneList<Expression*>* arguments() const { return arguments_; }
@@ -1109,11 +1343,16 @@ class UnaryOperation: public Expression {
1109
1343
  ASSERT(Token::IsUnaryOp(op));
1110
1344
  }
1111
1345
 
1346
+ UnaryOperation(UnaryOperation* other, Expression* expression);
1347
+
1112
1348
  virtual void Accept(AstVisitor* v);
1113
1349
 
1114
1350
  // Type testing & conversion
1115
1351
  virtual UnaryOperation* AsUnaryOperation() { return this; }
1116
1352
 
1353
+ virtual bool IsPrimitive();
1354
+ virtual bool IsCritical();
1355
+
1117
1356
  Token::Value op() const { return op_; }
1118
1357
  Expression* expression() const { return expression_; }
1119
1358
 
@@ -1130,11 +1369,22 @@ class BinaryOperation: public Expression {
1130
1369
  ASSERT(Token::IsBinaryOp(op));
1131
1370
  }
1132
1371
 
1372
+ // Construct a binary operation with a given operator and left and right
1373
+ // subexpressions. The rest of the expression state is copied from
1374
+ // another expression.
1375
+ BinaryOperation(Expression* other,
1376
+ Token::Value op,
1377
+ Expression* left,
1378
+ Expression* right);
1379
+
1133
1380
  virtual void Accept(AstVisitor* v);
1134
1381
 
1135
1382
  // Type testing & conversion
1136
1383
  virtual BinaryOperation* AsBinaryOperation() { return this; }
1137
1384
 
1385
+ virtual bool IsPrimitive();
1386
+ virtual bool IsCritical();
1387
+
1138
1388
  // True iff the result can be safely overwritten (to avoid allocation).
1139
1389
  // False for operations that can return one of their operands.
1140
1390
  bool ResultOverwriteAllowed() {
@@ -1179,8 +1429,19 @@ class CountOperation: public Expression {
1179
1429
  ASSERT(Token::IsCountOp(op));
1180
1430
  }
1181
1431
 
1432
+ CountOperation(CountOperation* other, Expression* expression);
1433
+
1182
1434
  virtual void Accept(AstVisitor* v);
1183
1435
 
1436
+ virtual CountOperation* AsCountOperation() { return this; }
1437
+
1438
+ virtual Variable* AssignedVariable() {
1439
+ return expression()->AsVariableProxy()->AsVariable();
1440
+ }
1441
+
1442
+ virtual bool IsPrimitive();
1443
+ virtual bool IsCritical();
1444
+
1184
1445
  bool is_prefix() const { return is_prefix_; }
1185
1446
  bool is_postfix() const { return !is_prefix_; }
1186
1447
  Token::Value op() const { return op_; }
@@ -1201,20 +1462,23 @@ class CountOperation: public Expression {
1201
1462
  class CompareOperation: public Expression {
1202
1463
  public:
1203
1464
  CompareOperation(Token::Value op, Expression* left, Expression* right)
1204
- : op_(op), left_(left), right_(right), is_for_loop_condition_(false) {
1465
+ : op_(op), left_(left), right_(right) {
1205
1466
  ASSERT(Token::IsCompareOp(op));
1206
1467
  }
1207
1468
 
1469
+ CompareOperation(CompareOperation* other,
1470
+ Expression* left,
1471
+ Expression* right);
1472
+
1208
1473
  virtual void Accept(AstVisitor* v);
1209
1474
 
1475
+ virtual bool IsPrimitive();
1476
+ virtual bool IsCritical();
1477
+
1210
1478
  Token::Value op() const { return op_; }
1211
1479
  Expression* left() const { return left_; }
1212
1480
  Expression* right() const { return right_; }
1213
1481
 
1214
- // Accessors for flag whether this compare operation is hanging of a for loop.
1215
- bool is_for_loop_condition() const { return is_for_loop_condition_; }
1216
- void set_is_for_loop_condition() { is_for_loop_condition_ = true; }
1217
-
1218
1482
  // Type testing & conversion
1219
1483
  virtual CompareOperation* AsCompareOperation() { return this; }
1220
1484
 
@@ -1222,7 +1486,6 @@ class CompareOperation: public Expression {
1222
1486
  Token::Value op_;
1223
1487
  Expression* left_;
1224
1488
  Expression* right_;
1225
- bool is_for_loop_condition_;
1226
1489
  };
1227
1490
 
1228
1491
 
@@ -1237,6 +1500,8 @@ class Conditional: public Expression {
1237
1500
 
1238
1501
  virtual void Accept(AstVisitor* v);
1239
1502
 
1503
+ virtual bool IsPrimitive();
1504
+
1240
1505
  Expression* condition() const { return condition_; }
1241
1506
  Expression* then_expression() const { return then_expression_; }
1242
1507
  Expression* else_expression() const { return else_expression_; }
@@ -1256,9 +1521,20 @@ class Assignment: public Expression {
1256
1521
  ASSERT(Token::IsAssignmentOp(op));
1257
1522
  }
1258
1523
 
1524
+ Assignment(Assignment* other, Expression* target, Expression* value);
1525
+
1259
1526
  virtual void Accept(AstVisitor* v);
1260
1527
  virtual Assignment* AsAssignment() { return this; }
1261
1528
 
1529
+ virtual bool IsPrimitive();
1530
+ virtual bool IsCritical();
1531
+
1532
+ Assignment* AsSimpleAssignment() { return !is_compound() ? this : NULL; }
1533
+
1534
+ virtual Variable* AssignedVariable() {
1535
+ return target()->AsVariableProxy()->AsVariable();
1536
+ }
1537
+
1262
1538
  Token::Value binary_op() const;
1263
1539
 
1264
1540
  Token::Value op() const { return op_; }
@@ -1293,6 +1569,9 @@ class Throw: public Expression {
1293
1569
  : exception_(exception), pos_(pos) {}
1294
1570
 
1295
1571
  virtual void Accept(AstVisitor* v);
1572
+
1573
+ virtual bool IsPrimitive();
1574
+
1296
1575
  Expression* exception() const { return exception_; }
1297
1576
  int position() const { return pos_; }
1298
1577
 
@@ -1327,10 +1606,9 @@ class FunctionLiteral: public Expression {
1327
1606
  start_position_(start_position),
1328
1607
  end_position_(end_position),
1329
1608
  is_expression_(is_expression),
1330
- loop_nesting_(0),
1331
1609
  function_token_position_(RelocInfo::kNoPosition),
1332
1610
  inferred_name_(Heap::empty_string()),
1333
- try_fast_codegen_(false) {
1611
+ try_full_codegen_(false) {
1334
1612
  #ifdef DEBUG
1335
1613
  already_compiled_ = false;
1336
1614
  #endif
@@ -1341,6 +1619,10 @@ class FunctionLiteral: public Expression {
1341
1619
  // Type testing & conversion
1342
1620
  virtual FunctionLiteral* AsFunctionLiteral() { return this; }
1343
1621
 
1622
+ virtual bool IsLeaf() { return true; }
1623
+
1624
+ virtual bool IsPrimitive();
1625
+
1344
1626
  Handle<String> name() const { return name_; }
1345
1627
  Scope* scope() const { return scope_; }
1346
1628
  ZoneList<Statement*>* body() const { return body_; }
@@ -1362,16 +1644,13 @@ class FunctionLiteral: public Expression {
1362
1644
 
1363
1645
  bool AllowsLazyCompilation();
1364
1646
 
1365
- bool loop_nesting() const { return loop_nesting_; }
1366
- void set_loop_nesting(int nesting) { loop_nesting_ = nesting; }
1367
-
1368
1647
  Handle<String> inferred_name() const { return inferred_name_; }
1369
1648
  void set_inferred_name(Handle<String> inferred_name) {
1370
1649
  inferred_name_ = inferred_name;
1371
1650
  }
1372
1651
 
1373
- bool try_fast_codegen() { return try_fast_codegen_; }
1374
- void set_try_fast_codegen(bool flag) { try_fast_codegen_ = flag; }
1652
+ bool try_full_codegen() { return try_full_codegen_; }
1653
+ void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; }
1375
1654
 
1376
1655
  #ifdef DEBUG
1377
1656
  void mark_as_compiled() {
@@ -1392,35 +1671,41 @@ class FunctionLiteral: public Expression {
1392
1671
  int start_position_;
1393
1672
  int end_position_;
1394
1673
  bool is_expression_;
1395
- int loop_nesting_;
1396
1674
  int function_token_position_;
1397
1675
  Handle<String> inferred_name_;
1398
- bool try_fast_codegen_;
1676
+ bool try_full_codegen_;
1399
1677
  #ifdef DEBUG
1400
1678
  bool already_compiled_;
1401
1679
  #endif
1402
1680
  };
1403
1681
 
1404
1682
 
1405
- class FunctionBoilerplateLiteral: public Expression {
1683
+ class SharedFunctionInfoLiteral: public Expression {
1406
1684
  public:
1407
- explicit FunctionBoilerplateLiteral(Handle<JSFunction> boilerplate)
1408
- : boilerplate_(boilerplate) {
1409
- ASSERT(boilerplate->IsBoilerplate());
1685
+ explicit SharedFunctionInfoLiteral(
1686
+ Handle<SharedFunctionInfo> shared_function_info)
1687
+ : shared_function_info_(shared_function_info) { }
1688
+
1689
+ Handle<SharedFunctionInfo> shared_function_info() const {
1690
+ return shared_function_info_;
1410
1691
  }
1411
1692
 
1412
- Handle<JSFunction> boilerplate() const { return boilerplate_; }
1693
+ virtual bool IsLeaf() { return true; }
1413
1694
 
1414
1695
  virtual void Accept(AstVisitor* v);
1415
1696
 
1697
+ virtual bool IsPrimitive();
1698
+
1416
1699
  private:
1417
- Handle<JSFunction> boilerplate_;
1700
+ Handle<SharedFunctionInfo> shared_function_info_;
1418
1701
  };
1419
1702
 
1420
1703
 
1421
1704
  class ThisFunction: public Expression {
1422
1705
  public:
1423
1706
  virtual void Accept(AstVisitor* v);
1707
+ virtual bool IsLeaf() { return true; }
1708
+ virtual bool IsPrimitive();
1424
1709
  };
1425
1710
 
1426
1711
 
@@ -1781,29 +2066,23 @@ class AstVisitor BASE_EMBEDDED {
1781
2066
  AstVisitor() : stack_overflow_(false) { }
1782
2067
  virtual ~AstVisitor() { }
1783
2068
 
1784
- // Dispatch
1785
- void Visit(AstNode* node) { node->Accept(this); }
2069
+ // Stack overflow check and dynamic dispatch.
2070
+ void Visit(AstNode* node) { if (!CheckStackOverflow()) node->Accept(this); }
1786
2071
 
1787
- // Iteration
2072
+ // Iteration left-to-right.
1788
2073
  virtual void VisitDeclarations(ZoneList<Declaration*>* declarations);
1789
2074
  virtual void VisitStatements(ZoneList<Statement*>* statements);
1790
2075
  virtual void VisitExpressions(ZoneList<Expression*>* expressions);
1791
2076
 
1792
2077
  // Stack overflow tracking support.
1793
2078
  bool HasStackOverflow() const { return stack_overflow_; }
1794
- bool CheckStackOverflow() {
1795
- if (stack_overflow_) return true;
1796
- StackLimitCheck check;
1797
- if (!check.HasOverflowed()) return false;
1798
- return (stack_overflow_ = true);
1799
- }
2079
+ bool CheckStackOverflow();
1800
2080
 
1801
2081
  // If a stack-overflow exception is encountered when visiting a
1802
2082
  // node, calling SetStackOverflow will make sure that the visitor
1803
2083
  // bails out without visiting more nodes.
1804
2084
  void SetStackOverflow() { stack_overflow_ = true; }
1805
2085
 
1806
-
1807
2086
  // Individual nodes
1808
2087
  #define DEF_VISIT(type) \
1809
2088
  virtual void Visit##type(type* node) = 0;
@@ -1815,6 +2094,28 @@ class AstVisitor BASE_EMBEDDED {
1815
2094
  };
1816
2095
 
1817
2096
 
2097
+ class CopyAstVisitor : public AstVisitor {
2098
+ public:
2099
+ Expression* DeepCopyExpr(Expression* expr);
2100
+
2101
+ Statement* DeepCopyStmt(Statement* stmt);
2102
+
2103
+ private:
2104
+ ZoneList<Expression*>* DeepCopyExprList(ZoneList<Expression*>* expressions);
2105
+
2106
+ ZoneList<Statement*>* DeepCopyStmtList(ZoneList<Statement*>* statements);
2107
+
2108
+ // AST node visit functions.
2109
+ #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
2110
+ AST_NODE_LIST(DECLARE_VISIT)
2111
+ #undef DECLARE_VISIT
2112
+
2113
+ // Holds the result of copying an expression.
2114
+ Expression* expr_;
2115
+ // Holds the result of copying a statement.
2116
+ Statement* stmt_;
2117
+ };
2118
+
1818
2119
  } } // namespace v8::internal
1819
2120
 
1820
2121
  #endif // V8_AST_H_