| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 frame_->SpillAll(); | 2676 frame_->SpillAll(); |
| 2677 | 2677 |
| 2678 // Discard the i'th entry pushed above or else the remainder of the | 2678 // Discard the i'th entry pushed above or else the remainder of the |
| 2679 // reference, whichever is currently on top of the stack. | 2679 // reference, whichever is currently on top of the stack. |
| 2680 frame_->Drop(); | 2680 frame_->Drop(); |
| 2681 | 2681 |
| 2682 // Body. | 2682 // Body. |
| 2683 CheckStack(); // TODO(1222600): ignore if body contains calls. | 2683 CheckStack(); // TODO(1222600): ignore if body contains calls. |
| 2684 VisitAndSpill(node->body()); | 2684 VisitAndSpill(node->body()); |
| 2685 | 2685 |
| 2686 // Next. | 2686 // Next. Reestablish a spilled frame in case we are coming here via |
| 2687 // a continue in the body. |
| 2687 node->continue_target()->Bind(); | 2688 node->continue_target()->Bind(); |
| 2689 frame_->SpillAll(); |
| 2688 frame_->EmitPop(eax); | 2690 frame_->EmitPop(eax); |
| 2689 __ add(Operand(eax), Immediate(Smi::FromInt(1))); | 2691 __ add(Operand(eax), Immediate(Smi::FromInt(1))); |
| 2690 frame_->EmitPush(eax); | 2692 frame_->EmitPush(eax); |
| 2691 entry.Jump(); | 2693 entry.Jump(); |
| 2692 | 2694 |
| 2693 // Cleanup. | 2695 // Cleanup. No need to spill because VirtualFrame::Drop is safe for |
| 2696 // any frame. |
| 2694 node->break_target()->Bind(); | 2697 node->break_target()->Bind(); |
| 2695 frame_->Drop(5); | 2698 frame_->Drop(5); |
| 2696 | 2699 |
| 2697 // Exit. | 2700 // Exit. |
| 2698 exit.Bind(); | 2701 exit.Bind(); |
| 2699 | 2702 |
| 2700 node->continue_target()->Unuse(); | 2703 node->continue_target()->Unuse(); |
| 2701 node->break_target()->Unuse(); | 2704 node->break_target()->Unuse(); |
| 2702 } | 2705 } |
| 2703 | 2706 |
| (...skipping 4287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6991 | 6994 |
| 6992 // Slow-case: Go through the JavaScript implementation. | 6995 // Slow-case: Go through the JavaScript implementation. |
| 6993 __ bind(&slow); | 6996 __ bind(&slow); |
| 6994 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 6997 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 6995 } | 6998 } |
| 6996 | 6999 |
| 6997 | 7000 |
| 6998 #undef __ | 7001 #undef __ |
| 6999 | 7002 |
| 7000 } } // namespace v8::internal | 7003 } } // namespace v8::internal |
| OLD | NEW |