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

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
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 30197)
+++ runtime/vm/raw_object.h (working copy)
@@ -610,8 +610,11 @@
};
private:
+ // So that the MarkingVisitor can inspect the attached code, name, etc..
+ friend class MarkingVisitor;
Ivan Posva 2013/11/19 19:24:48 Why is this needed?
zra 2013/11/22 17:18:54 So that MarkingVisitor::DetachCode can null out th
friend class Class;
RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
+ static bool MayTrySkippingCode(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_);
}

Powered by Google App Engine
This is Rietveld 408576698