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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1705633004: [crankshaft] Remove the useless HCallStub instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 273ff52684d683191c87efded6b362a7ce840b99..60403f175296b3eb0c25c945cc48740854e2bcd8 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -12542,7 +12542,13 @@ void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) {
DCHECK_EQ(3, call->arguments()->length());
CHECK_ALIVE(VisitExpressions(call->arguments()));
PushArgumentsFromEnvironment(call->arguments()->length());
- HCallStub* result = New<HCallStub>(CodeStub::SubString, 3);
+ Callable callable = CodeFactory::SubString(isolate());
+ HValue* stub = Add<HConstant>(callable.code());
+ HValue* values[] = {context()};
+ HInstruction* result = New<HCallWithDescriptor>(
+ stub, call->arguments()->length(), callable.descriptor(),
+ Vector<HValue*>(values, arraysize(values)));
+ result->set_type(HType::String());
return ast_context()->ReturnInstruction(result, call->id());
}
@@ -12552,7 +12558,12 @@ void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
DCHECK_EQ(4, call->arguments()->length());
CHECK_ALIVE(VisitExpressions(call->arguments()));
PushArgumentsFromEnvironment(call->arguments()->length());
- HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4);
+ Callable callable = CodeFactory::RegExpExec(isolate());
+ HValue* stub = Add<HConstant>(callable.code());
+ HValue* values[] = {context()};
+ HInstruction* result = New<HCallWithDescriptor>(
+ stub, call->arguments()->length(), callable.descriptor(),
+ Vector<HValue*>(values, arraysize(values)));
return ast_context()->ReturnInstruction(result, call->id());
}
« 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