Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: src/allocation-site-scopes.h

Issue 40063002: Bookkeeping for allocation site pretenuring (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/allocation-site-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/allocation-site-scopes.h
diff --git a/src/allocation-site-scopes.h b/src/allocation-site-scopes.h
index f106c5e88934e7d54f4d80b359c3ae65c33b8e5e..a195b27d85a0b180eaa7f71eaf3e8694331320b3 100644
--- a/src/allocation-site-scopes.h
+++ b/src/allocation-site-scopes.h
@@ -41,16 +41,14 @@ namespace internal {
// boilerplate with AllocationSite and AllocationMemento support.
class AllocationSiteContext {
public:
- AllocationSiteContext(Isolate* isolate, bool activated) {
+ explicit AllocationSiteContext(Isolate* isolate) {
isolate_ = isolate;
- activated_ = activated;
};
Handle<AllocationSite> top() { return top_; }
Handle<AllocationSite> current() { return current_; }
- // If activated, then recursively create mementos
- bool activated() const { return activated_; }
+ bool ShouldCreateMemento(Handle<JSObject> object) { return false; }
Isolate* isolate() { return isolate_; }
@@ -68,7 +66,6 @@ class AllocationSiteContext {
Isolate* isolate_;
Handle<AllocationSite> top_;
Handle<AllocationSite> current_;
- bool activated_;
};
@@ -77,7 +74,7 @@ class AllocationSiteContext {
class AllocationSiteCreationContext : public AllocationSiteContext {
public:
explicit AllocationSiteCreationContext(Isolate* isolate)
- : AllocationSiteContext(isolate, true) { }
+ : AllocationSiteContext(isolate) { }
Handle<AllocationSite> EnterNewScope();
void ExitScope(Handle<AllocationSite> site, Handle<JSObject> object);
@@ -90,8 +87,9 @@ class AllocationSiteUsageContext : public AllocationSiteContext {
public:
AllocationSiteUsageContext(Isolate* isolate, Handle<AllocationSite> site,
bool activated)
- : AllocationSiteContext(isolate, activated),
- top_site_(site) { }
+ : AllocationSiteContext(isolate),
+ top_site_(site),
+ activated_(activated) { }
inline Handle<AllocationSite> EnterNewScope() {
if (top().is_null()) {
@@ -113,8 +111,11 @@ class AllocationSiteUsageContext : public AllocationSiteContext {
ASSERT(object.is_null() || *object == scope_site->transition_info());
}
+ bool ShouldCreateMemento(Handle<JSObject> object);
+
private:
Handle<AllocationSite> top_site_;
+ bool activated_;
};
« no previous file with comments | « no previous file | src/allocation-site-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698