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

Side by Side Diff: src/compiler.cc

Issue 346022: Implement new support for if statements in top-level code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 | « no previous file | src/fast-codegen.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 ProcessExpression(stmt->expression(), Expression::kEffect); 531 ProcessExpression(stmt->expression(), Expression::kEffect);
532 } 532 }
533 533
534 534
535 void CodeGenSelector::VisitEmptyStatement(EmptyStatement* stmt) { 535 void CodeGenSelector::VisitEmptyStatement(EmptyStatement* stmt) {
536 // EmptyStatement is supported. 536 // EmptyStatement is supported.
537 } 537 }
538 538
539 539
540 void CodeGenSelector::VisitIfStatement(IfStatement* stmt) { 540 void CodeGenSelector::VisitIfStatement(IfStatement* stmt) {
541 BAILOUT("IfStatement"); 541 ProcessExpression(stmt->condition(), Expression::kTest);
542 CHECK_BAILOUT;
543 Visit(stmt->then_statement());
544 CHECK_BAILOUT;
545 Visit(stmt->else_statement());
542 } 546 }
543 547
544 548
545 void CodeGenSelector::VisitContinueStatement(ContinueStatement* stmt) { 549 void CodeGenSelector::VisitContinueStatement(ContinueStatement* stmt) {
546 BAILOUT("ContinueStatement"); 550 BAILOUT("ContinueStatement");
547 } 551 }
548 552
549 553
550 void CodeGenSelector::VisitBreakStatement(BreakStatement* stmt) { 554 void CodeGenSelector::VisitBreakStatement(BreakStatement* stmt) {
551 BAILOUT("BreakStatement"); 555 BAILOUT("BreakStatement");
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 925
922 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { 926 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) {
923 BAILOUT("ThisFunction"); 927 BAILOUT("ThisFunction");
924 } 928 }
925 929
926 #undef BAILOUT 930 #undef BAILOUT
927 #undef CHECK_BAILOUT 931 #undef CHECK_BAILOUT
928 932
929 933
930 } } // namespace v8::internal 934 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/fast-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698