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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 ZoneList<CaseClause*>* clauses = node->cases(); | 200 ZoneList<CaseClause*>* clauses = node->cases(); |
201 bool set_after_switch = is_set_; | 201 bool set_after_switch = is_set_; |
202 for (int i = clauses->length() - 1; i >= 0; --i) { | 202 for (int i = clauses->length() - 1; i >= 0; --i) { |
203 CaseClause* clause = clauses->at(i); | 203 CaseClause* clause = clauses->at(i); |
204 Process(clause->statements()); | 204 Process(clause->statements()); |
205 } | 205 } |
206 is_set_ = is_set_ && set_after_switch; | 206 is_set_ = is_set_ && set_after_switch; |
207 } | 207 } |
208 | 208 |
209 | 209 |
210 void Processor::VisitCaseClause(CaseClause* clause) { | |
211 UNREACHABLE(); | |
212 } | |
213 | |
214 | |
215 void Processor::VisitContinueStatement(ContinueStatement* node) { | 210 void Processor::VisitContinueStatement(ContinueStatement* node) { |
216 is_set_ = false; | 211 is_set_ = false; |
217 } | 212 } |
218 | 213 |
219 | 214 |
220 void Processor::VisitBreakStatement(BreakStatement* node) { | 215 void Processor::VisitBreakStatement(BreakStatement* node) { |
221 is_set_ = false; | 216 is_set_ = false; |
222 } | 217 } |
223 | 218 |
224 | 219 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 processor.factory()->NewReturnStatement(result_proxy, pos); | 279 processor.factory()->NewReturnStatement(result_proxy, pos); |
285 body->Add(result_statement, info->zone()); | 280 body->Add(result_statement, info->zone()); |
286 } | 281 } |
287 } | 282 } |
288 | 283 |
289 return true; | 284 return true; |
290 } | 285 } |
291 | 286 |
292 | 287 |
293 } } // namespace v8::internal | 288 } } // namespace v8::internal |
OLD | NEW |