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

Unified Diff: src/ast/ast.cc

Issue 2193793002: Put Scopes into temporary Zone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 5 months 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 | « src/ast/ast.h ('k') | src/ast/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index a2fc8997a4a07be151afd82ac4c6de0016c762e7..12e6f206711dba957124c7639a25b4c1c9e89dcd 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -204,6 +204,18 @@ VariableProxy::VariableProxy(Zone* zone, const AstRawString* name,
raw_name_(name),
next_unresolved_(nullptr) {}
+VariableProxy::VariableProxy(Zone* zone, const VariableProxy* copy_from)
+ : Expression(zone, copy_from->position(), kVariableProxy),
+ bit_field_(copy_from->bit_field_),
+ end_position_(copy_from->end_position_),
+ next_unresolved_(nullptr) {
+ if (copy_from->is_resolved()) {
+ var_ = copy_from->var_;
+ } else {
+ raw_name_ = copy_from->raw_name_;
+ }
+}
+
void VariableProxy::BindTo(Variable* var) {
DCHECK((is_this() && var->is_this()) || raw_name() == var->raw_name());
set_var(var);
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698