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

Side by Side Diff: src/types.cc

Issue 225353004: TypePrint() does not depend on Object::Print(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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') | no next file » | 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 "types.h" 5 #include "types.h"
6 6
7 #include "string-stream.h" 7 #include "string-stream.h"
8 #include "types-inl.h" 8 #include "types-inl.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // TODO(rossberg): this does not belong here. 561 // TODO(rossberg): this does not belong here.
562 Representation Representation::FromType(Type* type) { 562 Representation Representation::FromType(Type* type) {
563 if (type->Is(Type::None())) return Representation::None(); 563 if (type->Is(Type::None())) return Representation::None();
564 if (type->Is(Type::SignedSmall())) return Representation::Smi(); 564 if (type->Is(Type::SignedSmall())) return Representation::Smi();
565 if (type->Is(Type::Signed32())) return Representation::Integer32(); 565 if (type->Is(Type::Signed32())) return Representation::Integer32();
566 if (type->Is(Type::Number())) return Representation::Double(); 566 if (type->Is(Type::Number())) return Representation::Double();
567 return Representation::Tagged(); 567 return Representation::Tagged();
568 } 568 }
569 569
570 570
571 #ifdef OBJECT_PRINT
572 template<class Config> 571 template<class Config>
573 void TypeImpl<Config>::TypePrint(PrintDimension dim) { 572 void TypeImpl<Config>::TypePrint(PrintDimension dim) {
574 TypePrint(stdout, dim); 573 TypePrint(stdout, dim);
575 PrintF(stdout, "\n"); 574 PrintF(stdout, "\n");
576 Flush(stdout); 575 Flush(stdout);
577 } 576 }
578 577
579 578
580 template<class Config> 579 template<class Config>
581 const char* TypeImpl<Config>::bitset_name(int bitset) { 580 const char* TypeImpl<Config>::bitset_name(int bitset) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 PrintF(out, "("); 658 PrintF(out, "(");
660 UnionedHandle unioned = this->AsUnion(); 659 UnionedHandle unioned = this->AsUnion();
661 for (int i = 0; i < Config::union_length(unioned); ++i) { 660 for (int i = 0; i < Config::union_length(unioned); ++i) {
662 TypeHandle type_i = Config::union_get(unioned, i); 661 TypeHandle type_i = Config::union_get(unioned, i);
663 if (i > 0) PrintF(out, " | "); 662 if (i > 0) PrintF(out, " | ");
664 type_i->TypePrint(out, dim); 663 type_i->TypePrint(out, dim);
665 } 664 }
666 PrintF(out, ")"); 665 PrintF(out, ")");
667 } 666 }
668 } 667 }
669 #endif
670 668
671 669
672 template class TypeImpl<ZoneTypeConfig>; 670 template class TypeImpl<ZoneTypeConfig>;
673 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Map>; 671 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Map>;
674 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Object>; 672 template class TypeImpl<ZoneTypeConfig>::Iterator<i::Object>;
675 673
676 template class TypeImpl<HeapTypeConfig>; 674 template class TypeImpl<HeapTypeConfig>;
677 template class TypeImpl<HeapTypeConfig>::Iterator<i::Map>; 675 template class TypeImpl<HeapTypeConfig>::Iterator<i::Map>;
678 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; 676 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>;
679 677
680 template TypeImpl<ZoneTypeConfig>::TypeHandle 678 template TypeImpl<ZoneTypeConfig>::TypeHandle
681 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( 679 TypeImpl<ZoneTypeConfig>::Convert<HeapType>(
682 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); 680 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*);
683 template TypeImpl<HeapTypeConfig>::TypeHandle 681 template TypeImpl<HeapTypeConfig>::TypeHandle
684 TypeImpl<HeapTypeConfig>::Convert<Type>( 682 TypeImpl<HeapTypeConfig>::Convert<Type>(
685 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); 683 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*);
686 684
687 } } // namespace v8::internal 685 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698