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

Unified Diff: runtime/vm/cha.h

Issue 1016973002: Move CHA state keeping from Isolate to Thread. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cha.h
===================================================================
--- runtime/vm/cha.h (revision 44544)
+++ runtime/vm/cha.h (working copy)
@@ -7,6 +7,7 @@
#include "vm/allocation.h"
#include "vm/growable_array.h"
+#include "vm/thread.h"
namespace dart {
@@ -17,17 +18,17 @@
class CHA : public StackResource {
public:
- explicit CHA(Isolate* isolate)
- : StackResource(isolate),
- isolate_(isolate),
- leaf_classes_(isolate, 1),
- previous_(isolate->cha()) {
- isolate->set_cha(this);
+ explicit CHA(Thread* thread)
+ : StackResource(thread->isolate()),
+ thread_(thread),
+ leaf_classes_(thread->zone(), 1),
+ previous_(thread->cha()) {
+ thread->set_cha(this);
}
~CHA() {
- ASSERT(isolate_->cha() == this);
- isolate_->set_cha(previous_);
+ ASSERT(thread_->cha() == this);
+ thread_->set_cha(previous_);
}
// Returns true if the class has subclasses.
@@ -53,7 +54,7 @@
private:
void AddToLeafClasses(const Class& cls);
- Isolate* isolate_;
+ Thread* thread_;
GrowableArray<Class*> leaf_classes_;
CHA* previous_;
};
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698