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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 792463003: [turbofan] Turn JSToBoolean and JSUnaryNot into pure operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
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 "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/diamond.h" 10 #include "src/compiler/diamond.h"
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 const ElementAccess& access = ElementAccessOf(node->op()); 1186 const ElementAccess& access = ElementAccessOf(node->op());
1187 node->set_op(machine()->Store(StoreRepresentation( 1187 node->set_op(machine()->Store(StoreRepresentation(
1188 access.machine_type, 1188 access.machine_type,
1189 ComputeWriteBarrierKind(access.base_is_tagged, access.machine_type, 1189 ComputeWriteBarrierKind(access.base_is_tagged, access.machine_type,
1190 access.type)))); 1190 access.type))));
1191 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); 1191 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
1192 } 1192 }
1193 1193
1194 1194
1195 void SimplifiedLowering::DoStringAdd(Node* node) { 1195 void SimplifiedLowering::DoStringAdd(Node* node) {
1196 Operator::Properties properties = node->op()->properties();
1196 Callable callable = CodeFactory::StringAdd( 1197 Callable callable = CodeFactory::StringAdd(
1197 zone()->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED); 1198 zone()->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED);
1198 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 1199 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
1199 CallDescriptor* desc = 1200 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1200 Linkage::GetStubCallDescriptor(callable.descriptor(), 0, flags, zone()); 1201 callable.descriptor(), 0, flags, properties, zone());
1201 node->set_op(common()->Call(desc)); 1202 node->set_op(common()->Call(desc));
1202 node->InsertInput(graph()->zone(), 0, 1203 node->InsertInput(graph()->zone(), 0,
1203 jsgraph()->HeapConstant(callable.code())); 1204 jsgraph()->HeapConstant(callable.code()));
1204 node->AppendInput(graph()->zone(), jsgraph()->UndefinedConstant()); 1205 node->AppendInput(graph()->zone(), jsgraph()->UndefinedConstant());
1205 node->AppendInput(graph()->zone(), graph()->start()); 1206 node->AppendInput(graph()->zone(), graph()->start());
1206 node->AppendInput(graph()->zone(), graph()->start()); 1207 node->AppendInput(graph()->zone(), graph()->start());
1207 } 1208 }
1208 1209
1209 1210
1210 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) { 1211 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 1450
1450 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1451 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1451 node->set_op(machine()->IntLessThanOrEqual()); 1452 node->set_op(machine()->IntLessThanOrEqual());
1452 node->ReplaceInput(0, StringComparison(node, true)); 1453 node->ReplaceInput(0, StringComparison(node, true));
1453 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1454 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1454 } 1455 }
1455 1456
1456 } // namespace compiler 1457 } // namespace compiler
1457 } // namespace internal 1458 } // namespace internal
1458 } // namespace v8 1459 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698