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

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

Issue 2728163002: VM: Make use_osr an Isolate flag, similar to how we made use_field_guards. (Closed)
Patch Set: Created 3 years, 9 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Note: these flags must match those passed to the VM during 71 // Note: these flags must match those passed to the VM during
72 // the app-jit training run (see //utils/kernel-service/BUILD.gn). 72 // the app-jit training run (see //utils/kernel-service/BUILD.gn).
73 Dart_IsolateFlags api_flags; 73 Dart_IsolateFlags api_flags;
74 api_flags.version = DART_FLAGS_CURRENT_VERSION; 74 Isolate::FlagsInitialize(&api_flags);
75 api_flags.enable_type_checks = false; 75 api_flags.enable_type_checks = false;
76 api_flags.enable_asserts = false; 76 api_flags.enable_asserts = false;
77 api_flags.enable_error_on_bad_type = false; 77 api_flags.enable_error_on_bad_type = false;
78 api_flags.enable_error_on_bad_override = false; 78 api_flags.enable_error_on_bad_override = false;
79 #if defined(DART_PRECOMPILER) 79 #if !defined(DART_PRECOMPILER)
80 api_flags.use_field_guards = false;
81 #else
82 api_flags.use_field_guards = true; 80 api_flags.use_field_guards = true;
81 api_flags.use_osr = true;
83 #endif 82 #endif
84 83
85 isolate = reinterpret_cast<Isolate*>(create_callback( 84 isolate = reinterpret_cast<Isolate*>(create_callback(
86 KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error)); 85 KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
87 if (isolate == NULL) { 86 if (isolate == NULL) {
88 OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n", 87 OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
89 error); 88 error);
90 KernelIsolate::SetKernelIsolate(NULL); 89 KernelIsolate::SetKernelIsolate(NULL);
91 KernelIsolate::FinishedInitializing(); 90 KernelIsolate::FinishedInitializing();
92 return; 91 return;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 443 }
445 444
446 KernelCompilationRequest request; 445 KernelCompilationRequest request;
447 return request.SendAndWaitForResponse(kernel_port, script_uri); 446 return request.SendAndWaitForResponse(kernel_port, script_uri);
448 } 447 }
449 448
450 449
451 #endif // DART_PRECOMPILED_RUNTIME 450 #endif // DART_PRECOMPILED_RUNTIME
452 451
453 } // namespace dart 452 } // namespace dart
OLDNEW
« runtime/vm/dart.cc ('K') | « runtime/vm/isolate.cc ('k') | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698