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

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

Issue 2400633002: [turbofan] Pass NoContextConstant to stubs that don't need a context. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 51fb4d6f143a46439ca3109672c2e5f89d71ac06..ac36cc7913a82db3976569aa182831692be718f0 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -116,6 +116,8 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
}
void JSGenericLowering::LowerJSStrictEqual(Node* node) {
+ // The === operator doesn't need the current context.
+ NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
Callable callable = CodeFactory::StrictEqual(isolate());
node->RemoveInput(4); // control
ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags,
@@ -123,6 +125,8 @@ void JSGenericLowering::LowerJSStrictEqual(Node* node) {
}
void JSGenericLowering::LowerJSStrictNotEqual(Node* node) {
+ // The !== operator doesn't need the current context.
+ NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
Callable callable = CodeFactory::StrictNotEqual(isolate());
node->RemoveInput(4); // control
ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags,
@@ -130,6 +134,8 @@ void JSGenericLowering::LowerJSStrictNotEqual(Node* node) {
}
void JSGenericLowering::LowerJSToBoolean(Node* node) {
+ // The ToBoolean conversion doesn't need the current context.
+ NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
Callable callable = CodeFactory::ToBoolean(isolate());
node->AppendInput(zone(), graph()->start());
ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate,
@@ -137,6 +143,8 @@ void JSGenericLowering::LowerJSToBoolean(Node* node) {
}
void JSGenericLowering::LowerJSTypeOf(Node* node) {
+ // The typeof operator doesn't need the current context.
+ NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
Callable callable = CodeFactory::Typeof(isolate());
node->AppendInput(zone(), graph()->start());
ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698