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

Unified Diff: src/compiler/js-operator.cc

Issue 1893543004: [turbofan] JSTypeOf, JSStrictEqual, JSStrictNotEqual and JSToBoolean are pure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Really disable all broken tests. Created 4 years, 8 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/compiler/js-call-reducer.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 98e090b509424212910590f3699487188c9e900b..30b93c5916e4d4a38876c1196b7da82ab1f32d1b 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -379,8 +379,8 @@ const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op) {
#define CACHED_OP_LIST(V) \
V(Equal, Operator::kNoProperties, 2, 1) \
V(NotEqual, Operator::kNoProperties, 2, 1) \
- V(StrictEqual, Operator::kNoThrow, 2, 1) \
- V(StrictNotEqual, Operator::kNoThrow, 2, 1) \
+ V(StrictEqual, Operator::kPure, 2, 1) \
+ V(StrictNotEqual, Operator::kPure, 2, 1) \
V(LessThan, Operator::kNoProperties, 2, 1) \
V(GreaterThan, Operator::kNoProperties, 2, 1) \
V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \
@@ -389,13 +389,13 @@ const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op) {
V(ToLength, Operator::kNoProperties, 1, 1) \
V(ToName, Operator::kNoProperties, 1, 1) \
V(ToNumber, Operator::kNoProperties, 1, 1) \
- V(ToObject, Operator::kNoProperties, 1, 1) \
+ V(ToObject, Operator::kFoldable, 1, 1) \
V(ToString, Operator::kNoProperties, 1, 1) \
V(Yield, Operator::kNoProperties, 1, 1) \
V(Create, Operator::kEliminatable, 2, 1) \
V(CreateIterResultObject, Operator::kEliminatable, 2, 1) \
V(HasProperty, Operator::kNoProperties, 2, 1) \
- V(TypeOf, Operator::kEliminatable, 1, 1) \
+ V(TypeOf, Operator::kPure, 1, 1) \
V(InstanceOf, Operator::kNoProperties, 2, 1) \
V(ForInDone, Operator::kPure, 2, 1) \
V(ForInNext, Operator::kNoProperties, 4, 1) \
@@ -541,11 +541,11 @@ const Operator* JSOperatorBuilder::Modulus(BinaryOperationHints hints) {
const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) {
// TODO(turbofan): Cache most important versions of this operator.
- return new (zone()) Operator1<ToBooleanHints>( //--
- IrOpcode::kJSToBoolean, Operator::kEliminatable, // opcode
- "JSToBoolean", // name
- 1, 1, 0, 1, 1, 0, // inputs/outputs
- hints); // parameter
+ return new (zone()) Operator1<ToBooleanHints>( //--
+ IrOpcode::kJSToBoolean, Operator::kPure, // opcode
+ "JSToBoolean", // name
+ 1, 0, 0, 1, 0, 0, // inputs/outputs
+ hints); // parameter
}
const Operator* JSOperatorBuilder::CallFunction(
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698