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

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

Issue 484083003: Reland "Add initial support for inlining." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add initial support for inlining. Created 6 years, 4 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-graph.h ('k') | src/compiler/js-context-specialization.cc » ('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_H_ 5 #ifndef V8_COMPILER_GENERIC_NODE_H_
6 #define V8_COMPILER_GENERIC_NODE_H_ 6 #define V8_COMPILER_GENERIC_NODE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 bool operator==(const iterator& other) const { 197 bool operator==(const iterator& other) const {
198 return other.index_ == index_ && other.node_ == node_; 198 return other.index_ == index_ && other.node_ == node_;
199 } 199 }
200 bool operator!=(const iterator& other) const { return !(other == *this); } 200 bool operator!=(const iterator& other) const { return !(other == *this); }
201 iterator& operator++() { 201 iterator& operator++() {
202 DCHECK(node_ != NULL); 202 DCHECK(node_ != NULL);
203 DCHECK(index_ < node_->input_count_); 203 DCHECK(index_ < node_->input_count_);
204 ++index_; 204 ++index_;
205 return *this; 205 return *this;
206 } 206 }
207 iterator& UpdateToAndIncrement(GenericNode<B, S>* new_to) {
208 typename GenericNode<B, S>::Input* input = GetInput();
209 input->Update(new_to);
210 index_++;
211 return *this;
212 }
207 int index() { return index_; } 213 int index() { return index_; }
208 214
209 private: 215 private:
210 friend class GenericNode; 216 friend class GenericNode;
211 217
212 explicit iterator(GenericNode* node, int index) 218 explicit iterator(GenericNode* node, int index)
213 : node_(node), index_(index) {} 219 : node_(node), index_(index) {}
214 220
215 Input* GetInput() const { return node_->GetInputRecordPtr(index_); } 221 Input* GetInput() const { return node_->GetInputRecordPtr(index_); }
216 222
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 268 }
263 269
264 typename GenericNode<B, S>::Use* current_; 270 typename GenericNode<B, S>::Use* current_;
265 int index_; 271 int index_;
266 }; 272 };
267 } 273 }
268 } 274 }
269 } // namespace v8::internal::compiler 275 } // namespace v8::internal::compiler
270 276
271 #endif // V8_COMPILER_GENERIC_NODE_H_ 277 #endif // V8_COMPILER_GENERIC_NODE_H_
OLDNEW
« no previous file with comments | « src/compiler/generic-graph.h ('k') | src/compiler/js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698