libv8-sgonyea 3.3.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (500) hide show
  1. data/.gitignore +8 -0
  2. data/.gitmodules +3 -0
  3. data/Gemfile +4 -0
  4. data/README.md +76 -0
  5. data/Rakefile +113 -0
  6. data/ext/libv8/extconf.rb +28 -0
  7. data/lib/libv8.rb +15 -0
  8. data/lib/libv8/Makefile +30 -0
  9. data/lib/libv8/detect_cpu.rb +27 -0
  10. data/lib/libv8/fpic-on-linux-amd64.patch +13 -0
  11. data/lib/libv8/v8/.gitignore +35 -0
  12. data/lib/libv8/v8/AUTHORS +44 -0
  13. data/lib/libv8/v8/ChangeLog +2839 -0
  14. data/lib/libv8/v8/LICENSE +52 -0
  15. data/lib/libv8/v8/LICENSE.strongtalk +29 -0
  16. data/lib/libv8/v8/LICENSE.v8 +26 -0
  17. data/lib/libv8/v8/LICENSE.valgrind +45 -0
  18. data/lib/libv8/v8/SConstruct +1478 -0
  19. data/lib/libv8/v8/build/README.txt +49 -0
  20. data/lib/libv8/v8/build/all.gyp +18 -0
  21. data/lib/libv8/v8/build/armu.gypi +32 -0
  22. data/lib/libv8/v8/build/common.gypi +144 -0
  23. data/lib/libv8/v8/build/gyp_v8 +145 -0
  24. data/lib/libv8/v8/include/v8-debug.h +395 -0
  25. data/lib/libv8/v8/include/v8-preparser.h +117 -0
  26. data/lib/libv8/v8/include/v8-profiler.h +505 -0
  27. data/lib/libv8/v8/include/v8-testing.h +104 -0
  28. data/lib/libv8/v8/include/v8.h +4124 -0
  29. data/lib/libv8/v8/include/v8stdint.h +53 -0
  30. data/lib/libv8/v8/preparser/SConscript +38 -0
  31. data/lib/libv8/v8/preparser/preparser-process.cc +379 -0
  32. data/lib/libv8/v8/src/SConscript +368 -0
  33. data/lib/libv8/v8/src/accessors.cc +767 -0
  34. data/lib/libv8/v8/src/accessors.h +123 -0
  35. data/lib/libv8/v8/src/allocation-inl.h +49 -0
  36. data/lib/libv8/v8/src/allocation.cc +122 -0
  37. data/lib/libv8/v8/src/allocation.h +143 -0
  38. data/lib/libv8/v8/src/api.cc +5845 -0
  39. data/lib/libv8/v8/src/api.h +574 -0
  40. data/lib/libv8/v8/src/apinatives.js +110 -0
  41. data/lib/libv8/v8/src/apiutils.h +73 -0
  42. data/lib/libv8/v8/src/arguments.h +118 -0
  43. data/lib/libv8/v8/src/arm/assembler-arm-inl.h +353 -0
  44. data/lib/libv8/v8/src/arm/assembler-arm.cc +2661 -0
  45. data/lib/libv8/v8/src/arm/assembler-arm.h +1375 -0
  46. data/lib/libv8/v8/src/arm/builtins-arm.cc +1658 -0
  47. data/lib/libv8/v8/src/arm/code-stubs-arm.cc +6398 -0
  48. data/lib/libv8/v8/src/arm/code-stubs-arm.h +673 -0
  49. data/lib/libv8/v8/src/arm/codegen-arm.cc +52 -0
  50. data/lib/libv8/v8/src/arm/codegen-arm.h +91 -0
  51. data/lib/libv8/v8/src/arm/constants-arm.cc +152 -0
  52. data/lib/libv8/v8/src/arm/constants-arm.h +775 -0
  53. data/lib/libv8/v8/src/arm/cpu-arm.cc +120 -0
  54. data/lib/libv8/v8/src/arm/debug-arm.cc +317 -0
  55. data/lib/libv8/v8/src/arm/deoptimizer-arm.cc +754 -0
  56. data/lib/libv8/v8/src/arm/disasm-arm.cc +1506 -0
  57. data/lib/libv8/v8/src/arm/frames-arm.cc +45 -0
  58. data/lib/libv8/v8/src/arm/frames-arm.h +168 -0
  59. data/lib/libv8/v8/src/arm/full-codegen-arm.cc +4375 -0
  60. data/lib/libv8/v8/src/arm/ic-arm.cc +1562 -0
  61. data/lib/libv8/v8/src/arm/lithium-arm.cc +2206 -0
  62. data/lib/libv8/v8/src/arm/lithium-arm.h +2348 -0
  63. data/lib/libv8/v8/src/arm/lithium-codegen-arm.cc +4526 -0
  64. data/lib/libv8/v8/src/arm/lithium-codegen-arm.h +403 -0
  65. data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.cc +305 -0
  66. data/lib/libv8/v8/src/arm/lithium-gap-resolver-arm.h +84 -0
  67. data/lib/libv8/v8/src/arm/macro-assembler-arm.cc +3163 -0
  68. data/lib/libv8/v8/src/arm/macro-assembler-arm.h +1126 -0
  69. data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.cc +1287 -0
  70. data/lib/libv8/v8/src/arm/regexp-macro-assembler-arm.h +253 -0
  71. data/lib/libv8/v8/src/arm/simulator-arm.cc +3424 -0
  72. data/lib/libv8/v8/src/arm/simulator-arm.h +431 -0
  73. data/lib/libv8/v8/src/arm/stub-cache-arm.cc +4243 -0
  74. data/lib/libv8/v8/src/array.js +1366 -0
  75. data/lib/libv8/v8/src/assembler.cc +1207 -0
  76. data/lib/libv8/v8/src/assembler.h +858 -0
  77. data/lib/libv8/v8/src/ast-inl.h +112 -0
  78. data/lib/libv8/v8/src/ast.cc +1146 -0
  79. data/lib/libv8/v8/src/ast.h +2188 -0
  80. data/lib/libv8/v8/src/atomicops.h +167 -0
  81. data/lib/libv8/v8/src/atomicops_internals_arm_gcc.h +145 -0
  82. data/lib/libv8/v8/src/atomicops_internals_mips_gcc.h +169 -0
  83. data/lib/libv8/v8/src/atomicops_internals_x86_gcc.cc +133 -0
  84. data/lib/libv8/v8/src/atomicops_internals_x86_gcc.h +287 -0
  85. data/lib/libv8/v8/src/atomicops_internals_x86_macosx.h +301 -0
  86. data/lib/libv8/v8/src/atomicops_internals_x86_msvc.h +203 -0
  87. data/lib/libv8/v8/src/bignum-dtoa.cc +655 -0
  88. data/lib/libv8/v8/src/bignum-dtoa.h +81 -0
  89. data/lib/libv8/v8/src/bignum.cc +768 -0
  90. data/lib/libv8/v8/src/bignum.h +140 -0
  91. data/lib/libv8/v8/src/bootstrapper.cc +2184 -0
  92. data/lib/libv8/v8/src/bootstrapper.h +188 -0
  93. data/lib/libv8/v8/src/builtins.cc +1707 -0
  94. data/lib/libv8/v8/src/builtins.h +371 -0
  95. data/lib/libv8/v8/src/bytecodes-irregexp.h +105 -0
  96. data/lib/libv8/v8/src/cached-powers.cc +177 -0
  97. data/lib/libv8/v8/src/cached-powers.h +65 -0
  98. data/lib/libv8/v8/src/char-predicates-inl.h +94 -0
  99. data/lib/libv8/v8/src/char-predicates.h +67 -0
  100. data/lib/libv8/v8/src/checks.cc +110 -0
  101. data/lib/libv8/v8/src/checks.h +296 -0
  102. data/lib/libv8/v8/src/circular-queue-inl.h +53 -0
  103. data/lib/libv8/v8/src/circular-queue.cc +122 -0
  104. data/lib/libv8/v8/src/circular-queue.h +103 -0
  105. data/lib/libv8/v8/src/code-stubs.cc +267 -0
  106. data/lib/libv8/v8/src/code-stubs.h +1011 -0
  107. data/lib/libv8/v8/src/code.h +70 -0
  108. data/lib/libv8/v8/src/codegen.cc +231 -0
  109. data/lib/libv8/v8/src/codegen.h +84 -0
  110. data/lib/libv8/v8/src/compilation-cache.cc +540 -0
  111. data/lib/libv8/v8/src/compilation-cache.h +287 -0
  112. data/lib/libv8/v8/src/compiler.cc +786 -0
  113. data/lib/libv8/v8/src/compiler.h +312 -0
  114. data/lib/libv8/v8/src/contexts.cc +347 -0
  115. data/lib/libv8/v8/src/contexts.h +391 -0
  116. data/lib/libv8/v8/src/conversions-inl.h +106 -0
  117. data/lib/libv8/v8/src/conversions.cc +1131 -0
  118. data/lib/libv8/v8/src/conversions.h +135 -0
  119. data/lib/libv8/v8/src/counters.cc +93 -0
  120. data/lib/libv8/v8/src/counters.h +254 -0
  121. data/lib/libv8/v8/src/cpu-profiler-inl.h +101 -0
  122. data/lib/libv8/v8/src/cpu-profiler.cc +609 -0
  123. data/lib/libv8/v8/src/cpu-profiler.h +302 -0
  124. data/lib/libv8/v8/src/cpu.h +69 -0
  125. data/lib/libv8/v8/src/d8-debug.cc +367 -0
  126. data/lib/libv8/v8/src/d8-debug.h +158 -0
  127. data/lib/libv8/v8/src/d8-posix.cc +695 -0
  128. data/lib/libv8/v8/src/d8-readline.cc +130 -0
  129. data/lib/libv8/v8/src/d8-windows.cc +42 -0
  130. data/lib/libv8/v8/src/d8.cc +803 -0
  131. data/lib/libv8/v8/src/d8.gyp +91 -0
  132. data/lib/libv8/v8/src/d8.h +235 -0
  133. data/lib/libv8/v8/src/d8.js +2798 -0
  134. data/lib/libv8/v8/src/data-flow.cc +66 -0
  135. data/lib/libv8/v8/src/data-flow.h +205 -0
  136. data/lib/libv8/v8/src/date.js +1103 -0
  137. data/lib/libv8/v8/src/dateparser-inl.h +127 -0
  138. data/lib/libv8/v8/src/dateparser.cc +178 -0
  139. data/lib/libv8/v8/src/dateparser.h +266 -0
  140. data/lib/libv8/v8/src/debug-agent.cc +447 -0
  141. data/lib/libv8/v8/src/debug-agent.h +129 -0
  142. data/lib/libv8/v8/src/debug-debugger.js +2569 -0
  143. data/lib/libv8/v8/src/debug.cc +3165 -0
  144. data/lib/libv8/v8/src/debug.h +1057 -0
  145. data/lib/libv8/v8/src/deoptimizer.cc +1256 -0
  146. data/lib/libv8/v8/src/deoptimizer.h +602 -0
  147. data/lib/libv8/v8/src/disasm.h +80 -0
  148. data/lib/libv8/v8/src/disassembler.cc +343 -0
  149. data/lib/libv8/v8/src/disassembler.h +58 -0
  150. data/lib/libv8/v8/src/diy-fp.cc +58 -0
  151. data/lib/libv8/v8/src/diy-fp.h +117 -0
  152. data/lib/libv8/v8/src/double.h +238 -0
  153. data/lib/libv8/v8/src/dtoa.cc +103 -0
  154. data/lib/libv8/v8/src/dtoa.h +85 -0
  155. data/lib/libv8/v8/src/execution.cc +849 -0
  156. data/lib/libv8/v8/src/execution.h +297 -0
  157. data/lib/libv8/v8/src/extensions/experimental/break-iterator.cc +250 -0
  158. data/lib/libv8/v8/src/extensions/experimental/break-iterator.h +89 -0
  159. data/lib/libv8/v8/src/extensions/experimental/collator.cc +218 -0
  160. data/lib/libv8/v8/src/extensions/experimental/collator.h +69 -0
  161. data/lib/libv8/v8/src/extensions/experimental/experimental.gyp +94 -0
  162. data/lib/libv8/v8/src/extensions/experimental/i18n-extension.cc +78 -0
  163. data/lib/libv8/v8/src/extensions/experimental/i18n-extension.h +54 -0
  164. data/lib/libv8/v8/src/extensions/experimental/i18n-locale.cc +112 -0
  165. data/lib/libv8/v8/src/extensions/experimental/i18n-locale.h +60 -0
  166. data/lib/libv8/v8/src/extensions/experimental/i18n-utils.cc +43 -0
  167. data/lib/libv8/v8/src/extensions/experimental/i18n-utils.h +49 -0
  168. data/lib/libv8/v8/src/extensions/experimental/i18n.js +180 -0
  169. data/lib/libv8/v8/src/extensions/experimental/language-matcher.cc +251 -0
  170. data/lib/libv8/v8/src/extensions/experimental/language-matcher.h +95 -0
  171. data/lib/libv8/v8/src/extensions/externalize-string-extension.cc +141 -0
  172. data/lib/libv8/v8/src/extensions/externalize-string-extension.h +50 -0
  173. data/lib/libv8/v8/src/extensions/gc-extension.cc +58 -0
  174. data/lib/libv8/v8/src/extensions/gc-extension.h +49 -0
  175. data/lib/libv8/v8/src/factory.cc +1222 -0
  176. data/lib/libv8/v8/src/factory.h +442 -0
  177. data/lib/libv8/v8/src/fast-dtoa.cc +736 -0
  178. data/lib/libv8/v8/src/fast-dtoa.h +83 -0
  179. data/lib/libv8/v8/src/fixed-dtoa.cc +405 -0
  180. data/lib/libv8/v8/src/fixed-dtoa.h +55 -0
  181. data/lib/libv8/v8/src/flag-definitions.h +560 -0
  182. data/lib/libv8/v8/src/flags.cc +551 -0
  183. data/lib/libv8/v8/src/flags.h +79 -0
  184. data/lib/libv8/v8/src/frames-inl.h +247 -0
  185. data/lib/libv8/v8/src/frames.cc +1243 -0
  186. data/lib/libv8/v8/src/frames.h +870 -0
  187. data/lib/libv8/v8/src/full-codegen.cc +1374 -0
  188. data/lib/libv8/v8/src/full-codegen.h +771 -0
  189. data/lib/libv8/v8/src/func-name-inferrer.cc +92 -0
  190. data/lib/libv8/v8/src/func-name-inferrer.h +111 -0
  191. data/lib/libv8/v8/src/gdb-jit.cc +1555 -0
  192. data/lib/libv8/v8/src/gdb-jit.h +143 -0
  193. data/lib/libv8/v8/src/global-handles.cc +665 -0
  194. data/lib/libv8/v8/src/global-handles.h +284 -0
  195. data/lib/libv8/v8/src/globals.h +325 -0
  196. data/lib/libv8/v8/src/handles-inl.h +177 -0
  197. data/lib/libv8/v8/src/handles.cc +987 -0
  198. data/lib/libv8/v8/src/handles.h +382 -0
  199. data/lib/libv8/v8/src/hashmap.cc +230 -0
  200. data/lib/libv8/v8/src/hashmap.h +123 -0
  201. data/lib/libv8/v8/src/heap-inl.h +704 -0
  202. data/lib/libv8/v8/src/heap-profiler.cc +1173 -0
  203. data/lib/libv8/v8/src/heap-profiler.h +397 -0
  204. data/lib/libv8/v8/src/heap.cc +5930 -0
  205. data/lib/libv8/v8/src/heap.h +2268 -0
  206. data/lib/libv8/v8/src/hydrogen-instructions.cc +1769 -0
  207. data/lib/libv8/v8/src/hydrogen-instructions.h +3971 -0
  208. data/lib/libv8/v8/src/hydrogen.cc +6239 -0
  209. data/lib/libv8/v8/src/hydrogen.h +1202 -0
  210. data/lib/libv8/v8/src/ia32/assembler-ia32-inl.h +446 -0
  211. data/lib/libv8/v8/src/ia32/assembler-ia32.cc +2487 -0
  212. data/lib/libv8/v8/src/ia32/assembler-ia32.h +1144 -0
  213. data/lib/libv8/v8/src/ia32/builtins-ia32.cc +1621 -0
  214. data/lib/libv8/v8/src/ia32/code-stubs-ia32.cc +6198 -0
  215. data/lib/libv8/v8/src/ia32/code-stubs-ia32.h +517 -0
  216. data/lib/libv8/v8/src/ia32/codegen-ia32.cc +265 -0
  217. data/lib/libv8/v8/src/ia32/codegen-ia32.h +79 -0
  218. data/lib/libv8/v8/src/ia32/cpu-ia32.cc +88 -0
  219. data/lib/libv8/v8/src/ia32/debug-ia32.cc +312 -0
  220. data/lib/libv8/v8/src/ia32/deoptimizer-ia32.cc +774 -0
  221. data/lib/libv8/v8/src/ia32/disasm-ia32.cc +1628 -0
  222. data/lib/libv8/v8/src/ia32/frames-ia32.cc +45 -0
  223. data/lib/libv8/v8/src/ia32/frames-ia32.h +142 -0
  224. data/lib/libv8/v8/src/ia32/full-codegen-ia32.cc +4338 -0
  225. data/lib/libv8/v8/src/ia32/ic-ia32.cc +1597 -0
  226. data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.cc +4461 -0
  227. data/lib/libv8/v8/src/ia32/lithium-codegen-ia32.h +375 -0
  228. data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.cc +475 -0
  229. data/lib/libv8/v8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
  230. data/lib/libv8/v8/src/ia32/lithium-ia32.cc +2261 -0
  231. data/lib/libv8/v8/src/ia32/lithium-ia32.h +2396 -0
  232. data/lib/libv8/v8/src/ia32/macro-assembler-ia32.cc +2136 -0
  233. data/lib/libv8/v8/src/ia32/macro-assembler-ia32.h +775 -0
  234. data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.cc +1263 -0
  235. data/lib/libv8/v8/src/ia32/regexp-macro-assembler-ia32.h +216 -0
  236. data/lib/libv8/v8/src/ia32/simulator-ia32.cc +30 -0
  237. data/lib/libv8/v8/src/ia32/simulator-ia32.h +74 -0
  238. data/lib/libv8/v8/src/ia32/stub-cache-ia32.cc +3847 -0
  239. data/lib/libv8/v8/src/ic-inl.h +130 -0
  240. data/lib/libv8/v8/src/ic.cc +2577 -0
  241. data/lib/libv8/v8/src/ic.h +736 -0
  242. data/lib/libv8/v8/src/inspector.cc +63 -0
  243. data/lib/libv8/v8/src/inspector.h +62 -0
  244. data/lib/libv8/v8/src/interpreter-irregexp.cc +659 -0
  245. data/lib/libv8/v8/src/interpreter-irregexp.h +49 -0
  246. data/lib/libv8/v8/src/isolate-inl.h +50 -0
  247. data/lib/libv8/v8/src/isolate.cc +1869 -0
  248. data/lib/libv8/v8/src/isolate.h +1382 -0
  249. data/lib/libv8/v8/src/json-parser.cc +504 -0
  250. data/lib/libv8/v8/src/json-parser.h +161 -0
  251. data/lib/libv8/v8/src/json.js +342 -0
  252. data/lib/libv8/v8/src/jsregexp.cc +5385 -0
  253. data/lib/libv8/v8/src/jsregexp.h +1492 -0
  254. data/lib/libv8/v8/src/list-inl.h +212 -0
  255. data/lib/libv8/v8/src/list.h +174 -0
  256. data/lib/libv8/v8/src/lithium-allocator-inl.h +142 -0
  257. data/lib/libv8/v8/src/lithium-allocator.cc +2123 -0
  258. data/lib/libv8/v8/src/lithium-allocator.h +630 -0
  259. data/lib/libv8/v8/src/lithium.cc +190 -0
  260. data/lib/libv8/v8/src/lithium.h +597 -0
  261. data/lib/libv8/v8/src/liveedit-debugger.js +1082 -0
  262. data/lib/libv8/v8/src/liveedit.cc +1691 -0
  263. data/lib/libv8/v8/src/liveedit.h +180 -0
  264. data/lib/libv8/v8/src/liveobjectlist-inl.h +126 -0
  265. data/lib/libv8/v8/src/liveobjectlist.cc +2589 -0
  266. data/lib/libv8/v8/src/liveobjectlist.h +322 -0
  267. data/lib/libv8/v8/src/log-inl.h +59 -0
  268. data/lib/libv8/v8/src/log-utils.cc +428 -0
  269. data/lib/libv8/v8/src/log-utils.h +231 -0
  270. data/lib/libv8/v8/src/log.cc +1993 -0
  271. data/lib/libv8/v8/src/log.h +476 -0
  272. data/lib/libv8/v8/src/macro-assembler.h +120 -0
  273. data/lib/libv8/v8/src/macros.py +178 -0
  274. data/lib/libv8/v8/src/mark-compact.cc +3143 -0
  275. data/lib/libv8/v8/src/mark-compact.h +506 -0
  276. data/lib/libv8/v8/src/math.js +264 -0
  277. data/lib/libv8/v8/src/messages.cc +179 -0
  278. data/lib/libv8/v8/src/messages.h +113 -0
  279. data/lib/libv8/v8/src/messages.js +1096 -0
  280. data/lib/libv8/v8/src/mips/assembler-mips-inl.h +312 -0
  281. data/lib/libv8/v8/src/mips/assembler-mips.cc +1960 -0
  282. data/lib/libv8/v8/src/mips/assembler-mips.h +1138 -0
  283. data/lib/libv8/v8/src/mips/builtins-mips.cc +1628 -0
  284. data/lib/libv8/v8/src/mips/code-stubs-mips.cc +6656 -0
  285. data/lib/libv8/v8/src/mips/code-stubs-mips.h +682 -0
  286. data/lib/libv8/v8/src/mips/codegen-mips.cc +52 -0
  287. data/lib/libv8/v8/src/mips/codegen-mips.h +98 -0
  288. data/lib/libv8/v8/src/mips/constants-mips.cc +352 -0
  289. data/lib/libv8/v8/src/mips/constants-mips.h +739 -0
  290. data/lib/libv8/v8/src/mips/cpu-mips.cc +96 -0
  291. data/lib/libv8/v8/src/mips/debug-mips.cc +308 -0
  292. data/lib/libv8/v8/src/mips/deoptimizer-mips.cc +91 -0
  293. data/lib/libv8/v8/src/mips/disasm-mips.cc +1050 -0
  294. data/lib/libv8/v8/src/mips/frames-mips.cc +47 -0
  295. data/lib/libv8/v8/src/mips/frames-mips.h +219 -0
  296. data/lib/libv8/v8/src/mips/full-codegen-mips.cc +4388 -0
  297. data/lib/libv8/v8/src/mips/ic-mips.cc +1580 -0
  298. data/lib/libv8/v8/src/mips/lithium-codegen-mips.h +65 -0
  299. data/lib/libv8/v8/src/mips/lithium-mips.h +307 -0
  300. data/lib/libv8/v8/src/mips/macro-assembler-mips.cc +4056 -0
  301. data/lib/libv8/v8/src/mips/macro-assembler-mips.h +1214 -0
  302. data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.cc +1251 -0
  303. data/lib/libv8/v8/src/mips/regexp-macro-assembler-mips.h +252 -0
  304. data/lib/libv8/v8/src/mips/simulator-mips.cc +2621 -0
  305. data/lib/libv8/v8/src/mips/simulator-mips.h +401 -0
  306. data/lib/libv8/v8/src/mips/stub-cache-mips.cc +4285 -0
  307. data/lib/libv8/v8/src/mirror-debugger.js +2382 -0
  308. data/lib/libv8/v8/src/mksnapshot.cc +328 -0
  309. data/lib/libv8/v8/src/natives.h +64 -0
  310. data/lib/libv8/v8/src/objects-debug.cc +738 -0
  311. data/lib/libv8/v8/src/objects-inl.h +4323 -0
  312. data/lib/libv8/v8/src/objects-printer.cc +829 -0
  313. data/lib/libv8/v8/src/objects-visiting.cc +148 -0
  314. data/lib/libv8/v8/src/objects-visiting.h +424 -0
  315. data/lib/libv8/v8/src/objects.cc +10585 -0
  316. data/lib/libv8/v8/src/objects.h +6838 -0
  317. data/lib/libv8/v8/src/parser.cc +4997 -0
  318. data/lib/libv8/v8/src/parser.h +765 -0
  319. data/lib/libv8/v8/src/platform-cygwin.cc +779 -0
  320. data/lib/libv8/v8/src/platform-freebsd.cc +826 -0
  321. data/lib/libv8/v8/src/platform-linux.cc +1149 -0
  322. data/lib/libv8/v8/src/platform-macos.cc +830 -0
  323. data/lib/libv8/v8/src/platform-nullos.cc +479 -0
  324. data/lib/libv8/v8/src/platform-openbsd.cc +640 -0
  325. data/lib/libv8/v8/src/platform-posix.cc +424 -0
  326. data/lib/libv8/v8/src/platform-solaris.cc +762 -0
  327. data/lib/libv8/v8/src/platform-tls-mac.h +62 -0
  328. data/lib/libv8/v8/src/platform-tls-win32.h +62 -0
  329. data/lib/libv8/v8/src/platform-tls.h +50 -0
  330. data/lib/libv8/v8/src/platform-win32.cc +2021 -0
  331. data/lib/libv8/v8/src/platform.h +667 -0
  332. data/lib/libv8/v8/src/preparse-data-format.h +62 -0
  333. data/lib/libv8/v8/src/preparse-data.cc +183 -0
  334. data/lib/libv8/v8/src/preparse-data.h +225 -0
  335. data/lib/libv8/v8/src/preparser-api.cc +220 -0
  336. data/lib/libv8/v8/src/preparser.cc +1450 -0
  337. data/lib/libv8/v8/src/preparser.h +493 -0
  338. data/lib/libv8/v8/src/prettyprinter.cc +1493 -0
  339. data/lib/libv8/v8/src/prettyprinter.h +223 -0
  340. data/lib/libv8/v8/src/profile-generator-inl.h +128 -0
  341. data/lib/libv8/v8/src/profile-generator.cc +3098 -0
  342. data/lib/libv8/v8/src/profile-generator.h +1126 -0
  343. data/lib/libv8/v8/src/property.cc +105 -0
  344. data/lib/libv8/v8/src/property.h +365 -0
  345. data/lib/libv8/v8/src/proxy.js +83 -0
  346. data/lib/libv8/v8/src/regexp-macro-assembler-irregexp-inl.h +78 -0
  347. data/lib/libv8/v8/src/regexp-macro-assembler-irregexp.cc +471 -0
  348. data/lib/libv8/v8/src/regexp-macro-assembler-irregexp.h +142 -0
  349. data/lib/libv8/v8/src/regexp-macro-assembler-tracer.cc +373 -0
  350. data/lib/libv8/v8/src/regexp-macro-assembler-tracer.h +104 -0
  351. data/lib/libv8/v8/src/regexp-macro-assembler.cc +267 -0
  352. data/lib/libv8/v8/src/regexp-macro-assembler.h +243 -0
  353. data/lib/libv8/v8/src/regexp-stack.cc +111 -0
  354. data/lib/libv8/v8/src/regexp-stack.h +147 -0
  355. data/lib/libv8/v8/src/regexp.js +483 -0
  356. data/lib/libv8/v8/src/rewriter.cc +360 -0
  357. data/lib/libv8/v8/src/rewriter.h +50 -0
  358. data/lib/libv8/v8/src/runtime-profiler.cc +489 -0
  359. data/lib/libv8/v8/src/runtime-profiler.h +201 -0
  360. data/lib/libv8/v8/src/runtime.cc +12227 -0
  361. data/lib/libv8/v8/src/runtime.h +652 -0
  362. data/lib/libv8/v8/src/runtime.js +649 -0
  363. data/lib/libv8/v8/src/safepoint-table.cc +256 -0
  364. data/lib/libv8/v8/src/safepoint-table.h +270 -0
  365. data/lib/libv8/v8/src/scanner-base.cc +952 -0
  366. data/lib/libv8/v8/src/scanner-base.h +670 -0
  367. data/lib/libv8/v8/src/scanner.cc +345 -0
  368. data/lib/libv8/v8/src/scanner.h +146 -0
  369. data/lib/libv8/v8/src/scopeinfo.cc +646 -0
  370. data/lib/libv8/v8/src/scopeinfo.h +254 -0
  371. data/lib/libv8/v8/src/scopes.cc +1150 -0
  372. data/lib/libv8/v8/src/scopes.h +507 -0
  373. data/lib/libv8/v8/src/serialize.cc +1574 -0
  374. data/lib/libv8/v8/src/serialize.h +589 -0
  375. data/lib/libv8/v8/src/shell.h +55 -0
  376. data/lib/libv8/v8/src/simulator.h +43 -0
  377. data/lib/libv8/v8/src/small-pointer-list.h +163 -0
  378. data/lib/libv8/v8/src/smart-pointer.h +109 -0
  379. data/lib/libv8/v8/src/snapshot-common.cc +83 -0
  380. data/lib/libv8/v8/src/snapshot-empty.cc +54 -0
  381. data/lib/libv8/v8/src/snapshot.h +91 -0
  382. data/lib/libv8/v8/src/spaces-inl.h +529 -0
  383. data/lib/libv8/v8/src/spaces.cc +3145 -0
  384. data/lib/libv8/v8/src/spaces.h +2369 -0
  385. data/lib/libv8/v8/src/splay-tree-inl.h +310 -0
  386. data/lib/libv8/v8/src/splay-tree.h +205 -0
  387. data/lib/libv8/v8/src/string-search.cc +41 -0
  388. data/lib/libv8/v8/src/string-search.h +568 -0
  389. data/lib/libv8/v8/src/string-stream.cc +592 -0
  390. data/lib/libv8/v8/src/string-stream.h +191 -0
  391. data/lib/libv8/v8/src/string.js +994 -0
  392. data/lib/libv8/v8/src/strtod.cc +440 -0
  393. data/lib/libv8/v8/src/strtod.h +40 -0
  394. data/lib/libv8/v8/src/stub-cache.cc +1965 -0
  395. data/lib/libv8/v8/src/stub-cache.h +924 -0
  396. data/lib/libv8/v8/src/third_party/valgrind/valgrind.h +3925 -0
  397. data/lib/libv8/v8/src/token.cc +63 -0
  398. data/lib/libv8/v8/src/token.h +288 -0
  399. data/lib/libv8/v8/src/type-info.cc +507 -0
  400. data/lib/libv8/v8/src/type-info.h +272 -0
  401. data/lib/libv8/v8/src/unbound-queue-inl.h +95 -0
  402. data/lib/libv8/v8/src/unbound-queue.h +69 -0
  403. data/lib/libv8/v8/src/unicode-inl.h +238 -0
  404. data/lib/libv8/v8/src/unicode.cc +1624 -0
  405. data/lib/libv8/v8/src/unicode.h +280 -0
  406. data/lib/libv8/v8/src/uri.js +408 -0
  407. data/lib/libv8/v8/src/utils-inl.h +48 -0
  408. data/lib/libv8/v8/src/utils.cc +371 -0
  409. data/lib/libv8/v8/src/utils.h +800 -0
  410. data/lib/libv8/v8/src/v8-counters.cc +62 -0
  411. data/lib/libv8/v8/src/v8-counters.h +314 -0
  412. data/lib/libv8/v8/src/v8.cc +213 -0
  413. data/lib/libv8/v8/src/v8.h +131 -0
  414. data/lib/libv8/v8/src/v8checks.h +64 -0
  415. data/lib/libv8/v8/src/v8dll-main.cc +44 -0
  416. data/lib/libv8/v8/src/v8globals.h +512 -0
  417. data/lib/libv8/v8/src/v8memory.h +82 -0
  418. data/lib/libv8/v8/src/v8natives.js +1310 -0
  419. data/lib/libv8/v8/src/v8preparserdll-main.cc +39 -0
  420. data/lib/libv8/v8/src/v8threads.cc +464 -0
  421. data/lib/libv8/v8/src/v8threads.h +165 -0
  422. data/lib/libv8/v8/src/v8utils.h +319 -0
  423. data/lib/libv8/v8/src/variables.cc +114 -0
  424. data/lib/libv8/v8/src/variables.h +167 -0
  425. data/lib/libv8/v8/src/version.cc +116 -0
  426. data/lib/libv8/v8/src/version.h +68 -0
  427. data/lib/libv8/v8/src/vm-state-inl.h +138 -0
  428. data/lib/libv8/v8/src/vm-state.h +71 -0
  429. data/lib/libv8/v8/src/win32-headers.h +96 -0
  430. data/lib/libv8/v8/src/x64/assembler-x64-inl.h +462 -0
  431. data/lib/libv8/v8/src/x64/assembler-x64.cc +3027 -0
  432. data/lib/libv8/v8/src/x64/assembler-x64.h +1633 -0
  433. data/lib/libv8/v8/src/x64/builtins-x64.cc +1520 -0
  434. data/lib/libv8/v8/src/x64/code-stubs-x64.cc +5132 -0
  435. data/lib/libv8/v8/src/x64/code-stubs-x64.h +514 -0
  436. data/lib/libv8/v8/src/x64/codegen-x64.cc +146 -0
  437. data/lib/libv8/v8/src/x64/codegen-x64.h +76 -0
  438. data/lib/libv8/v8/src/x64/cpu-x64.cc +88 -0
  439. data/lib/libv8/v8/src/x64/debug-x64.cc +319 -0
  440. data/lib/libv8/v8/src/x64/deoptimizer-x64.cc +815 -0
  441. data/lib/libv8/v8/src/x64/disasm-x64.cc +1832 -0
  442. data/lib/libv8/v8/src/x64/frames-x64.cc +45 -0
  443. data/lib/libv8/v8/src/x64/frames-x64.h +130 -0
  444. data/lib/libv8/v8/src/x64/full-codegen-x64.cc +4318 -0
  445. data/lib/libv8/v8/src/x64/ic-x64.cc +1608 -0
  446. data/lib/libv8/v8/src/x64/lithium-codegen-x64.cc +4267 -0
  447. data/lib/libv8/v8/src/x64/lithium-codegen-x64.h +367 -0
  448. data/lib/libv8/v8/src/x64/lithium-gap-resolver-x64.cc +320 -0
  449. data/lib/libv8/v8/src/x64/lithium-gap-resolver-x64.h +74 -0
  450. data/lib/libv8/v8/src/x64/lithium-x64.cc +2202 -0
  451. data/lib/libv8/v8/src/x64/lithium-x64.h +2333 -0
  452. data/lib/libv8/v8/src/x64/macro-assembler-x64.cc +3745 -0
  453. data/lib/libv8/v8/src/x64/macro-assembler-x64.h +1290 -0
  454. data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.cc +1398 -0
  455. data/lib/libv8/v8/src/x64/regexp-macro-assembler-x64.h +282 -0
  456. data/lib/libv8/v8/src/x64/simulator-x64.cc +27 -0
  457. data/lib/libv8/v8/src/x64/simulator-x64.h +72 -0
  458. data/lib/libv8/v8/src/x64/stub-cache-x64.cc +3610 -0
  459. data/lib/libv8/v8/src/zone-inl.h +140 -0
  460. data/lib/libv8/v8/src/zone.cc +196 -0
  461. data/lib/libv8/v8/src/zone.h +240 -0
  462. data/lib/libv8/v8/tools/codemap.js +265 -0
  463. data/lib/libv8/v8/tools/consarray.js +93 -0
  464. data/lib/libv8/v8/tools/csvparser.js +78 -0
  465. data/lib/libv8/v8/tools/disasm.py +92 -0
  466. data/lib/libv8/v8/tools/freebsd-tick-processor +10 -0
  467. data/lib/libv8/v8/tools/gc-nvp-trace-processor.py +342 -0
  468. data/lib/libv8/v8/tools/gcmole/README +62 -0
  469. data/lib/libv8/v8/tools/gcmole/gccause.lua +60 -0
  470. data/lib/libv8/v8/tools/gcmole/gcmole.cc +1261 -0
  471. data/lib/libv8/v8/tools/gcmole/gcmole.lua +378 -0
  472. data/lib/libv8/v8/tools/generate-ten-powers.scm +286 -0
  473. data/lib/libv8/v8/tools/grokdump.py +841 -0
  474. data/lib/libv8/v8/tools/gyp/v8.gyp +995 -0
  475. data/lib/libv8/v8/tools/js2c.py +364 -0
  476. data/lib/libv8/v8/tools/jsmin.py +280 -0
  477. data/lib/libv8/v8/tools/linux-tick-processor +35 -0
  478. data/lib/libv8/v8/tools/ll_prof.py +942 -0
  479. data/lib/libv8/v8/tools/logreader.js +185 -0
  480. data/lib/libv8/v8/tools/mac-nm +18 -0
  481. data/lib/libv8/v8/tools/mac-tick-processor +6 -0
  482. data/lib/libv8/v8/tools/oom_dump/README +31 -0
  483. data/lib/libv8/v8/tools/oom_dump/SConstruct +42 -0
  484. data/lib/libv8/v8/tools/oom_dump/oom_dump.cc +288 -0
  485. data/lib/libv8/v8/tools/presubmit.py +305 -0
  486. data/lib/libv8/v8/tools/process-heap-prof.py +120 -0
  487. data/lib/libv8/v8/tools/profile.js +751 -0
  488. data/lib/libv8/v8/tools/profile_view.js +219 -0
  489. data/lib/libv8/v8/tools/run-valgrind.py +77 -0
  490. data/lib/libv8/v8/tools/splaytree.js +316 -0
  491. data/lib/libv8/v8/tools/stats-viewer.py +468 -0
  492. data/lib/libv8/v8/tools/test.py +1510 -0
  493. data/lib/libv8/v8/tools/tickprocessor-driver.js +59 -0
  494. data/lib/libv8/v8/tools/tickprocessor.js +877 -0
  495. data/lib/libv8/v8/tools/utils.py +96 -0
  496. data/lib/libv8/v8/tools/visual_studio/README.txt +12 -0
  497. data/lib/libv8/v8/tools/windows-tick-processor.bat +30 -0
  498. data/lib/libv8/version.rb +5 -0
  499. data/libv8.gemspec +36 -0
  500. metadata +578 -0
@@ -0,0 +1,371 @@
1
+ // Copyright 2011 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_BUILTINS_H_
29
+ #define V8_BUILTINS_H_
30
+
31
+ namespace v8 {
32
+ namespace internal {
33
+
34
+ // Specifies extra arguments required by a C++ builtin.
35
+ enum BuiltinExtraArguments {
36
+ NO_EXTRA_ARGUMENTS = 0,
37
+ NEEDS_CALLED_FUNCTION = 1
38
+ };
39
+
40
+
41
+ // Define list of builtins implemented in C++.
42
+ #define BUILTIN_LIST_C(V) \
43
+ V(Illegal, NO_EXTRA_ARGUMENTS) \
44
+ \
45
+ V(EmptyFunction, NO_EXTRA_ARGUMENTS) \
46
+ \
47
+ V(ArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \
48
+ \
49
+ V(ArrayPush, NO_EXTRA_ARGUMENTS) \
50
+ V(ArrayPop, NO_EXTRA_ARGUMENTS) \
51
+ V(ArrayShift, NO_EXTRA_ARGUMENTS) \
52
+ V(ArrayUnshift, NO_EXTRA_ARGUMENTS) \
53
+ V(ArraySlice, NO_EXTRA_ARGUMENTS) \
54
+ V(ArraySplice, NO_EXTRA_ARGUMENTS) \
55
+ V(ArrayConcat, NO_EXTRA_ARGUMENTS) \
56
+ \
57
+ V(HandleApiCall, NEEDS_CALLED_FUNCTION) \
58
+ V(FastHandleApiCall, NO_EXTRA_ARGUMENTS) \
59
+ V(HandleApiCallConstruct, NEEDS_CALLED_FUNCTION) \
60
+ V(HandleApiCallAsFunction, NO_EXTRA_ARGUMENTS) \
61
+ V(HandleApiCallAsConstructor, NO_EXTRA_ARGUMENTS) \
62
+ \
63
+ V(StrictModePoisonPill, NO_EXTRA_ARGUMENTS)
64
+
65
+ // Define list of builtins implemented in assembly.
66
+ #define BUILTIN_LIST_A(V) \
67
+ V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, \
68
+ Code::kNoExtraICState) \
69
+ V(JSConstructCall, BUILTIN, UNINITIALIZED, \
70
+ Code::kNoExtraICState) \
71
+ V(JSConstructStubCountdown, BUILTIN, UNINITIALIZED, \
72
+ Code::kNoExtraICState) \
73
+ V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, \
74
+ Code::kNoExtraICState) \
75
+ V(JSConstructStubApi, BUILTIN, UNINITIALIZED, \
76
+ Code::kNoExtraICState) \
77
+ V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, \
78
+ Code::kNoExtraICState) \
79
+ V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, \
80
+ Code::kNoExtraICState) \
81
+ V(LazyCompile, BUILTIN, UNINITIALIZED, \
82
+ Code::kNoExtraICState) \
83
+ V(LazyRecompile, BUILTIN, UNINITIALIZED, \
84
+ Code::kNoExtraICState) \
85
+ V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, \
86
+ Code::kNoExtraICState) \
87
+ V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, \
88
+ Code::kNoExtraICState) \
89
+ V(NotifyOSR, BUILTIN, UNINITIALIZED, \
90
+ Code::kNoExtraICState) \
91
+ \
92
+ V(LoadIC_Miss, BUILTIN, UNINITIALIZED, \
93
+ Code::kNoExtraICState) \
94
+ V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, \
95
+ Code::kNoExtraICState) \
96
+ V(KeyedLoadIC_MissForceGeneric, BUILTIN, UNINITIALIZED, \
97
+ Code::kNoExtraICState) \
98
+ V(KeyedLoadIC_Slow, BUILTIN, UNINITIALIZED, \
99
+ Code::kNoExtraICState) \
100
+ V(StoreIC_Miss, BUILTIN, UNINITIALIZED, \
101
+ Code::kNoExtraICState) \
102
+ V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, \
103
+ Code::kNoExtraICState) \
104
+ V(KeyedStoreIC_MissForceGeneric, BUILTIN, UNINITIALIZED, \
105
+ Code::kNoExtraICState) \
106
+ V(KeyedStoreIC_Slow, BUILTIN, UNINITIALIZED, \
107
+ Code::kNoExtraICState) \
108
+ V(LoadIC_Initialize, LOAD_IC, UNINITIALIZED, \
109
+ Code::kNoExtraICState) \
110
+ V(LoadIC_PreMonomorphic, LOAD_IC, PREMONOMORPHIC, \
111
+ Code::kNoExtraICState) \
112
+ V(LoadIC_Normal, LOAD_IC, MONOMORPHIC, \
113
+ Code::kNoExtraICState) \
114
+ V(LoadIC_ArrayLength, LOAD_IC, MONOMORPHIC, \
115
+ Code::kNoExtraICState) \
116
+ V(LoadIC_StringLength, LOAD_IC, MONOMORPHIC, \
117
+ Code::kNoExtraICState) \
118
+ V(LoadIC_StringWrapperLength, LOAD_IC, MONOMORPHIC, \
119
+ Code::kNoExtraICState) \
120
+ V(LoadIC_FunctionPrototype, LOAD_IC, MONOMORPHIC, \
121
+ Code::kNoExtraICState) \
122
+ V(LoadIC_Megamorphic, LOAD_IC, MEGAMORPHIC, \
123
+ Code::kNoExtraICState) \
124
+ \
125
+ V(KeyedLoadIC_Initialize, KEYED_LOAD_IC, UNINITIALIZED, \
126
+ Code::kNoExtraICState) \
127
+ V(KeyedLoadIC_PreMonomorphic, KEYED_LOAD_IC, PREMONOMORPHIC, \
128
+ Code::kNoExtraICState) \
129
+ V(KeyedLoadIC_Generic, KEYED_LOAD_IC, MEGAMORPHIC, \
130
+ Code::kNoExtraICState) \
131
+ V(KeyedLoadIC_String, KEYED_LOAD_IC, MEGAMORPHIC, \
132
+ Code::kNoExtraICState) \
133
+ V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MEGAMORPHIC, \
134
+ Code::kNoExtraICState) \
135
+ \
136
+ V(StoreIC_Initialize, STORE_IC, UNINITIALIZED, \
137
+ Code::kNoExtraICState) \
138
+ V(StoreIC_ArrayLength, STORE_IC, MONOMORPHIC, \
139
+ Code::kNoExtraICState) \
140
+ V(StoreIC_Normal, STORE_IC, MONOMORPHIC, \
141
+ Code::kNoExtraICState) \
142
+ V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC, \
143
+ Code::kNoExtraICState) \
144
+ V(StoreIC_GlobalProxy, STORE_IC, MEGAMORPHIC, \
145
+ Code::kNoExtraICState) \
146
+ V(StoreIC_Initialize_Strict, STORE_IC, UNINITIALIZED, \
147
+ kStrictMode) \
148
+ V(StoreIC_ArrayLength_Strict, STORE_IC, MONOMORPHIC, \
149
+ kStrictMode) \
150
+ V(StoreIC_Normal_Strict, STORE_IC, MONOMORPHIC, \
151
+ kStrictMode) \
152
+ V(StoreIC_Megamorphic_Strict, STORE_IC, MEGAMORPHIC, \
153
+ kStrictMode) \
154
+ V(StoreIC_GlobalProxy_Strict, STORE_IC, MEGAMORPHIC, \
155
+ kStrictMode) \
156
+ \
157
+ V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED, \
158
+ Code::kNoExtraICState) \
159
+ V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC, \
160
+ Code::kNoExtraICState) \
161
+ \
162
+ V(KeyedStoreIC_Initialize_Strict, KEYED_STORE_IC, UNINITIALIZED, \
163
+ kStrictMode) \
164
+ V(KeyedStoreIC_Generic_Strict, KEYED_STORE_IC, MEGAMORPHIC, \
165
+ kStrictMode) \
166
+ \
167
+ /* Uses KeyedLoadIC_Initialize; must be after in list. */ \
168
+ V(FunctionCall, BUILTIN, UNINITIALIZED, \
169
+ Code::kNoExtraICState) \
170
+ V(FunctionApply, BUILTIN, UNINITIALIZED, \
171
+ Code::kNoExtraICState) \
172
+ \
173
+ V(ArrayCode, BUILTIN, UNINITIALIZED, \
174
+ Code::kNoExtraICState) \
175
+ V(ArrayConstructCode, BUILTIN, UNINITIALIZED, \
176
+ Code::kNoExtraICState) \
177
+ \
178
+ V(StringConstructCode, BUILTIN, UNINITIALIZED, \
179
+ Code::kNoExtraICState) \
180
+ \
181
+ V(OnStackReplacement, BUILTIN, UNINITIALIZED, \
182
+ Code::kNoExtraICState)
183
+
184
+
185
+ #ifdef ENABLE_DEBUGGER_SUPPORT
186
+ // Define list of builtins used by the debugger implemented in assembly.
187
+ #define BUILTIN_LIST_DEBUG_A(V) \
188
+ V(Return_DebugBreak, BUILTIN, DEBUG_BREAK, \
189
+ Code::kNoExtraICState) \
190
+ V(ConstructCall_DebugBreak, BUILTIN, DEBUG_BREAK, \
191
+ Code::kNoExtraICState) \
192
+ V(StubNoRegisters_DebugBreak, BUILTIN, DEBUG_BREAK, \
193
+ Code::kNoExtraICState) \
194
+ V(LoadIC_DebugBreak, LOAD_IC, DEBUG_BREAK, \
195
+ Code::kNoExtraICState) \
196
+ V(KeyedLoadIC_DebugBreak, KEYED_LOAD_IC, DEBUG_BREAK, \
197
+ Code::kNoExtraICState) \
198
+ V(StoreIC_DebugBreak, STORE_IC, DEBUG_BREAK, \
199
+ Code::kNoExtraICState) \
200
+ V(KeyedStoreIC_DebugBreak, KEYED_STORE_IC, DEBUG_BREAK, \
201
+ Code::kNoExtraICState) \
202
+ V(Slot_DebugBreak, BUILTIN, DEBUG_BREAK, \
203
+ Code::kNoExtraICState) \
204
+ V(PlainReturn_LiveEdit, BUILTIN, DEBUG_BREAK, \
205
+ Code::kNoExtraICState) \
206
+ V(FrameDropper_LiveEdit, BUILTIN, DEBUG_BREAK, \
207
+ Code::kNoExtraICState)
208
+ #else
209
+ #define BUILTIN_LIST_DEBUG_A(V)
210
+ #endif
211
+
212
+ // Define list of builtins implemented in JavaScript.
213
+ #define BUILTINS_LIST_JS(V) \
214
+ V(EQUALS, 1) \
215
+ V(STRICT_EQUALS, 1) \
216
+ V(COMPARE, 2) \
217
+ V(ADD, 1) \
218
+ V(SUB, 1) \
219
+ V(MUL, 1) \
220
+ V(DIV, 1) \
221
+ V(MOD, 1) \
222
+ V(BIT_OR, 1) \
223
+ V(BIT_AND, 1) \
224
+ V(BIT_XOR, 1) \
225
+ V(UNARY_MINUS, 0) \
226
+ V(BIT_NOT, 0) \
227
+ V(SHL, 1) \
228
+ V(SAR, 1) \
229
+ V(SHR, 1) \
230
+ V(DELETE, 2) \
231
+ V(IN, 1) \
232
+ V(INSTANCE_OF, 1) \
233
+ V(GET_KEYS, 0) \
234
+ V(FILTER_KEY, 1) \
235
+ V(CALL_NON_FUNCTION, 0) \
236
+ V(CALL_NON_FUNCTION_AS_CONSTRUCTOR, 0) \
237
+ V(TO_OBJECT, 0) \
238
+ V(TO_NUMBER, 0) \
239
+ V(TO_STRING, 0) \
240
+ V(STRING_ADD_LEFT, 1) \
241
+ V(STRING_ADD_RIGHT, 1) \
242
+ V(APPLY_PREPARE, 1) \
243
+ V(APPLY_OVERFLOW, 1)
244
+
245
+
246
+ class BuiltinFunctionTable;
247
+ class ObjectVisitor;
248
+
249
+
250
+ class Builtins {
251
+ public:
252
+ ~Builtins();
253
+
254
+ // Generate all builtin code objects. Should be called once during
255
+ // isolate initialization.
256
+ void Setup(bool create_heap_objects);
257
+ void TearDown();
258
+
259
+ // Garbage collection support.
260
+ void IterateBuiltins(ObjectVisitor* v);
261
+
262
+ // Disassembler support.
263
+ const char* Lookup(byte* pc);
264
+
265
+ enum Name {
266
+ #define DEF_ENUM_C(name, ignore) k##name,
267
+ #define DEF_ENUM_A(name, kind, state, extra) k##name,
268
+ BUILTIN_LIST_C(DEF_ENUM_C)
269
+ BUILTIN_LIST_A(DEF_ENUM_A)
270
+ BUILTIN_LIST_DEBUG_A(DEF_ENUM_A)
271
+ #undef DEF_ENUM_C
272
+ #undef DEF_ENUM_A
273
+ builtin_count
274
+ };
275
+
276
+ enum CFunctionId {
277
+ #define DEF_ENUM_C(name, ignore) c_##name,
278
+ BUILTIN_LIST_C(DEF_ENUM_C)
279
+ #undef DEF_ENUM_C
280
+ cfunction_count
281
+ };
282
+
283
+ enum JavaScript {
284
+ #define DEF_ENUM(name, ignore) name,
285
+ BUILTINS_LIST_JS(DEF_ENUM)
286
+ #undef DEF_ENUM
287
+ id_count
288
+ };
289
+
290
+ #define DECLARE_BUILTIN_ACCESSOR_C(name, ignore) Handle<Code> name();
291
+ #define DECLARE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \
292
+ Handle<Code> name();
293
+ BUILTIN_LIST_C(DECLARE_BUILTIN_ACCESSOR_C)
294
+ BUILTIN_LIST_A(DECLARE_BUILTIN_ACCESSOR_A)
295
+ BUILTIN_LIST_DEBUG_A(DECLARE_BUILTIN_ACCESSOR_A)
296
+ #undef DECLARE_BUILTIN_ACCESSOR_C
297
+ #undef DECLARE_BUILTIN_ACCESSOR_A
298
+
299
+ Code* builtin(Name name) {
300
+ // Code::cast cannot be used here since we access builtins
301
+ // during the marking phase of mark sweep. See IC::Clear.
302
+ return reinterpret_cast<Code*>(builtins_[name]);
303
+ }
304
+
305
+ Address builtin_address(Name name) {
306
+ return reinterpret_cast<Address>(&builtins_[name]);
307
+ }
308
+
309
+ static Address c_function_address(CFunctionId id) {
310
+ return c_functions_[id];
311
+ }
312
+
313
+ static const char* GetName(JavaScript id) { return javascript_names_[id]; }
314
+ static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; }
315
+ Handle<Code> GetCode(JavaScript id, bool* resolved);
316
+ static int NumberOfJavaScriptBuiltins() { return id_count; }
317
+
318
+ bool is_initialized() const { return initialized_; }
319
+
320
+ private:
321
+ Builtins();
322
+
323
+ // The external C++ functions called from the code.
324
+ static Address const c_functions_[cfunction_count];
325
+
326
+ // Note: These are always Code objects, but to conform with
327
+ // IterateBuiltins() above which assumes Object**'s for the callback
328
+ // function f, we use an Object* array here.
329
+ Object* builtins_[builtin_count];
330
+ const char* names_[builtin_count];
331
+ static const char* const javascript_names_[id_count];
332
+ static int const javascript_argc_[id_count];
333
+
334
+ static void Generate_Adaptor(MacroAssembler* masm,
335
+ CFunctionId id,
336
+ BuiltinExtraArguments extra_args);
337
+ static void Generate_JSConstructCall(MacroAssembler* masm);
338
+ static void Generate_JSConstructStubCountdown(MacroAssembler* masm);
339
+ static void Generate_JSConstructStubGeneric(MacroAssembler* masm);
340
+ static void Generate_JSConstructStubApi(MacroAssembler* masm);
341
+ static void Generate_JSEntryTrampoline(MacroAssembler* masm);
342
+ static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm);
343
+ static void Generate_LazyCompile(MacroAssembler* masm);
344
+ static void Generate_LazyRecompile(MacroAssembler* masm);
345
+ static void Generate_NotifyDeoptimized(MacroAssembler* masm);
346
+ static void Generate_NotifyLazyDeoptimized(MacroAssembler* masm);
347
+ static void Generate_NotifyOSR(MacroAssembler* masm);
348
+ static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm);
349
+
350
+ static void Generate_FunctionCall(MacroAssembler* masm);
351
+ static void Generate_FunctionApply(MacroAssembler* masm);
352
+
353
+ static void Generate_ArrayCode(MacroAssembler* masm);
354
+ static void Generate_ArrayConstructCode(MacroAssembler* masm);
355
+
356
+ static void Generate_StringConstructCode(MacroAssembler* masm);
357
+ static void Generate_OnStackReplacement(MacroAssembler* masm);
358
+
359
+ static void InitBuiltinFunctionTable();
360
+
361
+ bool initialized_;
362
+
363
+ friend class BuiltinFunctionTable;
364
+ friend class Isolate;
365
+
366
+ DISALLOW_COPY_AND_ASSIGN(Builtins);
367
+ };
368
+
369
+ } } // namespace v8::internal
370
+
371
+ #endif // V8_BUILTINS_H_
@@ -0,0 +1,105 @@
1
+ // Copyright 2008-2009 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
+
29
+ #ifndef V8_BYTECODES_IRREGEXP_H_
30
+ #define V8_BYTECODES_IRREGEXP_H_
31
+
32
+ namespace v8 {
33
+ namespace internal {
34
+
35
+
36
+ static const int BYTECODE_MASK = 0xff;
37
+ // The first argument is packed in with the byte code in one word, but so it
38
+ // has 24 bits, but it can be positive and negative so only use 23 bits for
39
+ // positive values.
40
+ static const unsigned int MAX_FIRST_ARG = 0x7fffffu;
41
+ static const int BYTECODE_SHIFT = 8;
42
+
43
+ #define BYTECODE_ITERATOR(V) \
44
+ V(BREAK, 0, 4) /* bc8 */ \
45
+ V(PUSH_CP, 1, 4) /* bc8 pad24 */ \
46
+ V(PUSH_BT, 2, 8) /* bc8 pad24 offset32 */ \
47
+ V(PUSH_REGISTER, 3, 4) /* bc8 reg_idx24 */ \
48
+ V(SET_REGISTER_TO_CP, 4, 8) /* bc8 reg_idx24 offset32 */ \
49
+ V(SET_CP_TO_REGISTER, 5, 4) /* bc8 reg_idx24 */ \
50
+ V(SET_REGISTER_TO_SP, 6, 4) /* bc8 reg_idx24 */ \
51
+ V(SET_SP_TO_REGISTER, 7, 4) /* bc8 reg_idx24 */ \
52
+ V(SET_REGISTER, 8, 8) /* bc8 reg_idx24 value32 */ \
53
+ V(ADVANCE_REGISTER, 9, 8) /* bc8 reg_idx24 value32 */ \
54
+ V(POP_CP, 10, 4) /* bc8 pad24 */ \
55
+ V(POP_BT, 11, 4) /* bc8 pad24 */ \
56
+ V(POP_REGISTER, 12, 4) /* bc8 reg_idx24 */ \
57
+ V(FAIL, 13, 4) /* bc8 pad24 */ \
58
+ V(SUCCEED, 14, 4) /* bc8 pad24 */ \
59
+ V(ADVANCE_CP, 15, 4) /* bc8 offset24 */ \
60
+ V(GOTO, 16, 8) /* bc8 pad24 addr32 */ \
61
+ V(LOAD_CURRENT_CHAR, 17, 8) /* bc8 offset24 addr32 */ \
62
+ V(LOAD_CURRENT_CHAR_UNCHECKED, 18, 4) /* bc8 offset24 */ \
63
+ V(LOAD_2_CURRENT_CHARS, 19, 8) /* bc8 offset24 addr32 */ \
64
+ V(LOAD_2_CURRENT_CHARS_UNCHECKED, 20, 4) /* bc8 offset24 */ \
65
+ V(LOAD_4_CURRENT_CHARS, 21, 8) /* bc8 offset24 addr32 */ \
66
+ V(LOAD_4_CURRENT_CHARS_UNCHECKED, 22, 4) /* bc8 offset24 */ \
67
+ V(CHECK_4_CHARS, 23, 12) /* bc8 pad24 uint32 addr32 */ \
68
+ V(CHECK_CHAR, 24, 8) /* bc8 pad8 uint16 addr32 */ \
69
+ V(CHECK_NOT_4_CHARS, 25, 12) /* bc8 pad24 uint32 addr32 */ \
70
+ V(CHECK_NOT_CHAR, 26, 8) /* bc8 pad8 uint16 addr32 */ \
71
+ V(AND_CHECK_4_CHARS, 27, 16) /* bc8 pad24 uint32 uint32 addr32 */ \
72
+ V(AND_CHECK_CHAR, 28, 12) /* bc8 pad8 uint16 uint32 addr32 */ \
73
+ V(AND_CHECK_NOT_4_CHARS, 29, 16) /* bc8 pad24 uint32 uint32 addr32 */ \
74
+ V(AND_CHECK_NOT_CHAR, 30, 12) /* bc8 pad8 uint16 uint32 addr32 */ \
75
+ V(MINUS_AND_CHECK_NOT_CHAR, 31, 12) /* bc8 pad8 uc16 uc16 addr32 */ \
76
+ V(CHECK_LT, 32, 8) /* bc8 pad8 uc16 addr32 */ \
77
+ V(CHECK_GT, 33, 8) /* bc8 pad8 uc16 addr32 */ \
78
+ V(CHECK_NOT_BACK_REF, 34, 8) /* bc8 reg_idx24 addr32 */ \
79
+ V(CHECK_NOT_BACK_REF_NO_CASE, 35, 8) /* bc8 reg_idx24 addr32 */ \
80
+ V(CHECK_NOT_REGS_EQUAL, 36, 12) /* bc8 regidx24 reg_idx32 addr32 */ \
81
+ V(LOOKUP_MAP1, 37, 12) /* bc8 pad8 start16 bit_map_addr32 addr32 */ \
82
+ V(LOOKUP_MAP2, 38, 96) /* bc8 pad8 start16 half_nibble_map_addr32* */ \
83
+ V(LOOKUP_MAP8, 39, 96) /* bc8 pad8 start16 byte_map addr32* */ \
84
+ V(LOOKUP_HI_MAP8, 40, 96) /* bc8 start24 byte_map_addr32 addr32* */ \
85
+ V(CHECK_REGISTER_LT, 41, 12) /* bc8 reg_idx24 value32 addr32 */ \
86
+ V(CHECK_REGISTER_GE, 42, 12) /* bc8 reg_idx24 value32 addr32 */ \
87
+ V(CHECK_REGISTER_EQ_POS, 43, 8) /* bc8 reg_idx24 addr32 */ \
88
+ V(CHECK_AT_START, 44, 8) /* bc8 pad24 addr32 */ \
89
+ V(CHECK_NOT_AT_START, 45, 8) /* bc8 pad24 addr32 */ \
90
+ V(CHECK_GREEDY, 46, 8) /* bc8 pad24 addr32 */ \
91
+ V(ADVANCE_CP_AND_GOTO, 47, 8) /* bc8 offset24 addr32 */ \
92
+ V(SET_CURRENT_POSITION_FROM_END, 48, 4) /* bc8 idx24 */
93
+
94
+ #define DECLARE_BYTECODES(name, code, length) \
95
+ static const int BC_##name = code;
96
+ BYTECODE_ITERATOR(DECLARE_BYTECODES)
97
+ #undef DECLARE_BYTECODES
98
+
99
+ #define DECLARE_BYTECODE_LENGTH(name, code, length) \
100
+ static const int BC_##name##_LENGTH = length;
101
+ BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH)
102
+ #undef DECLARE_BYTECODE_LENGTH
103
+ } }
104
+
105
+ #endif // V8_BYTECODES_IRREGEXP_H_