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

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

Issue 12220074: Compile FastCloneShallowObjectStub using Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 7 years, 9 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/arm/deoptimizer-arm.cc ('k') | src/arm/lithium-arm.h » ('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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 __ push(r1); 1573 __ push(r1);
1574 } else { 1574 } else {
1575 VisitForStackValue(expression); 1575 VisitForStackValue(expression);
1576 } 1576 }
1577 } 1577 }
1578 1578
1579 1579
1580 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1580 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1581 Comment cmnt(masm_, "[ ObjectLiteral"); 1581 Comment cmnt(masm_, "[ ObjectLiteral");
1582 Handle<FixedArray> constant_properties = expr->constant_properties(); 1582 Handle<FixedArray> constant_properties = expr->constant_properties();
1583 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 1583 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1584 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); 1584 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset));
1585 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); 1585 __ mov(r2, Operand(Smi::FromInt(expr->literal_index())));
1586 __ mov(r1, Operand(constant_properties)); 1586 __ mov(r1, Operand(constant_properties));
1587 int flags = expr->fast_elements() 1587 int flags = expr->fast_elements()
1588 ? ObjectLiteral::kFastElements 1588 ? ObjectLiteral::kFastElements
1589 : ObjectLiteral::kNoFlags; 1589 : ObjectLiteral::kNoFlags;
1590 flags |= expr->has_function() 1590 flags |= expr->has_function()
1591 ? ObjectLiteral::kHasFunction 1591 ? ObjectLiteral::kHasFunction
1592 : ObjectLiteral::kNoFlags; 1592 : ObjectLiteral::kNoFlags;
1593 __ mov(r0, Operand(Smi::FromInt(flags))); 1593 __ mov(r0, Operand(Smi::FromInt(flags)));
1594 __ Push(r3, r2, r1, r0);
1595 int properties_count = constant_properties->length() / 2; 1594 int properties_count = constant_properties->length() / 2;
1596 if (expr->depth() > 1) { 1595 if (expr->depth() > 1) {
1596 __ Push(r3, r2, r1, r0);
1597 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1597 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1598 } else if (flags != ObjectLiteral::kFastElements || 1598 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements ||
1599 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 1599 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1600 __ Push(r3, r2, r1, r0);
1600 __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4); 1601 __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4);
1601 } else { 1602 } else {
1602 FastCloneShallowObjectStub stub(properties_count); 1603 FastCloneShallowObjectStub stub(properties_count);
1603 __ CallStub(&stub); 1604 __ CallStub(&stub);
1604 } 1605 }
1605 1606
1606 // If result_saved is true the result is on top of the stack. If 1607 // If result_saved is true the result is on top of the stack. If
1607 // result_saved is false the result is in r0. 1608 // result_saved is false the result is in r0.
1608 bool result_saved = false; 1609 bool result_saved = false;
1609 1610
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
4563 *context_length = 0; 4564 *context_length = 0;
4564 return previous_; 4565 return previous_;
4565 } 4566 }
4566 4567
4567 4568
4568 #undef __ 4569 #undef __
4569 4570
4570 } } // namespace v8::internal 4571 } } // namespace v8::internal
4571 4572
4572 #endif // V8_TARGET_ARCH_ARM 4573 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698