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

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

Issue 1469833005: [runtime] Pass closure to %CreateArrayLiteral and %CreateObjectLiteral. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 } 1510 }
1511 } 1511 }
1512 } 1512 }
1513 1513
1514 1514
1515 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1515 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1516 Comment cmnt(masm_, "[ ObjectLiteral"); 1516 Comment cmnt(masm_, "[ ObjectLiteral");
1517 1517
1518 Handle<FixedArray> constant_properties = expr->constant_properties(); 1518 Handle<FixedArray> constant_properties = expr->constant_properties();
1519 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1519 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1520 __ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset));
1521 __ Mov(x2, Smi::FromInt(expr->literal_index())); 1520 __ Mov(x2, Smi::FromInt(expr->literal_index()));
1522 __ Mov(x1, Operand(constant_properties)); 1521 __ Mov(x1, Operand(constant_properties));
1523 int flags = expr->ComputeFlags(); 1522 int flags = expr->ComputeFlags();
1524 __ Mov(x0, Smi::FromInt(flags)); 1523 __ Mov(x0, Smi::FromInt(flags));
1525 if (MustCreateObjectLiteralWithRuntime(expr)) { 1524 if (MustCreateObjectLiteralWithRuntime(expr)) {
1526 __ Push(x3, x2, x1, x0); 1525 __ Push(x3, x2, x1, x0);
1527 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1526 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1528 } else { 1527 } else {
1529 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); 1528 FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
1530 __ CallStub(&stub); 1529 __ CallStub(&stub);
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 IsFastObjectElementsKind(expr->constant_elements_kind()); 1713 IsFastObjectElementsKind(expr->constant_elements_kind());
1715 1714
1716 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1715 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1717 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1716 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1718 // If the only customer of allocation sites is transitioning, then 1717 // If the only customer of allocation sites is transitioning, then
1719 // we can turn it off if we don't have anywhere else to transition to. 1718 // we can turn it off if we don't have anywhere else to transition to.
1720 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; 1719 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
1721 } 1720 }
1722 1721
1723 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1722 __ Ldr(x3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1724 __ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset));
1725 __ Mov(x2, Smi::FromInt(expr->literal_index())); 1723 __ Mov(x2, Smi::FromInt(expr->literal_index()));
1726 __ Mov(x1, Operand(constant_elements)); 1724 __ Mov(x1, Operand(constant_elements));
1727 if (MustCreateArrayLiteralWithRuntime(expr)) { 1725 if (MustCreateArrayLiteralWithRuntime(expr)) {
1728 __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); 1726 __ Mov(x0, Smi::FromInt(expr->ComputeFlags()));
1729 __ Push(x3, x2, x1, x0); 1727 __ Push(x3, x2, x1, x0);
1730 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); 1728 __ CallRuntime(Runtime::kCreateArrayLiteral, 4);
1731 } else { 1729 } else {
1732 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1730 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
1733 __ CallStub(&stub); 1731 __ CallStub(&stub);
1734 } 1732 }
(...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after
5038 } 5036 }
5039 5037
5040 return INTERRUPT; 5038 return INTERRUPT;
5041 } 5039 }
5042 5040
5043 5041
5044 } // namespace internal 5042 } // namespace internal
5045 } // namespace v8 5043 } // namespace v8
5046 5044
5047 #endif // V8_TARGET_ARCH_ARM64 5045 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698