OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |