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/instruction.h" | 5 #include "src/compiler/instruction.h" |
6 | 6 |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 return os << "\n"; | 293 return os << "\n"; |
294 } | 294 } |
295 | 295 |
296 | 296 |
297 OStream& operator<<(OStream& os, const Constant& constant) { | 297 OStream& operator<<(OStream& os, const Constant& constant) { |
298 switch (constant.type()) { | 298 switch (constant.type()) { |
299 case Constant::kInt32: | 299 case Constant::kInt32: |
300 return os << constant.ToInt32(); | 300 return os << constant.ToInt32(); |
301 case Constant::kInt64: | 301 case Constant::kInt64: |
302 return os << constant.ToInt64() << "l"; | 302 return os << constant.ToInt64() << "l"; |
| 303 case Constant::kFloat32: |
| 304 return os << constant.ToFloat32() << "f"; |
303 case Constant::kFloat64: | 305 case Constant::kFloat64: |
304 return os << constant.ToFloat64(); | 306 return os << constant.ToFloat64(); |
305 case Constant::kExternalReference: | 307 case Constant::kExternalReference: |
306 return os << constant.ToExternalReference().address(); | 308 return os << constant.ToExternalReference().address(); |
307 case Constant::kHeapObject: | 309 case Constant::kHeapObject: |
308 return os << Brief(*constant.ToHeapObject()); | 310 return os << Brief(*constant.ToHeapObject()); |
309 } | 311 } |
310 UNREACHABLE(); | 312 UNREACHABLE(); |
311 return os; | 313 return os; |
312 } | 314 } |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 os << " B" << (*iter)->id(); | 477 os << " B" << (*iter)->id(); |
476 } | 478 } |
477 os << "\n"; | 479 os << "\n"; |
478 } | 480 } |
479 return os; | 481 return os; |
480 } | 482 } |
481 | 483 |
482 } // namespace compiler | 484 } // namespace compiler |
483 } // namespace internal | 485 } // namespace internal |
484 } // namespace v8 | 486 } // namespace v8 |
OLD | NEW |