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

Side by Side Diff: src/serialize.cc

Issue 24258006: don't use default isolate in mksnapshot (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/mksnapshot.cc ('k') | no next file » | 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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 1277
1278 1278
1279 Serializer::Serializer(Isolate* isolate, SnapshotByteSink* sink) 1279 Serializer::Serializer(Isolate* isolate, SnapshotByteSink* sink)
1280 : isolate_(isolate), 1280 : isolate_(isolate),
1281 sink_(sink), 1281 sink_(sink),
1282 current_root_index_(0), 1282 current_root_index_(0),
1283 external_reference_encoder_(new ExternalReferenceEncoder(isolate)), 1283 external_reference_encoder_(new ExternalReferenceEncoder(isolate)),
1284 root_index_wave_front_(0) { 1284 root_index_wave_front_(0) {
1285 // The serializer is meant to be used only to generate initial heap images 1285 // The serializer is meant to be used only to generate initial heap images
1286 // from a context in which there is only one isolate. 1286 // from a context in which there is only one isolate.
1287 ASSERT(isolate_->IsDefaultIsolate());
1288 for (int i = 0; i <= LAST_SPACE; i++) { 1287 for (int i = 0; i <= LAST_SPACE; i++) {
1289 fullness_[i] = 0; 1288 fullness_[i] = 0;
1290 } 1289 }
1291 } 1290 }
1292 1291
1293 1292
1294 Serializer::~Serializer() { 1293 Serializer::~Serializer() {
1295 delete external_reference_encoder_; 1294 delete external_reference_encoder_;
1296 } 1295 }
1297 1296
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 1855
1857 bool SnapshotByteSource::AtEOF() { 1856 bool SnapshotByteSource::AtEOF() {
1858 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1857 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1859 for (int x = position_; x < length_; x++) { 1858 for (int x = position_; x < length_; x++) {
1860 if (data_[x] != SerializerDeserializer::nop()) return false; 1859 if (data_[x] != SerializerDeserializer::nop()) return false;
1861 } 1860 }
1862 return true; 1861 return true;
1863 } 1862 }
1864 1863
1865 } } // namespace v8::internal 1864 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mksnapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698