v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
allocation-site-scopes.h
Go to the documentation of this file.
1// Copyright 2013 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_OBJECTS_ALLOCATION_SITE_SCOPES_H_
6#define V8_OBJECTS_ALLOCATION_SITE_SCOPES_H_
7
10#include "src/objects/map.h"
11#include "src/objects/objects.h"
12
13namespace v8 {
14namespace internal {
15
16// AllocationSiteContext is the base class for walking and copying a nested
17// boilerplate with AllocationSite and AllocationMemento support.
41
42// AllocationSiteUsageContext aids in the creation of AllocationMementos placed
43// behind some/all components of a copied object literal.
45 public:
47 bool activated)
48 : AllocationSiteContext(isolate),
49 top_site_(site),
50 activated_(activated) {}
51
53
54 inline void ExitScope(DirectHandle<AllocationSite> scope_site,
56
58
59 static const bool kCopying = true;
60
61 private:
64};
65
66} // namespace internal
67} // namespace v8
68
69#endif // V8_OBJECTS_ALLOCATION_SITE_SCOPES_H_
void InitializeTraversal(Handle< AllocationSite > site)
DirectHandle< AllocationSite > current()
bool ShouldCreateMemento(DirectHandle< JSObject > object)
DirectHandle< AllocationSite > top()
void update_current_site(Tagged< AllocationSite > site)
void ExitScope(DirectHandle< AllocationSite > scope_site, DirectHandle< JSObject > object)
AllocationSiteUsageContext(Isolate *isolate, Handle< AllocationSite > site, bool activated)
bool ShouldCreateMemento(DirectHandle< JSObject > object)