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

Side by Side Diff: src/types.cc

Issue 602613002: Add some tests about range types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | test/cctest/test-types.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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 void TypeImpl<Config>::PrintTo(OStream& os, PrintDimension dim) { // NOLINT 1039 void TypeImpl<Config>::PrintTo(OStream& os, PrintDimension dim) { // NOLINT
1040 DisallowHeapAllocation no_allocation; 1040 DisallowHeapAllocation no_allocation;
1041 if (dim != REPRESENTATION_DIM) { 1041 if (dim != REPRESENTATION_DIM) {
1042 if (this->IsBitset()) { 1042 if (this->IsBitset()) {
1043 BitsetType::Print(os, SEMANTIC(this->AsBitset())); 1043 BitsetType::Print(os, SEMANTIC(this->AsBitset()));
1044 } else if (this->IsClass()) { 1044 } else if (this->IsClass()) {
1045 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < "; 1045 os << "Class(" << static_cast<void*>(*this->AsClass()->Map()) << " < ";
1046 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim); 1046 BitsetType::New(BitsetType::Lub(this))->PrintTo(os, dim);
1047 os << ")"; 1047 os << ")";
1048 } else if (this->IsConstant()) { 1048 } else if (this->IsConstant()) {
1049 os << "Constant(" << static_cast<void*>(*this->AsConstant()->Value()) 1049 os << "Constant(" << Brief(*this->AsConstant()->Value()) << ")";
1050 << ")";
1051 } else if (this->IsRange()) { 1050 } else if (this->IsRange()) {
1052 os << "Range(" << this->AsRange()->Min()->Number() 1051 os << "Range(" << this->AsRange()->Min()->Number()
1053 << ", " << this->AsRange()->Max()->Number() << ")"; 1052 << ", " << this->AsRange()->Max()->Number() << ")";
1054 } else if (this->IsContext()) { 1053 } else if (this->IsContext()) {
1055 os << "Context("; 1054 os << "Context(";
1056 this->AsContext()->Outer()->PrintTo(os, dim); 1055 this->AsContext()->Outer()->PrintTo(os, dim);
1057 os << ")"; 1056 os << ")";
1058 } else if (this->IsUnion()) { 1057 } else if (this->IsUnion()) {
1059 os << "("; 1058 os << "(";
1060 UnionHandle unioned = handle(this->AsUnion()); 1059 UnionHandle unioned = handle(this->AsUnion());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; 1118 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>;
1120 1119
1121 template TypeImpl<ZoneTypeConfig>::TypeHandle 1120 template TypeImpl<ZoneTypeConfig>::TypeHandle
1122 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( 1121 TypeImpl<ZoneTypeConfig>::Convert<HeapType>(
1123 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); 1122 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*);
1124 template TypeImpl<HeapTypeConfig>::TypeHandle 1123 template TypeImpl<HeapTypeConfig>::TypeHandle
1125 TypeImpl<HeapTypeConfig>::Convert<Type>( 1124 TypeImpl<HeapTypeConfig>::Convert<Type>(
1126 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); 1125 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*);
1127 1126
1128 } } // namespace v8::internal 1127 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698