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

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

Issue 106863002: Fix compilation with clang (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/date.cc ('k') | src/ia32/full-codegen-ia32.cc » ('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 // 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 static const int kExpectedHeapEntrySize = 24; 195 static const int kExpectedHeapEntrySize = 24;
196 }; 196 };
197 197
198 template <> struct SnapshotSizeConstants<8> { 198 template <> struct SnapshotSizeConstants<8> {
199 static const int kExpectedHeapGraphEdgeSize = 24; 199 static const int kExpectedHeapGraphEdgeSize = 24;
200 static const int kExpectedHeapEntrySize = 32; 200 static const int kExpectedHeapEntrySize = 32;
201 }; 201 };
202 202
203 } // namespace 203 } // namespace
204 204
205
205 HeapSnapshot::HeapSnapshot(HeapProfiler* profiler, 206 HeapSnapshot::HeapSnapshot(HeapProfiler* profiler,
206 const char* title, 207 const char* title,
207 unsigned uid) 208 unsigned uid)
208 : profiler_(profiler), 209 : profiler_(profiler),
209 title_(title), 210 title_(title),
210 uid_(uid), 211 uid_(uid),
211 root_index_(HeapEntry::kNoEntry), 212 root_index_(HeapEntry::kNoEntry),
212 gc_roots_index_(HeapEntry::kNoEntry), 213 gc_roots_index_(HeapEntry::kNoEntry),
213 natives_root_index_(HeapEntry::kNoEntry), 214 natives_root_index_(HeapEntry::kNoEntry),
214 max_snapshot_js_object_id_(0) { 215 max_snapshot_js_object_id_(0) {
215 STATIC_CHECK( 216 STATIC_CHECK(
216 sizeof(HeapGraphEdge) == 217 sizeof(HeapGraphEdge) ==
217 SnapshotSizeConstants<kPointerSize>::kExpectedHeapGraphEdgeSize); 218 SnapshotSizeConstants<kPointerSize>::kExpectedHeapGraphEdgeSize);
218 STATIC_CHECK( 219 STATIC_CHECK(
219 sizeof(HeapEntry) == 220 sizeof(HeapEntry) ==
220 SnapshotSizeConstants<kPointerSize>::kExpectedHeapEntrySize); 221 SnapshotSizeConstants<kPointerSize>::kExpectedHeapEntrySize);
222 USE(SnapshotSizeConstants<4>::kExpectedHeapGraphEdgeSize);
223 USE(SnapshotSizeConstants<4>::kExpectedHeapEntrySize);
224 USE(SnapshotSizeConstants<8>::kExpectedHeapGraphEdgeSize);
225 USE(SnapshotSizeConstants<8>::kExpectedHeapEntrySize);
221 for (int i = 0; i < VisitorSynchronization::kNumberOfSyncTags; ++i) { 226 for (int i = 0; i < VisitorSynchronization::kNumberOfSyncTags; ++i) {
222 gc_subroot_indexes_[i] = HeapEntry::kNoEntry; 227 gc_subroot_indexes_[i] = HeapEntry::kNoEntry;
223 } 228 }
224 } 229 }
225 230
226 231
227 void HeapSnapshot::Delete() { 232 void HeapSnapshot::Delete() {
228 profiler_->RemoveSnapshot(this); 233 profiler_->RemoveSnapshot(this);
229 delete this; 234 delete this;
230 } 235 }
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 writer_->AddString("\"<dummy>\""); 2959 writer_->AddString("\"<dummy>\"");
2955 for (int i = 1; i < sorted_strings.length(); ++i) { 2960 for (int i = 1; i < sorted_strings.length(); ++i) {
2956 writer_->AddCharacter(','); 2961 writer_->AddCharacter(',');
2957 SerializeString(sorted_strings[i]); 2962 SerializeString(sorted_strings[i]);
2958 if (writer_->aborted()) return; 2963 if (writer_->aborted()) return;
2959 } 2964 }
2960 } 2965 }
2961 2966
2962 2967
2963 } } // namespace v8::internal 2968 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/date.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698