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

Side by Side Diff: src/objects-printer.cc

Issue 17153011: DataView implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 7 years, 6 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/objects-inl.h ('k') | src/objects-visiting.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 break; 187 break;
188 case PROPERTY_CELL_TYPE: 188 case PROPERTY_CELL_TYPE:
189 PropertyCell::cast(this)->PropertyCellPrint(out); 189 PropertyCell::cast(this)->PropertyCellPrint(out);
190 break; 190 break;
191 case JS_ARRAY_BUFFER_TYPE: 191 case JS_ARRAY_BUFFER_TYPE:
192 JSArrayBuffer::cast(this)->JSArrayBufferPrint(out); 192 JSArrayBuffer::cast(this)->JSArrayBufferPrint(out);
193 break; 193 break;
194 case JS_TYPED_ARRAY_TYPE: 194 case JS_TYPED_ARRAY_TYPE:
195 JSTypedArray::cast(this)->JSTypedArrayPrint(out); 195 JSTypedArray::cast(this)->JSTypedArrayPrint(out);
196 break; 196 break;
197 case JS_DATA_VIEW_TYPE:
198 JSDataView::cast(this)->JSDataViewPrint(out);
199 break;
197 #define MAKE_STRUCT_CASE(NAME, Name, name) \ 200 #define MAKE_STRUCT_CASE(NAME, Name, name) \
198 case NAME##_TYPE: \ 201 case NAME##_TYPE: \
199 Name::cast(this)->Name##Print(out); \ 202 Name::cast(this)->Name##Print(out); \
200 break; 203 break;
201 STRUCT_LIST(MAKE_STRUCT_CASE) 204 STRUCT_LIST(MAKE_STRUCT_CASE)
202 #undef MAKE_STRUCT_CASE 205 #undef MAKE_STRUCT_CASE
203 206
204 default: 207 default:
205 PrintF(out, "UNKNOWN TYPE %d", map()->instance_type()); 208 PrintF(out, "UNKNOWN TYPE %d", map()->instance_type());
206 UNREACHABLE(); 209 UNREACHABLE();
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; 547 case JS_FUNCTION_TYPE: return "JS_FUNCTION";
545 case CODE_TYPE: return "CODE"; 548 case CODE_TYPE: return "CODE";
546 case JS_ARRAY_TYPE: return "JS_ARRAY"; 549 case JS_ARRAY_TYPE: return "JS_ARRAY";
547 case JS_PROXY_TYPE: return "JS_PROXY"; 550 case JS_PROXY_TYPE: return "JS_PROXY";
548 case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP"; 551 case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP";
549 case JS_REGEXP_TYPE: return "JS_REGEXP"; 552 case JS_REGEXP_TYPE: return "JS_REGEXP";
550 case JS_VALUE_TYPE: return "JS_VALUE"; 553 case JS_VALUE_TYPE: return "JS_VALUE";
551 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; 554 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT";
552 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT"; 555 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT";
553 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY"; 556 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY";
557 case JS_ARRAY_BUFFER_TYPE: return "JS_ARRAY_BUFFER";
554 case JS_TYPED_ARRAY_TYPE: return "JS_TYPED_ARRAY"; 558 case JS_TYPED_ARRAY_TYPE: return "JS_TYPED_ARRAY";
555 case JS_ARRAY_BUFFER_TYPE: return "JS_ARRAY_BUFFER"; 559 case JS_DATA_VIEW_TYPE: return "JS_DATA_VIEW";
556 case FOREIGN_TYPE: return "FOREIGN"; 560 case FOREIGN_TYPE: return "FOREIGN";
557 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE"; 561 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE";
558 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME; 562 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME;
559 STRUCT_LIST(MAKE_STRUCT_CASE) 563 STRUCT_LIST(MAKE_STRUCT_CASE)
560 #undef MAKE_STRUCT_CASE 564 #undef MAKE_STRUCT_CASE
561 default: return "UNKNOWN"; 565 default: return "UNKNOWN";
562 } 566 }
563 } 567 }
564 568
565 569
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 818 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
815 PrintF(out, " - backing_store = -0x%p\n", backing_store()); 819 PrintF(out, " - backing_store = -0x%p\n", backing_store());
816 PrintF(out, " - byte_length = "); 820 PrintF(out, " - byte_length = ");
817 byte_length()->ShortPrint(out); 821 byte_length()->ShortPrint(out);
818 PrintF(out, "\n"); 822 PrintF(out, "\n");
819 } 823 }
820 824
821 825
822 void JSTypedArray::JSTypedArrayPrint(FILE* out) { 826 void JSTypedArray::JSTypedArrayPrint(FILE* out) {
823 HeapObject::PrintHeader(out, "JSTypedArray"); 827 HeapObject::PrintHeader(out, "JSTypedArray");
824 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 828 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
825 PrintF(out, " - buffer ="); 829 PrintF(out, " - buffer =");
826 buffer()->ShortPrint(out); 830 buffer()->ShortPrint(out);
827 PrintF(out, "\n - byte_offset = "); 831 PrintF(out, "\n - byte_offset = ");
828 byte_offset()->ShortPrint(out); 832 byte_offset()->ShortPrint(out);
829 PrintF(out, "\n - byte_length = "); 833 PrintF(out, "\n - byte_length = ");
830 byte_length()->ShortPrint(out); 834 byte_length()->ShortPrint(out);
831 PrintF(out, "\n - length = "); 835 PrintF(out, "\n - length = ");
832 length()->ShortPrint(out); 836 length()->ShortPrint(out);
833 PrintF("\n"); 837 PrintF("\n");
834 PrintElements(out); 838 PrintElements(out);
835 } 839 }
836 840
837 841
842 void JSDataView::JSDataViewPrint(FILE* out) {
843 HeapObject::PrintHeader(out, "JSDataView");
844 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
845 PrintF(out, " - buffer =");
846 buffer()->ShortPrint(out);
847 PrintF(out, "\n - byte_offset = ");
848 byte_offset()->ShortPrint(out);
849 PrintF(out, "\n - byte_length = ");
850 byte_length()->ShortPrint(out);
851 PrintF("\n");
852 }
853
854
838 void JSFunction::JSFunctionPrint(FILE* out) { 855 void JSFunction::JSFunctionPrint(FILE* out) {
839 HeapObject::PrintHeader(out, "Function"); 856 HeapObject::PrintHeader(out, "Function");
840 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 857 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
841 PrintF(out, " - initial_map = "); 858 PrintF(out, " - initial_map = ");
842 if (has_initial_map()) { 859 if (has_initial_map()) {
843 initial_map()->ShortPrint(out); 860 initial_map()->ShortPrint(out);
844 } 861 }
845 PrintF(out, "\n - shared_info = "); 862 PrintF(out, "\n - shared_info = ");
846 shared()->ShortPrint(out); 863 shared()->ShortPrint(out);
847 PrintF(out, "\n - name = "); 864 PrintF(out, "\n - name = ");
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 } 1240 }
1224 } 1241 }
1225 PrintF(out, "\n"); 1242 PrintF(out, "\n");
1226 } 1243 }
1227 1244
1228 1245
1229 #endif // OBJECT_PRINT 1246 #endif // OBJECT_PRINT
1230 1247
1231 1248
1232 } } // namespace v8::internal 1249 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698