| 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/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/generic-node-inl.h" | 7 #include "src/compiler/generic-node-inl.h" |
| 8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
| 9 #include "src/compiler/graph-visualizer.h" | 9 #include "src/compiler/graph-visualizer.h" |
| 10 #include "src/compiler/js-inlining.h" | 10 #include "src/compiler/js-inlining.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 GenericGraphVisit::Control Post(Node* original) { | 165 GenericGraphVisit::Control Post(Node* original) { |
| 166 NodeVector inputs(temp_zone_); | 166 NodeVector inputs(temp_zone_); |
| 167 for (InputIter it = original->inputs().begin(); | 167 for (InputIter it = original->inputs().begin(); |
| 168 it != original->inputs().end(); ++it) { | 168 it != original->inputs().end(); ++it) { |
| 169 inputs.push_back(GetCopy(*it)); | 169 inputs.push_back(GetCopy(*it)); |
| 170 } | 170 } |
| 171 | 171 |
| 172 // Reuse the operator in the copy. This assumes that op lives in a zone | 172 // Reuse the operator in the copy. This assumes that op lives in a zone |
| 173 // that lives longer than graph()'s zone. | 173 // that lives longer than graph()'s zone. |
| 174 Node* copy = | 174 Node* copy = target_graph_->NewNode( |
| 175 target_graph_->NewNode(original->op(), inputs.size(), &inputs.front()); | 175 original->op(), static_cast<int>(inputs.size()), &inputs.front()); |
| 176 copies_[original->id()] = copy; | 176 copies_[original->id()] = copy; |
| 177 return GenericGraphVisit::CONTINUE; | 177 return GenericGraphVisit::CONTINUE; |
| 178 } | 178 } |
| 179 | 179 |
| 180 Node* GetCopy(Node* original) { | 180 Node* GetCopy(Node* original) { |
| 181 Node* copy = copies_[original->id()]; | 181 Node* copy = copies_[original->id()]; |
| 182 if (copy == NULL) { | 182 if (copy == NULL) { |
| 183 copy = GetSentinel(original); | 183 copy = GetSentinel(original); |
| 184 } | 184 } |
| 185 return copy; | 185 return copy; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); | 351 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); |
| 352 visitor.CopyGraph(); | 352 visitor.CopyGraph(); |
| 353 | 353 |
| 354 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); | 354 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); |
| 355 inlinee.InlineAtCall(jsgraph_, call); | 355 inlinee.InlineAtCall(jsgraph_, call); |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 } // namespace v8::internal::compiler | 359 } // namespace v8::internal::compiler |
| OLD | NEW |