| 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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 SetStatementPosition(stmt); | 875 SetStatementPosition(stmt); |
| 876 Label body, stack_limit_hit, stack_check_success, done; | 876 Label body, stack_limit_hit, stack_check_success, done; |
| 877 | 877 |
| 878 Iteration loop_statement(this, stmt); | 878 Iteration loop_statement(this, stmt); |
| 879 increment_loop_depth(); | 879 increment_loop_depth(); |
| 880 | 880 |
| 881 __ bind(&body); | 881 __ bind(&body); |
| 882 Visit(stmt->body()); | 882 Visit(stmt->body()); |
| 883 | 883 |
| 884 // Check stack before looping. | 884 // Check stack before looping. |
| 885 __ bind(loop_statement.continue_target()); |
| 885 __ StackLimitCheck(&stack_limit_hit); | 886 __ StackLimitCheck(&stack_limit_hit); |
| 886 __ bind(&stack_check_success); | 887 __ bind(&stack_check_success); |
| 887 | 888 |
| 888 // Record the position of the do while condition and make sure it is | 889 // Record the position of the do while condition and make sure it is |
| 889 // possible to break on the condition. | 890 // possible to break on the condition. |
| 890 __ bind(loop_statement.continue_target()); | |
| 891 SetExpressionPosition(stmt->cond(), stmt->condition_position()); | 891 SetExpressionPosition(stmt->cond(), stmt->condition_position()); |
| 892 VisitForControl(stmt->cond(), | 892 VisitForControl(stmt->cond(), |
| 893 &body, | 893 &body, |
| 894 loop_statement.break_target(), | 894 loop_statement.break_target(), |
| 895 loop_statement.break_target()); | 895 loop_statement.break_target()); |
| 896 | 896 |
| 897 __ bind(loop_statement.break_target()); | 897 __ bind(loop_statement.break_target()); |
| 898 __ jmp(&done); | 898 __ jmp(&done); |
| 899 | 899 |
| 900 __ bind(&stack_limit_hit); | 900 __ bind(&stack_limit_hit); |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 __ Drop(stack_depth); | 1218 __ Drop(stack_depth); |
| 1219 __ PopTryHandler(); | 1219 __ PopTryHandler(); |
| 1220 return 0; | 1220 return 0; |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 | 1223 |
| 1224 #undef __ | 1224 #undef __ |
| 1225 | 1225 |
| 1226 | 1226 |
| 1227 } } // namespace v8::internal | 1227 } } // namespace v8::internal |
| OLD | NEW |