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

Unified Diff: runtime/vm/raw_object.h

Issue 70183010: Fixes a couple problems with GC of unoptimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 30598)
+++ runtime/vm/raw_object.h (working copy)
@@ -610,8 +610,11 @@
};
private:
+ // So that the MarkingVisitor::DetachCode can null out the code fields.
+ friend class MarkingVisitor;
friend class Class;
RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
+ static bool SkipCode(RawFunction* raw_fun);
RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
RawString* name_;
@@ -620,10 +623,13 @@
RawAbstractType* result_type_;
RawArray* parameter_types_;
RawArray* parameter_names_;
+ RawObject* data_; // Additional data specific to the function kind.
RawCode* code_; // Compiled code for the function.
RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization.
- RawObject* data_; // Additional data specific to the function kind.
RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
+ }
+ RawObject** to_no_code() {
return reinterpret_cast<RawObject**>(&ptr()->data_);
}
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698