Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: src/compiler/generic-node-inl.h

Issue 505133003: Introduce subclass wrappers for STL containers that make them a lot easier (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/generic-node.h ('k') | src/compiler/graph.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/compiler/generic-node.h ('k') | src/compiler/graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698