| Index: src/ast/ast.cc
|
| diff --git a/src/ast/ast.cc b/src/ast/ast.cc
|
| index 5b98e3165447f69f292b898139d85d8ab5161b6c..a8a6bb3eb5dad79e99eabe9d7f74c72a0796cfd9 100644
|
| --- a/src/ast/ast.cc
|
| +++ b/src/ast/ast.cc
|
| @@ -490,7 +490,7 @@ void ObjectLiteral::AssignFeedbackSlots(FeedbackVectorSpec* spec,
|
| ObjectLiteral::Property* property = properties()->at(property_index);
|
|
|
| Expression* value = property->value();
|
| - if (property->kind() != ObjectLiteral::Property::PROTOTYPE) {
|
| + if (!property->IsPrototype()) {
|
| if (FunctionLiteral::NeedsHomeObject(value)) {
|
| property->SetSlot(spec->AddStoreICSlot(language_mode));
|
| }
|
| @@ -512,7 +512,7 @@ void ObjectLiteral::CalculateEmitStore(Zone* zone) {
|
| for (int i = properties()->length() - 1; i >= 0; i--) {
|
| ObjectLiteral::Property* property = properties()->at(i);
|
| if (property->is_computed_name()) continue;
|
| - if (property->kind() == ObjectLiteral::Property::PROTOTYPE) continue;
|
| + if (property->IsPrototype()) continue;
|
| Literal* literal = property->key()->AsLiteral();
|
| DCHECK(!literal->IsNullLiteral());
|
|
|
| @@ -534,8 +534,7 @@ void ObjectLiteral::CalculateEmitStore(Zone* zone) {
|
|
|
|
|
| bool ObjectLiteral::IsBoilerplateProperty(ObjectLiteral::Property* property) {
|
| - return property != NULL &&
|
| - property->kind() != ObjectLiteral::Property::PROTOTYPE;
|
| + return property != NULL && !property->IsPrototype();
|
| }
|
|
|
| void ObjectLiteral::InitDepthAndFlags() {
|
| @@ -550,6 +549,9 @@ void ObjectLiteral::InitDepthAndFlags() {
|
| for (int i = 0; i < properties()->length(); i++) {
|
| ObjectLiteral::Property* property = properties()->at(i);
|
| if (!IsBoilerplateProperty(property)) {
|
| + // __proto__:null has no side-effects and is set directly on the
|
| + // boilerplate.
|
| + if (property->IsNullPrototype()) continue;
|
| is_simple = false;
|
| continue;
|
| }
|
|
|