| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 } | 174 } |
| 175 | 175 |
| 176 void ProcessTruncateWord32Input(Node* node, int index, MachineTypeUnion use) { | 176 void ProcessTruncateWord32Input(Node* node, int index, MachineTypeUnion use) { |
| 177 Node* input = node->InputAt(index); | 177 Node* input = node->InputAt(index); |
| 178 if (phase_ == PROPAGATE) { | 178 if (phase_ == PROPAGATE) { |
| 179 // In the propagate phase, propagate the usage information backward. | 179 // In the propagate phase, propagate the usage information backward. |
| 180 Enqueue(input, use); | 180 Enqueue(input, use); |
| 181 } else { | 181 } else { |
| 182 // In the change phase, insert a change before the use if necessary. | 182 // In the change phase, insert a change before the use if necessary. |
| 183 MachineTypeUnion output = GetInfo(input)->output; | 183 MachineTypeUnion output = GetInfo(input)->output; |
| 184 if ((output & kRepWord32) == 0) { | 184 if ((output & (kRepBit | kRepWord8 | kRepWord16 | kRepWord32)) == 0) { |
| 185 // Output representation doesn't match usage. | 185 // Output representation doesn't match usage. |
| 186 TRACE((" truncate-to-int32: #%d:%s(@%d #%d:%s) ", node->id(), | 186 TRACE((" truncate-to-int32: #%d:%s(@%d #%d:%s) ", node->id(), |
| 187 node->op()->mnemonic(), index, input->id(), | 187 node->op()->mnemonic(), index, input->id(), |
| 188 input->op()->mnemonic())); | 188 input->op()->mnemonic())); |
| 189 TRACE((" from ")); | 189 TRACE((" from ")); |
| 190 PrintInfo(output); | 190 PrintInfo(output); |
| 191 TRACE((" to ")); | 191 TRACE((" to ")); |
| 192 PrintInfo(use); | 192 PrintInfo(use); |
| 193 TRACE(("\n")); | 193 TRACE(("\n")); |
| 194 Node* n = changer_->GetTruncatedWord32For(input, output); | 194 Node* n = changer_->GetTruncatedWord32For(input, output); |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 | 1477 |
| 1478 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1478 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
| 1479 node->set_op(machine()->IntLessThanOrEqual()); | 1479 node->set_op(machine()->IntLessThanOrEqual()); |
| 1480 node->ReplaceInput(0, StringComparison(node, true)); | 1480 node->ReplaceInput(0, StringComparison(node, true)); |
| 1481 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1481 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 } // namespace compiler | 1484 } // namespace compiler |
| 1485 } // namespace internal | 1485 } // namespace internal |
| 1486 } // namespace v8 | 1486 } // namespace v8 |
| OLD | NEW |