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