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

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

Issue 1488953003: [turbofan] Print API for Node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « src/compiler/node.h ('k') | no next file » | 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 #include "src/compiler/node.h" 5 #include "src/compiler/node.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } else if (from == owner2) { 264 } else if (from == owner2) {
265 mask |= 2; 265 mask |= 2;
266 } else { 266 } else {
267 return false; 267 return false;
268 } 268 }
269 } 269 }
270 return mask == 3; 270 return mask == 3;
271 } 271 }
272 272
273 273
274 void Node::Print() const {
275 OFStream os(stdout);
276 os << *this << std::endl;
277 }
278
279
274 Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity) 280 Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity)
275 : op_(op), 281 : op_(op),
276 type_(nullptr), 282 type_(nullptr),
277 mark_(0), 283 mark_(0),
278 bit_field_(IdField::encode(id) | InlineCountField::encode(inline_count) | 284 bit_field_(IdField::encode(id) | InlineCountField::encode(inline_count) |
279 InlineCapacityField::encode(inline_capacity)), 285 InlineCapacityField::encode(inline_capacity)),
280 first_use_(nullptr) { 286 first_use_(nullptr) {
281 // Inputs must either be out of line or within the inline capacity. 287 // Inputs must either be out of line or within the inline capacity.
282 DCHECK(inline_capacity <= kMaxInlineCapacity); 288 DCHECK(inline_capacity <= kMaxInlineCapacity);
283 DCHECK(inline_count == kOutlineMarker || inline_count <= inline_capacity); 289 DCHECK(inline_count == kOutlineMarker || inline_count <= inline_capacity);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 ++(*this); 402 ++(*this);
397 return result; 403 return result;
398 } 404 }
399 405
400 406
401 bool Node::Uses::empty() const { return begin() == end(); } 407 bool Node::Uses::empty() const { return begin() == end(); }
402 408
403 } // namespace compiler 409 } // namespace compiler
404 } // namespace internal 410 } // namespace internal
405 } // namespace v8 411 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698