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" |
11 #include "src/compiler/generic-node.h" | 11 #include "src/compiler/generic-node.h" |
12 #include "src/zone.h" | 12 #include "src/zone.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 template <class B, class S> | 18 template <class B, class S> |
19 GenericNode<B, S>::GenericNode(GenericGraphBase* graph, int input_count) | 19 GenericNode<B, S>::GenericNode(GenericGraphBase* graph, int input_count) |
20 : BaseClass(graph->zone()), | 20 : BaseClass(graph->zone()), |
21 input_count_(input_count), | 21 input_count_(input_count), |
22 has_appendable_inputs_(false), | 22 has_appendable_inputs_(false), |
23 use_count_(0), | 23 use_count_(0), |
24 first_use_(NULL), | 24 first_use_(NULL), |
25 last_use_(NULL) { | 25 last_use_(NULL) { |
26 inputs_.static_ = reinterpret_cast<Input*>(this + 1), AssignUniqueID(graph); | 26 inputs_.static_ = reinterpret_cast<Input*>(this + 1); |
titzer
2014/08/28 13:12:31
That's a nice little gift
Benedikt Meurer
2014/08/29 07:00:58
Ahem, can we please get rid of this undefined beha
rossberg
2014/08/29 07:23:42
I agree. Since this problem has nothing to do with
| |
27 AssignUniqueID(graph); | |
27 } | 28 } |
28 | 29 |
29 template <class B, class S> | 30 template <class B, class S> |
30 inline void GenericNode<B, S>::AssignUniqueID(GenericGraphBase* graph) { | 31 inline void GenericNode<B, S>::AssignUniqueID(GenericGraphBase* graph) { |
31 id_ = graph->NextNodeID(); | 32 id_ = graph->NextNodeID(); |
32 } | 33 } |
33 | 34 |
34 template <class B, class S> | 35 template <class B, class S> |
35 inline typename GenericNode<B, S>::Inputs::iterator | 36 inline typename GenericNode<B, S>::Inputs::iterator |
36 GenericNode<B, S>::Inputs::begin() { | 37 GenericNode<B, S>::Inputs::begin() { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 ++use; | 237 ++use; |
237 ++input; | 238 ++input; |
238 } | 239 } |
239 return result; | 240 return result; |
240 } | 241 } |
241 } | 242 } |
242 } | 243 } |
243 } // namespace v8::internal::compiler | 244 } // namespace v8::internal::compiler |
244 | 245 |
245 #endif // V8_COMPILER_GENERIC_NODE_INL_H_ | 246 #endif // V8_COMPILER_GENERIC_NODE_INL_H_ |
OLD | NEW |