OLD | NEW |
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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 BAILOUT("WithExitStatement"); | 701 BAILOUT("WithExitStatement"); |
702 } | 702 } |
703 | 703 |
704 | 704 |
705 void CodeGenSelector::VisitSwitchStatement(SwitchStatement* stmt) { | 705 void CodeGenSelector::VisitSwitchStatement(SwitchStatement* stmt) { |
706 BAILOUT("SwitchStatement"); | 706 BAILOUT("SwitchStatement"); |
707 } | 707 } |
708 | 708 |
709 | 709 |
710 void CodeGenSelector::VisitDoWhileStatement(DoWhileStatement* stmt) { | 710 void CodeGenSelector::VisitDoWhileStatement(DoWhileStatement* stmt) { |
711 BAILOUT("DoWhileStatement"); | 711 // We do not handle loops with breaks or continue statements in their |
| 712 // body. We will bailout when we hit those statements in the body. |
| 713 ProcessExpression(stmt->cond(), Expression::kTest); |
| 714 CHECK_BAILOUT; |
| 715 Visit(stmt->body()); |
712 } | 716 } |
713 | 717 |
714 | 718 |
715 void CodeGenSelector::VisitWhileStatement(WhileStatement* stmt) { | 719 void CodeGenSelector::VisitWhileStatement(WhileStatement* stmt) { |
716 BAILOUT("WhileStatement"); | 720 // We do not handle loops with breaks or continue statements in their |
| 721 // body. We will bailout when we hit those statements in the body. |
| 722 ProcessExpression(stmt->cond(), Expression::kTest); |
| 723 CHECK_BAILOUT; |
| 724 Visit(stmt->body()); |
717 } | 725 } |
718 | 726 |
719 | 727 |
720 void CodeGenSelector::VisitForStatement(ForStatement* stmt) { | 728 void CodeGenSelector::VisitForStatement(ForStatement* stmt) { |
721 // We do not handle loops with breaks or continue statements in their | 729 // We do not handle loops with breaks or continue statements in their |
722 // body. We will bailout when we hit those statements in the body. | 730 // body. We will bailout when we hit those statements in the body. |
723 if (stmt->init() != NULL) { | 731 if (stmt->init() != NULL) { |
724 Visit(stmt->init()); | 732 Visit(stmt->init()); |
725 CHECK_BAILOUT; | 733 CHECK_BAILOUT; |
726 } | 734 } |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 | 1108 |
1101 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 1109 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
1102 BAILOUT("ThisFunction"); | 1110 BAILOUT("ThisFunction"); |
1103 } | 1111 } |
1104 | 1112 |
1105 #undef BAILOUT | 1113 #undef BAILOUT |
1106 #undef CHECK_BAILOUT | 1114 #undef CHECK_BAILOUT |
1107 | 1115 |
1108 | 1116 |
1109 } } // namespace v8::internal | 1117 } } // namespace v8::internal |
OLD | NEW |