Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1405503002: VectorICs: use a vector slot to aid in array literal processing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips issues. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 context()->PlugTOS(); 1746 context()->PlugTOS();
1747 } else { 1747 } else {
1748 context()->Plug(r0); 1748 context()->Plug(r0);
1749 } 1749 }
1750 } 1750 }
1751 1751
1752 1752
1753 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1753 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1754 Comment cmnt(masm_, "[ ArrayLiteral"); 1754 Comment cmnt(masm_, "[ ArrayLiteral");
1755 1755
1756 expr->BuildConstantElements(isolate()); 1756 expr->BuildConstantElements(isolate());
Michael Starzinger 2015/10/13 11:59:18 This shouldn't be needed anymore, since the number
mvstanton 2015/10/13 12:56:10 Done.
1757 1757
1758 Handle<FixedArray> constant_elements = expr->constant_elements(); 1758 Handle<FixedArray> constant_elements = expr->constant_elements();
1759 bool has_fast_elements = 1759 bool has_fast_elements =
1760 IsFastObjectElementsKind(expr->constant_elements_kind()); 1760 IsFastObjectElementsKind(expr->constant_elements_kind());
1761 Handle<FixedArrayBase> constant_elements_values( 1761 Handle<FixedArrayBase> constant_elements_values(
1762 FixedArrayBase::cast(constant_elements->get(1))); 1762 FixedArrayBase::cast(constant_elements->get(1)));
1763 1763
1764 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1764 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1765 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1765 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1766 // If the only customer of allocation sites is transitioning, then 1766 // If the only customer of allocation sites is transitioning, then
(...skipping 30 matching lines...) Expand all
1797 // is already set in the cloned array. 1797 // is already set in the cloned array.
1798 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 1798 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
1799 1799
1800 if (!result_saved) { 1800 if (!result_saved) {
1801 __ push(r0); 1801 __ push(r0);
1802 __ Push(Smi::FromInt(expr->literal_index())); 1802 __ Push(Smi::FromInt(expr->literal_index()));
1803 result_saved = true; 1803 result_saved = true;
1804 } 1804 }
1805 VisitForAccumulatorValue(subexpr); 1805 VisitForAccumulatorValue(subexpr);
1806 1806
1807 if (has_fast_elements) { 1807 if (FLAG_vector_stores) {
1808 __ mov(StoreDescriptor::NameRegister(),
1809 Operand(Smi::FromInt(array_index)));
1810 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp, kPointerSize));
1811 EmitLoadStoreICSlot(expr->LiteralFeedbackSlot());
1812 Handle<Code> ic =
1813 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
1814 CallIC(ic);
1815 } else if (has_fast_elements) {
1808 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize); 1816 int offset = FixedArray::kHeaderSize + (array_index * kPointerSize);
1809 __ ldr(r6, MemOperand(sp, kPointerSize)); // Copy of array literal. 1817 __ ldr(r6, MemOperand(sp, kPointerSize)); // Copy of array literal.
1810 __ ldr(r1, FieldMemOperand(r6, JSObject::kElementsOffset)); 1818 __ ldr(r1, FieldMemOperand(r6, JSObject::kElementsOffset));
1811 __ str(result_register(), FieldMemOperand(r1, offset)); 1819 __ str(result_register(), FieldMemOperand(r1, offset));
1812 // Update the write barrier for the array store. 1820 // Update the write barrier for the array store.
1813 __ RecordWriteField(r1, offset, result_register(), r2, 1821 __ RecordWriteField(r1, offset, result_register(), r2,
1814 kLRHasBeenSaved, kDontSaveFPRegs, 1822 kLRHasBeenSaved, kDontSaveFPRegs,
1815 EMIT_REMEMBERED_SET, INLINE_SMI_CHECK); 1823 EMIT_REMEMBERED_SET, INLINE_SMI_CHECK);
1816 } else { 1824 } else {
1817 __ mov(r3, Operand(Smi::FromInt(array_index))); 1825 __ mov(r3, Operand(Smi::FromInt(array_index)));
(...skipping 3462 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 DCHECK(interrupt_address == 5288 DCHECK(interrupt_address ==
5281 isolate->builtins()->OsrAfterStackCheck()->entry()); 5289 isolate->builtins()->OsrAfterStackCheck()->entry());
5282 return OSR_AFTER_STACK_CHECK; 5290 return OSR_AFTER_STACK_CHECK;
5283 } 5291 }
5284 5292
5285 5293
5286 } // namespace internal 5294 } // namespace internal
5287 } // namespace v8 5295 } // namespace v8
5288 5296
5289 #endif // V8_TARGET_ARCH_ARM 5297 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698