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

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

Issue 2684683002: Explain requirements on fields accessed from generated code. (Closed)
Patch Set: Created 3 years, 10 months 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
« no previous file with comments | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 RUNTIME_VM_THREAD_H_ 5 #ifndef RUNTIME_VM_THREAD_H_
6 #define RUNTIME_VM_THREAD_H_ 6 #define RUNTIME_VM_THREAD_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/atomic.h" 10 #include "vm/atomic.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 void InitVMConstants(); 666 void InitVMConstants();
667 667
668 #ifndef PRODUCT 668 #ifndef PRODUCT
669 void PrintJSON(JSONStream* stream) const; 669 void PrintJSON(JSONStream* stream) const;
670 #endif 670 #endif
671 671
672 private: 672 private:
673 template <class T> 673 template <class T>
674 T* AllocateReusableHandle(); 674 T* AllocateReusableHandle();
675 675
676 // Accessed from generated code: 676 // Accessed from generated code.
677 // ** This block of fields must come first! **
678 // For AOT cross-compilation, we rely on these members having the same offsets
679 // in SIMARM(IA32) and ARM, and the same offsets in SIMARM64(X64) and ARM64.
680 // We use only word-sized fields to avoid differences in struct packing on the
681 // different architectures. See also CheckOffsets in dart.cc.
677 uword stack_limit_; 682 uword stack_limit_;
678 uword stack_overflow_flags_; 683 uword stack_overflow_flags_;
679 Isolate* isolate_; 684 Isolate* isolate_;
680 Heap* heap_; 685 Heap* heap_;
681 uword top_exit_frame_info_; 686 uword top_exit_frame_info_;
682 StoreBufferBlock* store_buffer_block_; 687 StoreBufferBlock* store_buffer_block_;
683 uword vm_tag_; 688 uword vm_tag_;
684 TaskKind task_kind_; 689 TaskKind task_kind_;
685 // State that is cached in the TLS for fast access in generated code. 690 // State that is cached in the TLS for fast access in generated code.
686 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \ 691 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 // Disable thread interrupts. 805 // Disable thread interrupts.
801 class DisableThreadInterruptsScope : public StackResource { 806 class DisableThreadInterruptsScope : public StackResource {
802 public: 807 public:
803 explicit DisableThreadInterruptsScope(Thread* thread); 808 explicit DisableThreadInterruptsScope(Thread* thread);
804 ~DisableThreadInterruptsScope(); 809 ~DisableThreadInterruptsScope();
805 }; 810 };
806 811
807 } // namespace dart 812 } // namespace dart
808 813
809 #endif // RUNTIME_VM_THREAD_H_ 814 #endif // RUNTIME_VM_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698