Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: runtime/vm/thread.h

Issue 1439893002: - Annotate instructions that load objects from the ObjectPool or Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/handles.h" 9 #include "vm/handles.h"
10 #include "vm/os_thread.h" 10 #include "vm/os_thread.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 #define DEFINE_OFFSET_METHOD(returntype, name, ...) \ 285 #define DEFINE_OFFSET_METHOD(returntype, name, ...) \
286 static intptr_t name##_entry_point_offset() { \ 286 static intptr_t name##_entry_point_offset() { \
287 return OFFSET_OF(Thread, name##_entry_point_); \ 287 return OFFSET_OF(Thread, name##_entry_point_); \
288 } 288 }
289 LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD) 289 LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD)
290 #undef DEFINE_OFFSET_METHOD 290 #undef DEFINE_OFFSET_METHOD
291 291
292 static bool CanLoadFromThread(const Object& object); 292 static bool CanLoadFromThread(const Object& object);
293 static intptr_t OffsetFromThread(const Object& object); 293 static intptr_t OffsetFromThread(const Object& object);
294 static bool ObjectAtOffset(intptr_t offset, Object* object);
294 static intptr_t OffsetFromThread(const RuntimeEntry* runtime_entry); 295 static intptr_t OffsetFromThread(const RuntimeEntry* runtime_entry);
295 296
296 Mutex* timeline_block_lock() { 297 Mutex* timeline_block_lock() {
297 return &timeline_block_lock_; 298 return &timeline_block_lock_;
298 } 299 }
299 300
300 // Only safe to access when holding |timeline_block_lock_|. 301 // Only safe to access when holding |timeline_block_lock_|.
301 TimelineEventBlock* timeline_block() const { 302 TimelineEventBlock* timeline_block() const {
302 return timeline_block_; 303 return timeline_block_;
303 } 304 }
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // Disable thread interrupts. 551 // Disable thread interrupts.
551 class DisableThreadInterruptsScope : public StackResource { 552 class DisableThreadInterruptsScope : public StackResource {
552 public: 553 public:
553 explicit DisableThreadInterruptsScope(Thread* thread); 554 explicit DisableThreadInterruptsScope(Thread* thread);
554 ~DisableThreadInterruptsScope(); 555 ~DisableThreadInterruptsScope();
555 }; 556 };
556 557
557 } // namespace dart 558 } // namespace dart
558 559
559 #endif // VM_THREAD_H_ 560 #endif // VM_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698