| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index e8e20e9a3fe9bf0374bfd07a58562b73a31cb9ab..a42c0a8e75b80c3acc4f69ee2acca4f91bf2047b 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -5314,6 +5314,12 @@ class Code: public HeapObject {
|
| inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
|
| inline bool is_keyed_stub();
|
| inline bool is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; }
|
| + inline bool is_weak_stub() {
|
| + Kind k = kind();
|
| + return (k == LOAD_IC || k == STORE_IC || k == KEYED_LOAD_IC ||
|
| + k == KEYED_STORE_IC || k == COMPARE_NIL_IC) &&
|
| + ic_state() == MONOMORPHIC;
|
| + }
|
|
|
| inline void set_raw_kind_specific_flags1(int value);
|
| inline void set_raw_kind_specific_flags2(int value);
|
| @@ -5571,11 +5577,17 @@ class Code: public HeapObject {
|
| void VerifyEmbeddedObjectsDependency();
|
| #endif
|
|
|
| + inline bool CanContainWeakObjects() {
|
| + return is_optimized_code() || is_weak_stub();
|
| + }
|
| +
|
| inline bool IsWeakObject(Object* object) {
|
| - return is_optimized_code() && IsWeakObjectInOptimizedCode(object);
|
| + return (is_optimized_code() && IsWeakObjectInOptimizedCode(object)) ||
|
| + (is_weak_stub() && IsWeakObjectInIC(object));
|
| }
|
|
|
| inline bool IsWeakObjectInOptimizedCode(Object* object);
|
| + inline bool IsWeakObjectInIC(Object* object);
|
|
|
| // Max loop nesting marker used to postpose OSR. We don't take loop
|
| // nesting that is deeper than 5 levels into account.
|
|
|