| 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/ast.h" |    5 #include "src/ast.h" | 
|    6 #include "src/ast-numbering.h" |    6 #include "src/ast-numbering.h" | 
|    7 #include "src/compiler/access-builder.h" |    7 #include "src/compiler/access-builder.h" | 
|    8 #include "src/compiler/ast-graph-builder.h" |    8 #include "src/compiler/ast-graph-builder.h" | 
|    9 #include "src/compiler/common-operator.h" |    9 #include "src/compiler/common-operator.h" | 
|   10 #include "src/compiler/generic-node-inl.h" |   10 #include "src/compiler/generic-node-inl.h" | 
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  158  |  158  | 
|  159  |  159  | 
|  160 class CopyVisitor : public NullNodeVisitor { |  160 class CopyVisitor : public NullNodeVisitor { | 
|  161  public: |  161  public: | 
|  162   CopyVisitor(Graph* source_graph, Graph* target_graph, Zone* temp_zone) |  162   CopyVisitor(Graph* source_graph, Graph* target_graph, Zone* temp_zone) | 
|  163       : copies_(source_graph->NodeCount(), NULL, temp_zone), |  163       : copies_(source_graph->NodeCount(), NULL, temp_zone), | 
|  164         sentinels_(source_graph->NodeCount(), NULL, temp_zone), |  164         sentinels_(source_graph->NodeCount(), NULL, temp_zone), | 
|  165         source_graph_(source_graph), |  165         source_graph_(source_graph), | 
|  166         target_graph_(target_graph), |  166         target_graph_(target_graph), | 
|  167         temp_zone_(temp_zone), |  167         temp_zone_(temp_zone), | 
|  168         sentinel_op_(IrOpcode::kDead, Operator::kNoProperties, 0, 0, |  168         sentinel_op_(IrOpcode::kDead, Operator::kNoProperties, "sentinel", 0, 0, | 
|  169                      "sentinel") {} |  169                      0, 0, 0, 0) {} | 
|  170  |  170  | 
|  171   GenericGraphVisit::Control Post(Node* original) { |  171   GenericGraphVisit::Control Post(Node* original) { | 
|  172     NodeVector inputs(temp_zone_); |  172     NodeVector inputs(temp_zone_); | 
|  173     for (InputIter it = original->inputs().begin(); |  173     for (InputIter it = original->inputs().begin(); | 
|  174          it != original->inputs().end(); ++it) { |  174          it != original->inputs().end(); ++it) { | 
|  175       inputs.push_back(GetCopy(*it)); |  175       inputs.push_back(GetCopy(*it)); | 
|  176     } |  176     } | 
|  177  |  177  | 
|  178     // Reuse the operator in the copy. This assumes that op lives in a zone |  178     // Reuse the operator in the copy. This assumes that op lives in a zone | 
|  179     // that lives longer than graph()'s zone. |  179     // that lives longer than graph()'s zone. | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  217       sentinel = target_graph_->NewNode(&sentinel_op_); |  217       sentinel = target_graph_->NewNode(&sentinel_op_); | 
|  218     } |  218     } | 
|  219     return sentinel; |  219     return sentinel; | 
|  220   } |  220   } | 
|  221  |  221  | 
|  222   NodeVector copies_; |  222   NodeVector copies_; | 
|  223   NodeVector sentinels_; |  223   NodeVector sentinels_; | 
|  224   Graph* source_graph_; |  224   Graph* source_graph_; | 
|  225   Graph* target_graph_; |  225   Graph* target_graph_; | 
|  226   Zone* temp_zone_; |  226   Zone* temp_zone_; | 
|  227   SimpleOperator sentinel_op_; |  227   Operator sentinel_op_; | 
|  228 }; |  228 }; | 
|  229  |  229  | 
|  230  |  230  | 
|  231 void Inlinee::InlineAtCall(JSGraph* jsgraph, Node* call) { |  231 void Inlinee::InlineAtCall(JSGraph* jsgraph, Node* call) { | 
|  232   // The scheduler is smart enough to place our code; we just ensure {control} |  232   // The scheduler is smart enough to place our code; we just ensure {control} | 
|  233   // becomes the control input of the start of the inlinee. |  233   // becomes the control input of the start of the inlinee. | 
|  234   Node* control = NodeProperties::GetControlInput(call); |  234   Node* control = NodeProperties::GetControlInput(call); | 
|  235  |  235  | 
|  236   // The inlinee uses the context from the JSFunction object. This will |  236   // The inlinee uses the context from the JSFunction object. This will | 
|  237   // also be the effect dependency for the inlinee as it produces an effect. |  237   // also be the effect dependency for the inlinee as it produces an effect. | 
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  489              info_->shared_info()->DebugName()->ToCString().get()); |  489              info_->shared_info()->DebugName()->ToCString().get()); | 
|  490     } |  490     } | 
|  491     NodeProperties::ReplaceWithValue(call_node, r.first, r.second); |  491     NodeProperties::ReplaceWithValue(call_node, r.first, r.second); | 
|  492     call_node->RemoveAllInputs(); |  492     call_node->RemoveAllInputs(); | 
|  493     DCHECK_EQ(0, call_node->UseCount()); |  493     DCHECK_EQ(0, call_node->UseCount()); | 
|  494   } |  494   } | 
|  495 } |  495 } | 
|  496 } |  496 } | 
|  497 } |  497 } | 
|  498 }  // namespace v8::internal::compiler |  498 }  // namespace v8::internal::compiler | 
| OLD | NEW |