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

Unified Diff: bleeding_edge/src/ia32/codegen-ia32.cc

Issue 503055: Avoid using full array literal boilerplate cloning for non-nested... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bleeding_edge/src/ia32/codegen-ia32.cc
===================================================================
--- bleeding_edge/src/ia32/codegen-ia32.cc (revision 3488)
+++ bleeding_edge/src/ia32/codegen-ia32.cc (working copy)
@@ -4443,10 +4443,13 @@
// Clone the boilerplate object.
int length = node->values()->length();
Result clone;
- if (node->depth() == 1 &&
- length <= FastCloneShallowArrayStub::kMaximumLength) {
- FastCloneShallowArrayStub stub(length);
- clone = frame_->CallStub(&stub, 1);
+ if (node->depth() == 1) {
+ if (length <= FastCloneShallowArrayStub::kMaximumLength) {
+ FastCloneShallowArrayStub stub(length);
+ clone = frame_->CallStub(&stub, 1);
+ } else {
+ clone = frame_->CallRuntime(Runtime::kCloneShallowLiteralBoilerplate, 1);
+ }
} else {
clone = frame_->CallRuntime(Runtime::kCloneLiteralBoilerplate, 1);
}
« 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