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 | |
515 | 507 |
516 std::ostream& operator<<(std::ostream& os, const Constant& constant) { | 508 std::ostream& operator<<(std::ostream& os, const Constant& constant) { |
517 switch (constant.type()) { | 509 switch (constant.type()) { |
518 case Constant::kInt32: | 510 case Constant::kInt32: |
519 return os << constant.ToInt32(); | 511 return os << constant.ToInt32(); |
520 case Constant::kInt64: | 512 case Constant::kInt64: |
521 return os << constant.ToInt64() << "l"; | 513 return os << constant.ToInt64() << "l"; |
522 case Constant::kFloat32: | 514 case Constant::kFloat32: |
523 return os << constant.ToFloat32() << "f"; | 515 return os << constant.ToFloat32() << "f"; |
524 case Constant::kFloat64: | 516 case Constant::kFloat64: |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 } | 1004 } |
1013 for (int i = 0; i < code.InstructionBlockCount(); i++) { | 1005 for (int i = 0; i < code.InstructionBlockCount(); i++) { |
1014 printable.sequence_->PrintBlock(printable.register_configuration_, i); | 1006 printable.sequence_->PrintBlock(printable.register_configuration_, i); |
1015 } | 1007 } |
1016 return os; | 1008 return os; |
1017 } | 1009 } |
1018 | 1010 |
1019 } // namespace compiler | 1011 } // namespace compiler |
1020 } // namespace internal | 1012 } // namespace internal |
1021 } // namespace v8 | 1013 } // namespace v8 |
OLD | NEW |