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

Unified Diff: src/full-codegen.cc

Issue 1097963002: [turbofan] Use FastCloneShallow[Array|Object]Stub if possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/linkage.cc ('k') | test/unittests/compiler/js-intrinsic-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 6acfb97de3a5321b91d9d22a3c0d2de4f2f9535b..5b1154ca2083010a75e415819efd8853b72278a2 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -420,13 +420,13 @@ void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) {
bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime(
ObjectLiteral* expr) const {
+ int literal_flags = expr->ComputeFlags();
// FastCloneShallowObjectStub doesn't copy elements, and object literals don't
// support copy-on-write (COW) elements for now.
// TODO(mvstanton): make object literals support COW elements.
- return expr->may_store_doubles() || expr->depth() > 1 ||
- masm()->serializer_enabled() ||
- expr->ComputeFlags() != ObjectLiteral::kFastElements ||
- expr->has_elements() ||
+ return masm()->serializer_enabled() ||
+ literal_flags != ObjectLiteral::kShallowProperties ||
+ literal_flags != ObjectLiteral::kFastElements ||
expr->properties_count() >
FastCloneShallowObjectStub::kMaximumClonedProperties;
}
« no previous file with comments | « src/compiler/linkage.cc ('k') | test/unittests/compiler/js-intrinsic-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698