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

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

Issue 1337083004: - Turn on writing of ic_data_array so that we have that information for script snapshots that would… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 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
« no previous file with comments | « runtime/vm/raw_object_snapshot.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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return backward_references_; 435 return backward_references_;
436 } 436 }
437 void ResetBackwardReferenceTable() { backward_references_ = NULL; } 437 void ResetBackwardReferenceTable() { backward_references_ = NULL; }
438 PageSpace* old_space() const { return old_space_; } 438 PageSpace* old_space() const { return old_space_; }
439 439
440 private: 440 private:
441 // Allocate uninitialized objects, this is used when reading a full snapshot. 441 // Allocate uninitialized objects, this is used when reading a full snapshot.
442 RawObject* AllocateUninitialized(intptr_t class_id, intptr_t size); 442 RawObject* AllocateUninitialized(intptr_t class_id, intptr_t size);
443 443
444 RawClass* ReadClassId(intptr_t object_id); 444 RawClass* ReadClassId(intptr_t object_id);
445 RawFunction* ReadFunctionId(intptr_t object_id);
445 RawObject* ReadStaticImplicitClosure(intptr_t object_id, intptr_t cls_header); 446 RawObject* ReadStaticImplicitClosure(intptr_t object_id, intptr_t cls_header);
446 447
447 // Implementation to read an object. 448 // Implementation to read an object.
448 RawObject* ReadObjectImpl(bool as_reference, 449 RawObject* ReadObjectImpl(bool as_reference,
449 intptr_t patch_object_id = kInvalidPatchIndex, 450 intptr_t patch_object_id = kInvalidPatchIndex,
450 intptr_t patch_offset = 0); 451 intptr_t patch_offset = 0);
451 RawObject* ReadObjectImpl(intptr_t header, 452 RawObject* ReadObjectImpl(intptr_t header,
452 bool as_reference, 453 bool as_reference,
453 intptr_t patch_object_id, 454 intptr_t patch_object_id,
454 intptr_t patch_offset); 455 intptr_t patch_offset);
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 static intptr_t FirstObjectId(); 870 static intptr_t FirstObjectId();
870 871
871 int32_t GetInstructionsId(RawInstructions* instructions) { 872 int32_t GetInstructionsId(RawInstructions* instructions) {
872 return instructions_writer_->GetOffsetFor(instructions); 873 return instructions_writer_->GetOffsetFor(instructions);
873 } 874 }
874 875
875 void SetInstructionsCode(RawInstructions* instructions, RawCode* code) { 876 void SetInstructionsCode(RawInstructions* instructions, RawCode* code) {
876 return instructions_writer_->SetInstructionsCode(instructions, code); 877 return instructions_writer_->SetInstructionsCode(instructions, code);
877 } 878 }
878 879
880 void WriteFunctionId(RawFunction* func, bool owner_is_class);
881
879 protected: 882 protected:
880 void UnmarkAll() { 883 void UnmarkAll() {
881 if (!unmarked_objects_ && forward_list_ != NULL) { 884 if (!unmarked_objects_ && forward_list_ != NULL) {
882 forward_list_->UnmarkAll(); 885 forward_list_->UnmarkAll();
883 unmarked_objects_ = true; 886 unmarked_objects_ = true;
884 } 887 }
885 } 888 }
886 889
887 bool CheckAndWritePredefinedObject(RawObject* raw); 890 bool CheckAndWritePredefinedObject(RawObject* raw);
888 bool HandleVMIsolateObject(RawObject* raw); 891 bool HandleVMIsolateObject(RawObject* raw);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 private: 1091 private:
1089 SnapshotWriter* writer_; 1092 SnapshotWriter* writer_;
1090 bool as_references_; 1093 bool as_references_;
1091 1094
1092 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 1095 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
1093 }; 1096 };
1094 1097
1095 } // namespace dart 1098 } // namespace dart
1096 1099
1097 #endif // VM_SNAPSHOT_H_ 1100 #endif // VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698