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

Side by Side Diff: src/hydrogen.cc

Issue 1150323002: Move work to omit unnecessary ObjectLiteral stores to the numbering pass. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 5666 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 Runtime::FunctionId function_id = Runtime::kCreateObjectLiteral; 5677 Runtime::FunctionId function_id = Runtime::kCreateObjectLiteral;
5678 literal = Add<HCallRuntime>(isolate()->factory()->empty_string(), 5678 literal = Add<HCallRuntime>(isolate()->factory()->empty_string(),
5679 Runtime::FunctionForId(function_id), 5679 Runtime::FunctionForId(function_id),
5680 4); 5680 4);
5681 } 5681 }
5682 5682
5683 // The object is expected in the bailout environment during computation 5683 // The object is expected in the bailout environment during computation
5684 // of the property values and is the value of the entire expression. 5684 // of the property values and is the value of the entire expression.
5685 Push(literal); 5685 Push(literal);
5686 5686
5687 expr->CalculateEmitStore(zone());
5688
5689 for (int i = 0; i < expr->properties()->length(); i++) { 5687 for (int i = 0; i < expr->properties()->length(); i++) {
5690 ObjectLiteral::Property* property = expr->properties()->at(i); 5688 ObjectLiteral::Property* property = expr->properties()->at(i);
5691 if (property->is_computed_name()) return Bailout(kComputedPropertyName); 5689 if (property->is_computed_name()) return Bailout(kComputedPropertyName);
5692 if (property->IsCompileTimeValue()) continue; 5690 if (property->IsCompileTimeValue()) continue;
5693 5691
5694 Literal* key = property->key()->AsLiteral(); 5692 Literal* key = property->key()->AsLiteral();
5695 Expression* value = property->value(); 5693 Expression* value = property->value();
5696 5694
5697 switch (property->kind()) { 5695 switch (property->kind()) {
5698 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 5696 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
(...skipping 7435 matching lines...) Expand 10 before | Expand all | Expand 10 after
13134 if (ShouldProduceTraceOutput()) { 13132 if (ShouldProduceTraceOutput()) {
13135 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13133 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13136 } 13134 }
13137 13135
13138 #ifdef DEBUG 13136 #ifdef DEBUG
13139 graph_->Verify(false); // No full verify. 13137 graph_->Verify(false); // No full verify.
13140 #endif 13138 #endif
13141 } 13139 }
13142 13140
13143 } } // namespace v8::internal 13141 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698