| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/thread.h" | 5 #include "vm/thread.h" |
| 6 | 6 |
| 7 #include "vm/growable_array.h" | 7 #include "vm/growable_array.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
| 10 #include "vm/log.h" | 10 #include "vm/log.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 #endif | 336 #endif |
| 337 ASSERT(callback != NULL); | 337 ASSERT(callback != NULL); |
| 338 ASSERT(data != NULL); | 338 ASSERT(data != NULL); |
| 339 *callback = thread_interrupt_callback_; | 339 *callback = thread_interrupt_callback_; |
| 340 *data = thread_interrupt_data_; | 340 *data = thread_interrupt_data_; |
| 341 return (*callback != NULL) && | 341 return (*callback != NULL) && |
| 342 (*data != NULL); | 342 (*data != NULL); |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 void Thread::CloseTimelineBlock() { | |
| 347 if (timeline_block() != NULL) { | |
| 348 timeline_block()->Finish(); | |
| 349 set_timeline_block(NULL); | |
| 350 } | |
| 351 } | |
| 352 | |
| 353 | |
| 354 bool Thread::CanLoadFromThread(const Object& object) { | 346 bool Thread::CanLoadFromThread(const Object& object) { |
| 355 #define CHECK_OBJECT(type_name, member_name, expr, default_init_value) \ | 347 #define CHECK_OBJECT(type_name, member_name, expr, default_init_value) \ |
| 356 if (object.raw() == expr) return true; | 348 if (object.raw() == expr) return true; |
| 357 CACHED_VM_OBJECTS_LIST(CHECK_OBJECT) | 349 CACHED_VM_OBJECTS_LIST(CHECK_OBJECT) |
| 358 #undef CHECK_OBJECT | 350 #undef CHECK_OBJECT |
| 359 return false; | 351 return false; |
| 360 } | 352 } |
| 361 | 353 |
| 362 | 354 |
| 363 intptr_t Thread::OffsetFromThread(const Object& object) { | 355 intptr_t Thread::OffsetFromThread(const Object& object) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 384 return Thread::name##_entry_point_offset(); \ | 376 return Thread::name##_entry_point_offset(); \ |
| 385 } | 377 } |
| 386 LEAF_RUNTIME_ENTRY_LIST(COMPUTE_OFFSET) | 378 LEAF_RUNTIME_ENTRY_LIST(COMPUTE_OFFSET) |
| 387 #undef COMPUTE_OFFSET | 379 #undef COMPUTE_OFFSET |
| 388 | 380 |
| 389 UNREACHABLE(); | 381 UNREACHABLE(); |
| 390 return -1; | 382 return -1; |
| 391 } | 383 } |
| 392 | 384 |
| 393 } // namespace dart | 385 } // namespace dart |
| OLD | NEW |