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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 void CodeGenSelector::VisitWhileStatement(WhileStatement* stmt) { | 731 void CodeGenSelector::VisitWhileStatement(WhileStatement* stmt) { |
732 // We do not handle loops with breaks or continue statements in their | 732 // We do not handle loops with breaks or continue statements in their |
733 // body. We will bailout when we hit those statements in the body. | 733 // body. We will bailout when we hit those statements in the body. |
734 ProcessExpression(stmt->cond(), Expression::kTest); | 734 ProcessExpression(stmt->cond(), Expression::kTest); |
735 CHECK_BAILOUT; | 735 CHECK_BAILOUT; |
736 Visit(stmt->body()); | 736 Visit(stmt->body()); |
737 } | 737 } |
738 | 738 |
739 | 739 |
740 void CodeGenSelector::VisitForStatement(ForStatement* stmt) { | 740 void CodeGenSelector::VisitForStatement(ForStatement* stmt) { |
741 // We do not handle loops with breaks or continue statements in their | 741 BAILOUT("ForStatement"); |
742 // body. We will bailout when we hit those statements in the body. | |
743 if (stmt->init() != NULL) { | |
744 Visit(stmt->init()); | |
745 CHECK_BAILOUT; | |
746 } | |
747 if (stmt->cond() != NULL) { | |
748 ProcessExpression(stmt->cond(), Expression::kTest); | |
749 CHECK_BAILOUT; | |
750 } | |
751 Visit(stmt->body()); | |
752 if (stmt->next() != NULL) { | |
753 CHECK_BAILOUT; | |
754 Visit(stmt->next()); | |
755 } | |
756 } | 742 } |
757 | 743 |
758 | 744 |
759 void CodeGenSelector::VisitForInStatement(ForInStatement* stmt) { | 745 void CodeGenSelector::VisitForInStatement(ForInStatement* stmt) { |
760 BAILOUT("ForInStatement"); | 746 BAILOUT("ForInStatement"); |
761 } | 747 } |
762 | 748 |
763 | 749 |
764 void CodeGenSelector::VisitTryCatchStatement(TryCatchStatement* stmt) { | 750 void CodeGenSelector::VisitTryCatchStatement(TryCatchStatement* stmt) { |
765 BAILOUT("TryCatchStatement"); | 751 BAILOUT("TryCatchStatement"); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 | 1112 |
1127 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 1113 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
1128 // ThisFunction is supported. | 1114 // ThisFunction is supported. |
1129 } | 1115 } |
1130 | 1116 |
1131 #undef BAILOUT | 1117 #undef BAILOUT |
1132 #undef CHECK_BAILOUT | 1118 #undef CHECK_BAILOUT |
1133 | 1119 |
1134 | 1120 |
1135 } } // namespace v8::internal | 1121 } } // namespace v8::internal |
OLD | NEW |