| OLD | NEW |
| 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" |
| 11 #include "vm/debugger.h" | 11 #include "vm/debugger.h" |
| 12 #include "vm/flags.h" | 12 #include "vm/flags.h" |
| 13 #include "vm/freelist.h" | 13 #include "vm/freelist.h" |
| 14 #include "vm/handles.h" | 14 #include "vm/handles.h" |
| 15 #include "vm/heap.h" | 15 #include "vm/heap.h" |
| 16 #include "vm/isolate.h" | 16 #include "vm/isolate.h" |
| 17 #include "vm/metrics.h" | 17 #include "vm/metrics.h" |
| 18 #include "vm/object.h" | 18 #include "vm/object.h" |
| 19 #include "vm/object_store.h" | 19 #include "vm/object_store.h" |
| 20 #include "vm/object_id_ring.h" | 20 #include "vm/object_id_ring.h" |
| 21 #include "vm/port.h" | 21 #include "vm/port.h" |
| 22 #include "vm/profiler.h" | 22 #include "vm/profiler.h" |
| 23 #include "vm/service_isolate.h" | 23 #include "vm/service_isolate.h" |
| 24 #include "vm/simulator.h" | 24 #include "vm/simulator.h" |
| 25 #include "vm/snapshot.h" | 25 #include "vm/snapshot.h" |
| 26 #include "vm/stub_code.h" | 26 #include "vm/stub_code.h" |
| 27 #include "vm/symbols.h" | 27 #include "vm/symbols.h" |
| 28 #include "vm/thread_interrupter.h" | 28 #include "vm/thread_interrupter.h" |
| 29 #include "vm/thread_pool.h" | 29 #include "vm/thread_pool.h" |
| 30 #include "vm/timeline.h" |
| 30 #include "vm/virtual_memory.h" | 31 #include "vm/virtual_memory.h" |
| 31 #include "vm/zone.h" | 32 #include "vm/zone.h" |
| 32 | 33 |
| 33 namespace dart { | 34 namespace dart { |
| 34 | 35 |
| 35 DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32, | 36 DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32, |
| 36 "Max size of new gen semi space in MB"); | 37 "Max size of new gen semi space in MB"); |
| 37 DEFINE_FLAG(int, old_gen_heap_size, 0, | 38 DEFINE_FLAG(int, old_gen_heap_size, 0, |
| 38 "Max size of old gen heap size in MB, or 0 for unlimited," | 39 "Max size of old gen heap size in MB, or 0 for unlimited," |
| 39 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap"); | 40 "e.g: --old_gen_heap_size=1024 allows up to 1024MB old gen heap"); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 ServiceIsolate::SendIsolateStartupMessage(); | 311 ServiceIsolate::SendIsolateStartupMessage(); |
| 311 isolate->debugger()->NotifyIsolateCreated(); | 312 isolate->debugger()->NotifyIsolateCreated(); |
| 312 | 313 |
| 313 // Create tag table. | 314 // Create tag table. |
| 314 isolate->set_tag_table( | 315 isolate->set_tag_table( |
| 315 GrowableObjectArray::Handle(GrowableObjectArray::New())); | 316 GrowableObjectArray::Handle(GrowableObjectArray::New())); |
| 316 // Set up default UserTag. | 317 // Set up default UserTag. |
| 317 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); | 318 const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag()); |
| 318 isolate->set_current_tag(default_tag); | 319 isolate->set_current_tag(default_tag); |
| 319 | 320 |
| 321 isolate->SetTimelineEventBuffer(new TimelineEventBuffer()); |
| 322 |
| 320 if (FLAG_keep_code) { | 323 if (FLAG_keep_code) { |
| 321 isolate->set_deoptimized_code_array( | 324 isolate->set_deoptimized_code_array( |
| 322 GrowableObjectArray::Handle(GrowableObjectArray::New())); | 325 GrowableObjectArray::Handle(GrowableObjectArray::New())); |
| 323 } | 326 } |
| 324 return Error::null(); | 327 return Error::null(); |
| 325 } | 328 } |
| 326 | 329 |
| 327 | 330 |
| 328 void Dart::RunShutdownCallback() { | 331 void Dart::RunShutdownCallback() { |
| 329 Isolate* isolate = Isolate::Current(); | 332 Isolate* isolate = Isolate::Current(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 349 return predefined_handles_->handles_.AllocateScopedHandle(); | 352 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 350 } | 353 } |
| 351 | 354 |
| 352 | 355 |
| 353 bool Dart::IsReadOnlyHandle(uword address) { | 356 bool Dart::IsReadOnlyHandle(uword address) { |
| 354 ASSERT(predefined_handles_ != NULL); | 357 ASSERT(predefined_handles_ != NULL); |
| 355 return predefined_handles_->handles_.IsValidScopedHandle(address); | 358 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 356 } | 359 } |
| 357 | 360 |
| 358 } // namespace dart | 361 } // namespace dart |
| OLD | NEW |