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

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

Issue 1737693003: - Remove Isolate::Flags structure and store flags directly in isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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) 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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 const uint8_t* snapshot, 1233 const uint8_t* snapshot,
1234 Dart_IsolateFlags* flags, 1234 Dart_IsolateFlags* flags,
1235 void* callback_data, 1235 void* callback_data,
1236 char** error) { 1236 char** error) {
1237 CHECK_NO_ISOLATE(Isolate::Current()); 1237 CHECK_NO_ISOLATE(Isolate::Current());
1238 char* isolate_name = BuildIsolateName(script_uri, main); 1238 char* isolate_name = BuildIsolateName(script_uri, main);
1239 1239
1240 // Setup default flags in case none were passed. 1240 // Setup default flags in case none were passed.
1241 Dart_IsolateFlags api_flags; 1241 Dart_IsolateFlags api_flags;
1242 if (flags == NULL) { 1242 if (flags == NULL) {
1243 Isolate::Flags vm_flags; 1243 Isolate::FlagsInitialize(&api_flags);
1244 vm_flags.CopyTo(&api_flags);
1245 flags = &api_flags; 1244 flags = &api_flags;
1246 } 1245 }
1247 Isolate* I = Dart::CreateIsolate(isolate_name, *flags); 1246 Isolate* I = Dart::CreateIsolate(isolate_name, *flags);
1248 free(isolate_name); 1247 free(isolate_name);
1249 if (I == NULL) { 1248 if (I == NULL) {
1250 *error = strdup("Isolate creation failed"); 1249 *error = strdup("Isolate creation failed");
1251 return reinterpret_cast<Dart_Isolate>(NULL); 1250 return reinterpret_cast<Dart_Isolate>(NULL);
1252 } 1251 }
1253 { 1252 {
1254 Thread* T = Thread::Current(); 1253 Thread* T = Thread::Current();
(...skipping 4911 matching lines...) Expand 10 before | Expand all | Expand 10 after
6166 return Api::Success(); 6165 return Api::Success();
6167 } 6166 }
6168 #endif // DART_PRECOMPILER 6167 #endif // DART_PRECOMPILER
6169 6168
6170 6169
6171 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6170 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6172 return Dart::IsRunningPrecompiledCode(); 6171 return Dart::IsRunningPrecompiledCode();
6173 } 6172 }
6174 6173
6175 } // namespace dart 6174 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/flag_list.h » ('j') | runtime/vm/flag_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698