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

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 2684043002: [turbofan] Use fast stub for ForInPrepare and ForInNext (Closed)
Patch Set: add missing SmiUntag and remove ForInNext RT function Created 3 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
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index c3af64d78894e142b7af44509f7eff19c98fa9cb..c2911234446f063c1b86b34eb4231187da0cc24e 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -88,11 +88,12 @@ void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable,
void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable,
CallDescriptor::Flags flags,
- Operator::Properties properties) {
+ Operator::Properties properties,
+ int result_size) {
const CallInterfaceDescriptor& descriptor = callable.descriptor();
CallDescriptor* desc = Linkage::GetStubCallDescriptor(
isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), flags,
- properties);
+ properties, MachineType::AnyTagged(), result_size);
Node* stub_code = jsgraph()->HeapConstant(callable.code());
node->InsertInput(zone(), 0, stub_code);
NodeProperties::ChangeOp(node, common()->Call(desc));
@@ -586,12 +587,15 @@ void JSGenericLowering::LowerJSConvertReceiver(Node* node) {
}
void JSGenericLowering::LowerJSForInNext(Node* node) {
- ReplaceWithRuntimeCall(node, Runtime::kForInNext);
+ CallDescriptor::Flags flags = FrameStateFlagForCall(node);
+ Callable callable = CodeFactory::ForInNext(isolate());
+ ReplaceWithStubCall(node, callable, flags);
}
-
void JSGenericLowering::LowerJSForInPrepare(Node* node) {
- ReplaceWithRuntimeCall(node, Runtime::kForInPrepare);
+ CallDescriptor::Flags flags = FrameStateFlagForCall(node);
+ Callable callable = CodeFactory::ForInPrepare(isolate());
+ ReplaceWithStubCall(node, callable, flags, node->op()->properties(), 3);
}
void JSGenericLowering::LowerJSLoadMessage(Node* node) {

Powered by Google App Engine
This is Rietveld 408576698