libv8 3.10.8.0 → 3.11.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. data/Rakefile +10 -3
  2. data/ext/libv8/compiler.rb +46 -0
  3. data/ext/libv8/extconf.rb +5 -1
  4. data/ext/libv8/make.rb +13 -0
  5. data/lib/libv8/version.rb +1 -1
  6. data/patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch +11 -0
  7. data/patches/src_platform-freebsd.cc.patch +10 -0
  8. data/vendor/v8/ChangeLog +124 -0
  9. data/vendor/v8/DEPS +27 -0
  10. data/vendor/v8/Makefile +7 -0
  11. data/vendor/v8/SConstruct +15 -2
  12. data/vendor/v8/build/common.gypi +129 -157
  13. data/vendor/v8/build/gyp_v8 +11 -25
  14. data/vendor/v8/build/standalone.gypi +9 -3
  15. data/vendor/v8/include/v8.h +5 -3
  16. data/vendor/v8/src/SConscript +1 -0
  17. data/vendor/v8/src/api.cc +4 -33
  18. data/vendor/v8/src/api.h +2 -2
  19. data/vendor/v8/src/arm/builtins-arm.cc +5 -4
  20. data/vendor/v8/src/arm/code-stubs-arm.cc +21 -14
  21. data/vendor/v8/src/arm/codegen-arm.cc +2 -2
  22. data/vendor/v8/src/arm/debug-arm.cc +3 -1
  23. data/vendor/v8/src/arm/full-codegen-arm.cc +3 -102
  24. data/vendor/v8/src/arm/ic-arm.cc +30 -33
  25. data/vendor/v8/src/arm/lithium-arm.cc +20 -7
  26. data/vendor/v8/src/arm/lithium-arm.h +10 -4
  27. data/vendor/v8/src/arm/lithium-codegen-arm.cc +106 -60
  28. data/vendor/v8/src/arm/macro-assembler-arm.cc +49 -39
  29. data/vendor/v8/src/arm/macro-assembler-arm.h +5 -4
  30. data/vendor/v8/src/arm/regexp-macro-assembler-arm.cc +115 -55
  31. data/vendor/v8/src/arm/regexp-macro-assembler-arm.h +7 -6
  32. data/vendor/v8/src/arm/simulator-arm.h +6 -6
  33. data/vendor/v8/src/arm/stub-cache-arm.cc +64 -19
  34. data/vendor/v8/src/array.js +7 -3
  35. data/vendor/v8/src/ast.cc +11 -6
  36. data/vendor/v8/src/bootstrapper.cc +9 -11
  37. data/vendor/v8/src/builtins.cc +61 -31
  38. data/vendor/v8/src/code-stubs.cc +23 -9
  39. data/vendor/v8/src/code-stubs.h +1 -0
  40. data/vendor/v8/src/codegen.h +3 -3
  41. data/vendor/v8/src/compiler.cc +1 -1
  42. data/vendor/v8/src/contexts.h +2 -18
  43. data/vendor/v8/src/d8.cc +94 -93
  44. data/vendor/v8/src/d8.h +1 -1
  45. data/vendor/v8/src/debug-agent.cc +3 -3
  46. data/vendor/v8/src/debug.cc +41 -1
  47. data/vendor/v8/src/debug.h +50 -0
  48. data/vendor/v8/src/elements-kind.cc +134 -0
  49. data/vendor/v8/src/elements-kind.h +210 -0
  50. data/vendor/v8/src/elements.cc +356 -190
  51. data/vendor/v8/src/elements.h +36 -28
  52. data/vendor/v8/src/factory.cc +44 -4
  53. data/vendor/v8/src/factory.h +11 -7
  54. data/vendor/v8/src/flag-definitions.h +3 -0
  55. data/vendor/v8/src/frames.h +3 -0
  56. data/vendor/v8/src/full-codegen.cc +2 -1
  57. data/vendor/v8/src/func-name-inferrer.h +2 -0
  58. data/vendor/v8/src/globals.h +3 -0
  59. data/vendor/v8/src/heap-inl.h +16 -4
  60. data/vendor/v8/src/heap.cc +38 -32
  61. data/vendor/v8/src/heap.h +3 -17
  62. data/vendor/v8/src/hydrogen-instructions.cc +28 -5
  63. data/vendor/v8/src/hydrogen-instructions.h +142 -44
  64. data/vendor/v8/src/hydrogen.cc +160 -55
  65. data/vendor/v8/src/hydrogen.h +2 -0
  66. data/vendor/v8/src/ia32/assembler-ia32.h +3 -0
  67. data/vendor/v8/src/ia32/builtins-ia32.cc +5 -4
  68. data/vendor/v8/src/ia32/code-stubs-ia32.cc +22 -16
  69. data/vendor/v8/src/ia32/codegen-ia32.cc +2 -2
  70. data/vendor/v8/src/ia32/debug-ia32.cc +29 -2
  71. data/vendor/v8/src/ia32/full-codegen-ia32.cc +8 -101
  72. data/vendor/v8/src/ia32/ic-ia32.cc +23 -19
  73. data/vendor/v8/src/ia32/lithium-codegen-ia32.cc +126 -80
  74. data/vendor/v8/src/ia32/lithium-codegen-ia32.h +2 -1
  75. data/vendor/v8/src/ia32/lithium-ia32.cc +15 -9
  76. data/vendor/v8/src/ia32/lithium-ia32.h +14 -6
  77. data/vendor/v8/src/ia32/macro-assembler-ia32.cc +50 -40
  78. data/vendor/v8/src/ia32/macro-assembler-ia32.h +5 -4
  79. data/vendor/v8/src/ia32/regexp-macro-assembler-ia32.cc +113 -43
  80. data/vendor/v8/src/ia32/regexp-macro-assembler-ia32.h +9 -4
  81. data/vendor/v8/src/ia32/simulator-ia32.h +4 -4
  82. data/vendor/v8/src/ia32/stub-cache-ia32.cc +52 -14
  83. data/vendor/v8/src/ic.cc +77 -20
  84. data/vendor/v8/src/ic.h +18 -2
  85. data/vendor/v8/src/incremental-marking-inl.h +21 -5
  86. data/vendor/v8/src/incremental-marking.cc +35 -8
  87. data/vendor/v8/src/incremental-marking.h +12 -3
  88. data/vendor/v8/src/isolate.cc +12 -2
  89. data/vendor/v8/src/isolate.h +1 -1
  90. data/vendor/v8/src/jsregexp.cc +66 -26
  91. data/vendor/v8/src/jsregexp.h +60 -31
  92. data/vendor/v8/src/list-inl.h +8 -0
  93. data/vendor/v8/src/list.h +3 -0
  94. data/vendor/v8/src/lithium.cc +5 -2
  95. data/vendor/v8/src/liveedit.cc +57 -5
  96. data/vendor/v8/src/mark-compact-inl.h +17 -11
  97. data/vendor/v8/src/mark-compact.cc +100 -143
  98. data/vendor/v8/src/mark-compact.h +44 -20
  99. data/vendor/v8/src/messages.js +131 -99
  100. data/vendor/v8/src/mips/builtins-mips.cc +5 -4
  101. data/vendor/v8/src/mips/code-stubs-mips.cc +23 -15
  102. data/vendor/v8/src/mips/codegen-mips.cc +2 -2
  103. data/vendor/v8/src/mips/debug-mips.cc +3 -1
  104. data/vendor/v8/src/mips/full-codegen-mips.cc +4 -102
  105. data/vendor/v8/src/mips/ic-mips.cc +34 -36
  106. data/vendor/v8/src/mips/lithium-codegen-mips.cc +116 -68
  107. data/vendor/v8/src/mips/lithium-mips.cc +20 -7
  108. data/vendor/v8/src/mips/lithium-mips.h +11 -4
  109. data/vendor/v8/src/mips/macro-assembler-mips.cc +50 -39
  110. data/vendor/v8/src/mips/macro-assembler-mips.h +5 -4
  111. data/vendor/v8/src/mips/regexp-macro-assembler-mips.cc +110 -50
  112. data/vendor/v8/src/mips/regexp-macro-assembler-mips.h +6 -5
  113. data/vendor/v8/src/mips/simulator-mips.h +5 -5
  114. data/vendor/v8/src/mips/stub-cache-mips.cc +66 -20
  115. data/vendor/v8/src/mksnapshot.cc +5 -1
  116. data/vendor/v8/src/objects-debug.cc +103 -6
  117. data/vendor/v8/src/objects-inl.h +215 -116
  118. data/vendor/v8/src/objects-printer.cc +13 -8
  119. data/vendor/v8/src/objects.cc +608 -331
  120. data/vendor/v8/src/objects.h +129 -94
  121. data/vendor/v8/src/parser.cc +16 -4
  122. data/vendor/v8/src/platform-freebsd.cc +1 -0
  123. data/vendor/v8/src/platform-linux.cc +9 -30
  124. data/vendor/v8/src/platform-posix.cc +28 -7
  125. data/vendor/v8/src/platform-win32.cc +15 -3
  126. data/vendor/v8/src/platform.h +2 -1
  127. data/vendor/v8/src/profile-generator-inl.h +25 -2
  128. data/vendor/v8/src/profile-generator.cc +300 -822
  129. data/vendor/v8/src/profile-generator.h +97 -214
  130. data/vendor/v8/src/regexp-macro-assembler-irregexp.cc +2 -1
  131. data/vendor/v8/src/regexp-macro-assembler-irregexp.h +2 -2
  132. data/vendor/v8/src/regexp-macro-assembler-tracer.cc +6 -5
  133. data/vendor/v8/src/regexp-macro-assembler-tracer.h +1 -1
  134. data/vendor/v8/src/regexp-macro-assembler.cc +7 -3
  135. data/vendor/v8/src/regexp-macro-assembler.h +10 -2
  136. data/vendor/v8/src/regexp.js +6 -0
  137. data/vendor/v8/src/runtime.cc +265 -212
  138. data/vendor/v8/src/runtime.h +6 -5
  139. data/vendor/v8/src/scopes.cc +20 -0
  140. data/vendor/v8/src/scopes.h +6 -3
  141. data/vendor/v8/src/spaces.cc +0 -2
  142. data/vendor/v8/src/string-stream.cc +2 -2
  143. data/vendor/v8/src/v8-counters.h +0 -2
  144. data/vendor/v8/src/v8natives.js +2 -2
  145. data/vendor/v8/src/v8utils.h +6 -3
  146. data/vendor/v8/src/version.cc +1 -1
  147. data/vendor/v8/src/x64/assembler-x64.h +2 -1
  148. data/vendor/v8/src/x64/builtins-x64.cc +5 -4
  149. data/vendor/v8/src/x64/code-stubs-x64.cc +25 -16
  150. data/vendor/v8/src/x64/codegen-x64.cc +2 -2
  151. data/vendor/v8/src/x64/debug-x64.cc +14 -1
  152. data/vendor/v8/src/x64/disasm-x64.cc +1 -1
  153. data/vendor/v8/src/x64/full-codegen-x64.cc +10 -106
  154. data/vendor/v8/src/x64/ic-x64.cc +20 -16
  155. data/vendor/v8/src/x64/lithium-codegen-x64.cc +156 -79
  156. data/vendor/v8/src/x64/lithium-codegen-x64.h +2 -1
  157. data/vendor/v8/src/x64/lithium-x64.cc +18 -8
  158. data/vendor/v8/src/x64/lithium-x64.h +7 -2
  159. data/vendor/v8/src/x64/macro-assembler-x64.cc +50 -40
  160. data/vendor/v8/src/x64/macro-assembler-x64.h +5 -4
  161. data/vendor/v8/src/x64/regexp-macro-assembler-x64.cc +122 -51
  162. data/vendor/v8/src/x64/regexp-macro-assembler-x64.h +17 -8
  163. data/vendor/v8/src/x64/simulator-x64.h +4 -4
  164. data/vendor/v8/src/x64/stub-cache-x64.cc +55 -17
  165. data/vendor/v8/test/cctest/cctest.status +1 -0
  166. data/vendor/v8/test/cctest/test-api.cc +24 -0
  167. data/vendor/v8/test/cctest/test-func-name-inference.cc +38 -0
  168. data/vendor/v8/test/cctest/test-heap-profiler.cc +21 -77
  169. data/vendor/v8/test/cctest/test-heap.cc +164 -3
  170. data/vendor/v8/test/cctest/test-list.cc +12 -0
  171. data/vendor/v8/test/cctest/test-mark-compact.cc +5 -5
  172. data/vendor/v8/test/cctest/test-regexp.cc +14 -8
  173. data/vendor/v8/test/cctest/testcfg.py +2 -0
  174. data/vendor/v8/test/mjsunit/accessor-map-sharing.js +176 -0
  175. data/vendor/v8/test/mjsunit/array-construct-transition.js +3 -3
  176. data/vendor/v8/test/mjsunit/array-literal-transitions.js +10 -10
  177. data/vendor/v8/test/mjsunit/big-array-literal.js +3 -0
  178. data/vendor/v8/test/mjsunit/compiler/inline-construct.js +4 -2
  179. data/vendor/v8/test/mjsunit/debug-liveedit-stack-padding.js +88 -0
  180. data/vendor/v8/test/mjsunit/elements-kind.js +4 -4
  181. data/vendor/v8/test/mjsunit/elements-transition-hoisting.js +2 -2
  182. data/vendor/v8/test/mjsunit/elements-transition.js +5 -5
  183. data/vendor/v8/test/mjsunit/error-constructors.js +68 -33
  184. data/vendor/v8/test/mjsunit/harmony/proxies.js +14 -6
  185. data/vendor/v8/test/mjsunit/mjsunit.status +1 -0
  186. data/vendor/v8/test/mjsunit/packed-elements.js +112 -0
  187. data/vendor/v8/test/mjsunit/regexp-capture-3.js +6 -0
  188. data/vendor/v8/test/mjsunit/regexp-global.js +132 -0
  189. data/vendor/v8/test/mjsunit/regexp.js +11 -0
  190. data/vendor/v8/test/mjsunit/regress/regress-117409.js +52 -0
  191. data/vendor/v8/test/mjsunit/regress/regress-126412.js +33 -0
  192. data/vendor/v8/test/mjsunit/regress/regress-128018.js +35 -0
  193. data/vendor/v8/test/mjsunit/regress/regress-128146.js +33 -0
  194. data/vendor/v8/test/mjsunit/regress/regress-1639-2.js +4 -1
  195. data/vendor/v8/test/mjsunit/regress/regress-1639.js +14 -8
  196. data/vendor/v8/test/mjsunit/regress/regress-1849.js +3 -3
  197. data/vendor/v8/test/mjsunit/regress/regress-1878.js +2 -2
  198. data/vendor/v8/test/mjsunit/regress/regress-2071.js +79 -0
  199. data/vendor/v8/test/mjsunit/regress/regress-2153.js +32 -0
  200. data/vendor/v8/test/mjsunit/regress/regress-crbug-122271.js +4 -4
  201. data/vendor/v8/test/mjsunit/regress/regress-crbug-126414.js +32 -0
  202. data/vendor/v8/test/mjsunit/regress/regress-smi-only-concat.js +2 -2
  203. data/vendor/v8/test/mjsunit/regress/regress-transcendental.js +49 -0
  204. data/vendor/v8/test/mjsunit/stack-traces.js +14 -0
  205. data/vendor/v8/test/mjsunit/unbox-double-arrays.js +4 -3
  206. data/vendor/v8/test/test262/testcfg.py +6 -1
  207. data/vendor/v8/tools/check-static-initializers.sh +11 -3
  208. data/vendor/v8/tools/fuzz-harness.sh +92 -0
  209. data/vendor/v8/tools/grokdump.py +658 -67
  210. data/vendor/v8/tools/gyp/v8.gyp +21 -39
  211. data/vendor/v8/tools/js2c.py +3 -3
  212. data/vendor/v8/tools/jsmin.py +2 -2
  213. data/vendor/v8/tools/presubmit.py +2 -1
  214. data/vendor/v8/tools/test-wrapper-gypbuild.py +25 -11
  215. metadata +624 -612
@@ -1709,23 +1709,23 @@ void HGlobalValueNumberer::ProcessLoopBlock(
1709
1709
  bool can_hoist = !instr->gvn_flags().ContainsAnyOf(depends_flags);
1710
1710
  if (instr->IsTransitionElementsKind()) {
1711
1711
  // It's possible to hoist transitions out of a loop as long as the
1712
- // hoisting wouldn't move the transition past a DependsOn of one of it's
1713
- // changes or any instructions that might change an objects map or
1714
- // elements contents.
1715
- GVNFlagSet changes = instr->ChangesFlags();
1712
+ // hoisting wouldn't move the transition past an instruction that has a
1713
+ // DependsOn flag for anything it changes.
1716
1714
  GVNFlagSet hoist_depends_blockers =
1717
- HValue::ConvertChangesToDependsFlags(changes);
1718
- // In addition to not hoisting transitions above other instructions that
1719
- // change dependencies that the transition changes, it must not be
1720
- // hoisted above map changes and stores to an elements backing store
1721
- // that the transition might change.
1722
- GVNFlagSet hoist_change_blockers = changes;
1723
- hoist_change_blockers.Add(kChangesMaps);
1715
+ HValue::ConvertChangesToDependsFlags(instr->ChangesFlags());
1716
+
1717
+ // In addition, the transition must not be hoisted above elements kind
1718
+ // changes, or if the transition is destructive to the elements buffer,
1719
+ // changes to array pointer or array contents.
1720
+ GVNFlagSet hoist_change_blockers;
1721
+ hoist_change_blockers.Add(kChangesElementsKind);
1724
1722
  HTransitionElementsKind* trans = HTransitionElementsKind::cast(instr);
1725
1723
  if (trans->original_map()->has_fast_double_elements()) {
1724
+ hoist_change_blockers.Add(kChangesElementsPointer);
1726
1725
  hoist_change_blockers.Add(kChangesDoubleArrayElements);
1727
1726
  }
1728
1727
  if (trans->transitioned_map()->has_fast_double_elements()) {
1728
+ hoist_change_blockers.Add(kChangesElementsPointer);
1729
1729
  hoist_change_blockers.Add(kChangesArrayElements);
1730
1730
  }
1731
1731
  if (FLAG_trace_gvn) {
@@ -2758,6 +2758,7 @@ HGraph* HGraphBuilder::CreateGraph() {
2758
2758
  sce.Process();
2759
2759
 
2760
2760
  graph()->EliminateRedundantBoundsChecks();
2761
+ graph()->DehoistSimpleArrayIndexComputations();
2761
2762
 
2762
2763
  return graph();
2763
2764
  }
@@ -3016,7 +3017,6 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb,
3016
3017
  HBoundsCheck* check = HBoundsCheck::cast(i);
3017
3018
  check->ReplaceAllUsesWith(check->index());
3018
3019
 
3019
- isolate()->counters()->array_bounds_checks_seen()->Increment();
3020
3020
  if (!FLAG_array_bounds_checks_elimination) continue;
3021
3021
 
3022
3022
  int32_t offset;
@@ -3035,10 +3035,8 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb,
3035
3035
  *data_p = bb_data_list;
3036
3036
  } else if (data->OffsetIsCovered(offset)) {
3037
3037
  check->DeleteAndReplaceWith(NULL);
3038
- isolate()->counters()->array_bounds_checks_removed()->Increment();
3039
3038
  } else if (data->BasicBlock() == bb) {
3040
3039
  data->CoverCheck(check, offset);
3041
- isolate()->counters()->array_bounds_checks_removed()->Increment();
3042
3040
  } else {
3043
3041
  int32_t new_lower_offset = offset < data->LowerOffset()
3044
3042
  ? offset
@@ -3082,6 +3080,93 @@ void HGraph::EliminateRedundantBoundsChecks() {
3082
3080
  }
3083
3081
 
3084
3082
 
3083
+ static void DehoistArrayIndex(ArrayInstructionInterface* array_operation) {
3084
+ HValue* index = array_operation->GetKey();
3085
+
3086
+ HConstant* constant;
3087
+ HValue* subexpression;
3088
+ int32_t sign;
3089
+ if (index->IsAdd()) {
3090
+ sign = 1;
3091
+ HAdd* add = HAdd::cast(index);
3092
+ if (add->left()->IsConstant()) {
3093
+ subexpression = add->right();
3094
+ constant = HConstant::cast(add->left());
3095
+ } else if (add->right()->IsConstant()) {
3096
+ subexpression = add->left();
3097
+ constant = HConstant::cast(add->right());
3098
+ } else {
3099
+ return;
3100
+ }
3101
+ } else if (index->IsSub()) {
3102
+ sign = -1;
3103
+ HSub* sub = HSub::cast(index);
3104
+ if (sub->left()->IsConstant()) {
3105
+ subexpression = sub->right();
3106
+ constant = HConstant::cast(sub->left());
3107
+ } else if (sub->right()->IsConstant()) {
3108
+ subexpression = sub->left();
3109
+ constant = HConstant::cast(sub->right());
3110
+ } return;
3111
+ } else {
3112
+ return;
3113
+ }
3114
+
3115
+ if (!constant->HasInteger32Value()) return;
3116
+ int32_t value = constant->Integer32Value() * sign;
3117
+ // We limit offset values to 30 bits because we want to avoid the risk of
3118
+ // overflows when the offset is added to the object header size.
3119
+ if (value >= 1 << 30 || value < 0) return;
3120
+ array_operation->SetKey(subexpression);
3121
+ if (index->HasNoUses()) {
3122
+ index->DeleteAndReplaceWith(NULL);
3123
+ }
3124
+ ASSERT(value >= 0);
3125
+ array_operation->SetIndexOffset(static_cast<uint32_t>(value));
3126
+ array_operation->SetDehoisted(true);
3127
+ }
3128
+
3129
+
3130
+ void HGraph::DehoistSimpleArrayIndexComputations() {
3131
+ if (!FLAG_array_index_dehoisting) return;
3132
+
3133
+ HPhase phase("H_Dehoist index computations", this);
3134
+ for (int i = 0; i < blocks()->length(); ++i) {
3135
+ for (HInstruction* instr = blocks()->at(i)->first();
3136
+ instr != NULL;
3137
+ instr = instr->next()) {
3138
+ ArrayInstructionInterface* array_instruction = NULL;
3139
+ if (instr->IsLoadKeyedFastElement()) {
3140
+ HLoadKeyedFastElement* op = HLoadKeyedFastElement::cast(instr);
3141
+ array_instruction = static_cast<ArrayInstructionInterface*>(op);
3142
+ } else if (instr->IsLoadKeyedFastDoubleElement()) {
3143
+ HLoadKeyedFastDoubleElement* op =
3144
+ HLoadKeyedFastDoubleElement::cast(instr);
3145
+ array_instruction = static_cast<ArrayInstructionInterface*>(op);
3146
+ } else if (instr->IsLoadKeyedSpecializedArrayElement()) {
3147
+ HLoadKeyedSpecializedArrayElement* op =
3148
+ HLoadKeyedSpecializedArrayElement::cast(instr);
3149
+ array_instruction = static_cast<ArrayInstructionInterface*>(op);
3150
+ } else if (instr->IsStoreKeyedFastElement()) {
3151
+ HStoreKeyedFastElement* op = HStoreKeyedFastElement::cast(instr);
3152
+ array_instruction = static_cast<ArrayInstructionInterface*>(op);
3153
+ } else if (instr->IsStoreKeyedFastDoubleElement()) {
3154
+ HStoreKeyedFastDoubleElement* op =
3155
+ HStoreKeyedFastDoubleElement::cast(instr);
3156
+ array_instruction = static_cast<ArrayInstructionInterface*>(op);
3157
+ } else if (instr->IsStoreKeyedSpecializedArrayElement()) {
3158
+ HStoreKeyedSpecializedArrayElement* op =
3159
+ HStoreKeyedSpecializedArrayElement::cast(instr);
3160
+ array_instruction = static_cast<ArrayInstructionInterface*>(op);
3161
+ } else {
3162
+ continue;
3163
+ }
3164
+ DehoistArrayIndex(array_instruction);
3165
+ }
3166
+ }
3167
+ }
3168
+
3169
+
3085
3170
  HInstruction* HGraphBuilder::AddInstruction(HInstruction* instr) {
3086
3171
  ASSERT(current_block() != NULL);
3087
3172
  current_block()->AddInstruction(instr);
@@ -3881,7 +3966,7 @@ void HGraphBuilder::VisitForInStatement(ForInStatement* stmt) {
3881
3966
  new(zone()) HLoadKeyedFastElement(
3882
3967
  environment()->ExpressionStackAt(2), // Enum cache.
3883
3968
  environment()->ExpressionStackAt(0), // Iteration index.
3884
- HLoadKeyedFastElement::OMIT_HOLE_CHECK));
3969
+ OMIT_HOLE_CHECK));
3885
3970
 
3886
3971
  // Check if the expected map still matches that of the enumerable.
3887
3972
  // If not just deoptimize.
@@ -4172,7 +4257,7 @@ static bool IsFastLiteral(Handle<JSObject> boilerplate,
4172
4257
  elements->map() != boilerplate->GetHeap()->fixed_cow_array_map()) {
4173
4258
  if (boilerplate->HasFastDoubleElements()) {
4174
4259
  *total_size += FixedDoubleArray::SizeFor(elements->length());
4175
- } else if (boilerplate->HasFastElements()) {
4260
+ } else if (boilerplate->HasFastObjectElements()) {
4176
4261
  Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements);
4177
4262
  int length = elements->length();
4178
4263
  for (int i = 0; i < length; i++) {
@@ -4379,11 +4464,13 @@ void HGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
4379
4464
  Representation::Integer32()));
4380
4465
 
4381
4466
  switch (boilerplate_elements_kind) {
4382
- case FAST_SMI_ONLY_ELEMENTS:
4467
+ case FAST_SMI_ELEMENTS:
4468
+ case FAST_HOLEY_SMI_ELEMENTS:
4383
4469
  // Smi-only arrays need a smi check.
4384
4470
  AddInstruction(new(zone()) HCheckSmi(value));
4385
4471
  // Fall through.
4386
4472
  case FAST_ELEMENTS:
4473
+ case FAST_HOLEY_ELEMENTS:
4387
4474
  AddInstruction(new(zone()) HStoreKeyedFastElement(
4388
4475
  elements,
4389
4476
  key,
@@ -4391,6 +4478,7 @@ void HGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
4391
4478
  boilerplate_elements_kind));
4392
4479
  break;
4393
4480
  case FAST_DOUBLE_ELEMENTS:
4481
+ case FAST_HOLEY_DOUBLE_ELEMENTS:
4394
4482
  AddInstruction(new(zone()) HStoreKeyedFastDoubleElement(elements,
4395
4483
  key,
4396
4484
  value));
@@ -5148,9 +5236,12 @@ HInstruction* HGraphBuilder::BuildExternalArrayElementAccess(
5148
5236
  case EXTERNAL_FLOAT_ELEMENTS:
5149
5237
  case EXTERNAL_DOUBLE_ELEMENTS:
5150
5238
  break;
5151
- case FAST_SMI_ONLY_ELEMENTS:
5239
+ case FAST_SMI_ELEMENTS:
5152
5240
  case FAST_ELEMENTS:
5153
5241
  case FAST_DOUBLE_ELEMENTS:
5242
+ case FAST_HOLEY_SMI_ELEMENTS:
5243
+ case FAST_HOLEY_ELEMENTS:
5244
+ case FAST_HOLEY_DOUBLE_ELEMENTS:
5154
5245
  case DICTIONARY_ELEMENTS:
5155
5246
  case NON_STRICT_ARGUMENTS_ELEMENTS:
5156
5247
  UNREACHABLE();
@@ -5175,13 +5266,16 @@ HInstruction* HGraphBuilder::BuildFastElementAccess(HValue* elements,
5175
5266
  ASSERT(val != NULL);
5176
5267
  switch (elements_kind) {
5177
5268
  case FAST_DOUBLE_ELEMENTS:
5269
+ case FAST_HOLEY_DOUBLE_ELEMENTS:
5178
5270
  return new(zone()) HStoreKeyedFastDoubleElement(
5179
5271
  elements, checked_key, val);
5180
- case FAST_SMI_ONLY_ELEMENTS:
5272
+ case FAST_SMI_ELEMENTS:
5273
+ case FAST_HOLEY_SMI_ELEMENTS:
5181
5274
  // Smi-only arrays need a smi check.
5182
5275
  AddInstruction(new(zone()) HCheckSmi(val));
5183
5276
  // Fall through.
5184
5277
  case FAST_ELEMENTS:
5278
+ case FAST_HOLEY_ELEMENTS:
5185
5279
  return new(zone()) HStoreKeyedFastElement(
5186
5280
  elements, checked_key, val, elements_kind);
5187
5281
  default:
@@ -5190,10 +5284,13 @@ HInstruction* HGraphBuilder::BuildFastElementAccess(HValue* elements,
5190
5284
  }
5191
5285
  }
5192
5286
  // It's an element load (!is_store).
5193
- if (elements_kind == FAST_DOUBLE_ELEMENTS) {
5194
- return new(zone()) HLoadKeyedFastDoubleElement(elements, checked_key);
5195
- } else { // FAST_ELEMENTS or FAST_SMI_ONLY_ELEMENTS.
5196
- return new(zone()) HLoadKeyedFastElement(elements, checked_key);
5287
+ HoleCheckMode mode = IsFastPackedElementsKind(elements_kind) ?
5288
+ OMIT_HOLE_CHECK :
5289
+ PERFORM_HOLE_CHECK;
5290
+ if (IsFastDoubleElementsKind(elements_kind)) {
5291
+ return new(zone()) HLoadKeyedFastDoubleElement(elements, checked_key, mode);
5292
+ } else { // Smi or Object elements.
5293
+ return new(zone()) HLoadKeyedFastElement(elements, checked_key, mode);
5197
5294
  }
5198
5295
  }
5199
5296
 
@@ -5201,15 +5298,30 @@ HInstruction* HGraphBuilder::BuildFastElementAccess(HValue* elements,
5201
5298
  HInstruction* HGraphBuilder::BuildMonomorphicElementAccess(HValue* object,
5202
5299
  HValue* key,
5203
5300
  HValue* val,
5301
+ HValue* dependency,
5204
5302
  Handle<Map> map,
5205
5303
  bool is_store) {
5206
- HInstruction* mapcheck = AddInstruction(new(zone()) HCheckMaps(object, map));
5207
- bool fast_smi_only_elements = map->has_fast_smi_only_elements();
5208
- bool fast_elements = map->has_fast_elements();
5304
+ HInstruction* mapcheck =
5305
+ AddInstruction(new(zone()) HCheckMaps(object, map, dependency));
5306
+ // No GVNFlag is necessary for ElementsKind if there is an explicit dependency
5307
+ // on a HElementsTransition instruction. The flag can also be removed if the
5308
+ // map to check has FAST_HOLEY_ELEMENTS, since there can be no further
5309
+ // ElementsKind transitions. Finally, the dependency can be removed for stores
5310
+ // for FAST_ELEMENTS, since a transition to HOLEY elements won't change the
5311
+ // generated store code.
5312
+ if (dependency ||
5313
+ (map->elements_kind() == FAST_HOLEY_ELEMENTS) ||
5314
+ (map->elements_kind() == FAST_ELEMENTS && is_store)) {
5315
+ mapcheck->ClearGVNFlag(kDependsOnElementsKind);
5316
+ }
5317
+ bool fast_smi_only_elements = map->has_fast_smi_elements();
5318
+ bool fast_elements = map->has_fast_object_elements();
5209
5319
  HInstruction* elements = AddInstruction(new(zone()) HLoadElements(object));
5210
5320
  if (is_store && (fast_elements || fast_smi_only_elements)) {
5211
- AddInstruction(new(zone()) HCheckMaps(
5212
- elements, isolate()->factory()->fixed_array_map()));
5321
+ HCheckMaps* check_cow_map = new(zone()) HCheckMaps(
5322
+ elements, isolate()->factory()->fixed_array_map());
5323
+ check_cow_map->ClearGVNFlag(kDependsOnElementsKind);
5324
+ AddInstruction(check_cow_map);
5213
5325
  }
5214
5326
  HInstruction* length = NULL;
5215
5327
  HInstruction* checked_key = NULL;
@@ -5262,8 +5374,8 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
5262
5374
  for (int i = 0; i < maps->length(); ++i) {
5263
5375
  Handle<Map> map = maps->at(i);
5264
5376
  ElementsKind elements_kind = map->elements_kind();
5265
- if (elements_kind == FAST_DOUBLE_ELEMENTS ||
5266
- elements_kind == FAST_ELEMENTS) {
5377
+ if (IsFastElementsKind(elements_kind) &&
5378
+ elements_kind != GetInitialFastElementsKind()) {
5267
5379
  possible_transitioned_maps.Add(map);
5268
5380
  }
5269
5381
  }
@@ -5277,12 +5389,17 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
5277
5389
 
5278
5390
  int num_untransitionable_maps = 0;
5279
5391
  Handle<Map> untransitionable_map;
5392
+ HTransitionElementsKind* transition = NULL;
5280
5393
  for (int i = 0; i < maps->length(); ++i) {
5281
5394
  Handle<Map> map = maps->at(i);
5282
5395
  ASSERT(map->IsMap());
5283
5396
  if (!transition_target.at(i).is_null()) {
5284
- AddInstruction(new(zone()) HTransitionElementsKind(
5285
- object, map, transition_target.at(i)));
5397
+ ASSERT(Map::IsValidElementsTransition(
5398
+ map->elements_kind(),
5399
+ transition_target.at(i)->elements_kind()));
5400
+ transition = new(zone()) HTransitionElementsKind(
5401
+ object, map, transition_target.at(i));
5402
+ AddInstruction(transition);
5286
5403
  } else {
5287
5404
  type_todo[map->elements_kind()] = true;
5288
5405
  if (map->elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND) {
@@ -5302,7 +5419,7 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
5302
5419
  : BuildLoadKeyedGeneric(object, key));
5303
5420
  } else {
5304
5421
  instr = AddInstruction(BuildMonomorphicElementAccess(
5305
- object, key, val, untransitionable_map, is_store));
5422
+ object, key, val, transition, untransitionable_map, is_store));
5306
5423
  }
5307
5424
  *has_side_effects |= instr->HasObservableSideEffects();
5308
5425
  instr->set_position(position);
@@ -5319,20 +5436,18 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
5319
5436
  HLoadExternalArrayPointer* external_elements = NULL;
5320
5437
  HInstruction* checked_key = NULL;
5321
5438
 
5322
- // Generated code assumes that FAST_SMI_ONLY_ELEMENTS, FAST_ELEMENTS,
5323
- // FAST_DOUBLE_ELEMENTS and DICTIONARY_ELEMENTS are handled before external
5324
- // arrays.
5325
- STATIC_ASSERT(FAST_SMI_ONLY_ELEMENTS < FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND);
5326
- STATIC_ASSERT(FAST_ELEMENTS < FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND);
5439
+ // Generated code assumes that FAST_* and DICTIONARY_ELEMENTS ElementsKinds
5440
+ // are handled before external arrays.
5441
+ STATIC_ASSERT(FAST_SMI_ELEMENTS < FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND);
5442
+ STATIC_ASSERT(FAST_HOLEY_ELEMENTS < FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND);
5327
5443
  STATIC_ASSERT(FAST_DOUBLE_ELEMENTS < FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND);
5328
5444
  STATIC_ASSERT(DICTIONARY_ELEMENTS < FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND);
5329
5445
 
5330
5446
  for (ElementsKind elements_kind = FIRST_ELEMENTS_KIND;
5331
5447
  elements_kind <= LAST_ELEMENTS_KIND;
5332
5448
  elements_kind = ElementsKind(elements_kind + 1)) {
5333
- // After having handled FAST_ELEMENTS, FAST_SMI_ONLY_ELEMENTS,
5334
- // FAST_DOUBLE_ELEMENTS and DICTIONARY_ELEMENTS, we need to add some code
5335
- // that's executed for all external array cases.
5449
+ // After having handled FAST_* and DICTIONARY_ELEMENTS, we need to add some
5450
+ // code that's executed for all external array cases.
5336
5451
  STATIC_ASSERT(LAST_EXTERNAL_ARRAY_ELEMENTS_KIND ==
5337
5452
  LAST_ELEMENTS_KIND);
5338
5453
  if (elements_kind == FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND
@@ -5354,10 +5469,8 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
5354
5469
 
5355
5470
  set_current_block(if_true);
5356
5471
  HInstruction* access;
5357
- if (elements_kind == FAST_SMI_ONLY_ELEMENTS ||
5358
- elements_kind == FAST_ELEMENTS ||
5359
- elements_kind == FAST_DOUBLE_ELEMENTS) {
5360
- if (is_store && elements_kind != FAST_DOUBLE_ELEMENTS) {
5472
+ if (IsFastElementsKind(elements_kind)) {
5473
+ if (is_store && !IsFastDoubleElementsKind(elements_kind)) {
5361
5474
  AddInstruction(new(zone()) HCheckMaps(
5362
5475
  elements, isolate()->factory()->fixed_array_map(),
5363
5476
  elements_kind_branch));
@@ -5444,7 +5557,7 @@ HValue* HGraphBuilder::HandleKeyedElementAccess(HValue* obj,
5444
5557
  : BuildLoadKeyedGeneric(obj, key);
5445
5558
  } else {
5446
5559
  AddInstruction(new(zone()) HCheckNonSmi(obj));
5447
- instr = BuildMonomorphicElementAccess(obj, key, val, map, is_store);
5560
+ instr = BuildMonomorphicElementAccess(obj, key, val, NULL, map, is_store);
5448
5561
  }
5449
5562
  } else if (expr->GetReceiverTypes() != NULL &&
5450
5563
  !expr->GetReceiverTypes()->is_empty()) {
@@ -5713,7 +5826,7 @@ void HGraphBuilder::HandlePolymorphicCallNamed(Call* expr,
5713
5826
  if (expr->ComputeTarget(map, name)) {
5714
5827
  order[ordered_functions++] =
5715
5828
  FunctionSorter(i,
5716
- expr->target()->shared()->code()->profiler_ticks(),
5829
+ expr->target()->shared()->profiler_ticks(),
5717
5830
  InliningAstSize(expr->target()),
5718
5831
  expr->target()->shared()->SourceSize());
5719
5832
  }
@@ -8135,14 +8248,6 @@ void HGraphBuilder::GenerateNumberToString(CallRuntime* call) {
8135
8248
  }
8136
8249
 
8137
8250
 
8138
- // Fast swapping of elements. Takes three expressions, the object and two
8139
- // indices. This should only be used if the indices are known to be
8140
- // non-negative and within bounds of the elements array at the call site.
8141
- void HGraphBuilder::GenerateSwapElements(CallRuntime* call) {
8142
- return Bailout("inlined runtime function: SwapElements");
8143
- }
8144
-
8145
-
8146
8251
  // Fast call for custom callbacks.
8147
8252
  void HGraphBuilder::GenerateCallFunction(CallRuntime* call) {
8148
8253
  // 1 ~ The function to call is not itself an argument to the call.
@@ -267,6 +267,7 @@ class HGraph: public ZoneObject {
267
267
  void AssignDominators();
268
268
  void ReplaceCheckedValues();
269
269
  void EliminateRedundantBoundsChecks();
270
+ void DehoistSimpleArrayIndexComputations();
270
271
  void PropagateDeoptimizingMark();
271
272
 
272
273
  // Returns false if there are phi-uses of the arguments-object
@@ -1092,6 +1093,7 @@ class HGraphBuilder: public AstVisitor {
1092
1093
  HInstruction* BuildMonomorphicElementAccess(HValue* object,
1093
1094
  HValue* key,
1094
1095
  HValue* val,
1096
+ HValue* dependency,
1095
1097
  Handle<Map> map,
1096
1098
  bool is_store);
1097
1099
  HValue* HandlePolymorphicElementAccess(HValue* object,
@@ -640,6 +640,9 @@ class Assembler : public AssemblerBase {
640
640
  static const byte kJccShortPrefix = 0x70;
641
641
  static const byte kJncShortOpcode = kJccShortPrefix | not_carry;
642
642
  static const byte kJcShortOpcode = kJccShortPrefix | carry;
643
+ static const byte kJnzShortOpcode = kJccShortPrefix | not_zero;
644
+ static const byte kJzShortOpcode = kJccShortPrefix | zero;
645
+
643
646
 
644
647
  // ---------------------------------------------------------------------------
645
648
  // Code generation
@@ -900,7 +900,7 @@ static void AllocateEmptyJSArray(MacroAssembler* masm,
900
900
  const int initial_capacity = JSArray::kPreallocatedArrayElements;
901
901
  STATIC_ASSERT(initial_capacity >= 0);
902
902
 
903
- __ LoadInitialArrayMap(array_function, scratch2, scratch1);
903
+ __ LoadInitialArrayMap(array_function, scratch2, scratch1, false);
904
904
 
905
905
  // Allocate the JSArray object together with space for a fixed array with the
906
906
  // requested elements.
@@ -1003,7 +1003,8 @@ static void AllocateJSArray(MacroAssembler* masm,
1003
1003
  ASSERT(!fill_with_hole || array_size.is(ecx)); // rep stos count
1004
1004
  ASSERT(!fill_with_hole || !result.is(eax)); // result is never eax
1005
1005
 
1006
- __ LoadInitialArrayMap(array_function, scratch, elements_array);
1006
+ __ LoadInitialArrayMap(array_function, scratch,
1007
+ elements_array, fill_with_hole);
1007
1008
 
1008
1009
  // Allocate the JSArray object together with space for a FixedArray with the
1009
1010
  // requested elements.
@@ -1274,11 +1275,11 @@ static void ArrayNativeCode(MacroAssembler* masm,
1274
1275
  __ jmp(&prepare_generic_code_call);
1275
1276
 
1276
1277
  __ bind(&not_double);
1277
- // Transition FAST_SMI_ONLY_ELEMENTS to FAST_ELEMENTS.
1278
+ // Transition FAST_SMI_ELEMENTS to FAST_ELEMENTS.
1278
1279
  __ mov(ebx, Operand(esp, 0));
1279
1280
  __ mov(edi, FieldOperand(ebx, HeapObject::kMapOffset));
1280
1281
  __ LoadTransitionedArrayMapConditional(
1281
- FAST_SMI_ONLY_ELEMENTS,
1282
+ FAST_SMI_ELEMENTS,
1282
1283
  FAST_ELEMENTS,
1283
1284
  edi,
1284
1285
  eax,
@@ -3822,20 +3822,24 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
3822
3822
  __ IncrementCounter(counters->regexp_entry_native(), 1);
3823
3823
 
3824
3824
  // Isolates: note we add an additional parameter here (isolate pointer).
3825
- static const int kRegExpExecuteArguments = 8;
3825
+ static const int kRegExpExecuteArguments = 9;
3826
3826
  __ EnterApiExitFrame(kRegExpExecuteArguments);
3827
3827
 
3828
- // Argument 8: Pass current isolate address.
3829
- __ mov(Operand(esp, 7 * kPointerSize),
3828
+ // Argument 9: Pass current isolate address.
3829
+ __ mov(Operand(esp, 8 * kPointerSize),
3830
3830
  Immediate(ExternalReference::isolate_address()));
3831
3831
 
3832
- // Argument 7: Indicate that this is a direct call from JavaScript.
3833
- __ mov(Operand(esp, 6 * kPointerSize), Immediate(1));
3832
+ // Argument 8: Indicate that this is a direct call from JavaScript.
3833
+ __ mov(Operand(esp, 7 * kPointerSize), Immediate(1));
3834
3834
 
3835
- // Argument 6: Start (high end) of backtracking stack memory area.
3835
+ // Argument 7: Start (high end) of backtracking stack memory area.
3836
3836
  __ mov(esi, Operand::StaticVariable(address_of_regexp_stack_memory_address));
3837
3837
  __ add(esi, Operand::StaticVariable(address_of_regexp_stack_memory_size));
3838
- __ mov(Operand(esp, 5 * kPointerSize), esi);
3838
+ __ mov(Operand(esp, 6 * kPointerSize), esi);
3839
+
3840
+ // Argument 6: Set the number of capture registers to zero to force global
3841
+ // regexps to behave as non-global. This does not affect non-global regexps.
3842
+ __ mov(Operand(esp, 5 * kPointerSize), Immediate(0));
3839
3843
 
3840
3844
  // Argument 5: static offsets vector buffer.
3841
3845
  __ mov(Operand(esp, 4 * kPointerSize),
@@ -3898,7 +3902,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
3898
3902
 
3899
3903
  // Check the result.
3900
3904
  Label success;
3901
- __ cmp(eax, NativeRegExpMacroAssembler::SUCCESS);
3905
+ __ cmp(eax, 1);
3906
+ // We expect exactly one result since we force the called regexp to behave
3907
+ // as non-global.
3902
3908
  __ j(equal, &success);
3903
3909
  Label failure;
3904
3910
  __ cmp(eax, NativeRegExpMacroAssembler::FAILURE);
@@ -7057,8 +7063,8 @@ static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = {
7057
7063
  // KeyedStoreStubCompiler::GenerateStoreFastElement.
7058
7064
  { REG(edi), REG(ebx), REG(ecx), EMIT_REMEMBERED_SET},
7059
7065
  { REG(edx), REG(edi), REG(ebx), EMIT_REMEMBERED_SET},
7060
- // ElementsTransitionGenerator::GenerateSmiOnlyToObject
7061
- // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble
7066
+ // ElementsTransitionGenerator::GenerateMapChangeElementTransition
7067
+ // and ElementsTransitionGenerator::GenerateSmiToDouble
7062
7068
  // and ElementsTransitionGenerator::GenerateDoubleToObject
7063
7069
  { REG(edx), REG(ebx), REG(edi), EMIT_REMEMBERED_SET},
7064
7070
  { REG(edx), REG(ebx), REG(edi), OMIT_REMEMBERED_SET},
@@ -7330,9 +7336,9 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
7330
7336
 
7331
7337
  __ CheckFastElements(edi, &double_elements);
7332
7338
 
7333
- // FAST_SMI_ONLY_ELEMENTS or FAST_ELEMENTS
7339
+ // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements
7334
7340
  __ JumpIfSmi(eax, &smi_element);
7335
- __ CheckFastSmiOnlyElements(edi, &fast_elements, Label::kNear);
7341
+ __ CheckFastSmiElements(edi, &fast_elements, Label::kNear);
7336
7342
 
7337
7343
  // Store into the array literal requires a elements transition. Call into
7338
7344
  // the runtime.
@@ -7354,7 +7360,7 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
7354
7360
  __ pop(edx);
7355
7361
  __ jmp(&slow_elements);
7356
7362
 
7357
- // Array literal has ElementsKind of FAST_ELEMENTS and value is an object.
7363
+ // Array literal has ElementsKind of FAST_*_ELEMENTS and value is an object.
7358
7364
  __ bind(&fast_elements);
7359
7365
  __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset));
7360
7366
  __ lea(ecx, FieldOperand(ebx, ecx, times_half_pointer_size,
@@ -7367,15 +7373,15 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
7367
7373
  OMIT_SMI_CHECK);
7368
7374
  __ ret(0);
7369
7375
 
7370
- // Array literal has ElementsKind of FAST_SMI_ONLY_ELEMENTS or
7371
- // FAST_ELEMENTS, and value is Smi.
7376
+ // Array literal has ElementsKind of FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS,
7377
+ // and value is Smi.
7372
7378
  __ bind(&smi_element);
7373
7379
  __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset));
7374
7380
  __ mov(FieldOperand(ebx, ecx, times_half_pointer_size,
7375
7381
  FixedArrayBase::kHeaderSize), eax);
7376
7382
  __ ret(0);
7377
7383
 
7378
- // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS.
7384
+ // Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS.
7379
7385
  __ bind(&double_elements);
7380
7386
 
7381
7387
  __ push(edx);