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

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

Issue 2669543003: Use the app snapshot when testing with -cdartk. (Closed)
Patch Set: . Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/kernel_isolate.h" 5 #include "vm/kernel_isolate.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Dart_IsolateCreateCallback create_callback = 63 Dart_IsolateCreateCallback create_callback =
64 KernelIsolate::create_callback(); 64 KernelIsolate::create_callback();
65 65
66 if (create_callback == NULL) { 66 if (create_callback == NULL) {
67 KernelIsolate::FinishedInitializing(); 67 KernelIsolate::FinishedInitializing();
68 return; 68 return;
69 } 69 }
70 70
71 Dart_IsolateFlags api_flags; 71 Dart_IsolateFlags api_flags;
72 Isolate::FlagsInitialize(&api_flags); 72 Isolate::FlagsInitialize(&api_flags);
73 // Do not inherit the values from the main isolate. The DFE app snapshot
74 // is created in production mode, so it must run in production mode.
75 api_flags.enable_type_checks = false;
76 api_flags.enable_asserts = false;
73 77
74 isolate = reinterpret_cast<Isolate*>(create_callback( 78 isolate = reinterpret_cast<Isolate*>(create_callback(
75 KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error)); 79 KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
76 if (isolate == NULL) { 80 if (isolate == NULL) {
77 OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n", 81 OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
78 error); 82 error);
79 KernelIsolate::SetKernelIsolate(NULL); 83 KernelIsolate::SetKernelIsolate(NULL);
80 KernelIsolate::FinishedInitializing(); 84 KernelIsolate::FinishedInitializing();
81 return; 85 return;
82 } 86 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 437 }
434 438
435 KernelCompilationRequest request; 439 KernelCompilationRequest request;
436 return request.SendAndWaitForResponse(kernel_port, script_uri); 440 return request.SendAndWaitForResponse(kernel_port, script_uri);
437 } 441 }
438 442
439 443
440 #endif // DART_PRECOMPILED_RUNTIME 444 #endif // DART_PRECOMPILED_RUNTIME
441 445
442 } // namespace dart 446 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698