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

Side by Side Diff: src/rewriter.cc

Issue 110123002: Enable optimization of functions with generic switches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding tests Created 7 years 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/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698