Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 5232) |
+++ src/objects-inl.h (working copy) |
@@ -2694,12 +2694,14 @@ |
Code* JSFunction::code() { |
- return shared()->code(); |
+ return Code::cast(READ_FIELD(this, kCodeOffset)); |
} |
void JSFunction::set_code(Code* value) { |
- shared()->set_code(value); |
+ // Skip the write barrier because code is never in new space. |
+ ASSERT(!Heap::InNewSpace(value)); |
+ WRITE_FIELD(this, kCodeOffset, value); |
} |
@@ -2771,7 +2773,7 @@ |
bool JSFunction::is_compiled() { |
- return shared()->is_compiled(); |
+ return code()->kind() != Code::STUB; |
} |