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

Unified Diff: src/scopes.h

Issue 1309163003: Add a separate scope for switch (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Avoid arrow function in test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/regress/regress-4377.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 4990fab994574a9fb9fbb27814ba93faf3ad5c86..97606a745bf563dc9e152071edb69e2f4a2dd85d 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -246,6 +246,10 @@ class Scope: public ZoneObject {
// for (let x ...) stmt
// start position: start position of '('
// end position: end position of last token of 'stmt'
+ // * For the scope of a switch statement
+ // switch (tag) { cases }
+ // start position: start position of '{'
+ // end position: end position of '}'
int start_position() const { return start_position_; }
void set_start_position(int statement_pos) {
start_position_ = statement_pos;
« 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