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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2358533002: [crankshaft] Remove HStoreNamedGeneric and use HCallWithDescriptor instead to call StoreIC. (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 e5332a2f5d1a961c6a9eb69da3b29d6390bd22d0..107021cecba8d728c7f2dcd9a422a70cf250c105 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -6866,9 +6866,16 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment(
HObjectAccess::ForContextSlot(Context::EXTENSION_INDEX));
Handle<TypeFeedbackVector> vector =
handle(current_feedback_vector(), isolate());
- HStoreNamedGeneric* instr =
- Add<HStoreNamedGeneric>(global_object, var->name(), value,
- function_language_mode(), vector, slot);
+ HValue* name = Add<HConstant>(var->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(), global_object, name,
+ value, slot_value, vector_value};
+ HCallWithDescriptor* instr = Add<HCallWithDescriptor>(
+ stub, 0, callable.descriptor(), ArrayVector(values));
USE(instr);
DCHECK(instr->HasObservableSideEffects());
Add<HSimulate>(ast_id, REMOVABLE_SIMULATE);
@@ -7203,8 +7210,16 @@ HInstruction* HOptimizedGraphBuilder::BuildNamedGeneric(
return result;
}
- HStoreNamedGeneric* result = New<HStoreNamedGeneric>(
- object, name, value, function_language_mode(), vector, slot);
+ 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;
}
}
« 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