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

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

Issue 1155183003: Load deferred classes eagerly when generating script snapshots (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Redo disappearing CL 1155183003 (Load deferred classes eagerly when generating script snapshots) Created 5 years, 6 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/bin/main.cc ('k') | runtime/vm/snapshot_test.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) 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 "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 25 matching lines...) Expand all
36 #include "vm/stack_frame.h" 36 #include "vm/stack_frame.h"
37 #include "vm/symbols.h" 37 #include "vm/symbols.h"
38 #include "vm/tags.h" 38 #include "vm/tags.h"
39 #include "vm/timer.h" 39 #include "vm/timer.h"
40 #include "vm/unicode.h" 40 #include "vm/unicode.h"
41 #include "vm/verifier.h" 41 #include "vm/verifier.h"
42 #include "vm/version.h" 42 #include "vm/version.h"
43 43
44 namespace dart { 44 namespace dart {
45 45
46 DECLARE_FLAG(bool, load_deferred_eagerly);
46 DECLARE_FLAG(bool, print_class_table); 47 DECLARE_FLAG(bool, print_class_table);
47 DECLARE_FLAG(bool, verify_handles); 48 DECLARE_FLAG(bool, verify_handles);
48 #if defined(DART_NO_SNAPSHOT) 49 #if defined(DART_NO_SNAPSHOT)
49 DEFINE_FLAG(bool, check_function_fingerprints, false, 50 DEFINE_FLAG(bool, check_function_fingerprints, false,
50 "Check function fingerprints"); 51 "Check function fingerprints");
51 #endif // defined(DART_NO_SNAPSHOT). 52 #endif // defined(DART_NO_SNAPSHOT).
52 DEFINE_FLAG(bool, trace_api, false, 53 DEFINE_FLAG(bool, trace_api, false,
53 "Trace invocation of API calls (debug mode only)"); 54 "Trace invocation of API calls (debug mode only)");
54 DEFINE_FLAG(bool, verify_acquired_data, false, 55 DEFINE_FLAG(bool, verify_acquired_data, false,
55 "Verify correct API acquire/release of typed data."); 56 "Verify correct API acquire/release of typed data.");
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 return Api::TopScope(Isolate::Current())->zone()->Realloc<uint8_t>( 1423 return Api::TopScope(Isolate::Current())->zone()->Realloc<uint8_t>(
1423 ptr, old_size, new_size); 1424 ptr, old_size, new_size);
1424 } 1425 }
1425 1426
1426 1427
1427 DART_EXPORT Dart_Handle Dart_CreateSnapshot( 1428 DART_EXPORT Dart_Handle Dart_CreateSnapshot(
1428 uint8_t** vm_isolate_snapshot_buffer, 1429 uint8_t** vm_isolate_snapshot_buffer,
1429 intptr_t* vm_isolate_snapshot_size, 1430 intptr_t* vm_isolate_snapshot_size,
1430 uint8_t** isolate_snapshot_buffer, 1431 uint8_t** isolate_snapshot_buffer,
1431 intptr_t* isolate_snapshot_size) { 1432 intptr_t* isolate_snapshot_size) {
1433 ASSERT(FLAG_load_deferred_eagerly);
1432 Isolate* isolate = Isolate::Current(); 1434 Isolate* isolate = Isolate::Current();
1433 DARTSCOPE(isolate); 1435 DARTSCOPE(isolate);
1434 TIMERSCOPE(isolate, time_creating_snapshot); 1436 TIMERSCOPE(isolate, time_creating_snapshot);
1435 if (vm_isolate_snapshot_buffer != NULL && 1437 if (vm_isolate_snapshot_buffer != NULL &&
1436 vm_isolate_snapshot_size == NULL) { 1438 vm_isolate_snapshot_size == NULL) {
1437 RETURN_NULL_ERROR(vm_isolate_snapshot_size); 1439 RETURN_NULL_ERROR(vm_isolate_snapshot_size);
1438 } 1440 }
1439 if (isolate_snapshot_buffer == NULL) { 1441 if (isolate_snapshot_buffer == NULL) {
1440 RETURN_NULL_ERROR(isolate_snapshot_buffer); 1442 RETURN_NULL_ERROR(isolate_snapshot_buffer);
1441 } 1443 }
(...skipping 4137 matching lines...) Expand 10 before | Expand all | Expand 10 after
5579 5581
5580 5582
5581 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5583 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5582 const char* name, 5584 const char* name,
5583 Dart_ServiceRequestCallback callback, 5585 Dart_ServiceRequestCallback callback,
5584 void* user_data) { 5586 void* user_data) {
5585 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5587 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5586 } 5588 }
5587 5589
5588 } // namespace dart 5590 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698