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

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

Issue 602563002: [turbofan] Add length operand to LoadElement and StoreElement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments 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 | « no previous file | src/compiler/generic-node-inl.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_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 "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 23 matching lines...) Expand all
34 34
35 inline NodeId id() const { return id_; } 35 inline NodeId id() const { return id_; }
36 36
37 int InputCount() const { return input_count_; } 37 int InputCount() const { return input_count_; }
38 S* InputAt(int index) const { 38 S* InputAt(int index) const {
39 return static_cast<S*>(GetInputRecordPtr(index)->to); 39 return static_cast<S*>(GetInputRecordPtr(index)->to);
40 } 40 }
41 inline void ReplaceInput(int index, GenericNode* new_input); 41 inline void ReplaceInput(int index, GenericNode* new_input);
42 inline void AppendInput(Zone* zone, GenericNode* new_input); 42 inline void AppendInput(Zone* zone, GenericNode* new_input);
43 inline void InsertInput(Zone* zone, int index, GenericNode* new_input); 43 inline void InsertInput(Zone* zone, int index, GenericNode* new_input);
44 inline void RemoveInput(int index);
44 45
45 int UseCount() { return use_count_; } 46 int UseCount() { return use_count_; }
46 S* UseAt(int index) { 47 S* UseAt(int index) {
47 DCHECK(index < use_count_); 48 DCHECK(index < use_count_);
48 Use* current = first_use_; 49 Use* current = first_use_;
49 while (index-- != 0) { 50 while (index-- != 0) {
50 current = current->next; 51 current = current->next;
51 } 52 }
52 return static_cast<S*>(current->from); 53 return static_cast<S*>(current->from);
53 } 54 }
54 inline void ReplaceUses(GenericNode* replace_to); 55 inline void ReplaceUses(GenericNode* replace_to);
55 template <class UnaryPredicate> 56 template <class UnaryPredicate>
56 inline void ReplaceUsesIf(UnaryPredicate pred, GenericNode* replace_to); 57 inline void ReplaceUsesIf(UnaryPredicate pred, GenericNode* replace_to);
57 inline void RemoveAllInputs(); 58 inline void RemoveAllInputs();
58 59
59 void TrimInputCount(int input_count); 60 inline void TrimInputCount(int input_count);
60 61
61 class Inputs { 62 class Inputs {
62 public: 63 public:
63 class iterator; 64 class iterator;
64 iterator begin(); 65 iterator begin();
65 iterator end(); 66 iterator end();
66 67
67 explicit Inputs(GenericNode* node) : node_(node) {} 68 explicit Inputs(GenericNode* node) : node_(node) {}
68 69
69 private: 70 private:
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 263 }
263 264
264 typename GenericNode<B, S>::Use* current_; 265 typename GenericNode<B, S>::Use* current_;
265 int index_; 266 int index_;
266 }; 267 };
267 } 268 }
268 } 269 }
269 } // namespace v8::internal::compiler 270 } // namespace v8::internal::compiler
270 271
271 #endif // V8_COMPILER_GENERIC_NODE_H_ 272 #endif // V8_COMPILER_GENERIC_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/generic-node-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698