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/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 // Wait until all background compilation has finished. | 1661 // Wait until all background compilation has finished. |
1662 if (background_compiler_ != NULL) { | 1662 if (background_compiler_ != NULL) { |
1663 BackgroundCompiler::Stop(this); | 1663 BackgroundCompiler::Stop(this); |
1664 } | 1664 } |
1665 } | 1665 } |
1666 | 1666 |
1667 | 1667 |
1668 void Isolate::MaybeIncreaseReloadEveryNStackOverflowChecks() { | 1668 void Isolate::MaybeIncreaseReloadEveryNStackOverflowChecks() { |
1669 if (FLAG_reload_every_back_off) { | 1669 if (FLAG_reload_every_back_off) { |
1670 if (reload_every_n_stack_overflow_checks_ < 5000) { | 1670 if (reload_every_n_stack_overflow_checks_ < 5000) { |
1671 reload_every_n_stack_overflow_checks_ += 100; | 1671 reload_every_n_stack_overflow_checks_ += 99; |
1672 } else { | 1672 } else { |
1673 reload_every_n_stack_overflow_checks_ *= 2; | 1673 reload_every_n_stack_overflow_checks_ *= 2; |
1674 } | 1674 } |
1675 // Cap the value. | 1675 // Cap the value. |
1676 if (reload_every_n_stack_overflow_checks_ > 1000000) { | 1676 if (reload_every_n_stack_overflow_checks_ > 1000000) { |
1677 reload_every_n_stack_overflow_checks_ = 1000000; | 1677 reload_every_n_stack_overflow_checks_ = 1000000; |
1678 } | 1678 } |
1679 } | 1679 } |
1680 } | 1680 } |
1681 | 1681 |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2881 void IsolateSpawnState::DecrementSpawnCount() { | 2881 void IsolateSpawnState::DecrementSpawnCount() { |
2882 ASSERT(spawn_count_monitor_ != NULL); | 2882 ASSERT(spawn_count_monitor_ != NULL); |
2883 ASSERT(spawn_count_ != NULL); | 2883 ASSERT(spawn_count_ != NULL); |
2884 MonitorLocker ml(spawn_count_monitor_); | 2884 MonitorLocker ml(spawn_count_monitor_); |
2885 ASSERT(*spawn_count_ > 0); | 2885 ASSERT(*spawn_count_ > 0); |
2886 *spawn_count_ = *spawn_count_ - 1; | 2886 *spawn_count_ = *spawn_count_ - 1; |
2887 ml.Notify(); | 2887 ml.Notify(); |
2888 } | 2888 } |
2889 | 2889 |
2890 } // namespace dart | 2890 } // namespace dart |
OLD | NEW |