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

Unified Diff: src/full-codegen.cc

Issue 1156323004: Version 4.2.77.21 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.2
Patch Set: Created 5 years, 7 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/full-codegen.h ('k') | src/hydrogen.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 6f43497a799ed73d0d6b1c6845d6bfcb400fb36f..b0bf3b84a9298fe1134090e241f0779f6e5cb7d3 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -415,6 +415,27 @@ void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) {
}
+bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime(
+ ObjectLiteral* expr) const {
+ // 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() ||
+ expr->properties_count() >
+ FastCloneShallowObjectStub::kMaximumClonedProperties;
+}
+
+
+bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime(
+ ArrayLiteral* expr) const {
+ return expr->depth() > 1 ||
+ expr->values()->length() > JSObject::kInitialMaxFastElementArray;
+}
+
+
void FullCodeGenerator::Initialize() {
InitializeAstVisitor(info_->isolate(), info_->zone());
// The generation of debug code must match between the snapshot code and the
« no previous file with comments | « src/full-codegen.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698