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, |