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

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

Issue 1261873005: Migrate stack resource unwinding to Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Simulators. Created 5 years, 4 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/allocation.cc ('k') | runtime/vm/exceptions.cc » ('j') | 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) 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_CHA_H_ 5 #ifndef VM_CHA_H_
6 #define VM_CHA_H_ 6 #define VM_CHA_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/thread.h" 10 #include "vm/thread.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 class Class; 14 class Class;
15 class Function; 15 class Function;
16 template <typename T> class ZoneGrowableArray; 16 template <typename T> class ZoneGrowableArray;
17 class String; 17 class String;
18 18
19 class CHA : public StackResource { 19 class CHA : public StackResource {
20 public: 20 public:
21 explicit CHA(Thread* thread) 21 explicit CHA(Thread* thread)
22 : StackResource(thread->isolate()), 22 : StackResource(thread),
23 thread_(thread), 23 thread_(thread),
24 leaf_classes_(thread->zone(), 1), 24 leaf_classes_(thread->zone(), 1),
25 previous_(thread->cha()) { 25 previous_(thread->cha()) {
26 thread->set_cha(this); 26 thread->set_cha(this);
27 } 27 }
28 28
29 ~CHA() { 29 ~CHA() {
30 ASSERT(thread_->cha() == this); 30 ASSERT(thread_->cha() == this);
31 thread_->set_cha(previous_); 31 thread_->set_cha(previous_);
32 } 32 }
(...skipping 19 matching lines...) Expand all
52 52
53 private: 53 private:
54 Thread* thread_; 54 Thread* thread_;
55 GrowableArray<Class*> leaf_classes_; 55 GrowableArray<Class*> leaf_classes_;
56 CHA* previous_; 56 CHA* previous_;
57 }; 57 };
58 58
59 } // namespace dart 59 } // namespace dart
60 60
61 #endif // VM_CHA_H_ 61 #endif // VM_CHA_H_
OLDNEW
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698