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

Unified Diff: src/hydrogen.cc

Issue 1321993004: Vector ICs: ObjectLiteral refactoring for Oracle feedback (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE, turned off flag. Created 5 years, 3 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 | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/type-info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 4152312338d91b158c578515f1bb490ec64d0036..79a9d5e35b3c6742fb7ef622ad77c2730ba41c5e 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5894,7 +5894,6 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
// The object is expected in the bailout environment during computation
// of the property values and is the value of the entire expression.
Push(literal);
- int store_slot_index = 0;
for (int i = 0; i < expr->properties()->length(); i++) {
ObjectLiteral::Property* property = expr->properties()->at(i);
if (property->is_computed_name()) return Bailout(kComputedPropertyName);
@@ -5918,7 +5917,7 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
Handle<Map> map = property->GetReceiverType();
Handle<String> name = key->AsPropertyName();
HValue* store;
- FeedbackVectorICSlot slot = expr->GetNthSlot(store_slot_index++);
+ FeedbackVectorICSlot slot = property->GetSlot();
if (map.is_null()) {
// If we don't know the monomorphic type, do a generic store.
CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot, literal,
@@ -5946,8 +5945,7 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
if (FunctionLiteral::NeedsHomeObject(property->value())) {
Handle<Symbol> sym = isolate()->factory()->home_object_symbol();
HInstruction* store_home = BuildNamedGeneric(
- STORE, NULL, expr->GetNthSlot(store_slot_index++), value, sym,
- literal);
+ STORE, NULL, property->GetSlot(1), value, sym, literal);
AddInstruction(store_home);
DCHECK(store_home->HasObservableSideEffects());
Add<HSimulate>(property->value()->id(), REMOVABLE_SIMULATE);
@@ -5966,9 +5964,6 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
}
}
- // Crankshaft may not consume all the slots because it doesn't emit accessors.
- DCHECK(!FLAG_vector_stores || store_slot_index <= expr->slot_count());
-
if (expr->has_function()) {
// Return the result of the transformation to fast properties
// instead of the original since this operation changes the map
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698