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