Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index a9ecb112e2cbb5dfd5c7a76095260916d8379068..08c75649337adb2156bd7e82ff3ece6b119e17d8 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1842,6 +1842,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 { |
@@ -2292,7 +2294,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 |
@@ -8656,7 +8660,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) |