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

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

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 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
« no previous file with comments | « src/objects-inl.h ('k') | src/profiler/heap-snapshot-generator.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 // 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 break; 200 break;
201 case JS_MAP_ITERATOR_TYPE: 201 case JS_MAP_ITERATOR_TYPE:
202 JSMapIterator::cast(this)->JSMapIteratorPrint(os); 202 JSMapIterator::cast(this)->JSMapIteratorPrint(os);
203 break; 203 break;
204 case JS_WEAK_MAP_TYPE: 204 case JS_WEAK_MAP_TYPE:
205 JSWeakMap::cast(this)->JSWeakMapPrint(os); 205 JSWeakMap::cast(this)->JSWeakMapPrint(os);
206 break; 206 break;
207 case JS_WEAK_SET_TYPE: 207 case JS_WEAK_SET_TYPE:
208 JSWeakSet::cast(this)->JSWeakSetPrint(os); 208 JSWeakSet::cast(this)->JSWeakSetPrint(os);
209 break; 209 break;
210 case JS_WEAK_REF_TYPE:
211 JSWeakRef::cast(this)->JSWeakRefPrint(os);
212 break;
210 case JS_MODULE_NAMESPACE_TYPE: 213 case JS_MODULE_NAMESPACE_TYPE:
211 JSModuleNamespace::cast(this)->JSModuleNamespacePrint(os); 214 JSModuleNamespace::cast(this)->JSModuleNamespacePrint(os);
212 break; 215 break;
213 case FOREIGN_TYPE: 216 case FOREIGN_TYPE:
214 Foreign::cast(this)->ForeignPrint(os); 217 Foreign::cast(this)->ForeignPrint(os);
215 break; 218 break;
216 case SHARED_FUNCTION_INFO_TYPE: 219 case SHARED_FUNCTION_INFO_TYPE:
217 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(os); 220 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(os);
218 break; 221 break;
219 case JS_MESSAGE_OBJECT_TYPE: 222 case JS_MESSAGE_OBJECT_TYPE:
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 } 943 }
941 944
942 945
943 void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT 946 void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT
944 JSObjectPrintHeader(os, this, "JSWeakSet"); 947 JSObjectPrintHeader(os, this, "JSWeakSet");
945 os << "\n - table = " << Brief(table()); 948 os << "\n - table = " << Brief(table());
946 JSObjectPrintBody(os, this); 949 JSObjectPrintBody(os, this);
947 } 950 }
948 951
949 952
953 void JSWeakRef::JSWeakRefPrint(std::ostream& os) { // NOLINT
954 JSObjectPrintHeader(os, this, "JSWeakRef");
955 os << "\n - table = " << Brief(table());
956 JSObjectPrintBody(os, this);
957 }
958
959
950 void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT 960 void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT
951 JSObjectPrintHeader(os, this, "JSArrayBuffer"); 961 JSObjectPrintHeader(os, this, "JSArrayBuffer");
952 os << "\n - backing_store = " << backing_store(); 962 os << "\n - backing_store = " << backing_store();
953 os << "\n - byte_length = " << Brief(byte_length()); 963 os << "\n - byte_length = " << Brief(byte_length());
954 if (was_neutered()) os << "\n - neutered"; 964 if (was_neutered()) os << "\n - neutered";
955 JSObjectPrintBody(os, this, !was_neutered()); 965 JSObjectPrintBody(os, this, !was_neutered());
956 } 966 }
957 967
958 968
959 void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT 969 void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 printf("Not a transition array\n"); 1742 printf("Not a transition array\n");
1733 } else { 1743 } else {
1734 reinterpret_cast<i::TransitionArray*>(object)->Print(); 1744 reinterpret_cast<i::TransitionArray*>(object)->Print();
1735 } 1745 }
1736 } 1746 }
1737 1747
1738 extern void _v8_internal_Print_StackTrace() { 1748 extern void _v8_internal_Print_StackTrace() {
1739 i::Isolate* isolate = i::Isolate::Current(); 1749 i::Isolate* isolate = i::Isolate::Current();
1740 isolate->PrintStack(stdout); 1750 isolate->PrintStack(stdout);
1741 } 1751 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/profiler/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698