Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 23ac7cea559046c152cf6eddf35eff24fca61507..cd67eca479316a5d9d2900dd2140667bc3a3e528 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1850,6 +1850,8 @@ enum class KeyCollectionMode { |
static_cast<int>(v8::KeyCollectionMode::kIncludePrototypes) |
}; |
+enum class AllocationSiteUpdateMode { kUpdate, kCheckOnly }; |
+ |
// JSReceiver includes types on which properties can be defined, i.e., |
// JSObject and JSProxy. |
class JSReceiver: public HeapObject { |
@@ -2300,7 +2302,9 @@ class JSObject: public JSReceiver { |
} |
// These methods do not perform access checks! |
- static void UpdateAllocationSite(Handle<JSObject> object, |
+ template <AllocationSiteUpdateMode update_or_check = |
+ AllocationSiteUpdateMode::kUpdate> |
+ static bool UpdateAllocationSite(Handle<JSObject> object, |
ElementsKind to_kind); |
// Lookup interceptors are used for handling properties controlled by host |
@@ -8662,7 +8666,9 @@ class AllocationSite: public Struct { |
inline bool SitePointsToLiteral(); |
- static void DigestTransitionFeedback(Handle<AllocationSite> site, |
+ template <AllocationSiteUpdateMode update_or_check = |
+ AllocationSiteUpdateMode::kUpdate> |
+ static bool DigestTransitionFeedback(Handle<AllocationSite> site, |
ElementsKind to_kind); |
DECLARE_PRINTER(AllocationSite) |