Index: src/ast/ast.cc |
diff --git a/src/ast/ast.cc b/src/ast/ast.cc |
index 3aa7c99cf646018ae2f20617ab8efce68025eefe..d56ef0fbfeb8bf43457d31537ec62922709a12eb 100644 |
--- a/src/ast/ast.cc |
+++ b/src/ast/ast.cc |
@@ -520,7 +520,6 @@ void ObjectLiteral::InitDepthAndFlags() { |
for (int i = 0; i < properties()->length(); i++) { |
ObjectLiteral::Property* property = properties()->at(i); |
if (!IsBoilerplateProperty(property)) { |
- DCHECK(has_seen_proto()); |
is_simple = false; |
continue; |
} |
@@ -584,9 +583,14 @@ void ObjectLiteral::BuildConstantProperties(Isolate* isolate) { |
if (!constant_properties_.is_null()) return; |
int index_keys = 0; |
+ bool has_seen_proto = false; |
for (int i = 0; i < properties()->length(); i++) { |
ObjectLiteral::Property* property = properties()->at(i); |
- if (!IsBoilerplateProperty(property) || property->is_computed_name()) { |
+ if (!IsBoilerplateProperty(property)) { |
+ has_seen_proto = true; |
+ continue; |
+ } |
+ if (property->is_computed_name()) { |
continue; |
} |
@@ -601,7 +605,7 @@ void ObjectLiteral::BuildConstantProperties(Isolate* isolate) { |
Handle<BoilerplateDescription> constant_properties = |
isolate->factory()->NewBoilerplateDescription( |
boilerplate_properties_, properties()->length() - index_keys, |
- has_seen_proto()); |
+ has_seen_proto); |
int position = 0; |
for (int i = 0; i < properties()->length(); i++) { |