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

Unified Diff: src/ast.h

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 | « no previous file | src/code-factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 7040ff78350bcfdc524114752ca33e559b0f1199..1c78adb6aa0f1d87bca6d061249444d683b56cf9 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1507,6 +1507,9 @@ class ObjectLiteral FINAL : public MaterializedLiteral {
int ComputeFlags(bool disable_mementos = false) const {
int flags = fast_elements() ? kFastElements : kNoFlags;
flags |= has_function() ? kHasFunction : kNoFlags;
+ if (depth() == 1 && !has_elements() && !may_store_doubles()) {
+ flags |= kShallowProperties;
+ }
if (disable_mementos) {
flags |= kDisableMementos;
}
@@ -1517,7 +1520,8 @@ class ObjectLiteral FINAL : public MaterializedLiteral {
kNoFlags = 0,
kFastElements = 1,
kHasFunction = 1 << 1,
- kDisableMementos = 1 << 2
+ kShallowProperties = 1 << 2,
+ kDisableMementos = 1 << 3
};
struct Accessors: public ZoneObject {
« no previous file with comments | « no previous file | src/code-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698