| OLD | NEW |
| 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 jsgraph()->HeapConstant(callable.code())); | 1316 jsgraph()->HeapConstant(callable.code())); |
| 1317 node->AppendInput(graph()->zone(), jsgraph()->UndefinedConstant()); | 1317 node->AppendInput(graph()->zone(), jsgraph()->UndefinedConstant()); |
| 1318 node->AppendInput(graph()->zone(), graph()->start()); | 1318 node->AppendInput(graph()->zone(), graph()->start()); |
| 1319 node->AppendInput(graph()->zone(), graph()->start()); | 1319 node->AppendInput(graph()->zone(), graph()->start()); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 | 1322 |
| 1323 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) { | 1323 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) { |
| 1324 CEntryStub stub(jsgraph()->isolate(), 1); | 1324 CEntryStub stub(jsgraph()->isolate(), 1); |
| 1325 Runtime::FunctionId f = | 1325 Runtime::FunctionId f = |
| 1326 requires_ordering ? Runtime::kStringCompare : Runtime::kStringEquals; | 1326 requires_ordering ? Runtime::kStringCompareRT : Runtime::kStringEquals; |
| 1327 ExternalReference ref(f, jsgraph()->isolate()); | 1327 ExternalReference ref(f, jsgraph()->isolate()); |
| 1328 Operator::Properties props = node->op()->properties(); | 1328 Operator::Properties props = node->op()->properties(); |
| 1329 // TODO(mstarzinger): We should call StringCompareStub here instead, once an | 1329 // TODO(mstarzinger): We should call StringCompareStub here instead, once an |
| 1330 // interface descriptor is available for it. | 1330 // interface descriptor is available for it. |
| 1331 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(zone(), f, 2, props); | 1331 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(zone(), f, 2, props); |
| 1332 return graph()->NewNode(common()->Call(desc), | 1332 return graph()->NewNode(common()->Call(desc), |
| 1333 jsgraph()->HeapConstant(stub.GetCode()), | 1333 jsgraph()->HeapConstant(stub.GetCode()), |
| 1334 NodeProperties::GetValueInput(node, 0), | 1334 NodeProperties::GetValueInput(node, 0), |
| 1335 NodeProperties::GetValueInput(node, 1), | 1335 NodeProperties::GetValueInput(node, 1), |
| 1336 jsgraph()->ExternalConstant(ref), | 1336 jsgraph()->ExternalConstant(ref), |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 | 1604 |
| 1605 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1605 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
| 1606 node->set_op(machine()->IntLessThanOrEqual()); | 1606 node->set_op(machine()->IntLessThanOrEqual()); |
| 1607 node->ReplaceInput(0, StringComparison(node, true)); | 1607 node->ReplaceInput(0, StringComparison(node, true)); |
| 1608 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1608 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 } // namespace compiler | 1611 } // namespace compiler |
| 1612 } // namespace internal | 1612 } // namespace internal |
| 1613 } // namespace v8 | 1613 } // namespace v8 |
| OLD | NEW |