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

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

Issue 2815533003: Refactor AOT deduplication steps so they can run before an app-jit snapshot as well. (Closed)
Patch Set: . Created 3 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/compiler.cc ('k') | runtime/vm/object.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 6793 matching lines...) Expand 10 before | Expand all | Expand 10 after
6804 if (isolate_snapshot_instructions_buffer == NULL) { 6804 if (isolate_snapshot_instructions_buffer == NULL) {
6805 RETURN_NULL_ERROR(instructions_snapshot_blob_size); 6805 RETURN_NULL_ERROR(instructions_snapshot_blob_size);
6806 } 6806 }
6807 // Finalize all classes if needed. 6807 // Finalize all classes if needed.
6808 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); 6808 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
6809 if (::Dart_IsError(state)) { 6809 if (::Dart_IsError(state)) {
6810 return state; 6810 return state;
6811 } 6811 }
6812 I->StopBackgroundCompiler(); 6812 I->StopBackgroundCompiler();
6813 6813
6814 ProgramVisitor::Dedup();
6814 Symbols::Compact(I); 6815 Symbols::Compact(I);
6815 6816
6816 NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(), 6817 NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(),
6817 "WriteAppJITSnapshot")); 6818 "WriteAppJITSnapshot"));
6818 BlobImageWriter isolate_image_writer(isolate_snapshot_instructions_buffer, 6819 BlobImageWriter isolate_image_writer(isolate_snapshot_instructions_buffer,
6819 ApiReallocate, 6820 ApiReallocate,
6820 2 * MB /* initial_size */); 6821 2 * MB /* initial_size */);
6821 FullSnapshotWriter writer(Snapshot::kAppJIT, NULL, 6822 FullSnapshotWriter writer(Snapshot::kAppJIT, NULL,
6822 isolate_snapshot_data_buffer, ApiReallocate, NULL, 6823 isolate_snapshot_data_buffer, ApiReallocate, NULL,
6823 &isolate_image_writer); 6824 &isolate_image_writer);
(...skipping 17 matching lines...) Expand all
6841 } 6842 }
6842 6843
6843 6844
6844 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6845 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6845 #ifndef PRODUCT 6846 #ifndef PRODUCT
6846 Profiler::DumpStackTrace(context); 6847 Profiler::DumpStackTrace(context);
6847 #endif 6848 #endif
6848 } 6849 }
6849 6850
6850 } // namespace dart 6851 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698