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

Side by Side Diff: runtime/vm/clustered_snapshot.h

Issue 2860883002: Rename InstructionsReader to ImageReader for symmetry with ImageWriter. (Closed)
Patch Set: reload for missing reitveld diff Created 3 years, 7 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 | « no previous file | runtime/vm/clustered_snapshot.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 (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ 5 #ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
6 #define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ 6 #define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 TokenPosition ReadTokenPosition() { 329 TokenPosition ReadTokenPosition() {
330 return TokenPosition::SnapshotDecode(Read<int32_t>()); 330 return TokenPosition::SnapshotDecode(Read<int32_t>());
331 } 331 }
332 332
333 intptr_t ReadCid() { 333 intptr_t ReadCid() {
334 COMPILE_ASSERT(RawObject::kClassIdTagSize <= 32); 334 COMPILE_ASSERT(RawObject::kClassIdTagSize <= 32);
335 return Read<int32_t>(); 335 return Read<int32_t>();
336 } 336 }
337 337
338 RawInstructions* GetInstructionsAt(int32_t offset) { 338 RawInstructions* GetInstructionsAt(int32_t offset) {
339 return instructions_reader_->GetInstructionsAt(offset); 339 return image_reader_->GetInstructionsAt(offset);
340 } 340 }
341 341
342 RawObject* GetObjectAt(int32_t offset) { 342 RawObject* GetObjectAt(int32_t offset) {
343 return instructions_reader_->GetObjectAt(offset); 343 return image_reader_->GetObjectAt(offset);
344 } 344 }
345 345
346 RawApiError* VerifyVersionAndFeatures(Isolate* isolate); 346 RawApiError* VerifyVersionAndFeatures(Isolate* isolate);
347 347
348 void Prepare(); 348 void Prepare();
349 void Deserialize(); 349 void Deserialize();
350 350
351 DeserializationCluster* ReadCluster(); 351 DeserializationCluster* ReadCluster();
352 352
353 intptr_t next_index() const { return next_ref_index_; } 353 intptr_t next_index() const { return next_ref_index_; }
354 Heap* heap() const { return heap_; } 354 Heap* heap() const { return heap_; }
355 Snapshot::Kind kind() const { return kind_; } 355 Snapshot::Kind kind() const { return kind_; }
356 356
357 private: 357 private:
358 Heap* heap_; 358 Heap* heap_;
359 Zone* zone_; 359 Zone* zone_;
360 Snapshot::Kind kind_; 360 Snapshot::Kind kind_;
361 ReadStream stream_; 361 ReadStream stream_;
362 InstructionsReader* instructions_reader_; 362 ImageReader* image_reader_;
363 intptr_t num_base_objects_; 363 intptr_t num_base_objects_;
364 intptr_t num_objects_; 364 intptr_t num_objects_;
365 intptr_t num_clusters_; 365 intptr_t num_clusters_;
366 RawArray* refs_; 366 RawArray* refs_;
367 intptr_t next_ref_index_; 367 intptr_t next_ref_index_;
368 DeserializationCluster** clusters_; 368 DeserializationCluster** clusters_;
369 }; 369 };
370 370
371 371
372 class FullSnapshotWriter { 372 class FullSnapshotWriter {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 intptr_t size_; 445 intptr_t size_;
446 const uint8_t* instructions_buffer_; 446 const uint8_t* instructions_buffer_;
447 const uint8_t* data_buffer_; 447 const uint8_t* data_buffer_;
448 448
449 DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader); 449 DISALLOW_COPY_AND_ASSIGN(FullSnapshotReader);
450 }; 450 };
451 451
452 } // namespace dart 452 } // namespace dart
453 453
454 #endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ 454 #endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698