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

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

Issue 13529018: MIPS: Compile FastCloneShallowArrayStub using Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 bool has_fast_elements = 1730 bool has_fast_elements =
1731 IsFastObjectElementsKind(constant_elements_kind); 1731 IsFastObjectElementsKind(constant_elements_kind);
1732 Handle<FixedArrayBase> constant_elements_values( 1732 Handle<FixedArrayBase> constant_elements_values(
1733 FixedArrayBase::cast(constant_elements->get(1))); 1733 FixedArrayBase::cast(constant_elements->get(1)));
1734 1734
1735 __ mov(a0, result_register()); 1735 __ mov(a0, result_register());
1736 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1736 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1737 __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); 1737 __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset));
1738 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); 1738 __ li(a2, Operand(Smi::FromInt(expr->literal_index())));
1739 __ li(a1, Operand(constant_elements)); 1739 __ li(a1, Operand(constant_elements));
1740 __ Push(a3, a2, a1);
1741 if (has_fast_elements && constant_elements_values->map() == 1740 if (has_fast_elements && constant_elements_values->map() ==
1742 isolate()->heap()->fixed_cow_array_map()) { 1741 isolate()->heap()->fixed_cow_array_map()) {
1743 FastCloneShallowArrayStub stub( 1742 FastCloneShallowArrayStub stub(
1744 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, 1743 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS,
1745 DONT_TRACK_ALLOCATION_SITE, 1744 DONT_TRACK_ALLOCATION_SITE,
1746 length); 1745 length);
1747 __ CallStub(&stub); 1746 __ CallStub(&stub);
1748 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), 1747 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(),
1749 1, a1, a2); 1748 1, a1, a2);
1750 } else if (expr->depth() > 1) { 1749 } else if (expr->depth() > 1) {
1750 __ Push(a3, a2, a1);
1751 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); 1751 __ CallRuntime(Runtime::kCreateArrayLiteral, 3);
1752 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) { 1752 } else if (Serializer::enabled() ||
1753 length > FastCloneShallowArrayStub::kMaximumClonedLength) {
1754 __ Push(a3, a2, a1);
1753 __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); 1755 __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3);
1754 } else { 1756 } else {
1755 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || 1757 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) ||
1756 FLAG_smi_only_arrays); 1758 FLAG_smi_only_arrays);
1757 FastCloneShallowArrayStub::Mode mode = 1759 FastCloneShallowArrayStub::Mode mode =
1758 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; 1760 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS;
1759 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites 1761 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites
1760 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE; 1762 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE;
1761 1763
1762 if (has_fast_elements) { 1764 if (has_fast_elements) {
(...skipping 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after
4602 *context_length = 0; 4604 *context_length = 0;
4603 return previous_; 4605 return previous_;
4604 } 4606 }
4605 4607
4606 4608
4607 #undef __ 4609 #undef __
4608 4610
4609 } } // namespace v8::internal 4611 } } // namespace v8::internal
4610 4612
4611 #endif // V8_TARGET_ARCH_MIPS 4613 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698