| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } else { | 134 } else { |
| 135 use->next = NULL; | 135 use->next = NULL; |
| 136 use->prev = NULL; | 136 use->prev = NULL; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 template <class B, class S> | 140 template <class B, class S> |
| 141 void GenericNode<B, S>::EnsureAppendableInputs(Zone* zone) { | 141 void GenericNode<B, S>::EnsureAppendableInputs(Zone* zone) { |
| 142 if (!has_appendable_inputs_) { | 142 if (!has_appendable_inputs_) { |
| 143 void* deque_buffer = zone->New(sizeof(InputDeque)); | 143 void* deque_buffer = zone->New(sizeof(InputDeque)); |
| 144 InputDeque* deque = new (deque_buffer) InputDeque(ZoneInputAllocator(zone)); | 144 InputDeque* deque = new (deque_buffer) InputDeque(zone); |
| 145 for (int i = 0; i < input_count_; ++i) { | 145 for (int i = 0; i < input_count_; ++i) { |
| 146 deque->push_back(inputs_.static_[i]); | 146 deque->push_back(inputs_.static_[i]); |
| 147 } | 147 } |
| 148 inputs_.appendable_ = deque; | 148 inputs_.appendable_ = deque; |
| 149 has_appendable_inputs_ = true; | 149 has_appendable_inputs_ = true; |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 template <class B, class S> | 153 template <class B, class S> |
| 154 void GenericNode<B, S>::AppendInput(Zone* zone, GenericNode<B, S>* to_append) { | 154 void GenericNode<B, S>::AppendInput(Zone* zone, GenericNode<B, S>* to_append) { |
| (...skipping 81 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 |