OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_COMPILER_GENERIC_NODE_INL_H_ | 5 #ifndef V8_COMPILER_GENERIC_NODE_INL_H_ |
6 #define V8_COMPILER_GENERIC_NODE_INL_H_ | 6 #define V8_COMPILER_GENERIC_NODE_INL_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler/generic-graph.h" | 10 #include "src/compiler/generic-graph.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 template <class B, class S> | 29 template <class B, class S> |
30 inline void GenericNode<B, S>::AssignUniqueID(GenericGraphBase* graph) { | 30 inline void GenericNode<B, S>::AssignUniqueID(GenericGraphBase* graph) { |
31 id_ = graph->NextNodeID(); | 31 id_ = graph->NextNodeID(); |
32 } | 32 } |
33 | 33 |
34 template <class B, class S> | 34 template <class B, class S> |
35 inline typename GenericNode<B, S>::Inputs::iterator | 35 inline typename GenericNode<B, S>::Inputs::iterator |
36 GenericNode<B, S>::Inputs::begin() { | 36 GenericNode<B, S>::Inputs::begin() { |
37 return GenericNode<B, S>::Inputs::iterator(this->node_, 0); | 37 return typename GenericNode<B, S>::Inputs::iterator(this->node_, 0); |
38 } | 38 } |
39 | 39 |
40 template <class B, class S> | 40 template <class B, class S> |
41 inline typename GenericNode<B, S>::Inputs::iterator | 41 inline typename GenericNode<B, S>::Inputs::iterator |
42 GenericNode<B, S>::Inputs::end() { | 42 GenericNode<B, S>::Inputs::end() { |
43 return GenericNode<B, S>::Inputs::iterator(this->node_, | 43 return typename GenericNode<B, S>::Inputs::iterator( |
44 this->node_->InputCount()); | 44 this->node_, this->node_->InputCount()); |
45 } | 45 } |
46 | 46 |
47 template <class B, class S> | 47 template <class B, class S> |
48 inline typename GenericNode<B, S>::Uses::iterator | 48 inline typename GenericNode<B, S>::Uses::iterator |
49 GenericNode<B, S>::Uses::begin() { | 49 GenericNode<B, S>::Uses::begin() { |
50 return GenericNode<B, S>::Uses::iterator(this->node_); | 50 return typename GenericNode<B, S>::Uses::iterator(this->node_); |
51 } | 51 } |
52 | 52 |
53 template <class B, class S> | 53 template <class B, class S> |
54 inline typename GenericNode<B, S>::Uses::iterator | 54 inline typename GenericNode<B, S>::Uses::iterator |
55 GenericNode<B, S>::Uses::end() { | 55 GenericNode<B, S>::Uses::end() { |
56 return GenericNode<B, S>::Uses::iterator(); | 56 return typename GenericNode<B, S>::Uses::iterator(); |
57 } | 57 } |
58 | 58 |
59 template <class B, class S> | 59 template <class B, class S> |
60 void GenericNode<B, S>::ReplaceUses(GenericNode* replace_to) { | 60 void GenericNode<B, S>::ReplaceUses(GenericNode* replace_to) { |
61 for (Use* use = first_use_; use != NULL; use = use->next) { | 61 for (Use* use = first_use_; use != NULL; use = use->next) { |
62 use->from->GetInputRecordPtr(use->input_index)->to = replace_to; | 62 use->from->GetInputRecordPtr(use->input_index)->to = replace_to; |
63 } | 63 } |
64 if (replace_to->last_use_ == NULL) { | 64 if (replace_to->last_use_ == NULL) { |
65 ASSERT_EQ(NULL, replace_to->first_use_); | 65 ASSERT_EQ(NULL, replace_to->first_use_); |
66 replace_to->first_use_ = first_use_; | 66 replace_to->first_use_ = first_use_; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 ++use; | 236 ++use; |
237 ++input; | 237 ++input; |
238 } | 238 } |
239 return result; | 239 return result; |
240 } | 240 } |
241 } | 241 } |
242 } | 242 } |
243 } // namespace v8::internal::compiler | 243 } // namespace v8::internal::compiler |
244 | 244 |
245 #endif // V8_COMPILER_GENERIC_NODE_INL_H_ | 245 #endif // V8_COMPILER_GENERIC_NODE_INL_H_ |
OLD | NEW |