OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/instruction.h" | 7 #include "src/compiler/instruction.h" |
8 #include "src/compiler/schedule.h" | 8 #include "src/compiler/schedule.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 if (instr.InputCount() > 0) { | 330 if (instr.InputCount() > 0) { |
331 for (size_t i = 0; i < instr.InputCount(); i++) { | 331 for (size_t i = 0; i < instr.InputCount(); i++) { |
332 printable_op.op_ = instr.InputAt(i); | 332 printable_op.op_ = instr.InputAt(i); |
333 os << " " << printable_op; | 333 os << " " << printable_op; |
334 } | 334 } |
335 } | 335 } |
336 return os; | 336 return os; |
337 } | 337 } |
338 | 338 |
339 | 339 |
| 340 Constant::Constant(int32_t v) : type_(kInt32), value_(v) {} |
| 341 |
| 342 |
340 std::ostream& operator<<(std::ostream& os, const Constant& constant) { | 343 std::ostream& operator<<(std::ostream& os, const Constant& constant) { |
341 switch (constant.type()) { | 344 switch (constant.type()) { |
342 case Constant::kInt32: | 345 case Constant::kInt32: |
343 return os << constant.ToInt32(); | 346 return os << constant.ToInt32(); |
344 case Constant::kInt64: | 347 case Constant::kInt64: |
345 return os << constant.ToInt64() << "l"; | 348 return os << constant.ToInt64() << "l"; |
346 case Constant::kFloat32: | 349 case Constant::kFloat32: |
347 return os << constant.ToFloat32() << "f"; | 350 return os << constant.ToFloat32() << "f"; |
348 case Constant::kFloat64: | 351 case Constant::kFloat64: |
349 return os << constant.ToFloat64(); | 352 return os << constant.ToFloat64(); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 os << " B" << succ.ToInt(); | 730 os << " B" << succ.ToInt(); |
728 } | 731 } |
729 os << "\n"; | 732 os << "\n"; |
730 } | 733 } |
731 return os; | 734 return os; |
732 } | 735 } |
733 | 736 |
734 } // namespace compiler | 737 } // namespace compiler |
735 } // namespace internal | 738 } // namespace internal |
736 } // namespace v8 | 739 } // namespace v8 |
OLD | NEW |