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

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

Issue 24096019: Remove obsolete Runtime_CreateObjectLiteralShallow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/x64/code-stubs-x64.cc ('k') | 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 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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 Comment cmnt(masm_, "[ ObjectLiteral"); 1602 Comment cmnt(masm_, "[ ObjectLiteral");
1603 Handle<FixedArray> constant_properties = expr->constant_properties(); 1603 Handle<FixedArray> constant_properties = expr->constant_properties();
1604 int flags = expr->fast_elements() 1604 int flags = expr->fast_elements()
1605 ? ObjectLiteral::kFastElements 1605 ? ObjectLiteral::kFastElements
1606 : ObjectLiteral::kNoFlags; 1606 : ObjectLiteral::kNoFlags;
1607 flags |= expr->has_function() 1607 flags |= expr->has_function()
1608 ? ObjectLiteral::kHasFunction 1608 ? ObjectLiteral::kHasFunction
1609 : ObjectLiteral::kNoFlags; 1609 : ObjectLiteral::kNoFlags;
1610 int properties_count = constant_properties->length() / 2; 1610 int properties_count = constant_properties->length() / 2;
1611 if ((FLAG_track_double_fields && expr->may_store_doubles()) || 1611 if ((FLAG_track_double_fields && expr->may_store_doubles()) ||
1612 expr->depth() > 1) { 1612 expr->depth() > 1 || Serializer::enabled() ||
1613 flags != ObjectLiteral::kFastElements ||
1614 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1613 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1615 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1614 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1616 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
1615 __ Push(Smi::FromInt(expr->literal_index())); 1617 __ Push(Smi::FromInt(expr->literal_index()));
1616 __ Push(constant_properties); 1618 __ Push(constant_properties);
1617 __ Push(Smi::FromInt(flags)); 1619 __ Push(Smi::FromInt(flags));
1618 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1620 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1619 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements ||
1620 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1621 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1622 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
1623 __ Push(Smi::FromInt(expr->literal_index()));
1624 __ Push(constant_properties);
1625 __ Push(Smi::FromInt(flags));
1626 __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4);
1627 } else { 1621 } else {
1628 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1622 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1629 __ movq(rax, FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1623 __ movq(rax, FieldOperand(rdi, JSFunction::kLiteralsOffset));
1630 __ Move(rbx, Smi::FromInt(expr->literal_index())); 1624 __ Move(rbx, Smi::FromInt(expr->literal_index()));
1631 __ Move(rcx, constant_properties); 1625 __ Move(rcx, constant_properties);
1632 __ Move(rdx, Smi::FromInt(flags)); 1626 __ Move(rdx, Smi::FromInt(flags));
1633 FastCloneShallowObjectStub stub(properties_count); 1627 FastCloneShallowObjectStub stub(properties_count);
1634 __ CallStub(&stub); 1628 __ CallStub(&stub);
1635 } 1629 }
1636 1630
(...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after
4879 *context_length = 0; 4873 *context_length = 0;
4880 return previous_; 4874 return previous_;
4881 } 4875 }
4882 4876
4883 4877
4884 #undef __ 4878 #undef __
4885 4879
4886 } } // namespace v8::internal 4880 } } // namespace v8::internal
4887 4881
4888 #endif // V8_TARGET_ARCH_X64 4882 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698