therubyracer 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of therubyracer might be problematic. Click here for more details.

Files changed (482) hide show
  1. data/History.txt +11 -0
  2. data/Rakefile +1 -1
  3. data/ext/v8/extconf.rb +0 -18
  4. data/ext/v8/rr.cpp +2 -2
  5. data/ext/v8/upstream/{2.1.10 → 2.3.3}/AUTHORS +1 -0
  6. data/ext/v8/upstream/{2.1.10 → 2.3.3}/ChangeLog +239 -0
  7. data/ext/v8/upstream/{2.1.10 → 2.3.3}/LICENSE +0 -0
  8. data/ext/v8/upstream/{2.1.10 → 2.3.3}/SConstruct +29 -17
  9. data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8-debug.h +61 -3
  10. data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8-profiler.h +182 -5
  11. data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8.h +458 -257
  12. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/SConscript +2 -5
  13. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/accessors.cc +2 -2
  14. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/accessors.h +0 -0
  15. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/allocation.cc +0 -0
  16. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/allocation.h +0 -0
  17. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/api.cc +574 -30
  18. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/api.h +12 -10
  19. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/apinatives.js +0 -0
  20. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/apiutils.h +0 -0
  21. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arguments.h +0 -0
  22. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm-inl.h +38 -15
  23. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm.cc +646 -101
  24. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm.h +174 -15
  25. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/builtins-arm.cc +56 -47
  26. data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +48 -0
  27. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/codegen-arm.cc +2957 -1448
  28. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/codegen-arm.h +230 -74
  29. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/constants-arm.cc +25 -1
  30. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/constants-arm.h +16 -1
  31. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/cpu-arm.cc +4 -0
  32. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/debug-arm.cc +76 -6
  33. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/disasm-arm.cc +168 -20
  34. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/fast-codegen-arm.cc +5 -2
  35. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/frames-arm.cc +4 -4
  36. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/frames-arm.h +0 -0
  37. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/full-codegen-arm.cc +1558 -248
  38. data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +2258 -0
  39. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/jump-target-arm.cc +55 -103
  40. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/macro-assembler-arm.cc +358 -185
  41. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/macro-assembler-arm.h +136 -41
  42. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/regexp-macro-assembler-arm.cc +26 -5
  43. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/regexp-macro-assembler-arm.h +0 -0
  44. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm-inl.h +0 -0
  45. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm.cc +4 -0
  46. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm.h +0 -0
  47. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/simulator-arm.cc +203 -22
  48. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/simulator-arm.h +7 -0
  49. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/stub-cache-arm.cc +531 -324
  50. data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm-inl.h +59 -0
  51. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/virtual-frame-arm.cc +247 -81
  52. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/virtual-frame-arm.h +99 -83
  53. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/array.js +2 -2
  54. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/assembler.cc +6 -13
  55. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/assembler.h +36 -10
  56. data/ext/v8/upstream/2.3.3/src/ast-inl.h +81 -0
  57. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ast.cc +14 -0
  58. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ast.h +20 -35
  59. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bootstrapper.cc +32 -1
  60. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bootstrapper.h +0 -4
  61. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/builtins.cc +50 -33
  62. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/builtins.h +2 -0
  63. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bytecodes-irregexp.h +0 -0
  64. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cached-powers.h +0 -0
  65. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/char-predicates-inl.h +0 -0
  66. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/char-predicates.h +0 -0
  67. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/checks.cc +0 -0
  68. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/checks.h +8 -6
  69. data/ext/v8/upstream/2.3.3/src/circular-queue-inl.h +53 -0
  70. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/circular-queue.cc +0 -0
  71. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/circular-queue.h +0 -26
  72. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code-stubs.cc +2 -4
  73. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code-stubs.h +1 -0
  74. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code.h +0 -0
  75. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen-inl.h +0 -0
  76. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen.cc +44 -13
  77. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen.h +310 -31
  78. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compilation-cache.cc +28 -0
  79. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compilation-cache.h +3 -0
  80. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compiler.cc +45 -14
  81. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compiler.h +0 -0
  82. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/contexts.cc +11 -11
  83. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/contexts.h +0 -0
  84. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions-inl.h +0 -0
  85. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions.cc +25 -11
  86. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions.h +0 -0
  87. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/counters.cc +0 -0
  88. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/counters.h +0 -0
  89. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler-inl.h +2 -1
  90. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler.cc +68 -24
  91. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler.h +19 -11
  92. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu.h +0 -0
  93. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-debug.cc +0 -0
  94. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-debug.h +0 -0
  95. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-posix.cc +0 -0
  96. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-readline.cc +0 -0
  97. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-windows.cc +0 -0
  98. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.cc +3 -0
  99. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.h +0 -0
  100. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.js +55 -2
  101. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/data-flow.cc +3 -0
  102. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/data-flow.h +0 -0
  103. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/date.js +68 -137
  104. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser-inl.h +0 -0
  105. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser.cc +2 -8
  106. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser.h +0 -0
  107. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-agent.cc +3 -3
  108. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-agent.h +0 -0
  109. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-debugger.js +81 -23
  110. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug.cc +275 -81
  111. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug.h +85 -6
  112. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disasm.h +0 -0
  113. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disassembler.cc +1 -1
  114. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disassembler.h +0 -0
  115. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/diy-fp.cc +0 -0
  116. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/diy-fp.h +0 -0
  117. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/double.h +0 -0
  118. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dtoa-config.c +0 -0
  119. data/ext/v8/upstream/2.3.3/src/dtoa.cc +77 -0
  120. data/ext/v8/upstream/2.3.3/src/dtoa.h +81 -0
  121. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/execution.cc +111 -3
  122. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/execution.h +12 -1
  123. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/factory.cc +25 -3
  124. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/factory.h +16 -9
  125. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-codegen.cc +0 -0
  126. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-codegen.h +0 -0
  127. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-dtoa.cc +2 -9
  128. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-dtoa.h +1 -2
  129. data/ext/v8/upstream/2.3.3/src/fixed-dtoa.cc +405 -0
  130. data/ext/v8/upstream/{2.1.10/src/jump-target-light.cc → 2.3.3/src/fixed-dtoa.h} +22 -53
  131. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flag-definitions.h +14 -6
  132. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flags.cc +5 -9
  133. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flags.h +0 -0
  134. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flow-graph.cc +0 -0
  135. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flow-graph.h +0 -0
  136. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frame-element.cc +0 -0
  137. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frame-element.h +0 -0
  138. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames-inl.h +0 -0
  139. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames.cc +5 -2
  140. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames.h +1 -0
  141. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/full-codegen.cc +387 -20
  142. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/full-codegen.h +102 -5
  143. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/func-name-inferrer.cc +0 -0
  144. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/func-name-inferrer.h +0 -0
  145. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/global-handles.cc +8 -4
  146. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/global-handles.h +0 -0
  147. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/globals.h +44 -7
  148. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles-inl.h +0 -0
  149. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles.cc +19 -0
  150. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles.h +8 -0
  151. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/hashmap.cc +0 -0
  152. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/hashmap.h +0 -0
  153. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-inl.h +56 -14
  154. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-profiler.cc +85 -1
  155. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-profiler.h +45 -1
  156. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap.cc +994 -396
  157. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap.h +220 -65
  158. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32-inl.h +41 -12
  159. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32.cc +94 -24
  160. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32.h +32 -4
  161. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/builtins-ia32.cc +42 -30
  162. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32-inl.h +0 -0
  163. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32.cc +1758 -916
  164. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32.h +67 -74
  165. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/cpu-ia32.cc +4 -0
  166. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/debug-ia32.cc +46 -0
  167. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/disasm-ia32.cc +37 -6
  168. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/fast-codegen-ia32.cc +4 -0
  169. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/fast-codegen-ia32.h +0 -0
  170. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/frames-ia32.cc +4 -0
  171. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/frames-ia32.h +0 -0
  172. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/full-codegen-ia32.cc +1465 -198
  173. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/ic-ia32.cc +688 -367
  174. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/jump-target-ia32.cc +4 -0
  175. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/macro-assembler-ia32.cc +82 -180
  176. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/macro-assembler-ia32.h +41 -25
  177. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/regexp-macro-assembler-ia32.cc +68 -24
  178. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/regexp-macro-assembler-ia32.h +1 -2
  179. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32-inl.h +0 -0
  180. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32.cc +4 -0
  181. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32.h +0 -0
  182. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/simulator-ia32.cc +0 -0
  183. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/simulator-ia32.h +0 -0
  184. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/stub-cache-ia32.cc +649 -302
  185. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/virtual-frame-ia32.cc +23 -1
  186. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/virtual-frame-ia32.h +18 -27
  187. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic-inl.h +30 -3
  188. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic.cc +384 -66
  189. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic.h +65 -24
  190. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/interpreter-irregexp.cc +0 -0
  191. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/interpreter-irregexp.h +0 -0
  192. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/json.js +3 -3
  193. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jsregexp.cc +20 -4
  194. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jsregexp.h +0 -0
  195. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-heavy-inl.h +0 -0
  196. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-heavy.cc +79 -13
  197. data/ext/v8/upstream/{2.1.10/src/jump-target.h → 2.3.3/src/jump-target-heavy.h} +5 -47
  198. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-inl.h +0 -0
  199. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-light-inl.h +16 -2
  200. data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +110 -0
  201. data/ext/v8/upstream/2.3.3/src/jump-target-light.h +192 -0
  202. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target.cc +0 -64
  203. data/ext/v8/upstream/2.3.3/src/jump-target.h +90 -0
  204. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/list-inl.h +0 -0
  205. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/list.h +0 -0
  206. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit-debugger.js +141 -28
  207. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit.cc +19 -7
  208. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit.h +0 -0
  209. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-inl.h +0 -0
  210. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-utils.cc +0 -0
  211. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-utils.h +0 -0
  212. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log.cc +12 -11
  213. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log.h +12 -0
  214. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/macro-assembler.h +0 -16
  215. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/macros.py +21 -0
  216. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mark-compact.cc +120 -109
  217. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mark-compact.h +25 -37
  218. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/math.js +0 -0
  219. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/memory.h +0 -0
  220. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.cc +8 -3
  221. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.h +2 -1
  222. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.js +15 -7
  223. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips-inl.h +0 -0
  224. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips.cc +12 -1
  225. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips.h +4 -1
  226. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/builtins-mips.cc +3 -0
  227. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips-inl.h +0 -0
  228. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips.cc +9 -0
  229. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips.h +1 -0
  230. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/constants-mips.cc +5 -0
  231. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/constants-mips.h +0 -0
  232. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/cpu-mips.cc +4 -0
  233. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/debug-mips.cc +3 -0
  234. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/disasm-mips.cc +3 -0
  235. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/fast-codegen-mips.cc +3 -0
  236. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/frames-mips.cc +3 -0
  237. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/frames-mips.h +0 -0
  238. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/full-codegen-mips.cc +5 -1
  239. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/ic-mips.cc +3 -0
  240. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/jump-target-mips.cc +3 -0
  241. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/macro-assembler-mips.cc +3 -0
  242. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/macro-assembler-mips.h +0 -0
  243. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips-inl.h +0 -0
  244. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips.cc +3 -0
  245. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips.h +0 -0
  246. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/simulator-mips.cc +3 -0
  247. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/simulator-mips.h +0 -0
  248. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/stub-cache-mips.cc +3 -0
  249. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/virtual-frame-mips.cc +3 -0
  250. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/virtual-frame-mips.h +0 -0
  251. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mirror-debugger.js +46 -4
  252. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mksnapshot.cc +0 -0
  253. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/natives.h +0 -0
  254. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects-debug.cc +8 -1
  255. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects-inl.h +235 -62
  256. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects.cc +497 -231
  257. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects.h +355 -149
  258. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/oprofile-agent.cc +0 -0
  259. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/oprofile-agent.h +0 -0
  260. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/parser.cc +31 -6
  261. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/parser.h +1 -1
  262. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-freebsd.cc +9 -6
  263. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-linux.cc +26 -6
  264. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-macos.cc +11 -6
  265. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-nullos.cc +0 -0
  266. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-openbsd.cc +6 -0
  267. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-posix.cc +0 -0
  268. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-solaris.cc +69 -23
  269. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-win32.cc +15 -11
  270. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform.h +10 -6
  271. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/powers-ten.h +0 -0
  272. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/prettyprinter.cc +0 -0
  273. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/prettyprinter.h +0 -0
  274. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/profile-generator-inl.h +26 -2
  275. data/ext/v8/upstream/2.3.3/src/profile-generator.cc +1830 -0
  276. data/ext/v8/upstream/2.3.3/src/profile-generator.h +853 -0
  277. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/property.cc +0 -0
  278. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/property.h +0 -0
  279. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
  280. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp.cc +0 -0
  281. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp.h +0 -0
  282. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-tracer.cc +0 -0
  283. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-tracer.h +0 -0
  284. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler.cc +1 -3
  285. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler.h +0 -0
  286. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-stack.cc +0 -0
  287. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-stack.h +0 -0
  288. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp.js +25 -4
  289. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator-inl.h +0 -0
  290. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator.cc +4 -3
  291. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator.h +0 -0
  292. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/rewriter.cc +85 -8
  293. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/rewriter.h +0 -0
  294. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.cc +547 -221
  295. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.h +5 -1
  296. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.js +23 -31
  297. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scanner.cc +12 -6
  298. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scanner.h +60 -53
  299. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopeinfo.cc +156 -168
  300. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopeinfo.h +58 -62
  301. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopes.cc +0 -0
  302. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopes.h +0 -0
  303. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/serialize.cc +320 -242
  304. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/serialize.h +81 -48
  305. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/shell.h +0 -0
  306. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/simulator.h +0 -0
  307. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/smart-pointer.h +0 -0
  308. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot-common.cc +0 -0
  309. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot-empty.cc +0 -0
  310. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot.h +0 -0
  311. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces-inl.h +177 -74
  312. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces.cc +138 -315
  313. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces.h +155 -124
  314. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/splay-tree-inl.h +0 -0
  315. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/splay-tree.h +0 -0
  316. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string-stream.cc +0 -0
  317. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string-stream.h +0 -0
  318. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string.js +113 -119
  319. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/stub-cache.cc +242 -97
  320. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/stub-cache.h +118 -55
  321. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/dtoa/COPYING +0 -0
  322. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/dtoa/dtoa.c +4 -0
  323. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/valgrind/valgrind.h +0 -0
  324. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/token.cc +0 -0
  325. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/token.h +0 -0
  326. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/top.cc +107 -26
  327. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/top.h +9 -4
  328. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/type-info.cc +0 -0
  329. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/type-info.h +2 -2
  330. data/ext/v8/upstream/2.3.3/src/unbound-queue-inl.h +95 -0
  331. data/ext/v8/upstream/2.3.3/src/unbound-queue.h +67 -0
  332. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode-inl.h +0 -0
  333. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode.cc +0 -0
  334. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode.h +0 -0
  335. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/uri.js +0 -0
  336. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/utils.cc +0 -0
  337. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/utils.h +83 -1
  338. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8-counters.cc +0 -0
  339. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8-counters.h +20 -0
  340. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8.cc +5 -1
  341. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8.h +0 -0
  342. data/ext/v8/upstream/2.3.3/src/v8dll-main.cc +39 -0
  343. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8natives.js +210 -33
  344. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8threads.cc +1 -1
  345. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8threads.h +1 -1
  346. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/variables.cc +0 -0
  347. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/variables.h +0 -0
  348. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/version.cc +3 -3
  349. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/version.h +0 -0
  350. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-heavy-inl.h +40 -0
  351. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-heavy.cc +0 -0
  352. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-inl.h +0 -0
  353. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-light-inl.h +106 -5
  354. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-light.cc +4 -1
  355. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame.cc +0 -0
  356. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame.h +0 -0
  357. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state-inl.h +6 -3
  358. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state.cc +1 -1
  359. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state.h +6 -4
  360. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64-inl.h +42 -5
  361. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64.cc +285 -53
  362. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64.h +54 -18
  363. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/builtins-x64.cc +31 -33
  364. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64-inl.h +0 -0
  365. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64.cc +9787 -8722
  366. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64.h +82 -47
  367. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/cpu-x64.cc +4 -0
  368. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/debug-x64.cc +55 -6
  369. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/disasm-x64.cc +42 -19
  370. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/fast-codegen-x64.cc +4 -0
  371. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/frames-x64.cc +4 -0
  372. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/frames-x64.h +4 -0
  373. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/full-codegen-x64.cc +1487 -210
  374. data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +1907 -0
  375. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/jump-target-x64.cc +4 -0
  376. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/macro-assembler-x64.cc +366 -338
  377. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/macro-assembler-x64.h +83 -38
  378. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/regexp-macro-assembler-x64.cc +82 -23
  379. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/regexp-macro-assembler-x64.h +1 -2
  380. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64-inl.h +6 -5
  381. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64.cc +4 -0
  382. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64.h +1 -1
  383. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/simulator-x64.cc +0 -0
  384. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/simulator-x64.h +0 -0
  385. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/stub-cache-x64.cc +556 -377
  386. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/virtual-frame-x64.cc +197 -98
  387. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/virtual-frame-x64.h +37 -28
  388. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone-inl.h +0 -0
  389. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone.cc +0 -0
  390. data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone.h +0 -0
  391. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/codemap.js +0 -0
  392. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/consarray.js +0 -0
  393. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/csvparser.js +0 -0
  394. data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +317 -0
  395. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/generate-ten-powers.scm +0 -0
  396. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/gyp/v8.gyp +87 -20
  397. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/js2c.py +19 -15
  398. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/jsmin.py +0 -0
  399. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/linux-tick-processor +0 -0
  400. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/linux-tick-processor.py +0 -0
  401. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/logreader.js +0 -0
  402. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/mac-nm +0 -0
  403. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/mac-tick-processor +0 -0
  404. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/annotate +0 -0
  405. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/common +0 -0
  406. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/dump +0 -0
  407. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/report +0 -0
  408. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/reset +0 -0
  409. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/run +0 -0
  410. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/shutdown +0 -0
  411. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/start +0 -0
  412. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/presubmit.py +0 -0
  413. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/process-heap-prof.py +0 -0
  414. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/profile.js +0 -0
  415. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/profile_view.js +0 -0
  416. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/run-valgrind.py +0 -0
  417. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/splaytree.js +0 -0
  418. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/splaytree.py +0 -0
  419. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/stats-viewer.py +25 -13
  420. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/test.py +0 -0
  421. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor-driver.js +0 -0
  422. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor.js +0 -0
  423. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor.py +0 -0
  424. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/utils.py +0 -0
  425. data/ext/v8/upstream/2.3.3/tools/v8.xcodeproj/project.pbxproj +1855 -0
  426. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/README.txt +0 -0
  427. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/arm.vsprops +0 -0
  428. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/common.vsprops +0 -0
  429. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8.vcproj +0 -0
  430. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8_arm.vcproj +0 -0
  431. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8_x64.vcproj +0 -0
  432. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8js2c.cmd +0 -0
  433. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/debug.vsprops +0 -0
  434. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/ia32.vsprops +0 -0
  435. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/js2c.cmd +0 -0
  436. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/release.vsprops +0 -0
  437. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8.sln +0 -0
  438. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8.vcproj +0 -0
  439. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_arm.sln +0 -0
  440. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_arm.vcproj +0 -0
  441. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base.vcproj +40 -0
  442. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base_arm.vcproj +20 -0
  443. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base_x64.vcproj +16 -0
  444. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest.vcproj +4 -0
  445. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
  446. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
  447. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
  448. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
  449. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample.vcproj +0 -0
  450. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
  451. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
  452. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample.vcproj +0 -0
  453. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -0
  454. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -0
  455. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot.vcproj +0 -0
  456. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
  457. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
  458. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
  459. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_x64.sln +0 -0
  460. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_x64.vcproj +0 -0
  461. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/x64.vsprops +0 -0
  462. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/windows-tick-processor.bat +0 -0
  463. data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/windows-tick-processor.py +0 -0
  464. data/ext/v8/upstream/Makefile +1 -1
  465. data/ext/v8/v8_template.cpp +94 -2
  466. data/ext/v8/v8_try_catch.cpp +2 -2
  467. data/lib/v8.rb +1 -1
  468. data/lib/v8/access.rb +93 -40
  469. data/lib/v8/cli.rb +1 -1
  470. data/lib/v8/function.rb +14 -2
  471. data/spec/redjs/jsapi_spec.rb +231 -42
  472. data/therubyracer.gemspec +3 -3
  473. metadata +463 -453
  474. data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2-inl.h +0 -263
  475. data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2.cc +0 -1878
  476. data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2.h +0 -1036
  477. data/ext/v8/upstream/2.1.10/src/arm/codegen-arm-inl.h +0 -72
  478. data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +0 -1833
  479. data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +0 -101
  480. data/ext/v8/upstream/2.1.10/src/profile-generator.cc +0 -583
  481. data/ext/v8/upstream/2.1.10/src/profile-generator.h +0 -364
  482. data/ext/v8/upstream/2.1.10/src/x64/ic-x64.cc +0 -1621
@@ -72,6 +72,7 @@ namespace internal {
72
72
  F(GetOwnProperty, 2, 1) \
73
73
  \
74
74
  F(IsExtensible, 1, 1) \
75
+ F(PreventExtensions, 1, 1)\
75
76
  \
76
77
  /* Utilities */ \
77
78
  F(GetFunctionDelegate, 1, 1) \
@@ -102,6 +103,7 @@ namespace internal {
102
103
  F(NumberToString, 1, 1) \
103
104
  F(NumberToStringSkipCache, 1, 1) \
104
105
  F(NumberToInteger, 1, 1) \
106
+ F(NumberToIntegerMapMinusZero, 1, 1) \
105
107
  F(NumberToJSUint32, 1, 1) \
106
108
  F(NumberToJSInt32, 1, 1) \
107
109
  F(NumberToSmi, 1, 1) \
@@ -113,6 +115,7 @@ namespace internal {
113
115
  F(NumberDiv, 2, 1) \
114
116
  F(NumberMod, 2, 1) \
115
117
  F(NumberUnaryMinus, 1, 1) \
118
+ F(NumberAlloc, 0, 1) \
116
119
  \
117
120
  F(StringAdd, 2, 1) \
118
121
  F(StringBuilderConcat, 3, 1) \
@@ -161,7 +164,6 @@ namespace internal {
161
164
  \
162
165
  /* Strings */ \
163
166
  F(StringCharCodeAt, 2, 1) \
164
- F(StringCharAt, 2, 1) \
165
167
  F(StringIndexOf, 3, 1) \
166
168
  F(StringLastIndexOf, 3, 1) \
167
169
  F(StringLocaleCompare, 2, 1) \
@@ -222,6 +224,7 @@ namespace internal {
222
224
  /* Eval */ \
223
225
  F(GlobalReceiver, 1, 1) \
224
226
  F(ResolvePossiblyDirectEval, 3, 2) \
227
+ F(ResolvePossiblyDirectEvalNoLookup, 3, 2) \
225
228
  \
226
229
  F(SetProperty, -1 /* 3 or 4 */, 1) \
227
230
  F(DefineOrRedefineDataProperty, 4, 1) \
@@ -255,6 +258,7 @@ namespace internal {
255
258
  /* Statements */ \
256
259
  F(NewClosure, 2, 1) \
257
260
  F(NewObject, 1, 1) \
261
+ F(NewObjectFromBound, 2, 1) \
258
262
  F(Throw, 1, 1) \
259
263
  F(ReThrow, 1, 1) \
260
264
  F(ThrowReferenceError, 1, 1) \
@@ -80,10 +80,7 @@ function EQUALS(y) {
80
80
  } else {
81
81
  // x is not a number, boolean, null or undefined.
82
82
  if (y == null) return 1; // not equal
83
- if (IS_OBJECT(y)) {
84
- return %_ObjectEquals(x, y) ? 0 : 1;
85
- }
86
- if (IS_FUNCTION(y)) {
83
+ if (IS_SPEC_OBJECT(y)) {
87
84
  return %_ObjectEquals(x, y) ? 0 : 1;
88
85
  }
89
86
 
@@ -115,7 +112,7 @@ function STRICT_EQUALS(x) {
115
112
  // the result when either (or both) the operands are NaN.
116
113
  function COMPARE(x, ncr) {
117
114
  var left;
118
-
115
+ var right;
119
116
  // Fast cases for string, numbers and undefined compares.
120
117
  if (IS_STRING(this)) {
121
118
  if (IS_STRING(x)) return %_StringCompare(this, x);
@@ -126,14 +123,18 @@ function COMPARE(x, ncr) {
126
123
  if (IS_UNDEFINED(x)) return ncr;
127
124
  left = this;
128
125
  } else if (IS_UNDEFINED(this)) {
126
+ if (!IS_UNDEFINED(x)) {
127
+ %ToPrimitive(x, NUMBER_HINT);
128
+ }
129
+ return ncr;
130
+ } else if (IS_UNDEFINED(x)) {
131
+ %ToPrimitive(this, NUMBER_HINT);
129
132
  return ncr;
130
133
  } else {
131
- if (IS_UNDEFINED(x)) return ncr;
132
134
  left = %ToPrimitive(this, NUMBER_HINT);
133
135
  }
134
136
 
135
- // Default implementation.
136
- var right = %ToPrimitive(x, NUMBER_HINT);
137
+ right = %ToPrimitive(x, NUMBER_HINT);
137
138
  if (IS_STRING(left) && IS_STRING(right)) {
138
139
  return %_StringCompare(left, right);
139
140
  } else {
@@ -344,7 +345,7 @@ function DELETE(key) {
344
345
 
345
346
  // ECMA-262, section 11.8.7, page 54.
346
347
  function IN(x) {
347
- if (x == null || (!IS_OBJECT(x) && !IS_FUNCTION(x))) {
348
+ if (!IS_SPEC_OBJECT(x)) {
348
349
  throw %MakeTypeError('invalid_in_operator_use', [this, x]);
349
350
  }
350
351
  return %_IsNonNegativeSmi(this) ? %HasElement(x, this) : %HasProperty(x, %ToString(this));
@@ -362,13 +363,13 @@ function INSTANCE_OF(F) {
362
363
  }
363
364
 
364
365
  // If V is not an object, return false.
365
- if (IS_NULL(V) || (!IS_OBJECT(V) && !IS_FUNCTION(V))) {
366
+ if (!IS_SPEC_OBJECT(V)) {
366
367
  return 1;
367
368
  }
368
369
 
369
370
  // Get the prototype of F; if it is not an object, throw an error.
370
371
  var O = F.prototype;
371
- if (IS_NULL(O) || (!IS_OBJECT(O) && !IS_FUNCTION(O))) {
372
+ if (!IS_SPEC_OBJECT(O)) {
372
373
  throw %MakeTypeError('instanceof_nonobject_proto', [O]);
373
374
  }
374
375
 
@@ -430,7 +431,7 @@ function APPLY_PREPARE(args) {
430
431
  // big enough, but sanity check the value to avoid overflow when
431
432
  // multiplying with pointer size.
432
433
  if (length > 0x800000) {
433
- throw %MakeRangeError('apply_overflow', [length]);
434
+ throw %MakeRangeError('stack_overflow', []);
434
435
  }
435
436
 
436
437
  if (!IS_FUNCTION(this)) {
@@ -449,7 +450,7 @@ function APPLY_PREPARE(args) {
449
450
 
450
451
 
451
452
  function APPLY_OVERFLOW(length) {
452
- throw %MakeRangeError('apply_overflow', [length]);
453
+ throw %MakeRangeError('stack_overflow', []);
453
454
  }
454
455
 
455
456
 
@@ -482,8 +483,7 @@ function ToPrimitive(x, hint) {
482
483
  // Fast case check.
483
484
  if (IS_STRING(x)) return x;
484
485
  // Normal behavior.
485
- if (!IS_OBJECT(x) && !IS_FUNCTION(x)) return x;
486
- if (x == null) return x; // check for null, undefined
486
+ if (!IS_SPEC_OBJECT(x)) return x;
487
487
  if (hint == NO_HINT) hint = (IS_DATE(x)) ? STRING_HINT : NUMBER_HINT;
488
488
  return (hint == NUMBER_HINT) ? %DefaultNumber(x) : %DefaultString(x);
489
489
  }
@@ -562,20 +562,15 @@ function ToInt32(x) {
562
562
  // ES5, section 9.12
563
563
  function SameValue(x, y) {
564
564
  if (typeof x != typeof y) return false;
565
- if (IS_NULL_OR_UNDEFINED(x)) return true;
566
565
  if (IS_NUMBER(x)) {
567
566
  if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true;
568
- // x is +0 and y is -0 or vice versa
569
- if (x === 0 && y === 0 && !%_IsSmi(x) && !%_IsSmi(y) &&
570
- ((1 / x < 0 && 1 / y > 0) || (1 / x > 0 && 1 / y < 0))) {
567
+ // x is +0 and y is -0 or vice versa.
568
+ if (x === 0 && y === 0 && (1 / x) != (1 / y)) {
571
569
  return false;
572
570
  }
573
- return x == y;
571
+ return x === y;
574
572
  }
575
- if (IS_STRING(x)) return %StringEquals(x, y);
576
- if (IS_BOOLEAN(x))return %NumberEquals(%ToNumber(x),%ToNumber(y));
577
-
578
- return %_ObjectEquals(x, y);
573
+ return x === y
579
574
  }
580
575
 
581
576
 
@@ -587,13 +582,10 @@ function SameValue(x, y) {
587
582
  // Returns if the given x is a primitive value - not an object or a
588
583
  // function.
589
584
  function IsPrimitive(x) {
590
- if (!IS_OBJECT(x) && !IS_FUNCTION(x)) {
591
- return true;
592
- } else {
593
- // Even though the type of null is "object", null is still
594
- // considered a primitive value.
595
- return IS_NULL(x);
596
- }
585
+ // Even though the type of null is "object", null is still
586
+ // considered a primitive value. IS_SPEC_OBJECT handles this correctly
587
+ // (i.e., it will return false if x is null).
588
+ return !IS_SPEC_OBJECT(x);
597
589
  }
598
590
 
599
591
 
@@ -200,6 +200,7 @@ void ExternalStringUTF16Buffer<StringType, CharType>::SeekForward(int pos) {
200
200
 
201
201
  // ----------------------------------------------------------------------------
202
202
  // Keyword Matcher
203
+
203
204
  KeywordMatcher::FirstState KeywordMatcher::first_states_[] = {
204
205
  { "break", KEYWORD_PREFIX, Token::BREAK },
205
206
  { NULL, C, Token::ILLEGAL },
@@ -335,13 +336,12 @@ void KeywordMatcher::Step(uc32 input) {
335
336
  // Scanner
336
337
 
337
338
  Scanner::Scanner(ParserMode pre)
338
- : stack_overflow_(false), is_pre_parsing_(pre == PREPARSE) { }
339
+ : is_pre_parsing_(pre == PREPARSE), stack_overflow_(false) { }
339
340
 
340
341
 
341
342
  void Scanner::Initialize(Handle<String> source,
342
343
  ParserLanguage language) {
343
- safe_string_input_buffer_.Reset(source.location());
344
- Init(source, &safe_string_input_buffer_, 0, source->length(), language);
344
+ Init(source, NULL, 0, source->length(), language);
345
345
  }
346
346
 
347
347
 
@@ -356,9 +356,7 @@ void Scanner::Initialize(Handle<String> source,
356
356
  int start_position,
357
357
  int end_position,
358
358
  ParserLanguage language) {
359
- safe_string_input_buffer_.Reset(source.location());
360
- Init(source, &safe_string_input_buffer_,
361
- start_position, end_position, language);
359
+ Init(source, NULL, start_position, end_position, language);
362
360
  }
363
361
 
364
362
 
@@ -367,6 +365,10 @@ void Scanner::Init(Handle<String> source,
367
365
  int start_position,
368
366
  int end_position,
369
367
  ParserLanguage language) {
368
+ // Either initialize the scanner from a character stream or from a
369
+ // string.
370
+ ASSERT(source.is_null() || stream == NULL);
371
+
370
372
  // Initialize the source buffer.
371
373
  if (!source.is_null() && StringShape(*source).IsExternalTwoByte()) {
372
374
  two_byte_string_buffer_.Initialize(
@@ -381,6 +383,10 @@ void Scanner::Init(Handle<String> source,
381
383
  end_position);
382
384
  source_ = &ascii_string_buffer_;
383
385
  } else {
386
+ if (!source.is_null()) {
387
+ safe_string_input_buffer_.Reset(source.location());
388
+ stream = &safe_string_input_buffer_;
389
+ }
384
390
  char_stream_buffer_.Initialize(source,
385
391
  stream,
386
392
  start_position,
@@ -154,7 +154,12 @@ class KeywordMatcher {
154
154
  // *: Actually "future reserved keywords". These are the only ones we
155
155
  // recognized, the remaining are allowed as identifiers.
156
156
  public:
157
- KeywordMatcher() : state_(INITIAL), token_(Token::IDENTIFIER) {}
157
+ KeywordMatcher()
158
+ : state_(INITIAL),
159
+ token_(Token::IDENTIFIER),
160
+ keyword_(NULL),
161
+ counter_(0),
162
+ keyword_token_(Token::ILLEGAL) {}
158
163
 
159
164
  Token::Value token() { return token_; }
160
165
 
@@ -206,17 +211,6 @@ class KeywordMatcher {
206
211
  // State map for first keyword character range.
207
212
  static FirstState first_states_[kFirstCharRangeLength];
208
213
 
209
- // Current state.
210
- State state_;
211
- // Token for currently added characters.
212
- Token::Value token_;
213
-
214
- // Matching a specific keyword string (there is only one possible valid
215
- // keyword with the current prefix).
216
- const char* keyword_;
217
- int counter_;
218
- Token::Value keyword_token_;
219
-
220
214
  // If input equals keyword's character at position, continue matching keyword
221
215
  // from that position.
222
216
  inline bool MatchKeywordStart(uc32 input,
@@ -246,15 +240,26 @@ class KeywordMatcher {
246
240
  char match,
247
241
  State new_state,
248
242
  Token::Value keyword_token) {
249
- if (input == match) { // Matched "do".
250
- state_ = new_state;
251
- token_ = keyword_token;
252
- return true;
243
+ if (input != match) {
244
+ return false;
253
245
  }
254
- return false;
246
+ state_ = new_state;
247
+ token_ = keyword_token;
248
+ return true;
255
249
  }
256
250
 
257
251
  void Step(uc32 input);
252
+
253
+ // Current state.
254
+ State state_;
255
+ // Token for currently added characters.
256
+ Token::Value token_;
257
+
258
+ // Matching a specific keyword string (there is only one possible valid
259
+ // keyword with the current prefix).
260
+ const char* keyword_;
261
+ int counter_;
262
+ Token::Value keyword_token_;
258
263
  };
259
264
 
260
265
 
@@ -362,37 +367,6 @@ class Scanner {
362
367
  static const int kNoEndPosition = 1;
363
368
 
364
369
  private:
365
- void Init(Handle<String> source,
366
- unibrow::CharacterStream* stream,
367
- int start_position, int end_position,
368
- ParserLanguage language);
369
-
370
-
371
- // Different UTF16 buffers used to pull characters from. Based on input one of
372
- // these will be initialized as the actual data source.
373
- CharacterStreamUTF16Buffer char_stream_buffer_;
374
- ExternalStringUTF16Buffer<ExternalTwoByteString, uint16_t>
375
- two_byte_string_buffer_;
376
- ExternalStringUTF16Buffer<ExternalAsciiString, char> ascii_string_buffer_;
377
-
378
- // Source. Will point to one of the buffers declared above.
379
- UTF16Buffer* source_;
380
-
381
- // Used to convert the source string into a character stream when a stream
382
- // is not passed to the scanner.
383
- SafeStringInputBuffer safe_string_input_buffer_;
384
-
385
- // Buffer to hold literal values (identifiers, strings, numbers)
386
- // using 0-terminated UTF-8 encoding.
387
- UTF8Buffer literal_buffer_1_;
388
- UTF8Buffer literal_buffer_2_;
389
-
390
- bool stack_overflow_;
391
- static StaticResource<Utf8Decoder> utf8_decoder_;
392
-
393
- // One Unicode character look-ahead; c0_ < 0 at the end of the input.
394
- uc32 c0_;
395
-
396
370
  // The current and look-ahead token.
397
371
  struct TokenDesc {
398
372
  Token::Value token;
@@ -400,11 +374,10 @@ class Scanner {
400
374
  UTF8Buffer* literal_buffer;
401
375
  };
402
376
 
403
- TokenDesc current_; // desc for current token (as returned by Next())
404
- TokenDesc next_; // desc for next token (one token look-ahead)
405
- bool has_line_terminator_before_next_;
406
- bool is_pre_parsing_;
407
- bool is_parsing_json_;
377
+ void Init(Handle<String> source,
378
+ unibrow::CharacterStream* stream,
379
+ int start_position, int end_position,
380
+ ParserLanguage language);
408
381
 
409
382
  // Literal buffer support
410
383
  void StartLiteral();
@@ -426,6 +399,7 @@ class Scanner {
426
399
  return SkipJavaScriptWhiteSpace();
427
400
  }
428
401
  }
402
+
429
403
  bool SkipJavaScriptWhiteSpace();
430
404
  bool SkipJsonWhiteSpace();
431
405
  Token::Value SkipSingleLineComment();
@@ -460,11 +434,13 @@ class Scanner {
460
434
  // the integer part is zero), and may include an exponent part (e.g., "e-10").
461
435
  // Hexadecimal and octal numbers are not allowed.
462
436
  Token::Value ScanJsonNumber();
437
+
463
438
  // A JSON string (production JSONString) is subset of valid JavaScript string
464
439
  // literals. The string must only be double-quoted (not single-quoted), and
465
440
  // the only allowed backslash-escapes are ", /, \, b, f, n, r, t and
466
441
  // four-digit hex escapes (uXXXX). Any other use of backslashes is invalid.
467
442
  Token::Value ScanJsonString();
443
+
468
444
  // Used to recognizes one of the literals "true", "false", or "null". These
469
445
  // are the only valid JSON identifiers (productions JSONBooleanLiteral,
470
446
  // JSONNullLiteral).
@@ -489,6 +465,37 @@ class Scanner {
489
465
  // Decodes a unicode escape-sequence which is part of an identifier.
490
466
  // If the escape sequence cannot be decoded the result is kBadRune.
491
467
  uc32 ScanIdentifierUnicodeEscape();
468
+
469
+ TokenDesc current_; // desc for current token (as returned by Next())
470
+ TokenDesc next_; // desc for next token (one token look-ahead)
471
+ bool has_line_terminator_before_next_;
472
+ bool is_pre_parsing_;
473
+ bool is_parsing_json_;
474
+
475
+ // Different UTF16 buffers used to pull characters from. Based on input one of
476
+ // these will be initialized as the actual data source.
477
+ CharacterStreamUTF16Buffer char_stream_buffer_;
478
+ ExternalStringUTF16Buffer<ExternalTwoByteString, uint16_t>
479
+ two_byte_string_buffer_;
480
+ ExternalStringUTF16Buffer<ExternalAsciiString, char> ascii_string_buffer_;
481
+
482
+ // Source. Will point to one of the buffers declared above.
483
+ UTF16Buffer* source_;
484
+
485
+ // Used to convert the source string into a character stream when a stream
486
+ // is not passed to the scanner.
487
+ SafeStringInputBuffer safe_string_input_buffer_;
488
+
489
+ // Buffer to hold literal values (identifiers, strings, numbers)
490
+ // using 0-terminated UTF-8 encoding.
491
+ UTF8Buffer literal_buffer_1_;
492
+ UTF8Buffer literal_buffer_2_;
493
+
494
+ bool stack_overflow_;
495
+ static StaticResource<Utf8Decoder> utf8_decoder_;
496
+
497
+ // One Unicode character look-ahead; c0_ < 0 at the end of the input.
498
+ uc32 c0_;
492
499
  };
493
500
 
494
501
  } } // namespace v8::internal
@@ -148,7 +148,7 @@ ScopeInfo<Allocator>::ScopeInfo(Scope* scope)
148
148
  }
149
149
 
150
150
 
151
- // Encoding format in the Code object:
151
+ // Encoding format in a FixedArray object:
152
152
  //
153
153
  // - function name
154
154
  //
@@ -204,12 +204,6 @@ static inline Object** ReadSymbol(Object** p, Handle<String>* s) {
204
204
  }
205
205
 
206
206
 
207
- static inline Object** ReadSentinel(Object** p) {
208
- ASSERT(*p == NULL);
209
- return p + 1;
210
- }
211
-
212
-
213
207
  template <class Allocator>
214
208
  static Object** ReadList(Object** p, List<Handle<String>, Allocator >* list) {
215
209
  ASSERT(list->is_empty());
@@ -220,7 +214,7 @@ static Object** ReadList(Object** p, List<Handle<String>, Allocator >* list) {
220
214
  p = ReadSymbol(p, &s);
221
215
  list->Add(s);
222
216
  }
223
- return ReadSentinel(p);
217
+ return p;
224
218
  }
225
219
 
226
220
 
@@ -239,27 +233,27 @@ static Object** ReadList(Object** p,
239
233
  list->Add(s);
240
234
  modes->Add(static_cast<Variable::Mode>(m));
241
235
  }
242
- return ReadSentinel(p);
236
+ return p;
243
237
  }
244
238
 
245
239
 
246
240
  template<class Allocator>
247
- ScopeInfo<Allocator>::ScopeInfo(Code* code)
241
+ ScopeInfo<Allocator>::ScopeInfo(SerializedScopeInfo* data)
248
242
  : function_name_(Factory::empty_symbol()),
249
243
  parameters_(4),
250
244
  stack_slots_(8),
251
245
  context_slots_(8),
252
246
  context_modes_(8) {
253
- if (code == NULL || code->sinfo_size() == 0) return;
254
-
255
- Object** p0 = &Memory::Object_at(code->sinfo_start());
256
- Object** p = p0;
257
- p = ReadSymbol(p, &function_name_);
258
- p = ReadBool(p, &calls_eval_);
259
- p = ReadList<Allocator>(p, &context_slots_, &context_modes_);
260
- p = ReadList<Allocator>(p, &parameters_);
261
- p = ReadList<Allocator>(p, &stack_slots_);
262
- ASSERT((p - p0) * kPointerSize == code->sinfo_size());
247
+ if (data->length() > 0) {
248
+ Object** p0 = data->data_start();
249
+ Object** p = p0;
250
+ p = ReadSymbol(p, &function_name_);
251
+ p = ReadBool(p, &calls_eval_);
252
+ p = ReadList<Allocator>(p, &context_slots_, &context_modes_);
253
+ p = ReadList<Allocator>(p, &parameters_);
254
+ p = ReadList<Allocator>(p, &stack_slots_);
255
+ ASSERT((p - p0) == FixedArray::cast(data)->length());
256
+ }
263
257
  }
264
258
 
265
259
 
@@ -281,12 +275,6 @@ static inline Object** WriteSymbol(Object** p, Handle<String> s) {
281
275
  }
282
276
 
283
277
 
284
- static inline Object** WriteSentinel(Object** p) {
285
- *p++ = NULL;
286
- return p;
287
- }
288
-
289
-
290
278
  template <class Allocator>
291
279
  static Object** WriteList(Object** p, List<Handle<String>, Allocator >* list) {
292
280
  const int n = list->length();
@@ -294,7 +282,7 @@ static Object** WriteList(Object** p, List<Handle<String>, Allocator >* list) {
294
282
  for (int i = 0; i < n; i++) {
295
283
  p = WriteSymbol(p, list->at(i));
296
284
  }
297
- return WriteSentinel(p);
285
+ return p;
298
286
  }
299
287
 
300
288
 
@@ -308,73 +296,99 @@ static Object** WriteList(Object** p,
308
296
  p = WriteSymbol(p, list->at(i));
309
297
  p = WriteInt(p, modes->at(i));
310
298
  }
311
- return WriteSentinel(p);
299
+ return p;
312
300
  }
313
301
 
314
302
 
315
303
  template<class Allocator>
316
- int ScopeInfo<Allocator>::Serialize(Code* code) {
317
- // function name, calls eval, length & sentinel for 3 tables:
318
- const int extra_slots = 1 + 1 + 2 * 3;
319
- int size = (extra_slots +
320
- context_slots_.length() * 2 +
321
- parameters_.length() +
322
- stack_slots_.length()) * kPointerSize;
323
-
324
- if (code != NULL) {
325
- CHECK(code->sinfo_size() == size);
326
- Object** p0 = &Memory::Object_at(code->sinfo_start());
327
- Object** p = p0;
328
- p = WriteSymbol(p, function_name_);
329
- p = WriteBool(p, calls_eval_);
330
- p = WriteList(p, &context_slots_, &context_modes_);
331
- p = WriteList(p, &parameters_);
332
- p = WriteList(p, &stack_slots_);
333
- ASSERT((p - p0) * kPointerSize == size);
334
- }
304
+ Handle<SerializedScopeInfo> ScopeInfo<Allocator>::Serialize() {
305
+ // function name, calls eval, length for 3 tables:
306
+ const int extra_slots = 1 + 1 + 3;
307
+ int length = extra_slots +
308
+ context_slots_.length() * 2 +
309
+ parameters_.length() +
310
+ stack_slots_.length();
311
+
312
+ Handle<SerializedScopeInfo> data(
313
+ SerializedScopeInfo::cast(*Factory::NewFixedArray(length, TENURED)));
314
+ AssertNoAllocation nogc;
315
+
316
+ Object** p0 = data->data_start();
317
+ Object** p = p0;
318
+ p = WriteSymbol(p, function_name_);
319
+ p = WriteBool(p, calls_eval_);
320
+ p = WriteList(p, &context_slots_, &context_modes_);
321
+ p = WriteList(p, &parameters_);
322
+ p = WriteList(p, &stack_slots_);
323
+ ASSERT((p - p0) == length);
335
324
 
336
- return size;
325
+ return data;
337
326
  }
338
327
 
339
328
 
340
329
  template<class Allocator>
341
- void ScopeInfo<Allocator>::IterateScopeInfo(Code* code, ObjectVisitor* v) {
342
- Object** start = &Memory::Object_at(code->sinfo_start());
343
- Object** end = &Memory::Object_at(code->sinfo_start() + code->sinfo_size());
344
- v->VisitPointers(start, end);
330
+ Handle<String> ScopeInfo<Allocator>::LocalName(int i) const {
331
+ // A local variable can be allocated either on the stack or in the context.
332
+ // For variables allocated in the context they are always preceded by
333
+ // Context::MIN_CONTEXT_SLOTS of fixed allocated slots in the context.
334
+ if (i < number_of_stack_slots()) {
335
+ return stack_slot_name(i);
336
+ } else {
337
+ return context_slot_name(i - number_of_stack_slots() +
338
+ Context::MIN_CONTEXT_SLOTS);
339
+ }
340
+ }
341
+
342
+
343
+ template<class Allocator>
344
+ int ScopeInfo<Allocator>::NumberOfLocals() const {
345
+ int number_of_locals = number_of_stack_slots();
346
+ if (number_of_context_slots() > 0) {
347
+ ASSERT(number_of_context_slots() >= Context::MIN_CONTEXT_SLOTS);
348
+ number_of_locals += number_of_context_slots() - Context::MIN_CONTEXT_SLOTS;
349
+ }
350
+ return number_of_locals;
345
351
  }
346
352
 
347
353
 
348
- static Object** ContextEntriesAddr(Code* code) {
349
- ASSERT(code->sinfo_size() > 0);
350
- // +2 for function name and calls eval:
351
- return &Memory::Object_at(code->sinfo_start()) + 2;
354
+ Handle<SerializedScopeInfo> SerializedScopeInfo::Create(Scope* scope) {
355
+ ScopeInfo<ZoneListAllocationPolicy> sinfo(scope);
356
+ return sinfo.Serialize();
352
357
  }
353
358
 
354
359
 
355
- static Object** ParameterEntriesAddr(Code* code) {
356
- ASSERT(code->sinfo_size() > 0);
357
- Object** p = ContextEntriesAddr(code);
358
- int n; // number of context slots;
359
- p = ReadInt(p, &n);
360
- return p + n*2 + 1; // *2 for pairs, +1 for sentinel
360
+ SerializedScopeInfo* SerializedScopeInfo::Empty() {
361
+ return reinterpret_cast<SerializedScopeInfo*>(Heap::empty_fixed_array());
361
362
  }
362
363
 
363
364
 
364
- static Object** StackSlotEntriesAddr(Code* code) {
365
- ASSERT(code->sinfo_size() > 0);
366
- Object** p = ParameterEntriesAddr(code);
367
- int n; // number of parameter slots;
368
- p = ReadInt(p, &n);
369
- return p + n + 1; // +1 for sentinel
365
+ Object** SerializedScopeInfo::ContextEntriesAddr() {
366
+ ASSERT(length() > 0);
367
+ return data_start() + 2; // +2 for function name and calls eval.
370
368
  }
371
369
 
372
370
 
373
- template<class Allocator>
374
- bool ScopeInfo<Allocator>::CallsEval(Code* code) {
375
- if (code->sinfo_size() > 0) {
376
- // +1 for function name:
377
- Object** p = &Memory::Object_at(code->sinfo_start()) + 1;
371
+ Object** SerializedScopeInfo::ParameterEntriesAddr() {
372
+ ASSERT(length() > 0);
373
+ Object** p = ContextEntriesAddr();
374
+ int number_of_context_slots;
375
+ p = ReadInt(p, &number_of_context_slots);
376
+ return p + number_of_context_slots*2; // *2 for pairs
377
+ }
378
+
379
+
380
+ Object** SerializedScopeInfo::StackSlotEntriesAddr() {
381
+ ASSERT(length() > 0);
382
+ Object** p = ParameterEntriesAddr();
383
+ int number_of_parameter_slots;
384
+ p = ReadInt(p, &number_of_parameter_slots);
385
+ return p + number_of_parameter_slots;
386
+ }
387
+
388
+
389
+ bool SerializedScopeInfo::CallsEval() {
390
+ if (length() > 0) {
391
+ Object** p = data_start() + 1; // +1 for function name.
378
392
  bool calls_eval;
379
393
  p = ReadBool(p, &calls_eval);
380
394
  return calls_eval;
@@ -383,41 +397,49 @@ bool ScopeInfo<Allocator>::CallsEval(Code* code) {
383
397
  }
384
398
 
385
399
 
386
- template<class Allocator>
387
- int ScopeInfo<Allocator>::NumberOfStackSlots(Code* code) {
388
- if (code->sinfo_size() > 0) {
389
- Object** p = StackSlotEntriesAddr(code);
390
- int n; // number of stack slots;
391
- ReadInt(p, &n);
392
- return n;
400
+ int SerializedScopeInfo::NumberOfStackSlots() {
401
+ if (length() > 0) {
402
+ Object** p = StackSlotEntriesAddr();
403
+ int number_of_stack_slots;
404
+ ReadInt(p, &number_of_stack_slots);
405
+ return number_of_stack_slots;
393
406
  }
394
407
  return 0;
395
408
  }
396
409
 
397
410
 
398
- template<class Allocator>
399
- int ScopeInfo<Allocator>::NumberOfContextSlots(Code* code) {
400
- if (code->sinfo_size() > 0) {
401
- Object** p = ContextEntriesAddr(code);
402
- int n; // number of context slots;
403
- ReadInt(p, &n);
404
- return n + Context::MIN_CONTEXT_SLOTS;
411
+ int SerializedScopeInfo::NumberOfContextSlots() {
412
+ if (length() > 0) {
413
+ Object** p = ContextEntriesAddr();
414
+ int number_of_context_slots;
415
+ ReadInt(p, &number_of_context_slots);
416
+ return number_of_context_slots + Context::MIN_CONTEXT_SLOTS;
405
417
  }
406
418
  return 0;
407
419
  }
408
420
 
409
421
 
410
- template<class Allocator>
411
- int ScopeInfo<Allocator>::StackSlotIndex(Code* code, String* name) {
422
+ bool SerializedScopeInfo::HasHeapAllocatedLocals() {
423
+ if (length() > 0) {
424
+ Object** p = ContextEntriesAddr();
425
+ int number_of_context_slots;
426
+ ReadInt(p, &number_of_context_slots);
427
+ return number_of_context_slots > 0;
428
+ }
429
+ return false;
430
+ }
431
+
432
+
433
+ int SerializedScopeInfo::StackSlotIndex(String* name) {
412
434
  ASSERT(name->IsSymbol());
413
- if (code->sinfo_size() > 0) {
414
- // Loop below depends on the NULL sentinel after the stack slot names.
415
- ASSERT(NumberOfStackSlots(code) > 0 ||
416
- *(StackSlotEntriesAddr(code) + 1) == NULL);
417
- // slots start after length entry
418
- Object** p0 = StackSlotEntriesAddr(code) + 1;
435
+ if (length() > 0) {
436
+ // Slots start after length entry.
437
+ Object** p0 = StackSlotEntriesAddr();
438
+ int number_of_stack_slots;
439
+ p0 = ReadInt(p0, &number_of_stack_slots);
419
440
  Object** p = p0;
420
- while (*p != NULL) {
441
+ Object** end = p0 + number_of_stack_slots;
442
+ while (p != end) {
421
443
  if (*p == name) return static_cast<int>(p - p0);
422
444
  p++;
423
445
  }
@@ -425,24 +447,18 @@ int ScopeInfo<Allocator>::StackSlotIndex(Code* code, String* name) {
425
447
  return -1;
426
448
  }
427
449
 
428
-
429
- template<class Allocator>
430
- int ScopeInfo<Allocator>::ContextSlotIndex(Code* code,
431
- String* name,
432
- Variable::Mode* mode) {
450
+ int SerializedScopeInfo::ContextSlotIndex(String* name, Variable::Mode* mode) {
433
451
  ASSERT(name->IsSymbol());
434
- int result = ContextSlotCache::Lookup(code, name, mode);
452
+ int result = ContextSlotCache::Lookup(this, name, mode);
435
453
  if (result != ContextSlotCache::kNotFound) return result;
436
- if (code->sinfo_size() > 0) {
437
- // Loop below depends on the NULL sentinel after the context slot names.
438
- ASSERT(NumberOfContextSlots(code) >= Context::MIN_CONTEXT_SLOTS ||
439
- *(ContextEntriesAddr(code) + 1) == NULL);
440
-
441
- // slots start after length entry
442
- Object** p0 = ContextEntriesAddr(code) + 1;
454
+ if (length() > 0) {
455
+ // Slots start after length entry.
456
+ Object** p0 = ContextEntriesAddr();
457
+ int number_of_context_slots;
458
+ p0 = ReadInt(p0, &number_of_context_slots);
443
459
  Object** p = p0;
444
- // contexts may have no variable slots (in the presence of eval()).
445
- while (*p != NULL) {
460
+ Object** end = p0 + number_of_context_slots * 2;
461
+ while (p != end) {
446
462
  if (*p == name) {
447
463
  ASSERT(((p - p0) & 1) == 0);
448
464
  int v;
@@ -450,21 +466,20 @@ int ScopeInfo<Allocator>::ContextSlotIndex(Code* code,
450
466
  Variable::Mode mode_value = static_cast<Variable::Mode>(v);
451
467
  if (mode != NULL) *mode = mode_value;
452
468
  result = static_cast<int>((p - p0) >> 1) + Context::MIN_CONTEXT_SLOTS;
453
- ContextSlotCache::Update(code, name, mode_value, result);
469
+ ContextSlotCache::Update(this, name, mode_value, result);
454
470
  return result;
455
471
  }
456
472
  p += 2;
457
473
  }
458
474
  }
459
- ContextSlotCache::Update(code, name, Variable::INTERNAL, -1);
475
+ ContextSlotCache::Update(this, name, Variable::INTERNAL, -1);
460
476
  return -1;
461
477
  }
462
478
 
463
479
 
464
- template<class Allocator>
465
- int ScopeInfo<Allocator>::ParameterIndex(Code* code, String* name) {
480
+ int SerializedScopeInfo::ParameterIndex(String* name) {
466
481
  ASSERT(name->IsSymbol());
467
- if (code->sinfo_size() > 0) {
482
+ if (length() > 0) {
468
483
  // We must read parameters from the end since for
469
484
  // multiply declared parameters the value of the
470
485
  // last declaration of that parameter is used
@@ -475,10 +490,10 @@ int ScopeInfo<Allocator>::ParameterIndex(Code* code, String* name) {
475
490
  // once, with corresponding index. This requires a new
476
491
  // implementation of the ScopeInfo code. See also other
477
492
  // comments in this file regarding this.
478
- Object** p = ParameterEntriesAddr(code);
479
- int n; // number of parameters
480
- Object** p0 = ReadInt(p, &n);
481
- p = p0 + n;
493
+ Object** p = ParameterEntriesAddr();
494
+ int number_of_parameter_slots;
495
+ Object** p0 = ReadInt(p, &number_of_parameter_slots);
496
+ p = p0 + number_of_parameter_slots;
482
497
  while (p > p0) {
483
498
  p--;
484
499
  if (*p == name) return static_cast<int>(p - p0);
@@ -488,64 +503,37 @@ int ScopeInfo<Allocator>::ParameterIndex(Code* code, String* name) {
488
503
  }
489
504
 
490
505
 
491
- template<class Allocator>
492
- int ScopeInfo<Allocator>::FunctionContextSlotIndex(Code* code, String* name) {
506
+ int SerializedScopeInfo::FunctionContextSlotIndex(String* name) {
493
507
  ASSERT(name->IsSymbol());
494
- if (code->sinfo_size() > 0) {
495
- Object** p = &Memory::Object_at(code->sinfo_start());
508
+ if (length() > 0) {
509
+ Object** p = data_start();
496
510
  if (*p == name) {
497
- p = ContextEntriesAddr(code);
498
- int n; // number of context slots
499
- ReadInt(p, &n);
500
- ASSERT(n != 0);
511
+ p = ContextEntriesAddr();
512
+ int number_of_context_slots;
513
+ ReadInt(p, &number_of_context_slots);
514
+ ASSERT(number_of_context_slots != 0);
501
515
  // The function context slot is the last entry.
502
- return n + Context::MIN_CONTEXT_SLOTS - 1;
516
+ return number_of_context_slots + Context::MIN_CONTEXT_SLOTS - 1;
503
517
  }
504
518
  }
505
519
  return -1;
506
520
  }
507
521
 
508
522
 
509
- template<class Allocator>
510
- Handle<String> ScopeInfo<Allocator>::LocalName(int i) const {
511
- // A local variable can be allocated either on the stack or in the context.
512
- // For variables allocated in the context they are always preceded by the
513
- // number Context::MIN_CONTEXT_SLOTS number of fixed allocated slots in the
514
- // context.
515
- if (i < number_of_stack_slots()) {
516
- return stack_slot_name(i);
517
- } else {
518
- return context_slot_name(i - number_of_stack_slots() +
519
- Context::MIN_CONTEXT_SLOTS);
520
- }
521
- }
522
-
523
-
524
- template<class Allocator>
525
- int ScopeInfo<Allocator>::NumberOfLocals() const {
526
- int number_of_locals = number_of_stack_slots();
527
- if (number_of_context_slots() > 0) {
528
- ASSERT(number_of_context_slots() >= Context::MIN_CONTEXT_SLOTS);
529
- number_of_locals += number_of_context_slots() - Context::MIN_CONTEXT_SLOTS;
530
- }
531
- return number_of_locals;
532
- }
533
-
534
-
535
- int ContextSlotCache::Hash(Code* code, String* name) {
523
+ int ContextSlotCache::Hash(Object* data, String* name) {
536
524
  // Uses only lower 32 bits if pointers are larger.
537
525
  uintptr_t addr_hash =
538
- static_cast<uint32_t>(reinterpret_cast<uintptr_t>(code)) >> 2;
526
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(data)) >> 2;
539
527
  return static_cast<int>((addr_hash ^ name->Hash()) % kLength);
540
528
  }
541
529
 
542
530
 
543
- int ContextSlotCache::Lookup(Code* code,
531
+ int ContextSlotCache::Lookup(Object* data,
544
532
  String* name,
545
533
  Variable::Mode* mode) {
546
- int index = Hash(code, name);
534
+ int index = Hash(data, name);
547
535
  Key& key = keys_[index];
548
- if ((key.code == code) && key.name->Equals(name)) {
536
+ if ((key.data == data) && key.name->Equals(name)) {
549
537
  Value result(values_[index]);
550
538
  if (mode != NULL) *mode = result.mode();
551
539
  return result.index() + kNotFound;
@@ -554,28 +542,28 @@ int ContextSlotCache::Lookup(Code* code,
554
542
  }
555
543
 
556
544
 
557
- void ContextSlotCache::Update(Code* code,
545
+ void ContextSlotCache::Update(Object* data,
558
546
  String* name,
559
547
  Variable::Mode mode,
560
548
  int slot_index) {
561
549
  String* symbol;
562
550
  ASSERT(slot_index > kNotFound);
563
551
  if (Heap::LookupSymbolIfExists(name, &symbol)) {
564
- int index = Hash(code, symbol);
552
+ int index = Hash(data, symbol);
565
553
  Key& key = keys_[index];
566
- key.code = code;
554
+ key.data = data;
567
555
  key.name = symbol;
568
556
  // Please note value only takes a uint as index.
569
557
  values_[index] = Value(mode, slot_index - kNotFound).raw();
570
558
  #ifdef DEBUG
571
- ValidateEntry(code, name, mode, slot_index);
559
+ ValidateEntry(data, name, mode, slot_index);
572
560
  #endif
573
561
  }
574
562
  }
575
563
 
576
564
 
577
565
  void ContextSlotCache::Clear() {
578
- for (int index = 0; index < kLength; index++) keys_[index].code = NULL;
566
+ for (int index = 0; index < kLength; index++) keys_[index].data = NULL;
579
567
  }
580
568
 
581
569
 
@@ -587,15 +575,15 @@ uint32_t ContextSlotCache::values_[ContextSlotCache::kLength];
587
575
 
588
576
  #ifdef DEBUG
589
577
 
590
- void ContextSlotCache::ValidateEntry(Code* code,
578
+ void ContextSlotCache::ValidateEntry(Object* data,
591
579
  String* name,
592
580
  Variable::Mode mode,
593
581
  int slot_index) {
594
582
  String* symbol;
595
583
  if (Heap::LookupSymbolIfExists(name, &symbol)) {
596
- int index = Hash(code, name);
584
+ int index = Hash(data, name);
597
585
  Key& key = keys_[index];
598
- ASSERT(key.code == code);
586
+ ASSERT(key.data == data);
599
587
  ASSERT(key.name->Equals(name));
600
588
  Value result(values_[index]);
601
589
  ASSERT(result.mode() == mode);