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

Side by Side Diff: src/compiler/node-properties.cc

Issue 1420283009: [turbofan] Add support for storing to double fields. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "src/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 #include "src/compiler/verifier.h" 9 #include "src/compiler/verifier.h"
10 #include "src/types-inl.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 namespace compiler { 14 namespace compiler {
14 15
15 // static 16 // static
16 int NodeProperties::PastValueIndex(Node* node) { 17 int NodeProperties::PastValueIndex(Node* node) {
17 return FirstValueIndex(node) + node->op()->ValueInputCount(); 18 return FirstValueIndex(node) + node->op()->ValueInputCount();
18 } 19 }
19 20
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 270 }
270 #ifdef DEBUG 271 #ifdef DEBUG
271 for (size_t index = 0; index < projection_count; ++index) { 272 for (size_t index = 0; index < projection_count; ++index) {
272 DCHECK_NOT_NULL(projections[index]); 273 DCHECK_NOT_NULL(projections[index]);
273 } 274 }
274 #endif 275 #endif
275 } 276 }
276 277
277 278
278 // static 279 // static
280 Type* NodeProperties::GetTypeOrAny(Node* node) {
281 return IsTyped(node) ? node->type() : Type::Any();
282 }
283
284
285 // static
279 bool NodeProperties::AllValueInputsAreTyped(Node* node) { 286 bool NodeProperties::AllValueInputsAreTyped(Node* node) {
280 int input_count = node->op()->ValueInputCount(); 287 int input_count = node->op()->ValueInputCount();
281 for (int index = 0; index < input_count; ++index) { 288 for (int index = 0; index < input_count; ++index) {
282 if (!IsTyped(GetValueInput(node, index))) return false; 289 if (!IsTyped(GetValueInput(node, index))) return false;
283 } 290 }
284 return true; 291 return true;
285 } 292 }
286 293
287 294
288 // static 295 // static
289 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 296 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
290 if (num == 0) return false; 297 if (num == 0) return false;
291 int const index = edge.index(); 298 int const index = edge.index();
292 return first <= index && index < first + num; 299 return first <= index && index < first + num;
293 } 300 }
294 301
295 } // namespace compiler 302 } // namespace compiler
296 } // namespace internal 303 } // namespace internal
297 } // namespace v8 304 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698