OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 | 8 |
9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
10 #include "vm/bigint_store.h" | 10 #include "vm/bigint_store.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 result->set_api_state(state); | 125 result->set_api_state(state); |
126 | 126 |
127 // Initialize stack top and limit in case we are running the isolate in the | 127 // Initialize stack top and limit in case we are running the isolate in the |
128 // main thread. | 128 // main thread. |
129 // TODO(5411455): Need to figure out how to set the stack limit for the | 129 // TODO(5411455): Need to figure out how to set the stack limit for the |
130 // main thread. | 130 // main thread. |
131 result->SetStackLimitFromCurrentTOS(reinterpret_cast<uword>(&result)); | 131 result->SetStackLimitFromCurrentTOS(reinterpret_cast<uword>(&result)); |
132 result->set_main_port(PortMap::CreatePort()); | 132 result->set_main_port(PortMap::CreatePort()); |
133 | 133 |
134 result->debugger_ = new Debugger(); | 134 result->debugger_ = new Debugger(); |
| 135 result->debugger_->Initialize(result); |
135 | 136 |
136 return result; | 137 return result; |
137 } | 138 } |
138 | 139 |
139 | 140 |
140 // TODO(5411455): Use flag to override default value and Validate the | 141 // TODO(5411455): Use flag to override default value and Validate the |
141 // stack size by querying OS. | 142 // stack size by querying OS. |
142 uword Isolate::GetSpecifiedStackSize() { | 143 uword Isolate::GetSpecifiedStackSize() { |
143 uword stack_size = Isolate::kDefaultStackSize - Isolate::kStackSizeBuffer; | 144 uword stack_size = Isolate::kDefaultStackSize - Isolate::kStackSizeBuffer; |
144 return stack_size; | 145 return stack_size; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } | 306 } |
306 | 307 |
307 // Visit the top context which is stored in the isolate. | 308 // Visit the top context which is stored in the isolate. |
308 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); | 309 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); |
309 | 310 |
310 // Visit objects in the debugger. | 311 // Visit objects in the debugger. |
311 debugger()->VisitObjectPointers(visitor); | 312 debugger()->VisitObjectPointers(visitor); |
312 } | 313 } |
313 | 314 |
314 } // namespace dart | 315 } // namespace dart |
OLD | NEW |