Chromium Code Reviews| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 return interrupt_callback_; | 207 return interrupt_callback_; |
| 208 } | 208 } |
| 209 | 209 |
| 210 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { | 210 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { |
| 211 shutdown_callback_ = cb; | 211 shutdown_callback_ = cb; |
| 212 } | 212 } |
| 213 static Dart_IsolateShutdownCallback ShutdownCallback() { | 213 static Dart_IsolateShutdownCallback ShutdownCallback() { |
| 214 return shutdown_callback_; | 214 return shutdown_callback_; |
| 215 } | 215 } |
| 216 | 216 |
| 217 intptr_t* deopt_registers_copy() const { return deopt_registers_copy_; } | |
| 218 void set_deopt_registers_copy(intptr_t* value) { | |
| 219 deopt_registers_copy_ = value; | |
| 220 } | |
| 221 intptr_t* deopt_frame_copy() const { return deopt_frame_copy_; } | |
| 222 void SetDeoptFrameCopy(intptr_t* value, intptr_t size) { | |
|
siva
2012/07/31 01:59:12
set_deopt_frame_copy to be consistent?
srdjan
2012/07/31 16:21:28
This is not a simple setter, therefore it cannot b
| |
| 223 ASSERT((value == NULL) || (size > 0)); | |
| 224 deopt_frame_copy_ = value; | |
| 225 deopt_frame_copy_size_ = size; | |
| 226 } | |
| 227 intptr_t deopt_frame_copy_size() const { return deopt_frame_copy_size_; } | |
| 228 | |
| 217 private: | 229 private: |
| 218 Isolate(); | 230 Isolate(); |
| 219 | 231 |
| 220 void BuildName(const char* name_prefix); | 232 void BuildName(const char* name_prefix); |
| 221 void PrintInvokedFunctions(); | 233 void PrintInvokedFunctions(); |
| 222 | 234 |
| 223 static uword GetSpecifiedStackSize(); | 235 static uword GetSpecifiedStackSize(); |
| 224 | 236 |
| 225 static const intptr_t kStackSizeBuffer = (16 * KB); | 237 static const intptr_t kStackSizeBuffer = (16 * KB); |
| 226 | 238 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 246 intptr_t ast_node_id_; // Deprecate. | 258 intptr_t ast_node_id_; // Deprecate. |
| 247 intptr_t computation_id_; | 259 intptr_t computation_id_; |
| 248 RawArray* ic_data_array_; | 260 RawArray* ic_data_array_; |
| 249 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. | 261 Mutex* mutex_; // protects stack_limit_ and saved_stack_limit_. |
| 250 uword stack_limit_; | 262 uword stack_limit_; |
| 251 uword saved_stack_limit_; | 263 uword saved_stack_limit_; |
| 252 MessageHandler* message_handler_; | 264 MessageHandler* message_handler_; |
| 253 uword spawn_data_; | 265 uword spawn_data_; |
| 254 GcPrologueCallbacks gc_prologue_callbacks_; | 266 GcPrologueCallbacks gc_prologue_callbacks_; |
| 255 GcEpilogueCallbacks gc_epilogue_callbacks_; | 267 GcEpilogueCallbacks gc_epilogue_callbacks_; |
| 268 // Deoptimization support. | |
| 269 intptr_t* deopt_registers_copy_; | |
| 270 intptr_t* deopt_frame_copy_; | |
| 271 intptr_t deopt_frame_copy_size_; | |
| 256 | 272 |
| 257 static Dart_IsolateCreateCallback create_callback_; | 273 static Dart_IsolateCreateCallback create_callback_; |
| 258 static Dart_IsolateInterruptCallback interrupt_callback_; | 274 static Dart_IsolateInterruptCallback interrupt_callback_; |
| 259 static Dart_IsolateShutdownCallback shutdown_callback_; | 275 static Dart_IsolateShutdownCallback shutdown_callback_; |
| 260 | 276 |
| 261 DISALLOW_COPY_AND_ASSIGN(Isolate); | 277 DISALLOW_COPY_AND_ASSIGN(Isolate); |
| 262 }; | 278 }; |
| 263 | 279 |
| 264 // When we need to execute code in an isolate, we use the | 280 // When we need to execute code in an isolate, we use the |
| 265 // StartIsolateScope. | 281 // StartIsolateScope. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 Isolate* new_isolate_; | 337 Isolate* new_isolate_; |
| 322 Isolate* saved_isolate_; | 338 Isolate* saved_isolate_; |
| 323 uword saved_stack_limit_; | 339 uword saved_stack_limit_; |
| 324 | 340 |
| 325 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); | 341 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); |
| 326 }; | 342 }; |
| 327 | 343 |
| 328 } // namespace dart | 344 } // namespace dart |
| 329 | 345 |
| 330 #endif // VM_ISOLATE_H_ | 346 #endif // VM_ISOLATE_H_ |
| OLD | NEW |