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

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

Issue 1852393004: Fix background compilation issues when creating snapshots. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: more Created 4 years, 8 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/report.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 (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 #include "vm/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 if (instructions_snapshot_buffer != NULL) { 1929 if (instructions_snapshot_buffer != NULL) {
1930 instructions_writer_ = new InstructionsWriter(instructions_snapshot_buffer, 1930 instructions_writer_ = new InstructionsWriter(instructions_snapshot_buffer,
1931 alloc, 1931 alloc,
1932 kInitialSize); 1932 kInitialSize);
1933 } 1933 }
1934 } 1934 }
1935 1935
1936 1936
1937 FullSnapshotWriter::~FullSnapshotWriter() { 1937 FullSnapshotWriter::~FullSnapshotWriter() {
1938 delete forward_list_; 1938 delete forward_list_;
1939 // We may run Dart code afterwards, restore the symbol table.
1940 isolate()->object_store()->set_symbol_table(symbol_table_);
1939 symbol_table_ = Array::null(); 1941 symbol_table_ = Array::null();
1940 scripts_ = Array::null(); 1942 scripts_ = Array::null();
1941 } 1943 }
1942 1944
1943 1945
1944 void FullSnapshotWriter::WriteVmIsolateSnapshot() { 1946 void FullSnapshotWriter::WriteVmIsolateSnapshot() {
1945 ASSERT(vm_isolate_snapshot_buffer_ != NULL); 1947 ASSERT(vm_isolate_snapshot_buffer_ != NULL);
1946 SnapshotWriter writer(Snapshot::kFull, 1948 SnapshotWriter writer(Snapshot::kFull,
1947 thread(), 1949 thread(),
1948 vm_isolate_snapshot_buffer_, 1950 vm_isolate_snapshot_buffer_,
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 if (setjmp(*jump.Set()) == 0) { 2662 if (setjmp(*jump.Set()) == 0) {
2661 NoSafepointScope no_safepoint; 2663 NoSafepointScope no_safepoint;
2662 WriteObject(obj.raw()); 2664 WriteObject(obj.raw());
2663 } else { 2665 } else {
2664 ThrowException(exception_type(), exception_msg()); 2666 ThrowException(exception_type(), exception_msg());
2665 } 2667 }
2666 } 2668 }
2667 2669
2668 2670
2669 } // namespace dart 2671 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/report.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698