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

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

Issue 793763004: Fix error string to include information about class and library when the snapshot writer throws an … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/parser.cc ('k') | runtime/vm/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) 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 void set_exception_msg(const char* msg) { 589 void set_exception_msg(const char* msg) {
590 exception_msg_ = msg; 590 exception_msg_ = msg;
591 } 591 }
592 void ThrowException(Exceptions::ExceptionType type, const char* msg); 592 void ThrowException(Exceptions::ExceptionType type, const char* msg);
593 593
594 // Write a version string for the snapshot. 594 // Write a version string for the snapshot.
595 void WriteVersion(); 595 void WriteVersion();
596 596
597 protected: 597 protected:
598 void UnmarkAll() { 598 void UnmarkAll() {
599 forward_list_.UnmarkAll(); 599 if (!unmarked_objects_) {
600 forward_list_.UnmarkAll();
601 unmarked_objects_ = true;
602 }
600 } 603 }
601 604
602 bool CheckAndWritePredefinedObject(RawObject* raw); 605 bool CheckAndWritePredefinedObject(RawObject* raw);
603 void HandleVMIsolateObject(RawObject* raw); 606 void HandleVMIsolateObject(RawObject* raw);
604 607
605 void WriteObjectRef(RawObject* raw); 608 void WriteObjectRef(RawObject* raw);
606 void WriteClassId(RawClass* cls); 609 void WriteClassId(RawClass* cls);
607 void WriteObjectImpl(RawObject* raw); 610 void WriteObjectImpl(RawObject* raw);
608 void WriteInlinedObject(RawObject* raw); 611 void WriteInlinedObject(RawObject* raw);
609 void WriteForwardedObjects(); 612 void WriteForwardedObjects();
(...skipping 15 matching lines...) Expand all
625 ObjectStore* object_store() const { return object_store_; } 628 ObjectStore* object_store() const { return object_store_; }
626 629
627 private: 630 private:
628 Snapshot::Kind kind_; 631 Snapshot::Kind kind_;
629 Isolate* isolate_; 632 Isolate* isolate_;
630 ObjectStore* object_store_; // Object store for common classes. 633 ObjectStore* object_store_; // Object store for common classes.
631 ClassTable* class_table_; // Class table for the class index to class lookup. 634 ClassTable* class_table_; // Class table for the class index to class lookup.
632 ForwardList forward_list_; 635 ForwardList forward_list_;
633 Exceptions::ExceptionType exception_type_; // Exception type. 636 Exceptions::ExceptionType exception_type_; // Exception type.
634 const char* exception_msg_; // Message associated with exception. 637 const char* exception_msg_; // Message associated with exception.
638 bool unmarked_objects_; // True if marked objects have been unmarked.
635 639
636 friend class RawArray; 640 friend class RawArray;
637 friend class RawClass; 641 friend class RawClass;
638 friend class RawClosureData; 642 friend class RawClosureData;
639 friend class RawGrowableObjectArray; 643 friend class RawGrowableObjectArray;
640 friend class RawLinkedHashMap; 644 friend class RawLinkedHashMap;
641 friend class RawImmutableArray; 645 friend class RawImmutableArray;
642 friend class RawJSRegExp; 646 friend class RawJSRegExp;
643 friend class RawLibrary; 647 friend class RawLibrary;
644 friend class RawLiteralToken; 648 friend class RawLiteralToken;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 private: 731 private:
728 SnapshotWriter* writer_; 732 SnapshotWriter* writer_;
729 bool as_references_; 733 bool as_references_;
730 734
731 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 735 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
732 }; 736 };
733 737
734 } // namespace dart 738 } // namespace dart
735 739
736 #endif // VM_SNAPSHOT_H_ 740 #endif // VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698