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

Side by Side Diff: src/compiler/generic-node-inl.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 | « src/compiler/generic-node.h ('k') | src/compiler/js-generic-lowering.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_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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 DCHECK(index >= 0 && index < InputCount()); 171 DCHECK(index >= 0 && index < InputCount());
172 // TODO(turbofan): Optimize this implementation! 172 // TODO(turbofan): Optimize this implementation!
173 AppendInput(zone, InputAt(InputCount() - 1)); 173 AppendInput(zone, InputAt(InputCount() - 1));
174 for (int i = InputCount() - 1; i > index; --i) { 174 for (int i = InputCount() - 1; i > index; --i) {
175 ReplaceInput(i, InputAt(i - 1)); 175 ReplaceInput(i, InputAt(i - 1));
176 } 176 }
177 ReplaceInput(index, to_insert); 177 ReplaceInput(index, to_insert);
178 } 178 }
179 179
180 template <class B, class S> 180 template <class B, class S>
181 void GenericNode<B, S>::RemoveInput(int index) {
182 DCHECK(index >= 0 && index < InputCount());
183 // TODO(turbofan): Optimize this implementation!
184 for (; index < InputCount() - 1; ++index) {
185 ReplaceInput(index, InputAt(index + 1));
186 }
187 TrimInputCount(InputCount() - 1);
188 }
189
190 template <class B, class S>
181 void GenericNode<B, S>::AppendUse(Use* use) { 191 void GenericNode<B, S>::AppendUse(Use* use) {
182 use->next = NULL; 192 use->next = NULL;
183 use->prev = last_use_; 193 use->prev = last_use_;
184 if (last_use_ == NULL) { 194 if (last_use_ == NULL) {
185 first_use_ = use; 195 first_use_ = use;
186 } else { 196 } else {
187 last_use_->next = use; 197 last_use_->next = use;
188 } 198 }
189 last_use_ = use; 199 last_use_ = use;
190 ++use_count_; 200 ++use_count_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 ++use; 247 ++use;
238 ++input; 248 ++input;
239 } 249 }
240 return result; 250 return result;
241 } 251 }
242 } 252 }
243 } 253 }
244 } // namespace v8::internal::compiler 254 } // namespace v8::internal::compiler
245 255
246 #endif // V8_COMPILER_GENERIC_NODE_INL_H_ 256 #endif // V8_COMPILER_GENERIC_NODE_INL_H_
OLDNEW
« no previous file with comments | « src/compiler/generic-node.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698