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

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

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/coverage_test.cc ('k') | runtime/vm/dart_api_impl.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 "vm/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 #endif 193 #endif
194 } 194 }
195 // Allocate the "persistent" scoped handles for the predefined API 195 // Allocate the "persistent" scoped handles for the predefined API
196 // values (such as Dart_True, Dart_False and Dart_Null). 196 // values (such as Dart_True, Dart_False and Dart_Null).
197 Api::InitHandles(); 197 Api::InitHandles();
198 198
199 Thread::ExitIsolate(); // Unregister the VM isolate from this thread. 199 Thread::ExitIsolate(); // Unregister the VM isolate from this thread.
200 Isolate::SetCreateCallback(create); 200 Isolate::SetCreateCallback(create);
201 Isolate::SetShutdownCallback(shutdown); 201 Isolate::SetShutdownCallback(shutdown);
202 202
203 Service::SetGetServiceAssetsCallback(get_service_assets); 203 if (FLAG_support_service) {
204 Service::SetGetServiceAssetsCallback(get_service_assets);
205 }
206
204 ServiceIsolate::Run(); 207 ServiceIsolate::Run();
205 208
206 return NULL; 209 return NULL;
207 } 210 }
208 211
209 212
210 // This waits until only the VM isolate remains in the list. 213 // This waits until only the VM isolate remains in the list.
211 void Dart::WaitForIsolateShutdown() { 214 void Dart::WaitForIsolateShutdown() {
212 ASSERT(!Isolate::creation_enabled_); 215 ASSERT(!Isolate::creation_enabled_);
213 MonitorLocker ml(Isolate::isolates_list_monitor_); 216 MonitorLocker ml(Isolate::isolates_list_monitor_);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 394 }
392 395
393 ServiceIsolate::MaybeMakeServiceIsolate(I); 396 ServiceIsolate::MaybeMakeServiceIsolate(I);
394 if (!ServiceIsolate::IsServiceIsolate(I)) { 397 if (!ServiceIsolate::IsServiceIsolate(I)) {
395 I->message_handler()->set_should_pause_on_start( 398 I->message_handler()->set_should_pause_on_start(
396 FLAG_pause_isolates_on_start); 399 FLAG_pause_isolates_on_start);
397 I->message_handler()->set_should_pause_on_exit( 400 I->message_handler()->set_should_pause_on_exit(
398 FLAG_pause_isolates_on_exit); 401 FLAG_pause_isolates_on_exit);
399 } 402 }
400 ServiceIsolate::SendIsolateStartupMessage(); 403 ServiceIsolate::SendIsolateStartupMessage();
401 I->debugger()->NotifyIsolateCreated(); 404 if (FLAG_support_debugger) {
402 405 I->debugger()->NotifyIsolateCreated();
406 }
403 // Create tag table. 407 // Create tag table.
404 I->set_tag_table(GrowableObjectArray::Handle(GrowableObjectArray::New())); 408 I->set_tag_table(GrowableObjectArray::Handle(GrowableObjectArray::New()));
405 // Set up default UserTag. 409 // Set up default UserTag.
406 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); 410 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag());
407 I->set_current_tag(default_tag); 411 I->set_current_tag(default_tag);
408 412
409 if (FLAG_keep_code) { 413 if (FLAG_keep_code) {
410 I->set_deoptimized_code_array( 414 I->set_deoptimized_code_array(
411 GrowableObjectArray::Handle(GrowableObjectArray::New())); 415 GrowableObjectArray::Handle(GrowableObjectArray::New()));
412 } 416 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 return predefined_handles_->handles_.IsValidScopedHandle(address); 467 return predefined_handles_->handles_.IsValidScopedHandle(address);
464 } 468 }
465 469
466 470
467 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 471 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
468 ASSERT(predefined_handles_ != NULL); 472 ASSERT(predefined_handles_ != NULL);
469 return predefined_handles_->api_handles_.IsValidHandle(handle); 473 return predefined_handles_->api_handles_.IsValidHandle(handle);
470 } 474 }
471 475
472 } // namespace dart 476 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/coverage_test.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698