diff options
Diffstat (limited to 'deps/v8/src/objects-inl.h')
-rw-r--r-- | deps/v8/src/objects-inl.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/v8/src/objects-inl.h b/deps/v8/src/objects-inl.h index 101096d6c9..c81f4ab22a 100644 --- a/deps/v8/src/objects-inl.h +++ b/deps/v8/src/objects-inl.h @@ -2694,12 +2694,14 @@ bool JSFunction::IsBuiltin() { 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::should_have_prototype() { bool JSFunction::is_compiled() { - return shared()->is_compiled(); + return code()->kind() != Code::STUB; } |