therubyracer 0.8.1.pre2 → 0.8.1

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 (877) hide show
  1. data/Changelog.md +2 -1
  2. data/README.md +6 -3
  3. data/ext/v8/upstream/3.1.8/.gitignore +31 -0
  4. data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
  5. data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
  6. data/ext/v8/upstream/3.1.8/LICENSE +52 -0
  7. data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
  8. data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
  9. data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
  10. data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
  11. data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
  12. data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
  13. data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
  14. data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
  15. data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
  16. data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
  17. data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
  18. data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
  19. data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
  20. data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
  21. data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
  22. data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
  23. data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
  24. data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
  25. data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
  26. data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
  27. data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
  28. data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
  29. data/ext/v8/upstream/3.1.8/src/api.h +508 -0
  30. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
  31. data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
  32. data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
  33. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
  34. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
  35. data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
  36. data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
  37. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
  38. data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
  39. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
  40. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
  41. data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
  42. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
  43. data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
  44. data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
  45. data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
  46. data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
  47. data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
  48. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
  49. data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
  50. data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
  51. data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
  52. data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
  53. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
  54. data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
  55. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
  56. data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
  57. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
  58. data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
  59. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
  60. data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
  61. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
  62. data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
  63. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
  64. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
  65. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
  66. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
  67. data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
  68. data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
  69. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
  70. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
  71. data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
  72. data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
  73. data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
  74. data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
  75. data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
  76. data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
  77. data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
  78. data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
  79. data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
  80. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
  81. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
  82. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
  83. data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
  84. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
  85. data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
  86. data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
  87. data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
  88. data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
  89. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
  90. data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
  91. data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
  92. data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
  93. data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
  94. data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
  95. data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
  96. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
  97. data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
  98. data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
  99. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
  100. data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
  101. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
  102. data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
  103. data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
  104. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
  105. data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
  106. data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
  107. data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
  108. data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
  109. data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
  110. data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
  111. data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
  112. data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
  113. data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
  114. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
  115. data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
  116. data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
  117. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
  118. data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
  119. data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
  120. data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
  121. data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
  122. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
  123. data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
  124. data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
  125. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
  126. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
  127. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
  128. data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
  129. data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
  130. data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
  131. data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
  132. data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
  133. data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
  134. data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
  135. data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
  136. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
  137. data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
  138. data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
  139. data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
  140. data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
  141. data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
  142. data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
  143. data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
  144. data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
  145. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
  146. data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
  147. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
  148. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
  149. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
  150. data/ext/v8/upstream/3.1.8/src/double.h +238 -0
  151. data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
  152. data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
  153. data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
  154. data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
  155. data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
  156. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
  157. data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
  158. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
  159. data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
  160. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
  161. data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
  162. data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
  163. data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
  164. data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
  165. data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
  166. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
  167. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
  168. data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
  169. data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
  170. data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
  171. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
  172. data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
  173. data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
  174. data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
  175. data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
  176. data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
  177. data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
  178. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
  179. data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
  180. data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
  181. data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
  182. data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
  183. data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
  184. data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
  185. data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
  186. data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
  187. data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
  188. data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
  189. data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
  190. data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
  191. data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
  192. data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
  193. data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
  194. data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
  195. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
  196. data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
  197. data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
  198. data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
  199. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
  200. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
  201. data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
  202. data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
  203. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
  204. data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
  205. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
  206. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
  207. data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
  208. data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
  209. data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
  210. data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
  211. data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
  212. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
  213. data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
  214. data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
  215. data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
  216. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
  217. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
  218. data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
  219. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
  220. data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  221. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
  222. data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
  223. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
  224. data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
  225. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
  226. data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
  227. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
  228. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
  229. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
  230. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
  231. data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
  232. data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
  233. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
  234. data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
  235. data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
  236. data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
  237. data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
  238. data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
  239. data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
  240. data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
  241. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
  242. data/ext/v8/upstream/3.1.8/src/json.js +342 -0
  243. data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
  244. data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
  245. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
  246. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
  247. data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
  248. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
  249. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
  250. data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
  251. data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
  252. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
  253. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
  254. data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
  255. data/ext/v8/upstream/3.1.8/src/list.h +164 -0
  256. data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
  257. data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
  258. data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
  259. data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
  260. data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
  261. data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
  262. data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
  263. data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
  264. data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
  265. data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
  266. data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
  267. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
  268. data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
  269. data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
  270. data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
  271. data/ext/v8/upstream/3.1.8/src/log.h +379 -0
  272. data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
  273. data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
  274. data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
  275. data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
  276. data/ext/v8/upstream/3.1.8/src/math.js +264 -0
  277. data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
  278. data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
  279. data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
  280. data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
  281. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
  282. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
  283. data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
  284. data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
  285. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
  286. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
  287. data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
  288. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
  289. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
  290. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
  291. data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
  292. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
  293. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
  294. data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
  295. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
  296. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
  297. data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
  298. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
  299. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
  300. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
  301. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
  302. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
  303. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
  304. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
  305. data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
  306. data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
  307. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
  308. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
  309. data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
  310. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
  311. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
  312. data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
  313. data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
  314. data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
  315. data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
  316. data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
  317. data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
  318. data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
  319. data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
  320. data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
  321. data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
  322. data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
  323. data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
  324. data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
  325. data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
  326. data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
  327. data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
  328. data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
  329. data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
  330. data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
  331. data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
  332. data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
  333. data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
  334. data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
  335. data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
  336. data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
  337. data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
  338. data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
  339. data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
  340. data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
  341. data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
  342. data/ext/v8/upstream/3.1.8/src/property.h +337 -0
  343. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  344. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
  345. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
  346. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
  347. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
  348. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
  349. data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
  350. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
  351. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
  352. data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
  353. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
  354. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
  355. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
  356. data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
  357. data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
  358. data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
  359. data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
  360. data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
  361. data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
  362. data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
  363. data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
  364. data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
  365. data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
  366. data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
  367. data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
  368. data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
  369. data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
  370. data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
  371. data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
  372. data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
  373. data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
  374. data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
  375. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
  376. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
  377. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
  378. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
  379. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
  380. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
  381. data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
  382. data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
  383. data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
  384. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
  385. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
  386. data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
  387. data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
  388. data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
  389. data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
  390. data/ext/v8/upstream/3.1.8/src/string.js +915 -0
  391. data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
  392. data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
  393. data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
  394. data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
  395. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
  396. data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
  397. data/ext/v8/upstream/3.1.8/src/token.h +288 -0
  398. data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
  399. data/ext/v8/upstream/3.1.8/src/top.h +608 -0
  400. data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
  401. data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
  402. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
  403. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
  404. data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
  405. data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
  406. data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
  407. data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
  408. data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
  409. data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
  410. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
  411. data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
  412. data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
  413. data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
  414. data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
  415. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
  416. data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
  417. data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
  418. data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
  419. data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
  420. data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
  421. data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
  422. data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
  423. data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
  424. data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
  425. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
  426. data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
  427. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
  428. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
  429. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
  430. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
  431. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
  432. data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
  433. data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
  434. data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
  435. data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
  436. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
  437. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
  438. data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
  439. data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
  440. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
  441. data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
  442. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
  443. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
  444. data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
  445. data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
  446. data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
  447. data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
  448. data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
  449. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
  450. data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
  451. data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
  452. data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
  453. data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
  454. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
  455. data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
  456. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  457. data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
  458. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
  459. data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
  460. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
  461. data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
  462. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
  463. data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
  464. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
  465. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
  466. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
  467. data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
  468. data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
  469. data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
  470. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
  471. data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
  472. data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
  473. data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
  474. data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
  475. data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
  476. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
  477. data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
  478. data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
  479. data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
  480. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
  481. data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
  482. data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
  483. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
  484. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
  485. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
  486. data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
  487. data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
  488. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
  489. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
  490. data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
  491. data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
  492. data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
  493. data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
  494. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
  495. data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
  496. data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
  497. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
  498. data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
  499. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
  500. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
  501. data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
  502. data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
  503. data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
  504. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
  505. data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
  506. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
  507. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
  508. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
  509. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
  510. data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
  511. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
  512. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
  513. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
  514. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
  515. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
  516. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
  517. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
  518. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
  519. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
  520. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
  521. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
  522. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  523. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  524. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  525. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  526. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  527. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  528. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  529. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
  530. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
  531. data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
  532. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  533. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  534. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  535. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  536. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
  537. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
  538. data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
  539. data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
  540. data/ext/v8/upstream/Makefile +2 -1
  541. data/ext/v8/v8_template.cpp +2 -2
  542. data/lib/v8/version.rb +1 -1
  543. data/spec/redjs/jsapi_spec.rb +2 -2
  544. metadata +552 -490
  545. data/ext/v8/upstream/2.3.3/.gitignore +0 -26
  546. data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
  547. data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
  548. data/ext/v8/upstream/2.3.3/LICENSE +0 -55
  549. data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
  550. data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
  551. data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
  552. data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
  553. data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
  554. data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
  555. data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
  556. data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
  557. data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
  558. data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
  559. data/ext/v8/upstream/2.3.3/src/api.h +0 -485
  560. data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
  561. data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
  562. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
  563. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
  564. data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
  565. data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
  566. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
  567. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
  568. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
  569. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
  570. data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
  571. data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
  572. data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
  573. data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
  574. data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
  575. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
  576. data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
  577. data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
  578. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
  579. data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
  580. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
  581. data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
  582. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
  583. data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
  584. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
  585. data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
  586. data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
  587. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
  588. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
  589. data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
  590. data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
  591. data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
  592. data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
  593. data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
  594. data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
  595. data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
  596. data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
  597. data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
  598. data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
  599. data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
  600. data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
  601. data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
  602. data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
  603. data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
  604. data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
  605. data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
  606. data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
  607. data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
  608. data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
  609. data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
  610. data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
  611. data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
  612. data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
  613. data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
  614. data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
  615. data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
  616. data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
  617. data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
  618. data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
  619. data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
  620. data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
  621. data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
  622. data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
  623. data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
  624. data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
  625. data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
  626. data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
  627. data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
  628. data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
  629. data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
  630. data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
  631. data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
  632. data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
  633. data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
  634. data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
  635. data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
  636. data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
  637. data/ext/v8/upstream/2.3.3/src/double.h +0 -169
  638. data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
  639. data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
  640. data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
  641. data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
  642. data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
  643. data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
  644. data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
  645. data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
  646. data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
  647. data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
  648. data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
  649. data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
  650. data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
  651. data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
  652. data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
  653. data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
  654. data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
  655. data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
  656. data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
  657. data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
  658. data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
  659. data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
  660. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
  661. data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
  662. data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
  663. data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
  664. data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
  665. data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
  666. data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
  667. data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
  668. data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
  669. data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
  670. data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
  671. data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
  672. data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
  673. data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
  674. data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
  675. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
  676. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
  677. data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
  678. data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
  679. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
  680. data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
  681. data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
  682. data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
  683. data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
  684. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
  685. data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
  686. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
  687. data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
  688. data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
  689. data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
  690. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
  691. data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
  692. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
  693. data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
  694. data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
  695. data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
  696. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
  697. data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
  698. data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
  699. data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
  700. data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
  701. data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
  702. data/ext/v8/upstream/2.3.3/src/json.js +0 -268
  703. data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
  704. data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
  705. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
  706. data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
  707. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
  708. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
  709. data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
  710. data/ext/v8/upstream/2.3.3/src/list.h +0 -159
  711. data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
  712. data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
  713. data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
  714. data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
  715. data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
  716. data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
  717. data/ext/v8/upstream/2.3.3/src/log.h +0 -384
  718. data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
  719. data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
  720. data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
  721. data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
  722. data/ext/v8/upstream/2.3.3/src/math.js +0 -264
  723. data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
  724. data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
  725. data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
  726. data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
  727. data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
  728. data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
  729. data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
  730. data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
  731. data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
  732. data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
  733. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
  734. data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
  735. data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
  736. data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
  737. data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
  738. data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
  739. data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
  740. data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
  741. data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
  742. data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
  743. data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
  744. data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
  745. data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
  746. data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
  747. data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
  748. data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
  749. data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
  750. data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
  751. data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
  752. data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
  753. data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
  754. data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
  755. data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
  756. data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
  757. data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
  758. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
  759. data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
  760. data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
  761. data/ext/v8/upstream/2.3.3/src/property.h +0 -315
  762. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
  763. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
  764. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
  765. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
  766. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
  767. data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
  768. data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
  769. data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
  770. data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
  771. data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
  772. data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
  773. data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
  774. data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
  775. data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
  776. data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
  777. data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
  778. data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
  779. data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
  780. data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
  781. data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
  782. data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
  783. data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
  784. data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
  785. data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
  786. data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
  787. data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
  788. data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
  789. data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
  790. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
  791. data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
  792. data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
  793. data/ext/v8/upstream/2.3.3/src/token.h +0 -270
  794. data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
  795. data/ext/v8/upstream/2.3.3/src/top.h +0 -463
  796. data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
  797. data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
  798. data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
  799. data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
  800. data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
  801. data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
  802. data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
  803. data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
  804. data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
  805. data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
  806. data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
  807. data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
  808. data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
  809. data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
  810. data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
  811. data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
  812. data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
  813. data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
  814. data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
  815. data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
  816. data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
  817. data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
  818. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
  819. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
  820. data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
  821. data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
  822. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
  823. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
  824. data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
  825. data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
  826. data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
  827. data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
  828. data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
  829. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
  830. data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
  831. data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
  832. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
  833. data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
  834. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
  835. data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
  836. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
  837. data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
  838. data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
  839. data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
  840. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
  841. data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
  842. data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
  843. data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
  844. data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
  845. data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
  846. data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
  847. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
  848. data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
  849. data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
  850. data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
  851. data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
  852. data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
  853. data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
  854. data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
  855. data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
  856. data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
  857. data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
  858. data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
  859. data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
  860. data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
  861. data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
  862. data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
  863. data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
  864. data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
  865. data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
  866. data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
  867. data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
  868. data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
  869. data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
  870. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
  871. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
  872. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
  873. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
  874. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
  875. data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
  876. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
  877. data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,2106 +0,0 @@
1
- // Copyright 2010 the V8 project authors. All rights reserved.
2
- // Redistribution and use in source and binary forms, with or without
3
- // modification, are permitted provided that the following conditions are
4
- // met:
5
- //
6
- // * Redistributions of source code must retain the above copyright
7
- // notice, this list of conditions and the following disclaimer.
8
- // * Redistributions in binary form must reproduce the above
9
- // copyright notice, this list of conditions and the following
10
- // disclaimer in the documentation and/or other materials provided
11
- // with the distribution.
12
- // * Neither the name of Google Inc. nor the names of its
13
- // contributors may be used to endorse or promote products derived
14
- // from this software without specific prior written permission.
15
- //
16
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
-
28
- #ifndef V8_AST_H_
29
- #define V8_AST_H_
30
-
31
- #include "execution.h"
32
- #include "factory.h"
33
- #include "jsregexp.h"
34
- #include "jump-target.h"
35
- #include "runtime.h"
36
- #include "token.h"
37
- #include "variables.h"
38
-
39
- namespace v8 {
40
- namespace internal {
41
-
42
- // The abstract syntax tree is an intermediate, light-weight
43
- // representation of the parsed JavaScript code suitable for
44
- // compilation to native code.
45
-
46
- // Nodes are allocated in a separate zone, which allows faster
47
- // allocation and constant-time deallocation of the entire syntax
48
- // tree.
49
-
50
-
51
- // ----------------------------------------------------------------------------
52
- // Nodes of the abstract syntax tree. Only concrete classes are
53
- // enumerated here.
54
-
55
- #define STATEMENT_NODE_LIST(V) \
56
- V(Block) \
57
- V(ExpressionStatement) \
58
- V(EmptyStatement) \
59
- V(IfStatement) \
60
- V(ContinueStatement) \
61
- V(BreakStatement) \
62
- V(ReturnStatement) \
63
- V(WithEnterStatement) \
64
- V(WithExitStatement) \
65
- V(SwitchStatement) \
66
- V(DoWhileStatement) \
67
- V(WhileStatement) \
68
- V(ForStatement) \
69
- V(ForInStatement) \
70
- V(TryCatchStatement) \
71
- V(TryFinallyStatement) \
72
- V(DebuggerStatement)
73
-
74
- #define EXPRESSION_NODE_LIST(V) \
75
- V(FunctionLiteral) \
76
- V(SharedFunctionInfoLiteral) \
77
- V(Conditional) \
78
- V(Slot) \
79
- V(VariableProxy) \
80
- V(Literal) \
81
- V(RegExpLiteral) \
82
- V(ObjectLiteral) \
83
- V(ArrayLiteral) \
84
- V(CatchExtensionObject) \
85
- V(Assignment) \
86
- V(Throw) \
87
- V(Property) \
88
- V(Call) \
89
- V(CallNew) \
90
- V(CallRuntime) \
91
- V(UnaryOperation) \
92
- V(CountOperation) \
93
- V(BinaryOperation) \
94
- V(CompareOperation) \
95
- V(ThisFunction)
96
-
97
- #define AST_NODE_LIST(V) \
98
- V(Declaration) \
99
- STATEMENT_NODE_LIST(V) \
100
- EXPRESSION_NODE_LIST(V)
101
-
102
- // Forward declarations
103
- class TargetCollector;
104
- class MaterializedLiteral;
105
- class DefinitionInfo;
106
- class BitVector;
107
-
108
- #define DEF_FORWARD_DECLARATION(type) class type;
109
- AST_NODE_LIST(DEF_FORWARD_DECLARATION)
110
- #undef DEF_FORWARD_DECLARATION
111
-
112
-
113
- // Typedef only introduced to avoid unreadable code.
114
- // Please do appreciate the required space in "> >".
115
- typedef ZoneList<Handle<String> > ZoneStringList;
116
- typedef ZoneList<Handle<Object> > ZoneObjectList;
117
-
118
-
119
- class AstNode: public ZoneObject {
120
- public:
121
- static const int kNoNumber = -1;
122
-
123
- AstNode() : num_(kNoNumber) {}
124
-
125
- explicit AstNode(AstNode* other);
126
-
127
- virtual ~AstNode() { }
128
- virtual void Accept(AstVisitor* v) = 0;
129
-
130
- // Type testing & conversion.
131
- virtual Statement* AsStatement() { return NULL; }
132
- virtual Block* AsBlock() { return NULL; }
133
- virtual ExpressionStatement* AsExpressionStatement() { return NULL; }
134
- virtual EmptyStatement* AsEmptyStatement() { return NULL; }
135
- virtual Expression* AsExpression() { return NULL; }
136
- virtual Literal* AsLiteral() { return NULL; }
137
- virtual Slot* AsSlot() { return NULL; }
138
- virtual VariableProxy* AsVariableProxy() { return NULL; }
139
- virtual Property* AsProperty() { return NULL; }
140
- virtual Call* AsCall() { return NULL; }
141
- virtual TargetCollector* AsTargetCollector() { return NULL; }
142
- virtual BreakableStatement* AsBreakableStatement() { return NULL; }
143
- virtual IterationStatement* AsIterationStatement() { return NULL; }
144
- virtual ForStatement* AsForStatement() { return NULL; }
145
- virtual UnaryOperation* AsUnaryOperation() { return NULL; }
146
- virtual CountOperation* AsCountOperation() { return NULL; }
147
- virtual BinaryOperation* AsBinaryOperation() { return NULL; }
148
- virtual Assignment* AsAssignment() { return NULL; }
149
- virtual FunctionLiteral* AsFunctionLiteral() { return NULL; }
150
- virtual MaterializedLiteral* AsMaterializedLiteral() { return NULL; }
151
- virtual ObjectLiteral* AsObjectLiteral() { return NULL; }
152
- virtual ArrayLiteral* AsArrayLiteral() { return NULL; }
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_;
168
- };
169
-
170
-
171
- class Statement: public AstNode {
172
- public:
173
- Statement() : statement_pos_(RelocInfo::kNoPosition) {}
174
-
175
- explicit Statement(Statement* other);
176
-
177
- virtual Statement* AsStatement() { return this; }
178
- virtual ReturnStatement* AsReturnStatement() { return NULL; }
179
-
180
- virtual Assignment* StatementAsSimpleAssignment() { return NULL; }
181
- virtual CountOperation* StatementAsCountOperation() { return NULL; }
182
-
183
- bool IsEmpty() { return AsEmptyStatement() != NULL; }
184
-
185
- void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; }
186
- int statement_pos() const { return statement_pos_; }
187
-
188
- private:
189
- int statement_pos_;
190
- };
191
-
192
-
193
- class Expression: public AstNode {
194
- public:
195
- enum Context {
196
- // Not assigned a context yet, or else will not be visited during
197
- // code generation.
198
- kUninitialized,
199
- // Evaluated for its side effects.
200
- kEffect,
201
- // Evaluated for its value (and side effects).
202
- kValue,
203
- // Evaluated for control flow (and side effects).
204
- kTest,
205
- // Evaluated for control flow and side effects. Value is also
206
- // needed if true.
207
- kValueTest,
208
- // Evaluated for control flow and side effects. Value is also
209
- // needed if false.
210
- kTestValue
211
- };
212
-
213
- Expression() : bitfields_(0) {}
214
-
215
- explicit Expression(Expression* other);
216
-
217
- virtual Expression* AsExpression() { return this; }
218
-
219
- virtual bool IsValidLeftHandSide() { return false; }
220
-
221
- virtual Variable* AssignedVariable() { return NULL; }
222
-
223
- // Symbols that cannot be parsed as array indices are considered property
224
- // names. We do not treat symbols that can be array indexes as property
225
- // names because [] for string objects is handled only by keyed ICs.
226
- virtual bool IsPropertyName() { return false; }
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
-
241
- // Mark the expression as being compiled as an expression
242
- // statement. This is used to transform postfix increments to
243
- // (faster) prefix increments.
244
- virtual void MarkAsStatement() { /* do nothing */ }
245
-
246
- // Static type information for this expression.
247
- StaticType* type() { return &type_; }
248
-
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
- }
296
-
297
- private:
298
- static const int kMaxNumBitOps = (1 << 5) - 1;
299
-
300
- uint32_t bitfields_;
301
- StaticType type_;
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> {};
309
- };
310
-
311
-
312
- /**
313
- * A sentinel used during pre parsing that represents some expression
314
- * that is a valid left hand side without having to actually build
315
- * the expression.
316
- */
317
- class ValidLeftHandSideSentinel: public Expression {
318
- public:
319
- virtual bool IsValidLeftHandSide() { return true; }
320
- virtual void Accept(AstVisitor* v) { UNREACHABLE(); }
321
- static ValidLeftHandSideSentinel* instance() { return &instance_; }
322
-
323
- virtual bool IsPrimitive() {
324
- UNREACHABLE();
325
- return false;
326
- }
327
-
328
- private:
329
- static ValidLeftHandSideSentinel instance_;
330
- };
331
-
332
-
333
- class BreakableStatement: public Statement {
334
- public:
335
- enum Type {
336
- TARGET_FOR_ANONYMOUS,
337
- TARGET_FOR_NAMED_ONLY
338
- };
339
-
340
- // The labels associated with this statement. May be NULL;
341
- // if it is != NULL, guaranteed to contain at least one entry.
342
- ZoneStringList* labels() const { return labels_; }
343
-
344
- // Type testing & conversion.
345
- virtual BreakableStatement* AsBreakableStatement() { return this; }
346
-
347
- // Code generation
348
- BreakTarget* break_target() { return &break_target_; }
349
-
350
- // Testers.
351
- bool is_target_for_anonymous() const { return type_ == TARGET_FOR_ANONYMOUS; }
352
-
353
- protected:
354
- inline BreakableStatement(ZoneStringList* labels, Type type);
355
-
356
- explicit BreakableStatement(BreakableStatement* other);
357
-
358
- private:
359
- ZoneStringList* labels_;
360
- Type type_;
361
- BreakTarget break_target_;
362
- };
363
-
364
-
365
- class Block: public BreakableStatement {
366
- public:
367
- inline Block(ZoneStringList* labels, int capacity, bool is_initializer_block);
368
-
369
- // Construct a clone initialized from the original block and
370
- // a deep copy of all statements of the original block.
371
- Block(Block* other, ZoneList<Statement*>* statements);
372
-
373
- virtual void Accept(AstVisitor* v);
374
-
375
- virtual Block* AsBlock() { return this; }
376
-
377
- virtual Assignment* StatementAsSimpleAssignment() {
378
- if (statements_.length() != 1) return NULL;
379
- return statements_[0]->StatementAsSimpleAssignment();
380
- }
381
-
382
- virtual CountOperation* StatementAsCountOperation() {
383
- if (statements_.length() != 1) return NULL;
384
- return statements_[0]->StatementAsCountOperation();
385
- }
386
-
387
- void AddStatement(Statement* statement) { statements_.Add(statement); }
388
-
389
- ZoneList<Statement*>* statements() { return &statements_; }
390
- bool is_initializer_block() const { return is_initializer_block_; }
391
-
392
- private:
393
- ZoneList<Statement*> statements_;
394
- bool is_initializer_block_;
395
- };
396
-
397
-
398
- class Declaration: public AstNode {
399
- public:
400
- Declaration(VariableProxy* proxy, Variable::Mode mode, FunctionLiteral* fun)
401
- : proxy_(proxy),
402
- mode_(mode),
403
- fun_(fun) {
404
- ASSERT(mode == Variable::VAR || mode == Variable::CONST);
405
- // At the moment there are no "const functions"'s in JavaScript...
406
- ASSERT(fun == NULL || mode == Variable::VAR);
407
- }
408
-
409
- virtual void Accept(AstVisitor* v);
410
-
411
- VariableProxy* proxy() const { return proxy_; }
412
- Variable::Mode mode() const { return mode_; }
413
- FunctionLiteral* fun() const { return fun_; } // may be NULL
414
-
415
- private:
416
- VariableProxy* proxy_;
417
- Variable::Mode mode_;
418
- FunctionLiteral* fun_;
419
- };
420
-
421
-
422
- class IterationStatement: public BreakableStatement {
423
- public:
424
- // Type testing & conversion.
425
- virtual IterationStatement* AsIterationStatement() { return this; }
426
-
427
- Statement* body() const { return body_; }
428
- void set_body(Statement* stmt) { body_ = stmt; }
429
-
430
- // Code generation
431
- BreakTarget* continue_target() { return &continue_target_; }
432
-
433
- protected:
434
- explicit inline IterationStatement(ZoneStringList* labels);
435
-
436
- // Construct a clone initialized from original and
437
- // a deep copy of the original body.
438
- IterationStatement(IterationStatement* other, Statement* body);
439
-
440
- void Initialize(Statement* body) {
441
- body_ = body;
442
- }
443
-
444
- private:
445
- Statement* body_;
446
- BreakTarget continue_target_;
447
- };
448
-
449
-
450
- class DoWhileStatement: public IterationStatement {
451
- public:
452
- explicit inline DoWhileStatement(ZoneStringList* labels);
453
-
454
- void Initialize(Expression* cond, Statement* body) {
455
- IterationStatement::Initialize(body);
456
- cond_ = cond;
457
- }
458
-
459
- virtual void Accept(AstVisitor* v);
460
-
461
- Expression* cond() const { return cond_; }
462
-
463
- // Position where condition expression starts. We need it to make
464
- // the loop's condition a breakable location.
465
- int condition_position() { return condition_position_; }
466
- void set_condition_position(int pos) { condition_position_ = pos; }
467
-
468
- private:
469
- Expression* cond_;
470
- int condition_position_;
471
- };
472
-
473
-
474
- class WhileStatement: public IterationStatement {
475
- public:
476
- explicit WhileStatement(ZoneStringList* labels);
477
-
478
- void Initialize(Expression* cond, Statement* body) {
479
- IterationStatement::Initialize(body);
480
- cond_ = cond;
481
- }
482
-
483
- virtual void Accept(AstVisitor* v);
484
-
485
- Expression* cond() const { return cond_; }
486
- bool may_have_function_literal() const {
487
- return may_have_function_literal_;
488
- }
489
-
490
- private:
491
- Expression* cond_;
492
- // True if there is a function literal subexpression in the condition.
493
- bool may_have_function_literal_;
494
-
495
- friend class AstOptimizer;
496
- };
497
-
498
-
499
- class ForStatement: public IterationStatement {
500
- public:
501
- explicit inline ForStatement(ZoneStringList* labels);
502
-
503
- // Construct a for-statement initialized from another for-statement
504
- // and deep copies of all parts of the original statement.
505
- ForStatement(ForStatement* other,
506
- Statement* init,
507
- Expression* cond,
508
- Statement* next,
509
- Statement* body);
510
-
511
- virtual ForStatement* AsForStatement() { return this; }
512
-
513
- void Initialize(Statement* init,
514
- Expression* cond,
515
- Statement* next,
516
- Statement* body) {
517
- IterationStatement::Initialize(body);
518
- init_ = init;
519
- cond_ = cond;
520
- next_ = next;
521
- }
522
-
523
- virtual void Accept(AstVisitor* v);
524
-
525
- Statement* init() const { return init_; }
526
- void set_init(Statement* stmt) { init_ = stmt; }
527
- Expression* cond() const { return cond_; }
528
- void set_cond(Expression* expr) { cond_ = expr; }
529
- Statement* next() const { return next_; }
530
- void set_next(Statement* stmt) { next_ = stmt; }
531
- bool may_have_function_literal() const {
532
- return may_have_function_literal_;
533
- }
534
-
535
- bool is_fast_smi_loop() { return loop_variable_ != NULL; }
536
- Variable* loop_variable() { return loop_variable_; }
537
- void set_loop_variable(Variable* var) { loop_variable_ = var; }
538
-
539
- bool peel_this_loop() { return peel_this_loop_; }
540
- void set_peel_this_loop(bool b) { peel_this_loop_ = b; }
541
-
542
- private:
543
- Statement* init_;
544
- Expression* cond_;
545
- Statement* next_;
546
- // True if there is a function literal subexpression in the condition.
547
- bool may_have_function_literal_;
548
- Variable* loop_variable_;
549
- bool peel_this_loop_;
550
-
551
- friend class AstOptimizer;
552
- };
553
-
554
-
555
- class ForInStatement: public IterationStatement {
556
- public:
557
- explicit inline ForInStatement(ZoneStringList* labels);
558
-
559
- void Initialize(Expression* each, Expression* enumerable, Statement* body) {
560
- IterationStatement::Initialize(body);
561
- each_ = each;
562
- enumerable_ = enumerable;
563
- }
564
-
565
- virtual void Accept(AstVisitor* v);
566
-
567
- Expression* each() const { return each_; }
568
- Expression* enumerable() const { return enumerable_; }
569
-
570
- private:
571
- Expression* each_;
572
- Expression* enumerable_;
573
- };
574
-
575
-
576
- class ExpressionStatement: public Statement {
577
- public:
578
- explicit ExpressionStatement(Expression* expression)
579
- : expression_(expression) { }
580
-
581
- // Construct an expression statement initialized from another
582
- // expression statement and a deep copy of the original expression.
583
- ExpressionStatement(ExpressionStatement* other, Expression* expression);
584
-
585
- virtual void Accept(AstVisitor* v);
586
-
587
- // Type testing & conversion.
588
- virtual ExpressionStatement* AsExpressionStatement() { return this; }
589
-
590
- virtual Assignment* StatementAsSimpleAssignment();
591
- virtual CountOperation* StatementAsCountOperation();
592
-
593
- void set_expression(Expression* e) { expression_ = e; }
594
- Expression* expression() { return expression_; }
595
-
596
- private:
597
- Expression* expression_;
598
- };
599
-
600
-
601
- class ContinueStatement: public Statement {
602
- public:
603
- explicit ContinueStatement(IterationStatement* target)
604
- : target_(target) { }
605
-
606
- virtual void Accept(AstVisitor* v);
607
-
608
- IterationStatement* target() const { return target_; }
609
-
610
- private:
611
- IterationStatement* target_;
612
- };
613
-
614
-
615
- class BreakStatement: public Statement {
616
- public:
617
- explicit BreakStatement(BreakableStatement* target)
618
- : target_(target) { }
619
-
620
- virtual void Accept(AstVisitor* v);
621
-
622
- BreakableStatement* target() const { return target_; }
623
-
624
- private:
625
- BreakableStatement* target_;
626
- };
627
-
628
-
629
- class ReturnStatement: public Statement {
630
- public:
631
- explicit ReturnStatement(Expression* expression)
632
- : expression_(expression) { }
633
-
634
- virtual void Accept(AstVisitor* v);
635
-
636
- // Type testing & conversion.
637
- virtual ReturnStatement* AsReturnStatement() { return this; }
638
-
639
- Expression* expression() { return expression_; }
640
-
641
- private:
642
- Expression* expression_;
643
- };
644
-
645
-
646
- class WithEnterStatement: public Statement {
647
- public:
648
- explicit WithEnterStatement(Expression* expression, bool is_catch_block)
649
- : expression_(expression), is_catch_block_(is_catch_block) { }
650
-
651
- virtual void Accept(AstVisitor* v);
652
-
653
- Expression* expression() const { return expression_; }
654
-
655
- bool is_catch_block() const { return is_catch_block_; }
656
-
657
- private:
658
- Expression* expression_;
659
- bool is_catch_block_;
660
- };
661
-
662
-
663
- class WithExitStatement: public Statement {
664
- public:
665
- WithExitStatement() { }
666
-
667
- virtual void Accept(AstVisitor* v);
668
- };
669
-
670
-
671
- class CaseClause: public ZoneObject {
672
- public:
673
- CaseClause(Expression* label, ZoneList<Statement*>* statements);
674
-
675
- bool is_default() const { return label_ == NULL; }
676
- Expression* label() const {
677
- CHECK(!is_default());
678
- return label_;
679
- }
680
- JumpTarget* body_target() { return &body_target_; }
681
- ZoneList<Statement*>* statements() const { return statements_; }
682
-
683
- private:
684
- Expression* label_;
685
- JumpTarget body_target_;
686
- ZoneList<Statement*>* statements_;
687
- };
688
-
689
-
690
- class SwitchStatement: public BreakableStatement {
691
- public:
692
- explicit inline SwitchStatement(ZoneStringList* labels);
693
-
694
- void Initialize(Expression* tag, ZoneList<CaseClause*>* cases) {
695
- tag_ = tag;
696
- cases_ = cases;
697
- }
698
-
699
- virtual void Accept(AstVisitor* v);
700
-
701
- Expression* tag() const { return tag_; }
702
- ZoneList<CaseClause*>* cases() const { return cases_; }
703
-
704
- private:
705
- Expression* tag_;
706
- ZoneList<CaseClause*>* cases_;
707
- };
708
-
709
-
710
- // If-statements always have non-null references to their then- and
711
- // else-parts. When parsing if-statements with no explicit else-part,
712
- // the parser implicitly creates an empty statement. Use the
713
- // HasThenStatement() and HasElseStatement() functions to check if a
714
- // given if-statement has a then- or an else-part containing code.
715
- class IfStatement: public Statement {
716
- public:
717
- IfStatement(Expression* condition,
718
- Statement* then_statement,
719
- Statement* else_statement)
720
- : condition_(condition),
721
- then_statement_(then_statement),
722
- else_statement_(else_statement) { }
723
-
724
- // Construct an if-statement initialized from another if-statement
725
- // and deep copies of all parts of the original.
726
- IfStatement(IfStatement* other,
727
- Expression* condition,
728
- Statement* then_statement,
729
- Statement* else_statement);
730
-
731
- virtual void Accept(AstVisitor* v);
732
-
733
- bool HasThenStatement() const { return !then_statement()->IsEmpty(); }
734
- bool HasElseStatement() const { return !else_statement()->IsEmpty(); }
735
-
736
- Expression* condition() const { return condition_; }
737
- Statement* then_statement() const { return then_statement_; }
738
- void set_then_statement(Statement* stmt) { then_statement_ = stmt; }
739
- Statement* else_statement() const { return else_statement_; }
740
- void set_else_statement(Statement* stmt) { else_statement_ = stmt; }
741
-
742
- private:
743
- Expression* condition_;
744
- Statement* then_statement_;
745
- Statement* else_statement_;
746
- };
747
-
748
-
749
- // NOTE: TargetCollectors are represented as nodes to fit in the target
750
- // stack in the compiler; this should probably be reworked.
751
- class TargetCollector: public AstNode {
752
- public:
753
- explicit TargetCollector(ZoneList<BreakTarget*>* targets)
754
- : targets_(targets) {
755
- }
756
-
757
- // Adds a jump target to the collector. The collector stores a pointer not
758
- // a copy of the target to make binding work, so make sure not to pass in
759
- // references to something on the stack.
760
- void AddTarget(BreakTarget* target);
761
-
762
- // Virtual behaviour. TargetCollectors are never part of the AST.
763
- virtual void Accept(AstVisitor* v) { UNREACHABLE(); }
764
- virtual TargetCollector* AsTargetCollector() { return this; }
765
-
766
- ZoneList<BreakTarget*>* targets() { return targets_; }
767
-
768
- private:
769
- ZoneList<BreakTarget*>* targets_;
770
- };
771
-
772
-
773
- class TryStatement: public Statement {
774
- public:
775
- explicit TryStatement(Block* try_block)
776
- : try_block_(try_block), escaping_targets_(NULL) { }
777
-
778
- void set_escaping_targets(ZoneList<BreakTarget*>* targets) {
779
- escaping_targets_ = targets;
780
- }
781
-
782
- Block* try_block() const { return try_block_; }
783
- ZoneList<BreakTarget*>* escaping_targets() const { return escaping_targets_; }
784
-
785
- private:
786
- Block* try_block_;
787
- ZoneList<BreakTarget*>* escaping_targets_;
788
- };
789
-
790
-
791
- class TryCatchStatement: public TryStatement {
792
- public:
793
- TryCatchStatement(Block* try_block,
794
- VariableProxy* catch_var,
795
- Block* catch_block)
796
- : TryStatement(try_block),
797
- catch_var_(catch_var),
798
- catch_block_(catch_block) {
799
- }
800
-
801
- virtual void Accept(AstVisitor* v);
802
-
803
- VariableProxy* catch_var() const { return catch_var_; }
804
- Block* catch_block() const { return catch_block_; }
805
-
806
- private:
807
- VariableProxy* catch_var_;
808
- Block* catch_block_;
809
- };
810
-
811
-
812
- class TryFinallyStatement: public TryStatement {
813
- public:
814
- TryFinallyStatement(Block* try_block, Block* finally_block)
815
- : TryStatement(try_block),
816
- finally_block_(finally_block) { }
817
-
818
- virtual void Accept(AstVisitor* v);
819
-
820
- Block* finally_block() const { return finally_block_; }
821
-
822
- private:
823
- Block* finally_block_;
824
- };
825
-
826
-
827
- class DebuggerStatement: public Statement {
828
- public:
829
- virtual void Accept(AstVisitor* v);
830
- };
831
-
832
-
833
- class EmptyStatement: public Statement {
834
- public:
835
- EmptyStatement() {}
836
-
837
- explicit EmptyStatement(EmptyStatement* other);
838
-
839
- virtual void Accept(AstVisitor* v);
840
-
841
- // Type testing & conversion.
842
- virtual EmptyStatement* AsEmptyStatement() { return this; }
843
- };
844
-
845
-
846
- class Literal: public Expression {
847
- public:
848
- explicit Literal(Handle<Object> handle) : handle_(handle) { }
849
-
850
- virtual void Accept(AstVisitor* v);
851
-
852
- // Type testing & conversion.
853
- virtual Literal* AsLiteral() { return this; }
854
-
855
- // Check if this literal is identical to the other literal.
856
- bool IsIdenticalTo(const Literal* other) const {
857
- return handle_.is_identical_to(other->handle_);
858
- }
859
-
860
- virtual bool IsPropertyName() {
861
- if (handle_->IsSymbol()) {
862
- uint32_t ignored;
863
- return !String::cast(*handle_)->AsArrayIndex(&ignored);
864
- }
865
- return false;
866
- }
867
-
868
- virtual bool IsLeaf() { return true; }
869
- virtual bool IsTrivial() { return true; }
870
- virtual bool IsPrimitive();
871
- virtual bool IsCritical();
872
-
873
- // Identity testers.
874
- bool IsNull() const { return handle_.is_identical_to(Factory::null_value()); }
875
- bool IsTrue() const { return handle_.is_identical_to(Factory::true_value()); }
876
- bool IsFalse() const {
877
- return handle_.is_identical_to(Factory::false_value());
878
- }
879
-
880
- Handle<Object> handle() const { return handle_; }
881
-
882
- private:
883
- Handle<Object> handle_;
884
- };
885
-
886
-
887
- // Base class for literals that needs space in the corresponding JSFunction.
888
- class MaterializedLiteral: public Expression {
889
- public:
890
- explicit MaterializedLiteral(int literal_index, bool is_simple, int depth)
891
- : literal_index_(literal_index), is_simple_(is_simple), depth_(depth) {}
892
-
893
- virtual MaterializedLiteral* AsMaterializedLiteral() { return this; }
894
-
895
- int literal_index() { return literal_index_; }
896
-
897
- // A materialized literal is simple if the values consist of only
898
- // constants and simple object and array literals.
899
- bool is_simple() const { return is_simple_; }
900
-
901
- int depth() const { return depth_; }
902
-
903
- private:
904
- int literal_index_;
905
- bool is_simple_;
906
- int depth_;
907
- };
908
-
909
-
910
- // An object literal has a boilerplate object that is used
911
- // for minimizing the work when constructing it at runtime.
912
- class ObjectLiteral: public MaterializedLiteral {
913
- public:
914
- // Property is used for passing information
915
- // about an object literal's properties from the parser
916
- // to the code generator.
917
- class Property: public ZoneObject {
918
- public:
919
-
920
- enum Kind {
921
- CONSTANT, // Property with constant value (compile time).
922
- COMPUTED, // Property with computed value (execution time).
923
- MATERIALIZED_LITERAL, // Property value is a materialized literal.
924
- GETTER, SETTER, // Property is an accessor function.
925
- PROTOTYPE // Property is __proto__.
926
- };
927
-
928
- Property(Literal* key, Expression* value);
929
- Property(bool is_getter, FunctionLiteral* value);
930
-
931
- Literal* key() { return key_; }
932
- Expression* value() { return value_; }
933
- Kind kind() { return kind_; }
934
-
935
- bool IsCompileTimeValue();
936
-
937
- private:
938
- Literal* key_;
939
- Expression* value_;
940
- Kind kind_;
941
- };
942
-
943
- ObjectLiteral(Handle<FixedArray> constant_properties,
944
- ZoneList<Property*>* properties,
945
- int literal_index,
946
- bool is_simple,
947
- bool fast_elements,
948
- int depth)
949
- : MaterializedLiteral(literal_index, is_simple, depth),
950
- constant_properties_(constant_properties),
951
- properties_(properties),
952
- fast_elements_(fast_elements) {}
953
-
954
- virtual ObjectLiteral* AsObjectLiteral() { return this; }
955
- virtual void Accept(AstVisitor* v);
956
-
957
- virtual bool IsLeaf() { return properties()->is_empty(); }
958
-
959
- virtual bool IsPrimitive();
960
-
961
- Handle<FixedArray> constant_properties() const {
962
- return constant_properties_;
963
- }
964
- ZoneList<Property*>* properties() const { return properties_; }
965
-
966
- bool fast_elements() const { return fast_elements_; }
967
-
968
- private:
969
- Handle<FixedArray> constant_properties_;
970
- ZoneList<Property*>* properties_;
971
- bool fast_elements_;
972
- };
973
-
974
-
975
- // Node for capturing a regexp literal.
976
- class RegExpLiteral: public MaterializedLiteral {
977
- public:
978
- RegExpLiteral(Handle<String> pattern,
979
- Handle<String> flags,
980
- int literal_index)
981
- : MaterializedLiteral(literal_index, false, 1),
982
- pattern_(pattern),
983
- flags_(flags) {}
984
-
985
- virtual void Accept(AstVisitor* v);
986
-
987
- virtual bool IsLeaf() { return true; }
988
-
989
- virtual bool IsPrimitive();
990
-
991
- Handle<String> pattern() const { return pattern_; }
992
- Handle<String> flags() const { return flags_; }
993
-
994
- private:
995
- Handle<String> pattern_;
996
- Handle<String> flags_;
997
- };
998
-
999
- // An array literal has a literals object that is used
1000
- // for minimizing the work when constructing it at runtime.
1001
- class ArrayLiteral: public MaterializedLiteral {
1002
- public:
1003
- ArrayLiteral(Handle<FixedArray> constant_elements,
1004
- ZoneList<Expression*>* values,
1005
- int literal_index,
1006
- bool is_simple,
1007
- int depth)
1008
- : MaterializedLiteral(literal_index, is_simple, depth),
1009
- constant_elements_(constant_elements),
1010
- values_(values) {}
1011
-
1012
- virtual void Accept(AstVisitor* v);
1013
- virtual ArrayLiteral* AsArrayLiteral() { return this; }
1014
-
1015
- virtual bool IsLeaf() { return values()->is_empty(); }
1016
-
1017
- virtual bool IsPrimitive();
1018
-
1019
- Handle<FixedArray> constant_elements() const { return constant_elements_; }
1020
- ZoneList<Expression*>* values() const { return values_; }
1021
-
1022
- private:
1023
- Handle<FixedArray> constant_elements_;
1024
- ZoneList<Expression*>* values_;
1025
- };
1026
-
1027
-
1028
- // Node for constructing a context extension object for a catch block.
1029
- // The catch context extension object has one property, the catch
1030
- // variable, which should be DontDelete.
1031
- class CatchExtensionObject: public Expression {
1032
- public:
1033
- CatchExtensionObject(Literal* key, VariableProxy* value)
1034
- : key_(key), value_(value) {
1035
- }
1036
-
1037
- virtual void Accept(AstVisitor* v);
1038
-
1039
- virtual bool IsPrimitive();
1040
-
1041
- Literal* key() const { return key_; }
1042
- VariableProxy* value() const { return value_; }
1043
-
1044
- private:
1045
- Literal* key_;
1046
- VariableProxy* value_;
1047
- };
1048
-
1049
-
1050
- class VariableProxy: public Expression {
1051
- public:
1052
- virtual void Accept(AstVisitor* v);
1053
-
1054
- // Type testing & conversion
1055
- virtual Property* AsProperty() {
1056
- return var_ == NULL ? NULL : var_->AsProperty();
1057
- }
1058
- virtual VariableProxy* AsVariableProxy() { return this; }
1059
-
1060
- Variable* AsVariable() {
1061
- return this == NULL || var_ == NULL ? NULL : var_->AsVariable();
1062
- }
1063
-
1064
- virtual bool IsValidLeftHandSide() {
1065
- return var_ == NULL ? true : var_->IsValidLeftHandSide();
1066
- }
1067
-
1068
- virtual bool IsLeaf() {
1069
- ASSERT(var_ != NULL); // Variable must be resolved.
1070
- return var()->is_global() || var()->rewrite()->IsLeaf();
1071
- }
1072
-
1073
- // Reading from a mutable variable is a side effect, but 'this' is
1074
- // immutable.
1075
- virtual bool IsTrivial() { return is_trivial_; }
1076
-
1077
- virtual bool IsPrimitive();
1078
- virtual bool IsCritical();
1079
-
1080
- void SetIsPrimitive(bool value) { is_primitive_ = value; }
1081
-
1082
- bool IsVariable(Handle<String> n) {
1083
- return !is_this() && name().is_identical_to(n);
1084
- }
1085
-
1086
- bool IsArguments() {
1087
- Variable* variable = AsVariable();
1088
- return (variable == NULL) ? false : variable->is_arguments();
1089
- }
1090
-
1091
- Handle<String> name() const { return name_; }
1092
- Variable* var() const { return var_; }
1093
- bool is_this() const { return is_this_; }
1094
- bool inside_with() const { return inside_with_; }
1095
- bool is_trivial() { return is_trivial_; }
1096
- void set_is_trivial(bool b) { is_trivial_ = b; }
1097
-
1098
- BitVector* reaching_definitions() { return reaching_definitions_; }
1099
- void set_reaching_definitions(BitVector* rd) { reaching_definitions_ = rd; }
1100
-
1101
- // Bind this proxy to the variable var.
1102
- void BindTo(Variable* var);
1103
-
1104
- protected:
1105
- Handle<String> name_;
1106
- Variable* var_; // resolved variable, or NULL
1107
- bool is_this_;
1108
- bool inside_with_;
1109
- bool is_trivial_;
1110
- BitVector* reaching_definitions_;
1111
- bool is_primitive_;
1112
-
1113
- VariableProxy(Handle<String> name, bool is_this, bool inside_with);
1114
- explicit VariableProxy(bool is_this);
1115
-
1116
- friend class Scope;
1117
- };
1118
-
1119
-
1120
- class VariableProxySentinel: public VariableProxy {
1121
- public:
1122
- virtual bool IsValidLeftHandSide() { return !is_this(); }
1123
- static VariableProxySentinel* this_proxy() { return &this_proxy_; }
1124
- static VariableProxySentinel* identifier_proxy() {
1125
- return &identifier_proxy_;
1126
- }
1127
-
1128
- virtual bool IsPrimitive() {
1129
- UNREACHABLE();
1130
- return false;
1131
- }
1132
-
1133
- private:
1134
- explicit VariableProxySentinel(bool is_this) : VariableProxy(is_this) { }
1135
- static VariableProxySentinel this_proxy_;
1136
- static VariableProxySentinel identifier_proxy_;
1137
- };
1138
-
1139
-
1140
- class Slot: public Expression {
1141
- public:
1142
- enum Type {
1143
- // A slot in the parameter section on the stack. index() is
1144
- // the parameter index, counting left-to-right, starting at 0.
1145
- PARAMETER,
1146
-
1147
- // A slot in the local section on the stack. index() is
1148
- // the variable index in the stack frame, starting at 0.
1149
- LOCAL,
1150
-
1151
- // An indexed slot in a heap context. index() is the
1152
- // variable index in the context object on the heap,
1153
- // starting at 0. var()->scope() is the corresponding
1154
- // scope.
1155
- CONTEXT,
1156
-
1157
- // A named slot in a heap context. var()->name() is the
1158
- // variable name in the context object on the heap,
1159
- // with lookup starting at the current context. index()
1160
- // is invalid.
1161
- LOOKUP
1162
- };
1163
-
1164
- Slot(Variable* var, Type type, int index)
1165
- : var_(var), type_(type), index_(index) {
1166
- ASSERT(var != NULL);
1167
- }
1168
-
1169
- virtual void Accept(AstVisitor* v);
1170
-
1171
- // Type testing & conversion
1172
- virtual Slot* AsSlot() { return this; }
1173
-
1174
- virtual bool IsLeaf() { return true; }
1175
-
1176
- virtual bool IsPrimitive() {
1177
- UNREACHABLE();
1178
- return false;
1179
- }
1180
-
1181
- bool IsStackAllocated() { return type_ == PARAMETER || type_ == LOCAL; }
1182
-
1183
- // Accessors
1184
- Variable* var() const { return var_; }
1185
- Type type() const { return type_; }
1186
- int index() const { return index_; }
1187
- bool is_arguments() const { return var_->is_arguments(); }
1188
-
1189
- private:
1190
- Variable* var_;
1191
- Type type_;
1192
- int index_;
1193
- };
1194
-
1195
-
1196
- class Property: public Expression {
1197
- public:
1198
- // Synthetic properties are property lookups introduced by the system,
1199
- // to objects that aren't visible to the user. Function calls to synthetic
1200
- // properties should use the global object as receiver, not the base object
1201
- // of the resolved Reference.
1202
- enum Type { NORMAL, SYNTHETIC };
1203
- Property(Expression* obj, Expression* key, int pos, Type type = NORMAL)
1204
- : obj_(obj), key_(key), pos_(pos), type_(type) { }
1205
-
1206
- Property(Property* other, Expression* obj, Expression* key);
1207
-
1208
- virtual void Accept(AstVisitor* v);
1209
-
1210
- // Type testing & conversion
1211
- virtual Property* AsProperty() { return this; }
1212
-
1213
- virtual bool IsValidLeftHandSide() { return true; }
1214
-
1215
- virtual bool IsPrimitive();
1216
- virtual bool IsCritical();
1217
-
1218
- Expression* obj() const { return obj_; }
1219
- Expression* key() const { return key_; }
1220
- int position() const { return pos_; }
1221
- bool is_synthetic() const { return type_ == SYNTHETIC; }
1222
-
1223
- // Returns a property singleton property access on 'this'. Used
1224
- // during preparsing.
1225
- static Property* this_property() { return &this_property_; }
1226
-
1227
- private:
1228
- Expression* obj_;
1229
- Expression* key_;
1230
- int pos_;
1231
- Type type_;
1232
-
1233
- // Dummy property used during preparsing.
1234
- static Property this_property_;
1235
- };
1236
-
1237
-
1238
- class Call: public Expression {
1239
- public:
1240
- Call(Expression* expression, ZoneList<Expression*>* arguments, int pos)
1241
- : expression_(expression), arguments_(arguments), pos_(pos) { }
1242
-
1243
- Call(Call* other, Expression* expression, ZoneList<Expression*>* arguments);
1244
-
1245
- virtual void Accept(AstVisitor* v);
1246
-
1247
- // Type testing and conversion.
1248
- virtual Call* AsCall() { return this; }
1249
-
1250
- virtual bool IsPrimitive();
1251
- virtual bool IsCritical();
1252
-
1253
- Expression* expression() const { return expression_; }
1254
- ZoneList<Expression*>* arguments() const { return arguments_; }
1255
- int position() { return pos_; }
1256
-
1257
- static Call* sentinel() { return &sentinel_; }
1258
-
1259
- private:
1260
- Expression* expression_;
1261
- ZoneList<Expression*>* arguments_;
1262
- int pos_;
1263
-
1264
- static Call sentinel_;
1265
- };
1266
-
1267
-
1268
- class CallNew: public Expression {
1269
- public:
1270
- CallNew(Expression* expression, ZoneList<Expression*>* arguments, int pos)
1271
- : expression_(expression), arguments_(arguments), pos_(pos) { }
1272
-
1273
- virtual void Accept(AstVisitor* v);
1274
-
1275
- virtual bool IsPrimitive();
1276
-
1277
- Expression* expression() const { return expression_; }
1278
- ZoneList<Expression*>* arguments() const { return arguments_; }
1279
- int position() { return pos_; }
1280
-
1281
- private:
1282
- Expression* expression_;
1283
- ZoneList<Expression*>* arguments_;
1284
- int pos_;
1285
- };
1286
-
1287
-
1288
- // The CallRuntime class does not represent any official JavaScript
1289
- // language construct. Instead it is used to call a C or JS function
1290
- // with a set of arguments. This is used from the builtins that are
1291
- // implemented in JavaScript (see "v8natives.js").
1292
- class CallRuntime: public Expression {
1293
- public:
1294
- CallRuntime(Handle<String> name,
1295
- Runtime::Function* function,
1296
- ZoneList<Expression*>* arguments)
1297
- : name_(name), function_(function), arguments_(arguments) { }
1298
-
1299
- virtual void Accept(AstVisitor* v);
1300
-
1301
- virtual bool IsPrimitive();
1302
-
1303
- Handle<String> name() const { return name_; }
1304
- Runtime::Function* function() const { return function_; }
1305
- ZoneList<Expression*>* arguments() const { return arguments_; }
1306
- bool is_jsruntime() const { return function_ == NULL; }
1307
-
1308
- private:
1309
- Handle<String> name_;
1310
- Runtime::Function* function_;
1311
- ZoneList<Expression*>* arguments_;
1312
- };
1313
-
1314
-
1315
- class UnaryOperation: public Expression {
1316
- public:
1317
- UnaryOperation(Token::Value op, Expression* expression)
1318
- : op_(op), expression_(expression) {
1319
- ASSERT(Token::IsUnaryOp(op));
1320
- }
1321
-
1322
- UnaryOperation(UnaryOperation* other, Expression* expression);
1323
-
1324
- virtual void Accept(AstVisitor* v);
1325
-
1326
- // Type testing & conversion
1327
- virtual UnaryOperation* AsUnaryOperation() { return this; }
1328
-
1329
- virtual bool IsPrimitive();
1330
- virtual bool IsCritical();
1331
-
1332
- Token::Value op() const { return op_; }
1333
- Expression* expression() const { return expression_; }
1334
-
1335
- private:
1336
- Token::Value op_;
1337
- Expression* expression_;
1338
- };
1339
-
1340
-
1341
- class BinaryOperation: public Expression {
1342
- public:
1343
- BinaryOperation(Token::Value op, Expression* left, Expression* right)
1344
- : op_(op), left_(left), right_(right) {
1345
- ASSERT(Token::IsBinaryOp(op));
1346
- }
1347
-
1348
- // Construct a binary operation with a given operator and left and right
1349
- // subexpressions. The rest of the expression state is copied from
1350
- // another expression.
1351
- BinaryOperation(Expression* other,
1352
- Token::Value op,
1353
- Expression* left,
1354
- Expression* right);
1355
-
1356
- virtual void Accept(AstVisitor* v);
1357
-
1358
- // Type testing & conversion
1359
- virtual BinaryOperation* AsBinaryOperation() { return this; }
1360
-
1361
- virtual bool IsPrimitive();
1362
- virtual bool IsCritical();
1363
-
1364
- // True iff the result can be safely overwritten (to avoid allocation).
1365
- // False for operations that can return one of their operands.
1366
- bool ResultOverwriteAllowed() {
1367
- switch (op_) {
1368
- case Token::COMMA:
1369
- case Token::OR:
1370
- case Token::AND:
1371
- return false;
1372
- case Token::BIT_OR:
1373
- case Token::BIT_XOR:
1374
- case Token::BIT_AND:
1375
- case Token::SHL:
1376
- case Token::SAR:
1377
- case Token::SHR:
1378
- case Token::ADD:
1379
- case Token::SUB:
1380
- case Token::MUL:
1381
- case Token::DIV:
1382
- case Token::MOD:
1383
- return true;
1384
- default:
1385
- UNREACHABLE();
1386
- }
1387
- return false;
1388
- }
1389
-
1390
- Token::Value op() const { return op_; }
1391
- Expression* left() const { return left_; }
1392
- Expression* right() const { return right_; }
1393
-
1394
- private:
1395
- Token::Value op_;
1396
- Expression* left_;
1397
- Expression* right_;
1398
- };
1399
-
1400
-
1401
- class CountOperation: public Expression {
1402
- public:
1403
- CountOperation(bool is_prefix, Token::Value op, Expression* expression)
1404
- : is_prefix_(is_prefix), op_(op), expression_(expression) {
1405
- ASSERT(Token::IsCountOp(op));
1406
- }
1407
-
1408
- CountOperation(CountOperation* other, Expression* expression);
1409
-
1410
- virtual void Accept(AstVisitor* v);
1411
-
1412
- virtual CountOperation* AsCountOperation() { return this; }
1413
-
1414
- virtual Variable* AssignedVariable() {
1415
- return expression()->AsVariableProxy()->AsVariable();
1416
- }
1417
-
1418
- virtual bool IsPrimitive();
1419
- virtual bool IsCritical();
1420
-
1421
- bool is_prefix() const { return is_prefix_; }
1422
- bool is_postfix() const { return !is_prefix_; }
1423
- Token::Value op() const { return op_; }
1424
- Token::Value binary_op() {
1425
- return op_ == Token::INC ? Token::ADD : Token::SUB;
1426
- }
1427
- Expression* expression() const { return expression_; }
1428
-
1429
- virtual void MarkAsStatement() { is_prefix_ = true; }
1430
-
1431
- private:
1432
- bool is_prefix_;
1433
- Token::Value op_;
1434
- Expression* expression_;
1435
- };
1436
-
1437
-
1438
- class CompareOperation: public Expression {
1439
- public:
1440
- CompareOperation(Token::Value op, Expression* left, Expression* right)
1441
- : op_(op), left_(left), right_(right) {
1442
- ASSERT(Token::IsCompareOp(op));
1443
- }
1444
-
1445
- CompareOperation(CompareOperation* other,
1446
- Expression* left,
1447
- Expression* right);
1448
-
1449
- virtual void Accept(AstVisitor* v);
1450
-
1451
- virtual bool IsPrimitive();
1452
- virtual bool IsCritical();
1453
-
1454
- Token::Value op() const { return op_; }
1455
- Expression* left() const { return left_; }
1456
- Expression* right() const { return right_; }
1457
-
1458
- // Type testing & conversion
1459
- virtual CompareOperation* AsCompareOperation() { return this; }
1460
-
1461
- private:
1462
- Token::Value op_;
1463
- Expression* left_;
1464
- Expression* right_;
1465
- };
1466
-
1467
-
1468
- class Conditional: public Expression {
1469
- public:
1470
- Conditional(Expression* condition,
1471
- Expression* then_expression,
1472
- Expression* else_expression,
1473
- int then_expression_position,
1474
- int else_expression_position)
1475
- : condition_(condition),
1476
- then_expression_(then_expression),
1477
- else_expression_(else_expression),
1478
- then_expression_position_(then_expression_position),
1479
- else_expression_position_(else_expression_position) { }
1480
-
1481
- virtual void Accept(AstVisitor* v);
1482
-
1483
- virtual bool IsPrimitive();
1484
-
1485
- Expression* condition() const { return condition_; }
1486
- Expression* then_expression() const { return then_expression_; }
1487
- Expression* else_expression() const { return else_expression_; }
1488
-
1489
- int then_expression_position() { return then_expression_position_; }
1490
- int else_expression_position() { return else_expression_position_; }
1491
-
1492
- private:
1493
- Expression* condition_;
1494
- Expression* then_expression_;
1495
- Expression* else_expression_;
1496
- int then_expression_position_;
1497
- int else_expression_position_;
1498
- };
1499
-
1500
-
1501
- class Assignment: public Expression {
1502
- public:
1503
- Assignment(Token::Value op, Expression* target, Expression* value, int pos)
1504
- : op_(op), target_(target), value_(value), pos_(pos),
1505
- block_start_(false), block_end_(false) {
1506
- ASSERT(Token::IsAssignmentOp(op));
1507
- }
1508
-
1509
- Assignment(Assignment* other, Expression* target, Expression* value);
1510
-
1511
- virtual void Accept(AstVisitor* v);
1512
- virtual Assignment* AsAssignment() { return this; }
1513
-
1514
- virtual bool IsPrimitive();
1515
- virtual bool IsCritical();
1516
-
1517
- Assignment* AsSimpleAssignment() { return !is_compound() ? this : NULL; }
1518
-
1519
- virtual Variable* AssignedVariable() {
1520
- return target()->AsVariableProxy()->AsVariable();
1521
- }
1522
-
1523
- Token::Value binary_op() const;
1524
-
1525
- Token::Value op() const { return op_; }
1526
- Expression* target() const { return target_; }
1527
- Expression* value() const { return value_; }
1528
- int position() { return pos_; }
1529
- // This check relies on the definition order of token in token.h.
1530
- bool is_compound() const { return op() > Token::ASSIGN; }
1531
-
1532
- // An initialization block is a series of statments of the form
1533
- // x.y.z.a = ...; x.y.z.b = ...; etc. The parser marks the beginning and
1534
- // ending of these blocks to allow for optimizations of initialization
1535
- // blocks.
1536
- bool starts_initialization_block() { return block_start_; }
1537
- bool ends_initialization_block() { return block_end_; }
1538
- void mark_block_start() { block_start_ = true; }
1539
- void mark_block_end() { block_end_ = true; }
1540
-
1541
- private:
1542
- Token::Value op_;
1543
- Expression* target_;
1544
- Expression* value_;
1545
- int pos_;
1546
- bool block_start_;
1547
- bool block_end_;
1548
- };
1549
-
1550
-
1551
- class Throw: public Expression {
1552
- public:
1553
- Throw(Expression* exception, int pos)
1554
- : exception_(exception), pos_(pos) {}
1555
-
1556
- virtual void Accept(AstVisitor* v);
1557
-
1558
- virtual bool IsPrimitive();
1559
-
1560
- Expression* exception() const { return exception_; }
1561
- int position() const { return pos_; }
1562
-
1563
- private:
1564
- Expression* exception_;
1565
- int pos_;
1566
- };
1567
-
1568
-
1569
- class FunctionLiteral: public Expression {
1570
- public:
1571
- FunctionLiteral(Handle<String> name,
1572
- Scope* scope,
1573
- ZoneList<Statement*>* body,
1574
- int materialized_literal_count,
1575
- int expected_property_count,
1576
- bool has_only_simple_this_property_assignments,
1577
- Handle<FixedArray> this_property_assignments,
1578
- int num_parameters,
1579
- int start_position,
1580
- int end_position,
1581
- bool is_expression)
1582
- : name_(name),
1583
- scope_(scope),
1584
- body_(body),
1585
- materialized_literal_count_(materialized_literal_count),
1586
- expected_property_count_(expected_property_count),
1587
- has_only_simple_this_property_assignments_(
1588
- has_only_simple_this_property_assignments),
1589
- this_property_assignments_(this_property_assignments),
1590
- num_parameters_(num_parameters),
1591
- start_position_(start_position),
1592
- end_position_(end_position),
1593
- is_expression_(is_expression),
1594
- function_token_position_(RelocInfo::kNoPosition),
1595
- inferred_name_(Heap::empty_string()),
1596
- try_full_codegen_(false) {
1597
- #ifdef DEBUG
1598
- already_compiled_ = false;
1599
- #endif
1600
- }
1601
-
1602
- virtual void Accept(AstVisitor* v);
1603
-
1604
- // Type testing & conversion
1605
- virtual FunctionLiteral* AsFunctionLiteral() { return this; }
1606
-
1607
- virtual bool IsLeaf() { return true; }
1608
-
1609
- virtual bool IsPrimitive();
1610
-
1611
- Handle<String> name() const { return name_; }
1612
- Scope* scope() const { return scope_; }
1613
- ZoneList<Statement*>* body() const { return body_; }
1614
- void set_function_token_position(int pos) { function_token_position_ = pos; }
1615
- int function_token_position() const { return function_token_position_; }
1616
- int start_position() const { return start_position_; }
1617
- int end_position() const { return end_position_; }
1618
- bool is_expression() const { return is_expression_; }
1619
-
1620
- int materialized_literal_count() { return materialized_literal_count_; }
1621
- int expected_property_count() { return expected_property_count_; }
1622
- bool has_only_simple_this_property_assignments() {
1623
- return has_only_simple_this_property_assignments_;
1624
- }
1625
- Handle<FixedArray> this_property_assignments() {
1626
- return this_property_assignments_;
1627
- }
1628
- int num_parameters() { return num_parameters_; }
1629
-
1630
- bool AllowsLazyCompilation();
1631
-
1632
- Handle<String> inferred_name() const { return inferred_name_; }
1633
- void set_inferred_name(Handle<String> inferred_name) {
1634
- inferred_name_ = inferred_name;
1635
- }
1636
-
1637
- bool try_full_codegen() { return try_full_codegen_; }
1638
- void set_try_full_codegen(bool flag) { try_full_codegen_ = flag; }
1639
-
1640
- #ifdef DEBUG
1641
- void mark_as_compiled() {
1642
- ASSERT(!already_compiled_);
1643
- already_compiled_ = true;
1644
- }
1645
- #endif
1646
-
1647
- private:
1648
- Handle<String> name_;
1649
- Scope* scope_;
1650
- ZoneList<Statement*>* body_;
1651
- int materialized_literal_count_;
1652
- int expected_property_count_;
1653
- bool has_only_simple_this_property_assignments_;
1654
- Handle<FixedArray> this_property_assignments_;
1655
- int num_parameters_;
1656
- int start_position_;
1657
- int end_position_;
1658
- bool is_expression_;
1659
- int function_token_position_;
1660
- Handle<String> inferred_name_;
1661
- bool try_full_codegen_;
1662
- #ifdef DEBUG
1663
- bool already_compiled_;
1664
- #endif
1665
- };
1666
-
1667
-
1668
- class SharedFunctionInfoLiteral: public Expression {
1669
- public:
1670
- explicit SharedFunctionInfoLiteral(
1671
- Handle<SharedFunctionInfo> shared_function_info)
1672
- : shared_function_info_(shared_function_info) { }
1673
-
1674
- Handle<SharedFunctionInfo> shared_function_info() const {
1675
- return shared_function_info_;
1676
- }
1677
-
1678
- virtual bool IsLeaf() { return true; }
1679
-
1680
- virtual void Accept(AstVisitor* v);
1681
-
1682
- virtual bool IsPrimitive();
1683
-
1684
- private:
1685
- Handle<SharedFunctionInfo> shared_function_info_;
1686
- };
1687
-
1688
-
1689
- class ThisFunction: public Expression {
1690
- public:
1691
- virtual void Accept(AstVisitor* v);
1692
- virtual bool IsLeaf() { return true; }
1693
- virtual bool IsPrimitive();
1694
- };
1695
-
1696
-
1697
- // ----------------------------------------------------------------------------
1698
- // Regular expressions
1699
-
1700
-
1701
- class RegExpVisitor BASE_EMBEDDED {
1702
- public:
1703
- virtual ~RegExpVisitor() { }
1704
- #define MAKE_CASE(Name) \
1705
- virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
1706
- FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
1707
- #undef MAKE_CASE
1708
- };
1709
-
1710
-
1711
- class RegExpTree: public ZoneObject {
1712
- public:
1713
- static const int kInfinity = kMaxInt;
1714
- virtual ~RegExpTree() { }
1715
- virtual void* Accept(RegExpVisitor* visitor, void* data) = 0;
1716
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1717
- RegExpNode* on_success) = 0;
1718
- virtual bool IsTextElement() { return false; }
1719
- virtual bool IsAnchored() { return false; }
1720
- virtual int min_match() = 0;
1721
- virtual int max_match() = 0;
1722
- // Returns the interval of registers used for captures within this
1723
- // expression.
1724
- virtual Interval CaptureRegisters() { return Interval::Empty(); }
1725
- virtual void AppendToText(RegExpText* text);
1726
- SmartPointer<const char> ToString();
1727
- #define MAKE_ASTYPE(Name) \
1728
- virtual RegExp##Name* As##Name(); \
1729
- virtual bool Is##Name();
1730
- FOR_EACH_REG_EXP_TREE_TYPE(MAKE_ASTYPE)
1731
- #undef MAKE_ASTYPE
1732
- };
1733
-
1734
-
1735
- class RegExpDisjunction: public RegExpTree {
1736
- public:
1737
- explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
1738
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1739
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1740
- RegExpNode* on_success);
1741
- virtual RegExpDisjunction* AsDisjunction();
1742
- virtual Interval CaptureRegisters();
1743
- virtual bool IsDisjunction();
1744
- virtual bool IsAnchored();
1745
- virtual int min_match() { return min_match_; }
1746
- virtual int max_match() { return max_match_; }
1747
- ZoneList<RegExpTree*>* alternatives() { return alternatives_; }
1748
- private:
1749
- ZoneList<RegExpTree*>* alternatives_;
1750
- int min_match_;
1751
- int max_match_;
1752
- };
1753
-
1754
-
1755
- class RegExpAlternative: public RegExpTree {
1756
- public:
1757
- explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
1758
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1759
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1760
- RegExpNode* on_success);
1761
- virtual RegExpAlternative* AsAlternative();
1762
- virtual Interval CaptureRegisters();
1763
- virtual bool IsAlternative();
1764
- virtual bool IsAnchored();
1765
- virtual int min_match() { return min_match_; }
1766
- virtual int max_match() { return max_match_; }
1767
- ZoneList<RegExpTree*>* nodes() { return nodes_; }
1768
- private:
1769
- ZoneList<RegExpTree*>* nodes_;
1770
- int min_match_;
1771
- int max_match_;
1772
- };
1773
-
1774
-
1775
- class RegExpAssertion: public RegExpTree {
1776
- public:
1777
- enum Type {
1778
- START_OF_LINE,
1779
- START_OF_INPUT,
1780
- END_OF_LINE,
1781
- END_OF_INPUT,
1782
- BOUNDARY,
1783
- NON_BOUNDARY
1784
- };
1785
- explicit RegExpAssertion(Type type) : type_(type) { }
1786
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1787
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1788
- RegExpNode* on_success);
1789
- virtual RegExpAssertion* AsAssertion();
1790
- virtual bool IsAssertion();
1791
- virtual bool IsAnchored();
1792
- virtual int min_match() { return 0; }
1793
- virtual int max_match() { return 0; }
1794
- Type type() { return type_; }
1795
- private:
1796
- Type type_;
1797
- };
1798
-
1799
-
1800
- class CharacterSet BASE_EMBEDDED {
1801
- public:
1802
- explicit CharacterSet(uc16 standard_set_type)
1803
- : ranges_(NULL),
1804
- standard_set_type_(standard_set_type) {}
1805
- explicit CharacterSet(ZoneList<CharacterRange>* ranges)
1806
- : ranges_(ranges),
1807
- standard_set_type_(0) {}
1808
- ZoneList<CharacterRange>* ranges();
1809
- uc16 standard_set_type() { return standard_set_type_; }
1810
- void set_standard_set_type(uc16 special_set_type) {
1811
- standard_set_type_ = special_set_type;
1812
- }
1813
- bool is_standard() { return standard_set_type_ != 0; }
1814
- void Canonicalize();
1815
- private:
1816
- ZoneList<CharacterRange>* ranges_;
1817
- // If non-zero, the value represents a standard set (e.g., all whitespace
1818
- // characters) without having to expand the ranges.
1819
- uc16 standard_set_type_;
1820
- };
1821
-
1822
-
1823
- class RegExpCharacterClass: public RegExpTree {
1824
- public:
1825
- RegExpCharacterClass(ZoneList<CharacterRange>* ranges, bool is_negated)
1826
- : set_(ranges),
1827
- is_negated_(is_negated) { }
1828
- explicit RegExpCharacterClass(uc16 type)
1829
- : set_(type),
1830
- is_negated_(false) { }
1831
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1832
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1833
- RegExpNode* on_success);
1834
- virtual RegExpCharacterClass* AsCharacterClass();
1835
- virtual bool IsCharacterClass();
1836
- virtual bool IsTextElement() { return true; }
1837
- virtual int min_match() { return 1; }
1838
- virtual int max_match() { return 1; }
1839
- virtual void AppendToText(RegExpText* text);
1840
- CharacterSet character_set() { return set_; }
1841
- // TODO(lrn): Remove need for complex version if is_standard that
1842
- // recognizes a mangled standard set and just do { return set_.is_special(); }
1843
- bool is_standard();
1844
- // Returns a value representing the standard character set if is_standard()
1845
- // returns true.
1846
- // Currently used values are:
1847
- // s : unicode whitespace
1848
- // S : unicode non-whitespace
1849
- // w : ASCII word character (digit, letter, underscore)
1850
- // W : non-ASCII word character
1851
- // d : ASCII digit
1852
- // D : non-ASCII digit
1853
- // . : non-unicode non-newline
1854
- // * : All characters
1855
- uc16 standard_type() { return set_.standard_set_type(); }
1856
- ZoneList<CharacterRange>* ranges() { return set_.ranges(); }
1857
- bool is_negated() { return is_negated_; }
1858
- private:
1859
- CharacterSet set_;
1860
- bool is_negated_;
1861
- };
1862
-
1863
-
1864
- class RegExpAtom: public RegExpTree {
1865
- public:
1866
- explicit RegExpAtom(Vector<const uc16> data) : data_(data) { }
1867
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1868
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1869
- RegExpNode* on_success);
1870
- virtual RegExpAtom* AsAtom();
1871
- virtual bool IsAtom();
1872
- virtual bool IsTextElement() { return true; }
1873
- virtual int min_match() { return data_.length(); }
1874
- virtual int max_match() { return data_.length(); }
1875
- virtual void AppendToText(RegExpText* text);
1876
- Vector<const uc16> data() { return data_; }
1877
- int length() { return data_.length(); }
1878
- private:
1879
- Vector<const uc16> data_;
1880
- };
1881
-
1882
-
1883
- class RegExpText: public RegExpTree {
1884
- public:
1885
- RegExpText() : elements_(2), length_(0) {}
1886
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1887
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1888
- RegExpNode* on_success);
1889
- virtual RegExpText* AsText();
1890
- virtual bool IsText();
1891
- virtual bool IsTextElement() { return true; }
1892
- virtual int min_match() { return length_; }
1893
- virtual int max_match() { return length_; }
1894
- virtual void AppendToText(RegExpText* text);
1895
- void AddElement(TextElement elm) {
1896
- elements_.Add(elm);
1897
- length_ += elm.length();
1898
- };
1899
- ZoneList<TextElement>* elements() { return &elements_; }
1900
- private:
1901
- ZoneList<TextElement> elements_;
1902
- int length_;
1903
- };
1904
-
1905
-
1906
- class RegExpQuantifier: public RegExpTree {
1907
- public:
1908
- enum Type { GREEDY, NON_GREEDY, POSSESSIVE };
1909
- RegExpQuantifier(int min, int max, Type type, RegExpTree* body)
1910
- : body_(body),
1911
- min_(min),
1912
- max_(max),
1913
- min_match_(min * body->min_match()),
1914
- type_(type) {
1915
- if (max > 0 && body->max_match() > kInfinity / max) {
1916
- max_match_ = kInfinity;
1917
- } else {
1918
- max_match_ = max * body->max_match();
1919
- }
1920
- }
1921
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1922
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1923
- RegExpNode* on_success);
1924
- static RegExpNode* ToNode(int min,
1925
- int max,
1926
- bool is_greedy,
1927
- RegExpTree* body,
1928
- RegExpCompiler* compiler,
1929
- RegExpNode* on_success,
1930
- bool not_at_start = false);
1931
- virtual RegExpQuantifier* AsQuantifier();
1932
- virtual Interval CaptureRegisters();
1933
- virtual bool IsQuantifier();
1934
- virtual int min_match() { return min_match_; }
1935
- virtual int max_match() { return max_match_; }
1936
- int min() { return min_; }
1937
- int max() { return max_; }
1938
- bool is_possessive() { return type_ == POSSESSIVE; }
1939
- bool is_non_greedy() { return type_ == NON_GREEDY; }
1940
- bool is_greedy() { return type_ == GREEDY; }
1941
- RegExpTree* body() { return body_; }
1942
- private:
1943
- RegExpTree* body_;
1944
- int min_;
1945
- int max_;
1946
- int min_match_;
1947
- int max_match_;
1948
- Type type_;
1949
- };
1950
-
1951
-
1952
- class RegExpCapture: public RegExpTree {
1953
- public:
1954
- explicit RegExpCapture(RegExpTree* body, int index)
1955
- : body_(body), index_(index) { }
1956
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1957
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1958
- RegExpNode* on_success);
1959
- static RegExpNode* ToNode(RegExpTree* body,
1960
- int index,
1961
- RegExpCompiler* compiler,
1962
- RegExpNode* on_success);
1963
- virtual RegExpCapture* AsCapture();
1964
- virtual bool IsAnchored();
1965
- virtual Interval CaptureRegisters();
1966
- virtual bool IsCapture();
1967
- virtual int min_match() { return body_->min_match(); }
1968
- virtual int max_match() { return body_->max_match(); }
1969
- RegExpTree* body() { return body_; }
1970
- int index() { return index_; }
1971
- static int StartRegister(int index) { return index * 2; }
1972
- static int EndRegister(int index) { return index * 2 + 1; }
1973
- private:
1974
- RegExpTree* body_;
1975
- int index_;
1976
- };
1977
-
1978
-
1979
- class RegExpLookahead: public RegExpTree {
1980
- public:
1981
- RegExpLookahead(RegExpTree* body,
1982
- bool is_positive,
1983
- int capture_count,
1984
- int capture_from)
1985
- : body_(body),
1986
- is_positive_(is_positive),
1987
- capture_count_(capture_count),
1988
- capture_from_(capture_from) { }
1989
-
1990
- virtual void* Accept(RegExpVisitor* visitor, void* data);
1991
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
1992
- RegExpNode* on_success);
1993
- virtual RegExpLookahead* AsLookahead();
1994
- virtual Interval CaptureRegisters();
1995
- virtual bool IsLookahead();
1996
- virtual bool IsAnchored();
1997
- virtual int min_match() { return 0; }
1998
- virtual int max_match() { return 0; }
1999
- RegExpTree* body() { return body_; }
2000
- bool is_positive() { return is_positive_; }
2001
- int capture_count() { return capture_count_; }
2002
- int capture_from() { return capture_from_; }
2003
- private:
2004
- RegExpTree* body_;
2005
- bool is_positive_;
2006
- int capture_count_;
2007
- int capture_from_;
2008
- };
2009
-
2010
-
2011
- class RegExpBackReference: public RegExpTree {
2012
- public:
2013
- explicit RegExpBackReference(RegExpCapture* capture)
2014
- : capture_(capture) { }
2015
- virtual void* Accept(RegExpVisitor* visitor, void* data);
2016
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
2017
- RegExpNode* on_success);
2018
- virtual RegExpBackReference* AsBackReference();
2019
- virtual bool IsBackReference();
2020
- virtual int min_match() { return 0; }
2021
- virtual int max_match() { return capture_->max_match(); }
2022
- int index() { return capture_->index(); }
2023
- RegExpCapture* capture() { return capture_; }
2024
- private:
2025
- RegExpCapture* capture_;
2026
- };
2027
-
2028
-
2029
- class RegExpEmpty: public RegExpTree {
2030
- public:
2031
- RegExpEmpty() { }
2032
- virtual void* Accept(RegExpVisitor* visitor, void* data);
2033
- virtual RegExpNode* ToNode(RegExpCompiler* compiler,
2034
- RegExpNode* on_success);
2035
- virtual RegExpEmpty* AsEmpty();
2036
- virtual bool IsEmpty();
2037
- virtual int min_match() { return 0; }
2038
- virtual int max_match() { return 0; }
2039
- static RegExpEmpty* GetInstance() { return &kInstance; }
2040
- private:
2041
- static RegExpEmpty kInstance;
2042
- };
2043
-
2044
-
2045
- // ----------------------------------------------------------------------------
2046
- // Basic visitor
2047
- // - leaf node visitors are abstract.
2048
-
2049
- class AstVisitor BASE_EMBEDDED {
2050
- public:
2051
- AstVisitor() : stack_overflow_(false) { }
2052
- virtual ~AstVisitor() { }
2053
-
2054
- // Stack overflow check and dynamic dispatch.
2055
- void Visit(AstNode* node) { if (!CheckStackOverflow()) node->Accept(this); }
2056
-
2057
- // Iteration left-to-right.
2058
- virtual void VisitDeclarations(ZoneList<Declaration*>* declarations);
2059
- virtual void VisitStatements(ZoneList<Statement*>* statements);
2060
- virtual void VisitExpressions(ZoneList<Expression*>* expressions);
2061
-
2062
- // Stack overflow tracking support.
2063
- bool HasStackOverflow() const { return stack_overflow_; }
2064
- bool CheckStackOverflow();
2065
-
2066
- // If a stack-overflow exception is encountered when visiting a
2067
- // node, calling SetStackOverflow will make sure that the visitor
2068
- // bails out without visiting more nodes.
2069
- void SetStackOverflow() { stack_overflow_ = true; }
2070
-
2071
- // Individual nodes
2072
- #define DEF_VISIT(type) \
2073
- virtual void Visit##type(type* node) = 0;
2074
- AST_NODE_LIST(DEF_VISIT)
2075
- #undef DEF_VISIT
2076
-
2077
- private:
2078
- bool stack_overflow_;
2079
- };
2080
-
2081
-
2082
- class CopyAstVisitor : public AstVisitor {
2083
- public:
2084
- Expression* DeepCopyExpr(Expression* expr);
2085
-
2086
- Statement* DeepCopyStmt(Statement* stmt);
2087
-
2088
- private:
2089
- ZoneList<Expression*>* DeepCopyExprList(ZoneList<Expression*>* expressions);
2090
-
2091
- ZoneList<Statement*>* DeepCopyStmtList(ZoneList<Statement*>* statements);
2092
-
2093
- // AST node visit functions.
2094
- #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
2095
- AST_NODE_LIST(DECLARE_VISIT)
2096
- #undef DECLARE_VISIT
2097
-
2098
- // Holds the result of copying an expression.
2099
- Expression* expr_;
2100
- // Holds the result of copying a statement.
2101
- Statement* stmt_;
2102
- };
2103
-
2104
- } } // namespace v8::internal
2105
-
2106
- #endif // V8_AST_H_