Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index f1b918b4fd75a5136b795b5e7398c4e9c510215d..b4374360c60ebbbe7ceb86a6cf0a6644eb4352ae 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -415,24 +415,29 @@ bool ToBooleanStub::Types::CanBeUndetectable() const { |
} |
-void FastElementsConversionStub::Generate(MacroAssembler* masm) { |
- if (to_ == FAST_ELEMENTS) { |
- if (from_ == FAST_SMI_ONLY_ELEMENTS) { |
- GenerateSmiOnlyToObject(masm, strict_mode_); |
- } else if (from_ == FAST_DOUBLE_ELEMENTS) { |
- GenerateDoubleToObject(masm, strict_mode_); |
+void ElementsTransitionAndStoreStub::Generate(MacroAssembler* masm) { |
+ Label fail; |
+ if (!FLAG_trace_elements_transitions) { |
+ if (to_ == FAST_ELEMENTS) { |
+ if (from_ == FAST_SMI_ONLY_ELEMENTS) { |
+ ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm); |
+ } else if (from_ == FAST_DOUBLE_ELEMENTS) { |
+ ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
+ } else { |
+ UNREACHABLE(); |
+ } |
+ KeyedStoreStubCompiler::GenerateStoreFastElement(masm, |
+ is_jsarray_, |
+ FAST_ELEMENTS); |
+ } else if (from_ == FAST_SMI_ONLY_ELEMENTS && to_ == FAST_DOUBLE_ELEMENTS) { |
+ ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
+ KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_); |
} else { |
UNREACHABLE(); |
} |
- KeyedStoreStubCompiler::GenerateStoreFastElement(masm, |
- is_jsarray_, |
- FAST_ELEMENTS); |
- } else if (from_ == FAST_SMI_ONLY_ELEMENTS && to_ == FAST_DOUBLE_ELEMENTS) { |
- GenerateSmiOnlyToDouble(masm, strict_mode_); |
- KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_); |
- } else { |
- UNREACHABLE(); |
} |
+ masm->bind(&fail); |
+ KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); |
} |
} } // namespace v8::internal |