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

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

Issue 18242003: Add a VM defined class MirrorReference as an opaque pointer for Dart code to VM internal objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/symbols.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 VM_SNAPSHOT_H_ 5 #ifndef VM_SNAPSHOT_H_
6 #define VM_SNAPSHOT_H_ 6 #define VM_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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 friend class LiteralToken; 352 friend class LiteralToken;
353 friend class PatchClass; 353 friend class PatchClass;
354 friend class Script; 354 friend class Script;
355 friend class Stacktrace; 355 friend class Stacktrace;
356 friend class TokenStream; 356 friend class TokenStream;
357 friend class Type; 357 friend class Type;
358 friend class TypeArguments; 358 friend class TypeArguments;
359 friend class TypeParameter; 359 friend class TypeParameter;
360 friend class UnresolvedClass; 360 friend class UnresolvedClass;
361 friend class WeakProperty; 361 friend class WeakProperty;
362 friend class MirrorReference;
362 DISALLOW_COPY_AND_ASSIGN(SnapshotReader); 363 DISALLOW_COPY_AND_ASSIGN(SnapshotReader);
363 }; 364 };
364 365
365 366
366 class BaseWriter { 367 class BaseWriter {
367 public: 368 public:
368 // Size of the snapshot. 369 // Size of the snapshot.
369 intptr_t BytesWritten() const { return stream_.bytes_written(); } 370 intptr_t BytesWritten() const { return stream_.bytes_written(); }
370 371
371 // Writes raw data to the stream (basic type). 372 // Writes raw data to the stream (basic type).
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 friend class RawClosureData; 527 friend class RawClosureData;
527 friend class RawGrowableObjectArray; 528 friend class RawGrowableObjectArray;
528 friend class RawImmutableArray; 529 friend class RawImmutableArray;
529 friend class RawJSRegExp; 530 friend class RawJSRegExp;
530 friend class RawLibrary; 531 friend class RawLibrary;
531 friend class RawLiteralToken; 532 friend class RawLiteralToken;
532 friend class RawScript; 533 friend class RawScript;
533 friend class RawStacktrace; 534 friend class RawStacktrace;
534 friend class RawTokenStream; 535 friend class RawTokenStream;
535 friend class RawTypeArguments; 536 friend class RawTypeArguments;
537 friend class RawMirrorReference;
536 friend class SnapshotWriterVisitor; 538 friend class SnapshotWriterVisitor;
537 DISALLOW_COPY_AND_ASSIGN(SnapshotWriter); 539 DISALLOW_COPY_AND_ASSIGN(SnapshotWriter);
538 }; 540 };
539 541
540 542
541 class FullSnapshotWriter : public SnapshotWriter { 543 class FullSnapshotWriter : public SnapshotWriter {
542 public: 544 public:
543 static const intptr_t kInitialSize = 64 * KB; 545 static const intptr_t kInitialSize = 64 * KB;
544 FullSnapshotWriter(uint8_t** buffer, ReAlloc alloc) 546 FullSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
545 : SnapshotWriter(Snapshot::kFull, buffer, alloc, kInitialSize) { 547 : SnapshotWriter(Snapshot::kFull, buffer, alloc, kInitialSize) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 private: 612 private:
611 SnapshotWriter* writer_; 613 SnapshotWriter* writer_;
612 bool as_references_; 614 bool as_references_;
613 615
614 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 616 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
615 }; 617 };
616 618
617 } // namespace dart 619 } // namespace dart
618 620
619 #endif // VM_SNAPSHOT_H_ 621 #endif // VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698