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 #include "src/compiler/state-values-utils.h" | 9 #include "src/compiler/state-values-utils.h" |
10 | 10 |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 printable_op.op_ = *instr.InputAt(i); | 497 printable_op.op_ = *instr.InputAt(i); |
498 os << " " << printable_op; | 498 os << " " << printable_op; |
499 } | 499 } |
500 } | 500 } |
501 return os; | 501 return os; |
502 } | 502 } |
503 | 503 |
504 | 504 |
505 Constant::Constant(int32_t v) : type_(kInt32), value_(v) {} | 505 Constant::Constant(int32_t v) : type_(kInt32), value_(v) {} |
506 | 506 |
| 507 Constant::Constant(RelocatablePtrConstantInfo info) |
| 508 #ifdef V8_HOST_ARCH_32_BIT |
| 509 : type_(kInt32), value_(info.value()), rmode_(info.rmode()) { |
| 510 } |
| 511 #else |
| 512 : type_(kInt64), value_(info.value()), rmode_(info.rmode()) { |
| 513 } |
| 514 #endif |
507 | 515 |
508 std::ostream& operator<<(std::ostream& os, const Constant& constant) { | 516 std::ostream& operator<<(std::ostream& os, const Constant& constant) { |
509 switch (constant.type()) { | 517 switch (constant.type()) { |
510 case Constant::kInt32: | 518 case Constant::kInt32: |
511 return os << constant.ToInt32(); | 519 return os << constant.ToInt32(); |
512 case Constant::kInt64: | 520 case Constant::kInt64: |
513 return os << constant.ToInt64() << "l"; | 521 return os << constant.ToInt64() << "l"; |
514 case Constant::kFloat32: | 522 case Constant::kFloat32: |
515 return os << constant.ToFloat32() << "f"; | 523 return os << constant.ToFloat32() << "f"; |
516 case Constant::kFloat64: | 524 case Constant::kFloat64: |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 } | 1012 } |
1005 for (int i = 0; i < code.InstructionBlockCount(); i++) { | 1013 for (int i = 0; i < code.InstructionBlockCount(); i++) { |
1006 printable.sequence_->PrintBlock(printable.register_configuration_, i); | 1014 printable.sequence_->PrintBlock(printable.register_configuration_, i); |
1007 } | 1015 } |
1008 return os; | 1016 return os; |
1009 } | 1017 } |
1010 | 1018 |
1011 } // namespace compiler | 1019 } // namespace compiler |
1012 } // namespace internal | 1020 } // namespace internal |
1013 } // namespace v8 | 1021 } // namespace v8 |
OLD | NEW |