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

Side by Side Diff: src/compiler/simplified-lowering.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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 if (lower()) { 1037 if (lower()) {
1038 // StringEqual(x, y) => Call(StringEqualStub, x, y, no-context) 1038 // StringEqual(x, y) => Call(StringEqualStub, x, y, no-context)
1039 Operator::Properties properties = node->op()->properties(); 1039 Operator::Properties properties = node->op()->properties();
1040 Callable callable = CodeFactory::StringEqual(jsgraph_->isolate()); 1040 Callable callable = CodeFactory::StringEqual(jsgraph_->isolate());
1041 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 1041 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
1042 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 1042 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1043 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, 1043 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
1044 flags, properties); 1044 flags, properties);
1045 node->InsertInput(jsgraph_->zone(), 0, 1045 node->InsertInput(jsgraph_->zone(), 0,
1046 jsgraph_->HeapConstant(callable.code())); 1046 jsgraph_->HeapConstant(callable.code()));
1047 node->InsertInput(jsgraph_->zone(), 3, jsgraph_->NoContextConstant()); 1047 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
1048 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); 1048 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1049 } 1049 }
1050 break; 1050 break;
1051 } 1051 }
1052 case IrOpcode::kStringLessThan: { 1052 case IrOpcode::kStringLessThan: {
1053 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 1053 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1054 if (lower()) { 1054 if (lower()) {
1055 // StringLessThan(x, y) => Call(StringLessThanStub, x, y, no-context) 1055 // StringLessThan(x, y) => Call(StringLessThanStub, x, y, no-context)
1056 Operator::Properties properties = node->op()->properties(); 1056 Operator::Properties properties = node->op()->properties();
1057 Callable callable = CodeFactory::StringLessThan(jsgraph_->isolate()); 1057 Callable callable = CodeFactory::StringLessThan(jsgraph_->isolate());
1058 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 1058 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
1059 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 1059 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1060 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, 1060 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
1061 flags, properties); 1061 flags, properties);
1062 node->InsertInput(jsgraph_->zone(), 0, 1062 node->InsertInput(jsgraph_->zone(), 0,
1063 jsgraph_->HeapConstant(callable.code())); 1063 jsgraph_->HeapConstant(callable.code()));
1064 node->InsertInput(jsgraph_->zone(), 3, jsgraph_->NoContextConstant()); 1064 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
1065 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); 1065 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1066 } 1066 }
1067 break; 1067 break;
1068 } 1068 }
1069 case IrOpcode::kStringLessThanOrEqual: { 1069 case IrOpcode::kStringLessThanOrEqual: {
1070 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 1070 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1071 if (lower()) { 1071 if (lower()) {
1072 // StringLessThanOrEqual(x, y) 1072 // StringLessThanOrEqual(x, y)
1073 // => Call(StringLessThanOrEqualStub, x, y, no-context) 1073 // => Call(StringLessThanOrEqualStub, x, y, no-context)
1074 Operator::Properties properties = node->op()->properties(); 1074 Operator::Properties properties = node->op()->properties();
1075 Callable callable = 1075 Callable callable =
1076 CodeFactory::StringLessThanOrEqual(jsgraph_->isolate()); 1076 CodeFactory::StringLessThanOrEqual(jsgraph_->isolate());
1077 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 1077 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
1078 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 1078 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1079 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, 1079 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
1080 flags, properties); 1080 flags, properties);
1081 node->InsertInput(jsgraph_->zone(), 0, 1081 node->InsertInput(jsgraph_->zone(), 0,
1082 jsgraph_->HeapConstant(callable.code())); 1082 jsgraph_->HeapConstant(callable.code()));
1083 node->InsertInput(jsgraph_->zone(), 3, jsgraph_->NoContextConstant()); 1083 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
1084 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); 1084 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1085 } 1085 }
1086 break; 1086 break;
1087 } 1087 }
1088 case IrOpcode::kStringToNumber: { 1088 case IrOpcode::kStringToNumber: {
1089 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 1089 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1090 if (lower()) { 1090 if (lower()) {
1091 // StringToNumber(x) => Call(StringToNumberStub, x, no-context) 1091 // StringToNumber(x) => Call(StringToNumberStub, x, no-context)
1092 Operator::Properties properties = node->op()->properties(); 1092 Operator::Properties properties = node->op()->properties();
1093 Callable callable = CodeFactory::StringToNumber(jsgraph_->isolate()); 1093 Callable callable = CodeFactory::StringToNumber(jsgraph_->isolate());
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) { 2178 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) {
2179 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs, 2179 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs,
2180 jsgraph()->Int32Constant(0x1f))); 2180 jsgraph()->Int32Constant(0x1f)));
2181 } 2181 }
2182 NodeProperties::ChangeOp(node, op); 2182 NodeProperties::ChangeOp(node, op);
2183 } 2183 }
2184 2184
2185 } // namespace compiler 2185 } // namespace compiler
2186 } // namespace internal 2186 } // namespace internal
2187 } // namespace v8 2187 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698