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
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_IA32)
31
+
30
32
  #include "codegen-inl.h"
31
33
  #include "jump-target-inl.h"
32
34
  #include "register-allocator-inl.h"
@@ -431,3 +433,5 @@ void BreakTarget::Bind(Result* arg) {
431
433
 
432
434
 
433
435
  } } // namespace v8::internal
436
+
437
+ #endif // V8_TARGET_ARCH_IA32
@@ -27,6 +27,8 @@
27
27
 
28
28
  #include "v8.h"
29
29
 
30
+ #if defined(V8_TARGET_ARCH_IA32)
31
+
30
32
  #include "bootstrapper.h"
31
33
  #include "codegen-inl.h"
32
34
  #include "debug.h"
@@ -58,49 +60,17 @@ void MacroAssembler::RecordWriteHelper(Register object,
58
60
  bind(&not_in_new_space);
59
61
  }
60
62
 
61
- Label fast;
62
-
63
63
  // Compute the page start address from the heap object pointer, and reuse
64
64
  // the 'object' register for it.
65
65
  and_(object, ~Page::kPageAlignmentMask);
66
- Register page_start = object;
67
-
68
- // Compute the bit addr in the remembered set/index of the pointer in the
69
- // page. Reuse 'addr' as pointer_offset.
70
- sub(addr, Operand(page_start));
71
- shr(addr, kObjectAlignmentBits);
72
- Register pointer_offset = addr;
73
-
74
- // If the bit offset lies beyond the normal remembered set range, it is in
75
- // the extra remembered set area of a large object.
76
- cmp(pointer_offset, Page::kPageSize / kPointerSize);
77
- j(less, &fast);
78
-
79
- // Adjust 'page_start' so that addressing using 'pointer_offset' hits the
80
- // extra remembered set after the large object.
81
-
82
- // Find the length of the large object (FixedArray).
83
- mov(scratch, Operand(page_start, Page::kObjectStartOffset
84
- + FixedArray::kLengthOffset));
85
- Register array_length = scratch;
86
-
87
- // Extra remembered set starts right after the large object (a FixedArray), at
88
- // page_start + kObjectStartOffset + objectSize
89
- // where objectSize is FixedArray::kHeaderSize + kPointerSize * array_length.
90
- // Add the delta between the end of the normal RSet and the start of the
91
- // extra RSet to 'page_start', so that addressing the bit using
92
- // 'pointer_offset' hits the extra RSet words.
93
- lea(page_start,
94
- Operand(page_start, array_length, times_pointer_size,
95
- Page::kObjectStartOffset + FixedArray::kHeaderSize
96
- - Page::kRSetEndOffset));
97
-
98
- // NOTE: For now, we use the bit-test-and-set (bts) x86 instruction
99
- // to limit code size. We should probably evaluate this decision by
100
- // measuring the performance of an equivalent implementation using
101
- // "simpler" instructions
102
- bind(&fast);
103
- bts(Operand(page_start, Page::kRSetOffset), pointer_offset);
66
+
67
+ // Compute number of region covering addr. See Page::GetRegionNumberForAddress
68
+ // method for more details.
69
+ and_(addr, Page::kPageAlignmentMask);
70
+ shr(addr, Page::kRegionSizeLog2);
71
+
72
+ // Set dirty mark for region.
73
+ bts(Operand(object, Page::kDirtyFlagOffset), addr);
104
74
  }
105
75
 
106
76
 
@@ -128,21 +98,17 @@ void MacroAssembler::InNewSpace(Register object,
128
98
  }
129
99
 
130
100
 
131
- // Set the remembered set bit for [object+offset].
132
- // object is the object being stored into, value is the object being stored.
133
- // If offset is zero, then the scratch register contains the array index into
134
- // the elements array represented as a Smi.
135
- // All registers are clobbered by the operation.
136
- void MacroAssembler::RecordWrite(Register object, int offset,
137
- Register value, Register scratch) {
101
+ void MacroAssembler::RecordWrite(Register object,
102
+ int offset,
103
+ Register value,
104
+ Register scratch) {
138
105
  // The compiled code assumes that record write doesn't change the
139
106
  // context register, so we check that none of the clobbered
140
107
  // registers are esi.
141
108
  ASSERT(!object.is(esi) && !value.is(esi) && !scratch.is(esi));
142
109
 
143
- // First, check if a remembered set write is even needed. The tests below
144
- // catch stores of Smis and stores into young gen (which does not have space
145
- // for the remembered set bits).
110
+ // First, check if a write barrier is even needed. The tests below
111
+ // catch stores of Smis and stores into young gen.
146
112
  Label done;
147
113
 
148
114
  // Skip barrier if writing a smi.
@@ -158,47 +124,19 @@ void MacroAssembler::RecordWrite(Register object, int offset,
158
124
  ASSERT(IsAligned(offset, kPointerSize) ||
159
125
  IsAligned(offset + kHeapObjectTag, kPointerSize));
160
126
 
161
- // We use optimized write barrier code if the word being written to is not in
162
- // a large object chunk or is in the first page of a large object chunk.
163
- // We make sure that an offset is inside the right limits whether it is
164
- // tagged or untagged.
165
- if ((offset > 0) && (offset < Page::kMaxHeapObjectSize - kHeapObjectTag)) {
166
- // Compute the bit offset in the remembered set, leave it in 'value'.
167
- lea(value, Operand(object, offset));
168
- and_(value, Page::kPageAlignmentMask);
169
- shr(value, kPointerSizeLog2);
170
-
171
- // Compute the page address from the heap object pointer, leave it in
172
- // 'object'.
173
- and_(object, ~Page::kPageAlignmentMask);
174
-
175
- // NOTE: For now, we use the bit-test-and-set (bts) x86 instruction
176
- // to limit code size. We should probably evaluate this decision by
177
- // measuring the performance of an equivalent implementation using
178
- // "simpler" instructions
179
- bts(Operand(object, Page::kRSetOffset), value);
127
+ Register dst = scratch;
128
+ if (offset != 0) {
129
+ lea(dst, Operand(object, offset));
180
130
  } else {
181
- Register dst = scratch;
182
- if (offset != 0) {
183
- lea(dst, Operand(object, offset));
184
- } else {
185
- // array access: calculate the destination address in the same manner as
186
- // KeyedStoreIC::GenerateGeneric. Multiply a smi by 2 to get an offset
187
- // into an array of words.
188
- ASSERT_EQ(1, kSmiTagSize);
189
- ASSERT_EQ(0, kSmiTag);
190
- lea(dst, Operand(object, dst, times_half_pointer_size,
191
- FixedArray::kHeaderSize - kHeapObjectTag));
192
- }
193
- // If we are already generating a shared stub, not inlining the
194
- // record write code isn't going to save us any memory.
195
- if (generating_stub()) {
196
- RecordWriteHelper(object, dst, value);
197
- } else {
198
- RecordWriteStub stub(object, dst, value);
199
- CallStub(&stub);
200
- }
131
+ // Array access: calculate the destination address in the same manner as
132
+ // KeyedStoreIC::GenerateGeneric. Multiply a smi by 2 to get an offset
133
+ // into an array of words.
134
+ ASSERT_EQ(1, kSmiTagSize);
135
+ ASSERT_EQ(0, kSmiTag);
136
+ lea(dst, Operand(object, dst, times_half_pointer_size,
137
+ FixedArray::kHeaderSize - kHeapObjectTag));
201
138
  }
139
+ RecordWriteHelper(object, dst, value);
202
140
 
203
141
  bind(&done);
204
142
 
@@ -212,6 +150,39 @@ void MacroAssembler::RecordWrite(Register object, int offset,
212
150
  }
213
151
 
214
152
 
153
+ void MacroAssembler::RecordWrite(Register object,
154
+ Register address,
155
+ Register value) {
156
+ // The compiled code assumes that record write doesn't change the
157
+ // context register, so we check that none of the clobbered
158
+ // registers are esi.
159
+ ASSERT(!object.is(esi) && !value.is(esi) && !address.is(esi));
160
+
161
+ // First, check if a write barrier is even needed. The tests below
162
+ // catch stores of Smis and stores into young gen.
163
+ Label done;
164
+
165
+ // Skip barrier if writing a smi.
166
+ ASSERT_EQ(0, kSmiTag);
167
+ test(value, Immediate(kSmiTagMask));
168
+ j(zero, &done);
169
+
170
+ InNewSpace(object, value, equal, &done);
171
+
172
+ RecordWriteHelper(object, address, value);
173
+
174
+ bind(&done);
175
+
176
+ // Clobber all input registers when running with the debug-code flag
177
+ // turned on to provoke errors.
178
+ if (FLAG_debug_code) {
179
+ mov(object, Immediate(BitCast<int32_t>(kZapValue)));
180
+ mov(address, Immediate(BitCast<int32_t>(kZapValue)));
181
+ mov(value, Immediate(BitCast<int32_t>(kZapValue)));
182
+ }
183
+ }
184
+
185
+
215
186
  void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) {
216
187
  cmp(esp,
217
188
  Operand::StaticVariable(ExternalReference::address_of_stack_limit()));
@@ -355,6 +326,25 @@ Condition MacroAssembler::IsObjectStringType(Register heap_object,
355
326
  }
356
327
 
357
328
 
329
+ void MacroAssembler::IsObjectJSObjectType(Register heap_object,
330
+ Register map,
331
+ Register scratch,
332
+ Label* fail) {
333
+ mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
334
+ IsInstanceJSObjectType(map, scratch, fail);
335
+ }
336
+
337
+
338
+ void MacroAssembler::IsInstanceJSObjectType(Register map,
339
+ Register scratch,
340
+ Label* fail) {
341
+ movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset));
342
+ sub(Operand(scratch), Immediate(FIRST_JS_OBJECT_TYPE));
343
+ cmp(scratch, LAST_JS_OBJECT_TYPE - FIRST_JS_OBJECT_TYPE);
344
+ j(above, fail);
345
+ }
346
+
347
+
358
348
  void MacroAssembler::FCmp() {
359
349
  if (CpuFeatures::IsSupported(CMOV)) {
360
350
  fucomip();
@@ -554,97 +544,6 @@ void MacroAssembler::PopTryHandler() {
554
544
  }
555
545
 
556
546
 
557
- Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
558
- JSObject* holder, Register holder_reg,
559
- Register scratch,
560
- int save_at_depth,
561
- Label* miss) {
562
- // Make sure there's no overlap between scratch and the other
563
- // registers.
564
- ASSERT(!scratch.is(object_reg) && !scratch.is(holder_reg));
565
-
566
- // Keep track of the current object in register reg.
567
- Register reg = object_reg;
568
- int depth = 0;
569
-
570
- if (save_at_depth == depth) {
571
- mov(Operand(esp, kPointerSize), object_reg);
572
- }
573
-
574
- // Check the maps in the prototype chain.
575
- // Traverse the prototype chain from the object and do map checks.
576
- while (object != holder) {
577
- depth++;
578
-
579
- // Only global objects and objects that do not require access
580
- // checks are allowed in stubs.
581
- ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
582
-
583
- JSObject* prototype = JSObject::cast(object->GetPrototype());
584
- if (Heap::InNewSpace(prototype)) {
585
- // Get the map of the current object.
586
- mov(scratch, FieldOperand(reg, HeapObject::kMapOffset));
587
- cmp(Operand(scratch), Immediate(Handle<Map>(object->map())));
588
- // Branch on the result of the map check.
589
- j(not_equal, miss, not_taken);
590
- // Check access rights to the global object. This has to happen
591
- // after the map check so that we know that the object is
592
- // actually a global object.
593
- if (object->IsJSGlobalProxy()) {
594
- CheckAccessGlobalProxy(reg, scratch, miss);
595
-
596
- // Restore scratch register to be the map of the object.
597
- // We load the prototype from the map in the scratch register.
598
- mov(scratch, FieldOperand(reg, HeapObject::kMapOffset));
599
- }
600
- // The prototype is in new space; we cannot store a reference
601
- // to it in the code. Load it from the map.
602
- reg = holder_reg; // from now the object is in holder_reg
603
- mov(reg, FieldOperand(scratch, Map::kPrototypeOffset));
604
- } else {
605
- // Check the map of the current object.
606
- cmp(FieldOperand(reg, HeapObject::kMapOffset),
607
- Immediate(Handle<Map>(object->map())));
608
- // Branch on the result of the map check.
609
- j(not_equal, miss, not_taken);
610
- // Check access rights to the global object. This has to happen
611
- // after the map check so that we know that the object is
612
- // actually a global object.
613
- if (object->IsJSGlobalProxy()) {
614
- CheckAccessGlobalProxy(reg, scratch, miss);
615
- }
616
- // The prototype is in old space; load it directly.
617
- reg = holder_reg; // from now the object is in holder_reg
618
- mov(reg, Handle<JSObject>(prototype));
619
- }
620
-
621
- if (save_at_depth == depth) {
622
- mov(Operand(esp, kPointerSize), reg);
623
- }
624
-
625
- // Go to the next object in the prototype chain.
626
- object = prototype;
627
- }
628
-
629
- // Check the holder map.
630
- cmp(FieldOperand(reg, HeapObject::kMapOffset),
631
- Immediate(Handle<Map>(holder->map())));
632
- j(not_equal, miss, not_taken);
633
-
634
- // Log the check depth.
635
- LOG(IntEvent("check-maps-depth", depth + 1));
636
-
637
- // Perform security check for access to the global object and return
638
- // the holder register.
639
- ASSERT(object == holder);
640
- ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
641
- if (object->IsJSGlobalProxy()) {
642
- CheckAccessGlobalProxy(reg, scratch, miss);
643
- }
644
- return reg;
645
- }
646
-
647
-
648
547
  void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
649
548
  Register scratch,
650
549
  Label* miss) {
@@ -1382,6 +1281,7 @@ void MacroAssembler::InvokeFunction(Register fun,
1382
1281
  mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
1383
1282
  mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
1384
1283
  mov(ebx, FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset));
1284
+ SmiUntag(ebx);
1385
1285
  mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset));
1386
1286
  lea(edx, FieldOperand(edx, Code::kHeaderSize));
1387
1287
 
@@ -1706,3 +1606,5 @@ CodePatcher::~CodePatcher() {
1706
1606
 
1707
1607
 
1708
1608
  } } // namespace v8::internal
1609
+
1610
+ #endif // V8_TARGET_ARCH_IA32
@@ -33,6 +33,17 @@
33
33
  namespace v8 {
34
34
  namespace internal {
35
35
 
36
+ // Flags used for the AllocateInNewSpace functions.
37
+ enum AllocationFlags {
38
+ // No special flags.
39
+ NO_ALLOCATION_FLAGS = 0,
40
+ // Return the pointer to the allocated already tagged as a heap object.
41
+ TAG_OBJECT = 1 << 0,
42
+ // The content of the result register already contains the allocation top in
43
+ // new space.
44
+ RESULT_CONTAINS_TOP = 1 << 1
45
+ };
46
+
36
47
  // Convenience for platform-independent signatures. We do not normally
37
48
  // distinguish memory operands from other operands on ia32.
38
49
  typedef Operand MemOperand;
@@ -48,8 +59,8 @@ class MacroAssembler: public Assembler {
48
59
  // ---------------------------------------------------------------------------
49
60
  // GC Support
50
61
 
51
- // Set the remebered set bit for an address which points into an
52
- // object. RecordWriteHelper only works if the object is not in new
62
+ // For page containing |object| mark region covering |addr| dirty.
63
+ // RecordWriteHelper only works if the object is not in new
53
64
  // space.
54
65
  void RecordWriteHelper(Register object,
55
66
  Register addr,
@@ -62,16 +73,27 @@ class MacroAssembler: public Assembler {
62
73
  Condition cc, // equal for new space, not_equal otherwise.
63
74
  Label* branch);
64
75
 
65
- // Set the remembered set bit for [object+offset].
66
- // object is the object being stored into, value is the object being stored.
67
- // If offset is zero, then the scratch register contains the array index into
68
- // the elements array represented as a Smi.
69
- // All registers are clobbered by the operation.
76
+ // For page containing |object| mark region covering [object+offset]
77
+ // dirty. |object| is the object being stored into, |value| is the
78
+ // object being stored. If offset is zero, then the scratch register
79
+ // contains the array index into the elements array represented as a
80
+ // Smi. All registers are clobbered by the operation. RecordWrite
81
+ // filters out smis so it does not update the write barrier if the
82
+ // value is a smi.
70
83
  void RecordWrite(Register object,
71
84
  int offset,
72
85
  Register value,
73
86
  Register scratch);
74
87
 
88
+ // For page containing |object| mark region covering |address|
89
+ // dirty. |object| is the object being stored into, |value| is the
90
+ // object being stored. All registers are clobbered by the
91
+ // operation. RecordWrite filters out smis so it does not update the
92
+ // write barrier if the value is a smi.
93
+ void RecordWrite(Register object,
94
+ Register address,
95
+ Register value);
96
+
75
97
  #ifdef ENABLE_DEBUGGER_SUPPORT
76
98
  // ---------------------------------------------------------------------------
77
99
  // Debugger Support
@@ -177,6 +199,18 @@ class MacroAssembler: public Assembler {
177
199
  Register map,
178
200
  Register instance_type);
179
201
 
202
+ // Check if a heap object's type is in the JSObject range, not including
203
+ // JSFunction. The object's map will be loaded in the map register.
204
+ // Any or all of the three registers may be the same.
205
+ // The contents of the scratch register will always be overwritten.
206
+ void IsObjectJSObjectType(Register heap_object,
207
+ Register map,
208
+ Register scratch,
209
+ Label* fail);
210
+
211
+ // The contents of the scratch register will be overwritten.
212
+ void IsInstanceJSObjectType(Register map, Register scratch, Label* fail);
213
+
180
214
  // FCmp is similar to integer cmp, but requires unsigned
181
215
  // jcc instructions (je, ja, jae, jb, jbe, je, and jz).
182
216
  void FCmp();
@@ -210,24 +244,6 @@ class MacroAssembler: public Assembler {
210
244
  // ---------------------------------------------------------------------------
211
245
  // Inline caching support
212
246
 
213
- // Generates code that verifies that the maps of objects in the
214
- // prototype chain of object hasn't changed since the code was
215
- // generated and branches to the miss label if any map has. If
216
- // necessary the function also generates code for security check
217
- // in case of global object holders. The scratch and holder
218
- // registers are always clobbered, but the object register is only
219
- // clobbered if it the same as the holder register. The function
220
- // returns a register containing the holder - either object_reg or
221
- // holder_reg.
222
- // The function can optionally (when save_at_depth !=
223
- // kInvalidProtoDepth) save the object at the given depth by moving
224
- // it to [esp + kPointerSize].
225
- Register CheckMaps(JSObject* object, Register object_reg,
226
- JSObject* holder, Register holder_reg,
227
- Register scratch,
228
- int save_at_depth,
229
- Label* miss);
230
-
231
247
  // Generate code for checking access rights - used for security checks
232
248
  // on access to global objects across environments. The holder register
233
249
  // is left untouched, but the scratch register is clobbered.
@@ -26,6 +26,9 @@
26
26
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  #include "v8.h"
29
+
30
+ #if defined(V8_TARGET_ARCH_IA32)
31
+
29
32
  #include "unicode.h"
30
33
  #include "log.h"
31
34
  #include "ast.h"
@@ -51,7 +54,7 @@ namespace internal {
51
54
  * - esp : points to tip of C stack.
52
55
  * - ecx : points to tip of backtrack stack
53
56
  *
54
- * The registers eax, ebx and ecx are free to use for computations.
57
+ * The registers eax and ebx are free to use for computations.
55
58
  *
56
59
  * Each call to a public method should retain this convention.
57
60
  * The stack will have the following structure:
@@ -72,8 +75,6 @@ namespace internal {
72
75
  * - backup of caller ebx
73
76
  * - Offset of location before start of input (effectively character
74
77
  * position -1). Used to initialize capture registers to a non-position.
75
- * - Boolean at start (if 1, we are starting at the start of the string,
76
- * otherwise 0)
77
78
  * - register 0 ebp[-4] (Only positions must be stored in the first
78
79
  * - register 1 ebp[-8] num_saved_registers_ registers)
79
80
  * - ...
@@ -178,8 +179,8 @@ void RegExpMacroAssemblerIA32::CheckCharacterGT(uc16 limit, Label* on_greater) {
178
179
  void RegExpMacroAssemblerIA32::CheckAtStart(Label* on_at_start) {
179
180
  Label not_at_start;
180
181
  // Did we start the match at the start of the string at all?
181
- __ cmp(Operand(ebp, kAtStart), Immediate(0));
182
- BranchOrBacktrack(equal, &not_at_start);
182
+ __ cmp(Operand(ebp, kStartIndex), Immediate(0));
183
+ BranchOrBacktrack(not_equal, &not_at_start);
183
184
  // If we did, are we still at the start of the input?
184
185
  __ lea(eax, Operand(esi, edi, times_1, 0));
185
186
  __ cmp(eax, Operand(ebp, kInputStart));
@@ -190,8 +191,8 @@ void RegExpMacroAssemblerIA32::CheckAtStart(Label* on_at_start) {
190
191
 
191
192
  void RegExpMacroAssemblerIA32::CheckNotAtStart(Label* on_not_at_start) {
192
193
  // Did we start the match at the start of the string at all?
193
- __ cmp(Operand(ebp, kAtStart), Immediate(0));
194
- BranchOrBacktrack(equal, on_not_at_start);
194
+ __ cmp(Operand(ebp, kStartIndex), Immediate(0));
195
+ BranchOrBacktrack(not_equal, on_not_at_start);
195
196
  // If we did, are we still at the start of the input?
196
197
  __ lea(eax, Operand(esi, edi, times_1, 0));
197
198
  __ cmp(eax, Operand(ebp, kInputStart));
@@ -209,6 +210,15 @@ void RegExpMacroAssemblerIA32::CheckCharacters(Vector<const uc16> str,
209
210
  int cp_offset,
210
211
  Label* on_failure,
211
212
  bool check_end_of_string) {
213
+ #ifdef DEBUG
214
+ // If input is ASCII, don't even bother calling here if the string to
215
+ // match contains a non-ascii character.
216
+ if (mode_ == ASCII) {
217
+ for (int i = 0; i < str.length(); i++) {
218
+ ASSERT(str[i] <= String::kMaxAsciiCharCodeU);
219
+ }
220
+ }
221
+ #endif
212
222
  int byte_length = str.length() * char_size();
213
223
  int byte_offset = cp_offset * char_size();
214
224
  if (check_end_of_string) {
@@ -222,14 +232,56 @@ void RegExpMacroAssemblerIA32::CheckCharacters(Vector<const uc16> str,
222
232
  on_failure = &backtrack_label_;
223
233
  }
224
234
 
225
- for (int i = 0; i < str.length(); i++) {
235
+ // Do one character test first to minimize loading for the case that
236
+ // we don't match at all (loading more than one character introduces that
237
+ // chance of reading unaligned and reading across cache boundaries).
238
+ // If the first character matches, expect a larger chance of matching the
239
+ // string, and start loading more characters at a time.
240
+ if (mode_ == ASCII) {
241
+ __ cmpb(Operand(esi, edi, times_1, byte_offset),
242
+ static_cast<int8_t>(str[0]));
243
+ } else {
244
+ // Don't use 16-bit immediate. The size changing prefix throws off
245
+ // pre-decoding.
246
+ __ movzx_w(eax,
247
+ Operand(esi, edi, times_1, byte_offset));
248
+ __ cmp(eax, static_cast<int32_t>(str[0]));
249
+ }
250
+ BranchOrBacktrack(not_equal, on_failure);
251
+
252
+ __ lea(ebx, Operand(esi, edi, times_1, 0));
253
+ for (int i = 1, n = str.length(); i < n;) {
226
254
  if (mode_ == ASCII) {
227
- __ cmpb(Operand(esi, edi, times_1, byte_offset + i),
228
- static_cast<int8_t>(str[i]));
255
+ if (i <= n - 4) {
256
+ int combined_chars =
257
+ (static_cast<uint32_t>(str[i + 0]) << 0) |
258
+ (static_cast<uint32_t>(str[i + 1]) << 8) |
259
+ (static_cast<uint32_t>(str[i + 2]) << 16) |
260
+ (static_cast<uint32_t>(str[i + 3]) << 24);
261
+ __ cmp(Operand(ebx, byte_offset + i), Immediate(combined_chars));
262
+ i += 4;
263
+ } else {
264
+ __ cmpb(Operand(ebx, byte_offset + i),
265
+ static_cast<int8_t>(str[i]));
266
+ i += 1;
267
+ }
229
268
  } else {
230
269
  ASSERT(mode_ == UC16);
231
- __ cmpw(Operand(esi, edi, times_1, byte_offset + i * sizeof(uc16)),
232
- Immediate(str[i]));
270
+ if (i <= n - 2) {
271
+ __ cmp(Operand(ebx, byte_offset + i * sizeof(uc16)),
272
+ Immediate(*reinterpret_cast<const int*>(&str[i])));
273
+ i += 2;
274
+ } else {
275
+ // Avoid a 16-bit immediate operation. It uses the length-changing
276
+ // 0x66 prefix which causes pre-decoder misprediction and pipeline
277
+ // stalls. See
278
+ // "Intel(R) 64 and IA-32 Architectures Optimization Reference Manual"
279
+ // (248966.pdf) section 3.4.2.3 "Length-Changing Prefixes (LCP)"
280
+ __ movzx_w(eax,
281
+ Operand(ebx, byte_offset + i * sizeof(uc16)));
282
+ __ cmp(eax, static_cast<int32_t>(str[i]));
283
+ i += 1;
284
+ }
233
285
  }
234
286
  BranchOrBacktrack(not_equal, on_failure);
235
287
  }
@@ -625,7 +677,6 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
625
677
  __ push(edi);
626
678
  __ push(ebx); // Callee-save on MacOS.
627
679
  __ push(Immediate(0)); // Make room for "input start - 1" constant.
628
- __ push(Immediate(0)); // Make room for "at start" constant.
629
680
 
630
681
  // Check if we have space on the stack for registers.
631
682
  Label stack_limit_hit;
@@ -677,14 +728,6 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
677
728
  // position registers.
678
729
  __ mov(Operand(ebp, kInputStartMinusOne), eax);
679
730
 
680
- // Determine whether the start index is zero, that is at the start of the
681
- // string, and store that value in a local variable.
682
- __ xor_(Operand(ecx), ecx); // setcc only operates on cl (lower byte of ecx).
683
- // Register ebx still holds -stringIndex.
684
- __ test(ebx, Operand(ebx));
685
- __ setcc(zero, ecx); // 1 if 0 (start of string), 0 if positive.
686
- __ mov(Operand(ebp, kAtStart), ecx);
687
-
688
731
  if (num_saved_registers_ > 0) { // Always is, if generated from a regexp.
689
732
  // Fill saved registers with initial value = start offset - 1
690
733
  // Fill in stack push order, to avoid accessing across an unwritten
@@ -712,8 +755,8 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
712
755
  __ mov(backtrack_stackpointer(), Operand(ebp, kStackHighEnd));
713
756
  // Load previous char as initial value of current-character.
714
757
  Label at_start;
715
- __ cmp(Operand(ebp, kAtStart), Immediate(0));
716
- __ j(not_equal, &at_start);
758
+ __ cmp(Operand(ebp, kStartIndex), Immediate(0));
759
+ __ j(equal, &at_start);
717
760
  LoadCurrentCharacterUnchecked(-1, 1); // Load previous char.
718
761
  __ jmp(&start_label_);
719
762
  __ bind(&at_start);
@@ -829,7 +872,6 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
829
872
  CodeDesc code_desc;
830
873
  masm_->GetCode(&code_desc);
831
874
  Handle<Code> code = Factory::NewCode(code_desc,
832
- NULL,
833
875
  Code::ComputeFlags(Code::REGEXP),
834
876
  masm_->CodeObject());
835
877
  PROFILE(RegExpCodeCreateEvent(*code, *source));
@@ -1201,3 +1243,5 @@ void RegExpMacroAssemblerIA32::LoadCurrentCharacterUnchecked(int cp_offset,
1201
1243
  #endif // V8_INTERPRETED_REGEXP
1202
1244
 
1203
1245
  }} // namespace v8::internal
1246
+
1247
+ #endif // V8_TARGET_ARCH_IA32