| 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 #ifndef VM_THREAD_H_ | 5 #ifndef VM_THREAD_H_ |
| 6 #define VM_THREAD_H_ | 6 #define VM_THREAD_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 V(RawBool*, bool_false_, Object::bool_false().raw(), NULL) \ | 72 V(RawBool*, bool_false_, Object::bool_false().raw(), NULL) \ |
| 73 V(RawCode*, update_store_buffer_code_, \ | 73 V(RawCode*, update_store_buffer_code_, \ |
| 74 StubCode::UpdateStoreBuffer_entry()->code(), NULL) \ | 74 StubCode::UpdateStoreBuffer_entry()->code(), NULL) \ |
| 75 V(RawCode*, fix_callers_target_code_, \ | 75 V(RawCode*, fix_callers_target_code_, \ |
| 76 StubCode::FixCallersTarget_entry()->code(), NULL) \ | 76 StubCode::FixCallersTarget_entry()->code(), NULL) \ |
| 77 V(RawCode*, fix_allocation_stub_code_, \ | 77 V(RawCode*, fix_allocation_stub_code_, \ |
| 78 StubCode::FixAllocationStubTarget_entry()->code(), NULL) \ | 78 StubCode::FixAllocationStubTarget_entry()->code(), NULL) \ |
| 79 V(RawCode*, invoke_dart_code_stub_, \ | 79 V(RawCode*, invoke_dart_code_stub_, \ |
| 80 StubCode::InvokeDartCode_entry()->code(), NULL) \ | 80 StubCode::InvokeDartCode_entry()->code(), NULL) \ |
| 81 | 81 |
| 82 |
| 82 #define CACHED_ADDRESSES_LIST(V) \ | 83 #define CACHED_ADDRESSES_LIST(V) \ |
| 83 V(uword, update_store_buffer_entry_point_, \ | 84 V(uword, update_store_buffer_entry_point_, \ |
| 84 StubCode::UpdateStoreBuffer_entry()->EntryPoint(), 0) \ | 85 StubCode::UpdateStoreBuffer_entry()->EntryPoint(), 0) \ |
| 85 V(uword, native_call_wrapper_entry_point_, \ | 86 V(uword, native_call_wrapper_entry_point_, \ |
| 86 NativeEntry::NativeCallWrapperEntry(), 0) \ | 87 NativeEntry::NativeCallWrapperEntry(), 0) \ |
| 87 V(RawString**, predefined_symbols_address_, \ | 88 V(RawString**, predefined_symbols_address_, \ |
| 88 Symbols::PredefinedAddress(), NULL) \ | 89 Symbols::PredefinedAddress(), NULL) \ |
| 89 V(uword, double_negate_address_, \ | |
| 90 reinterpret_cast<uword>(&double_negate_constant), 0) \ | |
| 91 V(uword, double_abs_address_, \ | |
| 92 reinterpret_cast<uword>(&double_abs_constant), 0) \ | |
| 93 V(uword, float_not_address_, \ | |
| 94 reinterpret_cast<uword>(&float_not_constant), 0) \ | |
| 95 V(uword, float_negate_address_, \ | |
| 96 reinterpret_cast<uword>(&float_negate_constant), 0) \ | |
| 97 V(uword, float_absolute_address_, \ | |
| 98 reinterpret_cast<uword>(&float_absolute_constant), 0) \ | |
| 99 V(uword, float_zerow_address_, \ | |
| 100 reinterpret_cast<uword>(&float_zerow_constant), 0) \ | |
| 101 | 90 |
| 102 #define CACHED_CONSTANTS_LIST(V) \ | 91 #define CACHED_CONSTANTS_LIST(V) \ |
| 103 CACHED_VM_OBJECTS_LIST(V) \ | 92 CACHED_VM_OBJECTS_LIST(V) \ |
| 104 CACHED_ADDRESSES_LIST(V) \ | 93 CACHED_ADDRESSES_LIST(V) \ |
| 105 | 94 |
| 95 |
| 106 // A VM thread; may be executing Dart code or performing helper tasks like | 96 // A VM thread; may be executing Dart code or performing helper tasks like |
| 107 // garbage collection or compilation. The Thread structure associated with | 97 // garbage collection or compilation. The Thread structure associated with |
| 108 // a thread is allocated by EnsureInit before entering an isolate, and destroyed | 98 // a thread is allocated by EnsureInit before entering an isolate, and destroyed |
| 109 // automatically when the underlying OS thread exits. NOTE: On Windows, CleanUp | 99 // automatically when the underlying OS thread exits. NOTE: On Windows, CleanUp |
| 110 // must currently be called manually (issue 23474). | 100 // must currently be called manually (issue 23474). |
| 111 class Thread : public BaseThread { | 101 class Thread : public BaseThread { |
| 112 public: | 102 public: |
| 113 ~Thread(); | 103 ~Thread(); |
| 114 | 104 |
| 115 // The currently executing thread, or NULL if not yet initialized. | 105 // The currently executing thread, or NULL if not yet initialized. |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 // Disable thread interrupts. | 488 // Disable thread interrupts. |
| 499 class DisableThreadInterruptsScope : public StackResource { | 489 class DisableThreadInterruptsScope : public StackResource { |
| 500 public: | 490 public: |
| 501 explicit DisableThreadInterruptsScope(Thread* thread); | 491 explicit DisableThreadInterruptsScope(Thread* thread); |
| 502 ~DisableThreadInterruptsScope(); | 492 ~DisableThreadInterruptsScope(); |
| 503 }; | 493 }; |
| 504 | 494 |
| 505 } // namespace dart | 495 } // namespace dart |
| 506 | 496 |
| 507 #endif // VM_THREAD_H_ | 497 #endif // VM_THREAD_H_ |
| OLD | NEW |