Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 5ad67c98b3c1453518f8b0cd7fc14ad7f5cbe6ac..8cba2900be06c061da37b27a7a1c02139a35b28b 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3514,10 +3514,7 @@ ACCESSORS(Map, constructor, Object, kConstructorOffset) |
ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) |
ACCESSORS(JSFunction, literals_or_bindings, FixedArray, kLiteralsOffset) |
-ACCESSORS(JSFunction, |
- next_function_link, |
- Object, |
- kNextFunctionLinkOffset) |
+ACCESSORS(JSFunction, next_function_link, Object, kNextFunctionLinkOffset) |
ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) |
ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) |
@@ -3530,6 +3527,8 @@ ACCESSORS(AccessorInfo, setter, Object, kSetterOffset) |
ACCESSORS(AccessorInfo, data, Object, kDataOffset) |
ACCESSORS(AccessorInfo, name, Object, kNameOffset) |
ACCESSORS_TO_SMI(AccessorInfo, flag, kFlagOffset) |
+ACCESSORS(AccessorInfo, expected_receiver_type, Object, |
+ kExpectedReceiverTypeOffset) |
ACCESSORS(AccessorPair, getter, Object, kGetterOffset) |
ACCESSORS(AccessorPair, setter, Object, kSetterOffset) |
@@ -4741,6 +4740,13 @@ void AccessorInfo::set_property_attributes(PropertyAttributes attributes) { |
} |
+bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
+ Object* function_template = expected_receiver_type(); |
+ if (!function_template->IsFunctionTemplateInfo()) return true; |
+ return receiver->IsInstanceOf(FunctionTemplateInfo::cast(function_template)); |
+} |
+ |
+ |
template<typename Shape, typename Key> |
void Dictionary<Shape, Key>::SetEntry(int entry, |
Object* key, |