| Index: src/allocation-site-scopes.h
|
| diff --git a/src/allocation-site-scopes.h b/src/allocation-site-scopes.h
|
| index 1c3afdf369546e3178472b173225c5ac9e2c884b..28ec69cbe5e7eb798ae2268e6c9a504677501aa0 100644
|
| --- a/src/allocation-site-scopes.h
|
| +++ b/src/allocation-site-scopes.h
|
| @@ -41,17 +41,15 @@ namespace internal {
|
| // boilerplate with AllocationSite and AllocationMemento support.
|
| class AllocationSiteContext {
|
| public:
|
| - AllocationSiteContext(Isolate* isolate, bool activated) {
|
| + explicit AllocationSiteContext(Isolate* isolate) {
|
| isolate_ = isolate;
|
| - activated_ = activated;
|
| };
|
| virtual ~AllocationSiteContext() {}
|
|
|
| Handle<AllocationSite> top() { return top_; }
|
| Handle<AllocationSite> current() { return current_; }
|
|
|
| - // If activated, then recursively create mementos
|
| - bool activated() const { return activated_; }
|
| + virtual bool ShouldCreateMemento(Handle<JSObject> object) { return false; }
|
|
|
| // Returns the AllocationSite that matches this scope.
|
| virtual Handle<AllocationSite> EnterNewScope() = 0;
|
| @@ -75,7 +73,6 @@ class AllocationSiteContext {
|
| Isolate* isolate_;
|
| Handle<AllocationSite> top_;
|
| Handle<AllocationSite> current_;
|
| - bool activated_;
|
| };
|
|
|
|
|
| @@ -84,7 +81,7 @@ class AllocationSiteContext {
|
| class AllocationSiteCreationContext : public AllocationSiteContext {
|
| public:
|
| explicit AllocationSiteCreationContext(Isolate* isolate)
|
| - : AllocationSiteContext(isolate, true) { }
|
| + : AllocationSiteContext(isolate) { }
|
|
|
| virtual Handle<AllocationSite> EnterNewScope() V8_OVERRIDE;
|
| virtual void ExitScope(Handle<AllocationSite> site,
|
| @@ -98,15 +95,18 @@ 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) { }
|
|
|
| + virtual bool ShouldCreateMemento(Handle<JSObject> object) V8_OVERRIDE;
|
| virtual Handle<AllocationSite> EnterNewScope() V8_OVERRIDE;
|
| virtual void ExitScope(Handle<AllocationSite> site,
|
| Handle<JSObject> object) V8_OVERRIDE;
|
|
|
| private:
|
| Handle<AllocationSite> top_site_;
|
| + bool activated_;
|
| };
|
|
|
|
|
|
|