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

Side by Side Diff: src/scopes.h

Issue 1309043004: Revert of Add a separate scope for switch (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/parser.cc ('k') | test/mjsunit/regress/regress-4377.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_SCOPES_H_ 5 #ifndef V8_SCOPES_H_
6 #define V8_SCOPES_H_ 6 #define V8_SCOPES_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/pending-compilation-error-handler.h" 9 #include "src/pending-compilation-error-handler.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // start position: start position of '(' 239 // start position: start position of '('
240 // end position: end position of '}' 240 // end position: end position of '}'
241 // * For the scope of a catch block 241 // * For the scope of a catch block
242 // try { stms } catch(e) { stmts } 242 // try { stms } catch(e) { stmts }
243 // start position: start position of '(' 243 // start position: start position of '('
244 // end position: end position of ')' 244 // end position: end position of ')'
245 // * For the scope of a for-statement 245 // * For the scope of a for-statement
246 // for (let x ...) stmt 246 // for (let x ...) stmt
247 // start position: start position of '(' 247 // start position: start position of '('
248 // end position: end position of last token of 'stmt' 248 // end position: end position of last token of 'stmt'
249 // * For the scope of a switch statement
250 // switch (tag) { cases }
251 // start position: start position of '{'
252 // end position: end position of '}'
253 int start_position() const { return start_position_; } 249 int start_position() const { return start_position_; }
254 void set_start_position(int statement_pos) { 250 void set_start_position(int statement_pos) {
255 start_position_ = statement_pos; 251 start_position_ = statement_pos;
256 } 252 }
257 int end_position() const { return end_position_; } 253 int end_position() const { return end_position_; }
258 void set_end_position(int statement_pos) { 254 void set_end_position(int statement_pos) {
259 end_position_ = statement_pos; 255 end_position_ = statement_pos;
260 } 256 }
261 257
262 // In some cases we want to force context allocation for a whole scope. 258 // In some cases we want to force context allocation for a whole scope.
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 PendingCompilationErrorHandler pending_error_handler_; 762 PendingCompilationErrorHandler pending_error_handler_;
767 763
768 // For tracking which classes are declared consecutively. Needed for strong 764 // For tracking which classes are declared consecutively. Needed for strong
769 // mode. 765 // mode.
770 int class_declaration_group_start_; 766 int class_declaration_group_start_;
771 }; 767 };
772 768
773 } } // namespace v8::internal 769 } } // namespace v8::internal
774 770
775 #endif // V8_SCOPES_H_ 771 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/regress/regress-4377.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698