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

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

Issue 2715213008: VM: Allow configuring use_field_guards on the per-isolate basis and include it into snapshot featur… (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
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/kernel_to_il.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) 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 Isolate* isolate = NULL; 61 Isolate* isolate = NULL;
62 62
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;
rmacnak 2017/02/28 17:52:28 Add a note that the settings here need to match th
Vyacheslav Egorov (Google) 2017/02/28 21:13:52 Done.
72 Isolate::FlagsInitialize(&api_flags); 72 api_flags.version = DART_FLAGS_CURRENT_VERSION;
73 api_flags.enable_type_checks = false;
74 api_flags.enable_asserts = false;
75 api_flags.enable_error_on_bad_type = false;
76 api_flags.enable_error_on_bad_override = false;
77 api_flags.use_field_guards = true;
73 78
74 isolate = reinterpret_cast<Isolate*>(create_callback( 79 isolate = reinterpret_cast<Isolate*>(create_callback(
75 KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error)); 80 KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
76 if (isolate == NULL) { 81 if (isolate == NULL) {
77 OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n", 82 OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
78 error); 83 error);
79 KernelIsolate::SetKernelIsolate(NULL); 84 KernelIsolate::SetKernelIsolate(NULL);
80 KernelIsolate::FinishedInitializing(); 85 KernelIsolate::FinishedInitializing();
81 return; 86 return;
82 } 87 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 438 }
434 439
435 KernelCompilationRequest request; 440 KernelCompilationRequest request;
436 return request.SendAndWaitForResponse(kernel_port, script_uri); 441 return request.SendAndWaitForResponse(kernel_port, script_uri);
437 } 442 }
438 443
439 444
440 #endif // DART_PRECOMPILED_RUNTIME 445 #endif // DART_PRECOMPILED_RUNTIME
441 446
442 } // namespace dart 447 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698