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

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

Issue 1471823005: PPC: [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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 } 1488 }
1489 } 1489 }
1490 } 1490 }
1491 1491
1492 1492
1493 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1493 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1494 Comment cmnt(masm_, "[ ObjectLiteral"); 1494 Comment cmnt(masm_, "[ ObjectLiteral");
1495 1495
1496 Handle<FixedArray> constant_properties = expr->constant_properties(); 1496 Handle<FixedArray> constant_properties = expr->constant_properties();
1497 __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1497 __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1498 __ LoadP(r6, FieldMemOperand(r6, JSFunction::kLiteralsOffset));
1499 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); 1498 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index()));
1500 __ mov(r4, Operand(constant_properties)); 1499 __ mov(r4, Operand(constant_properties));
1501 int flags = expr->ComputeFlags(); 1500 int flags = expr->ComputeFlags();
1502 __ LoadSmiLiteral(r3, Smi::FromInt(flags)); 1501 __ LoadSmiLiteral(r3, Smi::FromInt(flags));
1503 if (MustCreateObjectLiteralWithRuntime(expr)) { 1502 if (MustCreateObjectLiteralWithRuntime(expr)) {
1504 __ Push(r6, r5, r4, r3); 1503 __ Push(r6, r5, r4, r3);
1505 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1504 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1506 } else { 1505 } else {
1507 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); 1506 FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
1508 __ CallStub(&stub); 1507 __ CallStub(&stub);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 FixedArrayBase::cast(constant_elements->get(1))); 1693 FixedArrayBase::cast(constant_elements->get(1)));
1695 1694
1696 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; 1695 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
1697 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { 1696 if (has_fast_elements && !FLAG_allocation_site_pretenuring) {
1698 // If the only customer of allocation sites is transitioning, then 1697 // If the only customer of allocation sites is transitioning, then
1699 // we can turn it off if we don't have anywhere else to transition to. 1698 // we can turn it off if we don't have anywhere else to transition to.
1700 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; 1699 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE;
1701 } 1700 }
1702 1701
1703 __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1702 __ LoadP(r6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1704 __ LoadP(r6, FieldMemOperand(r6, JSFunction::kLiteralsOffset));
1705 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); 1703 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index()));
1706 __ mov(r4, Operand(constant_elements)); 1704 __ mov(r4, Operand(constant_elements));
1707 if (MustCreateArrayLiteralWithRuntime(expr)) { 1705 if (MustCreateArrayLiteralWithRuntime(expr)) {
1708 __ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags())); 1706 __ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags()));
1709 __ Push(r6, r5, r4, r3); 1707 __ Push(r6, r5, r4, r3);
1710 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); 1708 __ CallRuntime(Runtime::kCreateArrayLiteral, 4);
1711 } else { 1709 } else {
1712 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); 1710 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode);
1713 __ CallStub(&stub); 1711 __ CallStub(&stub);
1714 } 1712 }
(...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after
5002 return ON_STACK_REPLACEMENT; 5000 return ON_STACK_REPLACEMENT;
5003 } 5001 }
5004 5002
5005 DCHECK(interrupt_address == 5003 DCHECK(interrupt_address ==
5006 isolate->builtins()->OsrAfterStackCheck()->entry()); 5004 isolate->builtins()->OsrAfterStackCheck()->entry());
5007 return OSR_AFTER_STACK_CHECK; 5005 return OSR_AFTER_STACK_CHECK;
5008 } 5006 }
5009 } // namespace internal 5007 } // namespace internal
5010 } // namespace v8 5008 } // namespace v8
5011 #endif // V8_TARGET_ARCH_PPC 5009 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698