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 <iomanip> |
| 6 |
5 #include "src/types.h" | 7 #include "src/types.h" |
6 | 8 |
7 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
8 #include "src/types-inl.h" | 10 #include "src/types-inl.h" |
9 | 11 |
10 namespace v8 { | 12 namespace v8 { |
11 namespace internal { | 13 namespace internal { |
12 | 14 |
13 | 15 |
14 // NOTE: If code is marked as being a "shortcut", this means that removing | 16 // NOTE: If code is marked as being a "shortcut", this means that removing |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 if (dim != REPRESENTATION_DIM) { | 1012 if (dim != REPRESENTATION_DIM) { |
1011 if (this->IsBitset()) { | 1013 if (this->IsBitset()) { |
1012 BitsetType::Print(os, SEMANTIC(this->AsBitset())); | 1014 BitsetType::Print(os, SEMANTIC(this->AsBitset())); |
1013 } else if (this->IsClass()) { | 1015 } else if (this->IsClass()) { |
1014 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < "; | 1016 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < "; |
1015 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim); | 1017 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim); |
1016 os << ")"; | 1018 os << ")"; |
1017 } else if (this->IsConstant()) { | 1019 } else if (this->IsConstant()) { |
1018 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")"; | 1020 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")"; |
1019 } else if (this->IsRange()) { | 1021 } else if (this->IsRange()) { |
1020 os << "Range(" << this->AsRange()->Min()->Number() | 1022 std::ostream::fmtflags saved_flags = os.setf(std::ios::fixed); |
1021 << ", " << this->AsRange()->Max()->Number() << ")"; | 1023 std::streamsize saved_precision = os.precision(0); |
| 1024 os << "Range(" << this->AsRange()->Min()->Number() << ", " |
| 1025 << this->AsRange()->Max()->Number() << ")"; |
| 1026 os.flags(saved_flags); |
| 1027 os.precision(saved_precision); |
1022 } else if (this->IsContext()) { | 1028 } else if (this->IsContext()) { |
1023 os << "Context("; | 1029 os << "Context("; |
1024 this->AsContext()->Outer()->PrintTo(os, dim); | 1030 this->AsContext()->Outer()->PrintTo(os, dim); |
1025 os << ")"; | 1031 os << ")"; |
1026 } else if (this->IsUnion()) { | 1032 } else if (this->IsUnion()) { |
1027 os << "("; | 1033 os << "("; |
1028 for (int i = 0, n = this->AsUnion()->Length(); i < n; ++i) { | 1034 for (int i = 0, n = this->AsUnion()->Length(); i < n; ++i) { |
1029 TypeHandle type_i = this->AsUnion()->Get(i); | 1035 TypeHandle type_i = this->AsUnion()->Get(i); |
1030 if (i > 0) os << " | "; | 1036 if (i > 0) os << " | "; |
1031 type_i->PrintTo(os, dim); | 1037 type_i->PrintTo(os, dim); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; | 1092 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; |
1087 | 1093 |
1088 template TypeImpl<ZoneTypeConfig>::TypeHandle | 1094 template TypeImpl<ZoneTypeConfig>::TypeHandle |
1089 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( | 1095 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( |
1090 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); | 1096 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); |
1091 template TypeImpl<HeapTypeConfig>::TypeHandle | 1097 template TypeImpl<HeapTypeConfig>::TypeHandle |
1092 TypeImpl<HeapTypeConfig>::Convert<Type>( | 1098 TypeImpl<HeapTypeConfig>::Convert<Type>( |
1093 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); | 1099 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); |
1094 | 1100 |
1095 } } // namespace v8::internal | 1101 } } // namespace v8::internal |
OLD | NEW |