Index: src/scopes.h |
diff --git a/src/scopes.h b/src/scopes.h |
index f3c64f9eadf73c7c4f9c1671779c4f55926697f9..73d99fce3af695d980ab2912bfe9f723410beaa5 100644 |
--- a/src/scopes.h |
+++ b/src/scopes.h |
@@ -409,6 +409,17 @@ class Scope: public ZoneObject { |
return arguments_; |
} |
+ // A local variable to the [[HomeObject]] used by methods if we need to |
+ // allocate it; NULL otherwise. |
+ Variable* home_object_var() const { |
+ // TODO(arv): Cleanup |
+ // DCHECK(IsConciseMethod(function_kind()) || |
+ // IsAccessorFunction(function_kind()) || |
+ // IsConstructor(function_kind())); |
+ DCHECK(!is_arrow_scope() || home_object_ == nullptr); |
+ return home_object_; |
+ } |
+ |
// Declarations list. |
ZoneList<Declaration*>* declarations() { return &decls_; } |
@@ -566,6 +577,8 @@ class Scope: public ZoneObject { |
Variable* new_target_; |
// Convenience variable; function scopes only. |
Variable* arguments_; |
+ // Convenience variable; method scopes only. |
+ Variable* home_object_; |
// Module descriptor; module scopes only. |
ModuleDescriptor* module_descriptor_; |