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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2350423002: [crankshaft] Remove HStoreKeyedGeneric and use HCallWithDescriptor instead to call KeyedStoreIC. (Closed)
Patch Set: Created 4 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/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 107021cecba8d728c7f2dcd9a422a70cf250c105..f467d67dfd20a456bb9981b4f0893baf574faffe 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -7198,26 +7198,28 @@ HInstruction* HOptimizedGraphBuilder::BuildNamedGeneric(
Handle<TypeFeedbackVector> vector =
handle(current_feedback_vector(), isolate());
+ HValue* key = Add<HConstant>(name);
+ HValue* vector_value = Add<HConstant>(vector);
+ HValue* slot_value = Add<HConstant>(vector->GetIndex(slot));
+ HValue* values[] = {context(), object, key,
+ value, slot_value, vector_value};
+
if (current_feedback_vector()->GetKind(slot) ==
FeedbackVectorSlotKind::KEYED_STORE_IC) {
// It's possible that a keyed store of a constant string was converted
// to a named store. Here, at the last minute, we need to make sure to
// use a generic Keyed Store if we are using the type vector, because
// it has to share information with full code.
- HConstant* key = Add<HConstant>(name);
- HStoreKeyedGeneric* result = New<HStoreKeyedGeneric>(
- object, key, value, function_language_mode(), vector, slot);
+ Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
+ isolate(), function_language_mode());
+ HValue* stub = Add<HConstant>(callable.code());
+ HCallWithDescriptor* result = New<HCallWithDescriptor>(
+ stub, 0, callable.descriptor(), ArrayVector(values));
return result;
}
-
- HValue* name_value = Add<HConstant>(name);
- HValue* vector_value = Add<HConstant>(vector);
- HValue* slot_value = Add<HConstant>(vector->GetIndex(slot));
Callable callable = CodeFactory::StoreICInOptimizedCode(
isolate(), function_language_mode());
HValue* stub = Add<HConstant>(callable.code());
- HValue* values[] = {context(), object, name_value,
- value, slot_value, vector_value};
HCallWithDescriptor* result = New<HCallWithDescriptor>(
stub, 0, callable.descriptor(), ArrayVector(values));
return result;
@@ -7235,8 +7237,16 @@ HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric(
New<HLoadKeyedGeneric>(object, key, vector, slot);
return result;
} else {
- HStoreKeyedGeneric* result = New<HStoreKeyedGeneric>(
- object, key, value, function_language_mode(), vector, slot);
+ HValue* vector_value = Add<HConstant>(vector);
+ HValue* slot_value = Add<HConstant>(vector->GetIndex(slot));
+ HValue* values[] = {context(), object, key,
+ value, slot_value, vector_value};
+
+ Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
+ isolate(), function_language_mode());
+ HValue* stub = Add<HConstant>(callable.code());
+ HCallWithDescriptor* result = New<HCallWithDescriptor>(
+ stub, 0, callable.descriptor(), ArrayVector(values));
return result;
}
}
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698