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

Side by Side Diff: src/variables.h

Issue 1102903002: [strong] Simplify the classes-referring-to-classes check. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: oops Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/scopes.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_VARIABLES_H_ 5 #ifndef V8_VARIABLES_H_
6 #define V8_VARIABLES_H_ 6 #define V8_VARIABLES_H_
7 7
8 #include "src/ast-value-factory.h" 8 #include "src/ast-value-factory.h"
9 #include "src/zone.h" 9 #include "src/zone.h"
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 }; 185 };
186 186
187 class ClassVariable : public Variable { 187 class ClassVariable : public Variable {
188 public: 188 public:
189 ClassVariable(Scope* scope, const AstRawString* name, VariableMode mode, 189 ClassVariable(Scope* scope, const AstRawString* name, VariableMode mode,
190 InitializationFlag initialization_flag, 190 InitializationFlag initialization_flag,
191 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned, 191 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned,
192 int declaration_group_start = -1) 192 int declaration_group_start = -1)
193 : Variable(scope, name, mode, Variable::CLASS, initialization_flag, 193 : Variable(scope, name, mode, Variable::CLASS, initialization_flag,
194 maybe_assigned_flag), 194 maybe_assigned_flag),
195 declaration_group_start_(declaration_group_start), 195 declaration_group_start_(declaration_group_start) {}
196 corresponding_outer_class_variable_(nullptr) {}
197 196
198 int declaration_group_start() const { return declaration_group_start_; } 197 int declaration_group_start() const { return declaration_group_start_; }
199 198 void set_declaration_group_start(int declaration_group_start) {
200 ClassVariable* corresponding_outer_class_variable() const { 199 declaration_group_start_ = declaration_group_start;
201 return corresponding_outer_class_variable_;
202 }
203 void set_corresponding_outer_class_variable(ClassVariable* var) {
204 corresponding_outer_class_variable_ = var;
205 } 200 }
206 201
207 private: 202 private:
208 // For classes we keep track of consecutive groups of delcarations. They are 203 // For classes we keep track of consecutive groups of delcarations. They are
209 // needed for strong mode scoping checks. TODO(marja, rossberg): Implement 204 // needed for strong mode scoping checks. TODO(marja, rossberg): Implement
210 // checks for functions too. 205 // checks for functions too.
211 int declaration_group_start_; 206 int declaration_group_start_;
212 ClassVariable* corresponding_outer_class_variable_;
213 }; 207 };
214 } } // namespace v8::internal 208 } } // namespace v8::internal
215 209
216 #endif // V8_VARIABLES_H_ 210 #endif // V8_VARIABLES_H_
OLDNEW
« no previous file with comments | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698