| 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/js-inlining.h" | 5 #include "src/compiler/js-inlining.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/compiler/all-nodes.h" | 9 #include "src/compiler/all-nodes.h" |
| 10 #include "src/compiler/ast-graph-builder.h" | 10 #include "src/compiler/ast-graph-builder.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 Node* frame_state() { return NodeProperties::GetFrameStateInput(call_, 0); } | 55 Node* frame_state() { return NodeProperties::GetFrameStateInput(call_, 0); } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 Node* call_; | 58 Node* call_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 | 61 |
| 62 class CopyVisitor { | 62 class CopyVisitor { |
| 63 public: | 63 public: |
| 64 CopyVisitor(Graph* source_graph, Graph* target_graph, Zone* temp_zone) | 64 CopyVisitor(Graph* source_graph, Graph* target_graph, Zone* temp_zone) |
| 65 : sentinel_op_(IrOpcode::kDead, Operator::kNoProperties, "Sentinel", 0, 0, | 65 : sentinel_op_(IrOpcode::kDeadControl, Operator::kNoProperties, |
| 66 0, 0, 0, 0), | 66 "Sentinel", 0, 0, 0, 0, 0, 0), |
| 67 sentinel_(target_graph->NewNode(&sentinel_op_)), | 67 sentinel_(target_graph->NewNode(&sentinel_op_)), |
| 68 copies_(source_graph->NodeCount(), sentinel_, temp_zone), | 68 copies_(source_graph->NodeCount(), sentinel_, temp_zone), |
| 69 source_graph_(source_graph), | 69 source_graph_(source_graph), |
| 70 target_graph_(target_graph), | 70 target_graph_(target_graph), |
| 71 temp_zone_(temp_zone) {} | 71 temp_zone_(temp_zone) {} |
| 72 | 72 |
| 73 Node* GetCopy(Node* orig) { return copies_[orig->id()]; } | 73 Node* GetCopy(Node* orig) { return copies_[orig->id()]; } |
| 74 | 74 |
| 75 void CopyGraph() { | 75 void CopyGraph() { |
| 76 NodeVector inputs(temp_zone_); | 76 NodeVector inputs(temp_zone_); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 // Remember that we inlined this function. | 305 // Remember that we inlined this function. |
| 306 info_->AddInlinedFunction(info.shared_info()); | 306 info_->AddInlinedFunction(info.shared_info()); |
| 307 | 307 |
| 308 return InlineCall(node, frame_state, start, end); | 308 return InlineCall(node, frame_state, start, end); |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace compiler | 311 } // namespace compiler |
| 312 } // namespace internal | 312 } // namespace internal |
| 313 } // namespace v8 | 313 } // namespace v8 |
| OLD | NEW |