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

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 380153002: Revert "Support ES6 Map and Set in heap profiler" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/heap-snapshot-generator.h ('k') | src/objects.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap-snapshot-generator-inl.h" 7 #include "src/heap-snapshot-generator-inl.h"
8 8
9 #include "src/allocation-tracker.h" 9 #include "src/allocation-tracker.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 }; 1090 };
1091 1091
1092 1092
1093 bool V8HeapExplorer::ExtractReferencesPass1(int entry, HeapObject* obj) { 1093 bool V8HeapExplorer::ExtractReferencesPass1(int entry, HeapObject* obj) {
1094 if (obj->IsFixedArray()) return false; // FixedArrays are processed on pass 2 1094 if (obj->IsFixedArray()) return false; // FixedArrays are processed on pass 2
1095 1095
1096 if (obj->IsJSGlobalProxy()) { 1096 if (obj->IsJSGlobalProxy()) {
1097 ExtractJSGlobalProxyReferences(entry, JSGlobalProxy::cast(obj)); 1097 ExtractJSGlobalProxyReferences(entry, JSGlobalProxy::cast(obj));
1098 } else if (obj->IsJSArrayBuffer()) { 1098 } else if (obj->IsJSArrayBuffer()) {
1099 ExtractJSArrayBufferReferences(entry, JSArrayBuffer::cast(obj)); 1099 ExtractJSArrayBufferReferences(entry, JSArrayBuffer::cast(obj));
1100 } else if (obj->IsJSWeakSet()) {
1101 ExtractJSWeakCollectionReferences(entry, JSWeakSet::cast(obj));
1102 } else if (obj->IsJSWeakMap()) {
1103 ExtractJSWeakCollectionReferences(entry, JSWeakMap::cast(obj));
1100 } else if (obj->IsJSObject()) { 1104 } else if (obj->IsJSObject()) {
1101 if (obj->IsJSWeakSet()) {
1102 ExtractJSWeakCollectionReferences(entry, JSWeakSet::cast(obj));
1103 } else if (obj->IsJSWeakMap()) {
1104 ExtractJSWeakCollectionReferences(entry, JSWeakMap::cast(obj));
1105 } else if (obj->IsJSSet()) {
1106 ExtractJSCollectionReferences(entry, JSSet::cast(obj));
1107 } else if (obj->IsJSMap()) {
1108 ExtractJSCollectionReferences(entry, JSMap::cast(obj));
1109 }
1110 ExtractJSObjectReferences(entry, JSObject::cast(obj)); 1105 ExtractJSObjectReferences(entry, JSObject::cast(obj));
1111 } else if (obj->IsString()) { 1106 } else if (obj->IsString()) {
1112 ExtractStringReferences(entry, String::cast(obj)); 1107 ExtractStringReferences(entry, String::cast(obj));
1113 } else if (obj->IsSymbol()) { 1108 } else if (obj->IsSymbol()) {
1114 ExtractSymbolReferences(entry, Symbol::cast(obj)); 1109 ExtractSymbolReferences(entry, Symbol::cast(obj));
1115 } else if (obj->IsMap()) { 1110 } else if (obj->IsMap()) {
1116 ExtractMapReferences(entry, Map::cast(obj)); 1111 ExtractMapReferences(entry, Map::cast(obj));
1117 } else if (obj->IsSharedFunctionInfo()) { 1112 } else if (obj->IsSharedFunctionInfo()) {
1118 ExtractSharedFunctionInfoReferences(entry, SharedFunctionInfo::cast(obj)); 1113 ExtractSharedFunctionInfoReferences(entry, SharedFunctionInfo::cast(obj));
1119 } else if (obj->IsScript()) { 1114 } else if (obj->IsScript()) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 } 1253 }
1259 1254
1260 1255
1261 void V8HeapExplorer::ExtractSymbolReferences(int entry, Symbol* symbol) { 1256 void V8HeapExplorer::ExtractSymbolReferences(int entry, Symbol* symbol) {
1262 SetInternalReference(symbol, entry, 1257 SetInternalReference(symbol, entry,
1263 "name", symbol->name(), 1258 "name", symbol->name(),
1264 Symbol::kNameOffset); 1259 Symbol::kNameOffset);
1265 } 1260 }
1266 1261
1267 1262
1268 void V8HeapExplorer::ExtractJSCollectionReferences(int entry,
1269 JSCollection* collection) {
1270 SetInternalReference(collection, entry, "table", collection->table(),
1271 JSCollection::kTableOffset);
1272 }
1273
1274
1275 void V8HeapExplorer::ExtractJSWeakCollectionReferences( 1263 void V8HeapExplorer::ExtractJSWeakCollectionReferences(
1276 int entry, JSWeakCollection* collection) { 1264 int entry, JSWeakCollection* collection) {
1277 MarkAsWeakContainer(collection->table()); 1265 MarkAsWeakContainer(collection->table());
1278 SetInternalReference(collection, entry, 1266 SetInternalReference(collection, entry,
1279 "table", collection->table(), 1267 "table", collection->table(),
1280 JSWeakCollection::kTableOffset); 1268 JSWeakCollection::kTableOffset);
1281 } 1269 }
1282 1270
1283 1271
1284 void V8HeapExplorer::ExtractContextReferences(int entry, Context* context) { 1272 void V8HeapExplorer::ExtractContextReferences(int entry, Context* context) {
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 writer_->AddString("\"<dummy>\""); 3172 writer_->AddString("\"<dummy>\"");
3185 for (int i = 1; i < sorted_strings.length(); ++i) { 3173 for (int i = 1; i < sorted_strings.length(); ++i) {
3186 writer_->AddCharacter(','); 3174 writer_->AddCharacter(',');
3187 SerializeString(sorted_strings[i]); 3175 SerializeString(sorted_strings[i]);
3188 if (writer_->aborted()) return; 3176 if (writer_->aborted()) return;
3189 } 3177 }
3190 } 3178 }
3191 3179
3192 3180
3193 } } // namespace v8::internal 3181 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698