| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
| 6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "vm/class_table.h" | 10 #include "vm/class_table.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void set_ast_node_id(int value) { ast_node_id_ = value; } | 178 void set_ast_node_id(int value) { ast_node_id_ = value; } |
| 179 | 179 |
| 180 intptr_t computation_id() const { return computation_id_; } | 180 intptr_t computation_id() const { return computation_id_; } |
| 181 void set_computation_id(int value) { computation_id_ = value; } | 181 void set_computation_id(int value) { computation_id_ = value; } |
| 182 | 182 |
| 183 RawArray* ic_data_array() const { return ic_data_array_; } | 183 RawArray* ic_data_array() const { return ic_data_array_; } |
| 184 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; } | 184 void set_ic_data_array(RawArray* value) { ic_data_array_ = value; } |
| 185 | 185 |
| 186 Debugger* debugger() const { return debugger_; } | 186 Debugger* debugger() const { return debugger_; } |
| 187 | 187 |
| 188 GcPrologueCallbacks& gc_prologue_callbacks() { |
| 189 return gc_prologue_callbacks_; |
| 190 } |
| 191 |
| 192 GcEpilogueCallbacks& gc_epilogue_callbacks() { |
| 193 return gc_epilogue_callbacks_; |
| 194 } |
| 195 |
| 188 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { | 196 static void SetCreateCallback(Dart_IsolateCreateCallback cb) { |
| 189 create_callback_ = cb; | 197 create_callback_ = cb; |
| 190 } | 198 } |
| 191 static Dart_IsolateCreateCallback CreateCallback() { | 199 static Dart_IsolateCreateCallback CreateCallback() { |
| 192 return create_callback_; | 200 return create_callback_; |
| 193 } | 201 } |
| 194 | 202 |
| 195 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { | 203 static void SetInterruptCallback(Dart_IsolateInterruptCallback cb) { |
| 196 interrupt_callback_ = cb; | 204 interrupt_callback_ = cb; |
| 197 } | 205 } |
| 198 static Dart_IsolateInterruptCallback InterruptCallback() { | 206 static Dart_IsolateInterruptCallback InterruptCallback() { |
| 199 return interrupt_callback_; | 207 return interrupt_callback_; |
| 200 } | 208 } |
| 201 | 209 |
| 202 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { | 210 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { |
| 203 shutdown_callback_ = cb; | 211 shutdown_callback_ = cb; |
| 204 } | 212 } |
| 205 static Dart_IsolateShutdownCallback ShutdownCallback() { | 213 static Dart_IsolateShutdownCallback ShutdownCallback() { |
| 206 return shutdown_callback_; | 214 return shutdown_callback_; |
| 207 } | 215 } |
| 208 | 216 |
| 209 GcPrologueCallbacks& gc_prologue_callbacks() { | |
| 210 return gc_prologue_callbacks_; | |
| 211 } | |
| 212 | |
| 213 GcEpilogueCallbacks& gc_epilogue_callbacks() { | |
| 214 return gc_epilogue_callbacks_; | |
| 215 } | |
| 216 | |
| 217 private: | 217 private: |
| 218 Isolate(); | 218 Isolate(); |
| 219 | 219 |
| 220 void BuildName(const char* name_prefix); | 220 void BuildName(const char* name_prefix); |
| 221 void PrintInvokedFunctions(); | 221 void PrintInvokedFunctions(); |
| 222 | 222 |
| 223 static uword GetSpecifiedStackSize(); | 223 static uword GetSpecifiedStackSize(); |
| 224 | 224 |
| 225 static const intptr_t kStackSizeBuffer = (16 * KB); | 225 static const intptr_t kStackSizeBuffer = (16 * KB); |
| 226 | 226 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 Isolate* new_isolate_; | 321 Isolate* new_isolate_; |
| 322 Isolate* saved_isolate_; | 322 Isolate* saved_isolate_; |
| 323 uword saved_stack_limit_; | 323 uword saved_stack_limit_; |
| 324 | 324 |
| 325 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); | 325 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 } // namespace dart | 328 } // namespace dart |
| 329 | 329 |
| 330 #endif // VM_ISOLATE_H_ | 330 #endif // VM_ISOLATE_H_ |
| OLD | NEW |