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

Side by Side Diff: src/rewriter.cc

Issue 15300018: Add initial parser support for harmony iteration (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase onto current master Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/prettyprinter.cc ('k') | src/scanner.h » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void Processor::VisitForStatement(ForStatement* node) { 161 void Processor::VisitForStatement(ForStatement* node) {
162 VisitIterationStatement(node); 162 VisitIterationStatement(node);
163 } 163 }
164 164
165 165
166 void Processor::VisitForInStatement(ForInStatement* node) { 166 void Processor::VisitForInStatement(ForInStatement* node) {
167 VisitIterationStatement(node); 167 VisitIterationStatement(node);
168 } 168 }
169 169
170 170
171 void Processor::VisitForOfStatement(ForOfStatement* node) {
172 VisitIterationStatement(node);
173 }
174
175
171 void Processor::VisitTryCatchStatement(TryCatchStatement* node) { 176 void Processor::VisitTryCatchStatement(TryCatchStatement* node) {
172 // Rewrite both try and catch blocks (reversed order). 177 // Rewrite both try and catch blocks (reversed order).
173 bool set_after_catch = is_set_; 178 bool set_after_catch = is_set_;
174 Visit(node->catch_block()); 179 Visit(node->catch_block());
175 is_set_ = is_set_ && set_after_catch; 180 is_set_ = is_set_ && set_after_catch;
176 bool save = in_try_; 181 bool save = in_try_;
177 in_try_ = true; 182 in_try_ = true;
178 Visit(node->try_block()); 183 Visit(node->try_block());
179 in_try_ = save; 184 in_try_ = save;
180 } 185 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 result_statement->set_statement_pos(position); 280 result_statement->set_statement_pos(position);
276 body->Add(result_statement, info->zone()); 281 body->Add(result_statement, info->zone());
277 } 282 }
278 } 283 }
279 284
280 return true; 285 return true;
281 } 286 }
282 287
283 288
284 } } // namespace v8::internal 289 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/prettyprinter.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698