Chromium Code Reviews| 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_); |
| } |