| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 // Run lowering and change insertion phase. | 299 // Run lowering and change insertion phase. |
| 300 TRACE("--{Simplified lowering phase}--\n"); | 300 TRACE("--{Simplified lowering phase}--\n"); |
| 301 phase_ = LOWER; | 301 phase_ = LOWER; |
| 302 // Process nodes from the collected {nodes_} vector. | 302 // Process nodes from the collected {nodes_} vector. |
| 303 for (NodeVector::iterator i = nodes_.begin(); i != nodes_.end(); ++i) { | 303 for (NodeVector::iterator i = nodes_.begin(); i != nodes_.end(); ++i) { |
| 304 Node* node = *i; | 304 Node* node = *i; |
| 305 NodeInfo* info = GetInfo(node); | 305 NodeInfo* info = GetInfo(node); |
| 306 TRACE(" visit #%d: %s\n", node->id(), node->op()->mnemonic()); | 306 TRACE(" visit #%d: %s\n", node->id(), node->op()->mnemonic()); |
| 307 // Reuse {VisitNode()} so the representation rules are in one place. | 307 // Reuse {VisitNode()} so the representation rules are in one place. |
| 308 SourcePositionTable::Scope scope( | 308 SourcePositionScope scope(source_positions_, |
| 309 source_positions_, source_positions_->GetSourcePosition(node)); | 309 source_positions_->GetSourcePosition(node)); |
| 310 VisitNode(node, info->truncation(), lowering); | 310 VisitNode(node, info->truncation(), lowering); |
| 311 } | 311 } |
| 312 | 312 |
| 313 // Perform the final replacements. | 313 // Perform the final replacements. |
| 314 for (NodeVector::iterator i = replacements_.begin(); | 314 for (NodeVector::iterator i = replacements_.begin(); |
| 315 i != replacements_.end(); ++i) { | 315 i != replacements_.end(); ++i) { |
| 316 Node* node = *i; | 316 Node* node = *i; |
| 317 Node* replacement = *(++i); | 317 Node* replacement = *(++i); |
| 318 node->ReplaceUses(replacement); | 318 node->ReplaceUses(replacement); |
| 319 // We also need to replace the node in the rest of the vector. | 319 // We also need to replace the node in the rest of the vector. |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |