Reviewers: Michael Starzinger,
Description:
[turbofan] Remove obsolete pure flag.
Use the Operator::kPure flag instead, which determines whether the JS
operator has effect/control edges.
[email protected]
Please review this at https://codereview.chromium.org/720233006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+13, -14 lines):
M src/compiler/js-generic-lowering.h
M src/compiler/js-generic-lowering.cc
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc
b/src/compiler/js-generic-lowering.cc
index
dfc5d31b077c6a71dd87865e494a37131bce819b..79699b44d01ecd2bd9c1a78e1f940b1dde3126af
100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -79,18 +79,18 @@ REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD)
#undef REPLACE_BINARY_OP_IC_CALL
-#define REPLACE_COMPARE_IC_CALL(op, token, pure) \
+#define REPLACE_COMPARE_IC_CALL(op, token) \
void JSGenericLowering::Lower##op(Node* node) { \
- ReplaceWithCompareIC(node, token, pure); \
+ ReplaceWithCompareIC(node, token); \
}
-REPLACE_COMPARE_IC_CALL(JSEqual, Token::EQ, false)
-REPLACE_COMPARE_IC_CALL(JSNotEqual, Token::NE, false)
-REPLACE_COMPARE_IC_CALL(JSStrictEqual, Token::EQ_STRICT, true)
-REPLACE_COMPARE_IC_CALL(JSStrictNotEqual, Token::NE_STRICT, true)
-REPLACE_COMPARE_IC_CALL(JSLessThan, Token::LT, false)
-REPLACE_COMPARE_IC_CALL(JSGreaterThan, Token::GT, false)
-REPLACE_COMPARE_IC_CALL(JSLessThanOrEqual, Token::LTE, false)
-REPLACE_COMPARE_IC_CALL(JSGreaterThanOrEqual, Token::GTE, false)
+REPLACE_COMPARE_IC_CALL(JSEqual, Token::EQ)
+REPLACE_COMPARE_IC_CALL(JSNotEqual, Token::NE)
+REPLACE_COMPARE_IC_CALL(JSStrictEqual, Token::EQ_STRICT)
+REPLACE_COMPARE_IC_CALL(JSStrictNotEqual, Token::NE_STRICT)
+REPLACE_COMPARE_IC_CALL(JSLessThan, Token::LT)
+REPLACE_COMPARE_IC_CALL(JSGreaterThan, Token::GT)
+REPLACE_COMPARE_IC_CALL(JSLessThanOrEqual, Token::LTE)
+REPLACE_COMPARE_IC_CALL(JSGreaterThanOrEqual, Token::GTE)
#undef REPLACE_COMPARE_IC_CALL
@@ -126,8 +126,7 @@ static CallDescriptor::Flags FlagsForNode(Node* node) {
}
-void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value
token,
- bool pure) {
+void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value
token) {
Callable callable = CodeFactory::CompareIC(isolate(), token);
bool has_frame_state =
OperatorProperties::HasFrameStateInput(node->op());
CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor(
@@ -139,7 +138,7 @@ void JSGenericLowering::ReplaceWithCompareIC(Node*
node, Token::Value token,
inputs.push_back(NodeProperties::GetValueInput(node, 0));
inputs.push_back(NodeProperties::GetValueInput(node, 1));
inputs.push_back(NodeProperties::GetContextInput(node));
- if (pure) {
+ if (node->op()->HasProperty(Operator::kPure)) {
// A pure (strict) comparison doesn't have an effect, control or frame
// state. But for the graph, we need to add control and effect inputs.
DCHECK(!has_frame_state);
Index: src/compiler/js-generic-lowering.h
diff --git a/src/compiler/js-generic-lowering.h
b/src/compiler/js-generic-lowering.h
index
a841464565c6c6893b1be2663f1288fa3ea357dc..eb234b84ff3a94fa27b5aa4c4b9255cd4ed3bc27
100644
--- a/src/compiler/js-generic-lowering.h
+++ b/src/compiler/js-generic-lowering.h
@@ -41,7 +41,7 @@ class JSGenericLowering : public Reducer {
void PatchInsertInput(Node* node, int index, Node* input);
// Helpers to replace existing nodes with a generic call.
- void ReplaceWithCompareIC(Node* node, Token::Value token, bool pure);
+ void ReplaceWithCompareIC(Node* node, Token::Value token);
void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags
flags);
void ReplaceWithBuiltinCall(Node* node, Builtins::JavaScript id, int
args);
void ReplaceWithRuntimeCall(Node* node, Runtime::FunctionId f, int args
= -1);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.