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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index a57088b9301cbfdf0a9d970d285bf46fe39a4326..998bdb6c900c1f9db5e22cebe98ff71c21c55b92 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -194,6 +194,9 @@ void HeapObject::HeapObjectPrint(FILE* out) {
case JS_TYPED_ARRAY_TYPE:
JSTypedArray::cast(this)->JSTypedArrayPrint(out);
break;
+ case JS_DATA_VIEW_TYPE:
+ JSDataView::cast(this)->JSDataViewPrint(out);
+ break;
#define MAKE_STRUCT_CASE(NAME, Name, name) \
case NAME##_TYPE: \
Name::cast(this)->Name##Print(out); \
@@ -551,8 +554,9 @@ static const char* TypeToString(InstanceType type) {
case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT";
case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT";
case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY";
- case JS_TYPED_ARRAY_TYPE: return "JS_TYPED_ARRAY";
case JS_ARRAY_BUFFER_TYPE: return "JS_ARRAY_BUFFER";
+ case JS_TYPED_ARRAY_TYPE: return "JS_TYPED_ARRAY";
+ case JS_DATA_VIEW_TYPE: return "JS_DATA_VIEW";
case FOREIGN_TYPE: return "FOREIGN";
case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE";
#define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME;
@@ -821,7 +825,7 @@ void JSArrayBuffer::JSArrayBufferPrint(FILE* out) {
void JSTypedArray::JSTypedArrayPrint(FILE* out) {
HeapObject::PrintHeader(out, "JSTypedArray");
- PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
+ PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
PrintF(out, " - buffer =");
buffer()->ShortPrint(out);
PrintF(out, "\n - byte_offset = ");
@@ -835,6 +839,19 @@ void JSTypedArray::JSTypedArrayPrint(FILE* out) {
}
+void JSDataView::JSDataViewPrint(FILE* out) {
+ HeapObject::PrintHeader(out, "JSDataView");
+ PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
+ PrintF(out, " - buffer =");
+ buffer()->ShortPrint(out);
+ PrintF(out, "\n - byte_offset = ");
+ byte_offset()->ShortPrint(out);
+ PrintF(out, "\n - byte_length = ");
+ byte_length()->ShortPrint(out);
+ PrintF("\n");
+}
+
+
void JSFunction::JSFunctionPrint(FILE* out) {
HeapObject::PrintHeader(out, "Function");
PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
« 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