Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: src/types.cc

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/types.h ('k') | src/typing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/types.h" 5 #include "src/types.h"
6 6
7 #include "src/ostreams.h" 7 #include "src/ostreams.h"
8 #include "src/types-inl.h" 8 #include "src/types-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 SEMANTIC_BITSET_TYPE_LIST(RETURN_NAMED_SEMANTIC_TYPE) 988 SEMANTIC_BITSET_TYPE_LIST(RETURN_NAMED_SEMANTIC_TYPE)
989 #undef RETURN_NAMED_SEMANTIC_TYPE 989 #undef RETURN_NAMED_SEMANTIC_TYPE
990 990
991 default: 991 default:
992 return NULL; 992 return NULL;
993 } 993 }
994 } 994 }
995 995
996 996
997 template <class Config> 997 template <class Config>
998 void TypeImpl<Config>::BitsetType::Print(OStream& os, // NOLINT 998 void TypeImpl<Config>::BitsetType::Print(std::ostream& os, // NOLINT
999 bitset bits) { 999 bitset bits) {
1000 DisallowHeapAllocation no_allocation; 1000 DisallowHeapAllocation no_allocation;
1001 const char* name = Name(bits); 1001 const char* name = Name(bits);
1002 if (name != NULL) { 1002 if (name != NULL) {
1003 os << name; 1003 os << name;
1004 return; 1004 return;
1005 } 1005 }
1006 1006
1007 static const bitset named_bitsets[] = { 1007 static const bitset named_bitsets[] = {
1008 #define BITSET_CONSTANT(type, value) REPRESENTATION(k##type), 1008 #define BITSET_CONSTANT(type, value) REPRESENTATION(k##type),
(...skipping 15 matching lines...) Expand all
1024 os << Name(subset); 1024 os << Name(subset);
1025 bits -= subset; 1025 bits -= subset;
1026 } 1026 }
1027 } 1027 }
1028 DCHECK(bits == 0); 1028 DCHECK(bits == 0);
1029 os << ")"; 1029 os << ")";
1030 } 1030 }
1031 1031
1032 1032
1033 template <class Config> 1033 template <class Config>
1034 void TypeImpl<Config>::PrintTo(OStream& os, PrintDimension dim) { // NOLINT 1034 void TypeImpl<Config>::PrintTo(std::ostream& os, PrintDimension dim) {
1035 DisallowHeapAllocation no_allocation; 1035 DisallowHeapAllocation no_allocation;
1036 if (dim != REPRESENTATION_DIM) { 1036 if (dim != REPRESENTATION_DIM) {
1037 if (this->IsBitset()) { 1037 if (this->IsBitset()) {
1038 BitsetType::Print(os, SEMANTIC(this->AsBitset())); 1038 BitsetType::Print(os, SEMANTIC(this->AsBitset()));
1039 } else if (this->IsClass()) { 1039 } else if (this->IsClass()) {
1040 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < "; 1040 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < ";
1041 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim); 1041 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim);
1042 os << ")"; 1042 os << ")";
1043 } else if (this->IsConstant()) { 1043 } else if (this->IsConstant()) {
1044 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")"; 1044 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")";
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 BitsetType::Print(os, REPRESENTATION(this->BitsetLub())); 1082 BitsetType::Print(os, REPRESENTATION(this->BitsetLub()));
1083 } 1083 }
1084 } 1084 }
1085 1085
1086 1086
1087 #ifdef DEBUG 1087 #ifdef DEBUG
1088 template <class Config> 1088 template <class Config>
1089 void TypeImpl<Config>::Print() { 1089 void TypeImpl<Config>::Print() {
1090 OFStream os(stdout); 1090 OFStream os(stdout);
1091 PrintTo(os); 1091 PrintTo(os);
1092 os << endl; 1092 os << std::endl;
1093 } 1093 }
1094 template <class Config> 1094 template <class Config>
1095 void TypeImpl<Config>::BitsetType::Print(bitset bits) { 1095 void TypeImpl<Config>::BitsetType::Print(bitset bits) {
1096 OFStream os(stdout); 1096 OFStream os(stdout);
1097 Print(os, bits); 1097 Print(os, bits);
1098 os << endl; 1098 os << std::endl;
1099 } 1099 }
1100 #endif 1100 #endif
1101 1101
1102 1102
1103 // ----------------------------------------------------------------------------- 1103 // -----------------------------------------------------------------------------
1104 // Instantiations. 1104 // Instantiations.
1105 1105
1106 template class TypeImpl<ZoneTypeConfig>; 1106 template class TypeImpl<ZoneTypeConfig>;
1107 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Map>; 1107 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Map>;
1108 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Object>; 1108 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Object>;
1109 1109
1110 template class TypeImpl<HeapTypeConfig>; 1110 template class TypeImpl<HeapTypeConfig>;
1111 template class TypeImpl<HeapTypeConfig>::Iterator<i::Map>; 1111 template class TypeImpl<HeapTypeConfig>::Iterator<i::Map>;
1112 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; 1112 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>;
1113 1113
1114 template TypeImpl<ZoneTypeConfig>::TypeHandle 1114 template TypeImpl<ZoneTypeConfig>::TypeHandle
1115 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( 1115 TypeImpl<ZoneTypeConfig>::Convert<HeapType>(
1116 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); 1116 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*);
1117 template TypeImpl<HeapTypeConfig>::TypeHandle 1117 template TypeImpl<HeapTypeConfig>::TypeHandle
1118 TypeImpl<HeapTypeConfig>::Convert<Type>( 1118 TypeImpl<HeapTypeConfig>::Convert<Type>(
1119 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); 1119 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*);
1120 1120
1121 } } // namespace v8::internal 1121 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/types.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698