OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 default: | 1638 default: |
1639 UNREACHABLE(); | 1639 UNREACHABLE(); |
1640 } | 1640 } |
1641 if (initially_false) return; | 1641 if (initially_false) return; |
1642 | 1642 |
1643 // Only check loop condition at the end. | 1643 // Only check loop condition at the end. |
1644 | 1644 |
1645 Visit(node->init()); | 1645 Visit(node->init()); |
1646 | 1646 |
1647 JumpTarget loop(JumpTarget::BIDIRECTIONAL); | 1647 JumpTarget loop(JumpTarget::BIDIRECTIONAL); |
| 1648 // Set type and stack height of BreakTargets. |
| 1649 node->continue_target()->set_direction(JumpTarget::FORWARD_ONLY); |
| 1650 node->break_target()->set_direction(JumpTarget::FORWARD_ONLY); |
1648 | 1651 |
1649 IncrementLoopNesting(); | 1652 IncrementLoopNesting(); |
1650 loop.Bind(); | 1653 loop.Bind(); |
1651 | 1654 |
1652 // Set number type of the loop variable to smi. | 1655 // Set number type of the loop variable to smi. |
1653 CheckStack(); // TODO(1222600): ignore if body contains calls. | 1656 CheckStack(); // TODO(1222600): ignore if body contains calls. |
1654 | 1657 |
1655 SetTypeForStackSlot(loop_var->slot(), TypeInfo::Smi()); | 1658 SetTypeForStackSlot(loop_var->slot(), TypeInfo::Smi()); |
1656 Visit(node->body()); | 1659 Visit(node->body()); |
1657 | 1660 |
(...skipping 10393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12051 } | 12054 } |
12052 | 12055 |
12053 #endif | 12056 #endif |
12054 | 12057 |
12055 | 12058 |
12056 #undef __ | 12059 #undef __ |
12057 | 12060 |
12058 } } // namespace v8::internal | 12061 } } // namespace v8::internal |
12059 | 12062 |
12060 #endif // V8_TARGET_ARCH_X64 | 12063 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |