From: mvstanton Date: Tue, 26 May 2015 09:05:53 +0000 (-0700) Subject: Move work to omit unnecessary ObjectLiteral stores to the numbering pass. X-Git-Tag: upstream/4.7.83~2425 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32de677805877bbf8d697926e09c23963a27e191;p=platform%2Fupstream%2Fv8.git Move work to omit unnecessary ObjectLiteral stores to the numbering pass. The reason is that this information will be needed to compute the number of vector ic slots done at numbering time. BUG= Review URL: https://codereview.chromium.org/1150323002 Cr-Commit-Position: refs/heads/master@{#28615} --- diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc index d3eb1d1..8539ad4 100644 --- a/src/arm/full-codegen-arm.cc +++ b/src/arm/full-codegen-arm.cc @@ -1676,11 +1676,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { // result_saved is false the result is in r0. bool result_saved = false; - // Mark all computed expressions that are bound to a key that - // is shadowed by a later occurrence of the same key. For the - // marked expressions, no store code is emitted. - expr->CalculateEmitStore(zone()); - AccessorTable accessor_table(zone()); int property_index = 0; for (; property_index < expr->properties()->length(); property_index++) { diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc index 171765d..36aad7c 100644 --- a/src/arm64/full-codegen-arm64.cc +++ b/src/arm64/full-codegen-arm64.cc @@ -1652,11 +1652,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { // result_saved is false the result is in x0. bool result_saved = false; - // Mark all computed expressions that are bound to a key that - // is shadowed by a later occurrence of the same key. For the - // marked expressions, no store code is emitted. - expr->CalculateEmitStore(zone()); - AccessorTable accessor_table(zone()); int property_index = 0; for (; property_index < expr->properties()->length(); property_index++) { diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc index 68dc65a..4ec93ed 100644 --- a/src/ast-numbering.cc +++ b/src/ast-numbering.cc @@ -432,6 +432,10 @@ void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { for (int i = 0; i < node->properties()->length(); i++) { VisitObjectLiteralProperty(node->properties()->at(i)); } + // Mark all computed expressions that are bound to a key that + // is shadowed by a later occurrence of the same key. For the + // marked expressions, no store code will be is emitted. + node->CalculateEmitStore(zone()); } diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc index bf2da02..f53114f 100644 --- a/src/compiler/ast-graph-builder.cc +++ b/src/compiler/ast-graph-builder.cc @@ -1786,11 +1786,6 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { // property values and is the value of the entire expression. environment()->Push(literal); - // Mark all computed expressions that are bound to a key that is shadowed by - // a later occurrence of the same key. For the marked expressions, no store - // code is emitted. - expr->CalculateEmitStore(zone()); - // Create nodes to store computed values into the literal. int property_index = 0; AccessorTable accessor_table(zone()); diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 84de23d..8af0c33 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -5684,8 +5684,6 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) { // of the property values and is the value of the entire expression. Push(literal); - expr->CalculateEmitStore(zone()); - for (int i = 0; i < expr->properties()->length(); i++) { ObjectLiteral::Property* property = expr->properties()->at(i); if (property->is_computed_name()) return Bailout(kComputedPropertyName); diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc index 2e6c417..0993b6c 100644 --- a/src/ia32/full-codegen-ia32.cc +++ b/src/ia32/full-codegen-ia32.cc @@ -1611,11 +1611,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { // result_saved is false the result is in eax. bool result_saved = false; - // Mark all computed expressions that are bound to a key that - // is shadowed by a later occurrence of the same key. For the - // marked expressions, no store code is emitted. - expr->CalculateEmitStore(zone()); - AccessorTable accessor_table(zone()); int property_index = 0; for (; property_index < expr->properties()->length(); property_index++) { diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index fea797e..f160305 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -1661,11 +1661,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { // result_saved is false the result is in v0. bool result_saved = false; - // Mark all computed expressions that are bound to a key that - // is shadowed by a later occurrence of the same key. For the - // marked expressions, no store code is emitted. - expr->CalculateEmitStore(zone()); - AccessorTable accessor_table(zone()); int property_index = 0; for (; property_index < expr->properties()->length(); property_index++) { diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc index 65c4689..e4f0c7f 100644 --- a/src/mips64/full-codegen-mips64.cc +++ b/src/mips64/full-codegen-mips64.cc @@ -1660,11 +1660,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { // result_saved is false the result is in v0. bool result_saved = false; - // Mark all computed expressions that are bound to a key that - // is shadowed by a later occurrence of the same key. For the - // marked expressions, no store code is emitted. - expr->CalculateEmitStore(zone()); - AccessorTable accessor_table(zone()); int property_index = 0; for (; property_index < expr->properties()->length(); property_index++) { diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc index 9878deb..74f69bb 100644 --- a/src/x64/full-codegen-x64.cc +++ b/src/x64/full-codegen-x64.cc @@ -1643,11 +1643,6 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { // result_saved is false the result is in rax. bool result_saved = false; - // Mark all computed expressions that are bound to a key that - // is shadowed by a later occurrence of the same key. For the - // marked expressions, no store code is emitted. - expr->CalculateEmitStore(zone()); - AccessorTable accessor_table(zone()); int property_index = 0; for (; property_index < expr->properties()->length(); property_index++) {